forked from OSchip/llvm-project
AMDGPU/MC: Allow disassembling without symbol info
Summary: We would like the UMR debugging tool[0] to be able to provide disassembly for currently live waves based on plain memory dumps, and we want to leverage the LLVM disassembler for this. This mostly works, except that UMR clearly can't provide real symbol info, so it wants to set DisInfo == nullptr. [0] https://cgit.freedesktop.org/amd/umr/ Reviewers: arsenm, rampitec, artem.tamazov, dp Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D45477 Change-Id: Ibb2c5af2e66f2e100b4702fd81308e1932bc4ee6 llvm-svn: 329715
This commit is contained in:
parent
38cd74b1c1
commit
b1c3b22b4c
|
@ -882,6 +882,9 @@ bool AMDGPUSymbolizer::tryAddingSymbolicOperand(MCInst &Inst,
|
|||
}
|
||||
|
||||
auto *Symbols = static_cast<SectionSymbolsTy *>(DisInfo);
|
||||
if (!Symbols)
|
||||
return false;
|
||||
|
||||
auto Result = std::find_if(Symbols->begin(), Symbols->end(),
|
||||
[Value](const SymbolInfoTy& Val) {
|
||||
return std::get<0>(Val) == static_cast<uint64_t>(Value)
|
||||
|
|
Loading…
Reference in New Issue