summaryrefslogtreecommitdiffstats
path: root/lldb/examples/python
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-02-25 19:34:57 +0000
committerGreg Clayton <gclayton@apple.com>2013-02-25 19:34:57 +0000
commit59c40ff3f914b03aa08a4585e6fbdbb04c5d8327 (patch)
treecb9902aba2559c86bf3ad1382d76072e04ab3a80 /lldb/examples/python
parente2ff0ba20d8d5683ba35435ea0d2551b8428c95b (diff)
downloadbcm5719-llvm-59c40ff3f914b03aa08a4585e6fbdbb04c5d8327.tar.gz
bcm5719-llvm-59c40ff3f914b03aa08a4585e6fbdbb04c5d8327.zip
<rdar://problem/13286937>
Make sure to not look in self.images when we have a symbolicator with a live process. llvm-svn: 176040
Diffstat (limited to 'lldb/examples/python')
-rwxr-xr-xlldb/examples/python/symbolication.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/lldb/examples/python/symbolication.py b/lldb/examples/python/symbolication.py
index fd4e500d668..35354991d4b 100755
--- a/lldb/examples/python/symbolication.py
+++ b/lldb/examples/python/symbolication.py
@@ -419,9 +419,19 @@ class Symbolicator:
if not self.target:
self.create_target()
if self.target:
- image = self.find_image_containing_load_addr (load_addr)
- if image:
- image.add_module (self.target)
+ live_process = False
+ process = self.target.process
+ if process:
+ state = process.state
+ if state > lldb.eStateUnloaded and state < eStateDetached:
+ live_process = True
+ # If we don't have a live process, we can attempt to find the image
+ # that a load address belongs to and lazily load its module in the
+ # target, but we shouldn't do any of this if we have a live process
+ if not live_process:
+ image = self.find_image_containing_load_addr (load_addr)
+ if image:
+ image.add_module (self.target)
symbolicated_address = Address(self.target, load_addr)
if symbolicated_address.symbolicate (verbose):
if symbolicated_address.so_addr:
OpenPOWER on IntegriCloud