Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-24 Thread Frank Ch. Eigler via Dwarf-Discuss
Hi - > With split lifetimes, the debugger can ask the user which of the > lifetimes the user wants to set. [...] ...based on looking at the > 'assign' location list. Yup, those are reasonable user-interface ideas. (I'm not sure we'd require a whole separate location list, versus tagging the

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-21 Thread Michael Eager via Dwarf-Discuss
On 1/21/20 3:17 PM, Greg Clayton via Dwarf-Discuss wrote: On Jan 21, 2020, at 2:58 PM, Frank Ch. Eigler via Dwarf-Discuss wrote: Hi - While dwarfdump has 'check the DWARF' options available the location list overlap test is not done at all. The -kl option suggests it does loclist

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-21 Thread Greg Clayton via Dwarf-Discuss
> On Jan 21, 2020, at 2:58 PM, Frank Ch. Eigler via Dwarf-Discuss > wrote: > > Hi - > >> While dwarfdump has 'check the DWARF' options available the >> location list overlap test is not done at all. The -kl option suggests >> it does loclist checking, but its checking is rather superficial.

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-21 Thread Frank Ch. Eigler via Dwarf-Discuss
Hi - > While dwarfdump has 'check the DWARF' options available the > location list overlap test is not done at all. The -kl option suggests > it does loclist checking, but its checking is rather superficial. Note that one should not present these overlaps as -errors- (because they may be

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-21 Thread David Anderson via Dwarf-Discuss
On 1/21/20 11:18 AM, Greg Clayton via Dwarf-Discuss wrote: [...] Presumably, a debugger could check that location lists do not overlap. This could nevertheless be a valid heuristic to detect the case. the "llvm-dwarfdump" binary in llvm.org  has a "--verify" option that

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-21 Thread Greg Clayton via Dwarf-Discuss
> On Jan 20, 2020, at 6:21 PM, Frank Ch. Eigler via Dwarf-Discuss > wrote: > > Hi - > >>> - ... and undoubtedly other complications exist! >> >> Interesting question. > > Thanks! > > We have been thinking in similar directions generally as y'all. > > >> Complication 2: The compiler

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-21 Thread Adrian Prantl via Dwarf-Discuss
> On Jan 20, 2020, at 2:20 PM, Frank Ch. Eigler via Dwarf-Discuss > wrote: > > Hi - > > I have a question about variable location lists, but not their > encoding, the use they are suitable for. The basic debugging scenario > is just reading variable values, for which this is fine,

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-20 Thread Michael Eager via Dwarf-Discuss
On 1/20/20 6:21 PM, Frank Ch. Eigler via Dwarf-Discuss wrote: Complication 2: The compiler reuses variable locations at the same PC. This seems to be a compiler bug. (Actually, this could be a valid optimization, e.g.: int a = expression; int b = expression; >

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-20 Thread Frank Ch. Eigler via Dwarf-Discuss
Hi - > > - ... and undoubtedly other complications exist! > > Interesting question. Thanks! We have been thinking in similar directions generally as y'all. > Complication 2: The compiler reuses variable locations at the same PC. This > seems to be a compiler bug. (Actually, this could be

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-20 Thread Michael Eager via Dwarf-Discuss
On 1/20/20 2:20 PM, Frank Ch. Eigler via Dwarf-Discuss wrote: Hi - I have a question about variable location lists, but not their encoding, the use they are suitable for. The basic debugging scenario is just reading variable values, for which this is fine, especially when high-quality

Re: [Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-20 Thread Cary Coutant via Dwarf-Discuss
> A debugger cannot currently be told that any particular variable > location expression is safe to use as an lvalue, something roughly > "exclusive, exhaustive, -O0-equivalent". I believe most debuggers > don't even handle the multiple-locations case for writes at all. I > don't know why -

[Dwarf-Discuss] variable locations - safe use as lvalues

2020-01-20 Thread Frank Ch. Eigler via Dwarf-Discuss
Hi - I have a question about variable location lists, but not their encoding, the use they are suitable for. The basic debugging scenario is just reading variable values, for which this is fine, especially when high-quality compilers emit exquisitely detailed data for their optimized code. But