Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2010-02-03 17:55:24 -0500
committerKen Ryall2010-02-03 17:55:24 -0500
commit0e2151791dffc212ae378aa262ce2815a0eaaa2d (patch)
tree5210ae897a20859b685321608e184aa467a4741f /debug/org.eclipse.cdt.debug.mi.core
parent1ce33a5af65e24ece23ac316ff58b4c53054b7a2 (diff)
downloadorg.eclipse.cdt-0e2151791dffc212ae378aa262ce2815a0eaaa2d.tar.gz
org.eclipse.cdt-0e2151791dffc212ae378aa262ce2815a0eaaa2d.tar.xz
org.eclipse.cdt-0e2151791dffc212ae378aa262ce2815a0eaaa2d.zip
Bug 294537 - Registers view very slow to open the first time
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIPtype.java20
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/StandardMacOSCommandFactory.java7
2 files changed, 26 insertions, 1 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIPtype.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIPtype.java
new file mode 100644
index 0000000000..4e43d438f3
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIPtype.java
@@ -0,0 +1,20 @@
+package org.eclipse.cdt.debug.mi.core.command.factories.macos;
+
+import org.eclipse.cdt.debug.mi.core.command.CLIPType;
+
+class MacOSCLIPtype extends CLIPType {
+
+ public MacOSCLIPtype(String var) {
+ super(var);
+ // apple-gdb does not give a ^error response with an invalid CLI command
+ // but with -interpreter-exec console it does
+ setOperation("-interpreter-exec console \"ptype " + var + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // MI doesn't work with a space between the token and the
+ // operation, so we override CLICommmand's toString
+ public String toString() {
+ return getToken() + getOperation() + "\n"; //$NON-NLS-1$
+ }
+
+}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/StandardMacOSCommandFactory.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/StandardMacOSCommandFactory.java
index 24a1617fd9..38690cbc0c 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/StandardMacOSCommandFactory.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/StandardMacOSCommandFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 Nokia and others.
+ * Copyright (c) 2006, 2007, 2010 Nokia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.io.File;
import org.eclipse.cdt.debug.mi.core.command.CLIInfoProc;
import org.eclipse.cdt.debug.mi.core.command.CLIInfoThreads;
+import org.eclipse.cdt.debug.mi.core.command.CLIPType;
import org.eclipse.cdt.debug.mi.core.command.MIEnvironmentCD;
import org.eclipse.cdt.debug.mi.core.command.MIInfoSharedLibrary;
import org.eclipse.cdt.debug.mi.core.command.MIVarUpdate;
@@ -44,6 +45,10 @@ public class StandardMacOSCommandFactory extends StandardCommandFactory {
return new MacOSMIEnvironmentCD(getMIVersion(), pathdir);
}
+ public CLIPType createCLIPType(String name) {
+ return new MacOSCLIPtype(name);
+ }
+
public MIInfoSharedLibrary createMIInfoSharedLibrary() {
return new MIInfoSharedLibrary(getMIVersion());
}

Back to the top