aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2025-01-23 13:04:36 +0100
committerGitHub <noreply@github.com>2025-01-23 13:04:36 +0100
commit0236cb689550ed2dac406443c652efb723cb2602 (patch)
treee29456c90248482a8ca0c400364a8377bb3b9db7 /lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
parent3ea2b546a8d17014d3ecf05356ecfaadf26ed846 (diff)
downloadllvm-0236cb689550ed2dac406443c652efb723cb2602.zip
llvm-0236cb689550ed2dac406443c652efb723cb2602.tar.gz
llvm-0236cb689550ed2dac406443c652efb723cb2602.tar.bz2
[lldb] Enable "frame diagnose" on linux (#123217)
.. by changing the signal stop reason format :facepalm: The reason this did not work is because the code in `StopInfo::GetCrashingDereference` was looking for the string "address=" to extract the address of the crash. Macos stop reason strings have the form ``` EXC_BAD_ACCESS (code=1, address=0xdead) ``` while on linux they look like: ``` signal SIGSEGV: address not mapped to object (fault address: 0xdead) ``` Extracting the address from a string sounds like a bad idea, but I suppose there's some value in using a consistent format across platforms, so this patch changes the signal format to use the equals sign as well. All of the diagnose tests pass except one, which appears to fail due to something similar #115453 (disassembler reports unrelocated call targets). I've left the tests disabled on windows, as the stop reason reporting code works very differently there, and I suspect it won't work out of the box. If I'm wrong -- the XFAIL will let us know.
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
index de047ee..a6d6a78 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -326,14 +326,14 @@ void NativeThreadLinux::AnnotateSyncTagCheckFault(lldb::addr_t fault_addr) {
}
// We assume that the stop description is currently:
- // signal SIGSEGV: sync tag check fault (fault address: <addr>)
+ // signal SIGSEGV: sync tag check fault (fault address=<addr>)
// Remove the closing )
m_stop_description.pop_back();
std::stringstream ss;
std::unique_ptr<MemoryTagManager> manager(std::move(details->manager));
- ss << " logical tag: 0x" << std::hex << manager->GetLogicalTag(fault_addr);
+ ss << " logical tag=0x" << std::hex << manager->GetLogicalTag(fault_addr);
std::vector<uint8_t> allocation_tag_data;
// The fault address may not be granule aligned. ReadMemoryTags will granule
@@ -347,7 +347,7 @@ void NativeThreadLinux::AnnotateSyncTagCheckFault(lldb::addr_t fault_addr) {
llvm::Expected<std::vector<lldb::addr_t>> allocation_tag =
manager->UnpackTagsData(allocation_tag_data, 1);
if (allocation_tag) {
- ss << " allocation tag: 0x" << std::hex << allocation_tag->front() << ")";
+ ss << " allocation tag=0x" << std::hex << allocation_tag->front() << ")";
} else {
llvm::consumeError(allocation_tag.takeError());
ss << ")";