From: John Gilmore Date: Wed, 2 Sep 1992 02:31:52 +0000 (+0000) Subject: * breakpoint.c (breakpoint_re_set): Avoid setting source symtab X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea678717a4a4ed30099a6656e0b2eb4cf4ff7e6f;p=binutils-gdb.git * breakpoint.c (breakpoint_re_set): Avoid setting source symtab (which involves reading in main's symtab) if we have no breakpoints. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8402d5d2412..f13f8a6dd75 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Sep 1 17:31:45 1992 John Gilmore (gnu@cygnus.com) + + * breakpoint.c (breakpoint_re_set): Avoid setting source symtab + (which involves reading in main's symtab) if we have no breakpoints. + Mon Aug 31 13:47:45 1992 Fred Fish (fnf@cygnus.com) * dwarfread.c (cu_language): New local variable to record diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 87e8f7c5f08..6ae795bb2b8 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2255,9 +2255,16 @@ breakpoint_re_set () static char message1[] = "Error in re-setting breakpoint %d:\n"; char message[sizeof (message1) + 30 /* slop */]; + /* If we have no current source symtab, and we have any breakpoints, + go through the work of making a source context. */ if (current_source_symtab == NULL) { - select_source_symtab (NULL); + ALL_BREAKPOINTS (b) + { + select_source_symtab (NULL); + break; /* We only care if there are any, and + don't need to do it N times. */ + } } ALL_BREAKPOINTS_SAFE (b, temp) @@ -2732,7 +2739,6 @@ fixup_breakpoints (low, high, delta) CORE_ADDR delta; { struct breakpoint *b; - extern struct breakpoint *breakpoint_chain; ALL_BREAKPOINTS (b) {