daily update
[deliverable/binutils-gdb.git] / gdb / memattr.c
index 37a97ebc76c21140ac5fee840dffdc0e02a38dc7..05ad413cc0afb63486d3f12660bc9809568f3033 100644 (file)
@@ -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.
@@ -507,7 +515,7 @@ mem_delete_command (char *args, int from_tty)
 }
 \f
 void
-_initialize_mem ()
+_initialize_mem (void)
 {
   add_com ("mem", class_vars, mem_command,
           "Define attributes for memory region.\n\
This page took 0.024742 seconds and 4 git commands to generate.