From: teawater <teawater@gmail.com>
To: "Michael Snyder" <msnyder@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Handle runtime loader dyn sym resolution in reverse
Date: Sat, 25 Oct 2008 06:50:00 -0000 [thread overview]
Message-ID: <daef60380810242350v13636f68t32f99792661185a@mail.gmail.com> (raw)
In-Reply-To: <49028B5C.2000508@vmware.com>
Great! It's OK to me. Please check it into 0930 branch and main tree.
On Sat, Oct 25, 2008 at 10:58, Michael Snyder <msnyder@vmware.com> wrote:
> This is for both the main trunk and the record/replay branch
> (so I'd appreciate review by both Hui and a global maintainer).
>
> It fixes a bug where you try to "reverse-next" over a
> first-time dynamic function call (eg. printf). Infrun
> would get lost when it stepped into the jump table
> backwards.
>
>
> 2008-10-24 Michael Snyder <msnyder@vmware.com>
>
> * infrun.c (handle_inferior_event): Handle dynamic symbol
> resolution in reverse.
>
> Index: infrun.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infrun.c,v
> retrieving revision 1.322.2.14
> diff -u -p -r1.322.2.14 infrun.c
> --- infrun.c 23 Oct 2008 23:24:45 -0000 1.322.2.14
> +++ infrun.c 25 Oct 2008 02:57:37 -0000
> @@ -3212,6 +3212,22 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (
> if (execution_direction == EXEC_REVERSE)
> {
> struct symtab_and_line sr_sal;
> +
> + if (ecs->stop_func_start == 0
> + && in_solib_dynsym_resolve_code (stop_pc))
> + {
> + /* Stepped into runtime loader dynamic symbol
> + resolution code. Since we're in reverse,
> + we have already backed up through the runtime
> + loader and the dynamic function. This is just
> + the trampoline (jump table).
> +
> + Just keep stepping, we'll soon be home.
> + */
> + keep_going (ecs);
> + return;
> + }
> + /* Normal (staticly linked) function call return. */
> init_sal (&sr_sal);
> sr_sal.pc = ecs->stop_func_start;
> insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
>
>
next prev parent reply other threads:[~2008-10-25 6:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 3:04 Michael Snyder
2008-10-25 6:50 ` teawater [this message]
2008-10-25 16:10 ` Joel Brobecker
2008-10-26 14:15 ` teawater
2008-10-27 4:48 ` Michael Snyder
2008-10-27 5:00 ` Michael Snyder
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=daef60380810242350v13636f68t32f99792661185a@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.com \
/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