From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16541 invoked by alias); 31 May 2005 17:06:24 -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 15337 invoked by uid 22791); 31 May 2005 17:05:24 -0000 Received: from web31913.mail.mud.yahoo.com (HELO web31913.mail.mud.yahoo.com) (68.142.207.93) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Tue, 31 May 2005 17:05:24 +0000 Received: (qmail 45259 invoked by uid 60001); 31 May 2005 17:05:23 -0000 Message-ID: <20050531170523.45257.qmail@web31913.mail.mud.yahoo.com> Received: from [64.6.182.229] by web31913.mail.mud.yahoo.com via HTTP; Tue, 31 May 2005 10:05:22 PDT Date: Tue, 31 May 2005 17:06:00 -0000 From: Reply-To: tronics93-gdb@yahoo.com Subject: Re: gdb 6.3 misses breakpoint on Linux when inferior does clone() To: gdb@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-05/txt/msg00371.txt.bz2 >> The kernel does not provide any interface for GDB to know whether or >> not a clone syscall has used CLONE_VM. >> >> [Satish] Doesn't ptrace(PTRACE_GETREGS,...) provide that information >>? Or is that arch. specific ? >No, it does not. 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]); --tronics93.