projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* gas/mips/macro-warn-[1234].[sdl]: New tests.
[deliverable/binutils-gdb.git]
/
gdb
/
memattr.c
diff --git
a/gdb/memattr.c
b/gdb/memattr.c
index 7387e8d830df1b41b10e4fbb942a50ce8dde6f79..4ab5dbf10091f6c0957f8348b4b2ad8e3184e711 100644
(file)
--- a/
gdb/memattr.c
+++ b/
gdb/memattr.c
@@
-1,5
+1,6
@@
/* Memory attributes support, for GDB.
/* Memory attributes support, for GDB.
- Copyright 2001 Free Software Foundation, Inc.
+
+ Copyright 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-46,7
+47,7
@@
create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
struct mem_region *n, *new;
/* lo == hi is a useless empty region */
struct mem_region *n, *new;
/* lo == hi is a useless empty region */
- if (lo >= hi)
+ if (lo >= hi
&& hi != 0
)
{
printf_unfiltered ("invalid memory region: low >= high\n");
return NULL;
{
printf_unfiltered ("invalid memory region: low >= high\n");
return NULL;
@@
-56,8
+57,9
@@
create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
while (n)
{
/* overlapping node */
while (n)
{
/* overlapping node */
- if ((lo >= n->lo && lo < n->hi) ||
- (hi > n->lo && hi <= n->hi))
+ if ((lo >= n->lo && (lo < n->hi || n->hi == 0))
+ || (hi > n->lo && (hi <= n->hi || n->hi == 0))
+ || (lo <= n->lo && (hi >= n->hi || hi == 0)))
{
printf_unfiltered ("overlapping memory region\n");
return NULL;
{
printf_unfiltered ("overlapping memory region\n");
return NULL;
@@
-110,7
+112,7
@@
lookup_mem_region (CORE_ADDR addr)
{
if (m->enabled_p == 1)
{
{
if (m->enabled_p == 1)
{
- if (addr >= m->lo &&
addr < m->hi
)
+ if (addr >= m->lo &&
(addr < m->hi || m->hi == 0)
)
return m;
if (addr >= m->hi && lo < m->hi)
return m;
if (addr >= m->hi && lo < m->hi)
@@
-238,17
+240,27
@@
mem_info_command (char *args, int from_tty)
m->number,
m->enabled_p ? 'y' : 'n');
if (TARGET_ADDR_BIT <= 32)
m->number,
m->enabled_p ? 'y' : 'n');
if (TARGET_ADDR_BIT <= 32)
- tmp = lo
ngest_lo
cal_hex_string_custom ((unsigned long) m->lo, "08l");
+ tmp = local_hex_string_custom ((unsigned long) m->lo, "08l");
else
else
- tmp = lo
ngest_lo
cal_hex_string_custom ((unsigned long) m->lo, "016l");
+ tmp = local_hex_string_custom ((unsigned long) m->lo, "016l");
printf_filtered ("%s ", tmp);
printf_filtered ("%s ", tmp);
-
+
if (TARGET_ADDR_BIT <= 32)
if (TARGET_ADDR_BIT <= 32)
- tmp = longest_local_hex_string_custom ((unsigned long) m->hi, "08l");
+ {
+ if (m->hi == 0)
+ tmp = "0x100000000";
+ else
+ tmp = local_hex_string_custom ((unsigned long) m->hi, "08l");
+ }
else
else
- tmp = longest_local_hex_string_custom ((unsigned long) m->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.
printf_filtered ("%s ", tmp);
/* Print a token for each attribute.
@@
-502,8
+514,10
@@
mem_delete_command (char *args, int from_tty)
dont_repeat ();
}
\f
dont_repeat ();
}
\f
+extern initialize_file_ftype _initialize_mem; /* -Wmissing-prototype */
+
void
void
-_initialize_mem ()
+_initialize_mem (
void
)
{
add_com ("mem", class_vars, mem_command,
"Define attributes for memory region.\n\
{
add_com ("mem", class_vars, mem_command,
"Define attributes for memory region.\n\
This page took
0.025643 seconds
and
4
git commands to generate.