From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rw0Ii-0005oO-TE for qemu-devel@nongnu.org; Fri, 10 Feb 2012 18:54:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rw0Ih-0000b8-L6 for qemu-devel@nongnu.org; Fri, 10 Feb 2012 18:54:48 -0500 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:55496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rw0Ih-0000af-2e for qemu-devel@nongnu.org; Fri, 10 Feb 2012 18:54:47 -0500 Date: Sat, 11 Feb 2012 07:54:42 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7?= Message-ID: <20120210235442.GA99267@cs.nctu.edu.tw> References: <20120209103316.GA94562@cs.nctu.edu.tw> <20120210081441.GA17878@stefanha-thinkpad.localdomain> <20120210102604.GA9791@cs.nctu.edu.tw> <201202102348.06492.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201202102348.06492.paul@codesourcery.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] How to follow a child process created in the guest OS? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On Fri, Feb 10, 2012 at 11:48:05PM +0000, Paul Brook wrote: > > I am running this tiny OS on QEMU then using GDB to connect it. > >=20 > > 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`. >=20 > You have exactly one CPU. That's what the qemu GDB stub exposes. Multi= ple=20 > processes are an illusion created by your operating system. It is not=20 > something qemu knows or cares about. >=20 > In most cases if you want to do debugging within that OS created illusi= on (aka=20 > a userspace process) then you probably don't want to be using a hardwar= e debug=20 > probe (i.e. the qemu gdb stub) at all. Instead you want to be using the= debug=20 > facilities provided by your operating system. On linux this would be p= trace,=20 > probably via gdbserver. I see. Thanks. Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj