[ ECLiPSe Event built-in.|Group Index| Full Index]

get_interrupt_flag(?Int_Id, ?Mode)

Suceed if Int_id unifies with a valid interrupt identifier and Mode unifies with its debugging mode.

?Int_Id
Free variable, atom or integer.
+Mode
Free variable or Atom.

Description

This predicate is used to get the debugger mode of an interrupt handler.

Int_Id can be any valid interrupt id (signal number or signal name) and Mode can be trace, debug, notrace or nodebug (nodebug is a synonym for notrace).

When Int_Id is a free variable, the interrupt handlers whose debugger mode unifies with Mode are returned on backtracking.

The default mode is nodebug for all interrupt handlers.

Refer to set_interrupt_flag/2 for details on how to use the interrupt flags.

Fail Conditions

None.

Resatisfiable

Yes.

Exceptions

(5) Type error
Mode is instantiated but not to an atom
(5) Type error
Int_Id is not a free variable, an integer or an atom
(6) Range error
Mode is instantiated to an atom but not to one of trace, debug, notrace or nodebug.
(6) Range error
Int_Id is instantiated to an integer that does not correspond to a valid signal or to an atom that is not a signal name.

Examples


Success:
[eclipse]: get_interrupt_flag(Int_Id, Mode).
Int_Id = hup
Mode = nodebug     More? (;)
Int_Id = int
Mode = nodebug     More? (;)
Int_Id = quit
Mode = nodebug     More? (;)
Int_Id = ill
Mode = nodebug     More? (;)
Int_Id = trap
Mode = nodebug     More? (;)    % type return
yes.
[eclipse]: set_interrupt_flag(int, trace).
yes.
[eclipse]: get_interrupt_flag(2, Mod).
Mod = trace
yes.
[eclipse]: % type ^C
B (1) 0  CALL   interrupt_prolog (dbg)?- creep
interruption: type a, b, c, e, or h for help : ? continue
B (1) 0  EXIT   interrupt_prolog (dbg)?- creep

Error:
      get_interrupt_flag(2, "trace").   (Error 5).
      get_interrupt_flag("int", Mode).  (Error 5).
      get_interrupt_flag(int, skip).    (Error 6).
      get_interrupt_flag(123, Mode).    (Error 6).


See Also

current_interrupt / 2, debug / 0, trace / 0