Skip to content

Commit

Permalink
Don't fail step out if remote server doesn't implement qMemoryRegionInfo
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ted Woodward committed Feb 10, 2020
1 parent 45c6c82 commit 6fd818c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lldb/source/Target/ThreadPlanStepOut.cpp
Expand Up @@ -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.",
Expand Down

0 comments on commit 6fd818c

Please sign in to comment.