[lug] gcore for rh 9
Andrew Diederich
diederic at boulder.net
Thu Oct 21 14:04:23 MDT 2004
On 21 Oct 2004, Tom Tromey wrote:
> On my FC2 box, gcore is a shell script that invokes gdb. It is
> gdb/gcore_gdb.sh in the gdb source tree. According to the ChangeLog
> it was added on 2003-04-17. I didn't look to see what gdb release
> that corresponds to.
>
> Try "help gcore". Also you will want to "attach" to your running
> process first.
>
> Tom
Great. That script is in cvs, and is in gdb 6.2. It does generate a core,
though strangely enough it's not generating a core that gdb can read. Of
course, I'm not the leading expert on gdb, so I may be doing something
wrong.
To test it I started top, got the pid, and "gcore <pid>". core.<pid> was
generated, so I "gdb core.<pid>". Results:
This GDB was configured as "i386-redhat-linux-gnu"..."/home/adiederich/bin/core.25434": not in executable format: File format not recognized
I tried copying top into the directory, too, in case it wanted the bin in the
same dir, but no joy. File thinks it's ok:
[adiederich at bun-bun bin]$ file core.25422
core.25422: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style,
from 'top'
How do I know for certain if this is a good core file?
--
Andrew Diederich
More information about the LUG
mailing list