From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32297 invoked by alias); 3 Dec 2003 14:07:33 -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 32290 invoked from network); 3 Dec 2003 14:07:31 -0000 Received: from unknown (HELO mail.pune.nevisnetworks.com) (203.124.166.107) by sources.redhat.com with SMTP; 3 Dec 2003 14:07:31 -0000 Received: from nevis_pune_xchg.pune.nevisnetworks.com (nevis_pune_xchg.pune.nevisnetworks.com [192.168.2.7]) by mail.pune.nevisnetworks.com (8.12.5/8.12.5) with ESMTP id hB3EKLpX016943 for ; Wed, 3 Dec 2003 19:50:22 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: GDB for Multiprocessor Architecture Date: Wed, 03 Dec 2003 14:07:00 -0000 Message-ID: <36993D449C7FA647BF43568E0793AB3E32A59B@nevis_pune_xchg.pune.nevisnetworks.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Nitin Gupta" To: "Daniel Jacobowitz" , "Ian Lance Taylor" Cc: X-SW-Source: 2003-12/txt/msg00040.txt.bz2 Hi, How can GDB be used to debug an application running on a chip that has n number of similar CPUs. These CPUs share memories and run different code images. I plan to do a debugging session using the hardware probe and the GDB remote protocol. My target does not have any OS support as Linux or RTEMS but the host is a Linux box. My question is how can I get to know that currently GDB is talking to which CPU? Is it possible for me to do something like=20 gdb> load image1.o gdb> CPU=3D1 gdb> |get register contents| gdb> load image2.o gdb> CPU=3D3 gdb> |get register contents| and such similar stuff. One way of implementing this is using the thread model but then each CPU has altogether different code image to execute. Shall I have multiple sessions of GDB, one per CPU? But again if a debug exception is raised say a breakpoint is hit, how will I know on the host side which CPU has hit the breakpoint. Has anybody done a similar task on any other target? Any help on this fron shall be grateful. Thanks and Regards Nitin