summaryrefslogtreecommitdiff
path: root/gdb/doc/gdb.texinfo
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2010-05-26 18:19:24 +0000
committerPedro Alves <pedro@codesourcery.com>2010-05-26 18:19:24 +0000
commit6067dd5ec9d0fbd6cae5f759bb103a5580e32aa6 (patch)
treea7e67103abaddbdf165dcbc10adb821f3d59ced8 /gdb/doc/gdb.texinfo
parent703dff8df50e463118ae543fcfd6385d023aff86 (diff)
downloadgdb-6067dd5ec9d0fbd6cae5f759bb103a5580e32aa6.tar.gz
gdb/
2010-05-26 Pedro Alves <pedro@codesourcery.com> * NEWS: Mention the `qRelocInsn' feature. * gdbarch.sh (relocate_instruction): New. * amd64-tdep.c (rip_relative_offset): New. (append_insns): New. (amd64_relocate_instruction): New. (amd64_init_abi): Install it. * i386-tdep.c (append_insns): New. (i386_relocate_instruction): New. (i386_gdbarch_init): Install it. * remote.c (remote_get_noisy_reply): Handle qRelocInsn requests. * gdbarch.h, gdbarch.c: Regenerate. gdb/doc/ 2010-05-26 Pedro Alves <pedro@codesourcery.com> * gdb.texinfo (General Query Packets) <qSupported>: Describe the `qRelocInsn' feature. (Relocate instruction reply packet): New subsection of `Tracepoint Packets'. (Tracepoint Packets): Mention that packets QTDP and QTStart support the qRelocInsn request, and add cross reference to new subsection.
Diffstat (limited to 'gdb/doc/gdb.texinfo')
-rw-r--r--gdb/doc/gdb.texinfo53
1 files changed, 51 insertions, 2 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 94667454023..72c86e96a17 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -31446,6 +31446,11 @@ This feature indicates that @value{GDBN} supports the XML target
description. If the stub sees @samp{xmlRegisters=} with target
specific strings separated by a comma, it will report register
description.
+
+@item qRelocInsn
+This feature indicates whether @value{GDBN} supports the
+@samp{qRelocInsn} packet (@pxref{Tracepoint Packets,,Relocate
+instruction reply packet}).
@end table
Stubs should ignore any unknown values for
@@ -32054,6 +32059,8 @@ Replies:
@table @samp
@item OK
The packet was understood and carried out.
+@item qRelocInsn
+@xref{Tracepoint Packets,,Relocate instruction reply packet}.
@item
The packet was not recognized.
@end table
@@ -32118,6 +32125,8 @@ Replies:
@table @samp
@item OK
The packet was understood and carried out.
+@item qRelocInsn
+@xref{Tracepoint Packets,,Relocate instruction reply packet}.
@item
The packet was not recognized.
@end table
@@ -32209,8 +32218,10 @@ Like @samp{QTFrame:range:@var{start}:@var{end}}, but select the first
frame @emph{outside} the given range of addresses (exclusive).
@item QTStart
-Begin the tracepoint experiment. Begin collecting data from tracepoint
-hits in the trace frame buffer.
+Begin the tracepoint experiment. Begin collecting data from
+tracepoint hits in the trace frame buffer. This packet supports the
+@samp{qRelocInsn} reply (@pxref{Tracepoint Packets,,Relocate
+instruction reply packet}).
@item QTStop
End the tracepoint experiment. Stop collecting trace frames.
@@ -32371,6 +32382,44 @@ This packet directs the target to use a circular trace buffer if
@end table
+@subsection Relocate instruction reply packet
+When installing fast tracepoints in memory, the target may need to
+relocate the instruction currently at the tracepoint address to a
+different address in memory. For most instructions, a simple copy is
+enough, but, for example, call instructions that implicitly push the
+return address on the stack, and relative branches or other
+PC-relative instructions require offset adjustment, so that the effect
+of executing the instruction at a different address is the same as if
+it had executed in the original location.
+
+In response to several of the tracepoint packets, the target may also
+respond with a number of intermediate @samp{qRelocInsn} request
+packets before the final result packet, to have @value{GDBN} handle
+this relocation operation. If a packet supports this mechanism, its
+documentation will explicitly say so. See for example the above
+descriptions for the @samp{QTStart} and @samp{QTDP} packets. The
+format of the request is:
+
+@table @samp
+@item qRelocInsn:@var{from};@var{to}
+
+This requests @value{GDBN} to copy instruction at address @var{from}
+to address @var{to}, possibly adjusted so that executing the
+instruction at @var{to} has the same effect as executing it at
+@var{from}. @value{GDBN} writes the adjusted instruction to target
+memory starting at @var{to}.
+@end table
+
+Replies:
+@table @samp
+@item qRelocInsn:@var{adjusted_size}
+Informs the stub the relocation is complete. @var{adjusted_size} is
+the length in bytes of resulting relocated instruction sequence.
+@item E @var{NN}
+A badly formed request was detected, or an error was encountered while
+relocating the instruction.
+@end table
+
@node Host I/O Packets
@section Host I/O Packets
@cindex Host I/O, remote protocol