This is the mail archive of the
mailing list for the GDB project.
Re: Lifetime of local variables
Daniel Jacobowitz <email@example.com> writes:
> No. I'd strongly object to adding any DWARF-2 tags without at least
> discussing them with the DWARF committee (which is quite responsive, I
Yeah, good point.
> Also, I believe that this should be entirely subsumed by .debug_loc.
> The first variable's value may no longer be available, but it has not
> actually gone out of scope, has it? We should list it but claim that
> its value is unavailable.
It has actually gone out of scope. I want to use this to debug machine
generated IL code and the JIT may want to create local variables
on-the-fly. For variables which have actually been defined by a human
programmer, listing them and claiming that their value is no longer
available is IMHO the right thing to do - but I'd like to tell the
debugger to make a machine-generated variable disappear when it's no
longer used, otherwise you'd get a large number of automatic variables
(having numbers, not names, which makes it even more confusing to the
user) and only a very few of them are actually used.
Btw. are there any plans to implement .debug_loc anytime soon, I need
this for something else ?