Fix bug when debugging located variables of type memory (%M)
authorlaurent
Mon, 16 May 2011 11:58:06 +0200
changeset 601 d0e3fc4b9951
parent 599 c7be4d09c5f4
child 602 6da88269088d
Fix bug when debugging located variables of type memory (%M)
plugger.py
--- a/plugger.py	Thu Apr 21 12:35:27 2011 +0200
+++ b/plugger.py	Mon May 16 11:58:06 2011 +0200
@@ -1320,12 +1320,14 @@
            "extern_variables_declarations":"\n".join([
               {"EXT":"extern __IEC_%(type)s_p %(C_path)s;",
                "IN":"extern __IEC_%(type)s_p %(C_path)s;",
+               "MEM":"extern __IEC_%(type)s_p %(C_path)s;",
                "OUT":"extern __IEC_%(type)s_p %(C_path)s;",
                "VAR":"extern __IEC_%(type)s_t %(C_path)s;"}[v["vartype"]]%v 
                for v in self._VariablesList if v["vartype"] != "FB" and v["C_path"].find('.')<0]),
            "for_each_variable_do_code":"\n".join([
                {"EXT":"    (*fp)((void*)&%(C_path)s,%(type)s_P_ENUM);\n",
                 "IN":"    (*fp)((void*)&%(C_path)s,%(type)s_P_ENUM);\n",
+                "MEM":"    (*fp)((void*)&%(C_path)s,%(type)s_P_ENUM);\n",
                 "OUT":"    (*fp)((void*)&%(C_path)s,%(type)s_O_ENUM);\n",
                 "VAR":"    (*fp)((void*)&%(C_path)s,%(type)s_ENUM);\n"}[v["vartype"]]%v
                 for v in self._VariablesList if v["vartype"] != "FB" and v["type"] in DebugTypesSize ]),
@@ -1334,6 +1336,7 @@
                "        *varp = (void*)&%(C_path)s;\n"%v+
                {"EXT":"        return %(type)s_P_ENUM;\n",
                 "IN":"        return %(type)s_P_ENUM;\n",
+                "MEM":"        return %(type)s_P_ENUM;\n",
                 "OUT":"        return %(type)s_O_ENUM;\n",
                 "VAR":"        return %(type)s_ENUM;\n"}[v["vartype"]]%v
                 for v in self._VariablesList if v["vartype"] != "FB" and v["type"] in DebugTypesSize ])}