gdbserver: remove 'struct' in 'struct thread_info' declarations

Remove the 'struct' keyword in occurrences of 'struct thread_info'.
This is a code clean-up.

Tested by rebuilding.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tankut Baris Aktemur
2024-12-09 14:16:23 +01:00
parent edd8e9d6c3
commit 038590b067
16 changed files with 78 additions and 78 deletions

View File

@@ -100,13 +100,13 @@ private:
/* Return a pointer to the first thread, or NULL if there isn't one. */ /* Return a pointer to the first thread, or NULL if there isn't one. */
struct thread_info *get_first_thread (void); thread_info *get_first_thread (void);
struct thread_info *find_thread_ptid (ptid_t ptid); thread_info *find_thread_ptid (ptid_t ptid);
/* Find any thread of the PID process. Returns NULL if none is /* Find any thread of the PID process. Returns NULL if none is
found. */ found. */
struct thread_info *find_any_thread_of_pid (int pid); thread_info *find_any_thread_of_pid (int pid);
/* Find the first thread for which FUNC returns true. Return NULL if no thread /* Find the first thread for which FUNC returns true. Return NULL if no thread
satisfying FUNC is found. */ satisfying FUNC is found. */

View File

@@ -31,7 +31,7 @@ static process_info *current_process_;
/* The current thread. This is either a thread of CURRENT_PROCESS, or /* The current thread. This is either a thread of CURRENT_PROCESS, or
NULL. */ NULL. */
struct thread_info *current_thread; thread_info *current_thread;
/* The current working directory used to start the inferior. /* The current working directory used to start the inferior.
@@ -55,7 +55,7 @@ process_info::add_thread (ptid_t id, void *target_data)
/* See gdbthread.h. */ /* See gdbthread.h. */
struct thread_info * thread_info *
get_first_thread (void) get_first_thread (void)
{ {
return find_thread ([] (thread_info *thread) return find_thread ([] (thread_info *thread)
@@ -64,7 +64,7 @@ get_first_thread (void)
}); });
} }
struct thread_info * thread_info *
find_thread_ptid (ptid_t ptid) find_thread_ptid (ptid_t ptid)
{ {
process_info *process = find_process_pid (ptid.pid ()); process_info *process = find_process_pid (ptid.pid ());
@@ -77,7 +77,7 @@ find_thread_ptid (ptid_t ptid)
/* Find a thread associated with the given PROCESS, or NULL if no /* Find a thread associated with the given PROCESS, or NULL if no
such thread exists. */ such thread exists. */
static struct thread_info * static thread_info *
find_thread_process (const struct process_info *const process) find_thread_process (const struct process_info *const process)
{ {
return find_any_thread_of_pid (process->pid); return find_any_thread_of_pid (process->pid);
@@ -85,7 +85,7 @@ find_thread_process (const struct process_info *const process)
/* See gdbthread.h. */ /* See gdbthread.h. */
struct thread_info * thread_info *
find_any_thread_of_pid (int pid) find_any_thread_of_pid (int pid)
{ {
return find_thread (pid, [] (thread_info *thread) { return find_thread (pid, [] (thread_info *thread) {

View File

@@ -141,7 +141,7 @@ void for_each_process (gdb::function_view<void (process_info *)> func);
process_info *find_process (gdb::function_view<bool (process_info *)> func); process_info *find_process (gdb::function_view<bool (process_info *)> func);
extern struct thread_info *current_thread; extern thread_info *current_thread;
/* Return the first process in the processes list. */ /* Return the first process in the processes list. */
struct process_info *get_first_process (void); struct process_info *get_first_process (void);

View File

@@ -852,7 +852,7 @@ sethbpregs_hwbp_control (int pid, int i, arm_hwbp_control_t control)
void void
arm_target::low_prepare_to_resume (lwp_info *lwp) arm_target::low_prepare_to_resume (lwp_info *lwp)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
int pid = thread->id.lwp (); int pid = thread->id.lwp ();
process_info *proc = find_process_pid (thread->id.pid ()); process_info *proc = find_process_pid (thread->id.pid ());
struct arch_process_info *proc_info = proc->priv->arch_private; struct arch_process_info *proc_info = proc->priv->arch_private;

View File

@@ -503,7 +503,7 @@ linux_process_target::handle_extended_wait (lwp_info **orig_event_lwp,
client_state &cs = get_client_state (); client_state &cs = get_client_state ();
struct lwp_info *event_lwp = *orig_event_lwp; struct lwp_info *event_lwp = *orig_event_lwp;
int event = linux_ptrace_get_extended_event (wstat); int event = linux_ptrace_get_extended_event (wstat);
struct thread_info *event_thr = event_lwp->thread; thread_info *event_thr = event_lwp->thread;
gdb_assert (event_lwp->waitstatus.kind () == TARGET_WAITKIND_IGNORE); gdb_assert (event_lwp->waitstatus.kind () == TARGET_WAITKIND_IGNORE);
@@ -1159,7 +1159,7 @@ int
linux_process_target::attach (unsigned long pid) linux_process_target::attach (unsigned long pid)
{ {
struct process_info *proc; struct process_info *proc;
struct thread_info *initial_thread; thread_info *initial_thread;
ptid_t ptid = ptid_t (pid, pid); ptid_t ptid = ptid_t (pid, pid);
int err; int err;
@@ -1270,7 +1270,7 @@ last_thread_of_process_p (int pid)
static void static void
linux_kill_one_lwp (struct lwp_info *lwp) linux_kill_one_lwp (struct lwp_info *lwp)
{ {
struct thread_info *thr = lwp->thread; thread_info *thr = lwp->thread;
int pid = thr->id.lwp (); int pid = thr->id.lwp ();
/* PTRACE_KILL is unreliable. After stepping into a signal handler, /* PTRACE_KILL is unreliable. After stepping into a signal handler,
@@ -1314,7 +1314,7 @@ linux_kill_one_lwp (struct lwp_info *lwp)
static void static void
kill_wait_lwp (struct lwp_info *lwp) kill_wait_lwp (struct lwp_info *lwp)
{ {
struct thread_info *thr = lwp->thread; thread_info *thr = lwp->thread;
int pid = thr->id.pid (); int pid = thr->id.pid ();
int lwpid = thr->id.lwp (); int lwpid = thr->id.lwp ();
int wstat; int wstat;
@@ -1410,7 +1410,7 @@ linux_process_target::kill (process_info *process)
thread when detaching, otherwise, it'd be suppressed/lost. */ thread when detaching, otherwise, it'd be suppressed/lost. */
static int static int
get_detach_signal (struct thread_info *thread) get_detach_signal (thread_info *thread)
{ {
client_state &cs = get_client_state (); client_state &cs = get_client_state ();
enum gdb_signal signo = GDB_SIGNAL_0; enum gdb_signal signo = GDB_SIGNAL_0;
@@ -1484,7 +1484,7 @@ get_detach_signal (struct thread_info *thread)
void void
linux_process_target::detach_one_lwp (lwp_info *lwp) linux_process_target::detach_one_lwp (lwp_info *lwp)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
int sig; int sig;
/* If there is a pending SIGSTOP, get rid of it. */ /* If there is a pending SIGSTOP, get rid of it. */
@@ -1699,7 +1699,7 @@ linux_process_target::thread_still_has_status_pending (thread_info *thread)
static int static int
lwp_resumed (struct lwp_info *lwp) lwp_resumed (struct lwp_info *lwp)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
if (thread->last_resume_kind != resume_stop) if (thread->last_resume_kind != resume_stop)
return 1; return 1;
@@ -1912,7 +1912,7 @@ lwp_suspended_decr (struct lwp_info *lwp)
if (lwp->suspended < 0) if (lwp->suspended < 0)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
internal_error ("unsuspend LWP %ld, suspended=%d\n", thread->id.lwp (), internal_error ("unsuspend LWP %ld, suspended=%d\n", thread->id.lwp (),
lwp->suspended); lwp->suspended);
@@ -1927,7 +1927,7 @@ lwp_suspended_decr (struct lwp_info *lwp)
static int static int
handle_tracepoints (struct lwp_info *lwp) handle_tracepoints (struct lwp_info *lwp)
{ {
struct thread_info *tinfo = lwp->thread; thread_info *tinfo = lwp->thread;
int tpoint_related_event = 0; int tpoint_related_event = 0;
gdb_assert (lwp->suspended == 0); gdb_assert (lwp->suspended == 0);
@@ -1973,7 +1973,7 @@ linux_process_target::linux_fast_tracepoint_collecting
(lwp_info *lwp, fast_tpoint_collect_status *status) (lwp_info *lwp, fast_tpoint_collect_status *status)
{ {
CORE_ADDR thread_area; CORE_ADDR thread_area;
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
/* Get the thread area address. This is used to recognize which /* Get the thread area address. This is used to recognize which
thread is which when tracing with the in-process agent library. thread is which when tracing with the in-process agent library.
@@ -2114,7 +2114,7 @@ linux_process_target::maybe_move_out_of_jump_pad (lwp_info *lwp, int *wstat)
static void static void
enqueue_one_deferred_signal (struct lwp_info *lwp, int *wstat) enqueue_one_deferred_signal (struct lwp_info *lwp, int *wstat)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
threads_debug_printf ("Deferring signal %d for LWP %ld.", threads_debug_printf ("Deferring signal %d for LWP %ld.",
WSTOPSIG (*wstat), thread->id.lwp ()); WSTOPSIG (*wstat), thread->id.lwp ());
@@ -2156,7 +2156,7 @@ enqueue_one_deferred_signal (struct lwp_info *lwp, int *wstat)
static int static int
dequeue_one_deferred_signal (struct lwp_info *lwp, int *wstat) dequeue_one_deferred_signal (struct lwp_info *lwp, int *wstat)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
if (!lwp->pending_signals_to_report.empty ()) if (!lwp->pending_signals_to_report.empty ())
{ {
@@ -2242,7 +2242,7 @@ void
linux_process_target::filter_event (int lwpid, int wstat) linux_process_target::filter_event (int lwpid, int wstat)
{ {
struct lwp_info *child; struct lwp_info *child;
struct thread_info *thread; thread_info *thread;
int have_stop_pc = 0; int have_stop_pc = 0;
child = find_lwp_pid (ptid_t (lwpid)); child = find_lwp_pid (ptid_t (lwpid));
@@ -2503,7 +2503,7 @@ linux_process_target::wait_for_event_filtered (ptid_t wait_ptid,
ptid_t filter_ptid, ptid_t filter_ptid,
int *wstatp, int options) int *wstatp, int options)
{ {
struct thread_info *event_thread; thread_info *event_thread;
struct lwp_info *event_child, *requested_child; struct lwp_info *event_child, *requested_child;
sigset_t block_mask, prev_mask; sigset_t block_mask, prev_mask;
@@ -2708,7 +2708,7 @@ linux_process_target::wait_for_event (ptid_t ptid, int *wstatp, int options)
static void static void
select_event_lwp (struct lwp_info **orig_lp) select_event_lwp (struct lwp_info **orig_lp)
{ {
struct thread_info *event_thread = NULL; thread_info *event_thread = NULL;
/* In all-stop, give preference to the LWP that is being /* In all-stop, give preference to the LWP that is being
single-stepped. There will be at most one, and it's the LWP that single-stepped. There will be at most one, and it's the LWP that
@@ -2895,7 +2895,7 @@ ptid_t
linux_process_target::filter_exit_event (lwp_info *event_child, linux_process_target::filter_exit_event (lwp_info *event_child,
target_waitstatus *ourstatus) target_waitstatus *ourstatus)
{ {
struct thread_info *thread = event_child->thread; thread_info *thread = event_child->thread;
ptid_t ptid = thread->id; ptid_t ptid = thread->id;
if (ourstatus->kind () == TARGET_WAITKIND_THREAD_EXITED) if (ourstatus->kind () == TARGET_WAITKIND_THREAD_EXITED)
@@ -2941,7 +2941,7 @@ bool
linux_process_target::gdb_catch_this_syscall (lwp_info *event_child) linux_process_target::gdb_catch_this_syscall (lwp_info *event_child)
{ {
int sysno; int sysno;
struct thread_info *thread = event_child->thread; thread_info *thread = event_child->thread;
process_info *proc = thread->process (); process_info *proc = thread->process ();
if (proc->syscalls_to_catch.empty ()) if (proc->syscalls_to_catch.empty ())
@@ -3794,7 +3794,7 @@ lwp_is_marked_dead (struct lwp_info *lwp)
void void
linux_process_target::wait_for_sigstop () linux_process_target::wait_for_sigstop ()
{ {
struct thread_info *saved_thread; thread_info *saved_thread;
ptid_t saved_tid; ptid_t saved_tid;
int wstat; int wstat;
int ret; int ret;
@@ -3956,7 +3956,7 @@ enqueue_pending_signal (struct lwp_info *lwp, int signal, siginfo_t *info)
void void
linux_process_target::install_software_single_step_breakpoints (lwp_info *lwp) linux_process_target::install_software_single_step_breakpoints (lwp_info *lwp)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
struct regcache *regcache = get_thread_regcache (thread, 1); struct regcache *regcache = get_thread_regcache (thread, 1);
scoped_restore_current_thread restore_thread; scoped_restore_current_thread restore_thread;
@@ -4005,7 +4005,7 @@ void
linux_process_target::resume_one_lwp_throw (lwp_info *lwp, int step, linux_process_target::resume_one_lwp_throw (lwp_info *lwp, int step,
int signal, siginfo_t *info) int signal, siginfo_t *info)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
int ptrace_request; int ptrace_request;
/* Note that target description may not be initialised /* Note that target description may not be initialised
@@ -4211,7 +4211,7 @@ linux_process_target::low_prepare_to_resume (lwp_info *lwp)
static int static int
check_ptrace_stopped_lwp_gone (struct lwp_info *lp) check_ptrace_stopped_lwp_gone (struct lwp_info *lp)
{ {
struct thread_info *thread = lp->thread; thread_info *thread = lp->thread;
/* If we get an error after resuming the LWP successfully, we'd /* If we get an error after resuming the LWP successfully, we'd
confuse !T state for the LWP being gone. */ confuse !T state for the LWP being gone. */
@@ -4496,7 +4496,7 @@ linux_process_target::thread_needs_step_over (thread_info *thread)
void void
linux_process_target::start_step_over (lwp_info *lwp) linux_process_target::start_step_over (lwp_info *lwp)
{ {
struct thread_info *thread = lwp->thread; thread_info *thread = lwp->thread;
CORE_ADDR pc; CORE_ADDR pc;
threads_debug_printf ("Starting step-over on LWP %ld. Stopping all threads", threads_debug_printf ("Starting step-over on LWP %ld. Stopping all threads",
@@ -4722,7 +4722,7 @@ linux_process_target::resume_one_thread (thread_info *thread,
void void
linux_process_target::resume (thread_resume *resume_info, size_t n) linux_process_target::resume (thread_resume *resume_info, size_t n)
{ {
struct thread_info *need_step_over = NULL; thread_info *need_step_over = NULL;
THREADS_SCOPED_DEBUG_ENTER_EXIT; THREADS_SCOPED_DEBUG_ENTER_EXIT;
@@ -4888,7 +4888,7 @@ linux_process_target::unsuspend_and_proceed_one_lwp (thread_info *thread,
void void
linux_process_target::proceed_all_lwps () linux_process_target::proceed_all_lwps ()
{ {
struct thread_info *need_step_over; thread_info *need_step_over;
/* If there is a thread which would otherwise be resumed, which is /* If there is a thread which would otherwise be resumed, which is
stopped at a breakpoint that needs stepping over, then don't stopped at a breakpoint that needs stepping over, then don't

View File

@@ -799,7 +799,7 @@ struct lwp_info
} }
/* Backlink to the parent object. */ /* Backlink to the parent object. */
struct thread_info *thread = nullptr; thread_info *thread = nullptr;
/* If this flag is set, the next SIGSTOP will be ignored (the /* If this flag is set, the next SIGSTOP will be ignored (the
process will be immediately resumed). This means that either we process will be immediately resumed). This means that either we
@@ -942,7 +942,7 @@ int thread_db_init (void);
void thread_db_detach (struct process_info *); void thread_db_detach (struct process_info *);
void thread_db_mourn (struct process_info *); void thread_db_mourn (struct process_info *);
int thread_db_handle_monitor_command (char *); int thread_db_handle_monitor_command (char *);
int thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset, int thread_db_get_tls_address (thread_info *thread, CORE_ADDR offset,
CORE_ADDR load_module, CORE_ADDR *address); CORE_ADDR load_module, CORE_ADDR *address);
int thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp); int thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp);
@@ -950,7 +950,7 @@ int thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp);
both the clone and the parent should be stopped. This function does both the clone and the parent should be stopped. This function does
whatever is required have the clone under thread_db's control. */ whatever is required have the clone under thread_db's control. */
void thread_db_notice_clone (struct thread_info *parent_thr, ptid_t child_ptid); void thread_db_notice_clone (thread_info *parent_thr, ptid_t child_ptid);
bool thread_db_thread_handle (ptid_t ptid, gdb_byte **handle, int *handle_len); bool thread_db_thread_handle (ptid_t ptid, gdb_byte **handle, int *handle_len);

View File

@@ -1052,7 +1052,7 @@ int
ppc_target::low_get_thread_area (int lwpid, CORE_ADDR *addr) ppc_target::low_get_thread_area (int lwpid, CORE_ADDR *addr)
{ {
struct lwp_info *lwp = find_lwp_pid (ptid_t (lwpid)); struct lwp_info *lwp = find_lwp_pid (ptid_t (lwpid));
struct thread_info *thr = lwp->thread; thread_info *thr = lwp->thread;
struct regcache *regcache = get_thread_regcache (thr, 1); struct regcache *regcache = get_thread_regcache (thr, 1);
ULONGEST tp = 0; ULONGEST tp = 0;

View File

@@ -362,7 +362,7 @@ x86_target::low_get_thread_area (int lwpid, CORE_ADDR *addr)
#endif #endif
{ {
struct thread_info *thr = lwp->thread; thread_info *thr = lwp->thread;
struct regcache *regcache = get_thread_regcache (thr, 1); struct regcache *regcache = get_thread_regcache (thr, 1);
unsigned int desc[4]; unsigned int desc[4];
ULONGEST gs = 0; ULONGEST gs = 0;

View File

@@ -1410,7 +1410,7 @@ set_single_step_breakpoint (CORE_ADDR stop_at, ptid_t ptid)
} }
void void
delete_single_step_breakpoints (struct thread_info *thread) delete_single_step_breakpoints (thread_info *thread)
{ {
process_info *proc = thread->process (); process_info *proc = thread->process ();
struct breakpoint *bp, **bp_link; struct breakpoint *bp, **bp_link;
@@ -1505,7 +1505,7 @@ uninsert_all_breakpoints (void)
} }
void void
uninsert_single_step_breakpoints (struct thread_info *thread) uninsert_single_step_breakpoints (thread_info *thread)
{ {
process_info *proc = thread->process (); process_info *proc = thread->process ();
struct breakpoint *bp; struct breakpoint *bp;
@@ -1574,7 +1574,7 @@ reinsert_breakpoints_at (CORE_ADDR pc)
} }
int int
has_single_step_breakpoints (struct thread_info *thread) has_single_step_breakpoints (thread_info *thread)
{ {
process_info *proc = thread->process (); process_info *proc = thread->process ();
struct breakpoint *bp, **bp_link; struct breakpoint *bp, **bp_link;
@@ -1611,7 +1611,7 @@ reinsert_all_breakpoints (void)
} }
void void
reinsert_single_step_breakpoints (struct thread_info *thread) reinsert_single_step_breakpoints (thread_info *thread)
{ {
process_info *proc = thread->process (); process_info *proc = thread->process ();
struct breakpoint *bp; struct breakpoint *bp;
@@ -2131,8 +2131,8 @@ clone_one_breakpoint (const struct breakpoint *src, ptid_t ptid)
/* See mem-break.h. */ /* See mem-break.h. */
void void
clone_all_breakpoints (struct thread_info *child_thread, clone_all_breakpoints (thread_info *child_thread,
const struct thread_info *parent_thread) const thread_info *parent_thread)
{ {
const struct breakpoint *bp; const struct breakpoint *bp;
struct breakpoint *new_bkpt; struct breakpoint *new_bkpt;

View File

@@ -161,16 +161,16 @@ void set_single_step_breakpoint (CORE_ADDR stop_at, ptid_t ptid);
/* Delete all single-step breakpoints of THREAD. */ /* Delete all single-step breakpoints of THREAD. */
void delete_single_step_breakpoints (struct thread_info *thread); void delete_single_step_breakpoints (thread_info *thread);
/* Reinsert all single-step breakpoints of THREAD. */ /* Reinsert all single-step breakpoints of THREAD. */
void reinsert_single_step_breakpoints (struct thread_info *thread); void reinsert_single_step_breakpoints (thread_info *thread);
/* Uninsert all single-step breakpoints of THREAD. This still leaves /* Uninsert all single-step breakpoints of THREAD. This still leaves
the single-step breakpoints in the table. */ the single-step breakpoints in the table. */
void uninsert_single_step_breakpoints (struct thread_info *thread); void uninsert_single_step_breakpoints (thread_info *thread);
/* Reinsert breakpoints at WHERE (and change their status to /* Reinsert breakpoints at WHERE (and change their status to
inserted). */ inserted). */
@@ -179,7 +179,7 @@ void reinsert_breakpoints_at (CORE_ADDR where);
/* The THREAD has single-step breakpoints or not. */ /* The THREAD has single-step breakpoints or not. */
int has_single_step_breakpoints (struct thread_info *thread); int has_single_step_breakpoints (thread_info *thread);
/* Uninsert breakpoints at WHERE (and change their status to /* Uninsert breakpoints at WHERE (and change their status to
uninserted). This still leaves the breakpoints in the table. */ uninserted). This still leaves the breakpoints in the table. */
@@ -274,7 +274,7 @@ int remove_memory_breakpoint (struct raw_breakpoint *bp);
/* Create a new breakpoint list in CHILD_THREAD's process that is a /* Create a new breakpoint list in CHILD_THREAD's process that is a
copy of breakpoint list in PARENT_THREAD's process. */ copy of breakpoint list in PARENT_THREAD's process. */
void clone_all_breakpoints (struct thread_info *child_thread, void clone_all_breakpoints (thread_info *child_thread,
const struct thread_info *parent_thread); const thread_info *parent_thread);
#endif /* GDBSERVER_MEM_BREAK_H */ #endif /* GDBSERVER_MEM_BREAK_H */

View File

@@ -25,7 +25,7 @@
#ifndef IN_PROCESS_AGENT #ifndef IN_PROCESS_AGENT
struct regcache * struct regcache *
get_thread_regcache (struct thread_info *thread, int fetch) get_thread_regcache (thread_info *thread, int fetch)
{ {
regcache *regcache = thread->regcache (); regcache *regcache = thread->regcache ();
@@ -70,7 +70,7 @@ get_thread_regcache_for_ptid (ptid_t ptid)
} }
void void
regcache_invalidate_thread (struct thread_info *thread) regcache_invalidate_thread (thread_info *thread)
{ {
regcache *regcache = thread->regcache (); regcache *regcache = thread->regcache ();
@@ -271,7 +271,7 @@ find_regno (const struct target_desc *tdesc, const char *name)
} }
static void static void
free_register_cache_thread (struct thread_info *thread) free_register_cache_thread (thread_info *thread)
{ {
regcache *regcache = thread->regcache (); regcache *regcache = thread->regcache ();

View File

@@ -72,7 +72,7 @@ void regcache_cpy (struct regcache *dst, struct regcache *src);
struct regcache *new_register_cache (const struct target_desc *tdesc); struct regcache *new_register_cache (const struct target_desc *tdesc);
struct regcache *get_thread_regcache (struct thread_info *thread, int fetch); struct regcache *get_thread_regcache (thread_info *thread, int fetch);
/* Release all memory associated with the register cache for INFERIOR. */ /* Release all memory associated with the register cache for INFERIOR. */
@@ -80,7 +80,7 @@ void free_register_cache (struct regcache *regcache);
/* Invalidate cached registers for one thread. */ /* Invalidate cached registers for one thread. */
void regcache_invalidate_thread (struct thread_info *); void regcache_invalidate_thread (thread_info *);
/* Invalidate cached registers for all threads of the given process. */ /* Invalidate cached registers for all threads of the given process. */

View File

@@ -394,7 +394,7 @@ write_qxfer_response (char *buf, const gdb_byte *data, int len, int is_more)
/* Handle btrace enabling in BTS format. */ /* Handle btrace enabling in BTS format. */
static void static void
handle_btrace_enable_bts (struct thread_info *thread) handle_btrace_enable_bts (thread_info *thread)
{ {
if (thread->btrace != NULL) if (thread->btrace != NULL)
error (_("Btrace already enabled.")); error (_("Btrace already enabled."));
@@ -406,7 +406,7 @@ handle_btrace_enable_bts (struct thread_info *thread)
/* Handle btrace enabling in Intel Processor Trace format. */ /* Handle btrace enabling in Intel Processor Trace format. */
static void static void
handle_btrace_enable_pt (struct thread_info *thread) handle_btrace_enable_pt (thread_info *thread)
{ {
if (thread->btrace != NULL) if (thread->btrace != NULL)
error (_("Btrace already enabled.")); error (_("Btrace already enabled."));
@@ -418,7 +418,7 @@ handle_btrace_enable_pt (struct thread_info *thread)
/* Handle btrace disabling. */ /* Handle btrace disabling. */
static void static void
handle_btrace_disable (struct thread_info *thread) handle_btrace_disable (thread_info *thread)
{ {
if (thread->btrace == NULL) if (thread->btrace == NULL)
@@ -436,7 +436,7 @@ static int
handle_btrace_general_set (char *own_buf) handle_btrace_general_set (char *own_buf)
{ {
client_state &cs = get_client_state (); client_state &cs = get_client_state ();
struct thread_info *thread; thread_info *thread;
char *op; char *op;
if (!startswith (own_buf, "Qbtrace:")) if (!startswith (own_buf, "Qbtrace:"))
@@ -485,7 +485,7 @@ static int
handle_btrace_conf_general_set (char *own_buf) handle_btrace_conf_general_set (char *own_buf)
{ {
client_state &cs = get_client_state (); client_state &cs = get_client_state ();
struct thread_info *thread; thread_info *thread;
char *op; char *op;
if (!startswith (own_buf, "Qbtrace-conf:")) if (!startswith (own_buf, "Qbtrace-conf:"))
@@ -2169,7 +2169,7 @@ handle_qxfer_btrace (const char *annex,
{ {
client_state &cs = get_client_state (); client_state &cs = get_client_state ();
static std::string cache; static std::string cache;
struct thread_info *thread; thread_info *thread;
enum btrace_read_type type; enum btrace_read_type type;
int result; int result;
@@ -2250,7 +2250,7 @@ handle_qxfer_btrace_conf (const char *annex,
{ {
client_state &cs = get_client_state (); client_state &cs = get_client_state ();
static std::string cache; static std::string cache;
struct thread_info *thread; thread_info *thread;
int result; int result;
if (writebuf != NULL) if (writebuf != NULL)
@@ -2939,7 +2939,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
err = 1; err = 1;
else else
{ {
struct thread_info *thread = find_thread_ptid (ptid); thread_info *thread = find_thread_ptid (ptid);
if (thread == NULL) if (thread == NULL)
err = 2; err = 2;
@@ -3117,7 +3117,7 @@ static void resume (struct thread_resume *actions, size_t n);
/* The callback that is passed to visit_actioned_threads. */ /* The callback that is passed to visit_actioned_threads. */
typedef int (visit_actioned_threads_callback_ftype) typedef int (visit_actioned_threads_callback_ftype)
(const struct thread_resume *, struct thread_info *); (const struct thread_resume *, thread_info *);
/* Call CALLBACK for any thread to which ACTIONS applies to. Returns /* Call CALLBACK for any thread to which ACTIONS applies to. Returns
true if CALLBACK returns true. Returns false if no matching thread true if CALLBACK returns true. Returns false if no matching thread
@@ -3153,7 +3153,7 @@ visit_actioned_threads (thread_info *thread,
static int static int
handle_pending_status (const struct thread_resume *resumption, handle_pending_status (const struct thread_resume *resumption,
struct thread_info *thread) thread_info *thread)
{ {
client_state &cs = get_client_state (); client_state &cs = get_client_state ();
if (thread->status_pending_p) if (thread->status_pending_p)
@@ -3810,7 +3810,7 @@ handle_status (char *own_buf)
if (thread != NULL) if (thread != NULL)
{ {
struct thread_info *tp = (struct thread_info *) thread; thread_info *tp = (thread_info *) thread;
/* We're reporting this event, so it's no longer /* We're reporting this event, so it's no longer
pending. */ pending. */

View File

@@ -382,7 +382,7 @@ thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp)
} }
int int
thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset, thread_db_get_tls_address (thread_info *thread, CORE_ADDR offset,
CORE_ADDR load_module, CORE_ADDR *address) CORE_ADDR load_module, CORE_ADDR *address)
{ {
psaddr_t addr; psaddr_t addr;
@@ -869,7 +869,7 @@ thread_db_handle_monitor_command (char *mon)
/* See linux-low.h. */ /* See linux-low.h. */
void void
thread_db_notice_clone (struct thread_info *parent_thr, ptid_t child_ptid) thread_db_notice_clone (thread_info *parent_thr, ptid_t child_ptid)
{ {
thread_db *thread_db = parent_thr->process ()->priv->thread_db; thread_db *thread_db = parent_thr->process ()->priv->thread_db;

View File

@@ -4296,7 +4296,7 @@ handle_tracepoint_query (char *packet)
action covering the whole range. */ action covering the whole range. */
static void static void
add_while_stepping_state (struct thread_info *tinfo, add_while_stepping_state (thread_info *tinfo,
int tp_number, CORE_ADDR tp_address) int tp_number, CORE_ADDR tp_address)
{ {
struct wstep_state *wstep = XNEW (struct wstep_state); struct wstep_state *wstep = XNEW (struct wstep_state);
@@ -4322,7 +4322,7 @@ release_while_stepping_state (struct wstep_state *wstep)
with thread TINFO. */ with thread TINFO. */
void void
release_while_stepping_state_list (struct thread_info *tinfo) release_while_stepping_state_list (thread_info *tinfo)
{ {
struct wstep_state *head; struct wstep_state *head;
@@ -4340,7 +4340,7 @@ release_while_stepping_state_list (struct thread_info *tinfo)
collecting tracepoint data, false otherwise. */ collecting tracepoint data, false otherwise. */
int int
tracepoint_finished_step (struct thread_info *tinfo, CORE_ADDR stop_pc) tracepoint_finished_step (thread_info *tinfo, CORE_ADDR stop_pc)
{ {
struct tracepoint *tpoint; struct tracepoint *tpoint;
struct wstep_state *wstep; struct wstep_state *wstep;
@@ -4445,7 +4445,7 @@ tracepoint_finished_step (struct thread_info *tinfo, CORE_ADDR stop_pc)
tracing agents when the IPA's tracing stops for some reason. */ tracing agents when the IPA's tracing stops for some reason. */
int int
handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc) handle_tracepoint_bkpts (thread_info *tinfo, CORE_ADDR stop_pc)
{ {
/* Pull in fast tracepoint trace frames from the inferior in-process /* Pull in fast tracepoint trace frames from the inferior in-process
agent's buffer into our buffer. */ agent's buffer into our buffer. */
@@ -4526,7 +4526,7 @@ handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc)
so. */ so. */
int int
tracepoint_was_hit (struct thread_info *tinfo, CORE_ADDR stop_pc) tracepoint_was_hit (thread_info *tinfo, CORE_ADDR stop_pc)
{ {
struct tracepoint *tpoint; struct tracepoint *tpoint;
int ret = 0; int ret = 0;

View File

@@ -74,10 +74,10 @@ void stop_tracing (void);
int handle_tracepoint_general_set (char *own_buf); int handle_tracepoint_general_set (char *own_buf);
int handle_tracepoint_query (char *own_buf); int handle_tracepoint_query (char *own_buf);
int tracepoint_finished_step (struct thread_info *tinfo, CORE_ADDR stop_pc); int tracepoint_finished_step (thread_info *tinfo, CORE_ADDR stop_pc);
int tracepoint_was_hit (struct thread_info *tinfo, CORE_ADDR stop_pc); int tracepoint_was_hit (thread_info *tinfo, CORE_ADDR stop_pc);
void release_while_stepping_state_list (struct thread_info *tinfo); void release_while_stepping_state_list (thread_info *tinfo);
int in_readonly_region (CORE_ADDR addr, ULONGEST length); int in_readonly_region (CORE_ADDR addr, ULONGEST length);
int traceframe_read_mem (int tfnum, CORE_ADDR addr, int traceframe_read_mem (int tfnum, CORE_ADDR addr,
@@ -130,7 +130,7 @@ fast_tpoint_collect_result fast_tracepoint_collecting
void force_unlock_trace_buffer (void); void force_unlock_trace_buffer (void);
int handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc); int handle_tracepoint_bkpts (thread_info *tinfo, CORE_ADDR stop_pc);
#ifdef IN_PROCESS_AGENT #ifdef IN_PROCESS_AGENT
void initialize_low_tracepoint (void); void initialize_low_tracepoint (void);