From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: Regression: Re: [PATCH] Fix some i386 unwinder inconcistencies
Date: Mon, 13 Jun 2011 20:46:00 -0000 [thread overview]
Message-ID: <20110613204622.GA31796@host1.jankratochvil.net> (raw)
In-Reply-To: <201106131910.p5DJASWu022014@glazunov.sibelius.xs4all.nl>
On Mon, 13 Jun 2011 21:10:28 +0200, Mark Kettenis wrote:
> > In both cases on Fedora it stops at the same place:
> > 0x080483e0 in func () at ./gdb.base/watchpoint-cond-gone.c:28^M
>
> Are you sure? If that's the case, there must be debug info that tells
> GDB that the watchpoint goes out of scope.
It stops because the original frame changes and in watchpoint_check
within_current_scope becomes 0. This is because code_addr is different but
your patch fixed code_addr so it no longer gets trapped.
You should also have provided a testcase showing a PASS->FAIL on the epilogue
code_addr fix.
> Smells like there is a
> flaw in the watchpoint code where it notices that the watchpoint goes
> out of scope, but still tries to evaluate the watchpoint condition.
BTW I do not say how many flaws are in GDB, there are many. But so far the
functionality worked and now it does not. So either we find a simple fix soon
enough or one should revert the patch. Cross-comparison of various known
regressions get complicated.
> There should be debug info to tell us exactly when a certain variable
> goes out of scope, and the breakpoint/watchpoint code should use it.
For -O0 -g code the debug info is not perfect per instruction - this is why
for example the prologues need to be skipped.
> In absence of that debug info, assuming that the watchpoint goes out
> of scope when the function returns, combined with the
> in_function_epilogue_p() check will have to do the job.
Yes but you broke a functionality depending on existing bugs so you should
have also fixed these associated problems not visible before.
> > Also for the epilogue unwinder you would need to somehow fix:
> > 1441 /* This restriction could be lifted if other unwinders are known to
> > 1442 compute the frame base in a way compatible with the DWARF
> > 1443 unwinder. */
> > 1444 if (! frame_unwinder_is (this_frame, &dwarf2_frame_unwind))
> > 1445 error (_("can't compute CFA for this frame"));
>
> All unwinders are supposed to return a frame base that is "compatible"
> amongst unwinders, including the DWARF one. Now that may be tricky if
> compilers don't agree on what the frame base (CFA) is. But we should
> get this right for GCC, and that's all I care about. If you'd ask me,
> that check should be removed.
I agree, CFA is computed for the same address in all unwinders I have seen so
far.
Thanks,
Jan
next prev parent reply other threads:[~2011-06-13 20:46 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
2011-06-13 16:11 ` Jan Kratochvil
2011-06-13 19:10 ` Mark Kettenis
2011-06-13 20:46 ` Jan Kratochvil [this message]
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=20110613204622.GA31796@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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