Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2010-02-03 22:56:57 +0000
committerKen Ryall2010-02-03 22:56:57 +0000
commit911fa2dd3403196becd5126f7de7a8359700cca1 (patch)
treef5bb88a1159ad470a2f4a767ced5f312509f08bf
parent65434b8d5a6df3342987c91f6d3693d86e2afc34 (diff)
downloadorg.eclipse.cdt-911fa2dd3403196becd5126f7de7a8359700cca1.tar.gz
org.eclipse.cdt-911fa2dd3403196becd5126f7de7a8359700cca1.tar.xz
org.eclipse.cdt-911fa2dd3403196becd5126f7de7a8359700cca1.zip
Bug 294537 - [Mac] Registers view very slow to open the first time
-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 00000000000..4e43d438f3f
--- /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 24a1617fd96..38690cbc0c4 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