use of org.eclipse.che.plugin.gdb.server.parser.GdbInfoLine in project che by eclipse.
the class GdbDebugger method stepOut.
@Override
public void stepOut(StepOutAction action) throws DebuggerException {
try {
GdbInfoLine gdbInfoLine = gdb.finish();
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 out error. " + e.getMessage(), e);
}
}
use of org.eclipse.che.plugin.gdb.server.parser.GdbInfoLine 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.parser.GdbInfoLine in project che by eclipse.
the class GdbTest method testStep.
@Test
public void testStep() throws Exception {
gdb.file(file);
gdb.breakpoint(7);
gdb.run();
GdbInfoLine gdbInfoLine = gdb.step();
assertNotNull(gdbInfoLine.getLocation());
gdbInfoLine = gdb.step();
assertNotNull(gdbInfoLine.getLocation());
}
use of org.eclipse.che.plugin.gdb.server.parser.GdbInfoLine in project che by eclipse.
the class GdbDebugger method stepOver.
@Override
public void stepOver(StepOverAction action) throws DebuggerException {
try {
GdbInfoLine gdbInfoLine = gdb.next();
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.parser.GdbInfoLine in project che by eclipse.
the class GdbTest method testNext.
@Test
public void testNext() throws Exception {
gdb.file(file);
gdb.breakpoint(7);
gdb.run();
GdbInfoLine gdbInfoLine = gdb.next();
assertNotNull(gdbInfoLine.getLocation());
assertEquals(gdbInfoLine.getLocation().getLineNumber(), 5);
assertEquals(gdbInfoLine.getLocation().getTarget(), "h.cpp");
gdbInfoLine = gdb.next();
assertNotNull(gdbInfoLine.getLocation());
assertEquals(gdbInfoLine.getLocation().getLineNumber(), 6);
assertEquals(gdbInfoLine.getLocation().getTarget(), "h.cpp");
}
Aggregations