Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb/infrun: some extra infrun debug print statements
@ 2022-02-10 14:51 Andrew Burgess via Gdb-patches
  2022-02-10 14:55 ` Simon Marchi via Gdb-patches
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Burgess via Gdb-patches @ 2022-02-10 14:51 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

While reviewing a different patch I wanted to know more about what was
going on during GDB's stepping.  I added some extra infrun debug print
calls, and I thought these might be useful to others.
---
 gdb/infrun.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 61af16238de..a3438d1e5c2 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -4186,6 +4186,12 @@ set_step_info (thread_info *tp, struct frame_info *frame,
 
   tp->current_symtab = sal.symtab;
   tp->current_line = sal.line;
+
+  infrun_debug_printf
+    ("symtab = %s, line = %d, step_frame_id = %s, step_stack_frame_id = %s",
+     tp->current_symtab->filename, tp->current_line,
+     tp->control.step_frame_id.to_string ().c_str (),
+     tp->control.step_stack_frame_id.to_string ().c_str ());
 }
 
 /* Clear context switchable stepping state.  */
@@ -7260,6 +7266,11 @@ process_event_stop_test (struct execution_control_state *ecs)
   ecs->event_thread->control.step_range_start = stop_pc_sal.pc;
   ecs->event_thread->control.step_range_end = stop_pc_sal.end;
   ecs->event_thread->control.may_range_step = 1;
+  infrun_debug_printf
+    ("updated step range, start = %s, end = %s, may_range_step = %d",
+     paddress (gdbarch, ecs->event_thread->control.step_range_start),
+     paddress (gdbarch, ecs->event_thread->control.step_range_end),
+     ecs->event_thread->control.may_range_step);
   if (refresh_step_info)
     set_step_info (ecs->event_thread, frame, stop_pc_sal);
 
-- 
2.25.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/infrun: some extra infrun debug print statements
  2022-02-10 14:51 [PATCH] gdb/infrun: some extra infrun debug print statements Andrew Burgess via Gdb-patches
@ 2022-02-10 14:55 ` Simon Marchi via Gdb-patches
  2022-02-10 18:29   ` Andrew Burgess via Gdb-patches
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi via Gdb-patches @ 2022-02-10 14:55 UTC (permalink / raw)
  To: Andrew Burgess, gdb-patches



On 2022-02-10 09:51, Andrew Burgess via Gdb-patches wrote:
> While reviewing a different patch I wanted to know more about what was
> going on during GDB's stepping.  I added some extra infrun debug print
> calls, and I thought these might be useful to others.


LGTM.  Thanks for doing this, this is always appreciated.

Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/infrun: some extra infrun debug print statements
  2022-02-10 14:55 ` Simon Marchi via Gdb-patches
@ 2022-02-10 18:29   ` Andrew Burgess via Gdb-patches
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Burgess via Gdb-patches @ 2022-02-10 18:29 UTC (permalink / raw)
  To: gdb-patches

* Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> [2022-02-10 09:55:04 -0500]:

> 
> 
> On 2022-02-10 09:51, Andrew Burgess via Gdb-patches wrote:
> > While reviewing a different patch I wanted to know more about what was
> > going on during GDB's stepping.  I added some extra infrun debug print
> > calls, and I thought these might be useful to others.
> 
> 
> LGTM.  Thanks for doing this, this is always appreciated.

Thanks, pushed.

Andrew


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-10 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 14:51 [PATCH] gdb/infrun: some extra infrun debug print statements Andrew Burgess via Gdb-patches
2022-02-10 14:55 ` Simon Marchi via Gdb-patches
2022-02-10 18:29   ` Andrew Burgess via Gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox