summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-11-12 17:25:33 +0000
committeremaste <emaste@FreeBSD.org>2013-11-12 17:25:33 +0000
commit9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e (patch)
treeb9aa1d1064fb25a0f2313d9a7964c862c0b7b354 /contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
parent4372cfee12af5dfa890561beb0fecc90957ba058 (diff)
parentc727fe695d28799acb499e9961f11ec07d4f9fe2 (diff)
downloadFreeBSD-src-9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e.zip
FreeBSD-src-9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e.tar.gz
Update LLDB to upstream r194122 snapshot
ludes minor changes relative to upstream, for compatibility with FreeBSD's in-tree LLVM 3.3: - Reverted LLDB r191806, restoring use of previous API. - Reverted part of LLDB r189317, restoring previous enum names. - Work around missing LLVM r192504, using previous registerEHFrames API (limited functionality). - Removed PlatformWindows header include and init/terminate calls. Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp55
1 files changed, 9 insertions, 46 deletions
diff --git a/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
index de974d0..01aecee 100644
--- a/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ b/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -54,60 +54,23 @@ BreakpointResolverFileRegex::SearchCallback
assert (m_breakpoint != NULL);
if (!context.target_sp)
return eCallbackReturnContinue;
-
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS));
CompileUnit *cu = context.comp_unit;
FileSpec cu_file_spec = *(static_cast<FileSpec *>(cu));
std::vector<uint32_t> line_matches;
- context.target_sp->GetSourceManager().FindLinesMatchingRegex(cu_file_spec, m_regex, 1, UINT32_MAX, line_matches);
+ context.target_sp->GetSourceManager().FindLinesMatchingRegex(cu_file_spec, m_regex, 1, UINT32_MAX, line_matches);
+
uint32_t num_matches = line_matches.size();
for (uint32_t i = 0; i < num_matches; i++)
{
- uint32_t start_idx = 0;
- bool exact = false;
- while (1)
- {
- LineEntry line_entry;
+ SymbolContextList sc_list;
+ const bool search_inlines = false;
+ const bool exact = false;
- // Cycle through all the line entries that might match this one:
- start_idx = cu->FindLineEntry (start_idx, line_matches[i], NULL, exact, &line_entry);
- if (start_idx == UINT32_MAX)
- break;
- exact = true;
- start_idx++;
-
- Address line_start = line_entry.range.GetBaseAddress();
- if (line_start.IsValid())
- {
- if (filter.AddressPasses(line_start))
- {
- BreakpointLocationSP bp_loc_sp (m_breakpoint->AddLocation(line_start));
- if (log && bp_loc_sp && !m_breakpoint->IsInternal())
- {
- StreamString s;
- bp_loc_sp->GetDescription (&s, lldb::eDescriptionLevelVerbose);
- log->Printf ("Added location: %s\n", s.GetData());
- }
- }
- else if (log)
- {
- log->Printf ("Breakpoint at file address 0x%" PRIx64 " for %s:%d didn't pass filter.\n",
- line_start.GetFileAddress(),
- cu_file_spec.GetFilename().AsCString("<Unknown>"),
- line_matches[i]);
- }
- }
- else
- {
- if (log)
- log->Printf ("error: Unable to set breakpoint at file address 0x%" PRIx64 " for %s:%d\n",
- line_start.GetFileAddress(),
- cu_file_spec.GetFilename().AsCString("<Unknown>"),
- line_matches[i]);
- }
-
- }
+ cu->ResolveSymbolContext (cu_file_spec, line_matches[i], search_inlines, exact, eSymbolContextEverything, sc_list);
+ const bool skip_prologue = true;
+
+ BreakpointResolver::SetSCMatchesByLine (filter, sc_list, skip_prologue, m_regex.GetText());
}
assert (m_breakpoint != NULL);
OpenPOWER on IntegriCloud