X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fbreakpoint.c;h=d76065dc4ed5bc332bc157a0bc709f41c6bebd2e;hb=49c4e619f81a66545e2332dc218d9bf31bbb51ad;hp=12db39b22c41a084a90c61786e9a9ba4ac74c88e;hpb=8556afb4f53f99b32e75285a7eb3839e0b6911ee;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 12db39b22c..d76065dc4e 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); } } @@ -14571,12 +14578,12 @@ catching_syscall_number (int syscall_number) } /* Complete syscall names. Used by "catch syscall". */ -static char ** +static VEC (char_ptr) * catch_syscall_completer (struct cmd_list_element *cmd, char *text, char *word) { const char **list = get_syscall_names (); - char **retlist + VEC (char_ptr) *retlist = (list == NULL) ? NULL : complete_on_enum (list, text, word); xfree (list); @@ -15193,8 +15200,7 @@ void add_catch_command (char *name, char *docstring, void (*sfunc) (char *args, int from_tty, struct cmd_list_element *command), - char **(*completer) (struct cmd_list_element *cmd, - char *text, char *word), + completer_ftype *completer, void *user_data_catch, void *user_data_tcatch) {