From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13091 invoked by alias); 13 Jun 2011 15:37:23 -0000 Received: (qmail 13032 invoked by uid 22791); 13 Jun 2011 15:37:21 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jun 2011 15:37:07 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p5DFb2Ja031236; Mon, 13 Jun 2011 17:37:02 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p5DFb1cn023164; Mon, 13 Jun 2011 17:37:01 +0200 (CEST) Date: Mon, 13 Jun 2011 15:37:00 -0000 Message-Id: <201106131537.p5DFb1cn023164@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: jan.kratochvil@redhat.com CC: gdb-patches@sourceware.org In-reply-to: <20110613104911.GA1965@host1.jankratochvil.net> (message from Jan Kratochvil on Mon, 13 Jun 2011 12:49:11 +0200) Subject: Re: Regression: Re: [PATCH] Fix some i386 unwinder inconcistencies References: <201106122057.p5CKvUEa030437@glazunov.sibelius.xs4all.nl> <20110613104911.GA1965@host1.jankratochvil.net> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00161.txt.bz2 > Date: Mon, 13 Jun 2011 12:49:11 +0200 > From: Jan Kratochvil > > 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 > > > > * 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.