Search in sources :

Example 6 with GdbOutput

use of org.eclipse.che.plugin.gdb.server.parser.GdbOutput in project che by eclipse.

the class Gdb method file.

/**
     * `file` command.
     */
public void file(@NotNull String file) throws IOException, InterruptedException, DebuggerException {
    GdbOutput gdbOutput = sendCommand("file " + file);
    GdbFile.parse(gdbOutput);
}
Also used : GdbOutput(org.eclipse.che.plugin.gdb.server.parser.GdbOutput)

Example 7 with GdbOutput

use of org.eclipse.che.plugin.gdb.server.parser.GdbOutput in project che by eclipse.

the class Gdb method targetRemote.

/**
     * `target remote` command.
     */
public void targetRemote(String host, int port) throws IOException, InterruptedException, DebuggerException {
    String command = "target remote " + (host != null ? host : "") + ":" + port;
    GdbOutput gdbOutput = sendCommand(command);
    GdbTargetRemote.parse(gdbOutput);
}
Also used : GdbOutput(org.eclipse.che.plugin.gdb.server.parser.GdbOutput)

Example 8 with GdbOutput

use of org.eclipse.che.plugin.gdb.server.parser.GdbOutput in project che by eclipse.

the class Gdb method breakpoint.

/**
     * `break` command
     */
public void breakpoint(int lineNumber) throws IOException, InterruptedException, DebuggerException {
    String command = "break " + lineNumber;
    GdbOutput gdbOutput = sendCommand(command);
    GdbBreak.parse(gdbOutput);
}
Also used : GdbOutput(org.eclipse.che.plugin.gdb.server.parser.GdbOutput)

Example 9 with GdbOutput

use of org.eclipse.che.plugin.gdb.server.parser.GdbOutput in project che by eclipse.

the class Gdb method grabGdbOutput.

private GdbOutput grabGdbOutput() throws InterruptedException, GdbTerminatedException {
    GdbOutput gdbOutput = outputs.take();
    if (gdbOutput.isTerminated()) {
        String errorMsg = "GDB has been terminated with output: " + gdbOutput.getOutput();
        LOG.error(errorMsg);
        throw new GdbTerminatedException(errorMsg);
    }
    return gdbOutput;
}
Also used : GdbTerminatedException(org.eclipse.che.plugin.gdb.server.exception.GdbTerminatedException) GdbOutput(org.eclipse.che.plugin.gdb.server.parser.GdbOutput)

Aggregations

GdbOutput (org.eclipse.che.plugin.gdb.server.parser.GdbOutput)9 GdbTerminatedException (org.eclipse.che.plugin.gdb.server.exception.GdbTerminatedException)2 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 AbstractLineConsumer (org.eclipse.che.api.core.util.AbstractLineConsumer)1 LineConsumer (org.eclipse.che.api.core.util.LineConsumer)1 Location (org.eclipse.che.api.debug.shared.model.Location)1 DebuggerException (org.eclipse.che.api.debugger.server.exceptions.DebuggerException)1 GdbException (org.eclipse.che.plugin.gdb.server.exception.GdbException)1 GdbBacktrace (org.eclipse.che.plugin.gdb.server.parser.GdbBacktrace)1 GdbPrint (org.eclipse.che.plugin.gdb.server.parser.GdbPrint)1 ProcessInfo (org.eclipse.che.plugin.gdb.server.parser.ProcessInfo)1