forked from Imagelibrary/binutils-gdb
The following changes avoid polluting global namespace with the
`enable' and `disable' identifiers, because some platforms define in their system headers symbols with global scope that go by those names. * breakpoint.h (enum enable_state): Rename from `enum enable'. Also rename all the enum members to have the "bp_" prefix. (struct breakpoint): Rename the `enable' member to `enable_state'. (enum bpdisp): Rename all members to have the "disp_" prefix. * breakpoint.c: All users of `enum enable' and `enum bpdisp' changed. (args_for_catchpoint_enable): Rename the `enable' member to `enable_p'. All users changed. * tracepoint.h (enum enable): Remove. (struct tracepoint): The member `enabled' is now `int enabled_p'. * tracepoint.c: All users of the `enabled' member changed. * printcmd.c (struct display): The `status' member is now an int. * memattr.h (struct mem_region): Rename the `status' member to `enabled_p'. (enum enable): Remove. * memattr.c: Change all users of the `status' member of struct mem_region to use `enabled_p' instead. * infcmd.c (run_stack_dummy): Use disp_del instead of del. * go32-nat.c: Remove the kludgey work-around for conflicts between <dos.h> and "breakpoint.h". * tui/tuiSourceWin.c: Use disp_del instead of del. * tui/tuiSource.c: Use disp_del instead of del. * tui/tuiDisassem.c: Use disp_del instead of del.
This commit is contained in:
@@ -27,16 +27,6 @@
|
||||
#include "language.h"
|
||||
#include "gdb_string.h"
|
||||
|
||||
/* FIXME: While this conflicts with the enum defined in breakpoint.h,
|
||||
I used them to be consistant with how breakpoints, tracepoints, and
|
||||
displays are implemented. It doesn't lose now because breakpoint.h
|
||||
is not included. */
|
||||
enum enable
|
||||
{
|
||||
disabled,
|
||||
enabled
|
||||
};
|
||||
|
||||
const struct mem_attrib default_mem_attrib =
|
||||
{
|
||||
MEM_RW, /* mode */
|
||||
@@ -78,7 +68,7 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
|
||||
new->lo = lo;
|
||||
new->hi = hi;
|
||||
new->number = ++mem_number;
|
||||
new->status = enabled;
|
||||
new->enabled_p = 1;
|
||||
new->attrib = *attrib;
|
||||
|
||||
/* link in new node */
|
||||
@@ -117,7 +107,7 @@ lookup_mem_region (CORE_ADDR addr)
|
||||
|
||||
for (m = mem_region_chain; m; m = m->next)
|
||||
{
|
||||
if (m->status == enabled)
|
||||
if (m->enabled_p == 1)
|
||||
{
|
||||
if (addr >= m->lo && addr < m->hi)
|
||||
return m;
|
||||
@@ -245,7 +235,7 @@ mem_info_command (char *args, int from_tty)
|
||||
char *tmp;
|
||||
printf_filtered ("%-3d %-3c\t",
|
||||
m->number,
|
||||
m->status ? 'y' : 'n');
|
||||
m->enabled_p ? 'y' : 'n');
|
||||
if (TARGET_ADDR_BIT <= 32)
|
||||
tmp = longest_local_hex_string_custom ((unsigned long) m->lo, "08l");
|
||||
else
|
||||
@@ -340,7 +330,7 @@ mem_enable (int num)
|
||||
for (m = mem_region_chain; m; m = m->next)
|
||||
if (m->number == num)
|
||||
{
|
||||
m->status = enabled;
|
||||
m->enabled_p = 1;
|
||||
return;
|
||||
}
|
||||
printf_unfiltered ("No memory region number %d.\n", num);
|
||||
@@ -359,7 +349,7 @@ mem_enable_command (char *args, int from_tty)
|
||||
if (p == 0)
|
||||
{
|
||||
for (m = mem_region_chain; m; m = m->next)
|
||||
m->status = enabled;
|
||||
m->enabled_p = 1;
|
||||
}
|
||||
else
|
||||
while (*p)
|
||||
@@ -390,7 +380,7 @@ mem_disable (int num)
|
||||
for (m = mem_region_chain; m; m = m->next)
|
||||
if (m->number == num)
|
||||
{
|
||||
m->status = disabled;
|
||||
m->enabled_p = 0;
|
||||
return;
|
||||
}
|
||||
printf_unfiltered ("No memory region number %d.\n", num);
|
||||
@@ -409,7 +399,7 @@ mem_disable_command (char *args, int from_tty)
|
||||
if (p == 0)
|
||||
{
|
||||
for (m = mem_region_chain; m; m = m->next)
|
||||
m->status = disabled;
|
||||
m->enabled_p = 0;
|
||||
}
|
||||
else
|
||||
while (*p)
|
||||
|
||||
Reference in New Issue
Block a user