[Lldb-commits] [lldb] r286387 - [RenderScript] Fix reduction argument printing

Luke Drummond via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 9 11:20:40 PST 2016


Author: ldrumm
Date: Wed Nov  9 13:20:39 2016
New Revision: 286387

URL: http://llvm.org/viewvc/llvm-project?rev=286387&view=rev
Log:
[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.


Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=286387&r1=286386&r2=286387&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Wed Nov  9 13:20:39 2016
@@ -883,6 +883,10 @@ RSReduceBreakpointResolver::SearchCallba
         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__,




More information about the lldb-commits mailing list