From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2571 invoked by alias); 1 Mar 2012 00:13:17 -0000 Received: (qmail 2552 invoked by uid 22791); 1 Mar 2012 00:13:07 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Mar 2012 00:12:50 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q210Co0n002390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Feb 2012 19:12:50 -0500 Received: from mesquite.lan (ovpn-113-100.phx2.redhat.com [10.3.113.100]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q210ClRR023925 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 29 Feb 2012 19:12:49 -0500 Date: Thu, 01 Mar 2012 00:13:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [PATCH] [SH] Prologue skipping if there is none Message-ID: <20120229171247.12db9412@mesquite.lan> In-Reply-To: <87r4xd528y.fsf@schwinge.name> References: <87pqdgciho.fsf@schwinge.name> <20120215075413.1313f7fa@mesquite.lan> <20120215165907.33f2e9a6@mesquite.lan> <8739aad9il.fsf@schwinge.name> <20120216182544.36b41a1b@mesquite.lan> <87mx8da3b9.fsf@schwinge.name> <20120220162029.2082b6a1@mesquite.lan> <87wr7c7aop.fsf@schwinge.name> <20120224144657.36bbd09f@mesquite.lan> <87r4xd528y.fsf@schwinge.name> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2012-03/txt/msg00000.txt.bz2 On Wed, 29 Feb 2012 12:05:01 +0100 Thomas Schwinge wrote: > As we already had figured out, it introduces the following nine > regressions (PASS -> FAIL): > > FAIL: gdb.base/store.exp: continue to add_charest > FAIL: gdb.base/store.exp: continue to add_short > FAIL: gdb.base/store.exp: continue to add_int > FAIL: gdb.base/store.exp: continue to add_long > FAIL: gdb.base/store.exp: continue to add_longest > FAIL: gdb.base/structs.exp: advance to fun for return; return 2 structs-td-tf > FAIL: gdb.base/structs.exp: advance to fun for finish; return 2 structs-td-tf > FAIL: gdb.base/structs.exp: advance to fun for return; return 2 structs-tf-td > FAIL: gdb.base/structs.exp: advance to fun for finish; return 2 structs-tf-td I could live with these if there were a significant number of progressions elsewhere. > As already reported, an additional regression for sh-linux-gnu: > > Running /scratch/tschwing/FM_sh-linux-gnu/src/gdb-mainline/gdb/testsuite/gdb.threads/staticthreads.exp ... > PASS: gdb.threads/staticthreads.exp: successfully compiled posix threads test case > PASS: gdb.threads/staticthreads.exp: set print sevenbit-strings > PASS: gdb.threads/staticthreads.exp: break sem_post > -PASS: gdb.threads/staticthreads.exp: Continue to main's call of sem_post > +FAIL: gdb.threads/staticthreads.exp: Continue to main's call of sem_post (the program exited) > PASS: gdb.threads/staticthreads.exp: rerun to main > PASS: gdb.threads/staticthreads.exp: handle SIG32 nostop noprint pass > -PASS: gdb.threads/staticthreads.exp: handle SIG32 helps > -PASS: gdb.threads/staticthreads.exp: info threads > +FAIL: gdb.threads/staticthreads.exp: handle SIG32 helps (the program exited) > +KFAIL: gdb.threads/staticthreads.exp: info threads (PRMS: gdb/1328) > PASS: gdb.threads/staticthreads.exp: GDB exits with static thread program > > The breakpoint for sem_post is mis-calculated to be somewhere near the > end of the function (after the epilogue, even). This is bad. I think this could be fixed (by stopping the scan if a return instruction is seen), but I'm not sure it's worth it at the moment. > And, as already reported, there is this progression for sh-linux-gnu: > > -FAIL: gdb.base/gdb1250.exp: setting breakpoint at abort > +PASS: gdb.base/gdb1250.exp: backtrace from abort > > The PLT stub for abort happens to be the last one in the .plt section, > and (I suppose) your more advanced limit_pc/func_end mechanism (instead > of hard-coding 28 instructions) helps to avoid hitting the > end-of-.plt-section border. (The question is whether it really makes > sense to go looking for a prologue in a PLT stub, but that's what GDB is > currently doing, and it should be without harm.) > > As for the other advancements that you reported, do you have any > additional patches in your tree; see the questions in my 2012-02-21 > email, Message-ID: <8762f09stp.fsf@schwinge.name>. It turns out that I do. It's unrelated to prologue analysis. I'll post it separately in a few minutes. (I'll CC you on it.) It's a small patch that I thought I had removed from my tree. Sorry about the noise caused by that patch. > I'll now try to carry over your ``more advanced limit_pc/func_end > mechanism'' separately. I wouldn't make it a high priority. Your patch provides very good results and my additions (on the prologue analysis front) hurt more than they help. Thanks for all of your work on this matter. Kevin