mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
2004-07-12 Alain Magloire
Remove some compiler warnings. * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java * cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java * mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvirnmentDirectory.java * src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java * src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java * src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
This commit is contained in:
parent
33193b4d7c
commit
b78e2165a2
8 changed files with 29 additions and 22 deletions
|
@ -1,3 +1,16 @@
|
|||
2004-07-12 Alain Magloire
|
||||
|
||||
Remove some compiler warnings.
|
||||
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Register.java
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
|
||||
|
||||
* mi/org/eclipse/cdt/debug/mi/core/command/CygwinMIEnvirnmentDirectory.java
|
||||
* src/org/eclipse/cdt/debug/mi/core/CygwinGDBDebugger.java
|
||||
* src/org/eclipse/cdt/debug/mi/core/GDBTypeParser.java
|
||||
* src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
|
||||
|
||||
2004-07-09 Alain Magloire
|
||||
|
||||
Patch from gwatson to deal with Mac
|
||||
|
|
|
@ -67,10 +67,10 @@ public class Register extends Variable implements ICDIRegister {
|
|||
if ((exp.equals("private") || exp.equals("public") || exp.equals("protected"))) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
fn = getFullName();
|
||||
} else {
|
||||
fn = getFullName() + "." + exp;
|
||||
fn = getFullName() + "." + exp; //$NON-NLS-1$
|
||||
}
|
||||
} else {
|
||||
fn = getFullName() + "." + exp;
|
||||
fn = getFullName() + "." + exp; //$NON-NLS-1$
|
||||
}
|
||||
RegisterObject regObj = new RegisterObject(getTarget(),
|
||||
exp, fn, getPosition());
|
||||
|
|
|
@ -71,7 +71,7 @@ public class Thread extends CObject implements ICDIThread {
|
|||
public String toString() {
|
||||
String str = Integer.toString(id);
|
||||
if (name != null) {
|
||||
str += " " + name;
|
||||
str += " " + name; //$NON-NLS-1$
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
|
|
@ -98,12 +98,11 @@ public class Variable extends VariableObject implements ICDIVariable {
|
|||
Variable variable = (Variable) children[i];
|
||||
if (name.equals(variable.getMIVar().getVarName())) {
|
||||
return variable;
|
||||
} else {
|
||||
// Look also in the grandchildren.
|
||||
Variable grandChild = variable.getChild(name);
|
||||
if (grandChild != null) {
|
||||
return grandChild;
|
||||
}
|
||||
}
|
||||
// Look also in the grandchildren.
|
||||
Variable grandChild = variable.getChild(name);
|
||||
if (grandChild != null) {
|
||||
return grandChild;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -25,17 +25,17 @@ public class CygwinMIEnvironmentDirectory extends MIEnvironmentDirectory {
|
|||
for (int i = 0; i < paths.length; i++) {
|
||||
// Use the cygpath utility to convert the path
|
||||
CommandLauncher launcher = new CommandLauncher();
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
||||
launcher.execute(
|
||||
new Path("cygpath"), //$NON-NLS-1$
|
||||
new String[] { "-u", paths[i] }, //$NON-NLS-1$
|
||||
new String[0],
|
||||
new Path(".")); //$NON-NLS-1$
|
||||
if (launcher.waitAndRead(output, output) != CommandLauncher.OK)
|
||||
if (launcher.waitAndRead(out, out) != CommandLauncher.OK)
|
||||
newpaths[i] = paths[i];
|
||||
else
|
||||
newpaths[i] = output.toString().trim();
|
||||
newpaths[i] = out.toString().trim();
|
||||
}
|
||||
|
||||
setParameters(newpaths);
|
||||
|
|
|
@ -4,20 +4,15 @@
|
|||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.mi.core;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryManager;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
||||
import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.CygwinCommandFactory;
|
||||
import org.eclipse.cdt.debug.mi.core.command.MIGDBSet;
|
||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class GDBTypeParser {
|
|||
if (s == null) {
|
||||
s = new String();
|
||||
}
|
||||
s = Pattern.compile("\\bconst\\b").matcher(s).replaceAll("");
|
||||
s = Pattern.compile("\\bconst\\b").matcher(s).replaceAll(""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
s = s.trim();
|
||||
|
||||
// Initialize.
|
||||
|
|
|
@ -100,8 +100,8 @@ public class MIPlugin extends Plugin {
|
|||
* @return MISession
|
||||
*/
|
||||
public MISession createMISession(Process process, PTY pty, int type) throws MIException {
|
||||
MIPlugin plugin = getDefault();
|
||||
Preferences prefs = plugin.getPluginPreferences();
|
||||
MIPlugin miPlugin = getDefault();
|
||||
Preferences prefs = miPlugin.getPluginPreferences();
|
||||
int timeout = prefs.getInt(IMIConstants.PREF_REQUEST_TIMEOUT);
|
||||
int launchTimeout = prefs.getInt(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT);
|
||||
return createMISession(process, pty, timeout, type, launchTimeout);
|
||||
|
@ -389,8 +389,8 @@ public class MIPlugin extends Plugin {
|
|||
syncStartup.start();
|
||||
|
||||
synchronized (pgdb) {
|
||||
MIPlugin plugin = getDefault();
|
||||
Preferences prefs = plugin.getPluginPreferences();
|
||||
MIPlugin miPlugin = getDefault();
|
||||
Preferences prefs = miPlugin.getPluginPreferences();
|
||||
int launchTimeout = prefs.getInt(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT);
|
||||
while (syncStartup.isAlive()) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue