summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectTarget.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-01-15 02:59:20 +0000
committerGreg Clayton <gclayton@apple.com>2015-01-15 02:59:20 +0000
commit2501e5e2ea0744ae91ca48402101291892a68b73 (patch)
treeb1fff234b945d483b6b4684bc3a79d82d2f2e753 /lldb/source/Commands/CommandObjectTarget.cpp
parent6eece29d8ff88a9c90620a9b026fc8304de6f6ea (diff)
downloadbcm5719-llvm-2501e5e2ea0744ae91ca48402101291892a68b73.tar.gz
bcm5719-llvm-2501e5e2ea0744ae91ca48402101291892a68b73.zip
Modified LLDB to be able to lookup global variables by address.
This is done by adding a "Variable *" to SymbolContext and allowing SymbolFile::ResolveSymbolContext() so if an address is resolved into a symbol context, we can include the global or static variable for that address. This means you can now find global variables that are merged globals when doing a "image lookup --verbose --address 0x1230000". Previously we would resolve a symbol and show "_MergedGlobals123 + 1234". But now we can show the global variable name. The eSymbolContextEverything purposely does not include the new eSymbolContextVariable in its lookup since stack frame code does many lookups and we don't want it triggering the global variable lookups. <rdar://problem/18945678> llvm-svn: 226084
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 0d9ffda1e96..881df7062b0 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -4078,7 +4078,7 @@ public:
if (LookupAddressInModule (m_interpreter,
result.GetOutputStream(),
module,
- eSymbolContextEverything,
+ eSymbolContextEverything | (m_options.m_verbose ? eSymbolContextVariable : 0),
m_options.m_addr,
m_options.m_offset,
m_options.m_verbose))
OpenPOWER on IntegriCloud