This adds the DW_OP_entry_value and DW_OP_stack_value opcodes to the DWARF expression printer, needed to display variable locations which refer to the value of an expression at entry to the function.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/tools/llvm-objdump/ARM/debug-vars-entry-value.s | ||
---|---|---|
2 | It would be a lot more efficient to test this in unittests/DebugInfo/dwarf, but just dumping the expression bytes themselves. Otherwise the canonical place to test dwarf dumping facilities is usually llvm-dwarfdump. I'm kind of worried that this test will need to be updated every time someone tunes the output formatting of objdump |
llvm/test/tools/llvm-objdump/ARM/debug-vars-entry-value.s | ||
---|---|---|
2 | +1 to this. The prettyPrint function looks ripe for gtest unit testing. I wouldn't necessarily worry about covering every code path in the first instance, but you could work towards it that way. |
It would be a lot more efficient to test this in unittests/DebugInfo/dwarf, but just dumping the expression bytes themselves. Otherwise the canonical place to test dwarf dumping facilities is usually llvm-dwarfdump.
I'm kind of worried that this test will need to be updated every time someone tunes the output formatting of objdump