mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
More assert checks on reinsert breakpoint
This patch adds more asserts, so the incorrect or sub-optimal reinsert breakpoints manipulations (from the tests in the following patches) can trigger them. gdb/gdbserver: 2016-06-17 Yao Qi <yao.qi@linaro.org> * linux-low.c (linux_resume_one_lwp_throw): Assert has_reinsert_breakpoints returns false. * mem-break.c (delete_disabled_breakpoints): Assert bp type isn't reinsert_breakpoint.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2016-06-17 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* linux-low.c (linux_resume_one_lwp_throw): Assert
|
||||||
|
has_reinsert_breakpoints returns false.
|
||||||
|
* mem-break.c (delete_disabled_breakpoints): Assert
|
||||||
|
bp type isn't reinsert_breakpoint.
|
||||||
|
|
||||||
2016-06-17 Yao Qi <yao.qi@linaro.org>
|
2016-06-17 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* linux-low.c (maybe_hw_step): New function.
|
* linux-low.c (maybe_hw_step): New function.
|
||||||
|
@ -4237,6 +4237,12 @@ linux_resume_one_lwp_throw (struct lwp_info *lwp,
|
|||||||
|
|
||||||
step = maybe_hw_step (thread);
|
step = maybe_hw_step (thread);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* If the thread isn't doing step-over, there shouldn't be any
|
||||||
|
reinsert breakpoints. */
|
||||||
|
gdb_assert (!has_reinsert_breakpoints (proc));
|
||||||
|
}
|
||||||
|
|
||||||
if (fast_tp_collecting == 1)
|
if (fast_tp_collecting == 1)
|
||||||
{
|
{
|
||||||
|
@ -1740,9 +1740,14 @@ delete_disabled_breakpoints (void)
|
|||||||
{
|
{
|
||||||
next = bp->next;
|
next = bp->next;
|
||||||
if (bp->raw->inserted < 0)
|
if (bp->raw->inserted < 0)
|
||||||
|
{
|
||||||
|
/* If reinsert_breakpoints become disabled, that means the
|
||||||
|
manipulations (insertion and removal) of them are wrong. */
|
||||||
|
gdb_assert (bp->type != reinsert_breakpoint);
|
||||||
delete_breakpoint_1 (proc, bp);
|
delete_breakpoint_1 (proc, bp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if breakpoints we inserted still appear to be inserted. They
|
/* Check if breakpoints we inserted still appear to be inserted. They
|
||||||
may disappear due to a shared library unload, and worse, a new
|
may disappear due to a shared library unload, and worse, a new
|
||||||
|
Reference in New Issue
Block a user