From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5643 invoked by alias); 3 Jan 2011 13:00:21 -0000 Received: (qmail 5631 invoked by uid 22791); 3 Jan 2011 13:00:20 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_QE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fmmailgate01.web.de (HELO fmmailgate01.web.de) (217.72.192.221) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Jan 2011 13:00:14 +0000 Received: from smtp01.web.de ( [172.20.0.243]) by fmmailgate01.web.de (Postfix) with ESMTP id 6AC78184BA10F; Mon, 3 Jan 2011 14:00:11 +0100 (CET) Received: from [88.64.22.98] (helo=mchn199C.mchp.siemens.de) by smtp01.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1PZk1D-0005ku-00; Mon, 03 Jan 2011 14:00:11 +0100 Message-ID: <4D21C85A.5070207@web.de> Date: Mon, 03 Jan 2011 13:00:00 -0000 From: Jan Kiszka 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 MIME-Version: 1.0 To: Markus Duft CC: qemu-devel@nongnu.org, gdb@sourceware.org Subject: Re: Debugging a 64-bit kernel in qemu References: <4D21A474.2040909@salomon.at> <4D21AFB5.9010605@web.de> <4D21BDFA.1050105@salomon.at> <4D21C0AA.8010907@salomon.at> In-Reply-To: <4D21C0AA.8010907@salomon.at> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB924D1618D9AAB578098E763" X-Sender: jan.kiszka@web.de Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00004.txt.bz2 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB924D1618D9AAB578098E763 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 1712 [ 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 t= he 32 bit part of my kernel without ever seen _any_ problem/non-working fea= ture/whatever). wouldn't it be better to have 64 bit debugging working in t= he 64 bit version, with 32 bit mode working mostly (with whatever small iss= ues), rather than just completely dooming 64 bit debugging...? >> >=20 > owh - spoke too soon. there must be more to it: i tried reverting 5f30fa1= 8ad043a841fe9f0c3917ac60f2519ebd1, which restores ability to debug my 64 bi= t 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. >=20 > wouldn't it be possible to implement some kind of explicit switch with qe= mu in the meantime, so i can choose what bitness i want to debug? I know, i= t's a problem with gdb under the hood, but still - it's really uncool debug= ging 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 --------------enigB924D1618D9AAB578098E763 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 259 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0hyFoACgkQitSsb3rl5xTjMgCeM3QZ+6niMysNvZvimgwuEZvz W/kAn31oIrWet0ojtHeKxjAbW642aUKS =PipB -----END PGP SIGNATURE----- --------------enigB924D1618D9AAB578098E763--