<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/gdb-xml, branch master</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/gdb-xml?h=master</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/gdb-xml?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-11-06T08:48:26+00:00</updated>
<entry>
<title>gdb-xml: Fix size of EFER register on i386 architecture when debugged by GDB</title>
<updated>2022-11-06T08:48:26+00:00</updated>
<author>
<name>TaiseiIto</name>
</author>
<published>2022-09-13T12:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=75ac231c67cdb13f0609943fab5499963858b587'/>
<id>urn:sha1:75ac231c67cdb13f0609943fab5499963858b587</id>
<content type='text'>
Before this commit, there were contradictory descriptions about size of EFER
register.
Line 113 says the size is 8 bytes.
Line 129 says the size is 4 bytes.

As a result, when GDB is debugging an OS running on QEMU, the GDB cannot
read 'g' packets correctly. This 'g' packet transmits values of each
registers of machine emulated by QEMU to GDB. QEMU, the packet sender,
assign 4 bytes for EFER in 'g' packet based on the line 113.
GDB, the packet receiver, extract 8 bytes for EFER in 'g' packet based on
the line 129. Therefore, all registers located behind EFER in 'g' packet
has been shifted 4 bytes in GDB.

After this commit, GDB can read 'g' packets correctly.

Signed-off-by: TaiseiIto &lt;taisei1212@outlook.jp&gt;
Message-Id: &lt;TY0PR0101MB4285F637209075C9F65FCDA6A4479@TY0PR0101MB4285.apcprd01.prod.exchangelabs.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>target/riscv: remove fixed numbering from GDB xml feature files</title>
<updated>2022-09-26T21:04:38+00:00</updated>
<author>
<name>Andrew Burgess</name>
</author>
<published>2022-08-31T08:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=4c0f0b6619126637e802f07c9fe8e9fffbc1c4bb'/>
<id>urn:sha1:4c0f0b6619126637e802f07c9fe8e9fffbc1c4bb</id>
<content type='text'>
The fixed register numbering in the various GDB feature files for
RISC-V only exists because these files were originally copied from the
GDB source tree.

However, the fixed numbering only exists in the GDB source tree so
that GDB, when it connects to a target that doesn't provide a target
description, will use a specific numbering scheme.

That numbering scheme is designed to be compatible with the first
versions of QEMU (for RISC-V), that didn't send a target description,
and relied on a fixed numbering scheme.

Because of the way that QEMU manages its target descriptions,
recording the number of registers in each feature, and just relying on
GDB's numbering starting from 0, then I propose that we remove all the
fixed numbering from the RISC-V feature xml files, and just rely on
the standard numbering scheme.  Plenty of other targets manage their
xml files this way, e.g. ARM, AArch64, Loongarch, m68k, rx, and s390.

Signed-off-by: Andrew Burgess &lt;aburgess@redhat.com&gt;
Acked-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Reviewed-by: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Message-Id: &lt;6069395f90e6fc24dac92197be815fedf42f5974.1661934573.git.aburgess@redhat.com&gt;
Signed-off-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</content>
</entry>
<entry>
<title>target/riscv: remove fflags, frm, and fcsr from riscv-*-fpu.xml</title>
<updated>2022-09-26T21:04:38+00:00</updated>
<author>
<name>Andrew Burgess</name>
</author>
<published>2022-08-31T08:41:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=94452ac4cf263e8996613db8d981e4ea85bd019a'/>
<id>urn:sha1:94452ac4cf263e8996613db8d981e4ea85bd019a</id>
<content type='text'>
While testing some changes to GDB's handling for the RISC-V registers
fcsr, fflags, and frm, I spotted that QEMU includes these registers
twice in the target description it sends to GDB, once in the fpu
feature, and once in the csr feature.

Right now things basically work OK, QEMU maps these registers onto two
different register numbers, e.g. fcsr maps to both 68 and 73, and GDB
can use either of these to access the register.

However, GDB's target descriptions don't really work this way, each
register should appear just once in a target description, mapping the
register name onto the number GDB should use when accessing the
register on the target.  Duplicate register names actually result in
duplicate registers on the GDB side, however, as the registers have
the same name, the user can only access one of these registers.

Currently GDB has a hack in place, specifically for RISC-V, to spot
the duplicate copies of these three registers, and hide them from the
user, ensuring the user only ever sees a single copy of each.

In this commit I propose fixing this issue on the QEMU side, and in
the process, simplify the fpu register handling a little.

I think we should, remove fflags, frm, and fcsr from the two (32-bit
and 64-bit) fpu feature xml files.  These files will only contain the
32 core floating point register f0 to f31.  The fflags, frm, and fcsr
registers will continue to be advertised in the csr feature as they
currently are.

With that change made, I will simplify riscv_gdb_get_fpu and
riscv_gdb_set_fpu, removing the extra handling for the 3 status
registers.

Signed-off-by: Andrew Burgess &lt;aburgess@redhat.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Message-Id: &lt;0fbf2a5b12e3210ff3867d5cf7022b3f3462c9c8.1661934573.git.aburgess@redhat.com&gt;
Signed-off-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</content>
</entry>
<entry>
<title>target/loongarch: Update loongarch-fpu.xml</title>
<updated>2022-08-05T17:02:40+00:00</updated>
<author>
<name>Song Gao</name>
</author>
<published>2022-08-05T03:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d182c3900072ea9b7f4de8785b441a2aa4804d48'/>
<id>urn:sha1:d182c3900072ea9b7f4de8785b441a2aa4804d48</id>
<content type='text'>
Rename loongarch-fpu64.xml to loongarch-fpu.xml and update
loongarch-fpu.xml to match upstream GDB [1]

