Author: aidandodds Date: Thu Mar 10 11:37:02 2016 New Revision: 263131 URL: http://llvm.org/viewvc/llvm-project?rev=263131&view=rev Log: [Renderscript] Add stack argument reading code for Mipsel 2
This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <d...@codeplay.com> 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=263131&r1=263130&r2=263131&view=diff ============================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Thu Mar 10 11:37:02 2016 @@ -364,8 +364,15 @@ GetArgsMipsel(GetArgsCtx &ctx, ArgItem * // arguments passed on the stack else { - if (log) - log->Printf("%s - reading arguments spilled to stack not implemented.", __FUNCTION__); + const size_t arg_size = sizeof(uint32_t); + uint64_t sp = ctx.reg_ctx->GetSP(); + uint32_t offset = i * arg_size; + arg.value = 0; + Error error; + size_t bytes_read = ctx.process->ReadMemory(sp + offset, &arg.value, arg_size, error); + success = (error.Success() && bytes_read == arg_size); + if (!success && log) + log->Printf ("RenderScriptRuntime::GetArgSimple - error reading Mips stack: %s.", error.AsCString()); } // fail if we couldn't read this argument if (!success) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits