summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2013-04-19 00:50:28 +0000
committerJason Molenda <jmolenda@apple.com>2013-04-19 00:50:28 +0000
commit44edbf1310321f4f7ac8011d085fe7350e15519a (patch)
tree2324ffdc6a11c85f1ba6235f0306e89b55bef8a3 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parent24cf86f83e4dc5433b550579f802b2bb343ac974 (diff)
downloadbcm5719-llvm-44edbf1310321f4f7ac8011d085fe7350e15519a.tar.gz
bcm5719-llvm-44edbf1310321f4f7ac8011d085fe7350e15519a.zip
Remove an unneeded local var, a missing return statement in kernel search code, thanks to Greg Clayton for finding these.
llvm-svn: 179822
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 5367a6ddf92..a05e9e09d01 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -294,21 +294,19 @@ DynamicLoaderDarwinKernel::SearchForKernelNearPC (Process *process)
if (pc == LLDB_INVALID_ADDRESS)
return LLDB_INVALID_ADDRESS;
- addr_t kernel_range_low, kernel_range_high;
+ addr_t kernel_range_low;
if (process->GetTarget().GetArchitecture().GetAddressByteSize() == 8)
{
kernel_range_low = 1ULL << 63;
- kernel_range_high = UINT64_MAX;
}
else
{
kernel_range_low = 1ULL << 31;
- kernel_range_high = UINT32_MAX;
}
// Outside the normal kernel address range, this is probably userland code running right now
if (pc < kernel_range_low)
- LLDB_INVALID_ADDRESS;
+ return LLDB_INVALID_ADDRESS;
// The kernel will load at at one megabyte boundary (0x100000), or at that boundary plus
// an offset of one page (0x1000) or two, depending on the device.
OpenPOWER on IntegriCloud