From 5c3216e2a7b107d7650aae0ab8955cb0b2c4b1ac Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 20 Jul 2010 18:10:52 +0000 Subject: [PATCH] * gdb/gdbserver/utils.c (paddress): Return phex_nz(). --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/utils.c | 20 +++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 8f50ce01e94..1400a242463 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2010-07-20 Ozkan Sezer + + * utils.c (paddress): Return phex_nz(). + 2010-07-07 Joel Brobecker * server.c (handle_v_cont): Call mourn_inferior if process diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c index b94296237a0..8a1acd9fc72 100644 --- a/gdb/gdbserver/utils.c +++ b/gdb/gdbserver/utils.c @@ -257,17 +257,6 @@ xsnprintf (char *str, size_t size, const char *format, ...) return ret; } -/* Convert a CORE_ADDR into a HEX string, like %lx. - The result is stored in a circular static buffer, NUMCELLS deep. */ - -char * -paddress (CORE_ADDR addr) -{ - char *str = get_cell (); - xsnprintf (str, CELLSIZE, "%lx", (long) addr); - return str; -} - static char * decimal2str (char *sign, ULONGEST addr, int width) { @@ -372,3 +361,12 @@ phex_nz (ULONGEST l, int sizeof_l) return str; } + +/* Convert a CORE_ADDR into a HEX string, like %lx. + The result is stored in a circular static buffer, NUMCELLS deep. */ + +char * +paddress (CORE_ADDR addr) +{ + return phex_nz (addr, sizeof (CORE_ADDR)); +} -- 2.30.2