public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Attaching to a running process
@ 2003-04-07 16:02 Thomas,Stephen
  2003-04-07 16:08 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas,Stephen @ 2003-04-07 16:02 UTC (permalink / raw)
  To: gdb; +Cc: McGoogan,Sean

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... 

Steve Thomas
SuperH (UK) Ltd.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Attaching to a running process
  2003-04-07 16:02 Attaching to a running process Thomas,Stephen
@ 2003-04-07 16:08 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2003-04-07 16:08 UTC (permalink / raw)
  To: Thomas,Stephen; +Cc: gdb, McGoogan,Sean

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-07 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-07 16:02 Attaching to a running process Thomas,Stephen
2003-04-07 16:08 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).