Index: gdb-8.2/gdb/thread.c =================================================================== --- gdb-8.2.orig/gdb/thread.c +++ gdb-8.2/gdb/thread.c @@ -281,7 +281,7 @@ add_thread_silent (ptid_t ptid) if (inferior_ptid == ptid) { - thread_info *new_thr = new_thread (inf, null_ptid); + struct thread_info *new_thr = new_thread (inf, null_ptid); /* Make switch_to_thread not read from the thread. */ new_thr->state = THREAD_EXITED; @@ -436,7 +436,7 @@ thread_step_over_chain_remove (struct th exit. */ static void -delete_thread_1 (thread_info *thr, bool silent) +delete_thread_1 (struct thread_info *thr, bool silent) { struct thread_info *tp, *tpprev; @@ -471,13 +471,13 @@ delete_thread_1 (thread_info *thr, bool it. */ void -delete_thread (thread_info *thread) +delete_thread (struct thread_info *thread) { delete_thread_1 (thread, false /* not silent */); } void -delete_thread_silent (thread_info *thread) +delete_thread_silent (struct thread_info *thread) { delete_thread_1 (thread, true /* silent */); } @@ -613,7 +613,7 @@ in_thread_list (ptid_t ptid) /* Finds the first thread of the inferior. */ -thread_info * +struct thread_info * first_thread_of_inferior (inferior *inf) { struct thread_info *tp, *ret = NULL; @@ -626,7 +626,7 @@ first_thread_of_inferior (inferior *inf) return ret; } -thread_info * +struct thread_info * any_thread_of_inferior (inferior *inf) { struct thread_info *tp; @@ -644,7 +644,7 @@ any_thread_of_inferior (inferior *inf) return NULL; } -thread_info * +struct thread_info * any_live_thread_of_inferior (inferior *inf) { struct thread_info *curr_tp = NULL; @@ -727,7 +727,7 @@ delete_exited_threads (void) TP. */ bool -thread_stack_temporaries_enabled_p (thread_info *tp) +thread_stack_temporaries_enabled_p (struct thread_info *tp) { if (tp == NULL) return false; @@ -738,7 +738,7 @@ thread_stack_temporaries_enabled_p (thre /* Push V on to the stack temporaries of the thread with id PTID. */ void -push_thread_stack_temporary (thread_info *tp, struct value *v) +push_thread_stack_temporary (struct thread_info *tp, struct value *v) { gdb_assert (tp != NULL && tp->stack_temporaries_enabled); tp->stack_temporaries.push_back (v); @@ -748,7 +748,7 @@ push_thread_stack_temporary (thread_info TP. Return false otherwise. */ bool -value_in_thread_stack_temporaries (struct value *val, thread_info *tp) +value_in_thread_stack_temporaries (struct value *val, struct thread_info *tp) { gdb_assert (tp != NULL && tp->stack_temporaries_enabled); for (value *v : tp->stack_temporaries) @@ -762,7 +762,7 @@ value_in_thread_stack_temporaries (struc Return NULL if there are no stack temporaries for the thread. */ value * -get_last_thread_stack_temporary (thread_info *tp) +get_last_thread_stack_temporary (struct thread_info *tp) { struct value *lastval = NULL; @@ -923,7 +923,7 @@ is_executing (ptid_t ptid) stop_pc. */ static void -set_executing_thread (thread_info *thr, bool executing) +set_executing_thread (struct thread_info *thr, bool executing) { thr->executing = executing; if (executing) @@ -1037,7 +1037,7 @@ validate_registers_access (void) if (inferior_ptid == null_ptid) error (_("No thread selected.")); - thread_info *tp = inferior_thread (); + struct thread_info *tp = inferior_thread (); /* Don't try to read from a dead thread. */ if (tp->state == THREAD_EXITED) @@ -1055,7 +1055,7 @@ validate_registers_access (void) /* See gdbthread.h. */ bool -can_access_registers_thread (thread_info *thread) +can_access_registers_thread (struct thread_info *thread) { /* No thread, no registers. */ if (thread == NULL) @@ -1123,7 +1123,7 @@ should_print_thread (const char *request column, for TP. */ static std::string -thread_target_id_str (thread_info *tp) +thread_target_id_str (struct thread_info *tp) { const char *target_id = target_pid_to_str (tp->ptid); const char *extra_info = target_extra_thread_info (tp); @@ -1159,7 +1159,7 @@ print_thread_info_1 (struct ui_out *uiou /* Whether the current thread is exited. */ bool current_exited = false; - thread_info *current_thread = (inferior_ptid != null_ptid + struct thread_info *current_thread = (inferior_ptid != null_ptid ? inferior_thread () : NULL); { @@ -1378,7 +1378,7 @@ switch_to_no_thread () /* See gdbthread.h. */ void -switch_to_thread (thread_info *thr) +switch_to_thread (struct thread_info *thr) { gdb_assert (thr != NULL); @@ -1395,7 +1395,7 @@ switch_to_thread (thread_info *thr) void switch_to_thread (ptid_t ptid) { - thread_info *thr = find_thread_ptid (ptid); + struct thread_info *thr = find_thread_ptid (ptid); switch_to_thread (thr); } @@ -1498,7 +1498,7 @@ scoped_restore_current_thread::scoped_re if (inferior_ptid != null_ptid) { - thread_info *tp = inferior_thread (); + struct thread_info *tp = inferior_thread (); struct frame_info *frame; m_was_stopped = tp->state == THREAD_STOPPED; @@ -1962,7 +1962,7 @@ thread_num_make_value_helper (struct gdb int_val = 0; else { - thread_info *tp = inferior_thread (); + struct thread_info *tp = inferior_thread (); if (global) int_val = tp->global_num; else