This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug macros/15611] New: macros don't work with CWEB
- From: "knuth-bug at cs dot stanford.edu" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 12 Jun 2013 17:32:32 +0000
- Subject: [Bug macros/15611] New: macros don't work with CWEB
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15611
Bug ID: 15611
Summary: macros don't work with CWEB
Product: gdb
Version: 7.4
Status: NEW
Severity: normal
Priority: P2
Component: macros
Assignee: unassigned at sourceware dot org
Reporter: knuth-bug at cs dot stanford.edu
Created attachment 7074
--> http://sourceware.org/bugzilla/attachment.cgi?id=7074&action=edit
self-explanatory shell log
I've used CWEB for all my programs for more than 20 years (and more than
a thousand programs!). And I unwittingly introduce bugs, so I'm a heavy user
of GDB. Because of the #line directives, GDB works quite beautifully in
connection with CWEB, and I consider it to be a great treasure.
But I just learned about the "macro" abilities of GDB, and I find that
they are totally useless to me because the #line directives make the
macros invisible.
I know that CWEB accounts for only a relatively small subset of today's
users, even though it comes already installed with many Linux distributions.
In order to understand my problem with GDB's macros, you don't need to
know anything about CWEB except that it's a super-duper way to construct
C programs, using a processor called CTANGLE.
CTANGLE converts *.w files to *.c files. Those files contain #line directives,
which allow gcc and gdb etc. to sync with the original *.w source lines.
CTANGLE also changes CWEB constructs like "@d foo bar" into "#define foo bar".
The attached file is hopefully self-explanatory: I show a CWEB source file
"macrotest.w", I show the file "macrotest.c" produced by CTANGLE, and I show
GDB's inability to see the macros. Then I change "macrotest.c"
to "mcrtst.c", which is identical except for the #line directives;
and all works fine.
--
You are receiving this mail because:
You are on the CC list for the bug.