From 81fc84fa07cee81def3a6190e9b1e175087b9337 Mon Sep 17 00:00:00 2001 From: Luke Drummond Date: Wed, 9 Nov 2016 19:20:39 +0000 Subject: [RenderScript] Fix reduction argument printing When placing function name breakpoints on RenderScript Reduction kernel functions, we were not skipping over the function prologue meaning that inspection of the arguments could be garbled as the function was not finished setting up the stack/registers. In [122fe8f](https://github.com/llvm-mirror/lldb/commit/122fe8f47255ec850155495d10526fccc51f95fb) Aidan added the `SkipPrologue` function that allows us to trivially fix up the kernel's functions' resolved addresses, falling gracefully back to the old behaviour if we don't know how to handle the prologue or can't resolve its size. llvm-svn: 286387 --- .../RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime') diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index d92f10014d1..ff9bf8ac418 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -883,6 +883,10 @@ RSReduceBreakpointResolver::SearchCallback(lldb_private::SearchFilter &filter, auto address = symbol->GetAddress(); if (filter.AddressPasses(address)) { bool new_bp; + if (!SkipPrologue(module, address)) { + if (log) + log->Printf("%s: Error trying to skip prologue", __FUNCTION__); + } m_breakpoint->AddLocation(address, &new_bp); if (log) log->Printf("%s: %s reduction breakpoint on %s in %s", __FUNCTION__, -- cgit v1.2.3