[PATCH] D37123: [dwarfdump] Pretty print location expressions and location lists

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 14:21:49 PDT 2017


rnk added a comment.

In https://reviews.llvm.org/D37123#854976, @dblaikie wrote:

> >> 2. Should we try to avoid one-time dynamic initialization for the DW_OP description table
> > 
> > Would it perhaps make sense to initialize the table from the macros in `Dwarf.def`?
>
> +1, worth considering.
>
> >> 3. Should we remove the "OP_" prefix
> > 
> > I think we should implement two behaviors: When DumpOptions::Brief is set, we should print expressions with DW_OP_ stripped and registers in human-readable form, e.g.: `rdi+42, deref, stack-value`, otherwise it should print the full expression, e.g.: `DW_OP_breg1, DW_OP_constu 42, DW_OP_deref, DW_OP_stack_value`.
>
> Sounds good & consistent to me!
>
> > (And at some point soon, I'll upload a patch to make brief the default instead of verbose).
>
> Excellent
>
> With all that in mind - Signing off on this contingent on removing teh drop(3) (so printing DW_OP_* rather than OP_*). Considering all the other stuff for consideration before or shortly after this is committed, as you see fit, Reid.


Got it. It's easy to go from OP_ to DW_OP_, but a lot harder to go from no prefix to DW_OP_ prefix...


https://reviews.llvm.org/D37123





More information about the llvm-commits mailing list