use of org.eclipse.che.plugin.gdb.server.exception.GdbParseException in project che by eclipse.
the class GdbDebugger method stepInto.
@Override
public void stepInto(StepIntoAction action) throws DebuggerException {
try {
GdbInfoLine gdbInfoLine = gdb.step();
if (gdbInfoLine == null) {
disconnect();
return;
}
currentLocation = gdbInfoLine.getLocation();
debuggerCallback.onEvent(new SuspendEventImpl(gdbInfoLine.getLocation()));
} catch (GdbTerminatedException e) {
disconnect();
throw e;
} catch (IOException | GdbParseException | InterruptedException e) {
throw new DebuggerException("Step into error. " + e.getMessage(), e);
}
}
use of org.eclipse.che.plugin.gdb.server.exception.GdbParseException in project che by eclipse.
the class GdbDebugger method getValue.
@Override
public SimpleValue getValue(VariablePath variablePath) throws DebuggerException {
try {
List<String> path = variablePath.getPath();
if (path.isEmpty()) {
throw new DebuggerException("Variable path is empty");
}
GdbPrint gdbPrint = gdb.print(path.get(0));
return new SimpleValueImpl(Collections.emptyList(), gdbPrint.getValue());
} catch (GdbTerminatedException e) {
disconnect();
throw e;
} catch (IOException | GdbParseException | InterruptedException e) {
throw new DebuggerException("Can't get value for " + variablePath + ". " + e.getMessage(), e);
}
}
use of org.eclipse.che.plugin.gdb.server.exception.GdbParseException in project che by eclipse.
the class GdbBreak method parse.
/**
* Factory method.
*/
public static GdbBreak parse(GdbOutput gdbOutput) throws GdbParseException {
String output = gdbOutput.getOutput();
Matcher matcher = GDB_BREAK.matcher(output);
if (matcher.find()) {
String address = matcher.group(2);
String file = matcher.group(3);
String lineNumber = matcher.group(4);
return new GdbBreak(address, file, lineNumber);
}
throw new GdbParseException(GdbBreak.class, output);
}
use of org.eclipse.che.plugin.gdb.server.exception.GdbParseException in project che by eclipse.
the class GdbClear method parse.
/**
* Factory method.
*/
public static GdbClear parse(GdbOutput gdbOutput) throws GdbParseException {
String output = gdbOutput.getOutput();
Matcher matcher = GDB_CLEAR.matcher(output);
if (matcher.find()) {
return new GdbClear();
}
throw new GdbParseException(GdbClear.class, output);
}
use of org.eclipse.che.plugin.gdb.server.exception.GdbParseException in project che by eclipse.
the class GdbPType method parse.
/**
* Factory method.
*/
public static GdbPType parse(GdbOutput gdbOutput) throws GdbParseException {
String output = gdbOutput.getOutput();
Matcher matcher = GDB_ARGS.matcher(output);
if (matcher.find()) {
String type = matcher.group(1);
return new GdbPType(type);
}
throw new GdbParseException(GdbPrint.class, output);
}
Aggregations