From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17267 invoked by alias); 30 Apr 2008 12:44:02 -0000 Received: (qmail 17256 invoked by uid 22791); 30 Apr 2008 12:44:01 -0000 X-Spam-Check-By: sourceware.org Received: from igw2.br.ibm.com (HELO igw2.br.ibm.com) (32.104.18.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Apr 2008 12:43:39 +0000 Received: from mailhub3.br.ibm.com (mailhub3 [9.18.232.110]) by igw2.br.ibm.com (Postfix) with ESMTP id 114A017F46E for ; Wed, 30 Apr 2008 09:33:32 -0300 (BRST) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m3UChYWO4321432 for ; Wed, 30 Apr 2008 09:43:34 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m3UChME3009003 for ; Wed, 30 Apr 2008 09:43:23 -0300 Received: from [9.8.4.32] ([9.8.4.32]) by d24av01.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m3UChLAH008989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Apr 2008 09:43:22 -0300 Subject: Re: Handle DW_AT_const_value/DW_FORM_strp variables From: Luis Machado Reply-To: luisgpm@linux.vnet.ibm.com To: Pedro Alves Cc: gdb-patches@sourceware.org, Joel Brobecker In-Reply-To: <200804251959.51368.pedro@codesourcery.com> References: <200804251915.27580.pedro@codesourcery.com> <20080425182858.GB841@adacore.com> <200804251959.51368.pedro@codesourcery.com> Content-Type: text/plain Date: Wed, 30 Apr 2008 13:58:00 -0000 Message-Id: <1209559400.7131.4.camel@gargoyle> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 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: 2008-04/txt/msg00695.txt.bz2 Pedro, This doesn't work as is on PPC. The ".value" pseudo-op it not available, but using ".short" instead does the trick. Tested on x86 and PPC with ".short" for the DWARF version field. Ok to change this? Regards, Luis On Fri, 2008-04-25 at 19:59 +0100, Pedro Alves wrote: > A Friday 25 April 2008 19:28:58, Joel Brobecker escreveu: > > Hi Pedro, > > > > > gdb/ > > > 2008-04-25 Pedro Alves > > > > > > * dwarf2read.c (dwarf2_const_value): Handle DW_FORM_strp. > > > > > > gdb/testsuite/ > > > 2008-04-25 Pedro Alves > > > > > > * gdb.dwarf2/dw2-strp.S, gdb.dwarf2/dw2-strp.exp: New files. > > > > Both patches look good to me. Please go ahead and commit. > > > > Thanks for the quick review. It's in now. > > > > +# This test can only be run on targets which support DWARF-2 and use > > > gas. +# For now pick a sampling of likely targets. > > > +if {![istarget *-*-linux*] > > > + && ![istarget *-*-gnu*] > > > + && ![istarget *-*-elf*] > > > + && ![istarget *-*-openbsd*] > > > + && ![istarget arm-*-eabi*] > > > + && ![istarget powerpc-*-eabi*]} { > > > + return 0 > > > +} > > > > I wonder if we should put that in a function somewhere. We have been > > repeating this pretty large condition in several files, now. Just > > thinking out loud... > > Indeed. > > ( > Thinking out load too: > However, we could also make the predicate the other way around. > Check for targets that *don't* support dwarf and *don't* use gas. Could > they be fewer? Probably some of the non-free Unixen, and older > xcoff/coff/a.out based targets. > > E.g. Windows/Cygwin aren't running these tests, and dwarf is a bit > more susceptible to bugs there in the sense that debug sections > don't get VMA == 0. > )