summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-03-07 21:03:09 +0000
committerGreg Clayton <gclayton@apple.com>2012-03-07 21:03:09 +0000
commite761213428bb1ad8a8835ac4bf52233ae2121f3c (patch)
tree746b13d7e3e796f69acc994362c23f732a380542 /lldb/source/Commands
parent377f1f2d399171983cc26c13e81bad1699025dde (diff)
downloadbcm5719-llvm-e761213428bb1ad8a8835ac4bf52233ae2121f3c.tar.gz
bcm5719-llvm-e761213428bb1ad8a8835ac4bf52233ae2121f3c.zip
<rdar://problem/10997402>
This fix really needed to happen as a previous fix I had submitted for calculating symbol sizes made many symbols appear to have zero size since the function that was calculating the symbol size was calling another function that would cause the calculation to happen again. This resulted in some symbols having zero size when they shouldn't. This could then cause infinite stack traces and many other side affects. llvm-svn: 152244
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectDisassemble.cpp16
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp6
2 files changed, 12 insertions, 10 deletions
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index c2d8968981c..357ff956a58 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -344,7 +344,10 @@ CommandObjectDisassemble::Execute
}
Symbol *symbol = frame->GetSymbolContext(eSymbolContextSymbol).symbol;
if (symbol)
- range = symbol->GetAddressRangeRef();
+ {
+ range.GetBaseAddress() = symbol->GetAddress();
+ range.SetByteSize(symbol->GetByteSize());
+ }
}
// Did the "m_options.frame_line" find a valid range already? If so
@@ -395,8 +398,8 @@ CommandObjectDisassemble::Execute
SymbolContext sc(frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol));
if (sc.function)
range.GetBaseAddress() = sc.function->GetAddressRange().GetBaseAddress();
- else if (sc.symbol && sc.symbol->GetAddressRangePtr())
- range.GetBaseAddress() = sc.symbol->GetAddressRangePtr()->GetBaseAddress();
+ else if (sc.symbol && sc.symbol->ValueIsAddress())
+ range.GetBaseAddress() = sc.symbol->GetAddress();
else
range.GetBaseAddress() = frame->GetFrameCodeAddress();
}
@@ -437,8 +440,11 @@ CommandObjectDisassemble::Execute
SymbolContext sc(frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol));
if (sc.function)
range = sc.function->GetAddressRange();
- else if (sc.symbol && sc.symbol->GetAddressRangePtr())
- range = *sc.symbol->GetAddressRangePtr();
+ else if (sc.symbol && sc.symbol->ValueIsAddress())
+ {
+ range.GetBaseAddress() = sc.symbol->GetAddress();
+ range.SetByteSize (sc.symbol->GetByteSize());
+ }
else
range.GetBaseAddress() = frame->GetFrameCodeAddress();
}
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 1b74e08c0ca..a6d8262adc1 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -3586,11 +3586,7 @@ public:
//ModuleSP new_module_sp (new Module (target_module_file, target_module_arch));
ModuleSP new_module_sp;
- Error error (ModuleList::GetSharedModule (module_spec,
- new_module_sp,
- &target->GetExecutableSearchPaths(),
- NULL,
- NULL));
+ new_module_sp = target->GetSharedModule (module_spec);
if (new_module_sp)
{
OpenPOWER on IntegriCloud