aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2013-12-03 22:13:33 +0000
committerEd Maste <emaste@FreeBSD.org>2013-12-03 22:13:33 +0000
commitde889deb2c386f2a7831befaf226e5c86685fa53 (patch)
tree44fecbbf159dd7e549aa3a3fb2ca48e10dc3c51e /source
parent86758c718870f701bc69c1ca05495305ed1c5b85 (diff)
downloadsrc-de889deb2c386f2a7831befaf226e5c86685fa53.tar.gz
src-de889deb2c386f2a7831befaf226e5c86685fa53.zip
Import lldb as of SVN r196322 (git 49c127ae)vendor/lldb/lldb-r196322
(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=258895 svn path=/vendor/lldb/lldb-r196322/; revision=258896; tag=vendor/lldb/lldb-r196322
Diffstat (limited to 'source')
-rw-r--r--source/Breakpoint/BreakpointLocationList.cpp13
-rw-r--r--source/Symbol/UnwindPlan.cpp28
2 files changed, 31 insertions, 10 deletions
diff --git a/source/Breakpoint/BreakpointLocationList.cpp b/source/Breakpoint/BreakpointLocationList.cpp
index 0c4c54d2f16c..18147deca3ec 100644
--- a/source/Breakpoint/BreakpointLocationList.cpp
+++ b/source/Breakpoint/BreakpointLocationList.cpp
@@ -86,16 +86,13 @@ Compare (BreakpointLocationSP lhs, lldb::break_id_t val)
BreakpointLocationSP
BreakpointLocationList::FindByID (lldb::break_id_t break_id) const
{
- BreakpointLocationSP bp_loc_sp;
Mutex::Locker locker (m_mutex);
-
- collection::const_iterator begin = m_locations.begin(), end = m_locations.end();
- collection::const_iterator result;
- result = std::lower_bound(begin, end, break_id, Compare);
- if (result == end)
- return bp_loc_sp;
+ collection::const_iterator end = m_locations.end();
+ collection::const_iterator pos = std::lower_bound(m_locations.begin(), end, break_id, Compare);
+ if (pos != end && (*pos)->GetID() == break_id)
+ return *(pos);
else
- return *(result);
+ return BreakpointLocationSP();
}
size_t
diff --git a/source/Symbol/UnwindPlan.cpp b/source/Symbol/UnwindPlan.cpp
index 19edea4cb234..7b361e7d2eb9 100644
--- a/source/Symbol/UnwindPlan.cpp
+++ b/source/Symbol/UnwindPlan.cpp
@@ -379,7 +379,19 @@ UnwindPlan::PlanValidAtAddress (Address addr)
{
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log)
- log->Printf ("Testing if UnwindPlan is valid at pc 0x%" PRIx64 ": No unwind rows - is invalid.");
+ {
+ StreamString s;
+ if (addr.Dump (&s, NULL, Address::DumpStyleSectionNameOffset))
+ {
+ log->Printf ("UnwindPlan is invalid -- no unwind rows for UnwindPlan '%s' at address %s",
+ m_source_name.GetCString(), s.GetData());
+ }
+ else
+ {
+ log->Printf ("UnwindPlan is invalid -- no unwind rows for UnwindPlan '%s'",
+ m_source_name.GetCString());
+ }
+ }
return false;
}
@@ -389,7 +401,19 @@ UnwindPlan::PlanValidAtAddress (Address addr)
{
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_UNWIND));
if (log)
- log->Printf ("Testing if UnwindPlan is valid at pc 0x%" PRIx64 ": No CFA register - is invalid.");
+ {
+ StreamString s;
+ if (addr.Dump (&s, NULL, Address::DumpStyleSectionNameOffset))
+ {
+ log->Printf ("UnwindPlan is invalid -- no CFA register defined in row 0 for UnwindPlan '%s' at address %s",
+ m_source_name.GetCString(), s.GetData());
+ }
+ else
+ {
+ log->Printf ("UnwindPlan is invalid -- no CFA register defined in row 0 for UnwindPlan '%s'",
+ m_source_name.GetCString());
+ }
+ }
return false;
}