diff options
author | Jason Molenda <jmolenda@apple.com> | 2013-03-01 00:06:37 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2013-03-01 00:06:37 +0000 |
commit | 732238cdd703af23bb3008215d5ca2dab1072afe (patch) | |
tree | 04b3a76dd834f770649b1dd28dfb692c9c745e90 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | |
parent | 3e00c5015fa87d8ed4176cbc6c5b770c6e3a5024 (diff) | |
download | bcm5719-llvm-732238cdd703af23bb3008215d5ca2dab1072afe.tar.gz bcm5719-llvm-732238cdd703af23bb3008215d5ca2dab1072afe.zip |
Report the kernel slide when attaching to a darwin kernel debug session.
llvm-svn: 176311
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 9f7b1347412..afa81cb66d8 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -918,6 +918,15 @@ DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule (Process *p Stream *s = &target.GetDebugger().GetOutputStream(); if (s) { + ObjectFile *kernel_object_file = m_module_sp->GetObjectFile(); + if (kernel_object_file) + { + addr_t file_address = kernel_object_file->GetHeaderAddress().GetFileAddress(); + if (m_load_address != LLDB_INVALID_ADDRESS && file_address != LLDB_INVALID_ADDRESS) + { + s->Printf ("Kernel slid 0x%llx in memory.\n", m_load_address - file_address); + } + } if (m_module_sp->GetFileSpec().GetDirectory().IsEmpty()) { s->Printf ("Loaded kernel file %s\n", m_module_sp->GetFileSpec().GetFilename().AsCString()); |