diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-06-11 19:16:24 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-06-11 19:16:24 +0000 |
commit | cc80f267162ba7f1cab2fcf605270a3510cf010b (patch) | |
tree | 8e5643f4a185e0c7d1c8b8ef07a83aec97b258dd /gdb/breakpoint.c | |
parent | 356d9f9d9ea883adf486ade721fc2b516a8902c7 (diff) | |
download | gdb-cc80f267162ba7f1cab2fcf605270a3510cf010b.zip gdb-cc80f267162ba7f1cab2fcf605270a3510cf010b.tar.gz gdb-cc80f267162ba7f1cab2fcf605270a3510cf010b.tar.bz2 |
gdb/
Fix regression by the "ambiguous linespec" series.
* breakpoint.c (parse_breakpoint_sals): New variable cursal. Use
get_last_displayed_symtab and get_last_displayed_line and depending
on CURSAL.
gdb/testsuite/
Fix regression by the "ambiguous linespec" series.
* gdb.base/break.exp (list marker1, break lineno, delete $bpnum): New
tests.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 12db39b..9c4348f 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -8802,19 +8802,26 @@ parse_breakpoint_sals (char **address, } else { + struct symtab_and_line cursal = get_current_source_symtab_and_line (); + /* Force almost all breakpoints to be in terms of the current_source_symtab (which is decode_line_1's default). This should produce the results we want almost all of the - time while leaving default_breakpoint_* alone. */ - if (last_displayed_sal_is_valid ()) + time while leaving default_breakpoint_* alone. + + ObjC: However, don't match an Objective-C method name which + may have a '+' or '-' succeeded by a '['. */ + if (last_displayed_sal_is_valid () + && (!cursal.symtab + || ((strchr ("+-", (*address)[0]) != NULL) + && ((*address)[1] != '[')))) decode_line_full (address, DECODE_LINE_FUNFIRSTLINE, get_last_displayed_symtab (), get_last_displayed_line (), canonical, NULL, NULL); else decode_line_full (address, DECODE_LINE_FUNFIRSTLINE, - (struct symtab *) NULL, 0, - canonical, NULL, NULL); + cursal.symtab, cursal.line, canonical, NULL, NULL); } } |