[PATCH] D70720: [llvm-objdump] Display locations of variables alongside disassembly
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 00:15:41 PST 2019
djtodoro added inline comments.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:609
+ } else if (Opcode >= dwarf::DW_OP_reg0 && Opcode <= dwarf::DW_OP_reg31) {
+ int DwarfRegNum = Opcode - dwarf::DW_OP_reg0;
+ int LLVMRegNum = *MRI->getLLVMRegNum(DwarfRegNum, false);
----------------
I guess the register variables could be declared outside of the statement.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:655
+ Opcode == dwarf::DW_OP_const8s) {
+ // Signed constant
+ int64_t Val = Op.getRawOperand(0);
----------------
Missing ".".
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:664
+ Opcode == dwarf::DW_OP_const8u) {
+ // Unsigned constant
+ uint64_t Val = Op.getRawOperand(0);
----------------
Missing ".".
Please use clang-format.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:724
+ Opcode == dwarf::DW_OP_xor) {
+ // Binary operations
+ unsigned Precedence;
----------------
Missing "`.`"
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:751
+ } else if (Opcode == dwarf::DW_OP_regval_type) {
+ // Register contents with type (we ignore the type for now)
+ int LLVMRegNum = *MRI->getLLVMRegNum(Op.getRawOperand(0), false);
----------------
The same as above.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:886
+ // If the LocExpr does not have an associated range, it is valid for
+ // the whole of the function. TODO technically it is not valid for
+ // any range covered by another LocExpr, does that happen in reality?
----------------
`TODO:`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70720/new/
https://reviews.llvm.org/D70720
More information about the llvm-commits
mailing list