aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2010-12-13 15:45:55 +0000
committerKevin Buettner <kevinb@redhat.com>2010-12-13 15:45:55 +0000
commitc6490bf2ede65f5a8621c3efecea9bbb0559cbc3 (patch)
tree992c3213fb3c488b25b6060ccfbcc3087585bfda /gdb
parent0914bcdbf6255fc4ac5f782b892f5280246045d6 (diff)
downloadgdb-c6490bf2ede65f5a8621c3efecea9bbb0559cbc3.zip
gdb-c6490bf2ede65f5a8621c3efecea9bbb0559cbc3.tar.gz
gdb-c6490bf2ede65f5a8621c3efecea9bbb0559cbc3.tar.bz2
* solib-svr4.c (enable_break): Don't attempt to place breakpoints,
when attaching, on the names in bkpt_names: _start, __start, and main.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/solib-svr4.c21
2 files changed, 18 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e75187a..620cccc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-13 Kevin Buettner <kevinb@redhat.com>
+
+ * solib-svr4.c (enable_break): Don't attempt to place breakpoints,
+ when attaching, on the names in bkpt_names: _start, __start, and
+ main.
+
2010-12-12 Stan Shebs <stan@codesourcery.com>
* value.c (value_of_internalvar): Add case for trace state
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 5106552..60efc4a 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1607,17 +1607,20 @@ enable_break (struct svr4_info *info, int from_tty)
}
}
- for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
+ if (!current_inferior ()->attach_flag)
{
- msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, symfile_objfile);
- if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
+ for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
{
- sym_addr = SYMBOL_VALUE_ADDRESS (msymbol);
- sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
- sym_addr,
- &current_target);
- create_solib_event_breakpoint (target_gdbarch, sym_addr);
- return 1;
+ msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, symfile_objfile);
+ if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
+ {
+ sym_addr = SYMBOL_VALUE_ADDRESS (msymbol);
+ sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
+ sym_addr,
+ &current_target);
+ create_solib_event_breakpoint (target_gdbarch, sym_addr);
+ return 1;
+ }
}
}
return 0;