public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug macros/15611] New: macros don't work with CWEB
@ 2013-06-12 17:32 knuth-bug at cs dot stanford.edu
  2013-06-14 17:10 ` [Bug macros/15611] " ccoutant at google dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: knuth-bug at cs dot stanford.edu @ 2013-06-12 17:32 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-20 13:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-12 17:32 [Bug macros/15611] New: macros don't work with CWEB knuth-bug at cs dot stanford.edu
2013-06-14 17:10 ` [Bug macros/15611] " ccoutant at google dot com
2015-10-20 13:29 ` sourceware at christianjaeger dot ch
2015-10-20 13:34 ` [Bug macros/15611] macros don't work with CWEB, or Perl XS, or other use of #line directives sourceware at christianjaeger dot ch
2015-10-20 13:39 ` sourceware at christianjaeger dot ch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).