mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2467: Change SleighProgramCompiler to use String (text block) instead of List<String>
This commit is contained in:
parent
6a2cd80550
commit
9d6f278f39
48 changed files with 730 additions and 613 deletions
|
@ -22,7 +22,6 @@
|
|||
//@toolbar
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
|
||||
import ghidra.app.plugin.assembler.Assembler;
|
||||
import ghidra.app.plugin.assembler.Assemblers;
|
||||
|
@ -184,10 +183,11 @@ public class StandAloneSyscallEmuExampleScript extends GhidraScript {
|
|||
/*
|
||||
* Initialize the thread
|
||||
*/
|
||||
PcodeProgram init = SleighProgramCompiler.compileProgram(language, "init", List.of(
|
||||
"RIP = 0x" + entry + ";",
|
||||
"RSP = 0x00001000;"),
|
||||
library);
|
||||
PcodeProgram init =
|
||||
SleighProgramCompiler.compileProgram(language, "init", String.format("""
|
||||
RIP = 0x%s;
|
||||
RSP = 0x00001000;
|
||||
""", entry), library);
|
||||
thread.getExecutor().execute(init, library);
|
||||
thread.overrideContextWithDefault();
|
||||
thread.reInitialize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue