diff options
author | Keith Seitz <keiths@redhat.com> | 2015-09-30 14:23:12 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2015-10-01 11:48:39 -0700 |
commit | 23916b7dc0f2f05982da7a76726d931cf738d2cc (patch) | |
tree | b08bad1994250bf0a7d849fe099fd6f5c2d7da80 /gdb/cli/cli-cmds.c | |
parent | 398e081380a204e3b9fb4eb4da069ccf471f930e (diff) | |
download | fsf-binutils-gdb-23916b7dc0f2f05982da7a76726d931cf738d2cc.zip fsf-binutils-gdb-23916b7dc0f2f05982da7a76726d931cf738d2cc.tar.gz fsf-binutils-gdb-23916b7dc0f2f05982da7a76726d931cf738d2cc.tar.bz2 |
Initial publication of breakpoint reset project.users/keiths/intelligent-breakpoint_re_set
This is a work-in-progress publication of an intelligent breakpoint_re_set
redesign. See the project wiki page for more information:
https://sourceware.org/gdb/wiki/BreakpointReset
Diffstat (limited to 'gdb/cli/cli-cmds.c')
-rw-r--r-- | gdb/cli/cli-cmds.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 6753c70..086bcd9 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -807,12 +807,15 @@ edit_command (char *arg, int from_tty) struct cleanup *cleanup; struct event_location *location; char *arg1; + struct decode_line_options options; /* Now should only be one argument -- decode it in SAL. */ + init_decode_line_options (&options); + options.flags = DECODE_LINE_LIST_MODE; arg1 = arg; location = string_to_event_location (&arg1, current_language); cleanup = make_cleanup_delete_event_location (location); - sals = decode_line_1 (location, DECODE_LINE_LIST_MODE, 0, 0); + sals = decode_line_1 (location, &options); filter_sals (&sals); if (! sals.nelts) @@ -963,10 +966,13 @@ list_command (char *arg, int from_tty) else { struct event_location *location; + struct decode_line_options options; location = string_to_event_location (&arg1, current_language); make_cleanup_delete_event_location (location); - sals = decode_line_1 (location, DECODE_LINE_LIST_MODE, 0, 0); + init_decode_line_options (&options); + options.flags = DECODE_LINE_LIST_MODE; + sals = decode_line_1 (location, &options); filter_sals (&sals); if (!sals.nelts) @@ -1005,15 +1011,20 @@ list_command (char *arg, int from_tty) else { struct event_location *location; + struct decode_line_options options; location = string_to_event_location (&arg1, current_language); make_cleanup_delete_event_location (location); + init_decode_line_options (&options); + options.flags = DECODE_LINE_LIST_MODE; if (dummy_beg) - sals_end = decode_line_1 (location, - DECODE_LINE_LIST_MODE, 0, 0); + sals_end = decode_line_1 (location, &options); else - sals_end = decode_line_1 (location, DECODE_LINE_LIST_MODE, - sal.symtab, sal.line); + { + options.default_symtab = sal.symtab; + options.default_line = sal.line; + sals_end = decode_line_1 (location, &options); + } filter_sals (&sals_end); if (sals_end.nelts == 0) |