aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/utils.c9
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 53dc6a9..0bf78e9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-12 Keith Seitz <keiths@redhat.com>
+
+ * 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.
+
2002-02-11 Richard Earnshaw <rearnsha@arm.com>
* arm-linux-nat.c: Really include arm-tdep.h.
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;
}