Re: (2.0 bug?) ELF truncated core dump solved - binfmt_elf.c patch

Eric Youngdale (eric@aib.com)
Wed, 12 Jun 1996 10:46:41 -0400


>The following code from binfmt_elf.c/maydump causes 1.3.85 to generate
>core files under some circumstances (i.e. the product I'm trying to
>develop :-() that GDB 4.14 cannot read, giving a truncated core file
>error:

The patch that you sent appears to only mask the actual problem.
The idea behind that code is that we only dump portions of memory that
are writable, and not write out executable code which could have been
obtained from the executable instead, for example.

Would you be able to build gdb and then run gdb under gdb
(it takes a bit of getting used to, but it isn't that bad :-))?
I would be more interested in seeing exactly what it is about the core
file in question that causes gdb to generate that message. Once we
understand this, it should be pretty easy to figure out what is wrong
in binfmt_elf.c that causes you the problems.

-Eric

-- 
"The woods are lovely, dark and deep.  But I have promises to keep,
And lines to code before I sleep, And lines to code before I sleep."