bug-hurd
[Top][All Lists]
Advanced

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

Re: Core dump (semi) update


From: Alfred M. Szmidt
Subject: Re: Core dump (semi) update
Date: Mon, 2 Feb 2004 20:55:30 +0100 (MET)

[sorry for the late reply]

   What bfd reports as sections are synthesized from the note data.
   core files don't really have any sections.  The clearest way to see
   their contents is with readelf.  Then you can tell whether the file
   is wrong, or if the BFD code that reads it for gdb is wrong.

readelf doesn't produce much useful info IMHO.  Like if fpregset etc
are there or not.

   I was about to suggest you look at your gdb build to see what went
   wrong.

Where should I look?

   But looking at the source, there isn't a configure check for
   pr_fpreg to go with the bfd/elf.c code (elfcore_grok_lwpstatus).
   That would explain that.

This didn't work, produced the same output as without it (and yes, I
did regenerate configure).

   But anyway, that problem should not affect anything except gdb's
   ability to see FP registers.

I really think that the problem lies with the dumping, I did a quick
debug of gdb and it showed that the size of the fpregset is 0 when it
should be 380 or some such (causing "warning: Wrong size fpregset in
core file" to be printed).

   Nowadays Linux kernels produce multithreaded core dumps with
   multiple N_PRSTATUS notes.  That is rather redundant because that
   structure contains a bunch of per-process, not per-thread, values.
   But it's what Linux does, and so that format's support gets tested.

   That said, using the lwpstatus format may well work just fine after
   fixing this one bug, and it is a cleaner format.

Please, lets _not_ change it, I like this one quite a lot instead of
the weird stuff Linux has.  I'd rather fix or help fixing bugs then
seeing rewrites to uglier formats.

Cheers, thanks for the reply.

,----
| hurd:/home/ams# ./sleep 100h &
| [2] 5465
| hurd:/home/ams# gcore 5465
| hurd:/home/ams# gdb/gdb/obj/gdb/gdb sleep core.5465 
| GNU gdb 2004-02-02-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 `./sleep 100h'.
| 
| warning: Wrong size fpregset in core file.
| Reading symbols from /lib/libm.so.6...done.
| Loaded symbols for /lib/libm.so.6
| Reading symbols from /lib/librt.so.1...done.
| Loaded symbols for /lib/librt.so.1
| Reading symbols from /lib/libc.so.0.3...done.
| Loaded symbols for /lib/libc.so.0.3
| Reading symbols from /lib/ld.so...done.
| Loaded symbols for /lib/ld.so
| 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) quit
`----




reply via email to

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