[RFC,7/8] gdb, infrun: inline init_thread_stepping_state()

Message ID 20261001102847.576880-8-markus.t.metzger@intel.com
State New
Headers
Series breakpoint handling |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Skipped because it is an RFC
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Skipped because it is an RFC

Commit Message

Metzger, Markus T Oct. 1, 2026, 10:28 a.m. UTC
  There remains only a single call to init_thread_stepping_state() in
proceed().  Inline it.
---
 gdb/infrun.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
  

Patch

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 19eac5c5c8e..44c41be1baa 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -459,8 +459,6 @@  set_normal_stop_state_just_attached ()
   set_last_target_status (nullptr, minus_one_ptid, status);
 }
 
-void init_thread_stepping_state (struct thread_info *tss);
-
 static const char follow_fork_mode_child[] = "child";
 static const char follow_fork_mode_parent[] = "parent";
 
@@ -3663,7 +3661,10 @@  proceed (CORE_ADDR addr, enum gdb_signal siggnal)
   pc = regcache_read_pc_protected (regcache);
 
   /* Fill in with reasonable starting values.  */
-  init_thread_stepping_state (cur_thr);
+  cur_thr->stepped_breakpoint = 0;
+  cur_thr->stepping_over_breakpoint = 0;
+  cur_thr->stepping_over_watchpoint = 0;
+  cur_thr->step_after_step_resume_breakpoint = 0;
 
   gdb_assert (!thread_is_in_step_over_chain (cur_thr));
 
@@ -4942,17 +4943,6 @@  set_step_info (thread_info *tp, const frame_info_ptr &frame,
      tp->control.step_stack_frame_id.to_string ().c_str ());
 }
 
-/* Clear context switchable stepping state.  */
-
-void
-init_thread_stepping_state (struct thread_info *tss)
-{
-  tss->stepped_breakpoint = 0;
-  tss->stepping_over_breakpoint = 0;
-  tss->stepping_over_watchpoint = 0;
-  tss->step_after_step_resume_breakpoint = 0;
-}
-
 /* See infrun.h.  */
 
 void