This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Stopping reverse debugging behaves differently with btrace
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Marc Khouzam <marc dot khouzam at ericsson dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 8 Jun 2016 06:41:10 +0000
- Subject: RE: Stopping reverse debugging behaves differently with btrace
- Authentication-results: sourceware.org; auth=none
- References: <E59706EF8DB1D147B15BECA3322E4BDC22ABACFE at eusaamb103 dot ericsson dot se>
Hi Marc,
> I noticed a difference of behaviour when stopping reverse debugging
> with btrace vs record/replay (full mode).
>
> If full mode, if I step to line 200 and then back to line 150 then give
> the record stop command, real execution will start from line 150 as
> I step my program. (This is really cool btw.)
>
> In btrace mode (I tried bts), after I step back to line 150 and send
> the record stop command, GDB appears to still be at line 150 but on
> the next step, execution jumps to line 200 before doing the step
> operation.
>
> I'm guessing this has to do with the fact that btrace does not store
> registers and memory, so cannot restart execution just anywhere.
That's correct.
> I find it strange though that when turning off record, every indication
> to the user is that we are still at line 150, when in reality, GDB is
> effectively back at line 200. This is particularly noticeable in a
> frontends when execution jumps (unexpectedly) when the first step
> is requested.
>
> Variables also remain unavailable until the next step (or strangely,
> until I send some register command).
>
> I was wondering if GDB should reset its execution to the proper
> place upon a 'record stop' for btrace? And notify the frontend of
> that change.
I agree. I'll look into it. Thanks for pointing it out.
Regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928