From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23094 invoked by alias); 7 Apr 2003 16:08:17 -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 23085 invoked from network); 7 Apr 2003 16:08:16 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 7 Apr 2003 16:08:16 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 192ZAR-0005b2-00; Mon, 07 Apr 2003 11:08:19 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 192ZAK-00037L-00; Mon, 07 Apr 2003 12:08:12 -0400 Date: Mon, 07 Apr 2003 16:08:00 -0000 From: Daniel Jacobowitz To: "Thomas,Stephen" Cc: gdb@sources.redhat.com, "McGoogan,Sean" Subject: Re: Attaching to a running process Message-ID: <20030407160812.GA11691@nevyn.them.org> Mail-Followup-To: "Thomas,Stephen" , gdb@sources.redhat.com, "McGoogan,Sean" References: <9FF3133289A7A84E81E2ED8F5E56B379604385@sh-uk-ex01.uk.w2k.superh.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9FF3133289A7A84E81E2ED8F5E56B379604385@sh-uk-ex01.uk.w2k.superh.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-04/txt/msg00063.txt.bz2 On Mon, Apr 07, 2003 at 05:02:14PM +0100, Thomas,Stephen wrote: > Hi, > > I am currently working on a port of gdb to SuperH SH64 Linux, & I am having a problem with the gdb 'attach' command. According to the gdb info pages, gdb is supposed to work out what filename the attached process is running, & load its symbols. However, gdb doesn't seem to be doing this. I checked our x86 gdb, & that doesn't either (gdb version number reported as 'Red Hat Linux 7.x (5.0rh-15)'). > > On x86 this doesn't seem to matter much. However it does on SH64, as the attach seems to get done using some default target info, which means it gets the wrong CPU type and the wrong endianess. If I tell gdb what filename to use (e.g. by specifying it on the command line), everything works fine. > > So should gdb try to find the filename & load it before attaching or not? If not (i.e. the info pages are wrong), then I guess I'm going to have to solve this somehow... Sure it should. What version of GDB are you working with? See child_pid_to_exec_file in linux-proc.c. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer