diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2008-11-11 22:57:49 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2008-11-11 22:57:49 +0000 |
commit | e2c9af9ae9cffcad67d0c6845a64bf54ca71a713 (patch) | |
tree | 19db35e56679a5415105c7e780c8f3e33c183a7c /gnu/usr.bin/binutils/gdb/objfiles.c | |
parent | fdb019932caa27a3f61876da2ab864908b74ee31 (diff) |
Enable support for debugging pie programs. Code from Elena Zannoni's
<ezannoni at redhat dot com> pie branch in gdb cvs, less extraneous
parts and with some bug fixes. Debugging w/core files for pie programs
isn't working yet since AUXV data isn't included in our core files at
the moment.
feedback and ok kettenis@
Diffstat (limited to 'gnu/usr.bin/binutils/gdb/objfiles.c')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/objfiles.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils/gdb/objfiles.c b/gnu/usr.bin/binutils/gdb/objfiles.c index 3c4e0b402b0..46bc4a8a5c7 100644 --- a/gnu/usr.bin/binutils/gdb/objfiles.c +++ b/gnu/usr.bin/binutils/gdb/objfiles.c @@ -45,6 +45,9 @@ #include "breakpoint.h" #include "block.h" #include "dictionary.h" +#include "auxv.h" + +#include "elf/common.h" /* Prototypes for local functions */ @@ -257,7 +260,12 @@ init_entry_point_info (struct objfile *objfile) CORE_ADDR entry_point_address (void) { - return symfile_objfile ? symfile_objfile->ei.entry_point : 0; + CORE_ADDR entry_addr = symfile_objfile ? symfile_objfile->ei.entry_point : 0; + + /* Find the address of the entry point of the program from the + auxv vector. */ + target_auxv_search (¤t_target, AT_ENTRY, &entry_addr); + return entry_addr; } /* Create the terminating entry of OBJFILE's minimal symbol table. |