All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Ted Harkington <ted.harkington@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: Commit 5f30fa18ad043a841fe9f0c3917ac60f2519ebd1 breaks debugging 64 bit guests
Date: Sun, 19 Sep 2010 00:23:24 +0200	[thread overview]
Message-ID: <4C953BDC.1030900@web.de> (raw)
In-Reply-To: <AANLkTimDeYXGnwT_ZG-1qveAWFEcPYm-HCiFtQdhnc7g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

Am 18.09.2010 23:23, Ted Harkington wrote:
> Without that commit, I can set breakpoints and debug 32 bit code AND 64 bit
> code just fine in the same debug session...

Then gdb will then debug 32-bit code in 64-bit mode as that's the
architecture in use. That's not seriously usable if you look closer.

> 
> "set arch" does nothing to remedy my problems.
> 
> I cannot even set breakpoints before the system runs, let alone after I
> interrupt it...

gdb does not support setting a 64-bit breakpoints when debugging a 16-
or 32-bit target, and vice versa. As I said, you need to interrupt your
guest while in 64-bit mode, set your breakpoint and reset the guest if
it passed it already.

> 
> Are you sure this approach is needed? I have no such problems with bochs...

It is mandatory for source-level debugging. E.g. stack backtraces in 16
or 32-bit mode are broken otherwise.

The problem is that gdb has no clue about the processor mode in use on
the target. It derives it from the target architecture which is OK for
application debugging (and that's what gdb is still designed for) but
it's insufficient for system-level debugging. I don't know how bochs
deals with this, but it faces the very same gdb limitation.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

      reply	other threads:[~2010-09-18 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14  5:48 [Qemu-devel] Commit 5f30fa18ad043a841fe9f0c3917ac60f2519ebd1 breaks debugging 64 bit guests Ted Harkington
2010-09-17  0:55 ` [Qemu-devel] " Jan Kiszka
2010-09-18 21:23   ` Ted Harkington
2010-09-18 22:23     ` Jan Kiszka [this message]

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=4C953BDC.1030900@web.de \
    --to=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    --cc=ted.harkington@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.