SIGTRAP

SIGTRAP

Infobox Computing signal
description = Trace/breakpoint trap
action = Abnormal termination of the process
TRAP_BRKPT | Process breakpoint
TRAP_TRACE | Process trace trap
On POSIX-compliant platforms, SIGTRAP is the signal thrown by computer programs when a condition arises that a debugger has requested to be informed of. In source code, SIGTRAP is a symbolic constant defined in the header file signal.h. Signal names are used instead of bare numbers because signal numbers can vary across platforms.

Etymology

"SIG" is a common prefix for signal names. "TRAP" refers to the intent of a debugger to trap (detect) an interesting condition.

Usage

When debugging a program, it is often useful to run the program until a particular condition arises — for example, when a particular function is executed, or when a particular variable changes value. Although the debugger could repeatedly pause the program, checking the condition at each instruction, to do so would be very slow. More efficient is to request that the hardware itself determine when a condition obtains (e.g. when a particular memory segment is read, written or executed) and signal when this happens; this signal is then converted by the kernel into SIGTRAP, sent to the process being debugged. The debugger catches the signal, confirms for itself whether the condition has occurred, and if so pauses execution of the process and informs the developer.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • SIGTRAP — Описание: Отладочная ловушка По умолчанию: завершение процесса коды SA SIGINFO TRAP BRKPT Достигнута точка останова TRAP TRACE Шаг трассировки выполнен В POSIX системах, SIGTRAP  сигнал, посылаемый для информирования отладчика о… …   Википедия

  • SIGTRAP — Trace Trap Signal (bei Breakpoints) (Signal Nr. 5) unter X/Open UNIX ( >xedit /usr/include/signal.h) …   Acronyms

  • SIGTRAP — Trace Trap Signal (bei Breakpoints) (Signal Nr. 5) unter X/Open UNIX ( >xedit /usr/include/signal.h) …   Acronyms von A bis Z

  • Signal (computing) — A signal is a limited form of inter process communication used in Unix, Unix like, and other POSIX compliant operating systems. Essentially it is an asynchronous notification sent to a process in order to notify it of an event that occurred. When …   Wikipedia

  • Trap (computing) — Kernel trap redirects here. For the website, see KernelTrap. In computing and operating systems, a trap, also known as an exception or a fault, is typically[NB 1][1] a type of synchronous interrupt typically caused by an exceptional condition… …   Wikipedia

  • SIGQUIT — Ein Signal ist eine Systemnachricht an einen laufenden Prozess. Signale sind eine primitive Form von Interprozesskommunikation. Die meisten Signale bewirken auch eine Aktion – meist das Beenden des Prozesses. Andere hingegen dienen lediglich der… …   Deutsch Wikipedia

  • SIGTSTP — Ein Signal ist eine Systemnachricht an einen laufenden Prozess. Signale sind eine primitive Form von Interprozesskommunikation. Die meisten Signale bewirken auch eine Aktion – meist das Beenden des Prozesses. Andere hingegen dienen lediglich der… …   Deutsch Wikipedia

  • Signal (Computer) — Ein Signal ist eine Systemnachricht an einen laufenden Prozess. Signale sind eine primitive Form von Interprozesskommunikation. Die meisten Signale bewirken auch eine Aktion – meist das Beenden des Prozesses. Andere hingegen dienen lediglich der… …   Deutsch Wikipedia

  • Kill (Unix) — En informatique, kill est une commande de certains systèmes d exploitation (particulièrement Unix et ses dérivés) utilisée pour demander l arrêt d un processus en cours d exécution. Sommaire 1 Implémentations 2 Exemples 3 Voir aus …   Wikipédia en Français

  • SIGALRM — Au sein des plateformes répondant aux normes POSIX, SIGALRM est le signal envoyé à un processus lorsqu une limite de temps est écoulée. La constante symbolique du pré processeur C pour SIGALRM est définie dans le fichier d en tête signal.h. Les… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”