From: =?utf-8?b?SMOpY3RvciBPcsOzbiBNYXJ0w61uZXo=?= Date: Wed, 20 Feb 2019 13:25:36 +0100 Subject: struct-thread_info =================================================================== --- gdb/breakpoint.c | 2 +- gdb/infcmd.c | 4 ++-- gdb/linux-tdep.c | 2 +- gdb/mi/mi-main.c | 2 +- gdb/progspace-and-thread.c | 2 +- gdb/python/py-record-btrace.c | 8 ++++---- gdb/remote.c | 6 +++--- gdb/thread.c | 22 +++++++++++----------- 8 files changed, 24 insertions(+), 24 deletions(-) Index: gdb/gdb/breakpoint.c =================================================================== --- gdb.orig/gdb/breakpoint.c 2019-02-22 11:33:07.560034396 +0100 +++ gdb/gdb/breakpoint.c 2019-02-22 11:33:07.552034296 +0100 @@ -12682,7 +12682,7 @@ longjmp_breakpoint::~longjmp_breakpoint () { - thread_info *tp = find_thread_global_id (this->thread); + struct thread_info *tp = find_thread_global_id (this->thread); if (tp != NULL) tp->initiating_frame = null_frame_id; Index: gdb/gdb/infcmd.c =================================================================== --- gdb.orig/gdb/infcmd.c 2019-02-22 11:33:07.560034396 +0100 +++ gdb/gdb/infcmd.c 2019-02-22 11:33:07.552034296 +0100 @@ -663,7 +663,7 @@ /* Queue a pending event so that the program stops immediately. */ if (run_how == RUN_STOP_AT_FIRST_INSN) { - thread_info *thr = inferior_thread (); + struct thread_info *thr = inferior_thread (); thr->suspend.waitstatus_pending_p = 1; thr->suspend.waitstatus.kind = TARGET_WAITKIND_STOPPED; thr->suspend.waitstatus.value.sig = GDB_SIGNAL_0; @@ -913,7 +913,7 @@ set_step_info (frame, sal); CORE_ADDR pc = get_frame_pc (frame); - thread_info *tp = inferior_thread (); + struct thread_info *tp = inferior_thread (); tp->control.step_start_function = find_pc_function (pc); } Index: gdb/gdb/linux-tdep.c =================================================================== --- gdb.orig/gdb/linux-tdep.c 2019-02-22 11:33:07.560034396 +0100 +++ gdb/gdb/linux-tdep.c 2019-02-22 11:33:07.552034296 +0100 @@ -1654,7 +1654,7 @@ buffer. */ static gdb::byte_vector -linux_get_siginfo_data (thread_info *thread, struct gdbarch *gdbarch) +linux_get_siginfo_data (struct thread_info *thread, struct gdbarch *gdbarch) { struct type *siginfo_type; LONGEST bytes_read; Index: gdb/gdb/mi/mi-main.c =================================================================== --- gdb.orig/gdb/mi/mi-main.c 2019-02-22 11:33:07.560034396 +0100 +++ gdb/gdb/mi/mi-main.c 2019-02-22 11:33:07.556034345 +0100 @@ -553,7 +553,7 @@ error (_("-thread-select: USAGE: threadnum.")); int num = value_as_long (parse_and_eval (argv[0])); - thread_info *thr = find_thread_global_id (num); + struct thread_info *thr = find_thread_global_id (num); if (thr == NULL) error (_("Thread ID %d not known."), num); Index: gdb/gdb/progspace-and-thread.c =================================================================== --- gdb.orig/gdb/progspace-and-thread.c 2019-02-22 11:33:07.560034396 +0100 +++ gdb/gdb/progspace-and-thread.c 2019-02-22 11:33:07.556034345 +0100 @@ -28,7 +28,7 @@ if (inf != NULL && inf->pid != 0) { - thread_info *tp = any_live_thread_of_inferior (inf); + struct thread_info *tp = any_live_thread_of_inferior (inf); if (tp != NULL) { Index: gdb/gdb/python/py-record-btrace.c =================================================================== --- gdb.orig/gdb/python/py-record-btrace.c 2019-02-22 11:33:07.560034396 +0100 +++ gdb/gdb/python/py-record-btrace.c 2019-02-22 11:33:07.556034345 +0100 @@ -72,7 +72,7 @@ { const btrace_insn *insn; const recpy_element_object *obj; - thread_info *tinfo; + struct thread_info *tinfo; btrace_insn_iterator iter; if (Py_TYPE (pyobject) != &recpy_insn_type) @@ -115,7 +115,7 @@ { const btrace_function *func; const recpy_element_object *obj; - thread_info *tinfo; + struct thread_info *tinfo; btrace_call_iterator iter; if (Py_TYPE (pyobject) != &recpy_func_type) @@ -153,7 +153,7 @@ gdb.RecordInstruction or gdb.RecordGap object for it accordingly. */ static PyObject * -btpy_insn_or_gap_new (thread_info *tinfo, Py_ssize_t number) +btpy_insn_or_gap_new (struct thread_info *tinfo, Py_ssize_t number) { btrace_insn_iterator iter; int err_code; @@ -338,7 +338,7 @@ recpy_bt_func_level (PyObject *self, void *closure) { const btrace_function * const func = btrace_func_from_recpy_func (self); - thread_info *tinfo; + struct thread_info *tinfo; if (func == NULL) return NULL; Index: gdb/gdb/remote.c =================================================================== --- gdb.orig/gdb/remote.c 2019-02-22 11:33:07.560034396 +0100 +++ gdb/gdb/remote.c 2019-02-22 11:33:07.556034345 +0100 @@ -2403,7 +2403,7 @@ return inf; } -static remote_thread_info *get_remote_thread_info (thread_info *thread); +static remote_thread_info *get_remote_thread_info (struct thread_info *thread); static remote_thread_info *get_remote_thread_info (ptid_t ptid); /* Add thread PTID to GDB's thread list. Tag it as executing/running @@ -2528,7 +2528,7 @@ /* Return THREAD's private thread data, creating it if necessary. */ static remote_thread_info * -get_remote_thread_info (thread_info *thread) +get_remote_thread_info (struct thread_info *thread) { gdb_assert (thread != NULL); @@ -4344,7 +4344,7 @@ /* Add the main thread and switch to it. Don't try reading registers yet, since we haven't fetched the target description yet. */ - thread_info *tp = add_thread_silent (curr_ptid); + struct thread_info *tp = add_thread_silent (curr_ptid); switch_to_thread_no_regs (tp); } Index: gdb/gdb/thread.c =================================================================== --- gdb.orig/gdb/thread.c 2019-02-22 11:33:07.560034396 +0100 +++ gdb/gdb/thread.c 2019-02-22 11:35:39.389924517 +0100 @@ -68,21 +68,21 @@ class scoped_inc_dec_ref { public: - explicit scoped_inc_dec_ref (const std::vector &thrds) + explicit scoped_inc_dec_ref (const std::vector &thrds) : m_thrds (thrds) { - for (thread_info *thr : m_thrds) + for (struct thread_info *thr : m_thrds) thr->incref (); } ~scoped_inc_dec_ref () { - for (thread_info *thr : m_thrds) + for (struct thread_info *thr : m_thrds) thr->decref (); } private: - const std::vector &m_thrds; + const std::vector &m_thrds; }; @@ -201,7 +201,7 @@ /* Set the TP's state as exited. */ static void -set_thread_exited (thread_info *tp, int silent) +set_thread_exited (struct thread_info *tp, int silent) { /* Dead threads don't need to step-over. Remove from queue. */ if (tp->step_over_next != NULL) @@ -243,7 +243,7 @@ static struct thread_info * new_thread (struct inferior *inf, ptid_t ptid) { - thread_info *tp = new thread_info (inf, ptid); + struct thread_info *tp = new struct thread_info (inf, ptid); if (inf->thread_list == NULL) inf->thread_list = tp; @@ -1433,7 +1433,7 @@ order is determined by TP_ARRAY_COMPAR_ASCENDING. */ static bool -tp_array_compar (const thread_info *a, const thread_info *b) +tp_array_compar (const struct thread_info *a, const struct thread_info *b) { if (a->inf->num != b->inf->num) { @@ -1530,10 +1530,10 @@ thread, in case the command is one that wipes threads. E.g., detach, kill, disconnect, etc., or even normally continuing over an inferior or thread exit. */ - std::vector thr_list_cpy; + std::vector thr_list_cpy; thr_list_cpy.reserve (tc); - for (thread_info *tp : all_non_exited_threads ()) + for (struct thread_info *tp : all_non_exited_threads ()) thr_list_cpy.push_back (tp); gdb_assert (thr_list_cpy.size () == tc); @@ -1545,7 +1545,7 @@ scoped_restore_current_thread restore_thread; - for (thread_info *thr : thr_list_cpy) + for (struct thread_info *thr : thr_list_cpy) if (thread_alive (thr)) thr_try_catch_cmd (thr, cmd, from_tty, flags); } @@ -1790,7 +1790,7 @@ /* See gdbthread.h. */ void -thread_select (const char *tidstr, thread_info *tp) +thread_select (const char *tidstr, struct thread_info *tp) { if (!thread_alive (tp)) error (_("Thread ID %s has terminated."), tidstr);