This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump] Add frame register opcode to variable display
Needs ReviewPublic

Authored by ostannard on Mar 16 2020, 5:02 AM.

Details

Summary

The DW_OP_fbreg opcode references an expression stored in the DW_AT_frame_base attribute of the function, so we need to pass that through to the expression printer, and build it in the unit test.

Diff Detail

Unit TestsFailed

Event Timeline

ostannard created this revision.Mar 16 2020, 5:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2020, 5:02 AM

I don't think I'm in a good position to review most of this code. I've commented on a few things, but somebody else should do the rest.

llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
9

clang-format the header include list. This is the wrong place for this line.

430

Is it possible to hit this assertion if you are using malformed DWARF?

437

clang-fomat needed on this new code.

llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
59–61

I'm going to guess that this won't work in a non-ARM build of LLVM...

You probably just want to return if this creation fails.

79

uint32_t seems like an odd type for a number of things. I'd expect size_t.