summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-01-03 22:06:25 +0000
committerJason Molenda <jmolenda@apple.com>2014-01-03 22:06:25 +0000
commit4b7924775044884c3669591890348b5f623f984d (patch)
treebc1fce4350aaf471ca0a011900c9a371cdf799e0 /lldb/source/Plugins/Process/Utility
parent81e5cd9e732f8052e13e08d3a199b18f0c29ed1a (diff)
downloadbcm5719-llvm-4b7924775044884c3669591890348b5f623f984d.tar.gz
bcm5719-llvm-4b7924775044884c3669591890348b5f623f984d.zip
Don't enforce ABI stack alignment rules on the sigtramp frame --
its stack frame is a constructed, fake thing that may not conform correctly to these rules. This fixes a problem where lldb couldn't backtrace past an asynchronous signal handler (_sigtramp) frame on a stack on Mac OS X. <rdar://problem/15035673> llvm-svn: 198450
Diffstat (limited to 'lldb/source/Plugins/Process/Utility')
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp6
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h3
-rw-r--r--lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp14
3 files changed, 19 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index b258f7fede4..f5f499fd01a 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -949,6 +949,12 @@ RegisterContextLLDB::IsValid () const
return m_frame_type != eNotAValidFrame;
}
+bool
+RegisterContextLLDB::IsSigtrampFrame () const
+{
+ return m_frame_type == eSigtrampFrame;
+}
+
// A skip frame is a bogus frame on the stack -- but one where we're likely to find a real frame farther
// up the stack if we keep looking. It's always the second frame in an unwind (i.e. the first frame after
// frame zero) where unwinding can be the trickiest. Ideally we'll mark up this frame in some way so the
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
index dc6d8c61fa4..368cd656edb 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
@@ -73,6 +73,9 @@ public:
IsValid () const;
bool
+ IsSigtrampFrame () const;
+
+ bool
GetCFA (lldb::addr_t& cfa);
bool
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
index 203d4c1f658..ddded5ac224 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
@@ -171,12 +171,18 @@ UnwindLLDB::AddOneMoreFrame (ABI *abi)
}
if (abi && !abi->CallFrameAddressIsValid(cursor_sp->cfa))
{
- if (log)
+ // On Mac OS X, the _sigtramp asynchronous signal trampoline frame may not have
+ // its (constructed) CFA aligned correctly -- don't do the abi alignment check for
+ // these.
+ if (reg_ctx_sp->IsSigtrampFrame() == false)
{
- log->Printf("%*sFrame %d did not get a valid CFA for this frame, stopping stack walk",
- cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+ if (log)
+ {
+ log->Printf("%*sFrame %d did not get a valid CFA for this frame, stopping stack walk",
+ cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+ }
+ goto unwind_done;
}
- goto unwind_done;
}
if (!reg_ctx_sp->ReadPC (cursor_sp->start_pc))
{
OpenPOWER on IntegriCloud