< prev index next >
test/jdk/com/sun/jdi/lib/jdb/Jdb.java
Print this page
*** 205,214 ****
--- 205,218 ----
throw new RuntimeException("waitForPrompt timed out after " + (timeout/1000)
+ " seconds, looking for '" + promptPattern + "', in " + lines + " lines");
}
public List<String> command(JdbCommand cmd) {
+ return command(cmd, false);
+ }
+
+ public List<String> command(JdbCommand cmd, boolean waitForSimplePrompt) {
if (!jdb.isAlive()) {
if (cmd.allowExit) {
// return remaining output
return outputHandler.reset();
}
*** 221,231 ****
if (inputWriter.checkError()) {
throw new RuntimeException("Unexpected IO error while writing command '" + cmd.cmd + "' to jdb stdin stream");
}
! return waitForPrompt(1, cmd.allowExit);
}
public List<String> command(String cmd) {
return command(new JdbCommand(cmd));
}
--- 225,235 ----
if (inputWriter.checkError()) {
throw new RuntimeException("Unexpected IO error while writing command '" + cmd.cmd + "' to jdb stdin stream");
}
! return waitForSimplePrompt ? waitForSimplePrompt(1, cmd.allowExit) : waitForPrompt(1, cmd.allowExit);
}
public List<String> command(String cmd) {
return command(new JdbCommand(cmd));
}
< prev index next >