From: Carl Love via Gdb-patches <gdb-patches@sourceware.org>
To: Guinevere Larsen <blarsen@redhat.com>,
Simon Marchi <simark@simark.ca>,
gdb-patches@sourceware.org,
UlrichWeigand <Ulrich.Weigand@de.ibm.com>,
pedro@palves.net
Cc: luis.machado@arm.com, cel@us.ibm.com
Subject: RE: [PATCH 2/2 ver 7] Fix reverse stepping multiple contiguous PC ranges over the line table.
Date: Tue, 08 Aug 2023 08:52:13 -0700 [thread overview]
Message-ID: <0dbc6a31553898a4c95c90d770539d6bee459cb4.camel@us.ibm.com> (raw)
In-Reply-To: <4771b172-902b-5995-d32d-494e6d6f5341@redhat.com>
Guinevere:
On Tue, 2023-08-08 at 16:14 +0200, Guinevere Larsen wrote:
> > infrun_debug_printf ("keep going");
> > +
> > + if (execution_direction == EXEC_REVERSE)
> > + {
> > + CORE_ADDR stop_pc = ecs->event_thread->stop_pc ();
> > +
> > + /* Make sure the stop_pc is set to the beginning of the
> > line. */
> > + if (stop_pc != ecs->event_thread->control.step_range_start)
> > + {
> > + stop_pc = update_line_range_start (stop_pc, ecs);
> > + ecs->event_thread->control.step_range_start = stop_pc;
> pretty small nit, but I think it is better to just use
>
> ecs->event_thread->control.step_range_start
> = update_line_range_start (stop_pc, ecs);
>
> Just because it is kind of weird, to see the step_range_start being
> set
> to stop pc, and made me do a double take :)
>
Yea, I may have done it like that to make it easier to print the new
stop_pc value when developing the patch. Honestly, at this point I
don't recall for sure. Anyway, I updated the code as follows:
if (execution_direction == EXEC_REVERSE)
{
CORE_ADDR stop_pc = ecs->event_thread->stop_pc ();
/* Make sure the stop_pc is set to the beginning of the line. */
if (stop_pc != ecs->event_thread->control.step_range_start)
ecs->event_thread->control.step_range_start
= update_line_range_start (stop_pc, ecs);
}
keep_going (ecs);
I made the change locally and will include it in any future
versions/commits. Not sure it is worth sending out a new version with
the change at the moment. Lets see if I get any additional comments
from the community first. Thanks for mentioning that.
Carl
prev parent reply other threads:[~2023-08-08 15:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 18:54 [PATCH 0/2] " Carl Love via Gdb-patches
2023-08-07 19:03 ` [PATCH 1/2 ver 2] " Carl Love via Gdb-patches
2023-08-08 10:04 ` Guinevere Larsen via Gdb-patches
2023-08-08 15:38 ` Carl Love via Gdb-patches
2023-08-08 15:45 ` Guinevere Larsen via Gdb-patches
2023-08-07 19:03 ` [PATCH 2/2 ver 7] " Carl Love via Gdb-patches
2023-08-08 14:14 ` Guinevere Larsen via Gdb-patches
2023-08-08 15:52 ` Carl Love via Gdb-patches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0dbc6a31553898a4c95c90d770539d6bee459cb4.camel@us.ibm.com \
--to=gdb-patches@sourceware.org \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=blarsen@redhat.com \
--cc=cel@us.ibm.com \
--cc=luis.machado@arm.com \
--cc=pedro@palves.net \
--cc=simark@simark.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox