diff options
| author | Sean Callanan <scallanan@apple.com> | 2010-11-08 03:49:50 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2010-11-08 03:49:50 +0000 |
| commit | ece96492648552c5ed55ceaf896fa89ad84d99d5 (patch) | |
| tree | fe1708b062d936d3309dc996ea9524af9b83b6cd /lldb/source/Target/ThreadPlanCallFunction.cpp | |
| parent | e81f58e1801176942d2d47b1b7027c4dfb7d9d1b (diff) | |
| download | bcm5719-llvm-ece96492648552c5ed55ceaf896fa89ad84d99d5.tar.gz bcm5719-llvm-ece96492648552c5ed55ceaf896fa89ad84d99d5.zip | |
Added more logging so we see the register state
when a function starts and ends, and also the
disassembly for anything that is a client of
ClangExpressionParser after it has been JIT
compiled.
llvm-svn: 118401
Diffstat (limited to 'lldb/source/Target/ThreadPlanCallFunction.cpp')
| -rw-r--r-- | lldb/source/Target/ThreadPlanCallFunction.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp index 8db2d2b82d2..95a7d0d8047 100644 --- a/lldb/source/Target/ThreadPlanCallFunction.cpp +++ b/lldb/source/Target/ThreadPlanCallFunction.cpp @@ -89,6 +89,25 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread, this_arg)) return; + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); + + if (log) + { + RegisterContext *reg_ctx = m_thread.GetRegisterContext(); + + log->PutCString("Function call was set up. 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_valid = true; } @@ -145,6 +164,25 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread, *m_args)) return; + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); + + if (log) + { + RegisterContext *reg_ctx = m_thread.GetRegisterContext(); + + log->PutCString("Function call was set up. 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_valid = true; } |

