diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-07-21 12:12:18 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-07-21 12:12:18 +0100 |
commit | bec903c96bc5119e357b4ad2cab99bbee7de628e (patch) | |
tree | 52884d4f74f3a7fe441e815a25ccca4d63142873 /gdb/gdbserver/mem-break.h | |
parent | 63c40ec727109e2bb2956ab95968350df00c1aa1 (diff) | |
download | gdb-bec903c96bc5119e357b4ad2cab99bbee7de628e.zip gdb-bec903c96bc5119e357b4ad2cab99bbee7de628e.tar.gz gdb-bec903c96bc5119e357b4ad2cab99bbee7de628e.tar.bz2 |
Make reinsert_breakpoint thread specific
This patch makes reinsert_breakpoint thread specific, which means we
insert and remove reinsert_breakpoint breakpoints for a specific
thread. This motivation of this change is that I'll use
reinsert_breakpoint for vCont;s on software single step target, so that
GDBserver may insert one reinsert_breakpoint for one thread doing
step-over, and insert one reinsert_breakpoint for another thread doing
vCont;s. After the operation of one thread is finished, GDBserver must
remove reinsert_breakpoint for that thread only.
On the other hand, reinsert_breakpoint is used for step-over nowadays.
GDBserver inserts reinsert_breakpoint, and wait only from the thread
doing step-over. After the step-over is done, GDBserver removes the
reinsert_breakpoint. If there is still any threads need step-over, do
the same again until all threads are finished step-over. In other words,
reinsert_breakpoint is globally thread specific, but in an implicit way.
It is natural to make it explicitly thread specific.
gdb/gdbserver:
2016-07-21 Yao Qi <yao.qi@linaro.org>
* mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
(set_reinsert_breakpoint): New parameter ptid. Callers updated.
(clone_one_breakpoint): Likewise.
(delete_reinsert_breakpoints): Change parameter to thread.
Callers updated.
(has_reinsert_breakpoints): Likewise.
(uninsert_reinsert_breakpoints): Likewise.
(reinsert_reinsert_breakpoints): Likewise.
* mem-break.h (set_reinsert_breakpoint): Update declaration.
(delete_reinsert_breakpoints): Likewise.
(reinsert_reinsert_breakpoints): Likewise.
(uninsert_reinsert_breakpoints): Likewise.
(has_reinsert_breakpoints): Likewise.
Diffstat (limited to 'gdb/gdbserver/mem-break.h')
-rw-r--r-- | gdb/gdbserver/mem-break.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gdb/gdbserver/mem-break.h b/gdb/gdbserver/mem-break.h index d633003..3322ec5 100644 --- a/gdb/gdbserver/mem-break.h +++ b/gdb/gdbserver/mem-break.h @@ -152,31 +152,32 @@ struct breakpoint *set_breakpoint_at (CORE_ADDR where, int delete_breakpoint (struct breakpoint *bkpt); -/* Set a reinsert breakpoint at STOP_AT. */ +/* Set a reinsert breakpoint at STOP_AT for thread represented by + PTID. */ -void set_reinsert_breakpoint (CORE_ADDR stop_at); +void set_reinsert_breakpoint (CORE_ADDR stop_at, ptid_t ptid); -/* Delete all reinsert breakpoints. */ +/* Delete all reinsert breakpoints of THREAD. */ -void delete_reinsert_breakpoints (void); +void delete_reinsert_breakpoints (struct thread_info *thread); -/* Reinsert all reinsert breakpoints of the current process. */ +/* Reinsert all reinsert breakpoints of THREAD. */ -void reinsert_reinsert_breakpoints (void); +void reinsert_reinsert_breakpoints (struct thread_info *thread); -/* Uninsert all reinsert breakpoints of the current process. This - still leaves the reinsert breakpoints in the table. */ +/* Uninsert all reinsert breakpoints of THREAD. This still leaves + the reinsert breakpoints in the table. */ -void uninsert_reinsert_breakpoints (void); +void uninsert_reinsert_breakpoints (struct thread_info *thread); /* Reinsert breakpoints at WHERE (and change their status to inserted). */ void reinsert_breakpoints_at (CORE_ADDR where); -/* Process PROC has reinsert breakpoints or not. */ +/* The THREAD has reinsert breakpoints or not. */ -int has_reinsert_breakpoints (struct process_info *proc); +int has_reinsert_breakpoints (struct thread_info *thread); /* Uninsert breakpoints at WHERE (and change their status to uninserted). This still leaves the breakpoints in the table. */ |