This is the mail archive of the
mailing list for the GDB project.
Attaching to a running process
- From: "Thomas,Stephen" <stephen dot thomas at superh dot com>
- To: <gdb at sources dot redhat dot com>
- Cc: "McGoogan,Sean" <sean dot mcgoogan at superh dot com>
- Date: Mon, 7 Apr 2003 17:02:14 +0100
- Subject: Attaching to a running process
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...
SuperH (UK) Ltd.