This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug macros/15611] macros don't work with CWEB


http://sourceware.org/bugzilla/show_bug.cgi?id=15611

Cary Coutant <ccoutant at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ccoutant at google dot com

--- Comment #1 from Cary Coutant <ccoutant at google dot com> ---
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]