Debugger still doesn't work crash less...
--- a/plugger.py Sun Dec 06 15:58:33 2009 +0100
+++ b/plugger.py Sun Dec 06 17:45:36 2009 +0100
@@ -1337,7 +1337,7 @@
for v in self._VariablesList if v["vartype"] != "FB" and v["type"] in DebugTypes ]),
"find_variable_case_code":"\n".join([
" case %(num)s:\n"%v+
- " varp = (void*)&%(C_path)s;\n"%v+
+ " *varp = (void*)&%(C_path)s;\n"%v+
{"PT":" return %(type)s_P_ENUM;\n",
"VAR":" return %(type)s_ENUM;\n"}[v["vartype"]]%v
for v in self._VariablesList if v["vartype"] != "FB" and v["type"] in DebugTypes ])}
@@ -1612,7 +1612,7 @@
if Idxs:
Idxs.sort()
self.TracedIECPath = zip(Idxs)[2]
- self._connector.SetTraceVariablesList(zip(zip(Idxs)[0:1]))
+ self._connector.SetTraceVariablesList(zip(*zip(*Idxs)[0:2]))
self.IECdebug_lock.release()
#for IEC_path, IECdebug_data in self.IECdebug_datas.iteritems():
--- a/targets/plc_debug.c Sun Dec 06 15:58:33 2009 +0100
+++ b/targets/plc_debug.c Sun Dec 06 17:45:36 2009 +0100
@@ -79,12 +79,14 @@
#define __BufferDebugDataIterator_case_t(TYPENAME) \
case TYPENAME##_ENUM :\
flags = ((__IEC_##TYPENAME##_t *)varp)->flags;\
- ptrvalue = &((__IEC_##TYPENAME##_t *)varp)->value;
+ ptrvalue = &((__IEC_##TYPENAME##_t *)varp)->value;\
+ break;
#define __BufferDebugDataIterator_case_p(TYPENAME)\
case TYPENAME##_P_ENUM :\
flags = ((__IEC_##TYPENAME##_p *)varp)->flags;\
- ptrvalue = ((__IEC_##TYPENAME##_p *)varp)->value;
+ ptrvalue = ((__IEC_##TYPENAME##_p *)varp)->value;\
+ break;
void BufferDebugDataIterator(void* varp, __IEC_types_enum vartype)
{
@@ -144,14 +146,16 @@
#define __RegisterDebugVariable_case_t(TYPENAME) \
case TYPENAME##_ENUM :\
- ((__IEC_##TYPENAME##_t *)varp)->flags |= __IEC_DEBUG_FLAG;
+ ((__IEC_##TYPENAME##_t *)varp)->flags |= __IEC_DEBUG_FLAG;\
+ break;
#define __RegisterDebugVariable_case_p(TYPENAME)\
case TYPENAME##_P_ENUM :\
- ((__IEC_##TYPENAME##_p *)varp)->flags |= __IEC_DEBUG_FLAG;
+ ((__IEC_##TYPENAME##_p *)varp)->flags |= __IEC_DEBUG_FLAG;\
+ break;
void RegisterDebugVariable(int idx)
{
void *varp = NULL;
- switch(__find_variable(idx, varp)){
+ switch(__find_variable(idx, &varp)){
ANY(__RegisterDebugVariable_case_t)
ANY(__RegisterDebugVariable_case_p)
default:
@@ -161,11 +165,13 @@
#define __ResetDebugVariablesIterator_case_t(TYPENAME) \
case TYPENAME##_ENUM :\
- ((__IEC_##TYPENAME##_t *)varp)->flags &= ~__IEC_DEBUG_FLAG;
+ ((__IEC_##TYPENAME##_t *)varp)->flags &= ~__IEC_DEBUG_FLAG;\
+ break;
#define __ResetDebugVariablesIterator_case_p(TYPENAME)\
case TYPENAME##_P_ENUM :\
((__IEC_##TYPENAME##_p *)varp)->flags &= ~__IEC_DEBUG_FLAG;\
+ break;
void ResetDebugVariablesIterator(void* varp, __IEC_types_enum vartype)
{
@@ -197,7 +203,7 @@
int GetDebugData(unsigned long *tick, unsigned long *size, void **buffer){
int res = WaitDebugData(tick);
*size = buffer_cursor - debug_buffer;
- *buffer = NULL;
+ *buffer = debug_buffer;
return res;
}
--- a/tests/python/beremiz.xml Sun Dec 06 15:58:33 2009 +0100
+++ b/tests/python/beremiz.xml Sun Dec 06 17:45:36 2009 +0100
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<BeremizRoot URI_location="LOCAL://">
- <TargetType/>
+<BeremizRoot URI_location="PYRO://127.0.0.1:61596">
+ <TargetType>
+ <Linux CFLAGS="" LDFLAGS=""/>
+ </TargetType>
</BeremizRoot>
--- a/tests/python/plc.xml Sun Dec 06 15:58:33 2009 +0100
+++ b/tests/python/plc.xml Sun Dec 06 17:45:36 2009 +0100
@@ -8,7 +8,7 @@
productVersion="0.0"
creationDateTime="2008-12-14T16:21:19"/>
<contentHeader name="Beremiz Python Support Tests"
- modificationDateTime="2009-10-05T19:07:06">
+ modificationDateTime="2009-12-06T12:55:54">
<coordinateInfo>
<pageSize x="1024" y="1024"/>
<fbd>