Re: [Dwarf-Discuss] Use of Location Description operations in DWARF Expressions?

2020-03-23 Thread Robinson, Paul via Dwarf-Discuss
> -Original Message- > From: Dwarf-Discuss On Behalf > Of Adrian Prantl via Dwarf-Discuss > Sent: Friday, March 20, 2020 1:29 PM > To: Michael Eager > Cc: dwarf-discuss@lists.dwarfstd.org > Subject: Re: [Dwarf-Discuss] Use of Location Description operations in > DWARF Expressions? > >

Re: [Dwarf-Discuss] Use of Location Description operations in DWARF Expressions?

2020-03-23 Thread Michael Eager via Dwarf-Discuss
On 3/23/20 6:28 AM, Robinson, Paul via Dwarf-Discuss wrote: From: Dwarf-Discuss On Behalf Of Adrian Prantl via Dwarf-Discuss On Mar 19, 2020, at 5:49 PM, Michael Eager via Dwarf-Discuss disc...@lists.dwarfstd.org> wrote: My reading of sections 2.5 & 2.6 is that you cannot have a DW_OP_piece

Re: [Dwarf-Discuss] Use of Location Description operations in DWARF Expressions?

2020-03-23 Thread Todd Allen via Dwarf-Discuss
I recall this being intentional as well. This is how I think of these items. And this is just the gist of things. I didn't put on my ABI Lawyer hat for this: A DWARF expression is a stack machine that evaluates to a value. A location description describes the "location" of an object. A "locati

Re: [Dwarf-Discuss] Segment selectors for Harvard architectures

2020-03-23 Thread Todd Allen via Dwarf-Discuss
Paul, I haven't needed to contend with this issue. But as I was looking over the standard, this was my initial gut reaction too: use the segment selectors. This use actually does seem like it's a characteristic of the target architecture to me. You started the discussion with "Harvard architect

Re: [Dwarf-Discuss] Segment selectors for Harvard architectures

2020-03-23 Thread David Blaikie via Dwarf-Discuss
Not to derail this thread, but another thing that might be worth checking is: should debug_aranges include non-code addresses. GCC's don't, Clang's do. Sounds like Clang's correct, but GCC is sort of the defacto standard DWARF producer, so might be worth getting an authoritative statement/clarified

Re: [Dwarf-Discuss] Use of Location Description operations in DWARF Expressions?

2020-03-23 Thread Cary Coutant via Dwarf-Discuss
> I think that the description has become a bit less clear with the > addition of the Implicit Location Descriptions in Section 2.6.1.1.4, > which do compute values, rather than locations. Perhaps these should > have been described in Section 2.5 as parts of a DWARF expression, not > as parts of a

Re: [Dwarf-Discuss] Use of Location Description operations in DWARF Expressions?

2020-03-23 Thread Michael Eager via Dwarf-Discuss
On 3/23/20 3:58 PM, Cary Coutant via Dwarf-Discuss wrote: I think that the description has become a bit less clear with the addition of the Implicit Location Descriptions in Section 2.6.1.1.4, which do compute values, rather than locations. Perhaps these should have been described in Section 2.5

Re: [Dwarf-Discuss] Use of Location Description operations in DWARF Expressions?

2020-03-23 Thread Cary Coutant via Dwarf-Discuss
> DW_OP_implicit_value and DW_OP_stack_value produce values (that is > R-values), not locations. I might be able to read > DW_OP_implicit_pointer as providing a location; I'm not sure. No, they don't produce a value. The expression that precedes them produces a value, and these operators produce