From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10926 invoked by alias); 8 May 2012 10:04:07 -0000 Received: (qmail 10913 invoked by uid 22791); 8 May 2012 10:04:04 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_GD X-Spam-Check-By: sourceware.org Received: from mail-gg0-f169.google.com (HELO mail-gg0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 May 2012 10:03:51 +0000 Received: by ggeq1 with SMTP id q1so1697823gge.0 for ; Tue, 08 May 2012 03:03:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.184.202 with SMTP id s50mr23262873yhm.84.1336471430255; Tue, 08 May 2012 03:03:50 -0700 (PDT) Received: by 10.146.207.8 with HTTP; Tue, 8 May 2012 03:03:50 -0700 (PDT) Date: Tue, 08 May 2012 10:04:00 -0000 Message-ID: Subject: Re: -ggdb3 -gdwarf-4 but "info macro BLAH" still doesn't work? From: Luke To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00028.txt.bz2 I'm having the same problem. Here is a very simple test C program: #include #define M 42 #define ADD(x) (M + x) int main () { printf("%d\n", M); printf("%d\n", ADD(2)); return 0; } I compile with: $ gcc -gdwarf-4 -gdb3 -Wall -O0 sample.c -o sample then debug: $ gdb -q ./sample Reading symbols from /tmp/sample...done. (gdb) b main Breakpoint 1 at 0x400560: file sample.c, line 6. (gdb) run Starting program: /tmp/sample Breakpoint 1, main () at sample.c:6 6 printf("%d\n", M); (gdb) macro list (gdb) info source Current source file is sample.c Compilation directory is /tmp Located in /tmp/sample.c Contains 27 lines. Source language is c. Compiled with DWARF 2 debugging format. Does not include preprocessor macro info. (gdb) macro expand ADD(1) expands to: ADD(1) (gdb) print M No symbol "M" in current context. I have tried -g3, -gstabs, -gstabs+ and all have the same problem. This happens with Linaro gcc 4.7-2012.04, as well as a very recent pull from gcc master (4.8.0 20120502). It doesn't happen with gcc 4.6.2. Hopefully somebody is aware of this and knows what to do. Any suggestions? I'm guessing this is a gcc bug. I'll search there and if it isn't already reported, I will reported it. ~Luke