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>
/* 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
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
satisfying FUNC is found. */
/* The current thread. This is either a thread of CURRENT_PROCESS, or
NULL. */
-struct thread_info *current_thread;
+thread_info *current_thread;
/* The current working directory used to start the inferior.
/* See gdbthread.h. */
-struct thread_info *
+thread_info *
get_first_thread (void)
{
return find_thread ([] (thread_info *thread)
});
}
-struct thread_info *
+thread_info *
find_thread_ptid (ptid_t ptid)
{
process_info *process = find_process_pid (ptid.pid ());
/* Find a thread associated with the given PROCESS, or NULL if no
such thread exists. */
-static struct thread_info *
+static thread_info *
find_thread_process (const struct process_info *const process)
{
return find_any_thread_of_pid (process->pid);
/* See gdbthread.h. */
-struct thread_info *
+thread_info *
find_any_thread_of_pid (int pid)
{
return find_thread (pid, [] (thread_info *thread) {
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. */
struct process_info *get_first_process (void);
void
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 ();
process_info *proc = find_process_pid (thread->id.pid ());
struct arch_process_info *proc_info = proc->priv->arch_private;
client_state &cs = get_client_state ();
struct lwp_info *event_lwp = *orig_event_lwp;
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);
linux_process_target::attach (unsigned long pid)
{
struct process_info *proc;
- struct thread_info *initial_thread;
+ thread_info *initial_thread;
ptid_t ptid = ptid_t (pid, pid);
int err;
static void
linux_kill_one_lwp (struct lwp_info *lwp)
{
- struct thread_info *thr = lwp->thread;
+ thread_info *thr = lwp->thread;
int pid = thr->id.lwp ();
/* PTRACE_KILL is unreliable. After stepping into a signal handler,
static void
kill_wait_lwp (struct lwp_info *lwp)
{
- struct thread_info *thr = lwp->thread;
+ thread_info *thr = lwp->thread;
int pid = thr->id.pid ();
int lwpid = thr->id.lwp ();
int wstat;
thread when detaching, otherwise, it'd be suppressed/lost. */
static int
-get_detach_signal (struct thread_info *thread)
+get_detach_signal (thread_info *thread)
{
client_state &cs = get_client_state ();
enum gdb_signal signo = GDB_SIGNAL_0;
void
linux_process_target::detach_one_lwp (lwp_info *lwp)
{
- struct thread_info *thread = lwp->thread;
+ thread_info *thread = lwp->thread;
int sig;
/* If there is a pending SIGSTOP, get rid of it. */
static int
lwp_resumed (struct lwp_info *lwp)
{
- struct thread_info *thread = lwp->thread;
+ thread_info *thread = lwp->thread;
if (thread->last_resume_kind != resume_stop)
return 1;
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 (),
lwp->suspended);
static int
handle_tracepoints (struct lwp_info *lwp)
{
- struct thread_info *tinfo = lwp->thread;
+ thread_info *tinfo = lwp->thread;
int tpoint_related_event = 0;
gdb_assert (lwp->suspended == 0);
(lwp_info *lwp, fast_tpoint_collect_status *status)
{
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
thread is which when tracing with the in-process agent library.
static void
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.",
WSTOPSIG (*wstat), thread->id.lwp ());
static int
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 ())
{
linux_process_target::filter_event (int lwpid, int wstat)
{
struct lwp_info *child;
- struct thread_info *thread;
+ thread_info *thread;
int have_stop_pc = 0;
child = find_lwp_pid (ptid_t (lwpid));
ptid_t filter_ptid,
int *wstatp, int options)
{
- struct thread_info *event_thread;
+ thread_info *event_thread;
struct lwp_info *event_child, *requested_child;
sigset_t block_mask, prev_mask;
static void
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
single-stepped. There will be at most one, and it's the LWP that
linux_process_target::filter_exit_event (lwp_info *event_child,
target_waitstatus *ourstatus)
{
- struct thread_info *thread = event_child->thread;
+ thread_info *thread = event_child->thread;
ptid_t ptid = thread->id;
if (ourstatus->kind () == TARGET_WAITKIND_THREAD_EXITED)
linux_process_target::gdb_catch_this_syscall (lwp_info *event_child)
{
int sysno;
- struct thread_info *thread = event_child->thread;
+ thread_info *thread = event_child->thread;
process_info *proc = thread->process ();
if (proc->syscalls_to_catch.empty ())
void
linux_process_target::wait_for_sigstop ()
{
- struct thread_info *saved_thread;
+ thread_info *saved_thread;
ptid_t saved_tid;
int wstat;
int ret;
void
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);
scoped_restore_current_thread restore_thread;
linux_process_target::resume_one_lwp_throw (lwp_info *lwp, int step,
int signal, siginfo_t *info)
{
- struct thread_info *thread = lwp->thread;
+ thread_info *thread = lwp->thread;
int ptrace_request;
/* Note that target description may not be initialised
static int
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
confuse !T state for the LWP being gone. */
void
linux_process_target::start_step_over (lwp_info *lwp)
{
- struct thread_info *thread = lwp->thread;
+ thread_info *thread = lwp->thread;
CORE_ADDR pc;
threads_debug_printf ("Starting step-over on LWP %ld. Stopping all threads",
void
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;
void
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
stopped at a breakpoint that needs stepping over, then don't
}
/* 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
process will be immediately resumed). This means that either we
void thread_db_detach (struct process_info *);
void thread_db_mourn (struct process_info *);
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);
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
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);
ppc_target::low_get_thread_area (int lwpid, CORE_ADDR *addr)
{
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);
ULONGEST tp = 0;
#endif
{
- struct thread_info *thr = lwp->thread;
+ thread_info *thr = lwp->thread;
struct regcache *regcache = get_thread_regcache (thr, 1);
unsigned int desc[4];
ULONGEST gs = 0;
}
void
-delete_single_step_breakpoints (struct thread_info *thread)
+delete_single_step_breakpoints (thread_info *thread)
{
process_info *proc = thread->process ();
struct breakpoint *bp, **bp_link;
}
void
-uninsert_single_step_breakpoints (struct thread_info *thread)
+uninsert_single_step_breakpoints (thread_info *thread)
{
process_info *proc = thread->process ();
struct breakpoint *bp;
}
int
-has_single_step_breakpoints (struct thread_info *thread)
+has_single_step_breakpoints (thread_info *thread)
{
process_info *proc = thread->process ();
struct breakpoint *bp, **bp_link;
}
void
-reinsert_single_step_breakpoints (struct thread_info *thread)
+reinsert_single_step_breakpoints (thread_info *thread)
{
process_info *proc = thread->process ();
struct breakpoint *bp;
/* See mem-break.h. */
void
-clone_all_breakpoints (struct thread_info *child_thread,
- const struct thread_info *parent_thread)
+clone_all_breakpoints (thread_info *child_thread,
+ const thread_info *parent_thread)
{
const struct breakpoint *bp;
struct breakpoint *new_bkpt;
/* 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. */
-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
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
inserted). */
/* 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
uninserted). This still leaves the breakpoints in the table. */
/* Create a new breakpoint list in CHILD_THREAD's process that is a
copy of breakpoint list in PARENT_THREAD's process. */
-void clone_all_breakpoints (struct thread_info *child_thread,
- const struct thread_info *parent_thread);
+void clone_all_breakpoints (thread_info *child_thread,
+ const thread_info *parent_thread);
#endif /* GDBSERVER_MEM_BREAK_H */
#ifndef IN_PROCESS_AGENT
struct regcache *
-get_thread_regcache (struct thread_info *thread, int fetch)
+get_thread_regcache (thread_info *thread, int fetch)
{
regcache *regcache = thread->regcache ();
}
void
-regcache_invalidate_thread (struct thread_info *thread)
+regcache_invalidate_thread (thread_info *thread)
{
regcache *regcache = thread->regcache ();
}
static void
-free_register_cache_thread (struct thread_info *thread)
+free_register_cache_thread (thread_info *thread)
{
regcache *regcache = thread->regcache ();
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. */
/* 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. */
/* Handle btrace enabling in BTS format. */
static void
-handle_btrace_enable_bts (struct thread_info *thread)
+handle_btrace_enable_bts (thread_info *thread)
{
if (thread->btrace != NULL)
error (_("Btrace already enabled."));
/* Handle btrace enabling in Intel Processor Trace format. */
static void
-handle_btrace_enable_pt (struct thread_info *thread)
+handle_btrace_enable_pt (thread_info *thread)
{
if (thread->btrace != NULL)
error (_("Btrace already enabled."));
/* Handle btrace disabling. */
static void
-handle_btrace_disable (struct thread_info *thread)
+handle_btrace_disable (thread_info *thread)
{
if (thread->btrace == NULL)
handle_btrace_general_set (char *own_buf)
{
client_state &cs = get_client_state ();
- struct thread_info *thread;
+ thread_info *thread;
char *op;
if (!startswith (own_buf, "Qbtrace:"))
handle_btrace_conf_general_set (char *own_buf)
{
client_state &cs = get_client_state ();
- struct thread_info *thread;
+ thread_info *thread;
char *op;
if (!startswith (own_buf, "Qbtrace-conf:"))
{
client_state &cs = get_client_state ();
static std::string cache;
- struct thread_info *thread;
+ thread_info *thread;
enum btrace_read_type type;
int result;
{
client_state &cs = get_client_state ();
static std::string cache;
- struct thread_info *thread;
+ thread_info *thread;
int result;
if (writebuf != NULL)
err = 1;
else
{
- struct thread_info *thread = find_thread_ptid (ptid);
+ thread_info *thread = find_thread_ptid (ptid);
if (thread == NULL)
err = 2;
/* The callback that is passed to visit_actioned_threads. */
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
true if CALLBACK returns true. Returns false if no matching thread
static int
handle_pending_status (const struct thread_resume *resumption,
- struct thread_info *thread)
+ thread_info *thread)
{
client_state &cs = get_client_state ();
if (thread->status_pending_p)
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
pending. */
}
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)
{
psaddr_t addr;
/* See linux-low.h. */
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;
action covering the whole range. */
static void
-add_while_stepping_state (struct thread_info *tinfo,
+add_while_stepping_state (thread_info *tinfo,
int tp_number, CORE_ADDR tp_address)
{
struct wstep_state *wstep = XNEW (struct wstep_state);
with thread TINFO. */
void
-release_while_stepping_state_list (struct thread_info *tinfo)
+release_while_stepping_state_list (thread_info *tinfo)
{
struct wstep_state *head;
collecting tracepoint data, false otherwise. */
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 wstep_state *wstep;
tracing agents when the IPA's tracing stops for some reason. */
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
agent's buffer into our buffer. */
so. */
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;
int ret = 0;
int handle_tracepoint_general_set (char *own_buf);
int handle_tracepoint_query (char *own_buf);
-int tracepoint_finished_step (struct thread_info *tinfo, CORE_ADDR stop_pc);
-int tracepoint_was_hit (struct thread_info *tinfo, CORE_ADDR stop_pc);
+int tracepoint_finished_step (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 traceframe_read_mem (int tfnum, CORE_ADDR addr,
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
void initialize_low_tracepoint (void);