From 0392d1975de1032b24ebbe193f7c907ca642c722 Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Wed, 16 Oct 2002 23:25:32 +0000 Subject: (parse_breakpoint_sals): Ignore ObjC method names when matching breakpoints in current file. --- gdb/breakpoint.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gdb/breakpoint.c') diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index a77bff405a9..c4d8e87d598 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 -- cgit v1.2.1