This is the mail archive of the
mailing list for the GDB project.
Re: Attaching to a running process
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: "Thomas,Stephen" <stephen dot thomas at superh dot com>
- Cc: gdb at sources dot redhat dot com, "McGoogan,Sean" <sean dot mcgoogan at superh dot com>
- Date: Mon, 7 Apr 2003 12:08:12 -0400
- Subject: Re: Attaching to a running process
- References: <9FF3133289A7A84E81E2ED8F5E56B379604385@sh-uk-ex01.uk.w2k.superh.com>
On Mon, Apr 07, 2003 at 05:02:14PM +0100, Thomas,Stephen wrote:
> 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.
MontaVista Software Debian GNU/Linux Developer