diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-02 22:18:35 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-02 22:18:35 +0000 |
| commit | 89b658428bae3b749f174ca79f0fe390451d8f69 (patch) | |
| tree | 1b02a3af90f9be9c3bc27fecdf67bbb5c1443fb2 /lldb/scripts/interface/SBThread.i | |
| parent | 54c7907f52eaefbfa33c741008d2124f7d62bb99 (diff) | |
| download | bcm5719-llvm-89b658428bae3b749f174ca79f0fe390451d8f69.tar.gz bcm5719-llvm-89b658428bae3b749f174ca79f0fe390451d8f69.zip | |
[swig] Don't mess with swig internals.
As of SWIG 4.0, __swig_getmethods__ and __swig_setmethods__ are no
longer defined. It appears that there's no need to mess with these
internals, we can simplify define the corresponding properties inline.
Originally I wanted to use the swig extension %attribute and
%attributeref to define properties. However, I couldn't find a way to
add documentation to these attributes. Since we already had the
properties defined inline, we might as well keep them.
Differential revision: https://reviews.llvm.org/D63530
llvm-svn: 364974
Diffstat (limited to 'lldb/scripts/interface/SBThread.i')
| -rw-r--r-- | lldb/scripts/interface/SBThread.i | 51 |
1 files changed, 13 insertions, 38 deletions
diff --git a/lldb/scripts/interface/SBThread.i b/lldb/scripts/interface/SBThread.i index e370f56d5e0..c759e4a5db9 100644 --- a/lldb/scripts/interface/SBThread.i +++ b/lldb/scripts/interface/SBThread.i @@ -432,44 +432,19 @@ public: frames.append(frame) return frames - __swig_getmethods__["id"] = GetThreadID - if _newclass: id = property(GetThreadID, None, doc='''A read only property that returns the thread ID as an integer.''') - - __swig_getmethods__["idx"] = GetIndexID - if _newclass: idx = property(GetIndexID, None, doc='''A read only property that returns the thread index ID as an integer. Thread index ID values start at 1 and increment as threads come and go and can be used to uniquely identify threads.''') - - __swig_getmethods__["return_value"] = GetStopReturnValue - if _newclass: return_value = property(GetStopReturnValue, None, doc='''A read only property that returns an lldb object that represents the return value from the last stop (lldb.SBValue) if we just stopped due to stepping out of a function.''') - - __swig_getmethods__["process"] = GetProcess - if _newclass: process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that owns this thread.''') - - __swig_getmethods__["num_frames"] = GetNumFrames - if _newclass: num_frames = property(GetNumFrames, None, doc='''A read only property that returns the number of stack frames in this thread as an integer.''') - - __swig_getmethods__["frames"] = get_thread_frames - if _newclass: frames = property(get_thread_frames, None, doc='''A read only property that returns a list() of lldb.SBFrame objects for all frames in this thread.''') - - __swig_getmethods__["frame"] = get_frames_access_object - if _newclass: frame = property(get_frames_access_object, None, doc='''A read only property that returns an object that can be used to access frames as an array ("frame_12 = lldb.thread.frame[12]").''') - - __swig_getmethods__["name"] = GetName - if _newclass: name = property(GetName, None, doc='''A read only property that returns the name of this thread as a string.''') - - __swig_getmethods__["queue"] = GetQueueName - if _newclass: queue = property(GetQueueName, None, doc='''A read only property that returns the dispatch queue name of this thread as a string.''') - - __swig_getmethods__["queue_id"] = GetQueueID - if _newclass: queue_id = property(GetQueueID, None, doc='''A read only property that returns the dispatch queue id of this thread as an integer.''') - - __swig_getmethods__["stop_reason"] = GetStopReason - if _newclass: stop_reason = property(GetStopReason, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eStopReason") that represents the reason this thread stopped.''') - - __swig_getmethods__["is_suspended"] = IsSuspended - if _newclass: is_suspended = property(IsSuspended, None, doc='''A read only property that returns a boolean value that indicates if this thread is suspended.''') - - __swig_getmethods__["is_stopped"] = IsStopped - if _newclass: is_stopped = property(IsStopped, None, doc='''A read only property that returns a boolean value that indicates if this thread is stopped but not exited.''') + id = property(GetThreadID, None, doc='''A read only property that returns the thread ID as an integer.''') + idx = property(GetIndexID, None, doc='''A read only property that returns the thread index ID as an integer. Thread index ID values start at 1 and increment as threads come and go and can be used to uniquely identify threads.''') + return_value = property(GetStopReturnValue, None, doc='''A read only property that returns an lldb object that represents the return value from the last stop (lldb.SBValue) if we just stopped due to stepping out of a function.''') + process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that owns this thread.''') + num_frames = property(GetNumFrames, None, doc='''A read only property that returns the number of stack frames in this thread as an integer.''') + frames = property(get_thread_frames, None, doc='''A read only property that returns a list() of lldb.SBFrame objects for all frames in this thread.''') + frame = property(get_frames_access_object, None, doc='''A read only property that returns an object that can be used to access frames as an array ("frame_12 = lldb.thread.frame[12]").''') + name = property(GetName, None, doc='''A read only property that returns the name of this thread as a string.''') + queue = property(GetQueueName, None, doc='''A read only property that returns the dispatch queue name of this thread as a string.''') + queue_id = property(GetQueueID, None, doc='''A read only property that returns the dispatch queue id of this thread as an integer.''') + stop_reason = property(GetStopReason, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eStopReason") that represents the reason this thread stopped.''') + is_suspended = property(IsSuspended, None, doc='''A read only property that returns a boolean value that indicates if this thread is suspended.''') + is_stopped = property(IsStopped, None, doc='''A read only property that returns a boolean value that indicates if this thread is stopped but not exited.''') %} }; |

