qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] gdbstub: Fix i386/x86_64 machine description an


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] gdbstub: Fix i386/x86_64 machine description and add control registers
Date: Fri, 25 Jan 2019 09:52:46 +0000

On Thu, 24 Jan 2019 at 20:29, Doug Gale <address@hidden> wrote:
> The machine description we send is being (silently) thrown on the floor by 
> GDB and GDB silently uses the default machine description.
>
> With current QEMU, if you debug gdb, and set debug_xml=1 and continue, then 
> attach to qemu gdbstub from the debugged gdb, you will see the xml parse fail 
> completely, and gdb will fall back to the default machine description, 
> silently, and changes to our xml (in qemu source code) have no effect. They 
> might as well be empty.
>
> The point of fixing the machine description was IDE's with GDB integration 
> will break on QEMU. The default machine description has fs_base, which fails 
> to be retrieved, whick breaks the whole register window (in qt-creator at 
> least, likely others). With my patch the register window works perfectly.
>
> I didn't delete anything, I removed the superfluous nesting of files by 
> xi:include and moved the description into a single xml file. I added fs_base, 
> gs_base, k_gs_base, cr0/2/3/4/6, efer.
>
> Removing the nesting into xml includes fixes it because the xml parse fails 
> on <feature nested within <feature, so I solved it by removing unnecessary 
> include indirections and placed the data inline.


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?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]