This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve printf DFP support


On Tue, 2008-01-08 at 11:27 -0200, Luis Machado wrote:
> Comments?

> +	      gdb_byte *param_ptr = (gdb_byte *) value_contents_all >
(val_args[i])
>                                        + value_offset (val_args[i]);

param_ptr should be a const gdb_byte *, and the cast here should be
removed. In addition, I believe the use of value_offset here is wrong.
Other uses of value_offset are to obtain a memory address in the
inferior address space, not in GDB's. Also, I think that value_contents
should be used intead of value_contents_all so that the value's
embedded_offset can be taken into account.

> +	      dfp_ptr = (gdb_byte *) value_contents_all (dfp_value)
> +				      + value_offset (dfp_value);

Same here.

PS: I don't have deep understaing of GDB's value mechanism so if someone
sees I am saying something wrong here please correct me.
-- 
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]