No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

1798 líneas
89KB

  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 6.5, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  16. <title>General Query Packets (Debugging with GDB)</title>
  17. <meta name="description" content="General Query Packets (Debugging with GDB)">
  18. <meta name="keywords" content="General Query Packets (Debugging with GDB)">
  19. <meta name="resource-type" content="document">
  20. <meta name="distribution" content="global">
  21. <meta name="Generator" content="makeinfo">
  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="Remote-Protocol.html#Remote-Protocol" rel="up" title="Remote Protocol">
  26. <link href="Architecture_002dSpecific-Protocol-Details.html#Architecture_002dSpecific-Protocol-Details" rel="next" title="Architecture-Specific Protocol Details">
  27. <link href="Stop-Reply-Packets.html#Stop-Reply-Packets" rel="prev" title="Stop Reply Packets">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.indentedblock {margin-right: 0em}
  32. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  33. blockquote.smallquotation {font-size: smaller}
  34. div.display {margin-left: 3.2em}
  35. div.example {margin-left: 3.2em}
  36. div.lisp {margin-left: 3.2em}
  37. div.smalldisplay {margin-left: 3.2em}
  38. div.smallexample {margin-left: 3.2em}
  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.nolinebreak {white-space: nowrap}
  50. span.roman {font-family: initial; font-weight: normal}
  51. span.sansserif {font-family: sans-serif; font-weight: normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en">
  57. <a name="General-Query-Packets"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="Architecture_002dSpecific-Protocol-Details.html#Architecture_002dSpecific-Protocol-Details" accesskey="n" rel="next">Architecture-Specific Protocol Details</a>, Previous: <a href="Stop-Reply-Packets.html#Stop-Reply-Packets" accesskey="p" rel="prev">Stop Reply Packets</a>, Up: <a href="Remote-Protocol.html#Remote-Protocol" accesskey="u" rel="up">Remote Protocol</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>
  61. </div>
  62. <hr>
  63. <a name="General-Query-Packets-1"></a>
  64. <h3 class="section">E.4 General Query Packets</h3>
  65. <a name="index-remote-query-requests"></a>
  66. <p>Packets starting with &lsquo;<samp>q</samp>&rsquo; are <em>general query packets</em>;
  67. packets starting with &lsquo;<samp>Q</samp>&rsquo; are <em>general set packets</em>. General
  68. query and set packets are a semi-unified form for retrieving and
  69. sending information to and from the stub.
  70. </p>
  71. <p>The initial letter of a query or set packet is followed by a name
  72. indicating what sort of thing the packet applies to. For example,
  73. <small>GDB</small> may use a &lsquo;<samp>qSymbol</samp>&rsquo; packet to exchange symbol
  74. definitions with the stub. These packet names follow some
  75. conventions:
  76. </p>
  77. <ul>
  78. <li> The name must not contain commas, colons or semicolons.
  79. </li><li> Most <small>GDB</small> query and set packets have a leading upper case
  80. letter.
  81. </li><li> The names of custom vendor packets should use a company prefix, in
  82. lower case, followed by a period. For example, packets designed at
  83. the Acme Corporation might begin with &lsquo;<samp>qacme.foo</samp>&rsquo; (for querying
  84. foos) or &lsquo;<samp>Qacme.bar</samp>&rsquo; (for setting bars).
  85. </li></ul>
  86. <p>The name of a query or set packet should be separated from any
  87. parameters by a &lsquo;<samp>:</samp>&rsquo;; the parameters themselves should be
  88. separated by &lsquo;<samp>,</samp>&rsquo; or &lsquo;<samp>;</samp>&rsquo;. Stubs must be careful to match the
  89. full packet name, and check for a separator or the end of the packet,
  90. in case two packet names share a common prefix. New packets should not begin
  91. with &lsquo;<samp>qC</samp>&rsquo;, &lsquo;<samp>qP</samp>&rsquo;, or &lsquo;<samp>qL</samp>&rsquo;<a name="DOCF20" href="#FOOT20"><sup>20</sup></a>.
  92. </p>
  93. <p>Like the descriptions of the other packets, each description here
  94. has a template showing the packet&rsquo;s overall syntax, followed by an
  95. explanation of the packet&rsquo;s meaning. We include spaces in some of the
  96. templates for clarity; these are not part of the packet&rsquo;s syntax. No
  97. <small>GDB</small> packet uses spaces to separate its components.
  98. </p>
  99. <p>Here are the currently defined query and set packets:
  100. </p>
  101. <dl compact="compact">
  102. <dt>&lsquo;<samp>QAgent:1</samp>&rsquo;</dt>
  103. <dt>&lsquo;<samp>QAgent:0</samp>&rsquo;</dt>
  104. <dd><p>Turn on or off the agent as a helper to perform some debugging operations
  105. delegated from <small>GDB</small> (see <a href="In_002dProcess-Agent.html#Control-Agent">Control Agent</a>).
  106. </p>
  107. </dd>
  108. <dt>&lsquo;<samp>QAllow:<var>op</var>:<var>val</var>&hellip;</samp>&rsquo;</dt>
  109. <dd><a name="index-QAllow-packet"></a>
  110. <p>Specify which operations <small>GDB</small> expects to request of the
  111. target, as a semicolon-separated list of operation name and value
  112. pairs. Possible values for <var>op</var> include &lsquo;<samp>WriteReg</samp>&rsquo;,
  113. &lsquo;<samp>WriteMem</samp>&rsquo;, &lsquo;<samp>InsertBreak</samp>&rsquo;, &lsquo;<samp>InsertTrace</samp>&rsquo;,
  114. &lsquo;<samp>InsertFastTrace</samp>&rsquo;, and &lsquo;<samp>Stop</samp>&rsquo;. <var>val</var> is either 0,
  115. indicating that <small>GDB</small> will not request the operation, or 1,
  116. indicating that it may. (The target can then use this to set up its
  117. own internals optimally, for instance if the debugger never expects to
  118. insert breakpoints, it may not need to install its own trap handler.)
  119. </p>
  120. </dd>
  121. <dt>&lsquo;<samp>qC</samp>&rsquo;</dt>
  122. <dd><a name="index-current-thread_002c-remote-request"></a>
  123. <a name="index-qC-packet"></a>
  124. <p>Return the current thread ID.
  125. </p>
  126. <p>Reply:
  127. </p><dl compact="compact">
  128. <dt>&lsquo;<samp>QC <var>thread-id</var></samp>&rsquo;</dt>
  129. <dd><p>Where <var>thread-id</var> is a thread ID as documented in
  130. <a href="Packets.html#thread_002did-syntax">thread-id syntax</a>.
  131. </p></dd>
  132. <dt>&lsquo;<samp><span class="roman">(anything else)</span></samp>&rsquo;</dt>
  133. <dd><p>Any other reply implies the old thread ID.
  134. </p></dd>
  135. </dl>
  136. </dd>
  137. <dt>&lsquo;<samp>qCRC:<var>addr</var>,<var>length</var></samp>&rsquo;</dt>
  138. <dd><a name="index-CRC-of-memory-block_002c-remote-request"></a>
  139. <a name="index-qCRC-packet"></a>
  140. <a name="qCRC-packet"></a><p>Compute the CRC checksum of a block of memory using CRC-32 defined in
  141. IEEE 802.3. The CRC is computed byte at a time, taking the most
  142. significant bit of each byte first. The initial pattern code
  143. <code>0xffffffff</code> is used to ensure leading zeros affect the CRC.
  144. </p>
  145. <p><em>Note:</em> This is the same CRC used in validating separate debug
  146. files (see <a href="Separate-Debug-Files.html#Separate-Debug-Files">Debugging Information in Separate
  147. Files</a>). However the algorithm is slightly different. When validating
  148. separate debug files, the CRC is computed taking the <em>least</em>
  149. significant bit of each byte first, and the final result is inverted to
  150. detect trailing zeros.
  151. </p>
  152. <p>Reply:
  153. </p><dl compact="compact">
  154. <dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
  155. <dd><p>An error (such as memory fault)
  156. </p></dd>
  157. <dt>&lsquo;<samp>C <var>crc32</var></samp>&rsquo;</dt>
  158. <dd><p>The specified memory region&rsquo;s checksum is <var>crc32</var>.
  159. </p></dd>
  160. </dl>
  161. </dd>
  162. <dt>&lsquo;<samp>QDisableRandomization:<var>value</var></samp>&rsquo;</dt>
  163. <dd><a name="index-disable-address-space-randomization_002c-remote-request"></a>
  164. <a name="index-QDisableRandomization-packet"></a>
  165. <p>Some target operating systems will randomize the virtual address space
  166. of the inferior process as a security feature, but provide a feature
  167. to disable such randomization, e.g. to allow for a more deterministic
  168. debugging experience. On such systems, this packet with a <var>value</var>
  169. of 1 directs the target to disable address space randomization for
  170. processes subsequently started via &lsquo;<samp>vRun</samp>&rsquo; packets, while a packet
  171. with a <var>value</var> of 0 tells the target to enable address space
  172. randomization.
  173. </p>
  174. <p>This packet is only available in extended mode (see <a href="Packets.html#extended-mode">extended mode</a>).
  175. </p>
  176. <p>Reply:
  177. </p><dl compact="compact">
  178. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  179. <dd><p>The request succeeded.
  180. </p>
  181. </dd>
  182. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  183. <dd><p>An error occurred. The error number <var>nn</var> is given as hex digits.
  184. </p>
  185. </dd>
  186. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  187. <dd><p>An empty reply indicates that &lsquo;<samp>QDisableRandomization</samp>&rsquo; is not supported
  188. by the stub.
  189. </p></dd>
  190. </dl>
  191. <p>This packet is not probed by default; the remote stub must request it,
  192. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  193. This should only be done on targets that actually support disabling
  194. address space randomization.
  195. </p>
  196. </dd>
  197. <dt>&lsquo;<samp>QStartupWithShell:<var>value</var></samp>&rsquo;</dt>
  198. <dd><a name="index-startup-with-shell_002c-remote-request"></a>
  199. <a name="index-QStartupWithShell-packet"></a>
  200. <p>On UNIX-like targets, it is possible to start the inferior using a
  201. shell program. This is the default behavior on both <small>GDB</small> and
  202. <code>gdbserver</code> (see <a href="Starting.html#set-startup_002dwith_002dshell">set startup-with-shell</a>). This packet is
  203. used to inform <code>gdbserver</code> whether it should start the
  204. inferior using a shell or not.
  205. </p>
  206. <p>If <var>value</var> is &lsquo;<samp>0</samp>&rsquo;, <code>gdbserver</code> will not use a shell
  207. to start the inferior. If <var>value</var> is &lsquo;<samp>1</samp>&rsquo;,
  208. <code>gdbserver</code> will use a shell to start the inferior. All other
  209. values are considered an error.
  210. </p>
  211. <p>This packet is only available in extended mode (see <a href="Packets.html#extended-mode">extended mode</a>).
  212. </p>
  213. <p>Reply:
  214. </p><dl compact="compact">
  215. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  216. <dd><p>The request succeeded.
  217. </p>
  218. </dd>
  219. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  220. <dd><p>An error occurred. The error number <var>nn</var> is given as hex digits.
  221. </p></dd>
  222. </dl>
  223. <p>This packet is not probed by default; the remote stub must request it,
  224. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response
  225. (see <a href="#qSupported">qSupported</a>). This should only be done on targets that
  226. actually support starting the inferior using a shell.
  227. </p>
  228. <p>Use of this packet is controlled by the <code>set startup-with-shell</code>
  229. command; see <a href="Starting.html#set-startup_002dwith_002dshell">set startup-with-shell</a>.
  230. </p>
  231. </dd>
  232. <dt>&lsquo;<samp>QEnvironmentHexEncoded:<var>hex-value</var></samp>&rsquo;</dt>
  233. <dd><a name="QEnvironmentHexEncoded"></a><a name="index-set-environment-variable_002c-remote-request"></a>
  234. <a name="index-QEnvironmentHexEncoded-packet"></a>
  235. <p>On UNIX-like targets, it is possible to set environment variables that
  236. will be passed to the inferior during the startup process. This
  237. packet is used to inform <code>gdbserver</code> of an environment
  238. variable that has been defined by the user on <small>GDB</small> (see <a href="Environment.html#set-environment">set environment</a>).
  239. </p>
  240. <p>The packet is composed by <var>hex-value</var>, an hex encoded
  241. representation of the <var>name=value</var> format representing an
  242. environment variable. The name of the environment variable is
  243. represented by <var>name</var>, and the value to be assigned to the
  244. environment variable is represented by <var>value</var>. If the variable
  245. has no value (i.e., the value is <code>null</code>), then <var>value</var> will
  246. not be present.
  247. </p>
  248. <p>This packet is only available in extended mode (see <a href="Packets.html#extended-mode">extended mode</a>).
  249. </p>
  250. <p>Reply:
  251. </p><dl compact="compact">
  252. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  253. <dd><p>The request succeeded.
  254. </p></dd>
  255. </dl>
  256. <p>This packet is not probed by default; the remote stub must request it,
  257. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response
  258. (see <a href="#qSupported">qSupported</a>). This should only be done on targets that
  259. actually support passing environment variables to the starting
  260. inferior.
  261. </p>
  262. <p>This packet is related to the <code>set environment</code> command;
  263. see <a href="Environment.html#set-environment">set environment</a>.
  264. </p>
  265. </dd>
  266. <dt>&lsquo;<samp>QEnvironmentUnset:<var>hex-value</var></samp>&rsquo;</dt>
  267. <dd><a name="QEnvironmentUnset"></a><a name="index-unset-environment-variable_002c-remote-request"></a>
  268. <a name="index-QEnvironmentUnset-packet"></a>
  269. <p>On UNIX-like targets, it is possible to unset environment variables
  270. before starting the inferior in the remote target. This packet is
  271. used to inform <code>gdbserver</code> of an environment variable that has
  272. been unset by the user on <small>GDB</small> (see <a href="Environment.html#unset-environment">unset environment</a>).
  273. </p>
  274. <p>The packet is composed by <var>hex-value</var>, an hex encoded
  275. representation of the name of the environment variable to be unset.
  276. </p>
  277. <p>This packet is only available in extended mode (see <a href="Packets.html#extended-mode">extended mode</a>).
  278. </p>
  279. <p>Reply:
  280. </p><dl compact="compact">
  281. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  282. <dd><p>The request succeeded.
  283. </p></dd>
  284. </dl>
  285. <p>This packet is not probed by default; the remote stub must request it,
  286. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response
  287. (see <a href="#qSupported">qSupported</a>). This should only be done on targets that
  288. actually support passing environment variables to the starting
  289. inferior.
  290. </p>
  291. <p>This packet is related to the <code>unset environment</code> command;
  292. see <a href="Environment.html#unset-environment">unset environment</a>.
  293. </p>
  294. </dd>
  295. <dt>&lsquo;<samp>QEnvironmentReset</samp>&rsquo;</dt>
  296. <dd><a name="QEnvironmentReset"></a><a name="index-reset-environment_002c-remote-request"></a>
  297. <a name="index-QEnvironmentReset-packet"></a>
  298. <p>On UNIX-like targets, this packet is used to reset the state of
  299. environment variables in the remote target before starting the
  300. inferior. In this context, reset means unsetting all environment
  301. variables that were previously set by the user (i.e., were not
  302. initially present in the environment). It is sent to
  303. <code>gdbserver</code> before the &lsquo;<samp>QEnvironmentHexEncoded</samp>&rsquo;
  304. (see <a href="#QEnvironmentHexEncoded">QEnvironmentHexEncoded</a>) and the &lsquo;<samp>QEnvironmentUnset</samp>&rsquo;
  305. (see <a href="#QEnvironmentUnset">QEnvironmentUnset</a>) packets.
  306. </p>
  307. <p>This packet is only available in extended mode (see <a href="Packets.html#extended-mode">extended mode</a>).
  308. </p>
  309. <p>Reply:
  310. </p><dl compact="compact">
  311. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  312. <dd><p>The request succeeded.
  313. </p></dd>
  314. </dl>
  315. <p>This packet is not probed by default; the remote stub must request it,
  316. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response
  317. (see <a href="#qSupported">qSupported</a>). This should only be done on targets that
  318. actually support passing environment variables to the starting
  319. inferior.
  320. </p>
  321. </dd>
  322. <dt>&lsquo;<samp>QSetWorkingDir:<span class="roman">[</span><var>directory</var><span class="roman">]</span></samp>&rsquo;</dt>
  323. <dd><a name="QSetWorkingDir-packet"></a><a name="index-set-working-directory_002c-remote-request"></a>
  324. <a name="index-QSetWorkingDir-packet"></a>
  325. <p>This packet is used to inform the remote server of the intended
  326. current working directory for programs that are going to be executed.
  327. </p>
  328. <p>The packet is composed by <var>directory</var>, an hex encoded
  329. representation of the directory that the remote inferior will use as
  330. its current working directory. If <var>directory</var> is an empty string,
  331. the remote server should reset the inferior&rsquo;s current working
  332. directory to its original, empty value.
  333. </p>
  334. <p>This packet is only available in extended mode (see <a href="Packets.html#extended-mode">extended mode</a>).
  335. </p>
  336. <p>Reply:
  337. </p><dl compact="compact">
  338. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  339. <dd><p>The request succeeded.
  340. </p></dd>
  341. </dl>
  342. </dd>
  343. <dt>&lsquo;<samp>qfThreadInfo</samp>&rsquo;</dt>
  344. <dt>&lsquo;<samp>qsThreadInfo</samp>&rsquo;</dt>
  345. <dd><a name="index-list-active-threads_002c-remote-request"></a>
  346. <a name="index-qfThreadInfo-packet"></a>
  347. <a name="index-qsThreadInfo-packet"></a>
  348. <p>Obtain a list of all active thread IDs from the target (OS). Since there
  349. may be too many active threads to fit into one reply packet, this query
  350. works iteratively: it may require more than one query/reply sequence to
  351. obtain the entire list of threads. The first query of the sequence will
  352. be the &lsquo;<samp>qfThreadInfo</samp>&rsquo; query; subsequent queries in the
  353. sequence will be the &lsquo;<samp>qsThreadInfo</samp>&rsquo; query.
  354. </p>
  355. <p>NOTE: This packet replaces the &lsquo;<samp>qL</samp>&rsquo; query (see below).
  356. </p>
  357. <p>Reply:
  358. </p><dl compact="compact">
  359. <dt>&lsquo;<samp>m <var>thread-id</var></samp>&rsquo;</dt>
  360. <dd><p>A single thread ID
  361. </p></dd>
  362. <dt>&lsquo;<samp>m <var>thread-id</var>,<var>thread-id</var>&hellip;</samp>&rsquo;</dt>
  363. <dd><p>a comma-separated list of thread IDs
  364. </p></dd>
  365. <dt>&lsquo;<samp>l</samp>&rsquo;</dt>
  366. <dd><p>(lower case letter &lsquo;<samp>L</samp>&rsquo;) denotes end of list.
  367. </p></dd>
  368. </dl>
  369. <p>In response to each query, the target will reply with a list of one or
  370. more thread IDs, separated by commas.
  371. <small>GDB</small> will respond to each reply with a request for more thread
  372. ids (using the &lsquo;<samp>qs</samp>&rsquo; form of the query), until the target responds
  373. with &lsquo;<samp>l</samp>&rsquo; (lower-case ell, for <em>last</em>).
  374. Refer to <a href="Packets.html#thread_002did-syntax">thread-id syntax</a>, for the format of the <var>thread-id</var>
  375. fields.
  376. </p>
  377. <p><em>Note: <small>GDB</small> will send the <code>qfThreadInfo</code> query during the
  378. initial connection with the remote target, and the very first thread ID
  379. mentioned in the reply will be stopped by <small>GDB</small> in a subsequent
  380. message. Therefore, the stub should ensure that the first thread ID in
  381. the <code>qfThreadInfo</code> reply is suitable for being stopped by <small>GDB</small>.</em>
  382. </p>
  383. </dd>
  384. <dt>&lsquo;<samp>qGetTLSAddr:<var>thread-id</var>,<var>offset</var>,<var>lm</var></samp>&rsquo;</dt>
  385. <dd><a name="index-get-thread_002dlocal-storage-address_002c-remote-request"></a>
  386. <a name="index-qGetTLSAddr-packet"></a>
  387. <p>Fetch the address associated with thread local storage specified
  388. by <var>thread-id</var>, <var>offset</var>, and <var>lm</var>.
  389. </p>
  390. <p><var>thread-id</var> is the thread ID associated with the
  391. thread for which to fetch the TLS address. See <a href="Packets.html#thread_002did-syntax">thread-id syntax</a>.
  392. </p>
  393. <p><var>offset</var> is the (big endian, hex encoded) offset associated with the
  394. thread local variable. (This offset is obtained from the debug
  395. information associated with the variable.)
  396. </p>
  397. <p><var>lm</var> is the (big endian, hex encoded) OS/ABI-specific encoding of the
  398. load module associated with the thread local storage. For example,
  399. a <small>GNU</small>/Linux system will pass the link map address of the shared
  400. object associated with the thread local storage under consideration.
  401. Other operating environments may choose to represent the load module
  402. differently, so the precise meaning of this parameter will vary.
  403. </p>
  404. <p>Reply:
  405. </p><dl compact="compact">
  406. <dt>&lsquo;<samp><var>XX</var>&hellip;</samp>&rsquo;</dt>
  407. <dd><p>Hex encoded (big endian) bytes representing the address of the thread
  408. local storage requested.
  409. </p>
  410. </dd>
  411. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  412. <dd><p>An error occurred. The error number <var>nn</var> is given as hex digits.
  413. </p>
  414. </dd>
  415. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  416. <dd><p>An empty reply indicates that &lsquo;<samp>qGetTLSAddr</samp>&rsquo; is not supported by the stub.
  417. </p></dd>
  418. </dl>
  419. </dd>
  420. <dt>&lsquo;<samp>qGetTIBAddr:<var>thread-id</var></samp>&rsquo;</dt>
  421. <dd><a name="index-get-thread-information-block-address"></a>
  422. <a name="index-qGetTIBAddr-packet"></a>
  423. <p>Fetch address of the Windows OS specific Thread Information Block.
  424. </p>
  425. <p><var>thread-id</var> is the thread ID associated with the thread.
  426. </p>
  427. <p>Reply:
  428. </p><dl compact="compact">
  429. <dt>&lsquo;<samp><var>XX</var>&hellip;</samp>&rsquo;</dt>
  430. <dd><p>Hex encoded (big endian) bytes representing the linear address of the
  431. thread information block.
  432. </p>
  433. </dd>
  434. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  435. <dd><p>An error occured. This means that either the thread was not found, or the
  436. address could not be retrieved.
  437. </p>
  438. </dd>
  439. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  440. <dd><p>An empty reply indicates that &lsquo;<samp>qGetTIBAddr</samp>&rsquo; is not supported by the stub.
  441. </p></dd>
  442. </dl>
  443. </dd>
  444. <dt>&lsquo;<samp>qL <var>startflag</var> <var>threadcount</var> <var>nextthread</var></samp>&rsquo;</dt>
  445. <dd><p>Obtain thread information from RTOS. Where: <var>startflag</var> (one hex
  446. digit) is one to indicate the first query and zero to indicate a
  447. subsequent query; <var>threadcount</var> (two hex digits) is the maximum
  448. number of threads the response packet can contain; and <var>nextthread</var>
  449. (eight hex digits), for subsequent queries (<var>startflag</var> is zero), is
  450. returned in the response as <var>argthread</var>.
  451. </p>
  452. <p>Don&rsquo;t use this packet; use the &lsquo;<samp>qfThreadInfo</samp>&rsquo; query instead (see above).
  453. </p>
  454. <p>Reply:
  455. </p><dl compact="compact">
  456. <dt>&lsquo;<samp>qM <var>count</var> <var>done</var> <var>argthread</var> <var>thread</var>&hellip;</samp>&rsquo;</dt>
  457. <dd><p>Where: <var>count</var> (two hex digits) is the number of threads being
  458. returned; <var>done</var> (one hex digit) is zero to indicate more threads
  459. and one indicates no further threads; <var>argthreadid</var> (eight hex
  460. digits) is <var>nextthread</var> from the request packet; <var>thread</var>&hellip;
  461. is a sequence of thread IDs, <var>threadid</var> (eight hex
  462. digits), from the target. See <code>remote.c:parse_threadlist_response()</code>.
  463. </p></dd>
  464. </dl>
  465. </dd>
  466. <dt>&lsquo;<samp>qOffsets</samp>&rsquo;</dt>
  467. <dd><a name="index-section-offsets_002c-remote-request"></a>
  468. <a name="index-qOffsets-packet"></a>
  469. <p>Get section offsets that the target used when relocating the downloaded
  470. image.
  471. </p>
  472. <p>Reply:
  473. </p><dl compact="compact">
  474. <dt>&lsquo;<samp>Text=<var>xxx</var>;Data=<var>yyy</var><span class="roman">[</span>;Bss=<var>zzz</var><span class="roman">]</span></samp>&rsquo;</dt>
  475. <dd><p>Relocate the <code>Text</code> section by <var>xxx</var> from its original address.
  476. Relocate the <code>Data</code> section by <var>yyy</var> from its original address.
  477. If the object file format provides segment information (e.g. <small>ELF</small>
  478. &lsquo;<samp>PT_LOAD</samp>&rsquo; program headers), <small>GDB</small> will relocate entire
  479. segments by the supplied offsets.
  480. </p>
  481. <p><em>Note: while a <code>Bss</code> offset may be included in the response,
  482. <small>GDB</small> ignores this and instead applies the <code>Data</code> offset
  483. to the <code>Bss</code> section.</em>
  484. </p>
  485. </dd>
  486. <dt>&lsquo;<samp>TextSeg=<var>xxx</var><span class="roman">[</span>;DataSeg=<var>yyy</var><span class="roman">]</span></samp>&rsquo;</dt>
  487. <dd><p>Relocate the first segment of the object file, which conventionally
  488. contains program code, to a starting address of <var>xxx</var>. If
  489. &lsquo;<samp>DataSeg</samp>&rsquo; is specified, relocate the second segment, which
  490. conventionally contains modifiable data, to a starting address of
  491. <var>yyy</var>. <small>GDB</small> will report an error if the object file
  492. does not contain segment information, or does not contain at least
  493. as many segments as mentioned in the reply. Extra segments are
  494. kept at fixed offsets relative to the last relocated segment.
  495. </p></dd>
  496. </dl>
  497. </dd>
  498. <dt>&lsquo;<samp>qP <var>mode</var> <var>thread-id</var></samp>&rsquo;</dt>
  499. <dd><a name="index-thread-information_002c-remote-request"></a>
  500. <a name="index-qP-packet"></a>
  501. <p>Returns information on <var>thread-id</var>. Where: <var>mode</var> is a hex
  502. encoded 32 bit mode; <var>thread-id</var> is a thread ID
  503. (see <a href="Packets.html#thread_002did-syntax">thread-id syntax</a>).
  504. </p>
  505. <p>Don&rsquo;t use this packet; use the &lsquo;<samp>qThreadExtraInfo</samp>&rsquo; query instead
  506. (see below).
  507. </p>
  508. <p>Reply: see <code>remote.c:remote_unpack_thread_info_response()</code>.
  509. </p>
  510. </dd>
  511. <dt>&lsquo;<samp>QNonStop:1</samp>&rsquo;</dt>
  512. <dt>&lsquo;<samp>QNonStop:0</samp>&rsquo;</dt>
  513. <dd><a name="index-non_002dstop-mode_002c-remote-request"></a>
  514. <a name="index-QNonStop-packet"></a>
  515. <a name="QNonStop"></a><p>Enter non-stop (&lsquo;<samp>QNonStop:1</samp>&rsquo;) or all-stop (&lsquo;<samp>QNonStop:0</samp>&rsquo;) mode.
  516. See <a href="Remote-Non_002dStop.html#Remote-Non_002dStop">Remote Non-Stop</a>, for more information.
  517. </p>
  518. <p>Reply:
  519. </p><dl compact="compact">
  520. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  521. <dd><p>The request succeeded.
  522. </p>
  523. </dd>
  524. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  525. <dd><p>An error occurred. The error number <var>nn</var> is given as hex digits.
  526. </p>
  527. </dd>
  528. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  529. <dd><p>An empty reply indicates that &lsquo;<samp>QNonStop</samp>&rsquo; is not supported by
  530. the stub.
  531. </p></dd>
  532. </dl>
  533. <p>This packet is not probed by default; the remote stub must request it,
  534. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  535. Use of this packet is controlled by the <code>set non-stop</code> command;
  536. see <a href="Non_002dStop-Mode.html#Non_002dStop-Mode">Non-Stop Mode</a>.
  537. </p>
  538. </dd>
  539. <dt>&lsquo;<samp>QCatchSyscalls:1 <span class="roman">[</span>;<var>sysno</var><span class="roman">]</span>&hellip;</samp>&rsquo;</dt>
  540. <dt>&lsquo;<samp>QCatchSyscalls:0</samp>&rsquo;</dt>
  541. <dd><a name="index-catch-syscalls-from-inferior_002c-remote-request"></a>
  542. <a name="index-QCatchSyscalls-packet"></a>
  543. <a name="QCatchSyscalls"></a><p>Enable (&lsquo;<samp>QCatchSyscalls:1</samp>&rsquo;) or disable (&lsquo;<samp>QCatchSyscalls:0</samp>&rsquo;)
  544. catching syscalls from the inferior process.
  545. </p>
  546. <p>For &lsquo;<samp>QCatchSyscalls:1</samp>&rsquo;, each listed syscall <var>sysno</var> (encoded
  547. in hex) should be reported to <small>GDB</small>. If no syscall <var>sysno</var>
  548. is listed, every system call should be reported.
  549. </p>
  550. <p>Note that if a syscall not in the list is reported, <small>GDB</small> will
  551. still filter the event according to its own list from all corresponding
  552. <code>catch syscall</code> commands. However, it is more efficient to only
  553. report the requested syscalls.
  554. </p>
  555. <p>Multiple &lsquo;<samp>QCatchSyscalls:1</samp>&rsquo; packets do not combine; any earlier
  556. &lsquo;<samp>QCatchSyscalls:1</samp>&rsquo; list is completely replaced by the new list.
  557. </p>
  558. <p>If the inferior process execs, the state of &lsquo;<samp>QCatchSyscalls</samp>&rsquo; is
  559. kept for the new process too. On targets where exec may affect syscall
  560. numbers, for example with exec between 32 and 64-bit processes, the
  561. client should send a new packet with the new syscall list.
  562. </p>
  563. <p>Reply:
  564. </p><dl compact="compact">
  565. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  566. <dd><p>The request succeeded.
  567. </p>
  568. </dd>
  569. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  570. <dd><p>An error occurred. <var>nn</var> are hex digits.
  571. </p>
  572. </dd>
  573. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  574. <dd><p>An empty reply indicates that &lsquo;<samp>QCatchSyscalls</samp>&rsquo; is not supported by
  575. the stub.
  576. </p></dd>
  577. </dl>
  578. <p>Use of this packet is controlled by the <code>set remote catch-syscalls</code>
  579. command (see <a href="Remote-Configuration.html#Remote-Configuration">set remote catch-syscalls</a>).
  580. This packet is not probed by default; the remote stub must request it,
  581. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  582. </p>
  583. </dd>
  584. <dt>&lsquo;<samp>QPassSignals: <var>signal</var> <span class="roman">[</span>;<var>signal</var><span class="roman">]</span>&hellip;</samp>&rsquo;</dt>
  585. <dd><a name="index-pass-signals-to-inferior_002c-remote-request"></a>
  586. <a name="index-QPassSignals-packet"></a>
  587. <a name="QPassSignals"></a><p>Each listed <var>signal</var> should be passed directly to the inferior process.
  588. Signals are numbered identically to continue packets and stop replies
  589. (see <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>). Each <var>signal</var> list item should be
  590. strictly greater than the previous item. These signals do not need to stop
  591. the inferior, or be reported to <small>GDB</small>. All other signals should be
  592. reported to <small>GDB</small>. Multiple &lsquo;<samp>QPassSignals</samp>&rsquo; packets do not
  593. combine; any earlier &lsquo;<samp>QPassSignals</samp>&rsquo; list is completely replaced by the
  594. new list. This packet improves performance when using &lsquo;<samp>handle
  595. <var>signal</var> nostop noprint pass</samp>&rsquo;.
  596. </p>
  597. <p>Reply:
  598. </p><dl compact="compact">
  599. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  600. <dd><p>The request succeeded.
  601. </p>
  602. </dd>
  603. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  604. <dd><p>An error occurred. The error number <var>nn</var> is given as hex digits.
  605. </p>
  606. </dd>
  607. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  608. <dd><p>An empty reply indicates that &lsquo;<samp>QPassSignals</samp>&rsquo; is not supported by
  609. the stub.
  610. </p></dd>
  611. </dl>
  612. <p>Use of this packet is controlled by the <code>set remote pass-signals</code>
  613. command (see <a href="Remote-Configuration.html#Remote-Configuration">set remote pass-signals</a>).
  614. This packet is not probed by default; the remote stub must request it,
  615. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  616. </p>
  617. </dd>
  618. <dt>&lsquo;<samp>QProgramSignals: <var>signal</var> <span class="roman">[</span>;<var>signal</var><span class="roman">]</span>&hellip;</samp>&rsquo;</dt>
  619. <dd><a name="index-signals-the-inferior-may-see_002c-remote-request"></a>
  620. <a name="index-QProgramSignals-packet"></a>
  621. <a name="QProgramSignals"></a><p>Each listed <var>signal</var> may be delivered to the inferior process.
  622. Others should be silently discarded.
  623. </p>
  624. <p>In some cases, the remote stub may need to decide whether to deliver a
  625. signal to the program or not without <small>GDB</small> involvement. One
  626. example of that is while detaching &mdash; the program&rsquo;s threads may have
  627. stopped for signals that haven&rsquo;t yet had a chance of being reported to
  628. <small>GDB</small>, and so the remote stub can use the signal list specified
  629. by this packet to know whether to deliver or ignore those pending
  630. signals.
  631. </p>
  632. <p>This does not influence whether to deliver a signal as requested by a
  633. resumption packet (see <a href="Packets.html#vCont-packet">vCont packet</a>).
  634. </p>
  635. <p>Signals are numbered identically to continue packets and stop replies
  636. (see <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>). Each <var>signal</var> list item should be
  637. strictly greater than the previous item. Multiple
  638. &lsquo;<samp>QProgramSignals</samp>&rsquo; packets do not combine; any earlier
  639. &lsquo;<samp>QProgramSignals</samp>&rsquo; list is completely replaced by the new list.
  640. </p>
  641. <p>Reply:
  642. </p><dl compact="compact">
  643. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  644. <dd><p>The request succeeded.
  645. </p>
  646. </dd>
  647. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  648. <dd><p>An error occurred. The error number <var>nn</var> is given as hex digits.
  649. </p>
  650. </dd>
  651. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  652. <dd><p>An empty reply indicates that &lsquo;<samp>QProgramSignals</samp>&rsquo; is not supported
  653. by the stub.
  654. </p></dd>
  655. </dl>
  656. <p>Use of this packet is controlled by the <code>set remote program-signals</code>
  657. command (see <a href="Remote-Configuration.html#Remote-Configuration">set remote program-signals</a>).
  658. This packet is not probed by default; the remote stub must request it,
  659. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  660. </p>
  661. <a name="QThreadEvents"></a></dd>
  662. <dt>&lsquo;<samp>QThreadEvents:1</samp>&rsquo;</dt>
  663. <dt>&lsquo;<samp>QThreadEvents:0</samp>&rsquo;</dt>
  664. <dd><a name="index-thread-create_002fexit-events_002c-remote-request"></a>
  665. <a name="index-QThreadEvents-packet"></a>
  666. <p>Enable (&lsquo;<samp>QThreadEvents:1</samp>&rsquo;) or disable (&lsquo;<samp>QThreadEvents:0</samp>&rsquo;)
  667. reporting of thread create and exit events. See <a href="Stop-Reply-Packets.html#thread-create-event">thread create event</a>, for the reply specifications. For example, this is used in
  668. non-stop mode when <small>GDB</small> stops a set of threads and
  669. synchronously waits for the their corresponding stop replies. Without
  670. exit events, if one of the threads exits, <small>GDB</small> would hang
  671. forever not knowing that it should no longer expect a stop for that
  672. same thread. <small>GDB</small> does not enable this feature unless the
  673. stub reports that it supports it by including &lsquo;<samp>QThreadEvents+</samp>&rsquo; in
  674. its &lsquo;<samp>qSupported</samp>&rsquo; reply.
  675. </p>
  676. <p>Reply:
  677. </p><dl compact="compact">
  678. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  679. <dd><p>The request succeeded.
  680. </p>
  681. </dd>
  682. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  683. <dd><p>An error occurred. The error number <var>nn</var> is given as hex digits.
  684. </p>
  685. </dd>
  686. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  687. <dd><p>An empty reply indicates that &lsquo;<samp>QThreadEvents</samp>&rsquo; is not supported by
  688. the stub.
  689. </p></dd>
  690. </dl>
  691. <p>Use of this packet is controlled by the <code>set remote thread-events</code>
  692. command (see <a href="Remote-Configuration.html#Remote-Configuration">set remote thread-events</a>).
  693. </p>
  694. </dd>
  695. <dt>&lsquo;<samp>qRcmd,<var>command</var></samp>&rsquo;</dt>
  696. <dd><a name="index-execute-remote-command_002c-remote-request"></a>
  697. <a name="index-qRcmd-packet"></a>
  698. <p><var>command</var> (hex encoded) is passed to the local interpreter for
  699. execution. Invalid commands should be reported using the output
  700. string. Before the final result packet, the target may also respond
  701. with a number of intermediate &lsquo;<samp>O<var>output</var></samp>&rsquo; console output
  702. packets. <em>Implementors should note that providing access to a
  703. stubs&rsquo;s interpreter may have security implications</em>.
  704. </p>
  705. <p>Reply:
  706. </p><dl compact="compact">
  707. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  708. <dd><p>A command response with no output.
  709. </p></dd>
  710. <dt>&lsquo;<samp><var>OUTPUT</var></samp>&rsquo;</dt>
  711. <dd><p>A command response with the hex encoded output string <var>OUTPUT</var>.
  712. </p></dd>
  713. <dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
  714. <dd><p>Indicate a badly formed request.
  715. </p></dd>
  716. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  717. <dd><p>An empty reply indicates that &lsquo;<samp>qRcmd</samp>&rsquo; is not recognized.
  718. </p></dd>
  719. </dl>
  720. <p>(Note that the <code>qRcmd</code> packet&rsquo;s name is separated from the
  721. command by a &lsquo;<samp>,</samp>&rsquo;, not a &lsquo;<samp>:</samp>&rsquo;, contrary to the naming
  722. conventions above. Please don&rsquo;t use this packet as a model for new
  723. packets.)
  724. </p>
  725. </dd>
  726. <dt>&lsquo;<samp>qSearch:memory:<var>address</var>;<var>length</var>;<var>search-pattern</var></samp>&rsquo;</dt>
  727. <dd><a name="index-searching-memory_002c-in-remote-debugging"></a>
  728. <a name="index-qSearch_003amemory-packet"></a>
  729. <a name="index-qSearch-memory-packet"></a>
  730. <a name="qSearch-memory"></a><p>Search <var>length</var> bytes at <var>address</var> for <var>search-pattern</var>.
  731. Both <var>address</var> and <var>length</var> are encoded in hex;
  732. <var>search-pattern</var> is a sequence of bytes, also hex encoded.
  733. </p>
  734. <p>Reply:
  735. </p><dl compact="compact">
  736. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  737. <dd><p>The pattern was not found.
  738. </p></dd>
  739. <dt>&lsquo;<samp>1,address</samp>&rsquo;</dt>
  740. <dd><p>The pattern was found at <var>address</var>.
  741. </p></dd>
  742. <dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
  743. <dd><p>A badly formed request or an error was encountered while searching memory.
  744. </p></dd>
  745. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  746. <dd><p>An empty reply indicates that &lsquo;<samp>qSearch:memory</samp>&rsquo; is not recognized.
  747. </p></dd>
  748. </dl>
  749. </dd>
  750. <dt>&lsquo;<samp>QStartNoAckMode</samp>&rsquo;</dt>
  751. <dd><a name="index-QStartNoAckMode-packet"></a>
  752. <a name="QStartNoAckMode"></a><p>Request that the remote stub disable the normal &lsquo;<samp>+</samp>&rsquo;/&lsquo;<samp>-</samp>&rsquo;
  753. protocol acknowledgments (see <a href="Packet-Acknowledgment.html#Packet-Acknowledgment">Packet Acknowledgment</a>).
  754. </p>
  755. <p>Reply:
  756. </p><dl compact="compact">
  757. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  758. <dd><p>The stub has switched to no-acknowledgment mode.
  759. <small>GDB</small> acknowledges this response,
  760. but neither the stub nor <small>GDB</small> shall send or expect further
  761. &lsquo;<samp>+</samp>&rsquo;/&lsquo;<samp>-</samp>&rsquo; acknowledgments in the current connection.
  762. </p></dd>
  763. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  764. <dd><p>An empty reply indicates that the stub does not support no-acknowledgment mode.
  765. </p></dd>
  766. </dl>
  767. </dd>
  768. <dt>&lsquo;<samp>qSupported <span class="roman">[</span>:<var>gdbfeature</var> <span class="roman">[</span>;<var>gdbfeature</var><span class="roman">]</span>&hellip; <span class="roman">]</span></samp>&rsquo;</dt>
  769. <dd><a name="index-supported-packets_002c-remote-query"></a>
  770. <a name="index-features-of-the-remote-protocol"></a>
  771. <a name="index-qSupported-packet"></a>
  772. <a name="qSupported"></a><p>Tell the remote stub about features supported by <small>GDB</small>, and
  773. query the stub for features it supports. This packet allows
  774. <small>GDB</small> and the remote stub to take advantage of each others&rsquo;
  775. features. &lsquo;<samp>qSupported</samp>&rsquo; also consolidates multiple feature probes
  776. at startup, to improve <small>GDB</small> performance&mdash;a single larger
  777. packet performs better than multiple smaller probe packets on
  778. high-latency links. Some features may enable behavior which must not
  779. be on by default, e.g. because it would confuse older clients or
  780. stubs. Other features may describe packets which could be
  781. automatically probed for, but are not. These features must be
  782. reported before <small>GDB</small> will use them. This &ldquo;default
  783. unsupported&rdquo; behavior is not appropriate for all packets, but it
  784. helps to keep the initial connection time under control with new
  785. versions of <small>GDB</small> which support increasing numbers of packets.
  786. </p>
  787. <p>Reply:
  788. </p><dl compact="compact">
  789. <dt>&lsquo;<samp><var>stubfeature</var> <span class="roman">[</span>;<var>stubfeature</var><span class="roman">]</span>&hellip;</samp>&rsquo;</dt>
  790. <dd><p>The stub supports or does not support each returned <var>stubfeature</var>,
  791. depending on the form of each <var>stubfeature</var> (see below for the
  792. possible forms).
  793. </p></dd>
  794. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  795. <dd><p>An empty reply indicates that &lsquo;<samp>qSupported</samp>&rsquo; is not recognized,
  796. or that no features needed to be reported to <small>GDB</small>.
  797. </p></dd>
  798. </dl>
  799. <p>The allowed forms for each feature (either a <var>gdbfeature</var> in the
  800. &lsquo;<samp>qSupported</samp>&rsquo; packet, or a <var>stubfeature</var> in the response)
  801. are:
  802. </p>
  803. <dl compact="compact">
  804. <dt>&lsquo;<samp><var>name</var>=<var>value</var></samp>&rsquo;</dt>
  805. <dd><p>The remote protocol feature <var>name</var> is supported, and associated
  806. with the specified <var>value</var>. The format of <var>value</var> depends
  807. on the feature, but it must not include a semicolon.
  808. </p></dd>
  809. <dt>&lsquo;<samp><var>name</var>+</samp>&rsquo;</dt>
  810. <dd><p>The remote protocol feature <var>name</var> is supported, and does not
  811. need an associated value.
  812. </p></dd>
  813. <dt>&lsquo;<samp><var>name</var>-</samp>&rsquo;</dt>
  814. <dd><p>The remote protocol feature <var>name</var> is not supported.
  815. </p></dd>
  816. <dt>&lsquo;<samp><var>name</var>?</samp>&rsquo;</dt>
  817. <dd><p>The remote protocol feature <var>name</var> may be supported, and
  818. <small>GDB</small> should auto-detect support in some other way when it is
  819. needed. This form will not be used for <var>gdbfeature</var> notifications,
  820. but may be used for <var>stubfeature</var> responses.
  821. </p></dd>
  822. </dl>
  823. <p>Whenever the stub receives a &lsquo;<samp>qSupported</samp>&rsquo; request, the
  824. supplied set of <small>GDB</small> features should override any previous
  825. request. This allows <small>GDB</small> to put the stub in a known
  826. state, even if the stub had previously been communicating with
  827. a different version of <small>GDB</small>.
  828. </p>
  829. <p>The following values of <var>gdbfeature</var> (for the packet sent by <small>GDB</small>)
  830. are defined:
  831. </p>
  832. <dl compact="compact">
  833. <dt>&lsquo;<samp>multiprocess</samp>&rsquo;</dt>
  834. <dd><p>This feature indicates whether <small>GDB</small> supports multiprocess
  835. extensions to the remote protocol. <small>GDB</small> does not use such
  836. extensions unless the stub also reports that it supports them by
  837. including &lsquo;<samp>multiprocess+</samp>&rsquo; in its &lsquo;<samp>qSupported</samp>&rsquo; reply.
  838. See <a href="#multiprocess-extensions">multiprocess extensions</a>, for details.
  839. </p>
  840. </dd>
  841. <dt>&lsquo;<samp>xmlRegisters</samp>&rsquo;</dt>
  842. <dd><p>This feature indicates that <small>GDB</small> supports the XML target
  843. description. If the stub sees &lsquo;<samp>xmlRegisters=</samp>&rsquo; with target
  844. specific strings separated by a comma, it will report register
  845. description.
  846. </p>
  847. </dd>
  848. <dt>&lsquo;<samp>qRelocInsn</samp>&rsquo;</dt>
  849. <dd><p>This feature indicates whether <small>GDB</small> supports the
  850. &lsquo;<samp>qRelocInsn</samp>&rsquo; packet (see <a href="Tracepoint-Packets.html#Tracepoint-Packets">Relocate
  851. instruction reply packet</a>).
  852. </p>
  853. </dd>
  854. <dt>&lsquo;<samp>swbreak</samp>&rsquo;</dt>
  855. <dd><p>This feature indicates whether <small>GDB</small> supports the swbreak stop
  856. reason in stop replies. See <a href="Stop-Reply-Packets.html#swbreak-stop-reason">swbreak stop reason</a>, for details.
  857. </p>
  858. </dd>
  859. <dt>&lsquo;<samp>hwbreak</samp>&rsquo;</dt>
  860. <dd><p>This feature indicates whether <small>GDB</small> supports the hwbreak stop
  861. reason in stop replies. See <a href="Stop-Reply-Packets.html#swbreak-stop-reason">swbreak stop reason</a>, for details.
  862. </p>
  863. </dd>
  864. <dt>&lsquo;<samp>fork-events</samp>&rsquo;</dt>
  865. <dd><p>This feature indicates whether <small>GDB</small> supports fork event
  866. extensions to the remote protocol. <small>GDB</small> does not use such
  867. extensions unless the stub also reports that it supports them by
  868. including &lsquo;<samp>fork-events+</samp>&rsquo; in its &lsquo;<samp>qSupported</samp>&rsquo; reply.
  869. </p>
  870. </dd>
  871. <dt>&lsquo;<samp>vfork-events</samp>&rsquo;</dt>
  872. <dd><p>This feature indicates whether <small>GDB</small> supports vfork event
  873. extensions to the remote protocol. <small>GDB</small> does not use such
  874. extensions unless the stub also reports that it supports them by
  875. including &lsquo;<samp>vfork-events+</samp>&rsquo; in its &lsquo;<samp>qSupported</samp>&rsquo; reply.
  876. </p>
  877. </dd>
  878. <dt>&lsquo;<samp>exec-events</samp>&rsquo;</dt>
  879. <dd><p>This feature indicates whether <small>GDB</small> supports exec event
  880. extensions to the remote protocol. <small>GDB</small> does not use such
  881. extensions unless the stub also reports that it supports them by
  882. including &lsquo;<samp>exec-events+</samp>&rsquo; in its &lsquo;<samp>qSupported</samp>&rsquo; reply.
  883. </p>
  884. </dd>
  885. <dt>&lsquo;<samp>vContSupported</samp>&rsquo;</dt>
  886. <dd><p>This feature indicates whether <small>GDB</small> wants to know the
  887. supported actions in the reply to &lsquo;<samp>vCont?</samp>&rsquo; packet.
  888. </p></dd>
  889. </dl>
  890. <p>Stubs should ignore any unknown values for
  891. <var>gdbfeature</var>. Any <small>GDB</small> which sends a &lsquo;<samp>qSupported</samp>&rsquo;
  892. packet supports receiving packets of unlimited length (earlier
  893. versions of <small>GDB</small> may reject overly long responses). Additional values
  894. for <var>gdbfeature</var> may be defined in the future to let the stub take
  895. advantage of new features in <small>GDB</small>, e.g. incompatible
  896. improvements in the remote protocol&mdash;the &lsquo;<samp>multiprocess</samp>&rsquo; feature is
  897. an example of such a feature. The stub&rsquo;s reply should be independent
  898. of the <var>gdbfeature</var> entries sent by <small>GDB</small>; first <small>GDB</small>
  899. describes all the features it supports, and then the stub replies with
  900. all the features it supports.
  901. </p>
  902. <p>Similarly, <small>GDB</small> will silently ignore unrecognized stub feature
  903. responses, as long as each response uses one of the standard forms.
  904. </p>
  905. <p>Some features are flags. A stub which supports a flag feature
  906. should respond with a &lsquo;<samp>+</samp>&rsquo; form response. Other features
  907. require values, and the stub should respond with an &lsquo;<samp>=</samp>&rsquo;
  908. form response.
  909. </p>
  910. <p>Each feature has a default value, which <small>GDB</small> will use if
  911. &lsquo;<samp>qSupported</samp>&rsquo; is not available or if the feature is not mentioned
  912. in the &lsquo;<samp>qSupported</samp>&rsquo; response. The default values are fixed; a
  913. stub is free to omit any feature responses that match the defaults.
  914. </p>
  915. <p>Not all features can be probed, but for those which can, the probing
  916. mechanism is useful: in some cases, a stub&rsquo;s internal
  917. architecture may not allow the protocol layer to know some information
  918. about the underlying target in advance. This is especially common in
  919. stubs which may be configured for multiple targets.
  920. </p>
  921. <p>These are the currently defined stub features and their properties:
  922. </p>
  923. <table>
  924. <tr><td width="35%">Feature Name</td><td width="20%">Value Required</td><td width="12%">Default</td><td width="20%">Probe Allowed</td></tr>
  925. <tr><td width="35%">&lsquo;<samp>PacketSize</samp>&rsquo;</td><td width="20%">Yes</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  926. <tr><td width="35%">&lsquo;<samp>qXfer:auxv:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  927. <tr><td width="35%">&lsquo;<samp>qXfer:btrace:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  928. <tr><td width="35%">&lsquo;<samp>qXfer:btrace-conf:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  929. <tr><td width="35%">&lsquo;<samp>qXfer:exec-file:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  930. <tr><td width="35%">&lsquo;<samp>qXfer:features:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  931. <tr><td width="35%">&lsquo;<samp>qXfer:libraries:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  932. <tr><td width="35%">&lsquo;<samp>qXfer:libraries-svr4:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  933. <tr><td width="35%">&lsquo;<samp>augmented-libraries-svr4-read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  934. <tr><td width="35%">&lsquo;<samp>qXfer:memory-map:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  935. <tr><td width="35%">&lsquo;<samp>qXfer:sdata:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  936. <tr><td width="35%">&lsquo;<samp>qXfer:siginfo:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  937. <tr><td width="35%">&lsquo;<samp>qXfer:siginfo:write</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  938. <tr><td width="35%">&lsquo;<samp>qXfer:threads:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  939. <tr><td width="35%">&lsquo;<samp>qXfer:traceframe-info:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  940. <tr><td width="35%">&lsquo;<samp>qXfer:uib:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  941. <tr><td width="35%">&lsquo;<samp>qXfer:fdpic:read</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  942. <tr><td width="35%">&lsquo;<samp>Qbtrace:off</samp>&rsquo;</td><td width="20%">Yes</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  943. <tr><td width="35%">&lsquo;<samp>Qbtrace:bts</samp>&rsquo;</td><td width="20%">Yes</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  944. <tr><td width="35%">&lsquo;<samp>Qbtrace:pt</samp>&rsquo;</td><td width="20%">Yes</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  945. <tr><td width="35%">&lsquo;<samp>Qbtrace-conf:bts:size</samp>&rsquo;</td><td width="20%">Yes</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  946. <tr><td width="35%">&lsquo;<samp>Qbtrace-conf:pt:size</samp>&rsquo;</td><td width="20%">Yes</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  947. <tr><td width="35%">&lsquo;<samp>QNonStop</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  948. <tr><td width="35%">&lsquo;<samp>QCatchSyscalls</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  949. <tr><td width="35%">&lsquo;<samp>QPassSignals</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  950. <tr><td width="35%">&lsquo;<samp>QStartNoAckMode</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">Yes</td></tr>
  951. <tr><td width="35%">&lsquo;<samp>multiprocess</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  952. <tr><td width="35%">&lsquo;<samp>ConditionalBreakpoints</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  953. <tr><td width="35%">&lsquo;<samp>ConditionalTracepoints</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  954. <tr><td width="35%">&lsquo;<samp>ReverseContinue</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  955. <tr><td width="35%">&lsquo;<samp>ReverseStep</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  956. <tr><td width="35%">&lsquo;<samp>TracepointSource</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  957. <tr><td width="35%">&lsquo;<samp>QAgent</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  958. <tr><td width="35%">&lsquo;<samp>QAllow</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  959. <tr><td width="35%">&lsquo;<samp>QDisableRandomization</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  960. <tr><td width="35%">&lsquo;<samp>EnableDisableTracepoints</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  961. <tr><td width="35%">&lsquo;<samp>QTBuffer:size</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  962. <tr><td width="35%">&lsquo;<samp>tracenz</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  963. <tr><td width="35%">&lsquo;<samp>BreakpointCommands</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  964. <tr><td width="35%">&lsquo;<samp>swbreak</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  965. <tr><td width="35%">&lsquo;<samp>hwbreak</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  966. <tr><td width="35%">&lsquo;<samp>fork-events</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  967. <tr><td width="35%">&lsquo;<samp>vfork-events</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  968. <tr><td width="35%">&lsquo;<samp>exec-events</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  969. <tr><td width="35%">&lsquo;<samp>QThreadEvents</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  970. <tr><td width="35%">&lsquo;<samp>no-resumed</samp>&rsquo;</td><td width="20%">No</td><td width="12%">&lsquo;<samp>-</samp>&rsquo;</td><td width="20%">No</td></tr>
  971. </table>
  972. <p>These are the currently defined stub features, in more detail:
  973. </p>
  974. <dl compact="compact">
  975. <dd><a name="index-packet-size_002c-remote-protocol"></a>
  976. </dd>
  977. <dt>&lsquo;<samp>PacketSize=<var>bytes</var></samp>&rsquo;</dt>
  978. <dd><p>The remote stub can accept packets up to at least <var>bytes</var> in
  979. length. <small>GDB</small> will send packets up to this size for bulk
  980. transfers, and will never send larger packets. This is a limit on the
  981. data characters in the packet, including the frame and checksum.
  982. There is no trailing NUL byte in a remote protocol packet; if the stub
  983. stores packets in a NUL-terminated format, it should allow an extra
  984. byte in its buffer for the NUL. If this stub feature is not supported,
  985. <small>GDB</small> guesses based on the size of the &lsquo;<samp>g</samp>&rsquo; packet response.
  986. </p>
  987. </dd>
  988. <dt>&lsquo;<samp>qXfer:auxv:read</samp>&rsquo;</dt>
  989. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:auxv:read</samp>&rsquo; packet
  990. (see <a href="#qXfer-auxiliary-vector-read">qXfer auxiliary vector read</a>).
  991. </p>
  992. </dd>
  993. <dt>&lsquo;<samp>qXfer:btrace:read</samp>&rsquo;</dt>
  994. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:btrace:read</samp>&rsquo;
  995. packet (see <a href="#qXfer-btrace-read">qXfer btrace read</a>).
  996. </p>
  997. </dd>
  998. <dt>&lsquo;<samp>qXfer:btrace-conf:read</samp>&rsquo;</dt>
  999. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:btrace-conf:read</samp>&rsquo;
  1000. packet (see <a href="#qXfer-btrace_002dconf-read">qXfer btrace-conf read</a>).
  1001. </p>
  1002. </dd>
  1003. <dt>&lsquo;<samp>qXfer:exec-file:read</samp>&rsquo;</dt>
  1004. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:exec-file:read</samp>&rsquo; packet
  1005. (see <a href="#qXfer-executable-filename-read">qXfer executable filename read</a>).
  1006. </p>
  1007. </dd>
  1008. <dt>&lsquo;<samp>qXfer:features:read</samp>&rsquo;</dt>
  1009. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:features:read</samp>&rsquo; packet
  1010. (see <a href="#qXfer-target-description-read">qXfer target description read</a>).
  1011. </p>
  1012. </dd>
  1013. <dt>&lsquo;<samp>qXfer:libraries:read</samp>&rsquo;</dt>
  1014. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:libraries:read</samp>&rsquo; packet
  1015. (see <a href="#qXfer-library-list-read">qXfer library list read</a>).
  1016. </p>
  1017. </dd>
  1018. <dt>&lsquo;<samp>qXfer:libraries-svr4:read</samp>&rsquo;</dt>
  1019. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:libraries-svr4:read</samp>&rsquo; packet
  1020. (see <a href="#qXfer-svr4-library-list-read">qXfer svr4 library list read</a>).
  1021. </p>
  1022. </dd>
  1023. <dt>&lsquo;<samp>augmented-libraries-svr4-read</samp>&rsquo;</dt>
  1024. <dd><p>The remote stub understands the augmented form of the
  1025. &lsquo;<samp>qXfer:libraries-svr4:read</samp>&rsquo; packet
  1026. (see <a href="#qXfer-svr4-library-list-read">qXfer svr4 library list read</a>).
  1027. </p>
  1028. </dd>
  1029. <dt>&lsquo;<samp>qXfer:memory-map:read</samp>&rsquo;</dt>
  1030. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:memory-map:read</samp>&rsquo; packet
  1031. (see <a href="#qXfer-memory-map-read">qXfer memory map read</a>).
  1032. </p>
  1033. </dd>
  1034. <dt>&lsquo;<samp>qXfer:sdata:read</samp>&rsquo;</dt>
  1035. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:sdata:read</samp>&rsquo; packet
  1036. (see <a href="#qXfer-sdata-read">qXfer sdata read</a>).
  1037. </p>
  1038. </dd>
  1039. <dt>&lsquo;<samp>qXfer:siginfo:read</samp>&rsquo;</dt>
  1040. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:siginfo:read</samp>&rsquo; packet
  1041. (see <a href="#qXfer-siginfo-read">qXfer siginfo read</a>).
  1042. </p>
  1043. </dd>
  1044. <dt>&lsquo;<samp>qXfer:siginfo:write</samp>&rsquo;</dt>
  1045. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:siginfo:write</samp>&rsquo; packet
  1046. (see <a href="#qXfer-siginfo-write">qXfer siginfo write</a>).
  1047. </p>
  1048. </dd>
  1049. <dt>&lsquo;<samp>qXfer:threads:read</samp>&rsquo;</dt>
  1050. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:threads:read</samp>&rsquo; packet
  1051. (see <a href="#qXfer-threads-read">qXfer threads read</a>).
  1052. </p>
  1053. </dd>
  1054. <dt>&lsquo;<samp>qXfer:traceframe-info:read</samp>&rsquo;</dt>
  1055. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:traceframe-info:read</samp>&rsquo;
  1056. packet (see <a href="#qXfer-traceframe-info-read">qXfer traceframe info read</a>).
  1057. </p>
  1058. </dd>
  1059. <dt>&lsquo;<samp>qXfer:uib:read</samp>&rsquo;</dt>
  1060. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:uib:read</samp>&rsquo;
  1061. packet (see <a href="#qXfer-unwind-info-block">qXfer unwind info block</a>).
  1062. </p>
  1063. </dd>
  1064. <dt>&lsquo;<samp>qXfer:fdpic:read</samp>&rsquo;</dt>
  1065. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:fdpic:read</samp>&rsquo;
  1066. packet (see <a href="#qXfer-fdpic-loadmap-read">qXfer fdpic loadmap read</a>).
  1067. </p>
  1068. </dd>
  1069. <dt>&lsquo;<samp>QNonStop</samp>&rsquo;</dt>
  1070. <dd><p>The remote stub understands the &lsquo;<samp>QNonStop</samp>&rsquo; packet
  1071. (see <a href="#QNonStop">QNonStop</a>).
  1072. </p>
  1073. </dd>
  1074. <dt>&lsquo;<samp>QCatchSyscalls</samp>&rsquo;</dt>
  1075. <dd><p>The remote stub understands the &lsquo;<samp>QCatchSyscalls</samp>&rsquo; packet
  1076. (see <a href="#QCatchSyscalls">QCatchSyscalls</a>).
  1077. </p>
  1078. </dd>
  1079. <dt>&lsquo;<samp>QPassSignals</samp>&rsquo;</dt>
  1080. <dd><p>The remote stub understands the &lsquo;<samp>QPassSignals</samp>&rsquo; packet
  1081. (see <a href="#QPassSignals">QPassSignals</a>).
  1082. </p>
  1083. </dd>
  1084. <dt>&lsquo;<samp>QStartNoAckMode</samp>&rsquo;</dt>
  1085. <dd><p>The remote stub understands the &lsquo;<samp>QStartNoAckMode</samp>&rsquo; packet and
  1086. prefers to operate in no-acknowledgment mode. See <a href="Packet-Acknowledgment.html#Packet-Acknowledgment">Packet Acknowledgment</a>.
  1087. </p>
  1088. </dd>
  1089. <dt>&lsquo;<samp>multiprocess</samp>&rsquo;</dt>
  1090. <dd><a name="multiprocess-extensions"></a><a name="index-multiprocess-extensions_002c-in-remote-protocol"></a>
  1091. <p>The remote stub understands the multiprocess extensions to the remote
  1092. protocol syntax. The multiprocess extensions affect the syntax of
  1093. thread IDs in both packets and replies (see <a href="Packets.html#thread_002did-syntax">thread-id syntax</a>), and
  1094. add process IDs to the &lsquo;<samp>D</samp>&rsquo; packet and &lsquo;<samp>W</samp>&rsquo; and &lsquo;<samp>X</samp>&rsquo;
  1095. replies. Note that reporting this feature indicates support for the
  1096. syntactic extensions only, not that the stub necessarily supports
  1097. debugging of more than one process at a time. The stub must not use
  1098. multiprocess extensions in packet replies unless <small>GDB</small> has also
  1099. indicated it supports them in its &lsquo;<samp>qSupported</samp>&rsquo; request.
  1100. </p>
  1101. </dd>
  1102. <dt>&lsquo;<samp>qXfer:osdata:read</samp>&rsquo;</dt>
  1103. <dd><p>The remote stub understands the &lsquo;<samp>qXfer:osdata:read</samp>&rsquo; packet
  1104. ((see <a href="#qXfer-osdata-read">qXfer osdata read</a>).
  1105. </p>
  1106. </dd>
  1107. <dt>&lsquo;<samp>ConditionalBreakpoints</samp>&rsquo;</dt>
  1108. <dd><p>The target accepts and implements evaluation of conditional expressions
  1109. defined for breakpoints. The target will only report breakpoint triggers
  1110. when such conditions are true (see <a href="Conditions.html#Conditions">Break Conditions</a>).
  1111. </p>
  1112. </dd>
  1113. <dt>&lsquo;<samp>ConditionalTracepoints</samp>&rsquo;</dt>
  1114. <dd><p>The remote stub accepts and implements conditional expressions defined
  1115. for tracepoints (see <a href="Tracepoint-Conditions.html#Tracepoint-Conditions">Tracepoint Conditions</a>).
  1116. </p>
  1117. </dd>
  1118. <dt>&lsquo;<samp>ReverseContinue</samp>&rsquo;</dt>
  1119. <dd><p>The remote stub accepts and implements the reverse continue packet
  1120. (see <a href="Packets.html#bc">bc</a>).
  1121. </p>
  1122. </dd>
  1123. <dt>&lsquo;<samp>ReverseStep</samp>&rsquo;</dt>
  1124. <dd><p>The remote stub accepts and implements the reverse step packet
  1125. (see <a href="Packets.html#bs">bs</a>).
  1126. </p>
  1127. </dd>
  1128. <dt>&lsquo;<samp>TracepointSource</samp>&rsquo;</dt>
  1129. <dd><p>The remote stub understands the &lsquo;<samp>QTDPsrc</samp>&rsquo; packet that supplies
  1130. the source form of tracepoint definitions.
  1131. </p>
  1132. </dd>
  1133. <dt>&lsquo;<samp>QAgent</samp>&rsquo;</dt>
  1134. <dd><p>The remote stub understands the &lsquo;<samp>QAgent</samp>&rsquo; packet.
  1135. </p>
  1136. </dd>
  1137. <dt>&lsquo;<samp>QAllow</samp>&rsquo;</dt>
  1138. <dd><p>The remote stub understands the &lsquo;<samp>QAllow</samp>&rsquo; packet.
  1139. </p>
  1140. </dd>
  1141. <dt>&lsquo;<samp>QDisableRandomization</samp>&rsquo;</dt>
  1142. <dd><p>The remote stub understands the &lsquo;<samp>QDisableRandomization</samp>&rsquo; packet.
  1143. </p>
  1144. </dd>
  1145. <dt>&lsquo;<samp>StaticTracepoint</samp>&rsquo;</dt>
  1146. <dd><a name="index-static-tracepoints_002c-in-remote-protocol"></a>
  1147. <p>The remote stub supports static tracepoints.
  1148. </p>
  1149. </dd>
  1150. <dt>&lsquo;<samp>InstallInTrace</samp>&rsquo;</dt>
  1151. <dd><a name="install-tracepoint-in-tracing"></a><p>The remote stub supports installing tracepoint in tracing.
  1152. </p>
  1153. </dd>
  1154. <dt>&lsquo;<samp>EnableDisableTracepoints</samp>&rsquo;</dt>
  1155. <dd><p>The remote stub supports the &lsquo;<samp>QTEnable</samp>&rsquo; (see <a href="Tracepoint-Packets.html#QTEnable">QTEnable</a>) and
  1156. &lsquo;<samp>QTDisable</samp>&rsquo; (see <a href="Tracepoint-Packets.html#QTDisable">QTDisable</a>) packets that allow tracepoints
  1157. to be enabled and disabled while a trace experiment is running.
  1158. </p>
  1159. </dd>
  1160. <dt>&lsquo;<samp>QTBuffer:size</samp>&rsquo;</dt>
  1161. <dd><p>The remote stub supports the &lsquo;<samp>QTBuffer:size</samp>&rsquo; (see <a href="Tracepoint-Packets.html#QTBuffer_002dsize">QTBuffer-size</a>)
  1162. packet that allows to change the size of the trace buffer.
  1163. </p>
  1164. </dd>
  1165. <dt>&lsquo;<samp>tracenz</samp>&rsquo;</dt>
  1166. <dd><a name="index-string-tracing_002c-in-remote-protocol"></a>
  1167. <p>The remote stub supports the &lsquo;<samp>tracenz</samp>&rsquo; bytecode for collecting strings.
  1168. See <a href="Bytecode-Descriptions.html#Bytecode-Descriptions">Bytecode Descriptions</a> for details about the bytecode.
  1169. </p>
  1170. </dd>
  1171. <dt>&lsquo;<samp>BreakpointCommands</samp>&rsquo;</dt>
  1172. <dd><a name="index-breakpoint-commands_002c-in-remote-protocol"></a>
  1173. <p>The remote stub supports running a breakpoint&rsquo;s command list itself,
  1174. rather than reporting the hit to <small>GDB</small>.
  1175. </p>
  1176. </dd>
  1177. <dt>&lsquo;<samp>Qbtrace:off</samp>&rsquo;</dt>
  1178. <dd><p>The remote stub understands the &lsquo;<samp>Qbtrace:off</samp>&rsquo; packet.
  1179. </p>
  1180. </dd>
  1181. <dt>&lsquo;<samp>Qbtrace:bts</samp>&rsquo;</dt>
  1182. <dd><p>The remote stub understands the &lsquo;<samp>Qbtrace:bts</samp>&rsquo; packet.
  1183. </p>
  1184. </dd>
  1185. <dt>&lsquo;<samp>Qbtrace:pt</samp>&rsquo;</dt>
  1186. <dd><p>The remote stub understands the &lsquo;<samp>Qbtrace:pt</samp>&rsquo; packet.
  1187. </p>
  1188. </dd>
  1189. <dt>&lsquo;<samp>Qbtrace-conf:bts:size</samp>&rsquo;</dt>
  1190. <dd><p>The remote stub understands the &lsquo;<samp>Qbtrace-conf:bts:size</samp>&rsquo; packet.
  1191. </p>
  1192. </dd>
  1193. <dt>&lsquo;<samp>Qbtrace-conf:pt:size</samp>&rsquo;</dt>
  1194. <dd><p>The remote stub understands the &lsquo;<samp>Qbtrace-conf:pt:size</samp>&rsquo; packet.
  1195. </p>
  1196. </dd>
  1197. <dt>&lsquo;<samp>swbreak</samp>&rsquo;</dt>
  1198. <dd><p>The remote stub reports the &lsquo;<samp>swbreak</samp>&rsquo; stop reason for memory
  1199. breakpoints.
  1200. </p>
  1201. </dd>
  1202. <dt>&lsquo;<samp>hwbreak</samp>&rsquo;</dt>
  1203. <dd><p>The remote stub reports the &lsquo;<samp>hwbreak</samp>&rsquo; stop reason for hardware
  1204. breakpoints.
  1205. </p>
  1206. </dd>
  1207. <dt>&lsquo;<samp>fork-events</samp>&rsquo;</dt>
  1208. <dd><p>The remote stub reports the &lsquo;<samp>fork</samp>&rsquo; stop reason for fork events.
  1209. </p>
  1210. </dd>
  1211. <dt>&lsquo;<samp>vfork-events</samp>&rsquo;</dt>
  1212. <dd><p>The remote stub reports the &lsquo;<samp>vfork</samp>&rsquo; stop reason for vfork events
  1213. and vforkdone events.
  1214. </p>
  1215. </dd>
  1216. <dt>&lsquo;<samp>exec-events</samp>&rsquo;</dt>
  1217. <dd><p>The remote stub reports the &lsquo;<samp>exec</samp>&rsquo; stop reason for exec events.
  1218. </p>
  1219. </dd>
  1220. <dt>&lsquo;<samp>vContSupported</samp>&rsquo;</dt>
  1221. <dd><p>The remote stub reports the supported actions in the reply to
  1222. &lsquo;<samp>vCont?</samp>&rsquo; packet.
  1223. </p>
  1224. </dd>
  1225. <dt>&lsquo;<samp>QThreadEvents</samp>&rsquo;</dt>
  1226. <dd><p>The remote stub understands the &lsquo;<samp>QThreadEvents</samp>&rsquo; packet.
  1227. </p>
  1228. </dd>
  1229. <dt>&lsquo;<samp>no-resumed</samp>&rsquo;</dt>
  1230. <dd><p>The remote stub reports the &lsquo;<samp>N</samp>&rsquo; stop reply.
  1231. </p>
  1232. </dd>
  1233. </dl>
  1234. </dd>
  1235. <dt>&lsquo;<samp>qSymbol::</samp>&rsquo;</dt>
  1236. <dd><a name="index-symbol-lookup_002c-remote-request"></a>
  1237. <a name="index-qSymbol-packet"></a>
  1238. <p>Notify the target that <small>GDB</small> is prepared to serve symbol lookup
  1239. requests. Accept requests from the target for the values of symbols.
  1240. </p>
  1241. <p>Reply:
  1242. </p><dl compact="compact">
  1243. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  1244. <dd><p>The target does not need to look up any (more) symbols.
  1245. </p></dd>
  1246. <dt>&lsquo;<samp>qSymbol:<var>sym_name</var></samp>&rsquo;</dt>
  1247. <dd><p>The target requests the value of symbol <var>sym_name</var> (hex encoded).
  1248. <small>GDB</small> may provide the value by using the
  1249. &lsquo;<samp>qSymbol:<var>sym_value</var>:<var>sym_name</var></samp>&rsquo; message, described
  1250. below.
  1251. </p></dd>
  1252. </dl>
  1253. </dd>
  1254. <dt>&lsquo;<samp>qSymbol:<var>sym_value</var>:<var>sym_name</var></samp>&rsquo;</dt>
  1255. <dd><p>Set the value of <var>sym_name</var> to <var>sym_value</var>.
  1256. </p>
  1257. <p><var>sym_name</var> (hex encoded) is the name of a symbol whose value the
  1258. target has previously requested.
  1259. </p>
  1260. <p><var>sym_value</var> (hex) is the value for symbol <var>sym_name</var>. If
  1261. <small>GDB</small> cannot supply a value for <var>sym_name</var>, then this field
  1262. will be empty.
  1263. </p>
  1264. <p>Reply:
  1265. </p><dl compact="compact">
  1266. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  1267. <dd><p>The target does not need to look up any (more) symbols.
  1268. </p></dd>
  1269. <dt>&lsquo;<samp>qSymbol:<var>sym_name</var></samp>&rsquo;</dt>
  1270. <dd><p>The target requests the value of a new symbol <var>sym_name</var> (hex
  1271. encoded). <small>GDB</small> will continue to supply the values of symbols
  1272. (if available), until the target ceases to request them.
  1273. </p></dd>
  1274. </dl>
  1275. </dd>
  1276. <dt>&lsquo;<samp>qTBuffer</samp>&rsquo;</dt>
  1277. <dt>&lsquo;<samp>QTBuffer</samp>&rsquo;</dt>
  1278. <dt>&lsquo;<samp>QTDisconnected</samp>&rsquo;</dt>
  1279. <dt>&lsquo;<samp>QTDP</samp>&rsquo;</dt>
  1280. <dt>&lsquo;<samp>QTDPsrc</samp>&rsquo;</dt>
  1281. <dt>&lsquo;<samp>QTDV</samp>&rsquo;</dt>
  1282. <dt>&lsquo;<samp>qTfP</samp>&rsquo;</dt>
  1283. <dt>&lsquo;<samp>qTfV</samp>&rsquo;</dt>
  1284. <dt>&lsquo;<samp>QTFrame</samp>&rsquo;</dt>
  1285. <dt>&lsquo;<samp>qTMinFTPILen</samp>&rsquo;</dt>
  1286. <dd>
  1287. <p>See <a href="Tracepoint-Packets.html#Tracepoint-Packets">Tracepoint Packets</a>.
  1288. </p>
  1289. </dd>
  1290. <dt>&lsquo;<samp>qThreadExtraInfo,<var>thread-id</var></samp>&rsquo;</dt>
  1291. <dd><a name="index-thread-attributes-info_002c-remote-request"></a>
  1292. <a name="index-qThreadExtraInfo-packet"></a>
  1293. <p>Obtain from the target OS a printable string description of thread
  1294. attributes for the thread <var>thread-id</var>; see <a href="Packets.html#thread_002did-syntax">thread-id syntax</a>,
  1295. for the forms of <var>thread-id</var>. This
  1296. string may contain anything that the target OS thinks is interesting
  1297. for <small>GDB</small> to tell the user about the thread. The string is
  1298. displayed in <small>GDB</small>&rsquo;s <code>info threads</code> display. Some
  1299. examples of possible thread extra info strings are &lsquo;<samp>Runnable</samp>&rsquo;, or
  1300. &lsquo;<samp>Blocked on Mutex</samp>&rsquo;.
  1301. </p>
  1302. <p>Reply:
  1303. </p><dl compact="compact">
  1304. <dt>&lsquo;<samp><var>XX</var>&hellip;</samp>&rsquo;</dt>
  1305. <dd><p>Where &lsquo;<samp><var>XX</var>&hellip;</samp>&rsquo; is a hex encoding of <small>ASCII</small> data,
  1306. comprising the printable string containing the extra information about
  1307. the thread&rsquo;s attributes.
  1308. </p></dd>
  1309. </dl>
  1310. <p>(Note that the <code>qThreadExtraInfo</code> packet&rsquo;s name is separated from
  1311. the command by a &lsquo;<samp>,</samp>&rsquo;, not a &lsquo;<samp>:</samp>&rsquo;, contrary to the naming
  1312. conventions above. Please don&rsquo;t use this packet as a model for new
  1313. packets.)
  1314. </p>
  1315. </dd>
  1316. <dt>&lsquo;<samp>QTNotes</samp>&rsquo;</dt>
  1317. <dt>&lsquo;<samp>qTP</samp>&rsquo;</dt>
  1318. <dt>&lsquo;<samp>QTSave</samp>&rsquo;</dt>
  1319. <dt>&lsquo;<samp>qTsP</samp>&rsquo;</dt>
  1320. <dt>&lsquo;<samp>qTsV</samp>&rsquo;</dt>
  1321. <dt>&lsquo;<samp>QTStart</samp>&rsquo;</dt>
  1322. <dt>&lsquo;<samp>QTStop</samp>&rsquo;</dt>
  1323. <dt>&lsquo;<samp>QTEnable</samp>&rsquo;</dt>
  1324. <dt>&lsquo;<samp>QTDisable</samp>&rsquo;</dt>
  1325. <dt>&lsquo;<samp>QTinit</samp>&rsquo;</dt>
  1326. <dt>&lsquo;<samp>QTro</samp>&rsquo;</dt>
  1327. <dt>&lsquo;<samp>qTStatus</samp>&rsquo;</dt>
  1328. <dt>&lsquo;<samp>qTV</samp>&rsquo;</dt>
  1329. <dt>&lsquo;<samp>qTfSTM</samp>&rsquo;</dt>
  1330. <dt>&lsquo;<samp>qTsSTM</samp>&rsquo;</dt>
  1331. <dt>&lsquo;<samp>qTSTMat</samp>&rsquo;</dt>
  1332. <dd><p>See <a href="Tracepoint-Packets.html#Tracepoint-Packets">Tracepoint Packets</a>.
  1333. </p>
  1334. </dd>
  1335. <dt>&lsquo;<samp>qXfer:<var>object</var>:read:<var>annex</var>:<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1336. <dd><a name="index-read-special-object_002c-remote-request"></a>
  1337. <a name="index-qXfer-packet"></a>
  1338. <a name="qXfer-read"></a><p>Read uninterpreted bytes from the target&rsquo;s special data area
  1339. identified by the keyword <var>object</var>. Request <var>length</var> bytes
  1340. starting at <var>offset</var> bytes into the data. The content and
  1341. encoding of <var>annex</var> is specific to <var>object</var>; it can supply
  1342. additional details about what data to access.
  1343. </p>
  1344. <p>Reply:
  1345. </p><dl compact="compact">
  1346. <dt>&lsquo;<samp>m <var>data</var></samp>&rsquo;</dt>
  1347. <dd><p>Data <var>data</var> (see <a href="Overview.html#Binary-Data">Binary Data</a>) has been read from the
  1348. target. There may be more data at a higher address (although
  1349. it is permitted to return &lsquo;<samp>m</samp>&rsquo; even for the last valid
  1350. block of data, as long as at least one byte of data was read).
  1351. It is possible for <var>data</var> to have fewer bytes than the <var>length</var> in the
  1352. request.
  1353. </p>
  1354. </dd>
  1355. <dt>&lsquo;<samp>l <var>data</var></samp>&rsquo;</dt>
  1356. <dd><p>Data <var>data</var> (see <a href="Overview.html#Binary-Data">Binary Data</a>) has been read from the target.
  1357. There is no more data to be read. It is possible for <var>data</var> to
  1358. have fewer bytes than the <var>length</var> in the request.
  1359. </p>
  1360. </dd>
  1361. <dt>&lsquo;<samp>l</samp>&rsquo;</dt>
  1362. <dd><p>The <var>offset</var> in the request is at the end of the data.
  1363. There is no more data to be read.
  1364. </p>
  1365. </dd>
  1366. <dt>&lsquo;<samp>E00</samp>&rsquo;</dt>
  1367. <dd><p>The request was malformed, or <var>annex</var> was invalid.
  1368. </p>
  1369. </dd>
  1370. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  1371. <dd><p>The offset was invalid, or there was an error encountered reading the data.
  1372. The <var>nn</var> part is a hex-encoded <code>errno</code> value.
  1373. </p>
  1374. </dd>
  1375. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  1376. <dd><p>An empty reply indicates the <var>object</var> string was not recognized by
  1377. the stub, or that the object does not support reading.
  1378. </p></dd>
  1379. </dl>
  1380. <p>Here are the specific requests of this form defined so far. All the
  1381. &lsquo;<samp>qXfer:<var>object</var>:read:&hellip;</samp>&rsquo; requests use the same reply
  1382. formats, listed above.
  1383. </p>
  1384. <dl compact="compact">
  1385. <dt>&lsquo;<samp>qXfer:auxv:read::<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1386. <dd><a name="qXfer-auxiliary-vector-read"></a><p>Access the target&rsquo;s <em>auxiliary vector</em>. See <a href="OS-Information.html#OS-Information">auxiliary vector</a>. Note <var>annex</var> must be empty.
  1387. </p>
  1388. <p>This packet is not probed by default; the remote stub must request it,
  1389. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1390. </p>
  1391. </dd>
  1392. <dt>&lsquo;<samp>qXfer:btrace:read:<var>annex</var>:<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1393. <dd><a name="qXfer-btrace-read"></a>
  1394. <p>Return a description of the current branch trace.
  1395. See <a href="Branch-Trace-Format.html#Branch-Trace-Format">Branch Trace Format</a>. The annex part of the generic &lsquo;<samp>qXfer</samp>&rsquo;
  1396. packet may have one of the following values:
  1397. </p>
  1398. <dl compact="compact">
  1399. <dt><code>all</code></dt>
  1400. <dd><p>Returns all available branch trace.
  1401. </p>
  1402. </dd>
  1403. <dt><code>new</code></dt>
  1404. <dd><p>Returns all available branch trace if the branch trace changed since
  1405. the last read request.
  1406. </p>
  1407. </dd>
  1408. <dt><code>delta</code></dt>
  1409. <dd><p>Returns the new branch trace since the last read request. Adds a new
  1410. block to the end of the trace that begins at zero and ends at the source
  1411. location of the first branch in the trace buffer. This extra block is
  1412. used to stitch traces together.
  1413. </p>
  1414. <p>If the trace buffer overflowed, returns an error indicating the overflow.
  1415. </p></dd>
  1416. </dl>
  1417. <p>This packet is not probed by default; the remote stub must request it
  1418. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1419. </p>
  1420. </dd>
  1421. <dt>&lsquo;<samp>qXfer:btrace-conf:read::<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1422. <dd><a name="qXfer-btrace_002dconf-read"></a>
  1423. <p>Return a description of the current branch trace configuration.
  1424. See <a href="Branch-Trace-Configuration-Format.html#Branch-Trace-Configuration-Format">Branch Trace Configuration Format</a>.
  1425. </p>
  1426. <p>This packet is not probed by default; the remote stub must request it
  1427. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1428. </p>
  1429. </dd>
  1430. <dt>&lsquo;<samp>qXfer:exec-file:read:<var>annex</var>:<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1431. <dd><a name="qXfer-executable-filename-read"></a><p>Return the full absolute name of the file that was executed to create
  1432. a process running on the remote system. The annex specifies the
  1433. numeric process ID of the process to query, encoded as a hexadecimal
  1434. number. If the annex part is empty the remote stub should return the
  1435. filename corresponding to the currently executing process.
  1436. </p>
  1437. <p>This packet is not probed by default; the remote stub must request it,
  1438. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1439. </p>
  1440. </dd>
  1441. <dt>&lsquo;<samp>qXfer:features:read:<var>annex</var>:<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1442. <dd><a name="qXfer-target-description-read"></a><p>Access the <em>target description</em>. See <a href="Target-Descriptions.html#Target-Descriptions">Target Descriptions</a>. The
  1443. annex specifies which XML document to access. The main description is
  1444. always loaded from the &lsquo;<samp>target.xml</samp>&rsquo; annex.
  1445. </p>
  1446. <p>This packet is not probed by default; the remote stub must request it,
  1447. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1448. </p>
  1449. </dd>
  1450. <dt>&lsquo;<samp>qXfer:libraries:read:<var>annex</var>:<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1451. <dd><a name="qXfer-library-list-read"></a><p>Access the target&rsquo;s list of loaded libraries. See <a href="Library-List-Format.html#Library-List-Format">Library List Format</a>.
  1452. The annex part of the generic &lsquo;<samp>qXfer</samp>&rsquo; packet must be empty
  1453. (see <a href="#qXfer-read">qXfer read</a>).
  1454. </p>
  1455. <p>Targets which maintain a list of libraries in the program&rsquo;s memory do
  1456. not need to implement this packet; it is designed for platforms where
  1457. the operating system manages the list of loaded libraries.
  1458. </p>
  1459. <p>This packet is not probed by default; the remote stub must request it,
  1460. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1461. </p>
  1462. </dd>
  1463. <dt>&lsquo;<samp>qXfer:libraries-svr4:read:<var>annex</var>:<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1464. <dd><a name="qXfer-svr4-library-list-read"></a><p>Access the target&rsquo;s list of loaded libraries when the target is an SVR4
  1465. platform. See <a href="Library-List-Format-for-SVR4-Targets.html#Library-List-Format-for-SVR4-Targets">Library List Format for SVR4 Targets</a>. The annex part
  1466. of the generic &lsquo;<samp>qXfer</samp>&rsquo; packet must be empty unless the remote
  1467. stub indicated it supports the augmented form of this packet
  1468. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response
  1469. (see <a href="#qXfer-read">qXfer read</a>, <a href="#qSupported">qSupported</a>).
  1470. </p>
  1471. <p>This packet is optional for better performance on SVR4 targets.
  1472. <small>GDB</small> uses memory read packets to read the SVR4 library list otherwise.
  1473. </p>
  1474. <p>This packet is not probed by default; the remote stub must request it,
  1475. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1476. </p>
  1477. <p>If the remote stub indicates it supports the augmented form of this
  1478. packet then the annex part of the generic &lsquo;<samp>qXfer</samp>&rsquo; packet may
  1479. contain a semicolon-separated list of &lsquo;<samp><var>name</var>=<var>value</var></samp>&rsquo;
  1480. arguments. The currently supported arguments are:
  1481. </p>
  1482. <dl compact="compact">
  1483. <dt><code>start=<var>address</var></code></dt>
  1484. <dd><p>A hexadecimal number specifying the address of the &lsquo;<samp>struct
  1485. link_map</samp>&rsquo; to start reading the library list from. If unset or zero
  1486. then the first &lsquo;<samp>struct link_map</samp>&rsquo; in the library list will be
  1487. chosen as the starting point.
  1488. </p>
  1489. </dd>
  1490. <dt><code>prev=<var>address</var></code></dt>
  1491. <dd><p>A hexadecimal number specifying the address of the &lsquo;<samp>struct
  1492. link_map</samp>&rsquo; immediately preceding the &lsquo;<samp>struct link_map</samp>&rsquo;
  1493. specified by the &lsquo;<samp>start</samp>&rsquo; argument. If unset or zero then
  1494. the remote stub will expect that no &lsquo;<samp>struct link_map</samp>&rsquo;
  1495. exists prior to the starting point.
  1496. </p>
  1497. </dd>
  1498. </dl>
  1499. <p>Arguments that are not understood by the remote stub will be silently
  1500. ignored.
  1501. </p>
  1502. </dd>
  1503. <dt>&lsquo;<samp>qXfer:memory-map:read::<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1504. <dd><a name="qXfer-memory-map-read"></a><p>Access the target&rsquo;s <em>memory-map</em>. See <a href="Memory-Map-Format.html#Memory-Map-Format">Memory Map Format</a>. The
  1505. annex part of the generic &lsquo;<samp>qXfer</samp>&rsquo; packet must be empty
  1506. (see <a href="#qXfer-read">qXfer read</a>).
  1507. </p>
  1508. <p>This packet is not probed by default; the remote stub must request it,
  1509. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1510. </p>
  1511. </dd>
  1512. <dt>&lsquo;<samp>qXfer:sdata:read::<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1513. <dd><a name="qXfer-sdata-read"></a>
  1514. <p>Read contents of the extra collected static tracepoint marker
  1515. information. The annex part of the generic &lsquo;<samp>qXfer</samp>&rsquo; packet must
  1516. be empty (see <a href="#qXfer-read">qXfer read</a>). See <a href="Tracepoint-Actions.html#Tracepoint-Actions">Tracepoint
  1517. Action Lists</a>.
  1518. </p>
  1519. <p>This packet is not probed by default; the remote stub must request it,
  1520. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response
  1521. (see <a href="#qSupported">qSupported</a>).
  1522. </p>
  1523. </dd>
  1524. <dt>&lsquo;<samp>qXfer:siginfo:read::<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1525. <dd><a name="qXfer-siginfo-read"></a><p>Read contents of the extra signal information on the target
  1526. system. The annex part of the generic &lsquo;<samp>qXfer</samp>&rsquo; packet must be
  1527. empty (see <a href="#qXfer-read">qXfer read</a>).
  1528. </p>
  1529. <p>This packet is not probed by default; the remote stub must request it,
  1530. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response
  1531. (see <a href="#qSupported">qSupported</a>).
  1532. </p>
  1533. </dd>
  1534. <dt>&lsquo;<samp>qXfer:threads:read::<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1535. <dd><a name="qXfer-threads-read"></a><p>Access the list of threads on target. See <a href="Thread-List-Format.html#Thread-List-Format">Thread List Format</a>. The
  1536. annex part of the generic &lsquo;<samp>qXfer</samp>&rsquo; packet must be empty
  1537. (see <a href="#qXfer-read">qXfer read</a>).
  1538. </p>
  1539. <p>This packet is not probed by default; the remote stub must request it,
  1540. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1541. </p>
  1542. </dd>
  1543. <dt>&lsquo;<samp>qXfer:traceframe-info:read::<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1544. <dd><a name="qXfer-traceframe-info-read"></a>
  1545. <p>Return a description of the current traceframe&rsquo;s contents.
  1546. See <a href="Traceframe-Info-Format.html#Traceframe-Info-Format">Traceframe Info Format</a>. The annex part of the generic
  1547. &lsquo;<samp>qXfer</samp>&rsquo; packet must be empty (see <a href="#qXfer-read">qXfer read</a>).
  1548. </p>
  1549. <p>This packet is not probed by default; the remote stub must request it,
  1550. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1551. </p>
  1552. </dd>
  1553. <dt>&lsquo;<samp>qXfer:uib:read:<var>pc</var>:<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1554. <dd><a name="qXfer-unwind-info-block"></a>
  1555. <p>Return the unwind information block for <var>pc</var>. This packet is used
  1556. on OpenVMS/ia64 to ask the kernel unwind information.
  1557. </p>
  1558. <p>This packet is not probed by default.
  1559. </p>
  1560. </dd>
  1561. <dt>&lsquo;<samp>qXfer:fdpic:read:<var>annex</var>:<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1562. <dd><a name="qXfer-fdpic-loadmap-read"></a><p>Read contents of <code>loadmap</code>s on the target system. The
  1563. annex, either &lsquo;<samp>exec</samp>&rsquo; or &lsquo;<samp>interp</samp>&rsquo;, specifies which <code>loadmap</code>,
  1564. executable <code>loadmap</code> or interpreter <code>loadmap</code> to read.
  1565. </p>
  1566. <p>This packet is not probed by default; the remote stub must request it,
  1567. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response (see <a href="#qSupported">qSupported</a>).
  1568. </p>
  1569. </dd>
  1570. <dt>&lsquo;<samp>qXfer:osdata:read::<var>offset</var>,<var>length</var></samp>&rsquo;</dt>
  1571. <dd><a name="qXfer-osdata-read"></a><p>Access the target&rsquo;s <em>operating system information</em>.
  1572. See <a href="Operating-System-Information.html#Operating-System-Information">Operating System Information</a>.
  1573. </p>
  1574. </dd>
  1575. </dl>
  1576. </dd>
  1577. <dt>&lsquo;<samp>qXfer:<var>object</var>:write:<var>annex</var>:<var>offset</var>:<var>data</var>&hellip;</samp>&rsquo;</dt>
  1578. <dd><a name="index-write-data-into-object_002c-remote-request"></a>
  1579. <a name="qXfer-write"></a><p>Write uninterpreted bytes into the target&rsquo;s special data area
  1580. identified by the keyword <var>object</var>, starting at <var>offset</var> bytes
  1581. into the data. The binary-encoded data (see <a href="Overview.html#Binary-Data">Binary Data</a>) to be
  1582. written is given by <var>data</var>&hellip;. The content and encoding of <var>annex</var>
  1583. is specific to <var>object</var>; it can supply additional details about what data
  1584. to access.
  1585. </p>
  1586. <p>Reply:
  1587. </p><dl compact="compact">
  1588. <dt>&lsquo;<samp><var>nn</var></samp>&rsquo;</dt>
  1589. <dd><p><var>nn</var> (hex encoded) is the number of bytes written.
  1590. This may be fewer bytes than supplied in the request.
  1591. </p>
  1592. </dd>
  1593. <dt>&lsquo;<samp>E00</samp>&rsquo;</dt>
  1594. <dd><p>The request was malformed, or <var>annex</var> was invalid.
  1595. </p>
  1596. </dd>
  1597. <dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
  1598. <dd><p>The offset was invalid, or there was an error encountered writing the data.
  1599. The <var>nn</var> part is a hex-encoded <code>errno</code> value.
  1600. </p>
  1601. </dd>
  1602. <dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
  1603. <dd><p>An empty reply indicates the <var>object</var> string was not
  1604. recognized by the stub, or that the object does not support writing.
  1605. </p></dd>
  1606. </dl>
  1607. <p>Here are the specific requests of this form defined so far. All the
  1608. &lsquo;<samp>qXfer:<var>object</var>:write:&hellip;</samp>&rsquo; requests use the same reply
  1609. formats, listed above.
  1610. </p>
  1611. <dl compact="compact">
  1612. <dt>&lsquo;<samp>qXfer:siginfo:write::<var>offset</var>:<var>data</var>&hellip;</samp>&rsquo;</dt>
  1613. <dd><a name="qXfer-siginfo-write"></a><p>Write <var>data</var> to the extra signal information on the target system.
  1614. The annex part of the generic &lsquo;<samp>qXfer</samp>&rsquo; packet must be
  1615. empty (see <a href="#qXfer-write">qXfer write</a>).
  1616. </p>
  1617. <p>This packet is not probed by default; the remote stub must request it,
  1618. by supplying an appropriate &lsquo;<samp>qSupported</samp>&rsquo; response
  1619. (see <a href="#qSupported">qSupported</a>).
  1620. </p></dd>
  1621. </dl>
  1622. </dd>
  1623. <dt>&lsquo;<samp>qXfer:<var>object</var>:<var>operation</var>:&hellip;</samp>&rsquo;</dt>
  1624. <dd><p>Requests of this form may be added in the future. When a stub does
  1625. not recognize the <var>object</var> keyword, or its support for
  1626. <var>object</var> does not recognize the <var>operation</var> keyword, the stub
  1627. must respond with an empty packet.
  1628. </p>
  1629. </dd>
  1630. <dt>&lsquo;<samp>qAttached:<var>pid</var></samp>&rsquo;</dt>
  1631. <dd><a name="index-query-attached_002c-remote-request"></a>
  1632. <a name="index-qAttached-packet"></a>
  1633. <p>Return an indication of whether the remote server attached to an
  1634. existing process or created a new process. When the multiprocess
  1635. protocol extensions are supported (see <a href="#multiprocess-extensions">multiprocess extensions</a>),
  1636. <var>pid</var> is an integer in hexadecimal format identifying the target
  1637. process. Otherwise, <small>GDB</small> will omit the <var>pid</var> field and
  1638. the query packet will be simplified as &lsquo;<samp>qAttached</samp>&rsquo;.
  1639. </p>
  1640. <p>This query is used, for example, to know whether the remote process
  1641. should be detached or killed when a <small>GDB</small> session is ended with
  1642. the <code>quit</code> command.
  1643. </p>
  1644. <p>Reply:
  1645. </p><dl compact="compact">
  1646. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  1647. <dd><p>The remote server attached to an existing process.
  1648. </p></dd>
  1649. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  1650. <dd><p>The remote server created a new process.
  1651. </p></dd>
  1652. <dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
  1653. <dd><p>A badly formed request or an error was encountered.
  1654. </p></dd>
  1655. </dl>
  1656. </dd>
  1657. <dt>&lsquo;<samp>Qbtrace:bts</samp>&rsquo;</dt>
  1658. <dd><p>Enable branch tracing for the current thread using Branch Trace Store.
  1659. </p>
  1660. <p>Reply:
  1661. </p><dl compact="compact">
  1662. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  1663. <dd><p>Branch tracing has been enabled.
  1664. </p></dd>
  1665. <dt>&lsquo;<samp>E.errtext</samp>&rsquo;</dt>
  1666. <dd><p>A badly formed request or an error was encountered.
  1667. </p></dd>
  1668. </dl>
  1669. </dd>
  1670. <dt>&lsquo;<samp>Qbtrace:pt</samp>&rsquo;</dt>
  1671. <dd><p>Enable branch tracing for the current thread using Intel Processor Trace.
  1672. </p>
  1673. <p>Reply:
  1674. </p><dl compact="compact">
  1675. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  1676. <dd><p>Branch tracing has been enabled.
  1677. </p></dd>
  1678. <dt>&lsquo;<samp>E.errtext</samp>&rsquo;</dt>
  1679. <dd><p>A badly formed request or an error was encountered.
  1680. </p></dd>
  1681. </dl>
  1682. </dd>
  1683. <dt>&lsquo;<samp>Qbtrace:off</samp>&rsquo;</dt>
  1684. <dd><p>Disable branch tracing for the current thread.
  1685. </p>
  1686. <p>Reply:
  1687. </p><dl compact="compact">
  1688. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  1689. <dd><p>Branch tracing has been disabled.
  1690. </p></dd>
  1691. <dt>&lsquo;<samp>E.errtext</samp>&rsquo;</dt>
  1692. <dd><p>A badly formed request or an error was encountered.
  1693. </p></dd>
  1694. </dl>
  1695. </dd>
  1696. <dt>&lsquo;<samp>Qbtrace-conf:bts:size=<var>value</var></samp>&rsquo;</dt>
  1697. <dd><p>Set the requested ring buffer size for new threads that use the
  1698. btrace recording method in bts format.
  1699. </p>
  1700. <p>Reply:
  1701. </p><dl compact="compact">
  1702. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  1703. <dd><p>The ring buffer size has been set.
  1704. </p></dd>
  1705. <dt>&lsquo;<samp>E.errtext</samp>&rsquo;</dt>
  1706. <dd><p>A badly formed request or an error was encountered.
  1707. </p></dd>
  1708. </dl>
  1709. </dd>
  1710. <dt>&lsquo;<samp>Qbtrace-conf:pt:size=<var>value</var></samp>&rsquo;</dt>
  1711. <dd><p>Set the requested ring buffer size for new threads that use the
  1712. btrace recording method in pt format.
  1713. </p>
  1714. <p>Reply:
  1715. </p><dl compact="compact">
  1716. <dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
  1717. <dd><p>The ring buffer size has been set.
  1718. </p></dd>
  1719. <dt>&lsquo;<samp>E.errtext</samp>&rsquo;</dt>
  1720. <dd><p>A badly formed request or an error was encountered.
  1721. </p></dd>
  1722. </dl>
  1723. </dd>
  1724. </dl>
  1725. <div class="footnote">
  1726. <hr>
  1727. <h4 class="footnotes-heading">Footnotes</h4>
  1728. <h3><a name="FOOT20" href="#DOCF20">(20)</a></h3>
  1729. <p>The &lsquo;<samp>qP</samp>&rsquo; and &lsquo;<samp>qL</samp>&rsquo;
  1730. packets predate these conventions, and have arguments without any terminator
  1731. for the packet name; we suspect they are in widespread use in places that
  1732. are difficult to upgrade. The &lsquo;<samp>qC</samp>&rsquo; packet has no arguments, but some
  1733. existing stubs (e.g. RedBoot) are known to not check for the end of the
  1734. packet.</p>
  1735. </div>
  1736. <hr>
  1737. <div class="header">
  1738. <p>
  1739. Next: <a href="Architecture_002dSpecific-Protocol-Details.html#Architecture_002dSpecific-Protocol-Details" accesskey="n" rel="next">Architecture-Specific Protocol Details</a>, Previous: <a href="Stop-Reply-Packets.html#Stop-Reply-Packets" accesskey="p" rel="prev">Stop Reply Packets</a>, Up: <a href="Remote-Protocol.html#Remote-Protocol" accesskey="u" rel="up">Remote Protocol</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>
  1740. </div>
  1741. </body>
  1742. </html>