From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28921 invoked by alias); 3 Jan 2011 11:15:17 -0000 Received: (qmail 28903 invoked by uid 22791); 3 Jan 2011 11:15:15 -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 fmmailgate02.web.de (HELO fmmailgate02.web.de) (217.72.192.227) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Jan 2011 11:15:08 +0000 Received: from smtp06.web.de ( [172.20.5.172]) by fmmailgate02.web.de (Postfix) with ESMTP id 50A17192DFDE1; Mon, 3 Jan 2011 12:15:05 +0100 (CET) Received: from [88.64.22.98] (helo=mchn199C.mchp.siemens.de) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1PZiNV-0003Xr-00; Mon, 03 Jan 2011 12:15:05 +0100 Message-ID: <4D21AFB5.9010605@web.de> Date: Mon, 03 Jan 2011 11:15: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> In-Reply-To: <4D21A474.2040909@salomon.at> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig57047666D63F7073967E12C7" 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/msg00003.txt.bz2 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig57047666D63F7073967E12C7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 2762 Am 03.01.2011 11:27, Markus Duft wrote: > Hi! >=20 > I have been playing a little with this: I'm writing a kernel for both x86= and x86-64. While doing so, i'd like to debug the kernel using qemu (and i= t's gdb stub) and gdb. This worked very well until qemu-0.11.1 (gdb version= does not seem to play any role...). From there on, debugging the 64 bit ve= rsion no longer works. My sessions look like this with qemu-0.13.50 (and an= y version above 0.11.1, actually...): >=20 > mduft@s01en22 /big/Privat/osdev/tachyon2 $ x86_64-pc-linux-gnu-gdb .build= /x86_64/x86_64-tachyon > GNU gdb (GDB) 7.2.50.20110103-cvs > [snip] > Reading symbols from /big/Privat/osdev/tachyon2/.build/x86_64/x86_64-tach= yon...done. > (gdb) target remote:1234 > Remote debugging using :1234 > 0x0000000000000000 in ?? () > (gdb) b boot > Breakpoint 1 at 0xffffffff80119000: file /big/Privat/osdev/tachyon2/core/= tachyon.boot/Entry.cc, line 25. > (gdb) c > Continuing. > Remote 'g' packet reply is too long: 09ea1180ffffffff00950000000000000000= 000000000000000010000000000002b0ad2b009500000095000000000000d6101180fffffff= fce101180ffffffff0000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000901= 180ffffffff4600000018000000100000001000000010000000100000001000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 007f03000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 0000000000000000000000000000000000000000000000000000 > 000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 0000000000000000000000000000000000000000000 > 0000000000000000000000000000000000000000000000000000000000000000000000000= 00000000000000000000000000000000000000801f0000 > (gdb) quit >=20 > actuallly, i _can_ debug the kernel, nut only until the long mode switch = occurs. after this point: no luck... :[ >=20 > now for the questions: >=20 > 1) is this a problem with qemu or was qemu "fixed" and gdb has a problem? > (that's why i CCd the gdb list ;)). > 2) is there any plan to fix this issue? > 3) is there some kind of workaround i can use (i'd be happy with an ugly/= unsupported patch too, since i build all my stuff myself ;)). You see the effects of a workaround in qemu for gdb shortcomings on x86. See e.g. http://thread.gmane.org/gmane.comp.emulators.qemu/80327, there should be some threads on the gdb list as well. Jan --------------enig57047666D63F7073967E12C7 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/ iEYEARECAAYFAk0hr7gACgkQitSsb3rl5xTE3ACfaFAHq836G0ROTHSDXxwcaaKe kwAAnAg+9rghI3QvA6F1UcvVqJ70RhAJ =veh2 -----END PGP SIGNATURE----- --------------enig57047666D63F7073967E12C7--