[1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/fpu.xml

Signed-off-by: Song Gao &lt;gaosong@loongson.cn&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Acked-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20220805033523.1416837-5-gaosong@loongson.cn&gt;
</content>
</entry>
<entry>
<title>target/loongarch: update loongarch-base64.xml</title>
<updated>2022-08-05T17:02:40+00:00</updated>
<author>
<name>Song Gao</name>
</author>
<published>2022-08-05T03:35:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=96c3298c0ad11a51c34b253e15abe9f4275e9c57'/>
<id>urn:sha1:96c3298c0ad11a51c34b253e15abe9f4275e9c57</id>
<content type='text'>
Update loongarch-base64.xml to match the upstream GDB [1].

[1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml

Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Signed-off-by: Song Gao &lt;gaosong@loongson.cn&gt;
Acked-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20220805033523.1416837-4-gaosong@loongson.cn&gt;
</content>
</entry>
<entry>
<title>target/loongarch: Fix GDB get the wrong pc</title>
<updated>2022-08-05T17:02:40+00:00</updated>
<author>
<name>Song Gao</name>
</author>
<published>2022-08-05T03:35:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=1fe8ac3511fc771376019c6bfe77f317c5e56cd6'/>
<id>urn:sha1:1fe8ac3511fc771376019c6bfe77f317c5e56cd6</id>
<content type='text'>
GDB LoongArch add a register orig_a0, see the base64.xml [1].
We should add the orig_a0 to match the upstream GDB.

[1]: https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml

Signed-off-by: Song Gao &lt;gaosong@loongson.cn&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Acked-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20220805033523.1416837-2-gaosong@loongson.cn&gt;
</content>
</entry>
<entry>
<title>target/loongarch: Add gdb support.</title>
<updated>2022-06-06T18:14:13+00:00</updated>
<author>
<name>Xiaojuan Yang</name>
</author>
<published>2022-06-06T12:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ca61e75071c647cf93b3161a228c6a54178cd58c'/>
<id>urn:sha1:ca61e75071c647cf93b3161a228c6a54178cd58c</id>
<content type='text'>
Signed-off-by: Xiaojuan Yang &lt;yangxiaojuan@loongson.cn&gt;
Signed-off-by: Song Gao &lt;gaosong@loongson.cn&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20220606124333.2060567-42-yangxiaojuan@loongson.cn&gt;
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>target/arm: Advertise MVE to gdb when present</title>
<updated>2021-11-02T18:14:55+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2021-11-01T16:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=dbd9e08476f09cf3556b9b8a306bf277172841a9'/>
<id>urn:sha1:dbd9e08476f09cf3556b9b8a306bf277172841a9</id>
<content type='text'>
Cortex-M CPUs with MVE should advertise this fact to gdb, using the
org.gnu.gdb.arm.m-profile-mve XML feature, which defines the VPR
register.  Presence of this feature also tells gdb to create
pseudo-registers Q0..Q7, so we do not need to tell gdb about them
separately.

Note that unless you have a very recent GDB that includes this fix:
http://patches-tcwg.linaro.org/patch/58133/ gdb will mis-print the
individual fields of the VPR register as zero (but showing the whole
thing as hex, eg with "print /x $vpr" will give the correct value).

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-Id: &lt;20211101160814.5103-1-peter.maydell@linaro.org&gt;
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>target/arm: Don't put FPEXC and FPSID in org.gnu.gdb.arm.vfp XML</title>
<updated>2021-09-30T12:42:10+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2021-09-21T16:29:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=b355f08a3724d3f29e1c177dde3a01b649108f98'/>
<id>urn:sha1:b355f08a3724d3f29e1c177dde3a01b649108f98</id>
<content type='text'>
Currently we send VFP XML which includes D0..D15 or D0..D31, plus
FPSID, FPSCR and FPEXC.  The upstream GDB tolerates this, but its
definition of this XML feature does not include FPSID or FPEXC.  In
particular, for M-profile cores there are no FPSID or FPEXC
registers, so advertising those is wrong.

Move FPSID and FPEXC into their own bit of XML which we only send for
A and R profile cores.  This brings our definition of the XML
org.gnu.gdb.arm.vfp feature into line with GDB's own (at least for
non-Neon cores...) and means we don't claim to have FPSID and FPEXC
on M-profile.

(It seems unlikely to me that any gdbstub users really care about
being able to look at FPEXC and FPSID; but we've supplied them to gdb
for a decade and it's not hard to keep doing so.)

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-id: 20210921162901.17508-5-peter.maydell@linaro.org
</content>
</entry>
<entry>
<title>target/riscv: Remove built-in GDB XML files for CSRs</title>
<updated>2021-01-16T18:57:21+00:00</updated>
<author>
<name>Bin Meng</name>
</author>
<published>2021-01-16T05:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=138ca49a82b978f035b709abee45324dd7ab3e68'/>
<id>urn:sha1:138ca49a82b978f035b709abee45324dd7ab3e68</id>
<content type='text'>
Now that we have switched to generate the RISC-V CSR XML dynamically,
remove the built-in hardcoded XML files.

Signed-off-by: Bin Meng &lt;bin.meng@windriver.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Message-id: 20210116054123.5457-3-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</content>
</entry>
</feed>
