* ada-lang.c (ada_make_symbol_completion_list): Return a VEC.
[deliverable/binutils-gdb.git] / gdb / breakpoint.c
index 12db39b22c41a084a90c61786e9a9ba4ac74c88e..d76065dc4ed5bc332bc157a0bc709f41c6bebd2e 100644 (file)
@@ -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)
 {
This page took 0.029245 seconds and 4 git commands to generate.