From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25076 invoked by alias); 4 Feb 2002 22:02:29 -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 24812 invoked from network); 4 Feb 2002 22:02:25 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 4 Feb 2002 22:02:25 -0000 Received: from cse.cygnus.com (cse.sfbay.redhat.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA12814; Mon, 4 Feb 2002 14:02:07 -0800 (PST) Received: (from kev@localhost) by cse.cygnus.com (8.11.6/8.11.6) id g14M1RI18382; Mon, 4 Feb 2002 15:01:27 -0700 Date: Mon, 04 Feb 2002 14:02:00 -0000 From: Kevin Buettner Message-Id: <1020204220127.ZM18381@localhost.localdomain> In-Reply-To: Piet/Pete Delaney "Re: Debugging gdb with gdb" (Feb 4, 12:23pm) References: <20020203161845.B12617@act-europe.fr> <20020204122349.A18625@sgi.com> X-Mailer: Z-Mail (4.0.1 13Jan97 Caldera) To: Piet/Pete Delaney Subject: Re: Debugging gdb with gdb Cc: gdb@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-02/txt/msg00090.txt.bz2 On Feb 4, 12:23pm, Piet/Pete Delaney wrote: > Happen to have a trick to get the inferior GDB to wait for the attaching GDB > to place breakpoints prior to the inferior setting up a remote debug session. > skdb starts the inferior gdb with a named pipe (see attached), I'm thinking > about adding a loop to spin till a global variable is set by the attaching > gdb to indicate that the inferionr gdb can progress with setting up the > remote connections and sent the 'g' packet. I don't understand why you need to do this. Why not just start up the inferior gdb first and attach to it with another gdb while it's at the prompt? Once you're attached, you can set breakpoints wherever you like. After your breakpoints are set, do a ``continue'' and then start entering your target connection commands in the inferior gdb. Assuming you've placed a breakpoint somewhere along the execution path that the inferior gdb will take when/after it connects, you'll be stopped... Kevin