parent
d77c84be19
commit
09569ee512
extra
io
tools/disassembler
windows/kernel32
|
@ -76,6 +76,8 @@ SYMBOL: +append-environment+
|
|||
{ [ dup assoc? ] [ >hashtable ] }
|
||||
} cond ;
|
||||
|
||||
HOOK: current-process-handle io-backend ( -- handle )
|
||||
|
||||
HOOK: run-process* io-backend ( desc -- handle )
|
||||
|
||||
: wait-for-process ( process -- status )
|
||||
|
|
|
@ -4,7 +4,7 @@ USING: io io.backend io.launcher io.unix.backend io.unix.files
|
|||
io.nonblocking sequences kernel namespaces math system
|
||||
alien.c-types debugger continuations arrays assocs
|
||||
combinators unix.process parser-combinators memoize
|
||||
promises strings threads ;
|
||||
promises strings threads unix ;
|
||||
IN: io.unix.launcher
|
||||
|
||||
! Search unix first
|
||||
|
@ -71,6 +71,8 @@ MEMO: 'arguments' ( -- parser )
|
|||
io-error
|
||||
] [ error. :c flush ] recover 1 exit ;
|
||||
|
||||
M: unix-io current-process-handle ( -- handle ) getpid ;
|
||||
|
||||
M: unix-io run-process* ( desc -- pid )
|
||||
[
|
||||
[ spawn-process ] [ ] with-fork <process>
|
||||
|
|
|
@ -102,6 +102,9 @@ M: windows-ce-io fill-redirection ;
|
|||
fill-lpEnvironment
|
||||
fill-startup-info ;
|
||||
|
||||
M: windows-io current-process-handle ( -- handle )
|
||||
GetCurrentProcessId ;
|
||||
|
||||
M: windows-io run-process* ( desc -- handle )
|
||||
[
|
||||
[
|
||||
|
|
|
@ -2,8 +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 ;
|
||||
QUALIFIED: unix
|
||||
regexp system math sequences.lib windows.kernel32 ;
|
||||
IN: tools.disassembler
|
||||
|
||||
: in-file "gdb-in.txt" resource-path ;
|
||||
|
@ -18,8 +17,7 @@ M: word make-disassemble-cmd
|
|||
M: pair make-disassemble-cmd
|
||||
in-file [
|
||||
"attach " write
|
||||
unix:getpid number>string print
|
||||
|
||||
current-process-handle number>string print
|
||||
"disassemble " write
|
||||
[ number>string write bl ] each
|
||||
] with-file-out ;
|
||||
|
|
|
@ -895,7 +895,7 @@ FUNCTION: DWORD GetConsoleTitleW ( LPWSTR lpConsoleTitle, DWORD nSize ) ;
|
|||
FUNCTION: BOOL GetCurrentDirectoryW ( DWORD len, LPTSTR buf ) ;
|
||||
: GetCurrentDirectory GetCurrentDirectoryW ; inline
|
||||
FUNCTION: HANDLE GetCurrentProcess ( ) ;
|
||||
! FUNCTION: GetCurrentProcessId
|
||||
FUNCTION: DWORD GetCurrentProcessId ( ) ;
|
||||
FUNCTION: HANDLE GetCurrentThread ( ) ;
|
||||
! FUNCTION: GetCurrentThreadId
|
||||
! FUNCTION: GetDateFormatA
|
||||
|
|
Loading…
Reference in New Issue