From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jan.kratochvil@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: Regression: Re: [PATCH] Fix some i386 unwinder inconcistencies
Date: Mon, 13 Jun 2011 15:37:00 -0000 [thread overview]
Message-ID: <201106131537.p5DFb1cn023164@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20110613104911.GA1965@host1.jankratochvil.net> (message from Jan Kratochvil on Mon, 13 Jun 2011 12:49:11 +0200)
> Date: Mon, 13 Jun 2011 12:49:11 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> On Sun, 12 Jun 2011 22:57:30 +0200, Mark Kettenis wrote:
> > This diff fixes a few issues with the epilogue and stack tramp unwinders.
> >
> > Committed.
> >
> > 2011-06-12 Mark Kettenis <kettenis@gnu.org>
> >
> > * i386-tdep.c (i386_epilogue_frame_cache): Simplify code. Call
> > get_frame_func instead of get_frame_pc to determine the code
> > address used to construct the frame ID.
> > (i386_epilogue_frame_unwind_stop_reason): Fix coding style.
> > (i386_epilogue_frame_this_id): Likewise.
> > (i386_epilogue_frame_prev_register): New function.
> > (i386_epilogue_frame_unwind): Use i386_epilogue_frame_prev_register.
> > (i386_stack_tramp_frame_sniffer): Fix coding style.
> > (i386_stack_tramp_frame_unwind): Use i386_epilogue_frame_prev_register.
> > (i386_gdbarch_init): Fix comments.
>
> On all the tested platforms Fedora-{13,14,15,Rawhide} for {i686,x86_64-m32}
> (but not for x86_64):
> -PASS: gdb.base/watchpoint-cond-gone.exp: Catch the no longer valid watchpoint
> +FAIL: gdb.base/watchpoint-cond-gone.exp: Catch the no longer valid watchpoint
Odd, that tests still passes for me on i386-unknown-openbsd4.9.
PASS: gdb.base/watchpoint-cond-gone.exp: Catch the no longer valid watchpoint
Something did change though. Before my change:
Run till exit from #0 func () at ../../../src/gdb/testsuite/gdb.base/watchpoint-cond-gone.c:26
Watchpoint 3 deleted because the program has left the block in
which its expression is valid.
0x1c0006d0 in func () at ../../../src/gdb/testsuite/gdb.base/watchpoint-cond-gone.c:28
28 }
So the watchpoint went out of scope before the function returned. Whereas after my change:
Run till exit from #0 func () at ../../../src/gdb/testsuite/gdb.base/watchpoint-cond-gone.c:26
Watchpoint 3 deleted because the program has left the block in
which its expression is valid.
0x1c000707 in jumper ()
the watchpoint went out of scope when the function returned, as I believe it should.
> -XFAIL: gdb.mi/mi-watch.exp: sw: watchpoint trigger (stopped at wrong place)
> +XFAIL: gdb.mi/mi-watch.exp: sw: watchpoint trigger (unknown output after running)
> -XFAIL: gdb.mi/mi2-watch.exp: sw: watchpoint trigger (stopped at wrong place)
> +XFAIL: gdb.mi/mi2-watch.exp: sw: watchpoint trigger (unknown output after running)
Ok, I'm seeing these as well. Didn't classify these as a regression
since they went from XFAIL to XFAIL. They seem to be related to the
fact that I changed get_frame_pc into get_frame_func. That change is
correct though. The frame ID returned by the epilogue unwinder should
be identical to the one returned by the "normal", so the code address
needs to be the start of the function and not the address of the 'ret'
instruction.
> The regressions are all just instances of:
>
> finish
> Run till exit from #0 func () at ./gdb.base/watchpoint-cond-gone.c:26
> -
> -Watchpoint 3 deleted because the program has left the block in
> -which its expression is valid.
> +Error evaluating expression for watchpoint 3
> +can't compute CFA for this frame
> +Watchpoint 3 deleted.
I think this can be avoided by implementing the
in_function_epilogue_p() gdbarch method for i386/amd64. In fact, that
method already seems to be implemented. It just isn't registered.
next prev parent reply other threads:[~2011-06-13 15:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-12 20:57 Mark Kettenis
2011-06-13 2:32 ` Yao Qi
2011-06-13 14:50 ` Mark Kettenis
2011-06-13 10:49 ` Regression: " Jan Kratochvil
2011-06-13 15:37 ` Mark Kettenis [this message]
2011-06-13 16:11 ` Jan Kratochvil
2011-06-13 19:10 ` Mark Kettenis
2011-06-13 20:46 ` Jan Kratochvil
2011-06-26 8:41 ` [patch 1/2] Code reformatting for patch 2/2 [Re: Regression: Re: [PATCH] Fix some i386 unwinder inconcistencies] Jan Kratochvil
2011-06-29 22:20 ` Jan Kratochvil
2011-06-26 8:42 ` [patch 2/2] Disable epilogue unwinders on recent GCCs " Jan Kratochvil
2011-06-27 9:39 ` Mark Kettenis
2011-06-28 20:02 ` Tom Tromey
2011-06-28 20:06 ` Jan Kratochvil
2011-06-29 22:26 ` Jan Kratochvil
2011-06-28 19:56 ` Tom Tromey
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=201106131537.p5DFb1cn023164@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.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