aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-09-02 02:31:52 +0000
committerJohn Gilmore <gnu@cygnus>1992-09-02 02:31:52 +0000
commitea678717a4a4ed30099a6656e0b2eb4cf4ff7e6f (patch)
treefba13e09136aec6703c1f969b3a935264d075afe /gdb/breakpoint.c
parent2df681368b18e07f6d03fbdd2c51626c5b2ed234 (diff)
downloadgdb-ea678717a4a4ed30099a6656e0b2eb4cf4ff7e6f.zip
gdb-ea678717a4a4ed30099a6656e0b2eb4cf4ff7e6f.tar.gz
gdb-ea678717a4a4ed30099a6656e0b2eb4cf4ff7e6f.tar.bz2
* breakpoint.c (breakpoint_re_set): Avoid setting source symtab
(which involves reading in main's symtab) if we have no breakpoints.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 87e8f7c..6ae795b 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)
{