diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-03-16 11:13:44 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-04-03 15:04:03 +0100 |
commit | 60a13bbcdfb0ce008a77563cea0c34c830d7b170 (patch) | |
tree | f779ff8c755fa7126fb483fd28a09e0d3b8fe193 /bfd/cpu-csky.c | |
parent | 2e411b8c68eb2b035b31d5b00d940d4be1a0928b (diff) | |
download | gdb-60a13bbcdfb0ce008a77563cea0c34c830d7b170.zip gdb-60a13bbcdfb0ce008a77563cea0c34c830d7b170.tar.gz gdb-60a13bbcdfb0ce008a77563cea0c34c830d7b170.tar.bz2 |
gdb: cleanup around some set_momentary_breakpoint_at_pc calls
I noticed a couple of places in infrun.c where we call
set_momentary_breakpoint_at_pc, and then set the newly created
breakpoint's thread field, these are in:
insert_exception_resume_breakpoint
insert_exception_resume_from_probe
Function set_momentary_breakpoint_at_pc calls
set_momentary_breakpoint, which always creates the breakpoint as
thread-specific for the current inferior_thread().
The two insert_* functions mentioned above take an arbitrary
thread_info* as an argument and set the breakpoint::thread to hold the
thread number of that arbitrary thread.
However, the insert_* functions store the breakpoint pointer within
the current inferior_thread(), so we know that the thread being passed
in must be the currently selected thread.
What this means is that we can:
1. Assert that the thread being passed in is the currently selected
thread, and
2. No longer adjust the breakpoint::thread field, this will already
have been set correctly be calling set_momentary_breakpoint_at_pc.
There should be no user visible changes after this commit.
Diffstat (limited to 'bfd/cpu-csky.c')
0 files changed, 0 insertions, 0 deletions