diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-01-14 21:15:00 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-01-14 21:15:00 +0000 |
commit | 9f2982ff0bf5e33d54b085b98970ab15ba4fac46 (patch) | |
tree | cb004329356d337dade67017cf7bb35db6015e38 /gdb/solib-svr4.c | |
parent | bbfba9ed150f56ba5b09360314b30381a865ff5c (diff) | |
download | binutils-9f2982ff0bf5e33d54b085b98970ab15ba4fac46.zip binutils-9f2982ff0bf5e33d54b085b98970ab15ba4fac46.tar.gz binutils-9f2982ff0bf5e33d54b085b98970ab15ba4fac46.tar.bz2 |
gdb/
Support Valgrind attachments broken by the PIE support.
* auxv.c: Include gdbcore.h.
(procfs_xfer_auxv): Make static. Reduce its comment. Drop its
parameters ops, object and annex. Remove their assertions.
(ld_so_xfer_auxv, memory_xfer_auxv): New function.
* auxv.h (procfs_xfer_auxv): Remove comment. Rename to ...
(memory_xfer_auxv): ... here.
* linux-nat.c (linux_xfer_partial): Rename procfs_xfer_auxv to
memory_xfer_auxv.
* procfs.c (procfs_xfer_partial): Likewise.
* solib-svr4.c (svr4_relocate_main_executable): New prototype.
(svr4_special_symbol_handling): Call svr4_relocate_main_executable.
(svr4_solib_create_inferior_hook): Conditionalize the
svr4_relocate_main_executable call.
gdb/testsuite/
* gdb.base/valgrind-db-attach.exp, gdb.base/valgrind-db-attach.c: New.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r-- | gdb/solib-svr4.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 0957c44..6daf0dc 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -50,6 +50,7 @@ static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); +static void svr4_relocate_main_executable (void); /* Link map info to include in an allocated so_list entry */ @@ -1540,6 +1541,7 @@ enable_break (struct svr4_info *info, int from_tty) static void svr4_special_symbol_handling (void) { + svr4_relocate_main_executable (); } /* Decide if the objfile needs to be relocated. As indicated above, @@ -1729,7 +1731,8 @@ svr4_solib_create_inferior_hook (int from_tty) info = get_svr4_info (); /* Relocate the main executable if necessary. */ - svr4_relocate_main_executable (); + if (current_inferior ()->attach_flag == 0) + svr4_relocate_main_executable (); if (!svr4_have_link_map_offsets ()) return; |