This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix build on sparc (remote.c/tracepoints)
On 11/26/11 12:51 PM, Joel Brobecker wrote:
gdb/ChangeLog:
* remote.c (remote_get_tracepoint_status): Delete addrbuf
local variable. Avoid use of sprintf_vma.
Lucky me I didn't delete the patch before David called me on it!
Heh, I sit down from around-the-house tasks thinking to commit my fix,
and Joel has it in hand already! There is one tweak I would suggest:
- sprintf_vma (addrbuf, loc->address);
- sprintf (rs->buf, "qTP:%x:%s", tp->number_on_target, addrbuf);
+ sprintf (rs->buf, "qTP:%x:%s", tp->number_on_target,
+ phex_nz (loc->address,
+ gdbarch_addr_bit (target_gdbarch) / 8));
Just use phex_nz (loc->address, 0) here, its builtin sizeof calculation should be satisfactory.
Stan