forked from OSchip/llvm-project
[lldb] Fix crash in FormatEntity for mangled-name
Check a `Block` pointer before dereferencing. Using `function.mangled-name` led to a crash for a frame where the symbol context had no block info. In my case, the frame's function was a system frame. Differential Revision: https://reviews.llvm.org/D96307
This commit is contained in:
parent
9202806241
commit
7dc324aafa
|
@ -1769,7 +1769,7 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
|
|||
return false;
|
||||
s.PutCString(name);
|
||||
|
||||
if (sc->block->GetContainingInlinedBlock()) {
|
||||
if (sc->block && sc->block->GetContainingInlinedBlock()) {
|
||||
if (const InlineFunctionInfo *inline_info =
|
||||
sc->block->GetInlinedFunctionInfo()) {
|
||||
s.PutCString(" [inlined] ");
|
||||
|
|
Loading…
Reference in New Issue