diff options
author | Emile <git@emile.space> | 2024-11-09 18:59:34 +0100 |
---|---|---|
committer | Emile <git@emile.space> | 2024-11-09 18:59:34 +0100 |
commit | 795ff164d007f730bae2a0dd261ad6e4bdb20b90 (patch) | |
tree | a9d6d5e036e8baa75229b740fe070fffb2fec596 /src/battle.go | |
parent | 551fa2c7d5f6266153a99c7cfa914cf86a2e7dd1 (diff) |
Diffstat (limited to 'src/battle.go')
-rw-r--r-- | src/battle.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/battle.go b/src/battle.go index 3f82cf7..af7043b 100644 --- a/src/battle.go +++ b/src/battle.go @@ -1463,8 +1463,6 @@ func battleRunHandler(w http.ResponseWriter, r *http.Request) { // TODO(emile): [L] implement some kind of queue - // TODO(emile): [S] use the information given from the battle, such as the right arch and bits - rawOutput += "[0x00000000]> # initializing the vm and the stack\n" cmd = "aei" output, _ = r2cmd(r2p1, cmd) @@ -1552,6 +1550,9 @@ func battleRunHandler(w http.ResponseWriter, r *http.Request) { rawOutput += fmt.Sprintf("[0x00000000]> ########################################################################\n") + rawOutput += "[0x00000000]> # Loading the registers\n" + r2cmd(r2p1, runtimeBots[currentBotId].Regs) + // this is architecture agnostic and just gets the program counter pc, _ := r2cmd(r2p1, "aer~$(arn PC)~[1]") @@ -1569,8 +1570,6 @@ func battleRunHandler(w http.ResponseWriter, r *http.Request) { rawOutput += fmt.Sprintf("[0x00000000]> %s\n%s", cmd, output) // load registers - rawOutput += "[0x00000000]> # Loading the registers\n" - r2cmd(r2p1, runtimeBots[currentBotId].Regs) // rawOutput += fmt.Sprintf("%+v\n", runtimeBots[currentBotId].Regs) // cmd = "dr" |