From: Jan Kiszka <jan.kiszka@web.de>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [RESEND][PATCH] gdbstub: Add vCont support
Date: Fri, 16 Jan 2009 09:05:01 +0100 [thread overview]
Message-ID: <49703FAD.1060107@web.de> (raw)
In-Reply-To: <200901160015.44729.paul@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 2387 bytes --]
Paul Brook wrote:
>> a) Modeling cpus as processes buys us nothing compared to threads given
>> the fact that we cannot provide a stable memory mapping to the gdb
>> frontend anyway. (*)
>
> I disagree. The process model fits perfectly. The whole point is that each CPU
> has its own virtual address space. Separate address spaces is the fundamental
> difference between a process and a thread.
>
> If you have a multicore system where several cores share a MMU[1] then
> modelling these as threads probably make sense.
>
> Don't confuse this with OS awareness in GDB (i.e. implementing a userspace
> debug environment via a bare metal kernel level debug interface). That's a
> completely separate issue.
You snipped away my argument under (*):
> (*) Process abstraction is, if used at all, guest business. At best we
> could try to invent (likely OS-specific) heuristics to identify
> identical mappings and call them processes. I don't see a reasonable
> benefit compared to the expected effort and unreliability.
You cannot simply assign some CPU n to a virtual process n because the
mapping you see on that CPU at some point in time may next pop up on
some other CPU - and vice versa. You start to make gdb believe it sees
consistent processes while you have no clue at all about the scheduling
of your guest. So what do you gain?
I can tell you what you loose: If gdb starts to think that there are n
separate processes, you will have to set separate breakpoints as well.
Bad. And if some breakpoint assigned to process n suddenly hits you on
process (CPU) m, only chaos is the result. E.g. kvm would re-inject it
as guest-originated. Even worse.
>
>> b) The model is already part of mainline qemu. This patch is just
>> about adding even more usefulness to it.
>
> I have no problems with ripping out the bogus "thread" support once (or even
> before) proper process support is implemented. Likewise I've no problem
> requiring a recent GDB if you want to do multicore debugging.
There was zero practical need for this so far. But maybe you can
describe a _concrete_ debugging use case and the related steps in gdb -
based on a potential process interface. I'm surely willing to learn
about it if there is really such a great practical improvement feasible.
What will be the user's benefit?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-01-16 8:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 14:44 [Qemu-devel] [RESEND][PATCH] gdbstub: Add vCont support Jan Kiszka
2009-01-14 15:03 ` Krumme, Chris
2009-01-14 16:30 ` [Qemu-devel] " Jan Kiszka
2009-01-15 20:32 ` [Qemu-devel] " Anthony Liguori
2009-01-15 21:27 ` [Qemu-devel] " Jan Kiszka
2009-01-16 0:15 ` Paul Brook
2009-01-16 8:05 ` Jan Kiszka [this message]
2009-01-16 8:38 ` Jan Kiszka
2009-01-16 17:05 ` Paul Brook
2009-01-16 19:25 ` Jan Kiszka
2009-01-16 20:42 ` Daniel Jacobowitz
2009-01-17 10:03 ` Jamie Lokier
2009-01-17 17:33 ` Paul Brook
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=49703FAD.1060107@web.de \
--to=jan.kiszka@web.de \
--cc=paul@codesourcery.com \
--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).