This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Map registers to remote numbers when encoding an ax_reg or ax_reg_mask operation
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 25 Feb 2016 09:45:41 -0500
- Subject: [binutils-gdb] Map registers to remote numbers when encoding an ax_reg or ax_reg_mask operation
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 1eb7c2d886c0faac42d2b68862b0e6b0d3182d98 ***
Author: Antoine Tremblay <antoine.tremblay@ericsson.com>
Branch: master
Commit: 1eb7c2d886c0faac42d2b68862b0e6b0d3182d98
Map registers to remote numbers when encoding an ax_reg or ax_reg_mask operation
When encoding the agent expression operation ax_reg or ax_reg_mask, the
register number used is internal to GDB. However GDBServer expects a tdesc
based number.
This usually does not cause a problem since at the moment, for raw
registers GDBServer R trace action ignores the register mask and just
collects all registers.
It can be a problem, however with pseudo registers on some platforms if the
tdesc number doesn't match the GDB internal register number.
This is the case with ARM, the upcoming ARM tracepoint support, fails
these test cases without this patch:
gdb.trace/collection.exp: collect register locals collectively:*
GDBSever would exit with: unhandled register size
Since the register number is not mapped.
This patch fixes these issues by calling gdbarch_remote_register_number
before encoding the register number in the ax_reg or ax_reg_mask operation.
Tested on x86 native-gdbserver no regressions observed.
gdb/ChangeLog:
* ax-general.c (ax_reg): Call gdbarch_remote_register_number.
(ax_reg_mask): Likewise.
- Follow-Ups:
- Failures on RHEL-s390x-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-cxx-build-m64, branch master
- Failures on Debian-i686, branch master
- Failures on Fedora-ppc64be-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Debian-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Debian-i686-native-gdbserver, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Debian-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-gdbserver-m64, branch master