! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.strings arrays assocs classes
classes.builtin classes.mixin classes.tuple classes.tuple.parser
-combinators combinators.short-circuit compiler.errors compiler.units
-continuations definitions destructors effects.parser fry generic
-generic.math generic.parser generic.single grouping io io.encodings
-io.styles kernel kernel.private lexer libc make math math.order
-math.parser math.ratios namespaces parser prettyprint sequences
-sequences.private slots source-files.errors strings strings.parser
-summary system vocabs vocabs.loader vocabs.parser words ;
+combinators combinators.short-circuit compiler.errors
+compiler.units continuations definitions destructors
+effects.parser fry generic generic.math generic.parser
+generic.single grouping io io.encodings io.styles kernel
+kernel.private lexer libc make math math.order math.parser
+math.ratios namespaces parser prettyprint sequences
+sequences.private slots source-files.errors strings
+strings.parser summary system vocabs vocabs.loader vocabs.parser
+words ;
IN: debugger
GENERIC: error-help ( error -- topic )
drop "Caller not compiled with the optimizing compiler" ;
{ "threads" "debugger" } "debugger.threads" require-when
+
+os unix? [ "debugger.unix" require ] when
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors debugger io kernel math prettyprint sequences
-system unix.signals ;
+USING: debugger io kernel prettyprint sequences system
+unix.signals ;
IN: debugger.unix
-: signal-name. ( n -- )
- signal-name [ " (" ")" surround write ] when* ;
-
M: unix signal-error. ( obj -- )
"Unix signal #" write
third [ pprint ] [ signal-name. ] bi nl ;
! Copyright (C) 2011 Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs kernel math namespaces sequences threads ;
+USING: accessors assocs io kernel math namespaces sequences
+system threads ;
IN: unix.signals
CONSTANT: signal-names
M: integer signal-name ( n -- str/f ) 1 - signal-names ?nth ;
+: signal-name. ( n -- )
+ signal-name [ " (" ")" surround write ] when* ;
+
SYMBOL: dispatch-signal-hook
dispatch-signal-hook [ [ drop ] ] initialize