Error in value send when debugging forced external or located variable fixed
authorlaurent
Wed, 09 Dec 2009 16:52:46 +0100
changeset 491 28afed8b1af5
parent 490 898648a09e13
child 492 0852c4682179
Error in value send when debugging forced external or located variable fixed
targets/plc_debug.c
--- a/targets/plc_debug.c	Wed Dec 09 16:51:22 2009 +0100
+++ b/targets/plc_debug.c	Wed Dec 09 16:52:46 2009 +0100
@@ -65,7 +65,10 @@
 #define __BufferDebugDataIterator_case_p(TYPENAME)\
         case TYPENAME##_P_ENUM :\
             *flags = ((__IEC_##TYPENAME##_p *)varp)->flags;\
-            *ptrvalue = ((__IEC_##TYPENAME##_p *)varp)->value;\
+            if (*flags && __IEC_FORCE_FLAG)\
+               *ptrvalue = &((__IEC_##TYPENAME##_p *)varp)->fvalue;\
+            else\
+               *ptrvalue = ((__IEC_##TYPENAME##_p *)varp)->value;\
             break;
 
 void UnpackVar(void* varp, __IEC_types_enum vartype, void **ptrvalue, char *flags)