gdb with gcj

Andrew Haley aph@redhat.com
Sat May 1 13:41:00 GMT 2004


Bryce McKinlay writes:
 > Vladimir Leven wrote:
 > 
 > > I am trying to debug a simple gcj program using gdb. How does one 
 > > print out the values of variables? I can set breakpoints, but unable 
 > > to print variable values.
 > 
 > 
 > This seems to be a bug with gdb. I've been having the same problem with 
 > cvs GCC against gdb 6.1. It doesn't seem to be limited to Java, the same 
 > thing happens debuggins C++ code. Compiling without -O may help a little?
The last time I investigated this, some of the optimizers (CSE?
loop?) were replacing one variable with another. This doesn't change
the semantics of the program but the new variable is no longer marked
as a user variable and doesn't carry debug info.
Unoptimized code should work, though. Vladimir, if you find a program
compiled with no optimization that has no debug info for local
variables, please let me know. Tell me the exact version of gcj and
gdb.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /