]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: testsuite: Test whether PC register is expedited in gdb.server/server-run.exp
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Thu, 5 Sep 2024 04:42:02 +0000 (01:42 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Tue, 24 Sep 2024 18:16:11 +0000 (15:16 -0300)
commit94aedcf7ea5b1dbd8bf79247a8ed247b75b3dfb0
treeea24b7e576f0f57e14f955b1507f605227efa625
parent89320f8658db71ae42c6f5f356fda48f9780be9c
gdb: testsuite: Test whether PC register is expedited in gdb.server/server-run.exp

One thing GDB always does when the inferior stops is finding out where
it's stopped at, by way of querying the value of the program counter
register.

To save a packet round trip, the remote target can send the PC
value (often alongside other frequently consulted registers such as the
stack pointer) in the stop reply packet as an "expedited register".

Test that this is actually done for the targets where gdbserver is
supposed to.

Extend the "maintenance print remote-registers" command output with an
"Expedited" column which says "yes" if the register was seen by GDB in
the last stop reply packet it received, and is left blank otherwise.

Tested for regressions on aarch64-linux-gnu native-extended-remote.

The testcase was tested on aarch64-linux-gnu, i686-linux-gnu and
x86_64-linux-gnu native-remote and native-extended-remote targets.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/NEWS
gdb/doc/gdb.texinfo
gdb/regcache-dump.c
gdb/remote.c
gdb/remote.h
gdb/testsuite/gdb.server/server-run.exp