aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2002-02-13 06:06:26 +0000
committerKeith Seitz <keiths@redhat.com>2002-02-13 06:06:26 +0000
commit49b563f9d8f6a88d61fb6d0fa7a370a659d948d6 (patch)
tree6e396a8f138883eaa9d8420b52975d53cf5d3a40 /gdb/utils.c
parent1d4bd9fd56d800b1e490e51ab3abae282f43ae4c (diff)
downloadbinutils-49b563f9d8f6a88d61fb6d0fa7a370a659d948d6.zip
binutils-49b563f9d8f6a88d61fb6d0fa7a370a659d948d6.tar.gz
binutils-49b563f9d8f6a88d61fb6d0fa7a370a659d948d6.tar.bz2
* defs.h (core_addr_to_string_nz): New function.
* utils.c (core_addr_to_string): Use phex instead of phex_nz. (core_addr_to_string_nz): New function.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index e27769f..627c89e 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2476,6 +2476,15 @@ core_addr_to_string (const CORE_ADDR addr)
{
char *str = get_cell ();
strcpy (str, "0x");
+ strcat (str, phex (addr, sizeof (addr)));
+ return str;
+}
+
+const char *
+core_addr_to_string_nz (const CORE_ADDR addr)
+{
+ char *str = get_cell ();
+ strcpy (str, "0x");
strcat (str, phex_nz (addr, sizeof (addr)));
return str;
}