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

Robinson, Paul paul.robinson@sony.com
Mon Mar 23 13:28:31 GMT 2020

> -----Original Message-----
> From: Dwarf-Discuss <dwarf-discuss-bounces at lists.dwarfstd.org> On Behalf
> Of Adrian Prantl via Dwarf-Discuss
> Sent: Friday, March 20, 2020 1:29 PM
> To: Michael Eager <eager at eagercon.com>
> Cc: dwarf-discuss at lists.dwarfstd.org
> Subject: Re: [Dwarf-Discuss] Use of Location Description operations in
> DWARF Expressions?
> > On Mar 19, 2020, at 5:49 PM, Michael Eager via Dwarf-Discuss <dwarf-
> discuss at lists.dwarfstd.org> wrote:
> >
> > My reading of sections 2.5 & 2.6 is that you cannot have a DW_OP_piece
> in an DWARF expression.
> >
> I wonder if this is an intentional part of the design because of
> ambiguity/correctness issues or is this just something that happens to
> fall out of the way the text is worded? I can see how such a restriction
> might simplify DWARF consumers, but it also seems like an arbitrary
> restriction for which there may not be a technical reason.

My intuition (clearly I wasn't there at the time) is that this is like
a C expression being an rvalue (DWARF expression) or lvalue (location
description).  Values and locations aren't the same thing.

> That distinction is important, because if there is a *technical* reason
> for not supporting them we should refrain from implementing this in LLVM.
> But if there isn't, there is no harm done in implementing it as an
> extension, and DWARF consumers that don't support it can just ignore these
> expressions and return N/A.
> -- adrian
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org

More information about the Dwarf-discuss mailing list