diff options
author | Greg Clayton <gclayton@apple.com> | 2012-02-01 02:30:27 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-02-01 02:30:27 +0000 |
commit | 2415586faacce72742020c4221719cb87f2081b6 (patch) | |
tree | 0d95fc9813fc94d0cc0950a040c95748f64a07d1 /lldb/scripts/Python/interface | |
parent | fdc80a5cf7a4f62e32c42641a48ae2e249e4572e (diff) | |
download | bcm5719-llvm-2415586faacce72742020c4221719cb87f2081b6.tar.gz bcm5719-llvm-2415586faacce72742020c4221719cb87f2081b6.zip |
Added a new convenience property on lldb.SBThread names "frames" which always returns a complete list of all lldb.SBFrame objects:
(lldb) script
>>> frames = lldb.thread.frames
>>> for frame in frames:
... print frame
Also changed all of the "__repr__" methods to strip any trailing newline characters so we don't end up with entra newlines.
llvm-svn: 149466
Diffstat (limited to 'lldb/scripts/Python/interface')
-rw-r--r-- | lldb/scripts/Python/interface/SBThread.i | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBThread.i b/lldb/scripts/Python/interface/SBThread.i index c77706a6f4a..fbb1e4ebd6d 100644 --- a/lldb/scripts/Python/interface/SBThread.i +++ b/lldb/scripts/Python/interface/SBThread.i @@ -175,6 +175,13 @@ public: GetDescription (lldb::SBStream &description) const; %pythoncode %{ + def get_thread_frames(self): + frames = [] + for frame in self: + frames.append(frame) + return frames + + __swig_getmethods__["id"] = GetThreadID if _newclass: x = property(GetThreadID, None) @@ -190,6 +197,9 @@ public: __swig_getmethods__["num_frames"] = GetNumFrames if _newclass: x = property(GetNumFrames, None) + __swig_getmethods__["frames"] = get_thread_frames + if _newclass: x = property(get_thread_frames, None) + __swig_getmethods__["name"] = GetName if _newclass: x = property(GetName, None) |