gdb with gcj
Andrew Haley
aph@redhat.com
Sat May 1 17:27:00 GMT 2004
Bryce McKinlay writes:
> On May 1, 2004, at 9:41 AM, Andrew Haley wrote:
>
> > 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.
>
> Lets make sure there is a PR on this. We shouldn't have to recompile
> just to debug.
Well, it's been like that for a long while, and AFAIK it's a hard
problem. In theory you can generate DWARF expressions that allow you
to calculate what a variable would be if the code were not optimized,
but in the general case it's impossible. After all, the "as if" rule
allows the compiler completely to rewrite a program.
> There is something similar already for tree-ssa:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14638
>
> Hopefully a solution for the tree-ssa issue will apply here as well.
The variable renaming in that testcase is very much a tree-SSA
specific thing.
In any case, until we have a real testcase it's impossible to know
what the real problem is. It may just be a bug.
Andrew.
More information about the Java
mailing list