diff options
author | Doug Evans <dje@google.com> | 2012-06-29 22:46:46 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2012-06-29 22:46:46 +0000 |
commit | 39cf75f7e02e5d3e0080a7862cde324e378c69ea (patch) | |
tree | 697a7c162edb5232330ca08193e6d3ff9d11e29a /gdb/breakpoint.c | |
parent | a040981f6272e74d8157108e1677bc4d13425cd0 (diff) | |
download | gdb-39cf75f7e02e5d3e0080a7862cde324e378c69ea.zip gdb-39cf75f7e02e5d3e0080a7862cde324e378c69ea.tar.gz gdb-39cf75f7e02e5d3e0080a7862cde324e378c69ea.tar.bz2 |
* linespec.c: #include "stack.h".
(decode_line_with_current_source): Moved here from symtab.c and
renamed from decode_line_spec. All callers updated.
(decode_line_with_last_displayed): Moved here from breakpoint.c and
renamed from decode_line_spec_1. All callers updated.
* linespec.h (decode_line_with_current_source): Move declaration here
from symtab.h and renamed from decode_line_spec.
(decode_line_with_last_displayed): Move declaration here from symtab.h
and renamed from decode_line_spec_1.
* macrocmd.c: #include "linespec.h".
* symtab.c: Remove #include "linespec.h".
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 71a5e19..896c122 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -11532,8 +11532,9 @@ clear_command (char *arg, int from_tty) if (arg) { - sals = decode_line_spec (arg, (DECODE_LINE_FUNFIRSTLINE - | DECODE_LINE_LIST_MODE)); + sals = decode_line_with_current_source (arg, + (DECODE_LINE_FUNFIRSTLINE + | DECODE_LINE_LIST_MODE)); default_match = 0; } else @@ -14494,27 +14495,6 @@ invalidate_bp_value_on_memory_change (CORE_ADDR addr, int len, } } -/* Use the last displayed codepoint's values, or nothing - if they aren't valid. */ - -struct symtabs_and_lines -decode_line_spec_1 (char *string, int flags) -{ - struct symtabs_and_lines sals; - - if (string == 0) - error (_("Empty line specification.")); - if (last_displayed_sal_is_valid ()) - sals = decode_line_1 (&string, flags, - get_last_displayed_symtab (), - get_last_displayed_line ()); - else - sals = decode_line_1 (&string, flags, (struct symtab *) NULL, 0); - if (*string) - error (_("Junk at end of line specification: %s"), string); - return sals; -} - /* Create and insert a raw software breakpoint at PC. Return an identifier, which should be used to remove the breakpoint later. In general, places which call this should be using something on the |