[RFC,2/4] Introduce maint set prefer-software-single-stepping on/off
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
Commit Message
Add a maintenance command that enables using software single-stepping on
targets that support this:
...
(gdb) maint set prefer-software-single-stepping on
...
By default, prefer-software-single-stepping is off, and behaviour is
unchanged.
Also, there are no users yet, the following patch will add one for amd64.
This is an RFC for the moment, so no docs yet.
Tested on x86_64-linux.
---
gdb/breakpoint.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
@@ -13945,6 +13945,9 @@ insert_single_step_breakpoint (struct gdbarch *gdbarch,
update_global_location_list (UGLL_INSERT);
}
+extern bool prefer_software_single_stepping;
+bool prefer_software_single_stepping;
+
bool
software_single_step_p (struct gdbarch *gdbarch)
{
@@ -15168,6 +15171,16 @@ When on, breakpoint location specific debugging is enabled."),
show_debug_breakpoint,
&setdebuglist, &showdebuglist);
+ add_setshow_boolean_cmd ("prefer-software-single-stepping", class_maintenance,
+ &prefer_software_single_stepping, _("\
+Set whether software single-stepping is preferred."), _("\
+Show whether software single-stepping is preferred."), _("\
+When on, if both are available, software single-stepping is preferred over hardware single-stepping."),
+ NULL,
+ NULL,
+ &maintenance_set_cmdlist,
+ &maintenance_show_cmdlist);
+
add_setshow_enum_cmd ("condition-evaluation", class_breakpoint,
condition_evaluation_enums,
&condition_evaluation_mode_1, _("\