From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7260 invoked by alias); 14 Jun 2013 17:10:13 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 7228 invoked by uid 48); 14 Jun 2013 17:10:12 -0000 From: "ccoutant at google dot com" To: gdb-prs@sourceware.org Subject: [Bug macros/15611] macros don't work with CWEB Date: Fri, 14 Jun 2013 17:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: macros X-Bugzilla-Version: 7.4 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ccoutant at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q2/txt/msg00423.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15611 Cary Coutant changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ccoutant at google dot com --- Comment #1 from Cary Coutant --- Have you tried the -a option? (gdb) info macro -a a Defined at /usr/local/google/home/ccoutant/scratch/macro/macrotest.c:2 #define a(x) b[x] Without -a, GDB looks for macro definitions only in the current compilation unit, and it thinks the macro is defined in macrotest.c, while you are currently in macrotest.w. I noticed that CTANGLE isn't putting a #line directive in front of the translated macro definitions, so there's not even an expectation that they would appear as coming from the original .w source file. That seems like a bug in CTANGLE. Nevertheless, when I added the #line directive manually, GCC seems to ignore it when it generates the macro information in the DWARF (I tested with both the older .debug_macinfo and the newer .debug_macro). That seems like a bug in GCC. -- You are receiving this mail because: You are on the CC list for the bug.