void ensure_debug_mode() {
if (!debug_mode) {
- printf("m 0\nD\n");
- flush_reply();
+ printf("D\n");
+ flush_input();
debug_mode = true;
}
}
throws IOException, InterruptedException {
byte[] data = new byte[length];
- flush_reply();
+ flush_input();
ensure_debug_mode();
printf("I %x %x\n", length, address);
int i = 0;
public byte[] read_bytes(int length)
throws IOException, InterruptedException {
- flush_reply();
+ flush_input();
ensure_debug_mode();
printf("G %x\n", length);
int i = 0;