[PATCH 0/4] gdb, btrace: infrun fixes

Metzger, Markus T markus.t.metzger@intel.com
Tue Nov 23 11:33:30 GMT 2021


Hello Pedro,

>The curious thing is that stepn.exp doesn't fail, it passes anyhow.  Is that
>expected?

I added stepn for completeness.


>Also, I diffed gdb.log before/after patch, and noticed a difference.  GDB no longer
>prints the current
>location:
>
>   No more reverse-execution history.
>  -main () at /home/pedro/gdb/binutils-
>gdb/src/gdb/testsuite/gdb.btrace/record_goto.c:50
>   50       return 0;     /* main.3 */
>
>Is this expected?

Thanks for pointing this out, I hadn't noticed it.

The reason is that with the patch, we now actually complete the 1st of the 5 stepi.
Before, although we actually completed the step, we signaled no-history.  On the 2nd
step, we signal no-history in keep_going() since the thread is replaying but the target
no longer is.

Whether we print the frame is guarded by tp->control.step_stop.  We clear it in
clear_proceed_status_thread() initially and then in handle_signal_stop() after we
handled breakpoint stop events.  So, the 1 from end_stepping_range() during the
1st stop is preserved.

I'm wondering if prepare_one_step() should reset tp->control.step_stop to zero.  It does
re-initialize tp->control.step_range_start/end and we do start another step.

What do you think?

Regards,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


More information about the Gdb-patches mailing list