This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: PATCH: error reading variable: value has been optimized out


>>>>> "Andrew" == Andrew Burgess <aburgess@broadcom.com> writes:

Andrew> (3) Structures the size of two registers split over two
Andrew> registers using dwarf piece information.

Andrew> (4) Values the size of a single register split over two
Andrew> registers using dwarf piece information to describe the
Andrew> location.

Andrew> Cases (3) and (4) are not fixed by my original patch, and fail
Andrew> for a different reason.  I could remove these from the test, but
Andrew> I believe the tests are reasonable, or at least not totally
Andrew> crazy, so I'm reluctant to just delete them.  I could just
Andrew> commit the test with these two examples marked as known failing
Andrew> .... or I could fix them :)

Andrew> The problem is this,

Andrew>   - In dwarf2loc.c:dwarf_evaluate_loc_desc_full we create the
Andrew>   computed value from the pieced location information.

Andrew>   - In dwarf2loc.c:read_pieced_value we spot that some of the
Andrew>   registers are missing and mark the computed value as optimized
Andrew>   out.

This scenario seems odd to me.  I think what it means is that the
compiler declares an object as being split between two registers -- but
then also knows that one of the registers is not in fact available.

Does any compiler actually do this?

If it is just a theoretical problem I think we can just declare it
unsupported; and, if we do see it, try reporting it as a compiler bug
first.  After all, the compiler could just emit an empty piece instead.

Tom


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