Add --move-to-nearest-code / target.move-to-nearest-code options (attempt 2)
This patch initially was committed in r237460 but later it was reverted (r237479) due to 4 new failures:
* TestExitDuringStep.py
* TestNumThreads.py
* TestThreadExit.py
* TestThreadStates.py
This patch also fixes these tests.
llvm-svn: 237566
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
index 046c268..e7bce05 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -29,10 +29,12 @@
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)
{
}
@@ -64,9 +66,8 @@
{
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());
@@ -85,7 +86,7 @@
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
@@ -97,7 +98,7 @@
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;
}