mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
* breakpoint.c (reattach_breakpoints): Do not use remove_breakpoint.
Call insert_bp_location.
This commit is contained in:
@ -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>
|
2007-07-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* core-regset.c (fetch_core_registers): Work around gcc 3.4
|
* core-regset.c (fetch_core_registers): Work around gcc 3.4
|
||||||
|
@ -1338,23 +1338,19 @@ reattach_breakpoints (int pid)
|
|||||||
struct bp_location *b;
|
struct bp_location *b;
|
||||||
int val;
|
int val;
|
||||||
struct cleanup *old_chain = save_inferior_ptid ();
|
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);
|
inferior_ptid = pid_to_ptid (pid);
|
||||||
ALL_BP_LOCATIONS (b)
|
ALL_BP_LOCATIONS (b)
|
||||||
{
|
{
|
||||||
if (b->inserted)
|
if (b->inserted)
|
||||||
{
|
{
|
||||||
remove_breakpoint (b, mark_inserted);
|
b->inserted = 0;
|
||||||
/* Note: since we insert a breakpoint right after removing,
|
val = insert_bp_location (b, tmp_error_stream,
|
||||||
any decisions about automatically using hardware breakpoints
|
&dummy1, &dummy2, &dummy3);
|
||||||
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. */
|
|
||||||
if (val != 0)
|
if (val != 0)
|
||||||
{
|
{
|
||||||
do_cleanups (old_chain);
|
do_cleanups (old_chain);
|
||||||
|
Reference in New Issue
Block a user