[Bug 28428] New: lldb.SBProcess.is_running and lldb.SBProcess.is_stopped Python accessors

Bug ID 28428
Summary lldb.SBProcess.is_running and lldb.SBProcess.is_stopped Python accessors
Product lldb
Version 3.8
Hardware PC
OS Windows NT
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter marius.trandafir@live.com
CC llvm-bugs@lists.llvm.org
Classification Unclassified

lldb.SBProcess.is_running and lldb.SBProcess.is_stopped Python accessors are
not working as expected given that they're defined incorrectly. Both is_running
and is_stopped are mapped to __get_is_running__, which is defined twice.

In %LLDB_SOURCES%/scripts/interface/SBProcess.i there are the following lines
of code:

// Line 434
def __get_is_running__(self):
    '''Returns "True" if the process is currently running, "False" otherwise'''
    state = self.GetState()
    if state == eStateRunning or state == eStateStepping:
        return True
    return False

def __get_is_running__(self):
    '''Returns "True" if the process is currently stopped, "False" otherwise'''
    state = self.GetState()
    if state == eStateStopped or state == eStateCrashed or state ==
eStateSuspended:
        return True
    return False

// Line 474

__swig_getmethods__["is_running"] = __get_is_running__
if _newclass: is_running = property(__get_is_running__, None, doc='''A read
only property that returns a boolean value that indicates if this process is
currently running.''')

__swig_getmethods__["is_stopped"] = __get_is_running__
if _newclass: is_stopped = property(__get_is_running__, None, doc='''A read
only property that returns a boolean value that indicates if this process is
currently stopped.''')

Greg Clayton changed bug 28428

What | Removed | Added |

  • | - | - |
    Status | NEW | RESOLVED |
    CC | | clayborg@gmail.com |
    Resolution | — | FIXED |

Comment # 1 on bug 28428 from Greg Clayton

% svn commit
Sending        scripts/interface/SBProcess.i
Transmitting file data .done
Committing transaction...
Committed revision 274568.