aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/mem-break.cc
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-11-06 14:54:52 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2024-11-08 09:16:23 -0500
commit90a66fe855e051addb232853cd11cf4c26150309 (patch)
tree362dce5db729820796ac55d8927ee83dd43dc99e /gdbserver/mem-break.cc
parent82c24a30cf421d6f16e5976227e841de7f7d89ac (diff)
downloadgdb-90a66fe855e051addb232853cd11cf4c26150309.zip
gdb-90a66fe855e051addb232853cd11cf4c26150309.tar.gz
gdb-90a66fe855e051addb232853cd11cf4c26150309.tar.bz2
gdbserver: remove ptid_of(thread)
This function doesn't seem so useful. Use `thread_info::id` directly. Change-Id: I158cd06a752badd30f68424e329aa42d275e43b7 Reviewed-By: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Diffstat (limited to 'gdbserver/mem-break.cc')
-rw-r--r--gdbserver/mem-break.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdbserver/mem-break.cc b/gdbserver/mem-break.cc
index 818f004..7ebb8c4 100644
--- a/gdbserver/mem-break.cc
+++ b/gdbserver/mem-break.cc
@@ -1421,7 +1421,7 @@ delete_single_step_breakpoints (struct thread_info *thread)
while (bp)
{
if (bp->type == single_step_breakpoint
- && ((struct single_step_breakpoint *) bp)->ptid == ptid_of (thread))
+ && ((struct single_step_breakpoint *) bp)->ptid == thread->id)
{
scoped_restore_current_thread restore_thread;
@@ -1513,7 +1513,7 @@ uninsert_single_step_breakpoints (struct thread_info *thread)
for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
{
if (bp->type == single_step_breakpoint
- && ((struct single_step_breakpoint *) bp)->ptid == ptid_of (thread))
+ && ((struct single_step_breakpoint *) bp)->ptid == thread->id)
{
gdb_assert (bp->raw->inserted > 0);
@@ -1585,7 +1585,7 @@ has_single_step_breakpoints (struct thread_info *thread)
while (bp)
{
if (bp->type == single_step_breakpoint
- && ((struct single_step_breakpoint *) bp)->ptid == ptid_of (thread))
+ && ((struct single_step_breakpoint *) bp)->ptid == thread->id)
return 1;
else
{
@@ -1619,7 +1619,7 @@ reinsert_single_step_breakpoints (struct thread_info *thread)
for (bp = proc->breakpoints; bp != NULL; bp = bp->next)
{
if (bp->type == single_step_breakpoint
- && ((struct single_step_breakpoint *) bp)->ptid == ptid_of (thread))
+ && ((struct single_step_breakpoint *) bp)->ptid == thread->id)
{
gdb_assert (bp->raw->inserted > 0);
@@ -2145,7 +2145,7 @@ clone_all_breakpoints (struct thread_info *child_thread,
for (bp = parent_proc->breakpoints; bp != NULL; bp = bp->next)
{
- new_bkpt = clone_one_breakpoint (bp, ptid_of (child_thread));
+ new_bkpt = clone_one_breakpoint (bp, child_thread->id);
APPEND_TO_LIST (new_list, new_bkpt, bkpt_tail);
APPEND_TO_LIST (new_raw_list, new_bkpt->raw, raw_bkpt_tail);
}