Debugger: Fix oversight.
DebugReportGenerator: - In the case where the function was already disassembled beforehand, we weren't retrieving the statement, leading to a null pointer dereference.
This commit is contained in:
parent
40044981eb
commit
c5dcedecae
@ -701,10 +701,18 @@ DebugReportGenerator::_DumpFunctionDisassembly(BFile& _output,
|
||||
}
|
||||
|
||||
codeReference.SetTo(code, true);
|
||||
statement = code->StatementAtAddress(instructionPointer);
|
||||
} else
|
||||
codeReference.SetTo(code);
|
||||
|
||||
statement = code->StatementAtAddress(instructionPointer);
|
||||
if (statement == NULL) {
|
||||
data.SetToFormat("\t\t\tUnable to retrieve disassembly for IP %#"
|
||||
B_PRIx64 ": address does not map to a valid instruction.\n",
|
||||
instructionPointer);
|
||||
WRITE_AND_CHECK(_output, data);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
SourceLocation location = statement->StartSourceLocation();
|
||||
|
||||
data = "\t\t\tDisassembly:\n";
|
||||
|
Loading…
Reference in New Issue
Block a user