aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Fedor <fedor@gnu.org>2002-10-16 23:25:32 +0000
committerAdam Fedor <fedor@gnu.org>2002-10-16 23:25:32 +0000
commit1aeae86e76fd586e4fc8a377f3ef67f4ab696842 (patch)
tree5cd31c4a8ff40367d6bcdb691661d045eed0edbd
parent8b2dbe47f314187de7089f4ffeb26c100b7d4c3e (diff)
downloadgdb-1aeae86e76fd586e4fc8a377f3ef67f4ab696842.zip
gdb-1aeae86e76fd586e4fc8a377f3ef67f4ab696842.tar.gz
gdb-1aeae86e76fd586e4fc8a377f3ef67f4ab696842.tar.bz2
(parse_breakpoint_sals): Ignore ObjC method
names when matching breakpoints in current file.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4e708c7..b36401b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-16 Adam Fedor <fedor@gnu.org>
+
+ * breakpoint.c (parse_breakpoint_sals): Ignore ObjC method
+ names when matching breakpoints in current file.
+
2002-10-16 Kevin Buettner <kevinb@redhat.com>
* dwarf2read.c (dwarf2_invalid_pointer_size): New complaint.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index a77bff4..c4d8e87 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4618,13 +4618,16 @@ parse_breakpoint_sals (char **address,
/* 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. */
+ leaving default_breakpoint_* alone.
+ ObjC: However, don't match an Objective-C method name which
+ may have a '+' or '-' succeeded by a '[' */
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (default_breakpoint_valid
&& (!cursal.symtab
- || (strchr ("+-", (*address)[0]) != NULL)))
+ || ((strchr ("+-", (*address)[0]) != NULL)
+ && ((*address)[1] != '['))))
*sals = decode_line_1 (address, 1, default_breakpoint_symtab,
default_breakpoint_line, addr_string);
else