This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb with gcj


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]