A new ELF core dump patch for gdb 4.14

A new ELF core dump patch for gdb 4.14

Post by Nighthha » Sun, 09 Jul 1995 04:00:00

Hi, Folks,

This is the second Linux/ELF core dump patch for gdb 4.14, which is

and Eric Youngdale's shared library support. You need kernel 1.3.5 or
above to generate ELF core dump.

The primary ftp sites for the compiler/C library are tsx-11.mit.edu
under pub/linux/packages/GCC and sunsite.unc.edu under pub/Linux/GCC.
gdb-4.14.elf.1.bin.tar.gz contains gdb-4.1.14.elf.1.diff.gz, a patch
against gdb 4.14, and gdb, a static ELF gdb binary. You need libc
5.1.2 or above to compile it without fixing one Linux header file,
<sys/procfs.h> which should include <linux/elfcore.h>.


----From Eric-----

        This directory contains a gdb that will work with ELF images
and automatically detect the shared libraries that are in use.  You
will now be able to debug into a shared library in a transparent
fashion without any of the hacks that we have used in the past.

        gdb.diff: patches to gdb-4.14
        gdb     - ELF executable for gdb linked against libc.so.5.

Here is an example of the new capabilities:
bash$ gdb test
GDB is free software and you are welcome to 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.
GDB 4.14 (i486-linux), Copyright 1995 Free Software Foundation, Inc...
(no debugging symbols found)...
(gdb) break main
Breakpoint 1 at 0x8000513
(gdb) break printf
Breakpoint 2 at 0x80003e8  # Note - this is in PLT of test.
(gdb) info shared
No shared libraries loaded at this time.
(gdb) run
Starting program: /usr1/users/eric/test
(no debugging symbols found)...Breakpoint 2 at 0x50030940 #Bkpt now in shlib
(no debugging symbols found)...
Breakpoint 1, 0x8000513 in main ()
(gdb) info shared
From        To          Syms Read   Shared Object Library
0x50007000  0x500ab2cc  Yes         /lib/libc.so.5
0x50000000  0x50005374  Yes         /lib/ld-linux.so.1
(gdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y    0x08000513  <main+3>
        breakpoint already hit 1 time
2   breakpoint     keep y    0x50030940  <printf>
(gdb) disass printf
Dump of assembler code for function printf:
0x50030940 <printf>:    pushl  %ebx
0x50030941 <printf+1>:  call   0x50030946 <printf+6>
0x50030946 <printf+6>:  popl   %ebx
0x50030947 <printf+7>:  addl   $0x4b116,%ebx
0x5003094d <printf+13>: movl   0x8(%esp,1),%eax
0x50030951 <printf+17>: leal   0xc(%esp,1),%edx
0x50030955 <printf+21>: pushl  %edx
0x50030956 <printf+22>: pushl  %eax
0x50030957 <printf+23>: movl   0x82c(%ebx),%eax
0x5003095d <printf+29>: pushl  %eax
0x5003095e <printf+30>: call   0x500144d8 <_init+6584>
0x50030963 <printf+35>: addl   $0xc,%esp
0x50030966 <printf+38>: popl   %ebx
0x50030967 <printf+39>: ret    
0x50030968 <printf+40>: nop    
0x50030969 <printf+41>: nop    
0x5003096a <printf+42>: nop    
0x5003096b <printf+43>: nop    
0x5003096c <printf+44>: nop    
0x5003096d <printf+45>: nop    
0x5003096e <printf+46>: nop    
0x5003096f <printf+47>: nop    
End of assembler dump.


1. Has anyone compiled an ELF binary of gdb 4.13/4.14 ?

I have converted the whole system to ELF (libc 5.0). However, I don't
have the disk space to compile gdb. Wonder if anyone have done it
and please upload the copy to sunsite/tsx-11?



    ^..^     ^..^     ^..^    ^..^     ^..^     ^..^    ^..^     ^..^
   ( oo )   ( oo )   ( oo )  ( oo )   ( oo )   ( oo )  ( oo )   ( oo )
  "(    )""(      )""(    )""(    )""(      )""(    )""(    )""(      )"
    W--W    [--[    W--W    W--W    [--[    W--W    W--W    [--[

2. Linux on new alpha system (with nt bios)

3. gdb and elf core dumps

4. Telnet hangs

5. Which gdb version for ELF core dumps?

6. X Windows problems with PS/2 mouse and keyboard - Red Hat 8.0

7. REPOST: gdb can't read Linux ELF core dump (still unsolved)

8. Can't get HEADERNAME to work in Apache 1.3.12 please help

9. gdb cannot read elf core dump

10. [PATCH] read_barrier.v2.4.14.patch.2001.11.06

11. gdb 4.14 on Solaris 2.3

12. Compile error - gdb 4.14

13. Solaris 2.4 and gdb 4.14