diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-07-03 16:57:06 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-07-03 16:57:06 +0000 |
commit | 5e95aa85bb660d45e9905ef1d7180b2678280660 (patch) | |
tree | 3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /source/Breakpoint | |
parent | 12bd4897ff0678fa663e09d78ebc22dd255ceb86 (diff) |
Import LLDB as of upstream SVN 241361 (git 612c075f)vendor/lldb/lldb-r241361
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=285101
svn path=/vendor/lldb/lldb-r241361/; revision=285102; tag=vendor/lldb/lldb-r241361
Diffstat (limited to 'source/Breakpoint')
-rw-r--r-- | source/Breakpoint/Breakpoint.cpp | 46 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointLocation.cpp | 8 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointLocationCollection.cpp | 10 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointResolver.cpp | 1 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointResolverAddress.cpp | 2 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointResolverFileLine.cpp | 14 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointResolverFileRegex.cpp | 14 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointSite.cpp | 3 |
8 files changed, 64 insertions, 34 deletions
diff --git a/source/Breakpoint/Breakpoint.cpp b/source/Breakpoint/Breakpoint.cpp index beb0f6bc5a6e..23d484f0f68a 100644 --- a/source/Breakpoint/Breakpoint.cpp +++ b/source/Breakpoint/Breakpoint.cpp @@ -31,7 +31,6 @@ #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadSpec.h" -#include "lldb/lldb-private-log.h" #include "llvm/Support/Casting.h" using namespace lldb; @@ -877,25 +876,18 @@ Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_l { s->Printf ("no locations (pending)."); } - else if (num_locations == 1) + else if (num_locations == 1 && show_locations == false) { - // If there is one location only, we'll just print that location information. But don't do this if - // show locations is true, then that will be handled below. - if (show_locations == false) - { - GetLocationAtIndex(0)->GetDescription(s, level); - } - else - { - s->Printf ("%zd locations.", num_locations); - } + // There is only one location, so we'll just print that location information. + GetLocationAtIndex(0)->GetDescription(s, level); } else { - s->Printf ("%zd locations.", num_locations); + s->Printf ("%" PRIu64 " locations.", static_cast<uint64_t>(num_locations)); } s->EOL(); break; + case lldb::eDescriptionLevelVerbose: // Verbose mode does a debug dump of the breakpoint Dump (s); @@ -957,6 +949,34 @@ Breakpoint::GetFilterDescription (Stream *s) m_filter_sp->GetDescription (s); } +bool +Breakpoint::EvaluatePrecondition (StoppointCallbackContext &context) +{ + if (!m_precondition_sp) + return true; + + return m_precondition_sp->EvaluatePrecondition(context); +} + +bool +Breakpoint::BreakpointPrecondition::EvaluatePrecondition(StoppointCallbackContext &context) +{ + return true; +} + +void +Breakpoint::BreakpointPrecondition::DescribePrecondition(Stream &stream, lldb::DescriptionLevel level) +{ +} + +Error +Breakpoint::BreakpointPrecondition::ConfigurePrecondition(Args &options) +{ + Error error; + error.SetErrorString("Base breakpoint precondition has no options."); + return error; +} + void Breakpoint::SendBreakpointChangedEvent (lldb::BreakpointEventType eventKind) { diff --git a/source/Breakpoint/BreakpointLocation.cpp b/source/Breakpoint/BreakpointLocation.cpp index 85233c9374cb..ef9144778df0 100644 --- a/source/Breakpoint/BreakpointLocation.cpp +++ b/source/Breakpoint/BreakpointLocation.cpp @@ -7,15 +7,12 @@ // //===----------------------------------------------------------------------===// -#include "lldb/lldb-python.h" - // C Includes // C++ Includes #include <string> // Other libraries and framework includes // Project includes -#include "lldb/lldb-private-log.h" #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Breakpoint/BreakpointID.h" #include "lldb/Breakpoint/StoppointCallbackContext.h" @@ -23,6 +20,8 @@ #include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamString.h" +#include "lldb/Core/ValueObject.h" +#include "lldb/Expression/ClangUserExpression.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Target/Target.h" @@ -535,6 +534,7 @@ bool BreakpointLocation::SetBreakpointSite (BreakpointSiteSP& bp_site_sp) { m_bp_site_sp = bp_site_sp; + SendBreakpointLocationChangedEvent (eBreakpointEventTypeLocationsResolved); return true; } @@ -590,7 +590,7 @@ BreakpointLocation::GetDescription (Stream *s, lldb::DescriptionLevel level) s->PutCString ("re-exported target = "); else s->PutCString("where = "); - sc.DumpStopContext (s, m_owner.GetTarget().GetProcessSP().get(), m_address, false, true, false, true); + sc.DumpStopContext (s, m_owner.GetTarget().GetProcessSP().get(), m_address, false, true, false, true, true); } else { diff --git a/source/Breakpoint/BreakpointLocationCollection.cpp b/source/Breakpoint/BreakpointLocationCollection.cpp index 5756ccedfaa4..5b6e746f911d 100644 --- a/source/Breakpoint/BreakpointLocationCollection.cpp +++ b/source/Breakpoint/BreakpointLocationCollection.cpp @@ -138,11 +138,17 @@ bool BreakpointLocationCollection::ShouldStop (StoppointCallbackContext *context) { bool shouldStop = false; - const size_t count = GetSize(); - for (size_t i = 0; i < count; i++) + size_t i = 0; + size_t prev_size = GetSize(); + while (i < prev_size) { + // ShouldStop can remove the breakpoint from the list if (GetByIndex(i)->ShouldStop(context)) shouldStop = true; + + if (prev_size == GetSize()) + i++; + prev_size = GetSize(); } return shouldStop; } diff --git a/source/Breakpoint/BreakpointResolver.cpp b/source/Breakpoint/BreakpointResolver.cpp index 33b0ff40e35f..f02eadf86a7c 100644 --- a/source/Breakpoint/BreakpointResolver.cpp +++ b/source/Breakpoint/BreakpointResolver.cpp @@ -25,7 +25,6 @@ #include "lldb/Target/Target.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" -#include "lldb/lldb-private-log.h" using namespace lldb_private; using namespace lldb; diff --git a/source/Breakpoint/BreakpointResolverAddress.cpp b/source/Breakpoint/BreakpointResolverAddress.cpp index d6647130c54c..193bc413af05 100644 --- a/source/Breakpoint/BreakpointResolverAddress.cpp +++ b/source/Breakpoint/BreakpointResolverAddress.cpp @@ -13,11 +13,11 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/lldb-private-log.h" #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Log.h" #include "lldb/Core/StreamString.h" +#include "lldb/Target/Process.h" #include "lldb/Target/Target.h" using namespace lldb; diff --git a/source/Breakpoint/BreakpointResolverFileLine.cpp b/source/Breakpoint/BreakpointResolverFileLine.cpp index 950054c3d720..408998ec83ab 100644 --- a/source/Breakpoint/BreakpointResolverFileLine.cpp +++ b/source/Breakpoint/BreakpointResolverFileLine.cpp @@ -19,7 +19,6 @@ #include "lldb/Core/StreamString.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" -#include "lldb/lldb-private-log.h" using namespace lldb; using namespace lldb_private; @@ -33,13 +32,15 @@ BreakpointResolverFileLine::BreakpointResolverFileLine const FileSpec &file_spec, uint32_t line_no, bool check_inlines, - bool skip_prologue + bool skip_prologue, + bool exact_match ) : BreakpointResolver (bkpt, BreakpointResolver::FileLineResolver), m_file_spec (file_spec), m_line_number (line_no), m_inlines (check_inlines), - m_skip_prologue(skip_prologue) + m_skip_prologue(skip_prologue), + m_exact_match(exact_match) { } @@ -79,7 +80,7 @@ BreakpointResolverFileLine::SearchCallback if (cu_sp) { if (filter.CompUnitPasses(*cu_sp)) - cu_sp->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, false, eSymbolContextEverything, sc_list); + cu_sp->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, m_exact_match, eSymbolContextEverything, sc_list); } } StreamString s; @@ -101,7 +102,7 @@ BreakpointResolverFileLine::GetDepth() void BreakpointResolverFileLine::GetDescription (Stream *s) { - s->Printf ("file = '%s', line = %u", m_file_spec.GetPath().c_str(), m_line_number); + s->Printf ("file = '%s', line = %u, exact_match = %d", m_file_spec.GetPath().c_str(), m_line_number, m_exact_match); } void @@ -117,7 +118,8 @@ BreakpointResolverFileLine::CopyForBreakpoint (Breakpoint &breakpoint) m_file_spec, m_line_number, m_inlines, - m_skip_prologue)); + m_skip_prologue, + m_exact_match)); return ret_sp; } diff --git a/source/Breakpoint/BreakpointResolverFileRegex.cpp b/source/Breakpoint/BreakpointResolverFileRegex.cpp index c71d9bf5ba8c..e7bce0524c57 100644 --- a/source/Breakpoint/BreakpointResolverFileRegex.cpp +++ b/source/Breakpoint/BreakpointResolverFileRegex.cpp @@ -19,7 +19,6 @@ #include "lldb/Core/StreamString.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Target/Target.h" -#include "lldb/lldb-private-log.h" using namespace lldb; using namespace lldb_private; @@ -30,10 +29,12 @@ using namespace lldb_private; BreakpointResolverFileRegex::BreakpointResolverFileRegex ( Breakpoint *bkpt, - RegularExpression ®ex + RegularExpression ®ex, + bool exact_match ) : BreakpointResolver (bkpt, BreakpointResolver::FileLineResolver), - m_regex (regex) + m_regex (regex), + m_exact_match (exact_match) { } @@ -65,9 +66,8 @@ BreakpointResolverFileRegex::SearchCallback { SymbolContextList sc_list; const bool search_inlines = false; - const bool exact = false; - cu->ResolveSymbolContext (cu_file_spec, line_matches[i], search_inlines, exact, eSymbolContextEverything, sc_list); + cu->ResolveSymbolContext (cu_file_spec, line_matches[i], search_inlines, m_exact_match, eSymbolContextEverything, sc_list); const bool skip_prologue = true; BreakpointResolver::SetSCMatchesByLine (filter, sc_list, skip_prologue, m_regex.GetText()); @@ -86,7 +86,7 @@ BreakpointResolverFileRegex::GetDepth() void BreakpointResolverFileRegex::GetDescription (Stream *s) { - s->Printf ("source regex = \"%s\"", m_regex.GetText()); + s->Printf ("source regex = \"%s\", exact_match = %d", m_regex.GetText(), m_exact_match); } void @@ -98,7 +98,7 @@ BreakpointResolverFileRegex::Dump (Stream *s) const lldb::BreakpointResolverSP BreakpointResolverFileRegex::CopyForBreakpoint (Breakpoint &breakpoint) { - lldb::BreakpointResolverSP ret_sp(new BreakpointResolverFileRegex(&breakpoint, m_regex)); + lldb::BreakpointResolverSP ret_sp(new BreakpointResolverFileRegex(&breakpoint, m_regex, m_exact_match)); return ret_sp; } diff --git a/source/Breakpoint/BreakpointSite.cpp b/source/Breakpoint/BreakpointSite.cpp index 469514b03f8a..e9ce812e7732 100644 --- a/source/Breakpoint/BreakpointSite.cpp +++ b/source/Breakpoint/BreakpointSite.cpp @@ -11,11 +11,14 @@ // C Includes // C++ Includes +#include <inttypes.h> + // Other libraries and framework includes // Project includes #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Breakpoint/BreakpointSiteList.h" +#include "lldb/Core/Stream.h" using namespace lldb; using namespace lldb_private; |