Fix GDB-based disassemble for GDB 7

db4
Erik Charlebois 2011-05-19 18:28:10 -04:00
parent 013209bd17
commit 91e94a8438
1 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
USING: io.files io.files.temp io words alien kernel math.parser USING: io.files io.files.temp io words alien kernel math.parser
alien.syntax io.launcher assocs arrays sequences namespaces make alien.syntax io.launcher assocs arrays sequences namespaces make
system math io.encodings.ascii accessors tools.disassembler system math io.encodings.ascii accessors tools.disassembler
tools.disassembler.private ; tools.disassembler.private locals ;
IN: tools.disassembler.gdb IN: tools.disassembler.gdb
SINGLETON: gdb-disassembler SINGLETON: gdb-disassembler
@ -12,12 +12,12 @@ SINGLETON: gdb-disassembler
: out-file ( -- path ) "gdb-out.txt" temp-file ; : out-file ( -- path ) "gdb-out.txt" temp-file ;
: make-disassemble-cmd ( from to -- ) :: make-disassemble-cmd ( from to -- )
in-file ascii [ in-file ascii [
"attach " write "attach " write
current-process-handle number>string print current-process-handle number>string print
"disassemble " write "x/" write to from - 4 / number>string write
[ number>string write bl ] bi@ "i" write bl from number>string write
] with-file-writer ; ] with-file-writer ;
: gdb-binary ( -- string ) "gdb" ; : gdb-binary ( -- string ) "gdb" ;