mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +02:00
a first approach to GDB/MI
This commit is contained in:
parent
c5bb4d2bde
commit
8d3f439caf
23 changed files with 510 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.mi.core;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
* A checked exception representing a failure.
|
||||
*
|
||||
* @author Mikhail Khodjaiants
|
||||
* @since Jul 11, 2002
|
||||
*/
|
||||
public class MIException extends CoreException
|
||||
{
|
||||
/**
|
||||
* Constructor for MIException.
|
||||
*/
|
||||
public MIException( IStatus status )
|
||||
{
|
||||
super( status );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package org.eclipse.cdt.debug.mi.core;
|
||||
|
||||
import org.eclipse.core.runtime.IPluginDescriptor;
|
||||
import org.eclipse.core.runtime.Plugin;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIPlugin extends Plugin {
|
||||
|
||||
//The shared instance.
|
||||
private static MIPlugin plugin;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public MIPlugin(IPluginDescriptor descriptor) {
|
||||
super(descriptor);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance.
|
||||
*/
|
||||
public static MIPlugin getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
/**
|
||||
*
|
||||
* Represents a CLI command.
|
||||
*
|
||||
* @author Mikhail Khodjaiants
|
||||
* @since Jul 11, 2002
|
||||
*/
|
||||
public class CLICommand extends Command
|
||||
{
|
||||
/**
|
||||
* Returns the text representation of this command.
|
||||
*
|
||||
* @return the text representation of this command
|
||||
*/
|
||||
public String getToken() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public String toString(){
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
/**
|
||||
*
|
||||
* A base class for all mi requests.
|
||||
*
|
||||
* @author Mikhail Khodjaiants
|
||||
* @since Jul 11, 2002
|
||||
*/
|
||||
public abstract class Command
|
||||
{
|
||||
/**
|
||||
* Returns the identifier of this request.
|
||||
*
|
||||
* @return the identifier of this request
|
||||
*/
|
||||
public abstract String getToken();
|
||||
|
||||
public abstract String toString();
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
/**
|
||||
*
|
||||
* Represents a MI command.
|
||||
*
|
||||
* @author Mikhail Khodjaiants
|
||||
* @since Jul 11, 2002
|
||||
*/
|
||||
public class MICommand extends Command
|
||||
{
|
||||
/**
|
||||
* Returns the operation of this command.
|
||||
*
|
||||
* @return the operation of this command
|
||||
*/
|
||||
public String getOperation() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of command's options. An empty collection is
|
||||
* returned if there are no options.
|
||||
*
|
||||
* @return an array of command's options
|
||||
*/
|
||||
public String[] getOptions() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of command's parameters. An empty collection is
|
||||
* returned if there are no parameters.
|
||||
*
|
||||
* @return an array of command's parameters
|
||||
*/
|
||||
public String[] getParameters() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return "";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.eclipse.cdt.debug.mi.core.command;
|
||||
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
|
||||
/**
|
||||
*
|
||||
* Allows clients to communicate with the debug engine by posting
|
||||
* MI requests.
|
||||
*
|
||||
* @author Mikhail Khodjaiants
|
||||
* @since Jul 11, 2002
|
||||
*/
|
||||
public interface MIRequestManager
|
||||
{
|
||||
/**
|
||||
* Posts request to the debug engine.
|
||||
*
|
||||
* @param request - the request to post
|
||||
* @throws MIException if this method fails. Reasons include:
|
||||
*/
|
||||
void postRequest (Command request) throws MIException;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIAsyncRecord extends MIOOBRecord {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return super.interpret();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIConsoleStreamOutput extends MIStreamRecord {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return super.interpret();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIConst extends MIValue {
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIExecAsyncOutput extends MIAsyncRecord {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return super.interpret();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIList extends MIValue {
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MILogStreamOutput extends MIStreamRecord {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return super.interpret();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MINotifyAsyncOutput extends MIAsyncRecord {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return super.interpret();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIOOBRecord extends MIOutput {
|
||||
|
||||
public final int ASYNC_STOPPED = 0;
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getAsyncType() {
|
||||
return ASYNC_STOPPED;
|
||||
}
|
||||
|
||||
public MIResult getResult() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIOutput {
|
||||
|
||||
public static final String terminator = "(gdb)\n";
|
||||
|
||||
public boolean interpret() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return "";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public abstract class MIResult {
|
||||
public abstract boolean interpret();
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIResultRecord extends MIOutput {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIStatusAsyncOutput extends MIAsyncRecord {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return super.interpret();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIStreamRecord extends MIOOBRecord {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return super.interpret();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MITargetStreamOutput extends MIStreamRecord {
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.mi.core.MIOutput#interpret()
|
||||
*/
|
||||
public boolean interpret() {
|
||||
return super.interpret();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MITuple extends MIValue {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIValue {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package org.eclipse.cdt.debug.mi.core.output;
|
||||
|
||||
/**
|
||||
* @author alain
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class MIVariable {
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue