qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: Debugging a 64-bit kernel in qemu


From: Jan Kiszka
Subject: [Qemu-devel] Re: Debugging a 64-bit kernel in qemu
Date: Mon, 03 Jan 2011 14:00:10 +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

[ please keep CCs ]

Am 03.01.2011 13:27, Markus Duft wrote:
> On 01/03/2011 01:15 PM, Markus Duft wrote:
>> On 01/03/2011 12:15 PM, Jan Kiszka wrote:
>> [snip]
> [snip]
>> actually, i find that Ted Harkington was right: in 0.11.1 i can debug 32 bit 
>> code with qemu-system-x86_64 well enough (which means i debugged all the 32 
>> bit part of my kernel without ever seen _any_ problem/non-working 
>> feature/whatever). wouldn't it be better to have 64 bit debugging working in 
>> the 64 bit version, with 32 bit mode working mostly (with whatever small 
>> issues), rather than just completely dooming 64 bit debugging...?
>>
> 
> owh - spoke too soon. there must be more to it: i tried reverting 
> 5f30fa18ad043a841fe9f0c3917ac60f2519ebd1, which restores ability to debug my 
> 64 bit kernel just fine, but now i get the packet too long when trying to 
> debug 32 bit code....

Hmm, that's new. You definitely loose stack unwinding when using the
wrong mode, thus source-level debugging.

I thought that thread suggested to set the arch explicitly, maybe I
misremembered that:

set arch i386:x86_64
tar rem :1234

If that is required, you probably load a 32-bit binary into gdb that
also contains 64-bit code in some section. I guess this is even more
confusing for gdb.

> 
> wouldn't it be possible to implement some kind of explicit switch with qemu 
> in the meantime, so i can choose what bitness i want to debug? I know, it's a 
> problem with gdb under the hood, but still - it's really uncool debugging 
> doesn't work in either of the two cases.

Wasn't required so far. If you debug in either mode, "set arch" should
do the job. If you have to debug across mode switches, that knob won't
help anyway.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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