From: Jan Kiszka <jan.kiszka@web.de>
To: Markus Duft <markus.duft@salomon.at>
Cc: gdb@sourceware.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: Debugging a 64-bit kernel in qemu
Date: Mon, 03 Jan 2011 12:15:01 +0100 [thread overview]
Message-ID: <4D21AFB5.9010605@web.de> (raw)
In-Reply-To: <4D21A474.2040909@salomon.at>
[-- Attachment #1: Type: text/plain, Size: 2742 bytes --]
Am 03.01.2011 11:27, Markus Duft wrote:
> Hi!
>
> 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 it'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 version no longer works. My sessions look like this with qemu-0.13.50 (and any version above 0.11.1, actually...):
>
> 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-tachyon...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: 09ea1180ffffffff00950000000000000000000000000000000010000000000002b0ad2b009500000095000000000000d6101180ffffffffce101180ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000901180ffffffff4600000018000000100000001000000010000000100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
> 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000
> (gdb) quit
>
> actuallly, i _can_ debug the kernel, nut only until the long mode switch occurs. after this point: no luck... :[
>
> now for the questions:
>
> 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2011-01-03 11:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-03 10:27 [Qemu-devel] Debugging a 64-bit kernel in qemu Markus Duft
2011-01-03 11:15 ` Jan Kiszka [this message]
2011-01-03 12:15 ` [Qemu-devel] " Markus Duft
2011-01-03 12:27 ` Markus Duft
2011-01-03 13:00 ` Jan Kiszka
2011-01-03 13:12 ` Markus Duft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D21AFB5.9010605@web.de \
--to=jan.kiszka@web.de \
--cc=gdb@sourceware.org \
--cc=markus.duft@salomon.at \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).