[antlr-interest] C++ debugging weirdness

Ric Klaren ric.klaren at gmail.com
Tue Jan 11 11:23:59 PST 2005

On Tue, 11 Jan 2005 10:43:43 -0500, Bryan Ewbank <ewbank at gmail.com> wrote:
> I'm debugging C++ generated code on a linux box with gdb (ANTLR
> 2.7.4), and have run into a rather strange problem.
> The object "inputState", though present in the code, is apparently not
> visible to the debugger.
> Have other people encountered this problem?  Any work-arounds (other
> than writting bug-free code :-) for this?
> I'm compiling with "g++ -ggdb", and using gdb 6.1 and g++ 3.2.2.

Mostly somewhat obvious tips I can think of is trying to upgrade g++
and see if that fixes things. There have been loads of debugging info
fixes for g++. Maybe -ggdb3 makes a bit of a difference. It could also
help to use -O0 when compiling so the optimizer doesn't strip away too



More information about the antlr-interest mailing list