--- a/targets/Win32/plc_Win32_main.c Mon Dec 07 14:43:27 2009 +0100
+++ b/targets/Win32/plc_Win32_main.c Mon Dec 07 14:44:58 2009 +0100
@@ -147,7 +147,14 @@
int TryEnterDebugSection(void)
//printf("TryEnterDebugSection\n");
- return WaitForSingleObject(debug_sem, 0) == WAIT_OBJECT_0;
+ if(WaitForSingleObject(debug_sem, 0) == WAIT_OBJECT_0){ + /* Only enter if debug active */ + ReleaseSemaphore(debug_sem, 1, NULL); void LeaveDebugSection(void)
@@ -171,7 +178,6 @@
/* from plc_debugger.c */
int WaitDebugData(unsigned long *tick)
-unsigned long WaitDebugData()
/* Wait signal from PLC thread */
@@ -188,11 +194,12 @@
ReleaseSemaphore(debug_wait_sem, 1, NULL);
+void suspendDebug(int disable)
/* Prevent PLC to enter debug code */
WaitForSingleObject(debug_sem, INFINITE);
+ /*__DEBUG is protected by this mutex */ --- a/tests/python/beremiz.xml Mon Dec 07 14:43:27 2009 +0100
+++ b/tests/python/beremiz.xml Mon Dec 07 14:44:58 2009 +0100
@@ -1,6 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<BeremizRoot URI_location="PYRO://127.0.0.1:61596">
- <Linux CFLAGS="" LDFLAGS=""/>
+<?xml version="1.0" encoding="UTF-8"?> +<BeremizRoot URI_location="LOCAL://">