mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
2013-08-12 Muhammad Waqas <mwaqas@codesourcery.com>
PR gdb/15501 * breakpoint.c (enable_command, disable_command): Iterate over all specified breakpoint locations. 2013-07-12 Muhammad Waqas <mwaqas@codesourccery.com> PR gdb/15501 * gdb.base/ena-dis-br.exp: Add test to verify enable/disable commands work correctly with multiple arguments that include multiple locations.
This commit is contained in:
@@ -14553,25 +14553,35 @@ disable_command (char *args, int from_tty)
|
||||
if (user_breakpoint_p (bpt))
|
||||
disable_breakpoint (bpt);
|
||||
}
|
||||
else if (strchr (args, '.'))
|
||||
{
|
||||
struct bp_location *loc = find_location_by_number (args);
|
||||
if (loc)
|
||||
{
|
||||
if (loc->enabled)
|
||||
{
|
||||
loc->enabled = 0;
|
||||
mark_breakpoint_location_modified (loc);
|
||||
}
|
||||
if (target_supports_enable_disable_tracepoint ()
|
||||
&& current_trace_status ()->running && loc->owner
|
||||
&& is_tracepoint (loc->owner))
|
||||
target_disable_tracepoint (loc);
|
||||
}
|
||||
update_global_location_list (0);
|
||||
}
|
||||
else
|
||||
map_breakpoint_numbers (args, do_map_disable_breakpoint, NULL);
|
||||
{
|
||||
char *num = extract_arg (&args);
|
||||
|
||||
while (num)
|
||||
{
|
||||
if (strchr (num, '.'))
|
||||
{
|
||||
struct bp_location *loc = find_location_by_number (num);
|
||||
|
||||
if (loc)
|
||||
{
|
||||
if (loc->enabled)
|
||||
{
|
||||
loc->enabled = 0;
|
||||
mark_breakpoint_location_modified (loc);
|
||||
}
|
||||
if (target_supports_enable_disable_tracepoint ()
|
||||
&& current_trace_status ()->running && loc->owner
|
||||
&& is_tracepoint (loc->owner))
|
||||
target_disable_tracepoint (loc);
|
||||
}
|
||||
update_global_location_list (0);
|
||||
}
|
||||
else
|
||||
map_breakpoint_numbers (num, do_map_disable_breakpoint, NULL);
|
||||
num = extract_arg (&args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -14677,25 +14687,35 @@ enable_command (char *args, int from_tty)
|
||||
if (user_breakpoint_p (bpt))
|
||||
enable_breakpoint (bpt);
|
||||
}
|
||||
else if (strchr (args, '.'))
|
||||
{
|
||||
struct bp_location *loc = find_location_by_number (args);
|
||||
if (loc)
|
||||
{
|
||||
if (!loc->enabled)
|
||||
{
|
||||
loc->enabled = 1;
|
||||
mark_breakpoint_location_modified (loc);
|
||||
}
|
||||
if (target_supports_enable_disable_tracepoint ()
|
||||
&& current_trace_status ()->running && loc->owner
|
||||
&& is_tracepoint (loc->owner))
|
||||
target_enable_tracepoint (loc);
|
||||
}
|
||||
update_global_location_list (1);
|
||||
}
|
||||
else
|
||||
map_breakpoint_numbers (args, do_map_enable_breakpoint, NULL);
|
||||
{
|
||||
char *num = extract_arg (&args);
|
||||
|
||||
while (num)
|
||||
{
|
||||
if (strchr (num, '.'))
|
||||
{
|
||||
struct bp_location *loc = find_location_by_number (num);
|
||||
|
||||
if (loc)
|
||||
{
|
||||
if (!loc->enabled)
|
||||
{
|
||||
loc->enabled = 1;
|
||||
mark_breakpoint_location_modified (loc);
|
||||
}
|
||||
if (target_supports_enable_disable_tracepoint ()
|
||||
&& current_trace_status ()->running && loc->owner
|
||||
&& is_tracepoint (loc->owner))
|
||||
target_enable_tracepoint (loc);
|
||||
}
|
||||
update_global_location_list (1);
|
||||
}
|
||||
else
|
||||
map_breakpoint_numbers (num, do_map_enable_breakpoint, NULL);
|
||||
num = extract_arg (&args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This struct packages up disposition data for application to multiple
|
||||
|
||||
Reference in New Issue
Block a user