1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- Copyright (C) 1988-2021 Free Software Foundation, Inc.
4
5Permission is granted to copy, distribute and/or modify this document
6under the terms of the GNU Free Documentation License, Version 1.3 or
7any later version published by the Free Software Foundation; with the
8Invariant Sections being "Free Software" and "Free Software Needs
9Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
10and with the Back-Cover Texts as in (a) below.
11
12(a) The FSF's Back-Cover Text is: "You are free to copy and modify
13this GNU Manual.  Buying copies from GNU Press supports the FSF in
14developing GNU and promoting software freedom." -->
15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
16<head>
17<title>Debugging with GDB: Packets</title>
18
19<meta name="description" content="Debugging with GDB: Packets">
20<meta name="keywords" content="Debugging with GDB: Packets">
21<meta name="resource-type" content="document">
22<meta name="distribution" content="global">
23<meta name="Generator" content="makeinfo">
24<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
25<link href="index.html#Top" rel="start" title="Top">
26<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
28<link href="Remote-Protocol.html#Remote-Protocol" rel="up" title="Remote Protocol">
29<link href="Stop-Reply-Packets.html#Stop-Reply-Packets" rel="next" title="Stop Reply Packets">
30<link href="Overview.html#Overview" rel="previous" title="Overview">
31<style type="text/css">
32<!--
33a.summary-letter {text-decoration: none}
34blockquote.smallquotation {font-size: smaller}
35div.display {margin-left: 3.2em}
36div.example {margin-left: 3.2em}
37div.indentedblock {margin-left: 3.2em}
38div.lisp {margin-left: 3.2em}
39div.smalldisplay {margin-left: 3.2em}
40div.smallexample {margin-left: 3.2em}
41div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
42div.smalllisp {margin-left: 3.2em}
43kbd {font-style:oblique}
44pre.display {font-family: inherit}
45pre.format {font-family: inherit}
46pre.menu-comment {font-family: serif}
47pre.menu-preformatted {font-family: serif}
48pre.smalldisplay {font-family: inherit; font-size: smaller}
49pre.smallexample {font-size: smaller}
50pre.smallformat {font-family: inherit; font-size: smaller}
51pre.smalllisp {font-size: smaller}
52span.nocodebreak {white-space:nowrap}
53span.nolinebreak {white-space:nowrap}
54span.roman {font-family:serif; font-weight:normal}
55span.sansserif {font-family:sans-serif; font-weight:normal}
56ul.no-bullet {list-style: none}
57-->
58</style>
59
60
61</head>
62
63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
64<a name="Packets"></a>
65<div class="header">
66<p>
67Next: <a href="Stop-Reply-Packets.html#Stop-Reply-Packets" accesskey="n" rel="next">Stop Reply Packets</a>, Previous: <a href="Overview.html#Overview" accesskey="p" rel="previous">Overview</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>
68</div>
69<hr>
70<a name="Packets-1"></a>
71<h3 class="section">E.2 Packets</h3>
72
73<p>The following table provides a complete list of all currently defined
74<var>command</var>s and their corresponding response <var>data</var>.
75See <a href="File_002dI_002fO-Remote-Protocol-Extension.html#File_002dI_002fO-Remote-Protocol-Extension">File-I/O Remote Protocol Extension</a>, for details about the File
76I/O extension of the remote protocol.
77</p>
78<p>Each packet&rsquo;s description has a template showing the packet&rsquo;s overall
79syntax, followed by an explanation of the packet&rsquo;s meaning.  We
80include spaces in some of the templates for clarity; these are not
81part of the packet&rsquo;s syntax.  No <small>GDB</small> packet uses spaces to
82separate its components.  For example, a template like &lsquo;<samp>foo
83<var>bar</var> <var>baz</var></samp>&rsquo; describes a packet beginning with the three ASCII
84bytes &lsquo;<samp>foo</samp>&rsquo;, followed by a <var>bar</var>, followed directly by a
85<var>baz</var>.  <small>GDB</small> does not transmit a space character between the
86&lsquo;<samp>foo</samp>&rsquo; and the <var>bar</var>, or between the <var>bar</var> and the
87<var>baz</var>.
88</p>
89<a name="index-thread_002did_002c-in-remote-protocol"></a>
90<a name="thread_002did-syntax"></a><p>Several packets and replies include a <var>thread-id</var> field to identify
91a thread.  Normally these are positive numbers with a target-specific
92interpretation, formatted as big-endian hex strings.  A <var>thread-id</var>
93can also be a literal &lsquo;<samp>-1</samp>&rsquo; to indicate all threads, or &lsquo;<samp>0</samp>&rsquo; to
94pick any thread.
95</p>
96<p>In addition, the remote protocol supports a multiprocess feature in
97which the <var>thread-id</var> syntax is extended to optionally include both
98process and thread ID fields, as &lsquo;<samp>p<var>pid</var>.<var>tid</var></samp>&rsquo;.
99The <var>pid</var> (process) and <var>tid</var> (thread) components each have the
100format described above: a positive number with target-specific
101interpretation formatted as a big-endian hex string, literal &lsquo;<samp>-1</samp>&rsquo;
102to indicate all processes or threads (respectively), or &lsquo;<samp>0</samp>&rsquo; to
103indicate an arbitrary process or thread.  Specifying just a process, as
104&lsquo;<samp>p<var>pid</var></samp>&rsquo;, is equivalent to &lsquo;<samp>p<var>pid</var>.-1</samp>&rsquo;.  It is an
105error to specify all processes but a specific thread, such as
106&lsquo;<samp>p-1.<var>tid</var></samp>&rsquo;.  Note that the &lsquo;<samp>p</samp>&rsquo; prefix is <em>not</em> used
107for those packets and replies explicitly documented to include a process
108ID, rather than a <var>thread-id</var>.
109</p>
110<p>The multiprocess <var>thread-id</var> syntax extensions are only used if both
111<small>GDB</small> and the stub report support for the &lsquo;<samp>multiprocess</samp>&rsquo;
112feature using &lsquo;<samp>qSupported</samp>&rsquo;.  See <a href="General-Query-Packets.html#multiprocess-extensions">multiprocess extensions</a>, for
113more information.
114</p>
115<p>Note that all packet forms beginning with an upper- or lower-case
116letter, other than those described here, are reserved for future use.
117</p>
118<p>Here are the packet descriptions.
119</p>
120<dl compact="compact">
121<dt>&lsquo;<samp>!</samp>&rsquo;</dt>
122<dd><a name="index-_0021-packet"></a>
123<a name="extended-mode"></a><p>Enable extended mode.  In extended mode, the remote server is made
124persistent.  The &lsquo;<samp>R</samp>&rsquo; packet is used to restart the program being
125debugged.
126</p>
127<p>Reply:
128</p><dl compact="compact">
129<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
130<dd><p>The remote target both supports and has enabled extended mode.
131</p></dd>
132</dl>
133
134</dd>
135<dt>&lsquo;<samp>?</samp>&rsquo;</dt>
136<dd><a name="index-_003f-packet"></a>
137<a name="g_t_003f-packet"></a><p>Indicate the reason the target halted.  The reply is the same as for
138step and continue.  This packet has a special interpretation when the
139target is in non-stop mode; see <a href="Remote-Non_002dStop.html#Remote-Non_002dStop">Remote Non-Stop</a>.
140</p>
141<p>Reply:
142See <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>, for the reply specifications.
143</p>
144</dd>
145<dt>&lsquo;<samp>A <var>arglen</var>,<var>argnum</var>,<var>arg</var>,&hellip;</samp>&rsquo;</dt>
146<dd><a name="index-A-packet"></a>
147<p>Initialized <code>argv[]</code> array passed into program. <var>arglen</var>
148specifies the number of bytes in the hex encoded byte stream
149<var>arg</var>.  See <code>gdbserver</code> for more details.
150</p>
151<p>Reply:
152</p><dl compact="compact">
153<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
154<dd><p>The arguments were set.
155</p></dd>
156<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
157<dd><p>An error occurred.
158</p></dd>
159</dl>
160
161</dd>
162<dt>&lsquo;<samp>b <var>baud</var></samp>&rsquo;</dt>
163<dd><a name="index-b-packet"></a>
164<p>(Don&rsquo;t use this packet; its behavior is not well-defined.)
165Change the serial line speed to <var>baud</var>.
166</p>
167<p>JTC: <em>When does the transport layer state change?  When it&rsquo;s
168received, or after the ACK is transmitted.  In either case, there are
169problems if the command or the acknowledgment packet is dropped.</em>
170</p>
171<p>Stan: <em>If people really wanted to add something like this, and get
172it working for the first time, they ought to modify ser-unix.c to send
173some kind of out-of-band message to a specially-setup stub and have the
174switch happen &quot;in between&quot; packets, so that from remote protocol&rsquo;s point
175of view, nothing actually happened.</em>
176</p>
177</dd>
178<dt>&lsquo;<samp>B <var>addr</var>,<var>mode</var></samp>&rsquo;</dt>
179<dd><a name="index-B-packet"></a>
180<p>Set (<var>mode</var> is &lsquo;<samp>S</samp>&rsquo;) or clear (<var>mode</var> is &lsquo;<samp>C</samp>&rsquo;) a
181breakpoint at <var>addr</var>.
182</p>
183<p>Don&rsquo;t use this packet.  Use the &lsquo;<samp>Z</samp>&rsquo; and &lsquo;<samp>z</samp>&rsquo; packets instead
184(see <a href="#insert-breakpoint-or-watchpoint-packet">insert breakpoint or watchpoint packet</a>).
185</p>
186<a name="index-bc-packet"></a>
187<a name="bc"></a></dd>
188<dt>&lsquo;<samp>bc</samp>&rsquo;</dt>
189<dd><p>Backward continue.  Execute the target system in reverse.  No parameter.
190See <a href="Reverse-Execution.html#Reverse-Execution">Reverse Execution</a>, for more information.
191</p>
192<p>Reply:
193See <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>, for the reply specifications.
194</p>
195<a name="index-bs-packet"></a>
196<a name="bs"></a></dd>
197<dt>&lsquo;<samp>bs</samp>&rsquo;</dt>
198<dd><p>Backward single step.  Execute one instruction in reverse.  No parameter.
199See <a href="Reverse-Execution.html#Reverse-Execution">Reverse Execution</a>, for more information.
200</p>
201<p>Reply:
202See <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>, for the reply specifications.
203</p>
204</dd>
205<dt>&lsquo;<samp>c <span class="roman">[</span><var>addr</var><span class="roman">]</span></samp>&rsquo;</dt>
206<dd><a name="index-c-packet"></a>
207<p>Continue at <var>addr</var>, which is the address to resume.  If <var>addr</var>
208is omitted, resume at current address.
209</p>
210<p>This packet is deprecated for multi-threading support.  See <a href="#vCont-packet">vCont packet</a>.
211</p>
212<p>Reply:
213See <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>, for the reply specifications.
214</p>
215</dd>
216<dt>&lsquo;<samp>C <var>sig</var><span class="roman">[</span>;<var>addr</var><span class="roman">]</span></samp>&rsquo;</dt>
217<dd><a name="index-C-packet"></a>
218<p>Continue with signal <var>sig</var> (hex signal number).  If
219&lsquo;<samp>;<var>addr</var></samp>&rsquo; is omitted, resume at same address.
220</p>
221<p>This packet is deprecated for multi-threading support.  See <a href="#vCont-packet">vCont packet</a>.
222</p>
223<p>Reply:
224See <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>, for the reply specifications.
225</p>
226</dd>
227<dt>&lsquo;<samp>d</samp>&rsquo;</dt>
228<dd><a name="index-d-packet"></a>
229<p>Toggle debug flag.
230</p>
231<p>Don&rsquo;t use this packet; instead, define a general set packet
232(see <a href="General-Query-Packets.html#General-Query-Packets">General Query Packets</a>).
233</p>
234</dd>
235<dt>&lsquo;<samp>D</samp>&rsquo;</dt>
236<dt>&lsquo;<samp>D;<var>pid</var></samp>&rsquo;</dt>
237<dd><a name="index-D-packet"></a>
238<p>The first form of the packet is used to detach <small>GDB</small> from the
239remote system.  It is sent to the remote target
240before <small>GDB</small> disconnects via the <code>detach</code> command.
241</p>
242<p>The second form, including a process ID, is used when multiprocess
243protocol extensions are enabled (see <a href="General-Query-Packets.html#multiprocess-extensions">multiprocess extensions</a>), to
244detach only a specific process.  The <var>pid</var> is specified as a
245big-endian hex string.
246</p>
247<p>Reply:
248</p><dl compact="compact">
249<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
250<dd><p>for success
251</p></dd>
252<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
253<dd><p>for an error
254</p></dd>
255</dl>
256
257</dd>
258<dt>&lsquo;<samp>F <var>RC</var>,<var>EE</var>,<var>CF</var>;<var>XX</var></samp>&rsquo;</dt>
259<dd><a name="index-F-packet"></a>
260<p>A reply from <small>GDB</small> to an &lsquo;<samp>F</samp>&rsquo; packet sent by the target.
261This is part of the File-I/O protocol extension.  See <a href="File_002dI_002fO-Remote-Protocol-Extension.html#File_002dI_002fO-Remote-Protocol-Extension">File-I/O Remote Protocol Extension</a>, for the specification.
262</p>
263</dd>
264<dt>&lsquo;<samp>g</samp>&rsquo;</dt>
265<dd><a name="read-registers-packet"></a><a name="index-g-packet"></a>
266<p>Read general registers.
267</p>
268<p>Reply:
269</p><dl compact="compact">
270<dt>&lsquo;<samp><var>XX&hellip;</var></samp>&rsquo;</dt>
271<dd><p>Each byte of register data is described by two hex digits.  The bytes
272with the register are transmitted in target byte order.  The size of
273each register and their position within the &lsquo;<samp>g</samp>&rsquo; packet are
274determined by the <small>GDB</small> internal gdbarch functions
275<code>DEPRECATED_REGISTER_RAW_SIZE</code> and <code>gdbarch_register_name</code>.
276</p>
277<p>When reading registers from a trace frame (see <a href="Analyze-Collected-Data.html#Analyze-Collected-Data">Using the Collected Data</a>), the stub may also return a string of
278literal &lsquo;<samp>x</samp>&rsquo;&rsquo;s in place of the register data digits, to indicate
279that the corresponding register has not been collected, thus its value
280is unavailable.  For example, for an architecture with 4 registers of
2814 bytes each, the following reply indicates to <small>GDB</small> that
282registers 0 and 2 have not been collected, while registers 1 and 3
283have been collected, and both have zero value:
284</p>
285<div class="smallexample">
286<pre class="smallexample">-&gt; <code>g</code>
287&lt;- <code>xxxxxxxx00000000xxxxxxxx00000000</code>
288</pre></div>
289
290</dd>
291<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
292<dd><p>for an error.
293</p></dd>
294</dl>
295
296</dd>
297<dt>&lsquo;<samp>G <var>XX&hellip;</var></samp>&rsquo;</dt>
298<dd><a name="index-G-packet"></a>
299<p>Write general registers.  See <a href="#read-registers-packet">read registers packet</a>, for a
300description of the <var>XX&hellip;</var> data.
301</p>
302<p>Reply:
303</p><dl compact="compact">
304<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
305<dd><p>for success
306</p></dd>
307<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
308<dd><p>for an error
309</p></dd>
310</dl>
311
312</dd>
313<dt>&lsquo;<samp>H <var>op</var> <var>thread-id</var></samp>&rsquo;</dt>
314<dd><a name="index-H-packet"></a>
315<p>Set thread for subsequent operations (&lsquo;<samp>m</samp>&rsquo;, &lsquo;<samp>M</samp>&rsquo;, &lsquo;<samp>g</samp>&rsquo;,
316&lsquo;<samp>G</samp>&rsquo;, et.al.).  Depending on the operation to be performed, <var>op</var>
317should be &lsquo;<samp>c</samp>&rsquo; for step and continue operations (note that this
318is deprecated, supporting the &lsquo;<samp>vCont</samp>&rsquo; command is a better
319option), and &lsquo;<samp>g</samp>&rsquo; for other operations.  The thread designator
320<var>thread-id</var> has the format and interpretation described in
321<a href="#thread_002did-syntax">thread-id syntax</a>.
322</p>
323<p>Reply:
324</p><dl compact="compact">
325<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
326<dd><p>for success
327</p></dd>
328<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
329<dd><p>for an error
330</p></dd>
331</dl>
332
333
334</dd>
335<dt>&lsquo;<samp>i <span class="roman">[</span><var>addr</var><span class="roman">[</span>,<var>nnn</var><span class="roman">]]</span></samp>&rsquo;</dt>
336<dd><a name="cycle-step-packet"></a><a name="index-i-packet"></a>
337<p>Step the remote target by a single clock cycle.  If &lsquo;<samp>,<var>nnn</var></samp>&rsquo; is
338present, cycle step <var>nnn</var> cycles.  If <var>addr</var> is present, cycle
339step starting at that address.
340</p>
341</dd>
342<dt>&lsquo;<samp>I</samp>&rsquo;</dt>
343<dd><a name="index-I-packet"></a>
344<p>Signal, then cycle step.  See <a href="#step-with-signal-packet">step with signal packet</a>.  See <a href="#cycle-step-packet">cycle step packet</a>.
345</p>
346</dd>
347<dt>&lsquo;<samp>k</samp>&rsquo;</dt>
348<dd><a name="index-k-packet"></a>
349<p>Kill request.
350</p>
351<p>The exact effect of this packet is not specified.
352</p>
353<p>For a bare-metal target, it may power cycle or reset the target
354system.  For that reason, the &lsquo;<samp>k</samp>&rsquo; packet has no reply.
355</p>
356<p>For a single-process target, it may kill that process if possible.
357</p>
358<p>A multiple-process target may choose to kill just one process, or all
359that are under <small>GDB</small>&rsquo;s control.  For more precise control, use
360the vKill packet (see <a href="#vKill-packet">vKill packet</a>).
361</p>
362<p>If the target system immediately closes the connection in response to
363&lsquo;<samp>k</samp>&rsquo;, <small>GDB</small> does not consider the lack of packet
364acknowledgment to be an error, and assumes the kill was successful.
365</p>
366<p>If connected using <kbd>target extended-remote</kbd>, and the target does
367not close the connection in response to a kill request, <small>GDB</small>
368probes the target state as if a new connection was opened
369(see <a href="#g_t_003f-packet">? packet</a>).
370</p>
371</dd>
372<dt>&lsquo;<samp>m <var>addr</var>,<var>length</var></samp>&rsquo;</dt>
373<dd><a name="index-m-packet"></a>
374<p>Read <var>length</var> addressable memory units starting at address <var>addr</var>
375(see <a href="Memory.html#addressable-memory-unit">addressable memory unit</a>).  Note that <var>addr</var> may not be aligned to
376any particular boundary.
377</p>
378<p>The stub need not use any particular size or alignment when gathering
379data from memory for the response; even if <var>addr</var> is word-aligned
380and <var>length</var> is a multiple of the word size, the stub is free to
381use byte accesses, or not.  For this reason, this packet may not be
382suitable for accessing memory-mapped I/O devices.
383<a name="index-alignment-of-remote-memory-accesses"></a>
384<a name="index-size-of-remote-memory-accesses"></a>
385<a name="index-memory_002c-alignment-and-size-of-remote-accesses"></a>
386</p>
387<p>Reply:
388</p><dl compact="compact">
389<dt>&lsquo;<samp><var>XX&hellip;</var></samp>&rsquo;</dt>
390<dd><p>Memory contents; each byte is transmitted as a two-digit hexadecimal number.
391The reply may contain fewer addressable memory units than requested if the
392server was able to read only part of the region of memory.
393</p></dd>
394<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
395<dd><p><var>NN</var> is errno
396</p></dd>
397</dl>
398
399</dd>
400<dt>&lsquo;<samp>M <var>addr</var>,<var>length</var>:<var>XX&hellip;</var></samp>&rsquo;</dt>
401<dd><a name="index-M-packet"></a>
402<p>Write <var>length</var> addressable memory units starting at address <var>addr</var>
403(see <a href="Memory.html#addressable-memory-unit">addressable memory unit</a>).  The data is given by <var>XX&hellip;</var>; each
404byte is transmitted as a two-digit hexadecimal number.
405</p>
406<p>Reply:
407</p><dl compact="compact">
408<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
409<dd><p>for success
410</p></dd>
411<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
412<dd><p>for an error (this includes the case where only part of the data was
413written).
414</p></dd>
415</dl>
416
417</dd>
418<dt>&lsquo;<samp>p <var>n</var></samp>&rsquo;</dt>
419<dd><a name="index-p-packet"></a>
420<p>Read the value of register <var>n</var>; <var>n</var> is in hex.
421See <a href="#read-registers-packet">read registers packet</a>, for a description of how the returned
422register value is encoded.
423</p>
424<p>Reply:
425</p><dl compact="compact">
426<dt>&lsquo;<samp><var>XX&hellip;</var></samp>&rsquo;</dt>
427<dd><p>the register&rsquo;s value
428</p></dd>
429<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
430<dd><p>for an error
431</p></dd>
432<dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
433<dd><p>Indicating an unrecognized <var>query</var>.
434</p></dd>
435</dl>
436
437</dd>
438<dt>&lsquo;<samp>P <var>n&hellip;</var>=<var>r&hellip;</var></samp>&rsquo;</dt>
439<dd><a name="write-register-packet"></a><a name="index-P-packet"></a>
440<p>Write register <var>n&hellip;</var> with value <var>r&hellip;</var>.  The register
441number <var>n</var> is in hexadecimal, and <var>r&hellip;</var> contains two hex
442digits for each byte in the register (target byte order).
443</p>
444<p>Reply:
445</p><dl compact="compact">
446<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
447<dd><p>for success
448</p></dd>
449<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
450<dd><p>for an error
451</p></dd>
452</dl>
453
454</dd>
455<dt>&lsquo;<samp>q <var>name</var> <var>params</var>&hellip;</samp>&rsquo;</dt>
456<dt>&lsquo;<samp>Q <var>name</var> <var>params</var>&hellip;</samp>&rsquo;</dt>
457<dd><a name="index-q-packet"></a>
458<a name="index-Q-packet"></a>
459<p>General query (&lsquo;<samp>q</samp>&rsquo;) and set (&lsquo;<samp>Q</samp>&rsquo;).  These packets are
460described fully in <a href="General-Query-Packets.html#General-Query-Packets">General Query Packets</a>.
461</p>
462</dd>
463<dt>&lsquo;<samp>r</samp>&rsquo;</dt>
464<dd><a name="index-r-packet"></a>
465<p>Reset the entire system.
466</p>
467<p>Don&rsquo;t use this packet; use the &lsquo;<samp>R</samp>&rsquo; packet instead.
468</p>
469</dd>
470<dt>&lsquo;<samp>R <var>XX</var></samp>&rsquo;</dt>
471<dd><a name="index-R-packet"></a>
472<p>Restart the program being debugged.  The <var>XX</var>, while needed, is ignored.
473This packet is only available in extended mode (see <a href="#extended-mode">extended mode</a>).
474</p>
475<p>The &lsquo;<samp>R</samp>&rsquo; packet has no reply.
476</p>
477</dd>
478<dt>&lsquo;<samp>s <span class="roman">[</span><var>addr</var><span class="roman">]</span></samp>&rsquo;</dt>
479<dd><a name="index-s-packet"></a>
480<p>Single step, resuming at <var>addr</var>.  If
481<var>addr</var> is omitted, resume at same address.
482</p>
483<p>This packet is deprecated for multi-threading support.  See <a href="#vCont-packet">vCont packet</a>.
484</p>
485<p>Reply:
486See <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>, for the reply specifications.
487</p>
488</dd>
489<dt>&lsquo;<samp>S <var>sig</var><span class="roman">[</span>;<var>addr</var><span class="roman">]</span></samp>&rsquo;</dt>
490<dd><a name="step-with-signal-packet"></a><a name="index-S-packet"></a>
491<p>Step with signal.  This is analogous to the &lsquo;<samp>C</samp>&rsquo; packet, but
492requests a single-step, rather than a normal resumption of execution.
493</p>
494<p>This packet is deprecated for multi-threading support.  See <a href="#vCont-packet">vCont packet</a>.
495</p>
496<p>Reply:
497See <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>, for the reply specifications.
498</p>
499</dd>
500<dt>&lsquo;<samp>t <var>addr</var>:<var>PP</var>,<var>MM</var></samp>&rsquo;</dt>
501<dd><a name="index-t-packet"></a>
502<p>Search backwards starting at address <var>addr</var> for a match with pattern
503<var>PP</var> and mask <var>MM</var>, both of which are are 4 byte long.
504There must be at least 3 digits in <var>addr</var>.
505</p>
506</dd>
507<dt>&lsquo;<samp>T <var>thread-id</var></samp>&rsquo;</dt>
508<dd><a name="index-T-packet"></a>
509<p>Find out if the thread <var>thread-id</var> is alive.  See <a href="#thread_002did-syntax">thread-id syntax</a>.
510</p>
511<p>Reply:
512</p><dl compact="compact">
513<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
514<dd><p>thread is still alive
515</p></dd>
516<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
517<dd><p>thread is dead
518</p></dd>
519</dl>
520
521</dd>
522<dt>&lsquo;<samp>v</samp>&rsquo;</dt>
523<dd><p>Packets starting with &lsquo;<samp>v</samp>&rsquo; are identified by a multi-letter name,
524up to the first &lsquo;<samp>;</samp>&rsquo; or &lsquo;<samp>?</samp>&rsquo; (or the end of the packet).
525</p>
526</dd>
527<dt>&lsquo;<samp>vAttach;<var>pid</var></samp>&rsquo;</dt>
528<dd><a name="index-vAttach-packet"></a>
529<p>Attach to a new process with the specified process ID <var>pid</var>.
530The process ID is a
531hexadecimal integer identifying the process.  In all-stop mode, all
532threads in the attached process are stopped; in non-stop mode, it may be
533attached without being stopped if that is supported by the target.
534</p>
535
536<p>This packet is only available in extended mode (see <a href="#extended-mode">extended mode</a>).
537</p>
538<p>Reply:
539</p><dl compact="compact">
540<dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
541<dd><p>for an error
542</p></dd>
543<dt>&lsquo;<samp><span class="roman">Any stop packet</span></samp>&rsquo;</dt>
544<dd><p>for success in all-stop mode (see <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>)
545</p></dd>
546<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
547<dd><p>for success in non-stop mode (see <a href="Remote-Non_002dStop.html#Remote-Non_002dStop">Remote Non-Stop</a>)
548</p></dd>
549</dl>
550
551</dd>
552<dt>&lsquo;<samp>vCont<span class="roman">[</span>;<var>action</var><span class="roman">[</span>:<var>thread-id</var><span class="roman">]]</span>&hellip;</samp>&rsquo;</dt>
553<dd><a name="index-vCont-packet"></a>
554<a name="vCont-packet"></a><p>Resume the inferior, specifying different actions for each thread.
555</p>
556<p>For each inferior thread, the leftmost action with a matching
557<var>thread-id</var> is applied.  Threads that don&rsquo;t match any action
558remain in their current state.  Thread IDs are specified using the
559syntax described in <a href="#thread_002did-syntax">thread-id syntax</a>.  If multiprocess
560extensions (see <a href="General-Query-Packets.html#multiprocess-extensions">multiprocess extensions</a>) are supported, actions
561can be specified to match all threads in a process by using the
562&lsquo;<samp>p<var>pid</var>.-1</samp>&rsquo; form of the <var>thread-id</var>.  An action with no
563<var>thread-id</var> matches all threads.  Specifying no actions is an
564error.
565</p>
566<p>Currently supported actions are:
567</p>
568<dl compact="compact">
569<dt>&lsquo;<samp>c</samp>&rsquo;</dt>
570<dd><p>Continue.
571</p></dd>
572<dt>&lsquo;<samp>C <var>sig</var></samp>&rsquo;</dt>
573<dd><p>Continue with signal <var>sig</var>.  The signal <var>sig</var> should be two hex digits.
574</p></dd>
575<dt>&lsquo;<samp>s</samp>&rsquo;</dt>
576<dd><p>Step.
577</p></dd>
578<dt>&lsquo;<samp>S <var>sig</var></samp>&rsquo;</dt>
579<dd><p>Step with signal <var>sig</var>.  The signal <var>sig</var> should be two hex digits.
580</p></dd>
581<dt>&lsquo;<samp>t</samp>&rsquo;</dt>
582<dd><p>Stop.
583</p></dd>
584<dt>&lsquo;<samp>r <var>start</var>,<var>end</var></samp>&rsquo;</dt>
585<dd><p>Step once, and then keep stepping as long as the thread stops at
586addresses between <var>start</var> (inclusive) and <var>end</var> (exclusive).
587The remote stub reports a stop reply when either the thread goes out
588of the range or is stopped due to an unrelated reason, such as hitting
589a breakpoint.  See <a href="Continuing-and-Stepping.html#range-stepping">range stepping</a>.
590</p>
591<p>If the range is empty (<var>start</var> == <var>end</var>), then the action
592becomes equivalent to the &lsquo;<samp>s</samp>&rsquo; action.  In other words,
593single-step once, and report the stop (even if the stepped instruction
594jumps to <var>start</var>).
595</p>
596<p>(A stop reply may be sent at any point even if the PC is still within
597the stepping range; for example, it is valid to implement this packet
598in a degenerate way as a single instruction step operation.)
599</p>
600</dd>
601</dl>
602
603<p>The optional argument <var>addr</var> normally associated with the
604&lsquo;<samp>c</samp>&rsquo;, &lsquo;<samp>C</samp>&rsquo;, &lsquo;<samp>s</samp>&rsquo;, and &lsquo;<samp>S</samp>&rsquo; packets is
605not supported in &lsquo;<samp>vCont</samp>&rsquo;.
606</p>
607<p>The &lsquo;<samp>t</samp>&rsquo; action is only relevant in non-stop mode
608(see <a href="Remote-Non_002dStop.html#Remote-Non_002dStop">Remote Non-Stop</a>) and may be ignored by the stub otherwise.
609A stop reply should be generated for any affected thread not already stopped.
610When a thread is stopped by means of a &lsquo;<samp>t</samp>&rsquo; action,
611the corresponding stop reply should indicate that the thread has stopped with
612signal &lsquo;<samp>0</samp>&rsquo;, regardless of whether the target uses some other signal
613as an implementation detail.
614</p>
615<p>The server must ignore &lsquo;<samp>c</samp>&rsquo;, &lsquo;<samp>C</samp>&rsquo;, &lsquo;<samp>s</samp>&rsquo;, &lsquo;<samp>S</samp>&rsquo;, and
616&lsquo;<samp>r</samp>&rsquo; actions for threads that are already running.  Conversely,
617the server must ignore &lsquo;<samp>t</samp>&rsquo; actions for threads that are already
618stopped.
619</p>
620<p><em>Note:</em> In non-stop mode, a thread is considered running until
621<small>GDB</small> acknowledges an asynchronous stop notification for it with
622the &lsquo;<samp>vStopped</samp>&rsquo; packet (see <a href="Remote-Non_002dStop.html#Remote-Non_002dStop">Remote Non-Stop</a>).
623</p>
624<p>The stub must support &lsquo;<samp>vCont</samp>&rsquo; if it reports support for
625multiprocess extensions (see <a href="General-Query-Packets.html#multiprocess-extensions">multiprocess extensions</a>).
626</p>
627<p>Reply:
628See <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>, for the reply specifications.
629</p>
630</dd>
631<dt>&lsquo;<samp>vCont?</samp>&rsquo;</dt>
632<dd><a name="index-vCont_003f-packet"></a>
633<p>Request a list of actions supported by the &lsquo;<samp>vCont</samp>&rsquo; packet.
634</p>
635<p>Reply:
636</p><dl compact="compact">
637<dt>&lsquo;<samp>vCont<span class="roman">[</span>;<var>action</var>&hellip;<span class="roman">]</span></samp>&rsquo;</dt>
638<dd><p>The &lsquo;<samp>vCont</samp>&rsquo; packet is supported.  Each <var>action</var> is a supported
639command in the &lsquo;<samp>vCont</samp>&rsquo; packet.
640</p></dd>
641<dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
642<dd><p>The &lsquo;<samp>vCont</samp>&rsquo; packet is not supported.
643</p></dd>
644</dl>
645
646<a name="vCtrlC-packet"></a></dd>
647<dt>&lsquo;<samp>vCtrlC</samp>&rsquo;</dt>
648<dd><a name="index-vCtrlC-packet"></a>
649<p>Interrupt remote target as if a control-C was pressed on the remote
650terminal.  This is the equivalent to reacting to the <code>^C</code>
651(&lsquo;<samp>\003</samp>&rsquo;, the control-C character) character in all-stop mode
652while the target is running, except this works in non-stop mode.
653See <a href="Interrupts.html#interrupting-remote-targets">interrupting remote targets</a>, for more info on the all-stop
654variant.
655</p>
656<p>Reply:
657</p><dl compact="compact">
658<dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
659<dd><p>for an error
660</p></dd>
661<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
662<dd><p>for success
663</p></dd>
664</dl>
665
666</dd>
667<dt>&lsquo;<samp>vFile:<var>operation</var>:<var>parameter</var>&hellip;</samp>&rsquo;</dt>
668<dd><a name="index-vFile-packet"></a>
669<p>Perform a file operation on the target system.  For details,
670see <a href="Host-I_002fO-Packets.html#Host-I_002fO-Packets">Host I/O Packets</a>.
671</p>
672</dd>
673<dt>&lsquo;<samp>vFlashErase:<var>addr</var>,<var>length</var></samp>&rsquo;</dt>
674<dd><a name="index-vFlashErase-packet"></a>
675<p>Direct the stub to erase <var>length</var> bytes of flash starting at
676<var>addr</var>.  The region may enclose any number of flash blocks, but
677its start and end must fall on block boundaries, as indicated by the
678flash block size appearing in the memory map (see <a href="Memory-Map-Format.html#Memory-Map-Format">Memory Map Format</a>).  <small>GDB</small> groups flash memory programming operations
679together, and sends a &lsquo;<samp>vFlashDone</samp>&rsquo; request after each group; the
680stub is allowed to delay erase operation until the &lsquo;<samp>vFlashDone</samp>&rsquo;
681packet is received.
682</p>
683<p>Reply:
684</p><dl compact="compact">
685<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
686<dd><p>for success
687</p></dd>
688<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
689<dd><p>for an error
690</p></dd>
691</dl>
692
693</dd>
694<dt>&lsquo;<samp>vFlashWrite:<var>addr</var>:<var>XX&hellip;</var></samp>&rsquo;</dt>
695<dd><a name="index-vFlashWrite-packet"></a>
696<p>Direct the stub to write data to flash address <var>addr</var>.  The data
697is passed in binary form using the same encoding as for the &lsquo;<samp>X</samp>&rsquo;
698packet (see <a href="Overview.html#Binary-Data">Binary Data</a>).  The memory ranges specified by
699&lsquo;<samp>vFlashWrite</samp>&rsquo; packets preceding a &lsquo;<samp>vFlashDone</samp>&rsquo; packet must
700not overlap, and must appear in order of increasing addresses
701(although &lsquo;<samp>vFlashErase</samp>&rsquo; packets for higher addresses may already
702have been received; the ordering is guaranteed only between
703&lsquo;<samp>vFlashWrite</samp>&rsquo; packets).  If a packet writes to an address that was
704neither erased by a preceding &lsquo;<samp>vFlashErase</samp>&rsquo; packet nor by some other
705target-specific method, the results are unpredictable.
706</p>
707
708<p>Reply:
709</p><dl compact="compact">
710<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
711<dd><p>for success
712</p></dd>
713<dt>&lsquo;<samp>E.memtype</samp>&rsquo;</dt>
714<dd><p>for vFlashWrite addressing non-flash memory
715</p></dd>
716<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
717<dd><p>for an error
718</p></dd>
719</dl>
720
721</dd>
722<dt>&lsquo;<samp>vFlashDone</samp>&rsquo;</dt>
723<dd><a name="index-vFlashDone-packet"></a>
724<p>Indicate to the stub that flash programming operation is finished.
725The stub is permitted to delay or batch the effects of a group of
726&lsquo;<samp>vFlashErase</samp>&rsquo; and &lsquo;<samp>vFlashWrite</samp>&rsquo; packets until a
727&lsquo;<samp>vFlashDone</samp>&rsquo; packet is received.  The contents of the affected
728regions of flash memory are unpredictable until the &lsquo;<samp>vFlashDone</samp>&rsquo;
729request is completed.
730</p>
731</dd>
732<dt>&lsquo;<samp>vKill;<var>pid</var></samp>&rsquo;</dt>
733<dd><a name="index-vKill-packet"></a>
734<a name="vKill-packet"></a><p>Kill the process with the specified process ID <var>pid</var>, which is a
735hexadecimal integer identifying the process.  This packet is used in
736preference to &lsquo;<samp>k</samp>&rsquo; when multiprocess protocol extensions are
737supported; see <a href="General-Query-Packets.html#multiprocess-extensions">multiprocess extensions</a>.
738</p>
739<p>Reply:
740</p><dl compact="compact">
741<dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
742<dd><p>for an error
743</p></dd>
744<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
745<dd><p>for success
746</p></dd>
747</dl>
748
749</dd>
750<dt>&lsquo;<samp>vMustReplyEmpty</samp>&rsquo;</dt>
751<dd><a name="index-vMustReplyEmpty-packet"></a>
752<p>The correct reply to an unknown &lsquo;<samp>v</samp>&rsquo; packet is to return the empty
753string, however, some older versions of <code>gdbserver</code> would
754incorrectly return &lsquo;<samp>OK</samp>&rsquo; for unknown &lsquo;<samp>v</samp>&rsquo; packets.
755</p>
756<p>The &lsquo;<samp>vMustReplyEmpty</samp>&rsquo; is used as a feature test to check how
757<code>gdbserver</code> handles unknown packets, it is important that this
758packet be handled in the same way as other unknown &lsquo;<samp>v</samp>&rsquo; packets.
759If this packet is handled differently to other unknown &lsquo;<samp>v</samp>&rsquo;
760packets then it is possible that <small>GDB</small> may run into problems in
761other areas, specifically around use of &lsquo;<samp>vFile:setfs:</samp>&rsquo;.
762</p>
763</dd>
764<dt>&lsquo;<samp>vRun;<var>filename</var><span class="roman">[</span>;<var>argument</var><span class="roman">]</span>&hellip;</samp>&rsquo;</dt>
765<dd><a name="index-vRun-packet"></a>
766<p>Run the program <var>filename</var>, passing it each <var>argument</var> on its
767command line.  The file and arguments are hex-encoded strings.  If
768<var>filename</var> is an empty string, the stub may use a default program
769(e.g. the last program run).  The program is created in the stopped
770state.
771</p>
772
773<p>This packet is only available in extended mode (see <a href="#extended-mode">extended mode</a>).
774</p>
775<p>Reply:
776</p><dl compact="compact">
777<dt>&lsquo;<samp>E <var>nn</var></samp>&rsquo;</dt>
778<dd><p>for an error
779</p></dd>
780<dt>&lsquo;<samp><span class="roman">Any stop packet</span></samp>&rsquo;</dt>
781<dd><p>for success (see <a href="Stop-Reply-Packets.html#Stop-Reply-Packets">Stop Reply Packets</a>)
782</p></dd>
783</dl>
784
785</dd>
786<dt>&lsquo;<samp>vStopped</samp>&rsquo;</dt>
787<dd><a name="index-vStopped-packet"></a>
788<p>See <a href="Notification-Packets.html#Notification-Packets">Notification Packets</a>.
789</p>
790</dd>
791<dt>&lsquo;<samp>X <var>addr</var>,<var>length</var>:<var>XX&hellip;</var></samp>&rsquo;</dt>
792<dd><a name="X-packet"></a><a name="index-X-packet"></a>
793<p>Write data to memory, where the data is transmitted in binary.
794Memory is specified by its address <var>addr</var> and number of addressable memory
795units <var>length</var> (see <a href="Memory.html#addressable-memory-unit">addressable memory unit</a>);
796&lsquo;<samp><var>XX</var>&hellip;</samp>&rsquo; is binary data (see <a href="Overview.html#Binary-Data">Binary Data</a>).
797</p>
798<p>Reply:
799</p><dl compact="compact">
800<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
801<dd><p>for success
802</p></dd>
803<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
804<dd><p>for an error
805</p></dd>
806</dl>
807
808</dd>
809<dt>&lsquo;<samp>z <var>type</var>,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
810<dt>&lsquo;<samp>Z <var>type</var>,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
811<dd><a name="insert-breakpoint-or-watchpoint-packet"></a><a name="index-z-packet"></a>
812<a name="index-Z-packets"></a>
813<p>Insert (&lsquo;<samp>Z</samp>&rsquo;) or remove (&lsquo;<samp>z</samp>&rsquo;) a <var>type</var> breakpoint or
814watchpoint starting at address <var>address</var> of kind <var>kind</var>.
815</p>
816<p>Each breakpoint and watchpoint packet <var>type</var> is documented
817separately.
818</p>
819<p><em>Implementation notes: A remote target shall return an empty string
820for an unrecognized breakpoint or watchpoint packet <var>type</var>.  A
821remote target shall support either both or neither of a given
822&lsquo;<samp>Z<var>type</var>&hellip;</samp>&rsquo; and &lsquo;<samp>z<var>type</var>&hellip;</samp>&rsquo; packet pair.  To
823avoid potential problems with duplicate packets, the operations should
824be implemented in an idempotent way.</em>
825</p>
826</dd>
827<dt>&lsquo;<samp>z0,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
828<dt>&lsquo;<samp>Z0,<var>addr</var>,<var>kind</var><span class="roman">[</span>;<var>cond_list</var>&hellip;<span class="roman">]</span><span class="roman">[</span>;cmds:<var>persist</var>,<var>cmd_list</var>&hellip;<span class="roman">]</span></samp>&rsquo;</dt>
829<dd><a name="index-z0-packet"></a>
830<a name="index-Z0-packet"></a>
831<p>Insert (&lsquo;<samp>Z0</samp>&rsquo;) or remove (&lsquo;<samp>z0</samp>&rsquo;) a software breakpoint at address
832<var>addr</var> of type <var>kind</var>.
833</p>
834<p>A software breakpoint is implemented by replacing the instruction at
835<var>addr</var> with a software breakpoint or trap instruction.  The
836<var>kind</var> is target-specific and typically indicates the size of the
837breakpoint in bytes that should be inserted.  E.g., the <small>ARM</small> and
838<small>MIPS</small> can insert either a 2 or 4 byte breakpoint.  Some
839architectures have additional meanings for <var>kind</var>
840(see <a href="Architecture_002dSpecific-Protocol-Details.html#Architecture_002dSpecific-Protocol-Details">Architecture-Specific Protocol Details</a>); if no
841architecture-specific value is being used, it should be &lsquo;<samp>0</samp>&rsquo;.
842<var>kind</var> is hex-encoded.  <var>cond_list</var> is an optional list of
843conditional expressions in bytecode form that should be evaluated on
844the target&rsquo;s side.  These are the conditions that should be taken into
845consideration when deciding if the breakpoint trigger should be
846reported back to <small>GDB</small>.
847</p>
848<p>See also the &lsquo;<samp>swbreak</samp>&rsquo; stop reason (see <a href="Stop-Reply-Packets.html#swbreak-stop-reason">swbreak stop reason</a>)
849for how to best report a software breakpoint event to <small>GDB</small>.
850</p>
851<p>The <var>cond_list</var> parameter is comprised of a series of expressions,
852concatenated without separators. Each expression has the following form:
853</p>
854<dl compact="compact">
855<dt>&lsquo;<samp>X <var>len</var>,<var>expr</var></samp>&rsquo;</dt>
856<dd><p><var>len</var> is the length of the bytecode expression and <var>expr</var> is the
857actual conditional expression in bytecode form.
858</p>
859</dd>
860</dl>
861
862<p>The optional <var>cmd_list</var> parameter introduces commands that may be
863run on the target, rather than being reported back to <small>GDB</small>.
864The parameter starts with a numeric flag <var>persist</var>; if the flag is
865nonzero, then the breakpoint may remain active and the commands
866continue to be run even when <small>GDB</small> disconnects from the target.
867Following this flag is a series of expressions concatenated with no
868separators.  Each expression has the following form:
869</p>
870<dl compact="compact">
871<dt>&lsquo;<samp>X <var>len</var>,<var>expr</var></samp>&rsquo;</dt>
872<dd><p><var>len</var> is the length of the bytecode expression and <var>expr</var> is the
873actual commands expression in bytecode form.
874</p>
875</dd>
876</dl>
877
878<p><em>Implementation note: It is possible for a target to copy or move
879code that contains software breakpoints (e.g., when implementing
880overlays).  The behavior of this packet, in the presence of such a
881target, is not defined.</em>
882</p>
883<p>Reply:
884</p><dl compact="compact">
885<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
886<dd><p>success
887</p></dd>
888<dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
889<dd><p>not supported
890</p></dd>
891<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
892<dd><p>for an error
893</p></dd>
894</dl>
895
896</dd>
897<dt>&lsquo;<samp>z1,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
898<dt>&lsquo;<samp>Z1,<var>addr</var>,<var>kind</var><span class="roman">[</span>;<var>cond_list</var>&hellip;<span class="roman">]</span><span class="roman">[</span>;cmds:<var>persist</var>,<var>cmd_list</var>&hellip;<span class="roman">]</span></samp>&rsquo;</dt>
899<dd><a name="index-z1-packet"></a>
900<a name="index-Z1-packet"></a>
901<p>Insert (&lsquo;<samp>Z1</samp>&rsquo;) or remove (&lsquo;<samp>z1</samp>&rsquo;) a hardware breakpoint at
902address <var>addr</var>.
903</p>
904<p>A hardware breakpoint is implemented using a mechanism that is not
905dependent on being able to modify the target&rsquo;s memory.  The
906<var>kind</var>, <var>cond_list</var>, and <var>cmd_list</var> arguments have the
907same meaning as in &lsquo;<samp>Z0</samp>&rsquo; packets.
908</p>
909<p><em>Implementation note: A hardware breakpoint is not affected by code
910movement.</em>
911</p>
912<p>Reply:
913</p><dl compact="compact">
914<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
915<dd><p>success
916</p></dd>
917<dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
918<dd><p>not supported
919</p></dd>
920<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
921<dd><p>for an error
922</p></dd>
923</dl>
924
925</dd>
926<dt>&lsquo;<samp>z2,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
927<dt>&lsquo;<samp>Z2,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
928<dd><a name="index-z2-packet"></a>
929<a name="index-Z2-packet"></a>
930<p>Insert (&lsquo;<samp>Z2</samp>&rsquo;) or remove (&lsquo;<samp>z2</samp>&rsquo;) a write watchpoint at <var>addr</var>.
931The number of bytes to watch is specified by <var>kind</var>.
932</p>
933<p>Reply:
934</p><dl compact="compact">
935<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
936<dd><p>success
937</p></dd>
938<dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
939<dd><p>not supported
940</p></dd>
941<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
942<dd><p>for an error
943</p></dd>
944</dl>
945
946</dd>
947<dt>&lsquo;<samp>z3,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
948<dt>&lsquo;<samp>Z3,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
949<dd><a name="index-z3-packet"></a>
950<a name="index-Z3-packet"></a>
951<p>Insert (&lsquo;<samp>Z3</samp>&rsquo;) or remove (&lsquo;<samp>z3</samp>&rsquo;) a read watchpoint at <var>addr</var>.
952The number of bytes to watch is specified by <var>kind</var>.
953</p>
954<p>Reply:
955</p><dl compact="compact">
956<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
957<dd><p>success
958</p></dd>
959<dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
960<dd><p>not supported
961</p></dd>
962<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
963<dd><p>for an error
964</p></dd>
965</dl>
966
967</dd>
968<dt>&lsquo;<samp>z4,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
969<dt>&lsquo;<samp>Z4,<var>addr</var>,<var>kind</var></samp>&rsquo;</dt>
970<dd><a name="index-z4-packet"></a>
971<a name="index-Z4-packet"></a>
972<p>Insert (&lsquo;<samp>Z4</samp>&rsquo;) or remove (&lsquo;<samp>z4</samp>&rsquo;) an access watchpoint at <var>addr</var>.
973The number of bytes to watch is specified by <var>kind</var>.
974</p>
975<p>Reply:
976</p><dl compact="compact">
977<dt>&lsquo;<samp>OK</samp>&rsquo;</dt>
978<dd><p>success
979</p></dd>
980<dt>&lsquo;<samp><!-- /@w --></samp>&rsquo;</dt>
981<dd><p>not supported
982</p></dd>
983<dt>&lsquo;<samp>E <var>NN</var></samp>&rsquo;</dt>
984<dd><p>for an error
985</p></dd>
986</dl>
987
988</dd>
989</dl>
990
991<hr>
992<div class="header">
993<p>
994Next: <a href="Stop-Reply-Packets.html#Stop-Reply-Packets" accesskey="n" rel="next">Stop Reply Packets</a>, Previous: <a href="Overview.html#Overview" accesskey="p" rel="previous">Overview</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>
995</div>
996
997
998
999</body>
1000</html>
1001