version 1.12, 2011/01/15 16:20:00
|
version 1.14, 2011/12/31 15:29:25
|
Line 1
|
Line 1
|
\ dis-gdb.fs disassembler using gdb |
\ dis-gdb.fs disassembler using gdb |
\ |
\ |
\ Copyright (C) 2004,2007,2008,2010 Free Software Foundation, Inc. |
\ Copyright (C) 2004,2007,2008,2010,2011 Free Software Foundation, Inc. |
|
|
\ This file is part of Gforth. |
\ This file is part of Gforth. |
|
|
Line 30 defer gdb-addr-sep-char ( -- c )
|
Line 30 defer gdb-addr-sep-char ( -- c )
|
\ gdb-7.0 and earlier do what we want with "disassemble addr1 addr2" |
\ gdb-7.0 and earlier do what we want with "disassemble addr1 addr2" |
\ gdb-7.1 and later only work with "disaesemble addr1,addr2" |
\ gdb-7.1 and later only work with "disaesemble addr1,addr2" |
\ try the old syntax to see if it works |
\ try the old syntax to see if it works |
s" gdb -q -ex 'disassemble 0 1' -ex 'quit' 2>/dev/null" r/o open-pipe throw |
s" gdb -ex 'disassemble 0 1' -ex 'quit' 2>/dev/null" r/o open-pipe throw |
dup slurp-fid rot close-pipe throw drop |
dup slurp-fid rot close-pipe throw drop |
s" Dump of assembler code from" string-prefix? if |
s" Dump of assembler code from" search nip nip if |
['] bl |
['] bl |
else |
else |
['] #comma |
['] #comma |