From 937ffc00572ecea92fd6ff87807afece987567c0 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Tue, 30 Jul 2002 02:46:51 +0000 Subject: [PATCH] Contine work on gdb/mi --- .../debug/mi/core/command/MIBreakWatch.java | 4 +- .../mi/core/command/MIDataDisassemble.java | 71 +++++++++++++++++++ .../command/MIDataEvaluateExpression.java | 23 ++++++ .../command/MIDataListChangedRegisters.java | 21 ++++++ .../core/command/MIDataListRegisterNames.java | 37 ++++++++++ .../command/MIDataListRegisterValues.java | 71 +++++++++++++++++++ .../mi/core/command/MIDataReadMemory.java | 57 +++++++++++++++ .../mi/core/command/MIEnvironmentCD.java | 23 ++++++ .../core/command/MIEnvironmentDirectory.java | 21 ++++++ .../mi/core/command/MIEnvironmentPWD.java | 21 ++++++ .../mi/core/command/MIEnvironmentPath.java | 21 ++++++ .../mi/core/command/MIExecArguments.java | 22 ++++++ .../debug/mi/core/command/MIExecContinue.java | 22 ++++++ .../debug/mi/core/command/MIExecFinish.java | 23 ++++++ .../mi/core/command/MIExecInterrupt.java | 26 +++++++ .../cdt/debug/mi/core/command/MIExecNext.java | 22 ++++++ .../core/command/MIExecNextInstruction.java | 24 +++++++ .../debug/mi/core/command/MIExecReturn.java | 22 ++++++ .../cdt/debug/mi/core/command/MIExecRun.java | 23 ++++++ .../cdt/debug/mi/core/command/MIExecStep.java | 24 +++++++ .../core/command/MIExecStepInstruction.java | 25 +++++++ .../debug/mi/core/command/MIExecUntil.java | 29 ++++++++ .../debug/mi/core/command/MIFileExecFile.java | 25 +++++++ .../mi/core/command/MIFileSymbolFile.java | 23 ++++++ .../cdt/debug/mi/core/command/MIGDBExit.java | 21 ++++++ 25 files changed, 699 insertions(+), 2 deletions(-) create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataDisassemble.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataEvaluateExpression.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListChangedRegisters.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterNames.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterValues.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataReadMemory.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentCD.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentDirectory.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPWD.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPath.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecArguments.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecContinue.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecFinish.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecInterrupt.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecNext.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecNextInstruction.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecReturn.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecRun.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecStep.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecStepInstruction.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecUntil.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIFileExecFile.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIFileSymbolFile.java create mode 100644 debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIGDBExit.java diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIBreakWatch.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIBreakWatch.java index 73659ce3099..43560a3d986 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIBreakWatch.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIBreakWatch.java @@ -22,9 +22,9 @@ package org.eclipse.cdt.debug.mi.core.command; public class MIBreakWatch extends MICommand { public MIBreakWatch (String[] opts, String expr) { - super("-break-insert", opts, new String[]{expr}); + super("-break-watch", opts, new String[]{expr}); } public MIBreakWatch (String expr) { - super("-break-insert", new String[]{expr}); + super("-break-watch", new String[]{expr}); } } diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataDisassemble.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataDisassemble.java new file mode 100644 index 00000000000..e1fcb984c4b --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataDisassemble.java @@ -0,0 +1,71 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -data-disassemble + * [ -s START-ADDR -e END-ADDR ] + * | [ -f FILENAME -l LINENUM [ -n LINES ] ] + * -- MODE + * + *Where: + * + *`START-ADDR' + * is the beginning address (or `$pc') + * + *`END-ADDR' + * is the end address + * + *`FILENAME' + * is the name of the file to disassemble + * + *`LINENUM' + * is the line number to disassemble around + * + *`LINES' + * is the the number of disassembly lines to be produced. If it is + * -1, the whole function will be disassembled, in case no END-ADDR is + * specified. If END-ADDR is specified as a non-zero value, and + * LINES is lower than the number of disassembly lines between + * START-ADDR and END-ADDR, only LINES lines are displayed; if LINES + * is higher than the number of lines between START-ADDR and + * END-ADDR, only the lines up to END-ADDR are displayed. + * + *`MODE' + * is either 0 (meaning only disassembly) or 1 (meaning mixed source + * and disassembly). + * + *Result + *...... + * + * The output for each instruction is composed of four fields: + * + * * Address + * + * * Func-name + * + * * Offset + * + * * Instruction + * + * Note that whatever included in the instruction field, is not + *manipulated directely by GDB/MI, i.e. it is not possible to adjust its + *format. + * + * + */ +public class MIDataDisassemble extends MICommand +{ + public MIDataDisassemble(String[] params) { + super("-data-disassemble", params); + } + + public MIDataDisassemble(String[] opts, String[] params) { + super("-data-disassemble", opts, params); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataEvaluateExpression.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataEvaluateExpression.java new file mode 100644 index 00000000000..de92eb9541b --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataEvaluateExpression.java @@ -0,0 +1,23 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -data-evaluate-expression EXPR + * + * Evaluate EXPR as an expression. The expression could contain an + *inferior function call. The function call will execute synchronously. + *If the expression contains spaces, it must be enclosed in double quotes. + * + */ +public class MIDataEvaluateExpression extends MICommand +{ + public MIDataEvaluateExpression(String expr) { + super("-data-evaluate-expression", new String[]{expr}); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListChangedRegisters.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListChangedRegisters.java new file mode 100644 index 00000000000..e4e4e3c88c2 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListChangedRegisters.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -data-list-changed-registers + * + * Display a list of the registers that have changed. + * + */ +public class MIDataListChangedRegisters extends MICommand +{ + public MIDataListChangedRegisters() { + super("-data-list-changed-registers" ); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterNames.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterNames.java new file mode 100644 index 00000000000..52b916262a0 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterNames.java @@ -0,0 +1,37 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -data-list-register-names [ ( REGNO )+ ] + * + * Show a list of register names for the current target. If no + * arguments are given, it shows a list of the names of all the registers. + * If integer numbers are given as arguments, it will print a list of the + * names of the registers corresponding to the arguments. To ensure + * consistency between a register name and its number, the output list may + * include empty register names. + * + */ +public class MIDataListRegisterNames extends MICommand +{ + public MIDataListRegisterNames() { + super("-data-list-register-names"); + } + + public MIDataListRegisterNames(int [] regnos) { + this(); + if (regnos != null && regnos.length > 0) { + String[] array = new String[regnos.length]; + for (int i = 0; i < regnos.length; i++) { + array[i] = Integer.toString(regnos[i]); + } + setParameters(array); + } + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterValues.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterValues.java new file mode 100644 index 00000000000..c35e38583d0 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataListRegisterValues.java @@ -0,0 +1,71 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -data-list-register-values FMT [ ( REGNO )*] + * + * Display the registers' contents. FMT is the format according to + * which the registers' contents are to be returned, followed by an + * optional list of numbers specifying the registers to display. A + * missing list of numbers indicates that the contents of all the + * registers must be returned. + * + */ +public class MIDataListRegisterValues extends MICommand +{ + public final static int HEXADECIMAL = 0; + public final static int OCTAL = 1; + public final static int BINARY = 2; + public final static int DECIMAL = 3; + public final static int RAW = 4; + public final static int NATURAL = 5; + + public MIDataListRegisterValues(int fmt) { + this(fmt, null); + } + + public MIDataListRegisterValues(int fmt, int [] regnos) { + super("-data-list-register-values"); + + String format = "x"; + switch (fmt) { + case NATURAL: + format = "N"; + break; + case RAW: + format = "r"; + break; + case DECIMAL: + format = "d"; + break; + case BINARY: + format = "t"; + break; + case OCTAL: + format = "o"; + break; + /* + case HEXADECIMAL: + default: + format = "x"; + break; + */ + } + + setOptions(new String[]{format}); + + if (regnos != null && regnos.length > 0) { + String[] array = new String[regnos.length]; + for (int i = 0; i < regnos.length; i++) { + array[i] = Integer.toString(regnos[i]); + } + setParameters(array); + } + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataReadMemory.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataReadMemory.java new file mode 100644 index 00000000000..9663779ea77 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIDataReadMemory.java @@ -0,0 +1,57 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -data-read-memory [ -o BYTE-OFFSET ] + * ADDRESS WORD-FORMAT WORD-SIZE + * NR-ROWS NR-COLS [ ASCHAR ] + * + * where: + * + * `ADDRESS' + * An expression specifying the address of the first memory word to be + * read. Complex expressions containing embedded white space should + * be quoted using the C convention. + * + * `WORD-FORMAT' + * The format to be used to print the memory words. The notation is + * the same as for GDB's `print' command (*note Output formats: + * Output Formats.). + * + * `WORD-SIZE' + * The size of each memory word in bytes. + * + * `NR-ROWS' + * The number of rows in the output table. + * + * `NR-COLS' + * The number of columns in the output table. + * + * `ASCHAR' + * If present, indicates that each row should include an ASCII dump. + * The value of ASCHAR is used as a padding character when a byte is + * not a member of the printable ASCII character set (printable ASCII + * characters are those whose code is between 32 and 126, + * inclusively). + * + * `BYTE-OFFSET' + * + * + */ +public class MIDataReadMemory extends MICommand +{ + + public MIDataReadMemory(String[] params) { + super("-data-read-memory", params); + } + + public MIDataReadMemory(String[] opts, String[] params) { + super("-data-read-memory", opts, params); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentCD.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentCD.java new file mode 100644 index 00000000000..251f47f25a9 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentCD.java @@ -0,0 +1,23 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * + * -environment-cd PATHDIR + * + * Set GDB's working directory. + * + * + */ +public class MIEnvironmentCD extends MICommand +{ + public MIEnvironmentCD(String path) { + super("-environment-cd", new String[]{path}); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentDirectory.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentDirectory.java new file mode 100644 index 00000000000..89c67aca43b --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentDirectory.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -environment-directory PATHDIR + * + * Add directory PATHDIR to beginning of search path for source files. + * + */ +public class MIEnvironmentDirectory extends MICommand +{ + public MIEnvironmentDirectory(String path) { + super("-environment-directory", new String[]{path}); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPWD.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPWD.java new file mode 100644 index 00000000000..3c68b3d7adb --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPWD.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -environment-pwd + * + * Show the current working directory. + * + */ +public class MIEnvironmentPWD extends MICommand +{ + public MIEnvironmentPWD() { + super("-environment-pwd"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPath.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPath.java new file mode 100644 index 00000000000..7f4dd1f4fac --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIEnvironmentPath.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -environment-path ( PATHDIR )+ + * + * Add directories PATHDIR to beginning of search path for object files. + * + */ +public class MIEnvironmentPath extends MICommand +{ + public MIEnvironmentPath(String[] paths) { + super("-environment-path", paths); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecArguments.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecArguments.java new file mode 100644 index 00000000000..17cf2c15926 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecArguments.java @@ -0,0 +1,22 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-arguments ARGS + * + * Set the inferior program arguments, to be used in the next + * `-exec-run'. + * + */ +public class MIExecArguments extends MICommand +{ + public MIExecArguments(String[] args) { + super("-exec-arguments", args); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecContinue.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecContinue.java new file mode 100644 index 00000000000..a9a9b5a7325 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecContinue.java @@ -0,0 +1,22 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-continue + * + * Asynchronous command. Resumes the execution of the inferior program + * until a breakpoint is encountered, or until the inferior exits. + * + */ +public class MIExecContinue extends MICommand +{ + public MIExecContinue() { + super("-exec-continue"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecFinish.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecFinish.java new file mode 100644 index 00000000000..9d71a839ced --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecFinish.java @@ -0,0 +1,23 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-finish + * + * Asynchronous command. Resumes the execution of the inferior program + * until the current function is exited. Displays the results returned by + * the function. + * + */ +public class MIExecFinish extends MICommand +{ + public MIExecFinish() { + super("-exec-finish"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecInterrupt.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecInterrupt.java new file mode 100644 index 00000000000..11ad0144408 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecInterrupt.java @@ -0,0 +1,26 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-interrupt + * + * Asynchronous command. Interrupts the background execution of the + * target. Note how the token associated with the stop message is the one + * for the execution command that has been interrupted. The token for the + * interrupt itself only appears in the `^done' output. If the user is + * trying to interrupt a non-running program, an error message will be + * printed. + * + */ +public class MIExecInterrupt extends MICommand +{ + public MIExecInterrupt() { + super("-exec-interrupt"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecNext.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecNext.java new file mode 100644 index 00000000000..ec8c4878298 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecNext.java @@ -0,0 +1,22 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-next + * + * Asynchronous command. Resumes execution of the inferior program, + * stopping when the beginning of the next source line is reached. + * + */ +public class MIExecNext extends MICommand +{ + public MIExecNext() { + super("-exec-next"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecNextInstruction.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecNextInstruction.java new file mode 100644 index 00000000000..a93d3e5edab --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecNextInstruction.java @@ -0,0 +1,24 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-next-instruction + * + * Asynchronous command. Executes one machine instruction. If the + * instruction is a function call continues until the function returns. If + * the program stops at an instruction in the middle of a source line, the + * address will be printed as well. + * + */ +public class MIExecNextInstruction extends MICommand +{ + public MIExecNextInstruction() { + super("-exec-next-instruction"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecReturn.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecReturn.java new file mode 100644 index 00000000000..f1f946664e2 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecReturn.java @@ -0,0 +1,22 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-return + * + * Makes current function return immediately. Doesn't execute the + * inferior. Displays the new current frame. + * + */ +public class MIExecReturn extends MICommand +{ + public MIExecReturn() { + super("-exec-return"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecRun.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecRun.java new file mode 100644 index 00000000000..a3bfb41539f --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecRun.java @@ -0,0 +1,23 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-run + * + * Asynchronous command. Starts execution of the inferior from the + * beginning. The inferior executes until either a breakpoint is + * encountered or the program exits. + * + */ +public class MIExecRun extends MICommand +{ + public MIExecRun(String[] args) { + super("-exec-run", args); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecStep.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecStep.java new file mode 100644 index 00000000000..4bf36936951 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecStep.java @@ -0,0 +1,24 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-step + * + * Asynchronous command. Resumes execution of the inferior program, + * stopping when the beginning of the next source line is reached, if the + * next source line is not a function call. If it is, stop at the first + * instruction of the called function. + * + */ +public class MIExecStep extends MICommand +{ + public MIExecStep() { + super("-exec-step"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecStepInstruction.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecStepInstruction.java new file mode 100644 index 00000000000..f521e0fe92f --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecStepInstruction.java @@ -0,0 +1,25 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-step-instruction + + * Asynchronous command. Resumes the inferior which executes one + * machine instruction. The output, once GDB has stopped, will vary + * depending on whether we have stopped in the middle of a source line or + * not. In the former case, the address at which the program stopped will + * be printed as well. + * + */ +public class MIExecStepInstruction extends MICommand +{ + public MIExecStepInstruction() { + super("-exec-step-instruction"); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecUntil.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecUntil.java new file mode 100644 index 00000000000..bdf98e68a1a --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIExecUntil.java @@ -0,0 +1,29 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -exec-until [ LOCATION ] + * + * Asynchronous command. Executes the inferior until the LOCATION + * specified in the argument is reached. If there is no argument, the + * inferior executes until a source line greater than the current one is + * reached. The reason for stopping in this case will be + * `location-reached'. + * + */ +public class MIExecUntil extends MICommand +{ + public MIExecUntil() { + super("-exec-until"); + } + + public MIExecUntil(String loc) { + super("-exec-until", new String[]{loc}); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIFileExecFile.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIFileExecFile.java new file mode 100644 index 00000000000..1abda350dd9 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIFileExecFile.java @@ -0,0 +1,25 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -file-exec-file FILE + * + * Specify the executable file to be debugged. Unlike + * `-file-exec-and-symbols', the symbol table is _not_ read from this + * file. If used without argument, GDB clears the information about the + * executable file. No output is produced, except a completion + * notification. + * + */ +public class MIFileExecFile extends MICommand +{ + public MIFileExecFile(String file) { + super("-file-exec-file", new String[]{file}); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIFileSymbolFile.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIFileSymbolFile.java new file mode 100644 index 00000000000..284b37f90d3 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIFileSymbolFile.java @@ -0,0 +1,23 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -file-symbol-file FILE + * + * Read symbol table info from the specified FILE argument. When used + * without arguments, clears GDB's symbol table info. No output is + * produced, except for a completion notification. + * + */ +public class MIFileSymbolFile extends MICommand +{ + public MIFileSymbolFile(String file) { + super("-file-symbol-file", new String[]{file}); + } +} diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIGDBExit.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIGDBExit.java new file mode 100644 index 00000000000..88cb763f86d --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MIGDBExit.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.mi.core.command; + +/** + * + * -gdb-exit + * + * Exit GDB immediately. + * + */ +public class MIGDBExit extends MICommand +{ + public MIGDBExit() { + super("-gdb-exit"); + } +}