1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- Copyright (C) 1988-2021 Free Software Foundation, Inc. 4 5Permission is granted to copy, distribute and/or modify this document 6under the terms of the GNU Free Documentation License, Version 1.3 or 7any later version published by the Free Software Foundation; with the 8Invariant Sections being "Free Software" and "Free Software Needs 9Free Documentation", with the Front-Cover Texts being "A GNU Manual," 10and with the Back-Cover Texts as in (a) below. 11 12(a) The FSF's Back-Cover Text is: "You are free to copy and modify 13this GNU Manual. Buying copies from GNU Press supports the FSF in 14developing GNU and promoting software freedom." --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>Debugging with GDB: Hurd Native</title> 18 19<meta name="description" content="Debugging with GDB: Hurd Native"> 20<meta name="keywords" content="Debugging with GDB: Hurd Native"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="index.html#Top" rel="start" title="Top"> 26<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> 27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="Native.html#Native" rel="up" title="Native"> 29<link href="Darwin.html#Darwin" rel="next" title="Darwin"> 30<link href="Non_002ddebug-DLL-Symbols.html#Non_002ddebug-DLL-Symbols" rel="previous" title="Non-debug DLL Symbols"> 31<style type="text/css"> 32<!-- 33a.summary-letter {text-decoration: none} 34blockquote.smallquotation {font-size: smaller} 35div.display {margin-left: 3.2em} 36div.example {margin-left: 3.2em} 37div.indentedblock {margin-left: 3.2em} 38div.lisp {margin-left: 3.2em} 39div.smalldisplay {margin-left: 3.2em} 40div.smallexample {margin-left: 3.2em} 41div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 42div.smalllisp {margin-left: 3.2em} 43kbd {font-style:oblique} 44pre.display {font-family: inherit} 45pre.format {font-family: inherit} 46pre.menu-comment {font-family: serif} 47pre.menu-preformatted {font-family: serif} 48pre.smalldisplay {font-family: inherit; font-size: smaller} 49pre.smallexample {font-size: smaller} 50pre.smallformat {font-family: inherit; font-size: smaller} 51pre.smalllisp {font-size: smaller} 52span.nocodebreak {white-space:nowrap} 53span.nolinebreak {white-space:nowrap} 54span.roman {font-family:serif; font-weight:normal} 55span.sansserif {font-family:sans-serif; font-weight:normal} 56ul.no-bullet {list-style: none} 57--> 58</style> 59 60 61</head> 62 63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 64<a name="Hurd-Native"></a> 65<div class="header"> 66<p> 67Next: <a href="Darwin.html#Darwin" accesskey="n" rel="next">Darwin</a>, Previous: <a href="Cygwin-Native.html#Cygwin-Native" accesskey="p" rel="previous">Cygwin Native</a>, Up: <a href="Native.html#Native" accesskey="u" rel="up">Native</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 68</div> 69<hr> 70<a name="Commands-Specific-to-GNU-Hurd-Systems"></a> 71<h4 class="subsection">21.1.5 Commands Specific to <small>GNU</small> Hurd Systems</h4> 72<a name="index-GNU-Hurd-debugging"></a> 73 74<p>This subsection describes <small>GDB</small> commands specific to the 75<small>GNU</small> Hurd native debugging. 76</p> 77<dl compact="compact"> 78<dt><code>set signals</code></dt> 79<dt><code>set sigs</code></dt> 80<dd><a name="index-set-signals_002c-Hurd-command"></a> 81<a name="index-set-sigs_002c-Hurd-command"></a> 82<p>This command toggles the state of inferior signal interception by 83<small>GDB</small>. Mach exceptions, such as breakpoint traps, are not 84affected by this command. <code>sigs</code> is a shorthand alias for 85<code>signals</code>. 86</p> 87</dd> 88<dt><code>show signals</code></dt> 89<dt><code>show sigs</code></dt> 90<dd><a name="index-show-signals_002c-Hurd-command"></a> 91<a name="index-show-sigs_002c-Hurd-command"></a> 92<p>Show the current state of intercepting inferior’s signals. 93</p> 94</dd> 95<dt><code>set signal-thread</code></dt> 96<dt><code>set sigthread</code></dt> 97<dd><a name="index-set-signal_002dthread"></a> 98<a name="index-set-sigthread"></a> 99<p>This command tells <small>GDB</small> which thread is the <code>libc</code> signal 100thread. That thread is run when a signal is delivered to a running 101process. <code>set sigthread</code> is the shorthand alias of <code>set 102signal-thread</code>. 103</p> 104</dd> 105<dt><code>show signal-thread</code></dt> 106<dt><code>show sigthread</code></dt> 107<dd><a name="index-show-signal_002dthread"></a> 108<a name="index-show-sigthread"></a> 109<p>These two commands show which thread will run when the inferior is 110delivered a signal. 111</p> 112</dd> 113<dt><code>set stopped</code></dt> 114<dd><a name="index-set-stopped_002c-Hurd-command"></a> 115<p>This commands tells <small>GDB</small> that the inferior process is stopped, 116as with the <code>SIGSTOP</code> signal. The stopped process can be 117continued by delivering a signal to it. 118</p> 119</dd> 120<dt><code>show stopped</code></dt> 121<dd><a name="index-show-stopped_002c-Hurd-command"></a> 122<p>This command shows whether <small>GDB</small> thinks the debuggee is 123stopped. 124</p> 125</dd> 126<dt><code>set exceptions</code></dt> 127<dd><a name="index-set-exceptions_002c-Hurd-command"></a> 128<p>Use this command to turn off trapping of exceptions in the inferior. 129When exception trapping is off, neither breakpoints nor 130single-stepping will work. To restore the default, set exception 131trapping on. 132</p> 133</dd> 134<dt><code>show exceptions</code></dt> 135<dd><a name="index-show-exceptions_002c-Hurd-command"></a> 136<p>Show the current state of trapping exceptions in the inferior. 137</p> 138</dd> 139<dt><code>set task pause</code></dt> 140<dd><a name="index-set-task_002c-Hurd-commands"></a> 141<a name="index-task-attributes-_0028GNU-Hurd_0029"></a> 142<a name="index-pause-current-task-_0028GNU-Hurd_0029"></a> 143<p>This command toggles task suspension when <small>GDB</small> has control. 144Setting it to on takes effect immediately, and the task is suspended 145whenever <small>GDB</small> gets control. Setting it to off will take 146effect the next time the inferior is continued. If this option is set 147to off, you can use <code>set thread default pause on</code> or <code>set 148thread pause on</code> (see below) to pause individual threads. 149</p> 150</dd> 151<dt><code>show task pause</code></dt> 152<dd><a name="index-show-task_002c-Hurd-commands"></a> 153<p>Show the current state of task suspension. 154</p> 155</dd> 156<dt><code>set task detach-suspend-count</code></dt> 157<dd><a name="index-task-suspend-count"></a> 158<a name="index-detach-from-task_002c-GNU-Hurd"></a> 159<p>This command sets the suspend count the task will be left with when 160<small>GDB</small> detaches from it. 161</p> 162</dd> 163<dt><code>show task detach-suspend-count</code></dt> 164<dd><p>Show the suspend count the task will be left with when detaching. 165</p> 166</dd> 167<dt><code>set task exception-port</code></dt> 168<dt><code>set task excp</code></dt> 169<dd><a name="index-task-exception-port_002c-GNU-Hurd"></a> 170<p>This command sets the task exception port to which <small>GDB</small> will 171forward exceptions. The argument should be the value of the <em>send 172rights</em> of the task. <code>set task excp</code> is a shorthand alias. 173</p> 174</dd> 175<dt><code>set noninvasive</code></dt> 176<dd><a name="index-noninvasive-task-options"></a> 177<p>This command switches <small>GDB</small> to a mode that is the least 178invasive as far as interfering with the inferior is concerned. This 179is the same as using <code>set task pause</code>, <code>set exceptions</code>, and 180<code>set signals</code> to values opposite to the defaults. 181</p> 182</dd> 183<dt><code>info send-rights</code></dt> 184<dt><code>info receive-rights</code></dt> 185<dt><code>info port-rights</code></dt> 186<dt><code>info port-sets</code></dt> 187<dt><code>info dead-names</code></dt> 188<dt><code>info ports</code></dt> 189<dt><code>info psets</code></dt> 190<dd><a name="index-send-rights_002c-GNU-Hurd"></a> 191<a name="index-receive-rights_002c-GNU-Hurd"></a> 192<a name="index-port-rights_002c-GNU-Hurd"></a> 193<a name="index-port-sets_002c-GNU-Hurd"></a> 194<a name="index-dead-names_002c-GNU-Hurd"></a> 195<p>These commands display information about, respectively, send rights, 196receive rights, port rights, port sets, and dead names of a task. 197There are also shorthand aliases: <code>info ports</code> for <code>info 198port-rights</code> and <code>info psets</code> for <code>info port-sets</code>. 199</p> 200</dd> 201<dt><code>set thread pause</code></dt> 202<dd><a name="index-set-thread_002c-Hurd-command"></a> 203<a name="index-thread-properties_002c-GNU-Hurd"></a> 204<a name="index-pause-current-thread-_0028GNU-Hurd_0029"></a> 205<p>This command toggles current thread suspension when <small>GDB</small> has 206control. Setting it to on takes effect immediately, and the current 207thread is suspended whenever <small>GDB</small> gets control. Setting it to 208off will take effect the next time the inferior is continued. 209Normally, this command has no effect, since when <small>GDB</small> has 210control, the whole task is suspended. However, if you used <code>set 211task pause off</code> (see above), this command comes in handy to suspend 212only the current thread. 213</p> 214</dd> 215<dt><code>show thread pause</code></dt> 216<dd><a name="index-show-thread_002c-Hurd-command"></a> 217<p>This command shows the state of current thread suspension. 218</p> 219</dd> 220<dt><code>set thread run</code></dt> 221<dd><p>This command sets whether the current thread is allowed to run. 222</p> 223</dd> 224<dt><code>show thread run</code></dt> 225<dd><p>Show whether the current thread is allowed to run. 226</p> 227</dd> 228<dt><code>set thread detach-suspend-count</code></dt> 229<dd><a name="index-thread-suspend-count_002c-GNU-Hurd"></a> 230<a name="index-detach-from-thread_002c-GNU-Hurd"></a> 231<p>This command sets the suspend count <small>GDB</small> will leave on a 232thread when detaching. This number is relative to the suspend count 233found by <small>GDB</small> when it notices the thread; use <code>set thread 234takeover-suspend-count</code> to force it to an absolute value. 235</p> 236</dd> 237<dt><code>show thread detach-suspend-count</code></dt> 238<dd><p>Show the suspend count <small>GDB</small> will leave on the thread when 239detaching. 240</p> 241</dd> 242<dt><code>set thread exception-port</code></dt> 243<dt><code>set thread excp</code></dt> 244<dd><p>Set the thread exception port to which to forward exceptions. This 245overrides the port set by <code>set task exception-port</code> (see above). 246<code>set thread excp</code> is the shorthand alias. 247</p> 248</dd> 249<dt><code>set thread takeover-suspend-count</code></dt> 250<dd><p>Normally, <small>GDB</small>’s thread suspend counts are relative to the 251value <small>GDB</small> finds when it notices each thread. This command 252changes the suspend counts to be absolute instead. 253</p> 254</dd> 255<dt><code>set thread default</code></dt> 256<dt><code>show thread default</code></dt> 257<dd><a name="index-thread-default-settings_002c-GNU-Hurd"></a> 258<p>Each of the above <code>set thread</code> commands has a <code>set thread 259default</code> counterpart (e.g., <code>set thread default pause</code>, <code>set 260thread default exception-port</code>, etc.). The <code>thread default</code> 261variety of commands sets the default thread properties for all 262threads; you can then change the properties of individual threads with 263the non-default commands. 264</p></dd> 265</dl> 266 267<hr> 268<div class="header"> 269<p> 270Next: <a href="Darwin.html#Darwin" accesskey="n" rel="next">Darwin</a>, Previous: <a href="Cygwin-Native.html#Cygwin-Native" accesskey="p" rel="previous">Cygwin Native</a>, Up: <a href="Native.html#Native" accesskey="u" rel="up">Native</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 271</div> 272 273 274 275</body> 276</html> 277