From: teawater <teawater@gmail.com>
To: "Michael Snyder" <msnyder@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Deal with get ecs->stop_func_end fail
Date: Fri, 24 Oct 2008 02:52:00 -0000 [thread overview]
Message-ID: <daef60380810231951u19c35136o6e5d4abb5e03ddfc@mail.gmail.com> (raw)
In-Reply-To: <4901225F.2030008@vmware.com>
OK. Thanks Michael.
Hui
On Fri, Oct 24, 2008 at 09:18, Michael Snyder <msnyder@vmware.com> wrote:
> teawater wrote:
>>
>> Hi Michael,
>>
>> I try a program and got:
>> (gdb) start
>> Temporary breakpoint 1 at 0x80483c1: file 1.c, line 20.
>> Starting program: /media/disk/a.out
>>
>> Temporary breakpoint 1, main () at 1.c:20
>> 20 int b = 0;
>> (gdb) rec
>> (gdb) n
>> 21 int c = 1;
>> (gdb)
>> 24 printf ("a = %d b = %d c = %d\n", a, b, c);
>> (gdb)
>> a = 0 b = 0 c = 1
>> 25 b = cool ();
>> (gdb) rn
>>
>> No more reverse-execution history.
>> main () at 1.c:20
>> 20 int b = 0;
>>
>>
>> It's clear that "rn" got error.
>> This is because:
>> find_pc_partial_function (stop_pc, &ecs->stop_func_name,
>> &ecs->stop_func_start, &ecs->stop_func_end);
>> This part get ecs->stop_func_end is 0.
>
> Aha. This is because we have stepped backward into
> a shared-library trampoline. You understand trampoline?
>
> It means that this was the first time the program calls
> "printf", which is in a shared library, so the program
> jumps into a jump table which causes the dymanic runtime
> resolver (ld-linux.so) to be called.
>
> We actually succeeded in "nexting" backward through printf,
> and then we succeeded in "nexting" backward thru _dl_runtime_resolver,
> but we failed when we hit the trampoline (backward).
>
> Give me some time, I need to figure out how to handle
> trampolines backward! ;-)
>
> Meanwhile, this is obviously a problem in infrun, so
> it does not need to affect your work on record/replay.
>
> Leave this to me. ;-)
>
>
prev parent reply other threads:[~2008-10-24 2:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-20 9:17 teawater
2008-10-24 1:23 ` Michael Snyder
2008-10-24 2:52 ` teawater [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=daef60380810231951u19c35136o6e5d4abb5e03ddfc@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