[Lldb-commits] [lldb] r155403 - in /lldb/branches/lldb-platform-work: ./ include/lldb/API/SBTarget.h scripts/Python/interface/SBTarget.i source/API/SBTarget.cpp source/Breakpoint/BreakpointResolverFileLine.cpp source/Core/Module.cpp source/Core/SearchFilter.cpp
Johnny Chen
johnny.chen at apple.com
Mon Apr 23 15:52:18 PDT 2012
Author: johnny
Date: Mon Apr 23 17:52:18 2012
New Revision: 155403
URL: http://llvm.org/viewvc/llvm-project?rev=155403&view=rev
Log:
Merge changes from ToT:
svn merge -r 155369:155398 https://johnny@llvm.org/svn/llvm-project/lldb/trunk .
Modified:
lldb/branches/lldb-platform-work/ (props changed)
lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h
lldb/branches/lldb-platform-work/scripts/Python/interface/SBTarget.i
lldb/branches/lldb-platform-work/source/API/SBTarget.cpp
lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverFileLine.cpp
lldb/branches/lldb-platform-work/source/Core/Module.cpp
lldb/branches/lldb-platform-work/source/Core/SearchFilter.cpp
Propchange: lldb/branches/lldb-platform-work/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Apr 23 17:52:18 2012
@@ -1 +1 @@
-/lldb/trunk:154224-155369
+/lldb/trunk:154224-155398
Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h?rev=155403&r1=155402&r2=155403&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBTarget.h Mon Apr 23 17:52:18 2012
@@ -457,6 +457,11 @@
const char *triple,
const char *uuid);
+ lldb::SBModule
+ AddModule (const char *path,
+ const char *triple,
+ const char *uuid_cstr,
+ const char *symfile);
uint32_t
GetNumModules () const;
Modified: lldb/branches/lldb-platform-work/scripts/Python/interface/SBTarget.i
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/scripts/Python/interface/SBTarget.i?rev=155403&r1=155402&r2=155403&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/scripts/Python/interface/SBTarget.i (original)
+++ lldb/branches/lldb-platform-work/scripts/Python/interface/SBTarget.i Mon Apr 23 17:52:18 2012
@@ -481,6 +481,12 @@
const char *triple,
const char *uuid);
+ lldb::SBModule
+ AddModule (const char *path,
+ const char *triple,
+ const char *uuid_cstr,
+ const char *symfile);
+
uint32_t
GetNumModules () const;
Modified: lldb/branches/lldb-platform-work/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/API/SBTarget.cpp?rev=155403&r1=155402&r2=155403&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/API/SBTarget.cpp (original)
+++ lldb/branches/lldb-platform-work/source/API/SBTarget.cpp Mon Apr 23 17:52:18 2012
@@ -1726,6 +1726,15 @@
const char *triple,
const char *uuid_cstr)
{
+ return AddModule (path, triple, uuid_cstr, NULL);
+}
+
+lldb::SBModule
+SBTarget::AddModule (const char *path,
+ const char *triple,
+ const char *uuid_cstr,
+ const char *symfile)
+{
lldb::SBModule sb_module;
TargetSP target_sp(GetSP());
if (target_sp)
@@ -1733,12 +1742,15 @@
ModuleSpec module_spec;
if (path)
module_spec.GetFileSpec().SetFile(path, false);
-
+
if (uuid_cstr)
module_spec.GetUUID().SetfromCString(uuid_cstr);
-
+
if (triple)
module_spec.GetArchitecture().SetTriple (triple, target_sp->GetPlatform ().get());
+
+ if (symfile)
+ module_spec.GetSymbolFileSpec ().SetFile(symfile, false);
sb_module.SetSP(target_sp->GetSharedModule (module_spec));
}
Modified: lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverFileLine.cpp?rev=155403&r1=155402&r2=155403&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverFileLine.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Breakpoint/BreakpointResolverFileLine.cpp Mon Apr 23 17:52:18 2012
@@ -72,8 +72,11 @@
for (uint32_t i = 0; i < num_comp_units; i++)
{
CompUnitSP cu_sp (context.module_sp->GetCompileUnitAtIndex (i));
- if (filter.CompUnitPasses(*(cu_sp.get())))
- cu_sp->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, false, eSymbolContextEverything, sc_list);
+ if (cu_sp)
+ {
+ if (filter.CompUnitPasses(*cu_sp))
+ cu_sp->ResolveSymbolContext (m_file_spec, m_line_number, m_inlines, false, eSymbolContextEverything, sc_list);
+ }
}
while (sc_list.GetSize() > 0)
Modified: lldb/branches/lldb-platform-work/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Core/Module.cpp?rev=155403&r1=155402&r2=155403&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Core/Module.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Core/Module.cpp Mon Apr 23 17:52:18 2012
@@ -535,8 +535,11 @@
for (uint32_t i=0; i<num_compile_units; ++i)
{
sc.comp_unit = GetCompileUnitAtIndex(i).get();
- if (FileSpec::Equal (*sc.comp_unit, path, compare_directory))
- sc_list.Append(sc);
+ if (sc.comp_unit)
+ {
+ if (FileSpec::Equal (*sc.comp_unit, path, compare_directory))
+ sc_list.Append(sc);
+ }
}
return sc_list.GetSize() - start_size;
}
Modified: lldb/branches/lldb-platform-work/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Core/SearchFilter.cpp?rev=155403&r1=155402&r2=155403&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Core/SearchFilter.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Core/SearchFilter.cpp Mon Apr 23 17:52:18 2012
@@ -247,25 +247,27 @@
for (uint32_t i = 0; i < num_comp_units; i++)
{
CompUnitSP cu_sp (module_sp->GetCompileUnitAtIndex (i));
- if (!CompUnitPasses (*(cu_sp.get())))
- continue;
-
- if (searcher.GetDepth () == Searcher::eDepthCompUnit)
+ if (cu_sp)
{
- SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get());
+ if (!CompUnitPasses (*(cu_sp.get())))
+ continue;
- shouldContinue = searcher.SearchCallback (*this, matchingContext, NULL, false);
+ if (searcher.GetDepth () == Searcher::eDepthCompUnit)
+ {
+ SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get());
- if (shouldContinue == Searcher::eCallbackReturnPop)
- return Searcher::eCallbackReturnContinue;
- else if (shouldContinue == Searcher::eCallbackReturnStop)
- return shouldContinue;
- }
- else
- {
- // FIXME Descend to block.
- }
+ shouldContinue = searcher.SearchCallback (*this, matchingContext, NULL, false);
+ if (shouldContinue == Searcher::eCallbackReturnPop)
+ return Searcher::eCallbackReturnContinue;
+ else if (shouldContinue == Searcher::eCallbackReturnStop)
+ return shouldContinue;
+ }
+ else
+ {
+ // FIXME Descend to block.
+ }
+ }
}
}
else
@@ -781,11 +783,14 @@
{
CompUnitSP cu_sp = module_sp->GetCompileUnitAtIndex(cu_idx);
matchingContext.comp_unit = cu_sp.get();
- if (m_cu_spec_list.FindFileIndex(0, static_cast<FileSpec>(matchingContext.comp_unit), false) != UINT32_MAX)
+ if (matchingContext.comp_unit)
{
- shouldContinue = DoCUIteration(module_sp, matchingContext, searcher);
- if (shouldContinue == Searcher::eCallbackReturnStop)
- return;
+ if (m_cu_spec_list.FindFileIndex(0, *matchingContext.comp_unit, false) != UINT32_MAX)
+ {
+ shouldContinue = DoCUIteration(module_sp, matchingContext, searcher);
+ if (shouldContinue == Searcher::eCallbackReturnStop)
+ return;
+ }
}
}
}
More information about the lldb-commits
mailing list