[Lldb-commits] [PATCH] D71372: [lldb] Add additional validation on return address in 'thread step-out'
Ted Woodward via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 8 12:32:36 PST 2020
ted added a comment.
I've got another failure case for this. If the remote gdbserver doesn't implement qMemoryRegionInfo or qXfer:memory-map:read, thread step-out will fail.
error: Could not create return address breakpoint. Return address (0x5bc0) permissions not found.
That comes from this code:
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());
return;
GetLoadAddressPermissions does this:
Status error(GetMemoryRegionInfo(load_addr, range_info));
if (!error.Success())
return false;
and ProcessGDBRemote::GetMemoryRegionInfo will send a qMemoryRegionInfo. If that fails, it will try qXfer::memory-map:read. qMemoryRegionInfo isn't required:
//----------------------------------------------------------------------
// "qMemoryRegionInfo:<addr>"
//
// BRIEF
// Get information about the address range that contains "<addr>"
//
// PRIORITY TO IMPLEMENT
// Medium. This is nice to have, but it isn't necessary.
Many embedded stubs do not implement this, which means thread step-out won't work with them anymore.
How should we fix this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71372/new/
https://reviews.llvm.org/D71372
More information about the lldb-commits
mailing list