summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorEwan Crawford <ewan@codeplay.com>2015-07-14 10:56:58 +0000
committerEwan Crawford <ewan@codeplay.com>2015-07-14 10:56:58 +0000
commit90ff791141aad9165042d3b47115aab4cba0c462 (patch)
tree018b313653746e8b5cb835517805355169a08dc8 /lldb/source/Target/Process.cpp
parent469609a7145ff88486dfb6245f89fe70bcb2f1ac (diff)
downloadbcm5719-llvm-90ff791141aad9165042d3b47115aab4cba0c462.tar.gz
bcm5719-llvm-90ff791141aad9165042d3b47115aab4cba0c462.zip
Expression evaluation, a new ThreadPlanCallFunctionUsingABI for executing a function call on target via register manipulation
For Hexagon we want to be able to call functions during debugging, however currently lldb only supports this when there is JIT support. Although emulation using IR interpretation is an alternative, it is currently limited in that it can't make function calls. In this patch we have extended the IR interpreter so that it can execute a function call on the target using register manipulation. To do this we need to handle the Call IR instruction, passing arguments to a new thread plan and collecting any return values to pass back into the IR interpreter. The new thread plan is needed to call an alternative ABI interface of "ABI::PerpareTrivialCall()", allowing more detailed information about arguments and return values. Reviewers: jingham, spyffe Subscribers: emaste, lldb-commits, ted, ADodds, deepak2427 Differential Revision: http://reviews.llvm.org/D9404 llvm-svn: 242137
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 81ed8b540bd..3abae4fce5b 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -754,6 +754,7 @@ Process::Process(Target &target, Listener &listener, const UnixSignalsSP &unix_s
m_force_next_event_delivery (false),
m_last_broadcast_state (eStateInvalid),
m_destroy_in_process (false),
+ m_can_interpret_function_calls(false),
m_can_jit(eCanJITDontKnow)
{
CheckInWithManager ();
@@ -3011,6 +3012,13 @@ Process::SetCanJIT (bool can_jit)
m_can_jit = (can_jit ? eCanJITYes : eCanJITNo);
}
+void
+Process::SetCanRunCode (bool can_run_code)
+{
+ SetCanJIT(can_run_code);
+ m_can_interpret_function_calls = can_run_code;
+}
+
Error
Process::DeallocateMemory (addr_t ptr)
{
OpenPOWER on IntegriCloud