From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14254 invoked by alias); 15 Sep 2012 00:21:40 -0000 Received: (qmail 14246 invoked by uid 22791); 15 Sep 2012 00:21:39 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 15 Sep 2012 00:21:27 +0000 Received: by vbkv13 with SMTP id v13so6607815vbk.0 for ; Fri, 14 Sep 2012 17:21:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=+iE7GbVcwU6horq6fycoHAeNdoBwxLYvMvoDMgC0+hg=; b=AwfXfQq4s251qG7wHymP32JRjuB6w66m649zR0KdEEZyYD7AnnT0wunuauIrmuMauR QJSbC/4QUSYwiImGEW24GnM0iDXi9T9Oze5YspM8lirBUeil668IHpK4iRSEx9KU5lMl pC8eP3DeRNTXJFcGPl9nqMD88rRJQIEX5gcn7I0wVOmXU/5FOS5IcmAG89z/IvsNDMr4 7Qe4AXJLimoPFgDhCOhC0glf0mLvKMx5b9hkQwj5q73ximDdU7Z+MNrg9TbFLrf4K9mz Vfgc6l4ehPeFI+To0HXunk9znY1/4xAHbG/IOIDfiAlKUA/qkz5AC1eiscv6M3t9+6O2 agkA== Received: by 10.58.74.71 with SMTP id r7mr3886798vev.44.1347668486310; Fri, 14 Sep 2012 17:21:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.74.71 with SMTP id r7mr3886788vev.44.1347668486120; Fri, 14 Sep 2012 17:21:26 -0700 (PDT) Received: by 10.52.24.239 with HTTP; Fri, 14 Sep 2012 17:21:26 -0700 (PDT) In-Reply-To: References: Date: Sat, 15 Sep 2012 00:21:00 -0000 Message-ID: Subject: Re: debug gdb by gdb From: Doug Evans To: John Smith Cc: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQl4+3slqdZTSlJCuYqNBfaQFpzzOjCxVYyu2pJNhRV5SEW9XNLpQlDtjA0EOJjn6PayKcEhdBYk8B3aedL7aF83RsLjLOj6tdZT1Deq5FGGeKsBfcXW0NKSSqj5xKdYKXZYgcncZw+cT3o8MwCIV3PoGoWUkKM7qhAJSVjU/kCeJubDFy7sdUHmLv6ONmPWJ+FiqMXE X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00033.txt.bz2 On Tue, Sep 11, 2012 at 2:36 AM, John Smith wrote: > hi, > > i am try to debug gdb by gdb , and a problem confused me > , here it is : how can i send command to the debugged gdb > process which is the child process of top-gdb ? > > as you know ,when I type command to the command line , this > command will always be send to top-gdb , and how to send > command to the child gdb dynamicly=EF=BC=9F > > > thanks! This all works rather well (depending on what you mean by "dynamically"). gdb developers do it regularly. :-) bash$ cd $build/gdb bash$ gdb gdb [...] (top-gdb) r -nx hello [...] (gdb) r Starting program: /home/dje/hello Hello. [Inferior 1 (process 9905) exited normally] (gdb) i (top-gdb) c (gdb) quit (top-gdb) quit bash$ Do you have something specific that is not working? Note that above I show how to get back to top-gdb from the child gdb without terminating the child gdb using "i" or "info" without arguments. See gdb-gdb.gdb for how this is done.