Add names to RenderScript kernel breakpoints.

Use Breakpoint::AddName to mark all RenderScript kernel breakpoints with the name 'RenderScriptKernel'.
Also update logging channels to include LIBLLDB_LOG_BREAKPOINT where appropriate. 

llvm-svn: 247782
This commit is contained in:
Ewan Crawford
2015-09-16 10:02:57 +00:00
parent e375d8058a
commit 54782db7bc

View File

@@ -838,7 +838,7 @@ RenderScriptRuntime::BreakOnModuleKernels(const RSModuleDescriptorSP rsmodule_sp
void
RenderScriptRuntime::SetBreakAllKernels(bool do_break, TargetSP target)
{
Log* log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
Log* log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE | LIBLLDB_LOG_BREAKPOINTS));
InitSearchFilter(target);
@@ -868,7 +868,7 @@ RenderScriptRuntime::SetBreakAllKernels(bool do_break, TargetSP target)
BreakpointSP
RenderScriptRuntime::CreateKernelBreakpoint(const ConstString& name)
{
Log* log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
Log* log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE | LIBLLDB_LOG_BREAKPOINTS));
if (!m_filtersp)
{
@@ -880,6 +880,11 @@ RenderScriptRuntime::CreateKernelBreakpoint(const ConstString& name)
BreakpointResolverSP resolver_sp(new RSBreakpointResolver(nullptr, name));
BreakpointSP bp = GetProcess()->GetTarget().CreateBreakpoint(m_filtersp, resolver_sp, false, false, false);
// Give RS breakpoints a specific name, so the user can manipulate them as a group.
Error err;
if (!bp->AddName("RenderScriptKernel", err) && log)
log->Printf("RenderScriptRuntime::CreateKernelBreakpoint: Error setting break name, %s", err.AsCString());
return bp;
}