Don't fail step out if remote server doesn't implement qMemoryRegionInfo

Summary:
The return address validation in D71372 will fail if the memory permissions can't be determined. Many embedded stubs either don't implement the qMemoryRegionInfo packet, or don't have memory permissions at all.

Remove the return from the if clause that calls GetLoadAddressPermissions, so this call failing doesn't cause the step out to abort. Instead, assume that the memory permission check doesn't apply to this type of target.

Reviewers: labath, jingham, clayborg, mossberg

Reviewed By: labath, jingham

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D72513
This commit is contained in:
Ted Woodward
2020-02-10 13:40:17 -06:00
parent 45c6c82e90
commit 6fd818c5a9

View File

@@ -130,11 +130,9 @@ ThreadPlanStepOut::ThreadPlanStepOut(
uint32_t permissions = 0;
if (!m_thread.GetProcess()->GetLoadAddressPermissions(m_return_addr,
permissions)) {
m_constructor_errors.Printf("Return address (0x%" PRIx64
") permissions not found.",
m_return_addr);
LLDB_LOGF(log, "ThreadPlanStepOut(%p): %s", static_cast<void *>(this),
m_constructor_errors.GetData());
LLDB_LOGF(log, "ThreadPlanStepOut(%p): Return address (0x%" PRIx64
") permissions not found.", static_cast<void *>(this),
m_return_addr);
} else if (!(permissions & ePermissionsExecutable)) {
m_constructor_errors.Printf("Return address (0x%" PRIx64
") did not point to executable memory.",