cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/03/14:33:49

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199708031833.AA251743195@typhoon.rose.hp.com>
Subject: Re: Debugging bison source with gdb
To: makulik AT tf16 DOT mch DOT sni DOT de (Makulik.Guenther T 27528 R 91-811 WS tx24)
Date: Sun, 03 Aug 1997 11:33:15 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <5rpmh7$gg1$1@horus.mch.sni.de>; from "Makulik.Guenther T 27528 R 91-811 WS tx24" at Jul 31, 97 9:39 am

> I found it in Eli Zaretski's FAQ, it says COFF can't handle the information 
> provided with #line pragmas :-(.
Its a very small patch to enable stabs for gcc.  Alternatively, you can
get pgcc, which has support for stabs already.


> I'm now grepping all lines containing a '#line' statement out of the .cc file
> produced by Bison and debugging gets more handy. But this is really only a
> work(hard)around!

bison 

'-l'
'--no-lines'
Don't put any '#line' preprocessor commands in the parser file.
Ordinarily Bison puts them in the parser file so that the C
compiler and debuggers will associate errors with your source
file, the grammar file. ...

Note that to use this you should not enable it until your sources compile
OK, as compiler errors will be reported in the .c file as well.

Andrew

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019