# HG changeset patch # User Edouard TISSERANT # Date 1260121970 -3600 # Node ID af7350d24ab52da83ad434ad0ae70f36ac416913 # Parent dfc6164e40224ef573dde64402eb115d4fa97daa Fix debug crash diff -r dfc6164e4022 -r af7350d24ab5 plugger.py --- a/plugger.py Sun Dec 06 17:45:36 2009 +0100 +++ b/plugger.py Sun Dec 06 18:52:50 2009 +0100 @@ -1611,7 +1611,7 @@ if Idxs: Idxs.sort() - self.TracedIECPath = zip(Idxs)[2] + self.TracedIECPath = zip(*Idxs)[2] self._connector.SetTraceVariablesList(zip(*zip(*Idxs)[0:2])) self.IECdebug_lock.release() diff -r dfc6164e4022 -r af7350d24ab5 runtime/PLCObject.py --- a/runtime/PLCObject.py Sun Dec 06 17:45:36 2009 +0100 +++ b/runtime/PLCObject.py Sun Dec 06 18:52:50 2009 +0100 @@ -348,7 +348,7 @@ Must be changed according to changes in iec_types.h """ _fields_ = [("len", ctypes.c_uint8), - ("body", ctypes.c_char * 127)] + ("body", ctypes.c_char * 126)] TypeTranslator = {"BOOL" : (ctypes.c_uint8, lambda x:x.value!=0), "STEP" : (ctypes.c_uint8, lambda x:x.value), @@ -390,12 +390,12 @@ if c_type is not None and offset < size: res.append(unpack_func(ctypes.cast(cursor, ctypes.POINTER(c_type)).contents)) - offset += ctypes.sizeof(c_type) + offset += ctypes.sizeof(c_type) else: PLCprint("Debug error !") break self._FreeDebugData() self.PLClibraryLock.release() - return self.PLCStatus, tick, res + return self.PLCStatus, tick.value, res return self.PLCStatus, None, None