aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-section-script.py
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-08-11 15:23:24 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-08-14 14:54:26 +0100
commit0e6a6e40bb86a348468dd5ac9169df94c21da2f4 (patch)
treee071d9292fc85ea795f420d8637d972c7be7f0df /gdb/testsuite/gdb.python/py-section-script.py
parentceb3ca2f7d700f79bd3d7f7d3c9aee204e344127 (diff)
downloadbinutils-0e6a6e40bb86a348468dd5ac9169df94c21da2f4.zip
binutils-0e6a6e40bb86a348468dd5ac9169df94c21da2f4.tar.gz
binutils-0e6a6e40bb86a348468dd5ac9169df94c21da2f4.tar.bz2
gdb/riscv: improve a comment about fcsr, fflags, and frm registers
There's a comment in riscv-tdep.c that explains some of the background about how we check for the fcsr, fflags, and frm registers within a riscv target description. This comment (and the functionality it describes) relates to how QEMU advertises these registers within its target description. Unfortunately, QEMU includes these three registers in both the fpu and crs target description features. To work around this GDB uses one of the register declarations, and ignores the other, this means the GDB user sees a single copy of each register, and things just work. When I originally wrote the comment I thought it didn't matter which copy of the register GDB selected, the fpu copy or the csr copy, so long as we just used one of them. The comment reflected this belief. Upon further investigation, it turns out I was wrong. GDB has to use the csr copy of the register. If GDB tries to use the register from the fpu feature then QEMU will return an error when GDB tries to read or write the register. Luckily, the code within GDB (currently) will always select the csr copy of the register, so nothing is broken, but the comment is wrong. This commit updates the comment to better describe what is actually going on. Of course, I should probably also send a patch to QEMU to fix up the target description that is sent to GDB.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-section-script.py')
0 files changed, 0 insertions, 0 deletions