[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registe
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically |
Date: |
Wed, 19 Nov 2008 10:38:11 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Paul Brook wrote:
>>> In the absence of real information gdb falls back to the current CPU
>>> mode, which is a bit in the CPU status register. Exactly which
>>> register/bit depends whether you're talking to an M-profile device.
>>> M-profile cores are identified based on the XML register descriptions. If
>>> you don't have an XML capable target then you don't get to debug
>>> M-profile devices.
>> ...and this surely doesn't map on x86 (yet): gdb has no clue at all
>> about the CPU mode as it has no clue about segments or control registers.
>>
>>> IIRC There's also a gdb option to override the fallback mode.
>> For x86, the core of the issue is a decoupled control of the gdb remote
>> protocol and the disassembly mode. I guess I have to dig a bit in the
>> code to see if the hard coupling we see in practice can be broken up.
>> Not according to the command help I found so far.
>
> This is sounding a lot like "we can't be bothered fixing gdb, so we're going
> to add ugly hacks to qemu instead". I don't find this a particularly
> convincing argument.
I'll be the last to refuse getting rid of this switching once there is a
released gdb version which is smarter. But right now there is not even a
smart CVS revision.
Although gdb does have separate current_gdbarch (used by the
disassembler) and target_gdbarch (used by the remote connector),
gdbarch_update_p always changes both of them when invoking 'set arch'.
There are comments indicating that they are working on making gdb more
flexible here for at least 5 years now. Frankly, this doesn't suggest
that we'll see an improvement tomorrow nor that it would be easy for us
to provide some ad-hoc gdb patches to accelerate this. Nevertheless,
this topic will surely come up for us again when we'll try to integrate
our segmentation enhancements for gdb.
But for now we face a regression of qemu-system-x86_64 that only allows
to use it in long mode. And that is what my patch fixes again. I really
don't see why we should keep it broken until gdb is fixed just because
the concept is a bit "ugly".
Jan
--
Siemens AG, Corporate Technology, CT SE 2 ES-OS
Corporate Competence Center Embedded Linux
- [Qemu-devel] [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, (continued)
- [Qemu-devel] [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Jan Kiszka, 2008/11/17
- Re: [Qemu-devel] [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Anthony Liguori, 2008/11/18
- Re: [Qemu-devel] [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Anthony Liguori, 2008/11/18
- Re: [Qemu-devel] [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Anthony Liguori, 2008/11/18
- [Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Jan Kiszka, 2008/11/18
- Re: [Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Paul Brook, 2008/11/18
- Re: [Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Jan Kiszka, 2008/11/18
- Re: [Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Paul Brook, 2008/11/18
- Re: [Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Jan Kiszka, 2008/11/18
- Re: [Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically, Paul Brook, 2008/11/18
- [Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically,
Jan Kiszka <=
[Qemu-devel] [PATCH v5 08/18] Remove premature memop TB terminations, Jan Kiszka, 2008/11/17
[Qemu-devel] [PATCH v5 09/18] gdbstub: manage CPUs as threads, Jan Kiszka, 2008/11/17
[Qemu-devel] [PATCH v5 16/18] gdbstub: x86: Refactor register access, Jan Kiszka, 2008/11/17
[Qemu-devel] [PATCH v5 07/18] Restore pc on watchpoint hits, Jan Kiszka, 2008/11/17
[Qemu-devel] [PATCH v5 02/18] Refactor translation block CPU state handling, Jan Kiszka, 2008/11/17
Re: [Qemu-devel] [PATCH v5 00/18] Enhance debugging support, Anthony Liguori, 2008/11/18