gdb:
* breakpoint.c: Removed always_inserted_auto, always_inserted_on, always_inserted_off, and always_inserted_enums. Change always_inserted_mode's type to 'enum auto_boolean'. (show_always_inserted_mode, breakpoint_always_inserted_mode): Update callers. (_initialize_breakpoint): Call add_setshow_auto_boolean_cmd instead of add_setshow_enum_cmd. * infrun.c: Remove can_use_displaced_stepping_auto, can_use_displaced_stepping_on, can_use_displaced_stepping_off, and can_use_displaced_stepping_enum. Change can_use_displaced_stepping's type to 'enum auto_boolean'. (show_can_use_displaced_stepping, use_displaced_stepping): Update callers. (_initialize_infrun): Call add_setshow_auto_boolean_cmd instead of add_setshow_enum_cmd.
This commit is contained in:
parent
bc823199d1
commit
72d0e2c5df
3 changed files with 37 additions and 44 deletions
|
@ -1,3 +1,20 @@
|
||||||
|
2012-07-01 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* breakpoint.c: Removed always_inserted_auto, always_inserted_on,
|
||||||
|
always_inserted_off, and always_inserted_enums.
|
||||||
|
Change always_inserted_mode's type to 'enum auto_boolean'.
|
||||||
|
(show_always_inserted_mode, breakpoint_always_inserted_mode): Update
|
||||||
|
callers.
|
||||||
|
(_initialize_breakpoint): Call add_setshow_auto_boolean_cmd instead
|
||||||
|
of add_setshow_enum_cmd.
|
||||||
|
* infrun.c: Remove can_use_displaced_stepping_auto,
|
||||||
|
can_use_displaced_stepping_on, can_use_displaced_stepping_off, and
|
||||||
|
can_use_displaced_stepping_enum.
|
||||||
|
Change can_use_displaced_stepping's type to 'enum auto_boolean'.
|
||||||
|
(show_can_use_displaced_stepping, use_displaced_stepping): Update callers.
|
||||||
|
(_initialize_infrun): Call add_setshow_auto_boolean_cmd instead of
|
||||||
|
add_setshow_enum_cmd.
|
||||||
|
|
||||||
2012-06-30 Doug Evans <dje@google.com>
|
2012-06-30 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* dwarf2read.c (signatured_type): Make "per_cu" member first.
|
* dwarf2read.c (signatured_type): Make "per_cu" member first.
|
||||||
|
|
|
@ -387,21 +387,13 @@ show_automatic_hardware_breakpoints (struct ui_file *file, int from_tty,
|
||||||
will remove breakpoints upon stop. If auto, GDB will behave as ON
|
will remove breakpoints upon stop. If auto, GDB will behave as ON
|
||||||
if in non-stop mode, and as OFF if all-stop mode.*/
|
if in non-stop mode, and as OFF if all-stop mode.*/
|
||||||
|
|
||||||
static const char always_inserted_auto[] = "auto";
|
static enum auto_boolean always_inserted_mode = AUTO_BOOLEAN_AUTO;
|
||||||
static const char always_inserted_on[] = "on";
|
|
||||||
static const char always_inserted_off[] = "off";
|
|
||||||
static const char *const always_inserted_enums[] = {
|
|
||||||
always_inserted_auto,
|
|
||||||
always_inserted_off,
|
|
||||||
always_inserted_on,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
static const char *always_inserted_mode = always_inserted_auto;
|
|
||||||
static void
|
static void
|
||||||
show_always_inserted_mode (struct ui_file *file, int from_tty,
|
show_always_inserted_mode (struct ui_file *file, int from_tty,
|
||||||
struct cmd_list_element *c, const char *value)
|
struct cmd_list_element *c, const char *value)
|
||||||
{
|
{
|
||||||
if (always_inserted_mode == always_inserted_auto)
|
if (always_inserted_mode == AUTO_BOOLEAN_AUTO)
|
||||||
fprintf_filtered (file,
|
fprintf_filtered (file,
|
||||||
_("Always inserted breakpoint "
|
_("Always inserted breakpoint "
|
||||||
"mode is %s (currently %s).\n"),
|
"mode is %s (currently %s).\n"),
|
||||||
|
@ -415,8 +407,8 @@ show_always_inserted_mode (struct ui_file *file, int from_tty,
|
||||||
int
|
int
|
||||||
breakpoints_always_inserted_mode (void)
|
breakpoints_always_inserted_mode (void)
|
||||||
{
|
{
|
||||||
return (always_inserted_mode == always_inserted_on
|
return (always_inserted_mode == AUTO_BOOLEAN_TRUE
|
||||||
|| (always_inserted_mode == always_inserted_auto && non_stop));
|
|| (always_inserted_mode == AUTO_BOOLEAN_AUTO && non_stop));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char condition_evaluation_both[] = "host or target";
|
static const char condition_evaluation_both[] = "host or target";
|
||||||
|
@ -16161,8 +16153,8 @@ a warning will be emitted for such breakpoints."),
|
||||||
&breakpoint_set_cmdlist,
|
&breakpoint_set_cmdlist,
|
||||||
&breakpoint_show_cmdlist);
|
&breakpoint_show_cmdlist);
|
||||||
|
|
||||||
add_setshow_enum_cmd ("always-inserted", class_support,
|
add_setshow_auto_boolean_cmd ("always-inserted", class_support,
|
||||||
always_inserted_enums, &always_inserted_mode, _("\
|
&always_inserted_mode, _("\
|
||||||
Set mode for inserting breakpoints."), _("\
|
Set mode for inserting breakpoints."), _("\
|
||||||
Show mode for inserting breakpoints."), _("\
|
Show mode for inserting breakpoints."), _("\
|
||||||
When this mode is off, breakpoints are inserted in inferior when it is\n\
|
When this mode is off, breakpoints are inserted in inferior when it is\n\
|
||||||
|
|
26
gdb/infrun.c
26
gdb/infrun.c
|
@ -1185,19 +1185,6 @@ infrun_inferior_exit (struct inferior *inf)
|
||||||
remove_displaced_stepping_state (inf->pid);
|
remove_displaced_stepping_state (inf->pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enum strings for "set|show displaced-stepping". */
|
|
||||||
|
|
||||||
static const char can_use_displaced_stepping_auto[] = "auto";
|
|
||||||
static const char can_use_displaced_stepping_on[] = "on";
|
|
||||||
static const char can_use_displaced_stepping_off[] = "off";
|
|
||||||
static const char *const can_use_displaced_stepping_enum[] =
|
|
||||||
{
|
|
||||||
can_use_displaced_stepping_auto,
|
|
||||||
can_use_displaced_stepping_on,
|
|
||||||
can_use_displaced_stepping_off,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* If ON, and the architecture supports it, GDB will use displaced
|
/* If ON, and the architecture supports it, GDB will use displaced
|
||||||
stepping to step over breakpoints. If OFF, or if the architecture
|
stepping to step over breakpoints. If OFF, or if the architecture
|
||||||
doesn't support it, GDB will instead use the traditional
|
doesn't support it, GDB will instead use the traditional
|
||||||
|
@ -1206,15 +1193,14 @@ static const char *const can_use_displaced_stepping_enum[] =
|
||||||
which of all-stop or non-stop mode is active --- displaced stepping
|
which of all-stop or non-stop mode is active --- displaced stepping
|
||||||
in non-stop mode; hold-and-step in all-stop mode. */
|
in non-stop mode; hold-and-step in all-stop mode. */
|
||||||
|
|
||||||
static const char *can_use_displaced_stepping =
|
static enum auto_boolean can_use_displaced_stepping = AUTO_BOOLEAN_AUTO;
|
||||||
can_use_displaced_stepping_auto;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
show_can_use_displaced_stepping (struct ui_file *file, int from_tty,
|
show_can_use_displaced_stepping (struct ui_file *file, int from_tty,
|
||||||
struct cmd_list_element *c,
|
struct cmd_list_element *c,
|
||||||
const char *value)
|
const char *value)
|
||||||
{
|
{
|
||||||
if (can_use_displaced_stepping == can_use_displaced_stepping_auto)
|
if (can_use_displaced_stepping == AUTO_BOOLEAN_AUTO)
|
||||||
fprintf_filtered (file,
|
fprintf_filtered (file,
|
||||||
_("Debugger's willingness to use displaced stepping "
|
_("Debugger's willingness to use displaced stepping "
|
||||||
"to step over breakpoints is %s (currently %s).\n"),
|
"to step over breakpoints is %s (currently %s).\n"),
|
||||||
|
@ -1231,9 +1217,8 @@ show_can_use_displaced_stepping (struct ui_file *file, int from_tty,
|
||||||
static int
|
static int
|
||||||
use_displaced_stepping (struct gdbarch *gdbarch)
|
use_displaced_stepping (struct gdbarch *gdbarch)
|
||||||
{
|
{
|
||||||
return (((can_use_displaced_stepping == can_use_displaced_stepping_auto
|
return (((can_use_displaced_stepping == AUTO_BOOLEAN_AUTO && non_stop)
|
||||||
&& non_stop)
|
|| can_use_displaced_stepping == AUTO_BOOLEAN_TRUE)
|
||||||
|| can_use_displaced_stepping == can_use_displaced_stepping_on)
|
|
||||||
&& gdbarch_displaced_step_copy_insn_p (gdbarch)
|
&& gdbarch_displaced_step_copy_insn_p (gdbarch)
|
||||||
&& !RECORD_IS_USED);
|
&& !RECORD_IS_USED);
|
||||||
}
|
}
|
||||||
|
@ -7296,8 +7281,7 @@ function is skipped and the step command stops at a different source line."),
|
||||||
show_step_stop_if_no_debug,
|
show_step_stop_if_no_debug,
|
||||||
&setlist, &showlist);
|
&setlist, &showlist);
|
||||||
|
|
||||||
add_setshow_enum_cmd ("displaced-stepping", class_run,
|
add_setshow_auto_boolean_cmd ("displaced-stepping", class_run,
|
||||||
can_use_displaced_stepping_enum,
|
|
||||||
&can_use_displaced_stepping, _("\
|
&can_use_displaced_stepping, _("\
|
||||||
Set debugger's willingness to use displaced stepping."), _("\
|
Set debugger's willingness to use displaced stepping."), _("\
|
||||||
Show debugger's willingness to use displaced stepping."), _("\
|
Show debugger's willingness to use displaced stepping."), _("\
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue