diff options
author | Jason Molenda <jmolenda@apple.com> | 2012-10-06 01:46:12 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2012-10-06 01:46:12 +0000 |
commit | cc62f28735768c09b0c5effea183d0d7c9be6a4f (patch) | |
tree | c64f9fffb31b45ff978bf1d616f816418d5a52dd /lldb/scripts/Python/python-extensions.swig | |
parent | adb5354c2cc4737b6e66c1b7076eba7f3d31543b (diff) | |
download | bcm5719-llvm-cc62f28735768c09b0c5effea183d0d7c9be6a4f.tar.gz bcm5719-llvm-cc62f28735768c09b0c5effea183d0d7c9be6a4f.zip |
Revert Vishal's patch that Enrico commited, at least for the weekend. With it applied,
starting lldb I get
% ./lldb -x
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/build/Debug/LLDB.framework/Versions/A/Resources/Python/lldb/__init__.py", line 9008
raise TypeError("No array item of type %s" % str(type(key)))
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
(lldb)
I did a clean build and still got the problem so I'm backing this out until Enrico can
look at it.
llvm-svn: 165356
Diffstat (limited to 'lldb/scripts/Python/python-extensions.swig')
-rw-r--r-- | lldb/scripts/Python/python-extensions.swig | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig index aa45ceeb178..f9e5a130dbd 100644 --- a/lldb/scripts/Python/python-extensions.swig +++ b/lldb/scripts/Python/python-extensions.swig @@ -539,15 +539,13 @@ class value(object): # Allow array access if this value has children... if type(key) is int: return value(self.sbvalue.GetValueForExpressionPath("[%i]" % key)) - if type(key) is value: - return value(self.sbvalue.GetValueForExpressionPath("[%i]" % int(key)) - raise TypeError("No array item of type %s" % str(type(key))) + raise TypeError def __getattr__(self, name): child_sbvalue = self.sbvalue.GetChildMemberWithName (name) if child_sbvalue: return value(child_sbvalue) - raise AttributeError("Attribute '%s' is not defined" % name) + raise AttributeError def __add__(self, other): return int(self) + int(other) @@ -692,22 +690,15 @@ class value(object): return '0x%x' % self.sbvalue.GetValueAsUnsigned() def __eq__(self, other): - if type(other) is int: - return int(self) == other - elif type(other) is str: - return str(self) == other - elif type(other) is value: - self_err = SBError() - other_err = SBError() - self_val = self.sbvalue.GetValueAsUnsigned(self_err) - if self_err.fail: - raise ValueError("unable to extract value of self") - other_val = other.sbvalue.GetValueAsUnsigned(other_err) - if other_err.fail: - raise ValueError("unable to extract value of other") - return self_val == other_val - raise TypeError("Unknown type %s, No equality operation defined." % str(type(other))) - + self_err = SBError() + other_err = SBError() + self_val = self.sbvalue.GetValueAsUnsigned(self_err) + if self_err.fail: + raise ValueError("unable to extract value of self") + other_val = other.sbvalue.GetValueAsUnsigned(other_err) + if other_err.fail: + raise ValueError("unable to extract value of other") + return self_val == other_val def __neq__(self, other): return not self.__eq__(other) |