[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core dump (semi) update

From: Roland McGrath
Subject: Re: Core dump (semi) update
Date: Sun, 8 Feb 2004 17:47:30 -0500 (EST)

>    Like I said, this is the internal contents of the note.  readelf
>    tells you the sizes and locations of the note, and if those are
>    sane, you can look at the data directly and interpret according to
>    the struct type.  This is what you have to do to have anything to
>    say about whether the dumping is being done correctly or not.
>    Please do it.
> Here is what I got from the core file (using a bit of mmap() magic, so
> hopefully it is correct), I took and formated it a bit so that it is a
> bit easier on the eyes.  Some values look quite bogus; like most of
> the pr_*id regs.

All the pr_*id values look sane to me.  pr_[ug]id and pr_egid are (unsigned)-1.
If you look at elfcore.c, this is what to expect.

> If you want to check it yourself, I can always send you the core dump,
> it is only 30k compressed.

> |       pr_reg = {31, 31, 31, 31, 0, 3, 16873244, 2, 18340376,
> |                 18579400, 0, -25, 0, 0, 17004764, 23, 17004764, 23, 
> 17004764}, 

Are these sane register values for your program?

> I forgot to re-run autoheader.  GDB is not silent about the size
> mis-match about fpregset.  But it still doesn't read the core dumps
> like it should.

Ok.  The first thing to check here is that the pseudo-sections are showing
the right locations.  That is, use objdump -h and see that the file offsets
given for .reg and the like match what they should.  

> ,----
> | hurd:/ams# ./sources.redhat.com/sources.redhat.com/obj/gdb/gdb 
> /sub-hurd/bin/gencat core.23268 
> | GNU gdb 2004-02-04-cvs
> | Copyright 2004 Free Software Foundation, Inc.
> | GDB is free software, covered by the GNU General Public License, and you are
> | welcome to change it and/or distribute copies of it under certain 
> conditions.
> | Type "show copying" to see the conditions.
> | There is absolutely no warranty for GDB.  Type "show warranty" for details.
> | This GDB was configured as "i386-unknown-gnu0.3"...
> | 
> | warning: core file may not match specified executable file.
> | Core was generated by `/sub-hurd/bin/gencat'.
> | Reading symbols from /lib/libc.so.0.3...done.
> | Loaded symbols for /lib/libc.so.0.3
> | Reading symbols from /lib/ld.so.1...done.
> | Loaded symbols for /lib/ld.so.1
> | Reading symbols from /lib/libmachuser.so.1...done.
> | Loaded symbols for /lib/libmachuser.so.1
> | Reading symbols from /lib/libhurduser.so.0.3...done.
> | Loaded symbols for /lib/libhurduser.so.0.3
> | #0  0x00000000 in ?? ()
> | (gdb) 
> `----

Show `info regs' here.  That will show what info gdb got, and if it's all
zeros that's suspicious in one way, while if it has some values, exactly
what those are might tell us something else. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]