aboutsummaryrefslogtreecommitdiff
path: root/source/Symbol
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2013-12-03 18:51:59 +0000
committerEd Maste <emaste@FreeBSD.org>2013-12-03 18:51:59 +0000
commit86758c718870f701bc69c1ca05495305ed1c5b85 (patch)
treeb2051e4e4856cc58ac7e2d20242b870b4f355ca1 /source/Symbol
parentf21a844f60ae6c74fcf1fddca32461acce3c1ee0 (diff)
downloadsrc-86758c718870f701bc69c1ca05495305ed1c5b85.tar.gz
src-86758c718870f701bc69c1ca05495305ed1c5b85.zip
Import lldb as of SVN r196259 (git 3be86e5)vendor/lldb/lldb-r196259
(A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/vendor/lldb/dist/; revision=258882 svn path=/vendor/lldb/lldb-r196259/; revision=258883; tag=vendor/lldb/lldb-r196259
Diffstat (limited to 'source/Symbol')
-rw-r--r--source/Symbol/UnwindPlan.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/Symbol/UnwindPlan.cpp b/source/Symbol/UnwindPlan.cpp
index c089a7bb8db8..19edea4cb234 100644
--- a/source/Symbol/UnwindPlan.cpp
+++ b/source/Symbol/UnwindPlan.cpp
@@ -10,6 +10,7 @@
#include "lldb/Symbol/UnwindPlan.h"
#include "lldb/Core/ConstString.h"
+#include "lldb/Core/Log.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/Thread.h"
@@ -373,6 +374,25 @@ UnwindPlan::SetPlanValidAddressRange (const AddressRange& range)
bool
UnwindPlan::PlanValidAtAddress (Address addr)
{
+ // If this UnwindPlan has no rows, it is an invalid UnwindPlan.
+ if (GetRowCount() == 0)
+ {
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ if (log)
+ log->Printf ("Testing if UnwindPlan is valid at pc 0x%" PRIx64 ": No unwind rows - is invalid.");
+ return false;
+ }
+
+ // If the 0th Row of unwind instructions is missing, or if it doesn't provide
+ // a register to use to find the Canonical Frame Address, this is not a valid UnwindPlan.
+ if (GetRowAtIndex(0).get() == NULL || GetRowAtIndex(0)->GetCFARegister() == LLDB_INVALID_REGNUM)
+ {
+ Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
+ if (log)
+ log->Printf ("Testing if UnwindPlan is valid at pc 0x%" PRIx64 ": No CFA register - is invalid.");
+ return false;
+ }
+
if (!m_plan_valid_address_range.GetBaseAddress().IsValid() || m_plan_valid_address_range.GetByteSize() == 0)
return true;