From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7724 invoked by alias); 9 Feb 2007 15:34:09 -0000 Received: (qmail 7707 invoked by uid 22791); 9 Feb 2007 15:34:08 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 09 Feb 2007 15:34:02 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1HFXlA-0002zN-5y; Fri, 09 Feb 2007 10:34:00 -0500 Date: Fri, 09 Feb 2007 15:34:00 -0000 From: Daniel Jacobowitz To: veenu khanna Cc: gdb@sourceware.org Subject: Re: GDB Stub & GPL question Message-ID: <20070209153400.GA11366@nevyn.them.org> Mail-Followup-To: veenu khanna , gdb@sourceware.org References: <123982.25433.qm@web53807.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <123982.25433.qm@web53807.mail.yahoo.com> User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2007-02/txt/msg00055.txt.bz2 On Fri, Feb 09, 2007 at 07:21:22AM -0800, veenu khanna wrote: > You mean to say that if we implement our own stub for gdb then it HAS > to be a serial connection. It can not be IP based. No, TCP should work fine. > We are pondering over the idea to implement a gdb & gdbserver/stub > solution for our proprietary OS (embedded arch) And I have few doubts > about the viability. It seems that multiple instances of gdbserver > needs to be launched to connect it to multiple processes. Is there a > way to debug multiple processes with single gdbserver instance ? Say > we write our own command in gdb to list all the processes in our OS. > And then we do an attach from gdb like attach . > > Do you have any leads/ideas about how have people handled this > problem ? Is it do-able ? or the only way to debug multiple processes > is to have multiple instances of gdbserver. A single GDB can only control one process at a time. By process I mean a program running with a shared data space; multiple threads of the same process are fine. So if you want to debug multiple different processes, then you need to be able to connect one GDB to your target for each process you want to debug. That can be one stub handling multiple connections, or many instances of the stub. I once wrote some extensions to the remote protocol to allow you to connect to a stub and use the "attach" command to attach to a process on the remote system. I haven't merged them to GDB HEAD yet, but I hope I'll get a chance to do that this year. -- Daniel Jacobowitz CodeSourcery