From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25334 invoked by alias); 11 Jun 2005 01:46:52 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25276 invoked by uid 22791); 11 Jun 2005 01:46:48 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 11 Jun 2005 01:46:48 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j5B1kLHe016711 for ; Fri, 10 Jun 2005 21:46:21 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j5B1kKO08043; Fri, 10 Jun 2005 21:46:20 -0400 Received: from [172.16.24.50] (bluegiant.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id j5B1kJml002071; Fri, 10 Jun 2005 21:46:19 -0400 Message-ID: <42AA4269.2090008@redhat.com> Date: Sat, 11 Jun 2005 01:46:00 -0000 From: Michael Snyder User-Agent: Mozilla Thunderbird (X11/20050322) MIME-Version: 1.0 To: Srinivas Murthy CC: gdb-patches@sources.redhat.com Subject: Re: gdb tool for multi-proc MIPS32 References: <7cb1293c05060810067a485e41@mail.gmail.com> <42A9FA20.20303@redhat.com> <7cb1293c050610134862dea814@mail.gmail.com> In-Reply-To: <7cb1293c050610134862dea814@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-06/txt/msg00105.txt.bz2 Srinivas Murthy wrote: > Great suggestion. > Thanks. > > I've been going over the gdb_internals doc on the web. > > For the target side, what would be a good starting point for me to put > this together (for MIPS32)? Have you checked out rda? http://sourceware.org/rda/ You can obtain the sources via anonymous cvs if you like. Directions are on the homepage. > On 6/10/05, Michael Snyder wrote: > >>Srinivas Murthy wrote: >> >>>Hi, >>> We need to develop a gdb debug tool for a custom multi-processor MIPS >>>target running in an infinite loop (without an OS) over a serial link >>>with a UART. The host is an x86 machine with Linux OS. >>> >>> The single UART needs to provide connectivity to all the processors >>>on the target and the debug tool needs to do processor specific >>>commands (breakpoints, source-level debug, etc.). >>> >>> Can you guys please point me to any reference material, >>>implementations, etc. for me to get started with this? >> >>As far as what's in the official gdb source repository, >>no one has ever done this, or anything like it. It's >>likely that someone has done it outside of official gdb, >>as a research or development project, and maybe even published >>their results -- I wouldn't know. >> >>But I have a suggestion for you, assuming you are doing >>SIMD or something like it (all the processors running the >>same instruction image). Pretend that your >>processor cores are threads running under a single >>processor. GDB knows how to deal with that. You must >>have some sort of gdb "stub" or "agent" (like rda or >>gdbserver) running on the target side -- just tell >>that guy to interpret a thread id (from gdb) as a >>processor id. "Give me this thread's registers" will >>be interpreted as "give me this processor's registers". >>Switching thread contexts will be interpreted as >>switching processor contexts. >> >>If you're not doing SIMD (ie. if your processors may >>be running completely different code images), then >>you'll probably have to debug each processor under a >>separate gdb session, and multiplex their communications >>onto your single uart somehow. >> >> > >