This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Improve printf DFP support
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: luisgpm at linux dot vnet dot ibm dot com
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 08 Jan 2008 13:19:06 -0200
- Subject: Re: [PATCH] Improve printf DFP support
- References: <1199798856.22083.9.camel@gargoyle>
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