mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-860: Windows debuggers take their prompts from the engine.
This commit is contained in:
parent
b7a1d4bfd4
commit
d4182c2410
5 changed files with 61 additions and 13 deletions
|
@ -18,6 +18,7 @@ package agent.dbgmodel.dbgmodel;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.junit.Before;
|
||||
|
@ -44,7 +45,7 @@ public class DbgModelSetContextMWETest extends AbstractGhidraHeadlessIntegration
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMWE() {
|
||||
public void testMWE() throws IOException {
|
||||
HostDataModelAccess access = DbgModel.debugCreate();
|
||||
DebugClient client = access.getClient();
|
||||
DebugControl control = client.getControl();
|
||||
|
@ -272,12 +273,6 @@ public class DbgModelSetContextMWETest extends AbstractGhidraHeadlessIntegration
|
|||
DebugStatus status = super.exitThread(exitCode);
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DebugStatus changeSymbolState(BitmaskSet<ChangeSymbolState> flags,
|
||||
long argument) {
|
||||
return defaultStatus;
|
||||
}
|
||||
};
|
||||
|
||||
try (ProcMaker maker = new ProcMaker(client, "C:\\Software\\Winmine__XP.exe")) {
|
||||
|
@ -317,6 +312,17 @@ public class DbgModelSetContextMWETest extends AbstractGhidraHeadlessIntegration
|
|||
}
|
||||
cb.dumpFrame0ViaDX();
|
||||
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
|
||||
while (true) {
|
||||
System.err.print(control.getPromptText());
|
||||
//control.prompt(BitmaskSet.of(), "Hello?>");
|
||||
String cmd = in.readLine();
|
||||
control.execute(cmd);
|
||||
if (control.getExecutionStatus().shouldWait) {
|
||||
control.waitForEvent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Didn't finish because the SetContext failed issue turned out to be mixed and/or
|
||||
* broken DLLs.
|
||||
|
|
|
@ -1124,4 +1124,9 @@ public class DbgModelTest extends AbstractGhidraHeadlessIntegrationTest {
|
|||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testPrompt() throws Exception {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue