From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12370 invoked by alias); 26 Jun 2011 08:41:35 -0000 Received: (qmail 12362 invoked by uid 22791); 26 Jun 2011 08:41:34 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_GD,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; Sun, 26 Jun 2011 08:41:15 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5Q8fFWq014642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 26 Jun 2011 04:41:15 -0400 Received: from host1.jankratochvil.net (ovpn-113-63.phx2.redhat.com [10.3.113.63]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5Q8fDLC016973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 26 Jun 2011 04:41:15 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p5Q8fCqK027113; Sun, 26 Jun 2011 10:41:12 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p5Q8fBXI026822; Sun, 26 Jun 2011 10:41:11 +0200 Date: Sun, 26 Jun 2011 08:41:00 -0000 From: Jan Kratochvil To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: [patch 1/2] Code reformatting for patch 2/2 [Re: Regression: Re: [PATCH] Fix some i386 unwinder inconcistencies] Message-ID: <20110626084110.GA28242@host1.jankratochvil.net> References: <201106122057.p5CKvUEa030437@glazunov.sibelius.xs4all.nl> <20110613104911.GA1965@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110613104911.GA1965@host1.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-06/txt/msg00383.txt.bz2 On Mon, 13 Jun 2011 12:49:11 +0200, Jan Kratochvil wrote: > 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 > -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) Nothing interesting in this part, no functionality change intended. Thanks, Jan gdb/ 2011-06-26 Jan Kratochvil Code cleanup - reformatting. * dwarf2read.c (producer_is_gcc_ge_4_0): Rename to ... (producer_is_gcc_ge_4): ... here, change the return value. (process_full_comp_unit): New variable gcc_4_minor, adjust the value interpretation. --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4646,10 +4646,12 @@ compute_delayed_physnames (struct dwarf2_cu *cu) } } -/* Check for GCC >= 4.0. */ +/* Check for GCC >= 4.x. Return minor version (x) of 4.x in such case. If it + is not GCC or it is GCC older than 4.x return -1. If it is GCC 5.x or + higher return INT_MAX. */ static int -producer_is_gcc_ge_4_0 (struct dwarf2_cu *cu) +producer_is_gcc_ge_4 (struct dwarf2_cu *cu) { const char *cs; int major, minor; @@ -4660,7 +4662,7 @@ producer_is_gcc_ge_4_0 (struct dwarf2_cu *cu) this case can also happen for -gdwarf-4 type units supported since gcc-4.5. */ - return 0; + return -1; } /* Skip any identifier after "GNU " - such as "C++" or "Java". */ @@ -4669,7 +4671,7 @@ producer_is_gcc_ge_4_0 (struct dwarf2_cu *cu) { /* For non-GCC compilers expect their behavior is not compliant. */ - return 0; + return -1; } cs = &cu->producer[strlen ("GNU ")]; while (*cs && !isdigit (*cs)) @@ -4678,10 +4680,14 @@ producer_is_gcc_ge_4_0 (struct dwarf2_cu *cu) { /* Not recognized as GCC. */ - return 0; + return -1; } - return major >= 4; + if (major < 4) + return -1; + if (major > 4) + return INT_MAX; + return minor; } /* Generate full symbol information for PST and CU, whose DIEs have @@ -4725,6 +4731,8 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu) if (symtab != NULL) { + int gcc_4_minor = producer_is_gcc_ge_4 (cu); + /* Set symtab language to language from DW_AT_language. If the compilation is from a C file generated by language preprocessors, do not set the language if it was already deduced by start_subfile. */ @@ -4741,7 +4749,7 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu) Still one can confuse GDB by using non-standard GCC compilation options - this waits on GCC PR other/32998 (-frecord-gcc-switches). */ - if (cu->has_loclist && producer_is_gcc_ge_4_0 (cu)) + if (cu->has_loclist && gcc_4_minor >= 0) symtab->locations_valid = 1; }