1<html lang="en"> 2<head> 3<title>Thread Stops - Debugging with GDB</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Debugging with GDB"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Stopping.html#Stopping" title="Stopping"> 9<link rel="prev" href="Signals.html#Signals" title="Signals"> 10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 11<!-- 12Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 131998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 14Free Software Foundation, Inc. 15 16Permission is granted to copy, distribute and/or modify this document 17under the terms of the GNU Free Documentation License, Version 1.3 or 18any later version published by the Free Software Foundation; with the 19Invariant Sections being ``Free Software'' and ``Free Software Needs 20Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,'' 21and with the Back-Cover Texts as in (a) below. 22 23(a) The FSF's Back-Cover Text is: ``You are free to copy and modify 24this GNU Manual. Buying copies from GNU Press supports the FSF in 25developing GNU and promoting software freedom.''--> 26<meta http-equiv="Content-Style-Type" content="text/css"> 27<style type="text/css"><!-- 28 pre.display { font-family:inherit } 29 pre.format { font-family:inherit } 30 pre.smalldisplay { font-family:inherit; font-size:smaller } 31 pre.smallformat { font-family:inherit; font-size:smaller } 32 pre.smallexample { font-size:smaller } 33 pre.smalllisp { font-size:smaller } 34 span.sc { font-variant:small-caps } 35 span.roman { font-family:serif; font-weight:normal; } 36 span.sansserif { font-family:sans-serif; font-weight:normal; } 37--></style> 38<link rel="stylesheet" type="text/css" href="../cs.css"> 39</head> 40<body> 41<div class="node"> 42<a name="Thread-Stops"></a> 43<p> 44Previous: <a rel="previous" accesskey="p" href="Signals.html#Signals">Signals</a>, 45Up: <a rel="up" accesskey="u" href="Stopping.html#Stopping">Stopping</a> 46<hr> 47</div> 48 49<h3 class="section">5.4 Stopping and Starting Multi-thread Programs</h3> 50 51<p><a name="index-stopped-threads-314"></a><a name="index-threads_002c-stopped-315"></a> 52<a name="index-continuing-threads-316"></a><a name="index-threads_002c-continuing-317"></a> 53<span class="sc">gdb</span> supports debugging programs with multiple threads 54(see <a href="Threads.html#Threads">Debugging Programs with Multiple Threads</a>). There 55are two modes of controlling execution of your program within the 56debugger. In the default mode, referred to as <dfn>all-stop mode</dfn>, 57when any thread in your program stops (for example, at a breakpoint 58or while being stepped), all other threads in the program are also stopped by 59<span class="sc">gdb</span>. On some targets, <span class="sc">gdb</span> also supports 60<dfn>non-stop mode</dfn>, in which other threads can continue to run freely while 61you examine the stopped thread in the debugger. 62 63<ul class="menu"> 64<li><a accesskey="1" href="All_002dStop-Mode.html#All_002dStop-Mode">All-Stop Mode</a>: All threads stop when GDB takes control 65<li><a accesskey="2" href="Non_002dStop-Mode.html#Non_002dStop-Mode">Non-Stop Mode</a>: Other threads continue to execute 66<li><a accesskey="3" href="Background-Execution.html#Background-Execution">Background Execution</a>: Running your program asynchronously 67<li><a accesskey="4" href="Thread_002dSpecific-Breakpoints.html#Thread_002dSpecific-Breakpoints">Thread-Specific Breakpoints</a>: Controlling breakpoints 68<li><a accesskey="5" href="Interrupted-System-Calls.html#Interrupted-System-Calls">Interrupted System Calls</a>: GDB may interfere with system calls 69<li><a accesskey="6" href="Observer-Mode.html#Observer-Mode">Observer Mode</a>: GDB does not alter program behavior 70</ul> 71 72 </body></html> 73 74