mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
Update the 'g' packet documentation
The 'g' packet documentation references a macro that no longer exists, and it also claims that the 'x' response for an unavailable register is limited to trace frames. This patch updates the documentation to reflect what I think is currently correct. Co-Authored-By: Pedro Alves <pedro@palves.net> Approved-By: Eli Zaretskii <eliz@gnu.org> Change-Id: I863baa3b9293059cfd4aa3d534602cbcb693ba87
This commit is contained in:
@ -41770,17 +41770,27 @@ Reply:
|
|||||||
Each byte of register data is described by two hex digits. The bytes
|
Each byte of register data is described by two hex digits. The bytes
|
||||||
with the register are transmitted in target byte order. The size of
|
with the register are transmitted in target byte order. The size of
|
||||||
each register and their position within the @samp{g} packet are
|
each register and their position within the @samp{g} packet are
|
||||||
determined by the @value{GDBN} internal gdbarch functions
|
determined by the target description (@pxref{Target Descriptions}); in
|
||||||
@code{DEPRECATED_REGISTER_RAW_SIZE} and @code{gdbarch_register_name}.
|
the absence of a target description, this is done using code internal
|
||||||
|
to @value{GDBN}; typically this is some customary register layout for
|
||||||
|
the architecture in question.
|
||||||
|
|
||||||
When reading registers from a trace frame (@pxref{Analyze Collected
|
When reading registers, the stub may also return a string of literal
|
||||||
Data,,Using the Collected Data}), the stub may also return a string of
|
@samp{x}'s in place of the register data digits, to indicate that the
|
||||||
literal @samp{x}'s in place of the register data digits, to indicate
|
corresponding register's value is unavailable. For example, when
|
||||||
that the corresponding register has not been collected, thus its value
|
reading registers from a trace frame (@pxref{Analyze Collected
|
||||||
is unavailable. For example, for an architecture with 4 registers of
|
Data,,Using the Collected Data}), this means that the register has not
|
||||||
|
been collected in the trace frame. When reading registers from a live
|
||||||
|
program, this indicates that the stub has no means to access the
|
||||||
|
register contents, even though the corresponding register is known to
|
||||||
|
exist. Note that if a register truly does not exist on the target,
|
||||||
|
then it is better to not include it in the target description in the
|
||||||
|
first place.
|
||||||
|
|
||||||
|
For example, for an architecture with 4 registers of
|
||||||
4 bytes each, the following reply indicates to @value{GDBN} that
|
4 bytes each, the following reply indicates to @value{GDBN} that
|
||||||
registers 0 and 2 have not been collected, while registers 1 and 3
|
registers 0 and 2 are unavailable, while registers 1 and 3
|
||||||
have been collected, and both have zero value:
|
are available, and both have zero value:
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
-> @code{g}
|
-> @code{g}
|
||||||
|
Reference in New Issue
Block a user