From: Jan Kiszka <jan.kiszka@web.de>
To: Paul Brook <paul@codesourcery.com>,
qemu-devel@nongnu.org, Nathan Froyd <froydnj@codesourcery.com>
Subject: [Qemu-devel] Re: [PATCH] fix gdbstub support for multiple threads in usermode, v2
Date: Wed, 03 Jun 2009 00:44:18 +0200 [thread overview]
Message-ID: <4A25AB42.30709@web.de> (raw)
In-Reply-To: <20090602214828.GC21107@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]
Nathan Froyd wrote:
> On Tue, Jun 02, 2009 at 10:14:22PM +0100, Paul Brook wrote:
>>>> Really? Why doesn't GDB get confused on real machines when the PID wraps?
>>>> Is the real bug that we're missing some sort of thread
>>>> creation/destruction event reporting?
>>> Hm, this is a good point. I think the bug is that:
>>> ...
>>> I'm also not sure what to do differently that doesn't involve making
>>> QEMU remember what happened to all the threads it's seen until GDB asks
>>> about them. Ideas?
>> Ok, from Daniel's response it sounds like this bit of gdb is broken.
>>
>> Could we use the real TID? Seems silly to invent a new value when the host has
>> already found one for us...
>
> That would work for threaded usermode emulation. But for multiple-cpu
> system-mode emulation, the CPUs are unlikely to have unique TID values
> (e.g. r2 on powerpc or what have you). And if you're going to support
> hotplugging someday, you're going to have support generation of unique
> IDs somewhere along the way. Using the same code for usermode and
> system mode seems like the better, more robust/future-proof option.
For system-mode emulation, this is not that problematic. The threaded
model assumes that all CPUs use the same memory mapping (for the code of
interest at least) and are programmed with the same set of
break/watchpoints. Pulling one and reinserting it will not require gdb
to handle the newly plugged one differently within this model.
Once we have a true multicore model for gdb and proper protocol
extensions to handle more complex use cases, I bet we will also have a
CPU hotplug event channel for gdb.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
prev parent reply other threads:[~2009-06-02 22:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 19:53 [Qemu-devel] [PATCH] fix gdbstub support for multiple threads in usermode, v2 Nathan Froyd
2009-06-02 20:08 ` Paul Brook
2009-06-02 20:46 ` Daniel Jacobowitz
2009-06-02 20:54 ` Nathan Froyd
2009-06-02 21:14 ` Paul Brook
2009-06-02 21:48 ` Nathan Froyd
2009-06-02 21:56 ` Paul Brook
2009-06-16 19:11 ` [Qemu-devel] " Antti P Miettinen
2009-06-16 19:25 ` Paul Brook
2009-06-16 20:02 ` Antti P Miettinen
2009-06-17 16:39 ` Jan Kiszka
2009-06-02 22:44 ` 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=4A25AB42.30709@web.de \
--to=jan.kiszka@web.de \
--cc=froydnj@codesourcery.com \
--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).