diff options
author | Aidan Dodds <aidan@codeplay.com> | 2016-03-10 17:50:01 +0000 |
---|---|---|
committer | Aidan Dodds <aidan@codeplay.com> | 2016-03-10 17:50:01 +0000 |
commit | 67dc3e1575b633bdc70bed6d278abd0f1ed0d8ce (patch) | |
tree | e200ceac566545e5c421334e7e9fb626397c0947 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | |
parent | 5a3dcf4edf7f22537ce261703f7ac6515742c9f7 (diff) | |
download | bcm5719-llvm-67dc3e1575b633bdc70bed6d278abd0f1ed0d8ce.tar.gz bcm5719-llvm-67dc3e1575b633bdc70bed6d278abd0f1ed0d8ce.zip |
[Renderscript] Add stack argument reading code for Mipsel 3
Fix a problem raised with the previous patches being applied in the wrong order.
Committed on behalf of: Dean De Leo <dean@codeplay.com>
llvm-svn: 263134
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp')
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 1d8ea656f09..654a8acec62 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -141,6 +141,8 @@ GetArgsX86(const GetArgsCtx &ctx, ArgItem *arg_list, size_t num_args) { Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE); + Error error; + // get the current stack pointer uint64_t sp = ctx.reg_ctx->GetSP(); @@ -365,20 +367,18 @@ GetArgsMipsel(GetArgsCtx &ctx, ArgItem *arg_list, size_t num_args) else { 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); + size_t bytes_read = ctx.process->ReadMemory(sp, &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()); + // advance the stack pointer + sp += arg_size; } // fail if we couldn't read this argument if (!success) { if (log) - log->Printf("%s - error reading argument: %" PRIu64, __FUNCTION__, uint64_t(i)); + log->Printf("%s - error reading argument: %" PRIu64", reason: %s", + __FUNCTION__, uint64_t(i), error.AsCString("n/a")); return false; } } |