From: Andrew Crabtree 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 Precedence: bulk > 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