Hurd-Native.html 12 KB

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