On Fri, Jan 25, 2019 at 6:22 AM Peter Maydell <peter.mayd...@linaro.org> wrote:
> > Thanks for this explanation -- the patch makes a lot more sense with it. > I'm confused though -- the XML we ship is basically what gdb itself > ships and uses internally: > > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/features/i386/i386.xml;h=beb1496d9773efcf0e0526dc540a5e206a2e21fc;hb=HEAD > > and that uses xi:include to pull in the other files. > So it seems odd that gdb can't parse the XML it is using > itself internally. Maybe QEMU is doing something else wrong > somewhere? > > I thought that too. I implemented gdbstub tracing a while ago and had it enabled (-trace gdb*). The binary data it sends is exactly what I expect. When I break into gdb, I checked the data and it looked correct. debug_xml even prints out what it's going to parse. Looks fine. GDB calls into an XML parser library, which I don't have built from source, so I didn't find precisely where it fails, only the high level log showing unexpected elements at nested feature.