summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-03-07 02:58:47 +0000
committerGreg Clayton <gclayton@apple.com>2013-03-07 02:58:47 +0000
commit1fb7c625d06d7ce49bd179c35c6414388f060d34 (patch)
tree60f197c4e73b87a2d43cbacb848071dd6bc911ed /lldb/scripts/Python/interface
parent923bedf52f96d47906e4972321bccb66242ce31e (diff)
downloadbcm5719-llvm-1fb7c625d06d7ce49bd179c35c6414388f060d34.tar.gz
bcm5719-llvm-1fb7c625d06d7ce49bd179c35c6414388f060d34.zip
Stop the "module" property from throwing an exception when the module name was not found in the target module list.
llvm-svn: 176611
Diffstat (limited to 'lldb/scripts/Python/interface')
-rw-r--r--lldb/scripts/Python/interface/SBTarget.i15
1 files changed, 9 insertions, 6 deletions
diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i
index 4e3161eedf9..8f9ea2ee639 100644
--- a/lldb/scripts/Python/interface/SBTarget.i
+++ b/lldb/scripts/Python/interface/SBTarget.i
@@ -751,12 +751,15 @@ public:
if module.file.fullpath == key:
return module
# See if the string is a UUID
- the_uuid = uuid.UUID(key)
- if the_uuid:
- for idx in range(num_modules):
- module = self.sbtarget.GetModuleAtIndex(idx)
- if module.uuid == the_uuid:
- return module
+ try:
+ the_uuid = uuid.UUID(key)
+ if the_uuid:
+ for idx in range(num_modules):
+ module = self.sbtarget.GetModuleAtIndex(idx)
+ if module.uuid == the_uuid:
+ return module
+ except:
+ return None
elif type(key) is uuid.UUID:
for idx in range(num_modules):
module = self.sbtarget.GetModuleAtIndex(idx)
OpenPOWER on IntegriCloud