aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-07-02 16:14:01 +0000
committerDaniel Jacobowitz <drow@false.org>2007-07-02 16:14:01 +0000
commita4954f26af9ede8ca8273d628032c0f632728b40 (patch)
tree4bb0a6f2a23763e6450cb84d551d580f20f6bf88
parent82c01eb610fe78f3d8f9fbbb89d114601e19d621 (diff)
downloadgdb-a4954f26af9ede8ca8273d628032c0f632728b40.zip
gdb-a4954f26af9ede8ca8273d628032c0f632728b40.tar.gz
gdb-a4954f26af9ede8ca8273d628032c0f632728b40.tar.bz2
* breakpoint.c (reattach_breakpoints): Do not use remove_breakpoint.
Call insert_bp_location.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c18
2 files changed, 12 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9e42a99..d16ca15 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * breakpoint.c (reattach_breakpoints): Do not use remove_breakpoint.
+ Call insert_bp_location.
+
2007-07-01 H.J. Lu <hongjiu.lu@intel.com>
* core-regset.c (fetch_core_registers): Work around gcc 3.4
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 5e36d93..e294315 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1338,23 +1338,19 @@ reattach_breakpoints (int pid)
struct bp_location *b;
int val;
struct cleanup *old_chain = save_inferior_ptid ();
+ struct ui_file *tmp_error_stream = mem_fileopen ();
+ int dummy1 = 0, dummy2 = 0, dummy3 = 0;
+
+ make_cleanup_ui_file_delete (tmp_error_stream);
- /* Set inferior_ptid; remove_breakpoint uses this global. */
inferior_ptid = pid_to_ptid (pid);
ALL_BP_LOCATIONS (b)
{
if (b->inserted)
{
- remove_breakpoint (b, mark_inserted);
- /* Note: since we insert a breakpoint right after removing,
- any decisions about automatically using hardware breakpoints
- made in insert_bp_location are preserved. */
- if (b->loc_type == bp_loc_hardware_breakpoint)
- val = target_insert_hw_breakpoint (&b->target_info);
- else
- val = target_insert_breakpoint (&b->target_info);
- /* FIXME drow/2003-10-07: This doesn't handle any other kinds of
- breakpoints. It's wrong for watchpoints, for example. */
+ b->inserted = 0;
+ val = insert_bp_location (b, tmp_error_stream,
+ &dummy1, &dummy2, &dummy3);
if (val != 0)
{
do_cleanups (old_chain);