Index: /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/mi/MISession.java
===================================================================
--- /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/mi/MISession.java	(revision 1882)
+++ /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/mi/MISession.java	(revision 1883)
@@ -103,4 +103,5 @@
 	
 	long fCommandTimeout = 30000;	// 30 secs
+	final private Object fLock = new Object();
 	// GDB inferior process i.e actual program we are debugging
 	GDBInferior fGDBInferior;
@@ -426,56 +427,58 @@
 	 */
 	public void postCommand(Command cmd, long timeout, GDBStackFrame gdbStackFrame) throws MIException {
-
-		// Test if we are in a sane state.
-		if (!fTxThread.isAlive() || !fRxThread.isAlive()) {
-			throw new MIException(MDTDebugCorePlugin.getResourceString("MISession.postCommand.Thread_Terminated"));
-		}
-		
-		if (gdbStackFrame != null) {
-			GDBThread gdbThread = (GDBThread) gdbStackFrame.getThread();
-			if (!gdbStackFrame.equals(gdbThread.getCurrentGDBStackFrame())) {
-				writeLog("not posting command");
-				return;
-			}	
-		}
-
-//		// Test if we are in the right state?
-//		if (inferior.isRunning()) {
-//			// REMINDER: if we support -exec-interrupt
-//			// Let it throught:
-//			if (!(cmd instanceof MIExecInterrupt)) {
-//				throw new MIException(MIPlugin.getResourceString("src.MISession.Target_not_suspended"));
+		synchronized (fLock) {
+			// Test if we are in a sane state.
+			if (!fTxThread.isAlive() || !fRxThread.isAlive()) {
+				throw new MIException(MDTDebugCorePlugin.getResourceString("MISession.postCommand.Thread_Terminated"));
+			}
+			
+			if (gdbStackFrame != null) {
+				GDBThread gdbThread = (GDBThread) gdbStackFrame.getThread();
+				if (!gdbStackFrame.equals(gdbThread.getCurrentGDBStackFrame())) {
+					writeLog("not posting command");
+					return;
+				}	
+			}
+
+//			// Test if we are in the right state?
+//			if (inferior.isRunning()) {
+//				// REMINDER: if we support -exec-interrupt
+//				// Let it throught:
+//				if (!(cmd instanceof MIExecInterrupt)) {
+//					throw new MIException(MIPlugin.getResourceString("src.MISession.Target_not_suspended"));
+//				}
 //			}
-//		}
-
-//		if (inferior.isTerminated()) {
-//			// the only thing that can call postCommand when the inferior is in a TERMINATED
-//			// state is MIGDBShowExitCode, for when MIInferior is computing error code.
-//			if (!(cmd instanceof MIGDBShowExitCode)) {
-//				throw new MIException(MIPlugin.getResourceString("src.MISession.Inferior_Terminated"));
+
+//			if (inferior.isTerminated()) {
+//				// the only thing that can call postCommand when the inferior is in a TERMINATED
+//				// state is MIGDBShowExitCode, for when MIInferior is computing error code.
+//				if (!(cmd instanceof MIGDBShowExitCode)) {
+//					throw new MIException(MIPlugin.getResourceString("src.MISession.Inferior_Terminated"));
+//				}
 //			}
-//		}
-
-		if (isTerminated()) {
-			throw new MIException(MDTDebugCorePlugin.getResourceString("MISession.postCommand.Session_terminated"));
-		}
-		fTxQueue.addCommand(cmd);
-
-		// do not wait around the answer.
-		if (timeout < 0) {
-			return;
-		}
-		// Wait for the response or timeout
-		synchronized (cmd) {
-			// RxThread will set the MIOutput on the cmd
-			// when the response arrive.
-			while (cmd.getMIOutput() == null) {
-				try {
-					cmd.wait(timeout);
-					if (cmd.getMIOutput() == null) {
-						throw new MIException(MDTDebugCorePlugin.getResourceString("MISession.postCommand.Target_not_responding"));
+
+			if (isTerminated()) {
+				throw new MIException(MDTDebugCorePlugin.getResourceString("MISession.postCommand.Session_terminated"));
+			}
+			
+			fTxQueue.addCommand(cmd);
+
+			// do not wait around the answer.
+//			if (timeout < 0) {
+//				return;
+//			}
+			// Wait for the response or timeout
+			synchronized (cmd) {
+				// RxThread will set the MIOutput on the cmd
+				// when the response arrive.
+				while (cmd.getMIOutput() == null) {
+					try {
+						cmd.wait(timeout);
+						if (cmd.getMIOutput() == null) {
+							throw new MIException(MDTDebugCorePlugin.getResourceString("MISession.postCommand.Target_not_responding"));
+						}
+					} catch (InterruptedException e) {
+						//MDTDebugCorePlugin.log(null, e);
 					}
-				} catch (InterruptedException e) {
-					//MDTDebugCorePlugin.log(null, e);
 				}
 			}
Index: /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/model/value/GDBModelicaArrayElementValue.java
===================================================================
--- /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/model/value/GDBModelicaArrayElementValue.java	(revision 1882)
+++ /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/model/value/GDBModelicaArrayElementValue.java	(revision 1883)
@@ -98,5 +98,4 @@
 			CLIPTypeInfo cliPTypeInfo;
 			try {
-				cliPTypeCmd.setQuiet(true);
 				miSession.postCommand(cliPTypeCmd, getGDBVariable().getGDBStackFrame());
 				cliPTypeInfo = cliPTypeCmd.getMIPtypeInfo();
Index: /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/model/value/GDBValue.java
===================================================================
--- /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/model/value/GDBValue.java	(revision 1882)
+++ /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/core/model/value/GDBValue.java	(revision 1883)
@@ -227,5 +227,4 @@
 		CLIPTypeInfo cliPTypeInfo;
 		try {
-			cliPTypeCmd.setQuiet(true);
 			miSession.postCommand(cliPTypeCmd, getGDBVariable().getGDBStackFrame());
 			cliPTypeInfo = cliPTypeCmd.getMIPtypeInfo();
Index: /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/helper/TypeHelper.java
===================================================================
--- /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/helper/TypeHelper.java	(revision 1882)
+++ /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/helper/TypeHelper.java	(revision 1883)
@@ -66,5 +66,4 @@
 		CommandFactory factory = miSession.getCommandFactory();
 		MIDataEvaluateExpression getTypeOfAnyCmd = factory.createMIGetTypeOfAny(variableName);
-		getTypeOfAnyCmd.setQuiet(true);
 		MIDataEvaluateExpressionInfo getTypeOfAnyInfo;
 		try {
Index: /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/helper/ValueHelper.java
===================================================================
--- /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/helper/ValueHelper.java	(revision 1882)
+++ /trunk/org.modelica.mdt.debug.core/src/org/modelica/mdt/debug/gdb/helper/ValueHelper.java	(revision 1883)
@@ -63,5 +63,4 @@
 			CommandFactory factory = miSession.getCommandFactory();
 			MIDataEvaluateExpression getAnyStringCmd = factory.createMIAnyString(variableName);
-			getAnyStringCmd.setQuiet(true);
 			miSession.postCommand(getAnyStringCmd, gdbStackFrame);
 			MIDataEvaluateExpressionInfo getTypeOfAnyInfo = getAnyStringCmd.getMIDataEvaluateExpressionInfo();
@@ -123,5 +122,4 @@
 			CommandFactory factory = miSession.getCommandFactory();
 			MIDataEvaluateExpression dataEvaluateExpressionCmd = factory.createMIDataEvaluateExpression(variableName);
-			dataEvaluateExpressionCmd.setQuiet(true);
 			miSession.postCommand(dataEvaluateExpressionCmd, gdbStackFrame);
 			MIDataEvaluateExpressionInfo dataEvaluateExpressionInfo = dataEvaluateExpressionCmd.getMIDataEvaluateExpressionInfo();
@@ -150,5 +148,4 @@
 			CommandFactory factory = miSession.getCommandFactory();
 			MIDataEvaluateExpression getListLengthCmd = factory.createMIGetListLength(variableName);
-			getListLengthCmd.setQuiet(true);
 			miSession.postCommand(getListLengthCmd, gdbStackFrame);
 			MIDataEvaluateExpressionInfo getListLengthInfo = getListLengthCmd.getMIDataEvaluateExpressionInfo();
@@ -179,5 +176,4 @@
 			CommandFactory factory = miSession.getCommandFactory();
 			MIDataEvaluateExpression getListItemCmd = factory.createMIGetListItem(variableName, item);
-			getListItemCmd.setQuiet(true);
 			miSession.postCommand(getListItemCmd, gdbStackFrame);
 			result = getListItemCmd.getMIDataEvaluateExpressionInfo().getExpression();
@@ -207,5 +203,4 @@
 			CommandFactory factory = miSession.getCommandFactory();
 			MIDataEvaluateExpression getArrayLengthCmd = factory.createMIGetArrayLength(variableName);
-			getArrayLengthCmd.setQuiet(true);
 			miSession.postCommand(getArrayLengthCmd, gdbStackFrame);
 			MIDataEvaluateExpressionInfo getArrayLengthInfo = getArrayLengthCmd.getMIDataEvaluateExpressionInfo();
@@ -236,5 +231,4 @@
 			CommandFactory factory = miSession.getCommandFactory();
 			MIDataEvaluateExpression getArrayElementCmd = factory.createMIGetArrayElement(variableName, element);
-			getArrayElementCmd.setQuiet(true);
 			miSession.postCommand(getArrayElementCmd, gdbStackFrame);
 			result = getArrayElementCmd.getMIDataEvaluateExpressionInfo().getExpression();
@@ -265,5 +259,4 @@
 			CommandFactory factory = miSession.getCommandFactory();
 			MIDataEvaluateExpression getRecordElementNameCmd = factory.createMIGetRecordElementName(variableName, element);
-			getRecordElementNameCmd.setQuiet(true);
 			miSession.postCommand(getRecordElementNameCmd, gdbStackFrame);
 			return parseResult(getRecordElementNameCmd.getMIDataEvaluateExpressionInfo().getExpression());
@@ -291,5 +284,4 @@
 			CommandFactory factory = miSession.getCommandFactory();
 			MIDataEvaluateExpression getOptionValueCmd = factory.createMIIsOptionNone(variableName);
-			getOptionValueCmd.setQuiet(true);
 			miSession.postCommand(getOptionValueCmd, gdbStackFrame);
 			return getOptionValueCmd.getMIDataEvaluateExpressionInfo().getExpression();
@@ -318,5 +310,4 @@
 			variableName += ".ndims";
 			MIDataEvaluateExpression getArrayDimensionsCmd = factory.createMIGetModelicaArrayDimensions(variableName);
-			getArrayDimensionsCmd.setQuiet(true);
 			miSession.postCommand(getArrayDimensionsCmd, gdbStackFrame);
 			MIDataEvaluateExpressionInfo getArrayDimensionsInfo = getArrayDimensionsCmd.getMIDataEvaluateExpressionInfo();
@@ -347,5 +338,4 @@
 			variableName += ".dim_size[" + (dimension - 1)  + "]";
 			MIDataEvaluateExpression getArrayDimensionSizeCmd = factory.createMIGetModelicaArrayDimensionSize(variableName);
-			getArrayDimensionSizeCmd.setQuiet(true);
 			miSession.postCommand(getArrayDimensionSizeCmd, gdbStackFrame);
 			MIDataEvaluateExpressionInfo getArrayDimensionSizeInfo = getArrayDimensionSizeCmd.getMIDataEvaluateExpressionInfo();
