From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1696 invoked by alias); 11 Jun 2005 23:31:53 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1685 invoked by uid 22791); 11 Jun 2005 23:31:49 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 11 Jun 2005 23:31:49 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j5BNViDC029727; Sun, 12 Jun 2005 01:31:44 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j5BNVhEJ004199; Sun, 12 Jun 2005 01:31:43 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j5BNVc4L020335; Sun, 12 Jun 2005 01:31:38 +0200 (CEST) Date: Sat, 11 Jun 2005 23:31:00 -0000 Message-Id: <200506112331.j5BNVc4L020335@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: tronics93-gdb@yahoo.com, gdb@sources.redhat.com In-reply-to: <20050601132331.GA19300@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 1 Jun 2005 09:23:31 -0400) Subject: Re: gdb 6.3 misses breakpoint on Linux when inferior does clone() References: <20050531170523.45257.qmail@web31913.mail.mud.yahoo.com> <20050601132331.GA19300@nevyn.them.org> X-SW-Source: 2005-06/txt/msg00106.txt.bz2 Date: Wed, 1 Jun 2005 09:23:31 -0400 From: Daniel Jacobowitz On Tue, May 31, 2005 at 10:05:22AM -0700, tronics93-gdb@yahoo.com wrote: > The following code snippet gets the flags passed in to clone() (on > x86): > > unsigned long regs[FRAME_SIZE]; > > if (ptrace(PTRACE_GETREGS, pid, 0, ®s) < 0) > perror("ptrace_getregs failed:"); > > printf("syscall=%d, arg1=%#x, arg2=%#x\n", regs[ORIG_EAX], > regs[EBX], regs[ECX]); Only if you're stopped at the clone. Hmm. Good point; perhaps we can recover them from registers when we receive the clone event. But having to do that in a machine-dependent manner really sucks... It could probably be implemented if someone spent the time. ...so that time is probably better spent on implementing the proper machine-independent functionality in the Linux kernel! Mark