diff options
author | Xavier Roirand <roirand@adacore.com> | 2017-11-07 11:00:31 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-11-07 11:00:31 +0000 |
commit | d0fe47010fc3289e081ba547a0bfcc6d07906cd2 (patch) | |
tree | cb255e0b04bb0b1e4d43bce583ca2938e08f4b7d /gdb/NEWS | |
parent | 0198d5e6fc331d50dc19b7f250ac4bc510a8dbb5 (diff) | |
download | gdb-d0fe47010fc3289e081ba547a0bfcc6d07906cd2.zip gdb-d0fe47010fc3289e081ba547a0bfcc6d07906cd2.tar.gz gdb-d0fe47010fc3289e081ba547a0bfcc6d07906cd2.tar.bz2 |
Allow enabling/disabling breakpoint location ranges
When a breakpoint has multiple locations, like e.g.:
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x080486a2 in void foo<int>()...
1.2 y 0x080486ca in void foo<double>()...
[....]
1.5 y 0x080487fa in void foo<long>()...
it's possible to enable/disable the individual locations using the
'<breakpoint_number>.<location_number>' syntax, like e.g.:
(gdb) disable 1.2 1.3 1.4 1.5
That's inconvenient when you have a long list of locations to disable,
however.
This patch adds shorthand for the above, by making it possible to
specify a range of locations with the following syntax (similar to
thread id ranges):
<breakpoint_number>.<first_location_number>-<last_location_number>
For example, the command above can now be simplified to:
(gdb) disable 1.2-5
gdb/ChangeLog:
2017-11-07 Xavier Roirand <roirand@adacore.com>
Pedro Alves <palves@redhat.com>
* breakpoint.c (map_breakpoint_number_range): New, factored out
from ...
(map_breakpoint_numbers): ... here.
(find_location_by_number): Change parameters from string to
breakpoint number and location.
(extract_bp_number_and_location): New function.
(enable_disable_bp_num_loc)
(enable_disable_breakpoint_location_range)
(enable_disable_command): New functions, factored out ...
(enable_command, disable_command): ... these functions, and
adjusted to support ranges.
* NEWS: Document enable/disable breakpoint location range feature.
gdb/doc/ChangeLog:
2017-11-07 Xavier Roirand <roirand@adacore.com>
Pedro Alves <palves@redhat.com>
* gdb.texinfo (Set Breaks): Document support for breakpoint
location ranges in the enable/disable commands.
gdb/testsuite/ChangeLog:
2017-11-07 Xavier Roirand <roirand@adacore.com>
Pedro Alves <palves@redhat.com>
* gdb.base/ena-dis-br.exp: Add reference to
gdb.cp/ena-dis-br-range.exp.
* gdb.cp/ena-dis-br-range.exp: New file.
* gdb.cp/ena-dis-br-range.cc: New file.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -75,6 +75,9 @@ QSetWorkingDir * The "maintenance selftest" command now takes an optional argument to filter the tests to be run. +* The "enable", and "disable" commands now accept a range of + breakpoint locations, e.g. "enable 1.3-5". + * New commands set|show cwd |