aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDon Howard <dhoward@redhat.com>2002-08-09 22:50:31 +0000
committerDon Howard <dhoward@redhat.com>2002-08-09 22:50:31 +0000
commit2163ab9d5cc4f9a8d3079af5a5768662d8047dda (patch)
tree468504c84be1f19c7511e1d695ddcae2dffdab62 /gdb
parentb78bcb188cfe6d08922c37efeaa4f95e39b9b74f (diff)
downloadgdb-2163ab9d5cc4f9a8d3079af5a5768662d8047dda.zip
gdb-2163ab9d5cc4f9a8d3079af5a5768662d8047dda.tar.gz
gdb-2163ab9d5cc4f9a8d3079af5a5768662d8047dda.tar.bz2
2002-08-09 Don Howard <dhoward@redhat.com>
* memattr.c (mem_info_command): Print special case of upper bound as max CORE_ADDR + 1.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/memattr.c18
2 files changed, 18 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 146cd3a..42d2bb0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-09 Don Howard <dhoward@redhat.com>
+
+ * memattr.c (mem_info_command): Print special case of upper bound
+ as max CORE_ADDR + 1.
+
2002-08-08 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_n32n64_use_struct_convention): N32 only
diff --git a/gdb/memattr.c b/gdb/memattr.c
index aaaaba7..05ad413 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -235,7 +235,6 @@ mem_info_command (char *args, int from_tty)
for (m = mem_region_chain; m; m = m->next)
{
- CORE_ADDR hi;
char *tmp;
printf_filtered ("%-3d %-3c\t",
m->number,
@@ -246,13 +245,22 @@ mem_info_command (char *args, int from_tty)
tmp = local_hex_string_custom ((unsigned long) m->lo, "016l");
printf_filtered ("%s ", tmp);
- hi = (m->hi == 0 ? ~0 : m->hi);
if (TARGET_ADDR_BIT <= 32)
- tmp = local_hex_string_custom ((unsigned long) hi, "08l");
+ {
+ if (m->hi == 0)
+ tmp = "0x100000000";
+ else
+ tmp = local_hex_string_custom ((unsigned long) m->hi, "08l");
+ }
else
- tmp = local_hex_string_custom ((unsigned long) hi, "016l");
-
+ {
+ if (m->hi == 0)
+ tmp = "0x10000000000000000";
+ else
+ tmp = local_hex_string_custom ((unsigned long) m->hi, "016l");
+ }
+
printf_filtered ("%s ", tmp);
/* Print a token for each attribute.