diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/objc-lang.c | 19 |
2 files changed, 15 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 39f0fbf..690878b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-04-19 Mike Frysinger <vapier@gentoo.org> + + * objc-lang.c (find_methods): Move symname check up. + 2010-04-19 Pedro Alves <pedro@codesourcery.com> * ada-lang.c (print_recreate_exception) diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index a050f15..1731fa7 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -1178,6 +1178,16 @@ find_methods (struct symtab *symtab, char type, QUIT; + /* Check the symbol name first as this can be done entirely without + sending any query to the target. */ + symname = SYMBOL_NATURAL_NAME (msymbol); + if (symname == NULL) + continue; + + if ((symname[0] != '-' && symname[0] != '+') || (symname[1] != '[')) + /* Not a method name. */ + continue; + /* The minimal symbol might point to a function descriptor; resolve it to the actual code address instead. */ pc = gdbarch_convert_from_func_ptr_addr (gdbarch, pc, @@ -1188,14 +1198,7 @@ find_methods (struct symtab *symtab, char type, /* Not in the specified symtab. */ continue; - symname = SYMBOL_NATURAL_NAME (msymbol); - if (symname == NULL) - continue; - - if ((symname[0] != '-' && symname[0] != '+') || (symname[1] != '[')) - /* Not a method name. */ - continue; - + /* Now that thinks are a bit sane, clean up the symname. */ while ((strlen (symname) + 1) >= tmplen) { tmplen = (tmplen == 0) ? 1024 : tmplen * 2; |