djtodoro added inline comments.

================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h:149
+    EntryValue = 1 << 0,
+    IndirectEntryValue = 1 << 1,
+    CallSiteParamValue = 1 << 2
----------------
vsk wrote:
> aprantl wrote:
> > Would it make more sense call this `Indirect` (w/o EntryValue) and treat it 
> > as a separate bit, so you can still test for EntryValue independently?
> Yes, that does seem better. It's more extensible this way, and anyway, most 
> of the logic for treating direct/indirect entry values should be the same.
mot -> not


================
Comment at: llvm/test/DebugInfo/MIR/AArch64/dbgcall-site-indirect-param.mir:18
+# CHECK-NEXT: [0x0000000000000000, 0x0000000000000010): DW_OP_breg0 W0+0
+# CHECK-NEXT: [0x0000000000000010, 0x000000000000001c): 
DW_OP_entry_value(DW_OP_reg0 W0))
+# CHECK-NEXT: DW_AT_name    ("f")
----------------
vsk wrote:
> djtodoro wrote:
> > I know that the final effect is the same, but should this be 
> > `DW_OP_entry_value 2 DW_OP_bregN 0` instead of `DW_OP_entry_value 1 
> > DW_OP_regN`?
> I'm not sure, the DW_OP_regN description is simply the one that has already 
> been wired up. Is there a reason to prefer 'DW_OP_bregN 0'?
I was thinking about a more complex entry values where the offset is other than 
`0`, where by using this way of representation we'll have more complex 
expression for the same thing.
If we have expressions as:

1) `DW_OP_entry_value 3 DW_OP_bregN M DW_OP_deref DW_OP_stack_value`

2) `DW_OP_entry_value 6 DW_OP_entry_value 1 DW_OP_regN DW_OP_plus_uconst M 
DW_OP_deref DW_OP_stack_value`

The two expressions have the same effect. They push the value memory location 
pointed to by value of  register `N` upon entering current subprogram plus `M` 
had upon entering of the current subprogram.

This may not be worth of considering now, but we can put a TODO marker in 
`DwarfExpression`.

(Sorry If I am asking to much) One quick question:

Should the `DW_OP_entry_value(DW_OP_reg0 W0))` be an entry value expression 
with `dw_op_deref` + `dw_op_stack_val`?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80345/new/

https://reviews.llvm.org/D80345



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to