All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>, 陳韋任 <chenwj@iis.sinica.edu.tw>
Subject: Re: [Qemu-devel] How to follow a child process created in the guest OS?
Date: Fri, 10 Feb 2012 23:48:05 +0000	[thread overview]
Message-ID: <201202102348.06492.paul@codesourcery.com> (raw)
In-Reply-To: <20120210102604.GA9791@cs.nctu.edu.tw>

>   I am running this tiny OS on QEMU then using GDB to connect it.
> 
> I want to follow task 1 after the forking, but it seems that GDB
> stick with task 0 and cannot follow task 1 even I do `set follow-fork-mode
> child`.

You have exactly one CPU. That's what the qemu GDB stub exposes.  Multiple 
processes are an illusion created by your operating system.  It is not 
something qemu knows or cares about.

In most cases if you want to do debugging within that OS created illusion (aka 
a userspace process) then you probably don't want to be using a hardware debug 
probe (i.e. the qemu gdb stub) at all. Instead you want to be using the debug 
facilities provided by your operating system.  On linux this would be ptrace, 
probably via gdbserver.

Paul

  reply	other threads:[~2012-02-10 23:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 10:33 [Qemu-devel] How to follow a child process created in the guest OS? 陳韋任
2012-02-10  8:14 ` Stefan Hajnoczi
2012-02-10 10:26   ` 陳韋任
2012-02-10 23:48     ` Paul Brook [this message]
2012-02-10 23:54       ` 陳韋任
2012-02-11  0:42     ` Andreas Färber
2012-02-11  0:50       ` malc
2012-02-12  3:00         ` Wei Yang
2012-02-13 10:49           ` Stefan Hajnoczi
2012-02-10  9:24 ` Max Filippov

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=201202102348.06492.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=chenwj@iis.sinica.edu.tw \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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.