Load disassembler by default now that it works on Windows
parent
64e64fd6ae
commit
f04eb21ef5
extra
help/handbook
tools
disassembler
memory
|
@ -161,15 +161,20 @@ ARTICLE: "io" "Input and output"
|
|||
{ $subsection "io.timeouts" } ;
|
||||
|
||||
ARTICLE: "tools" "Developer tools"
|
||||
{ $subsection "tools.annotations" }
|
||||
{ $subsection "tools.crossref" }
|
||||
"Exploratory tools:"
|
||||
{ $subsection "editor" }
|
||||
{ $subsection "tools.crossref" }
|
||||
{ $subsection "inspector" }
|
||||
"Debugging tools:"
|
||||
{ $subsection "tools.annotations" }
|
||||
{ $subsection "tools.test" }
|
||||
{ $subsection "meta-interpreter" }
|
||||
"Performance tools:"
|
||||
{ $subsection "tools.memory" }
|
||||
{ $subsection "profiling" }
|
||||
{ $subsection "tools.test" }
|
||||
{ $subsection "timing" }
|
||||
{ $subsection "tools.disassembler" }
|
||||
"Deployment tools:"
|
||||
{ $subsection "tools.deploy" } ;
|
||||
|
||||
ARTICLE: "article-index" "Article index"
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
IN: tools.disassembler
|
||||
USING: help.markup help.syntax ;
|
||||
|
||||
HELP: disassemble
|
||||
{ $values { "obj" "a word or a pair of addresses" } }
|
||||
{ $description "Disassembles either a compiled word definition or an arbitrary memory range using " { $snippet "gdb" } "." } ;
|
||||
|
||||
ARTICLE: "tools.disassembler" "Disassembling words"
|
||||
"The " { $vocab-link "tools.disassembler" } " vocabulary integrates Factor with the GNU debugger (" { $snippet "gdb" } ") for viewing the assembly code generated by the compiler. It can be used on both Unix and Windows as long as a working copy of " { $snippet "gdb" } " is installed and available in the " { $snippet "PATH" } "."
|
||||
{ $subsection disassemble } ;
|
||||
|
||||
ABOUT: "tools.disassembler"
|
|
@ -2,7 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: io.files io words alien kernel math.parser alien.syntax
|
||||
io.launcher system assocs arrays sequences namespaces qualified
|
||||
regexp system math sequences.lib windows.kernel32 ;
|
||||
system math sequences.lib windows.kernel32 generator.fixup ;
|
||||
IN: tools.disassembler
|
||||
|
||||
: in-file "gdb-in.txt" resource-path ;
|
||||
|
@ -12,7 +12,7 @@ IN: tools.disassembler
|
|||
GENERIC: make-disassemble-cmd ( obj -- )
|
||||
|
||||
M: word make-disassemble-cmd
|
||||
word-xt cell - 2array make-disassemble-cmd ;
|
||||
word-xt code-format - 2array make-disassemble-cmd ;
|
||||
|
||||
M: pair make-disassemble-cmd
|
||||
in-file [
|
||||
|
@ -30,12 +30,9 @@ M: pair make-disassemble-cmd
|
|||
] { } make-assoc run-process drop
|
||||
out-file file-lines ;
|
||||
|
||||
: relevant? ( line -- ? )
|
||||
R/ 0x.*:.*/ matches? ;
|
||||
|
||||
: tabs>spaces ( str -- str' )
|
||||
CHAR: \t CHAR: \s replace ;
|
||||
|
||||
: disassemble ( word -- )
|
||||
make-disassemble-cmd run-gdb
|
||||
[ relevant? ] subset [ tabs>spaces ] map [ print ] each ;
|
||||
[ tabs>spaces ] map [ print ] each ;
|
||||
|
|
|
@ -17,7 +17,7 @@ ARTICLE: "tools.memory" "Object memory tools"
|
|||
"The garbage collector can be invoked manually:"
|
||||
{ $subsection data-gc }
|
||||
{ $subsection code-gc }
|
||||
{ $see-also "image" } ;
|
||||
{ $see-also "images" } ;
|
||||
|
||||
ABOUT: "tools.memory"
|
||||
|
||||
|
|
Loading…
Reference in New Issue