From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28693 invoked by alias); 28 May 2004 19:35:55 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28684 invoked from network); 28 May 2004 19:35:55 -0000 Received: from unknown (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org with SMTP; 28 May 2004 19:35:55 -0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id i4SJZsNn021463 for ; Fri, 28 May 2004 15:35:54 -0400 Received: from M30.equallogic.com (m30 [172.16.1.30]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id i4SJZsik021458; Fri, 28 May 2004 15:35:54 -0400 Received: from pkoning.equallogic.com ([172.16.1.249]) by M30.equallogic.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 28 May 2004 15:35:53 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16567.38040.594168.509373@gargle.gargle.HOWL> Date: Fri, 28 May 2004 19:35:00 -0000 From: Paul Koning To: drow@false.org Cc: gdb@sources.redhat.com Subject: Re: preprocessor support? References: <16567.37347.995508.204649@gargle.gargle.HOWL> <20040528192945.GA4018@nevyn.them.org> X-OriginalArrivalTime: 28 May 2004 19:35:53.0776 (UTC) FILETIME=[FD68DB00:01C444EA] X-SW-Source: 2004-05/txt/msg00194.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Daniel> On Fri, May 28, 2004 at 03:24:19PM -0400, Paul Koning wrote: >> These days GCC will output dwarf2 debug sections listing >> preprocessor symbol definitions, but gdb 6.1 doesn't seem to look >> at that (at least not for mips-netbsd). >> >> Is that not implemented yet? Is it in some targets but not this >> one (and if so, any pointers to places I might look to teach this >> target a new trick)? Daniel> It should work everywhere, so you'll have to dig at it Daniel> harder. I'm not sure that it's tested; there's at least one Daniel> test in the testsuite but I don't see it going out of its way Daniel> to pass -g3, so the binary won't have macro information. To be more specific: I looked at the .S file coming out of gcc, and saw the macro debug data. I then linked the executable file, did an objdump on that, and again saw the macros in the debug data (.debug_macinfo section). I then fed the executable to gdb, and asked it to print me the value of a couple of preprocessor symbols, like TEST which I defined and __GNUC__ which gcc put in. Gdb said: No symbol "__GNUC__" in current context. Do I need to speak a magic word to have gdb look for the macro symbols? paul