summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanCallFunction.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-07-31 01:32:05 +0000
committerSean Callanan <scallanan@apple.com>2010-07-31 01:32:05 +0000
commit5300d37aa743418298ebb36c5041b71674d9cb8e (patch)
tree6fe029c0dc8f459501c238db76eae7d05a1d83a1 /lldb/source/Target/ThreadPlanCallFunction.cpp
parent0e11955c7a128b61884576500261603f427979b8 (diff)
downloadbcm5719-llvm-5300d37aa743418298ebb36c5041b71674d9cb8e.tar.gz
bcm5719-llvm-5300d37aa743418298ebb36c5041b71674d9cb8e.zip
Added support for rewriting objc_msgSend so we can
call Objective-C methods from expressions. Also added some more logging to the function-calling thread plan so that we can see the registers when a function finishes. Also documented things maybe a bit better. llvm-svn: 109938
Diffstat (limited to 'lldb/source/Target/ThreadPlanCallFunction.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanCallFunction.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp
index 55e9d25133c..7dc304756a1 100644
--- a/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -181,6 +181,25 @@ ThreadPlanCallFunction::ShouldStop (Event *event_ptr)
{
if (PlanExplainsStop())
{
+ Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP);
+
+ if (log)
+ {
+ RegisterContext *reg_ctx = m_thread.GetRegisterContext();
+
+ log->PutCString("Function completed. Register state was:");
+
+ for (uint32_t register_index = 0, num_registers = reg_ctx->GetRegisterCount();
+ register_index < num_registers;
+ ++register_index)
+ {
+ const char *register_name = reg_ctx->GetRegisterName(register_index);
+ uint64_t register_value = reg_ctx->ReadRegisterAsUnsigned(register_index, LLDB_INVALID_ADDRESS);
+
+ log->Printf(" %s = 0x%llx", register_name, register_value);
+ }
+ }
+
m_thread.RestoreSaveFrameZero(m_register_backup);
m_thread.ClearStackFrames();
SetPlanComplete();
OpenPOWER on IntegriCloud