This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 14/15] PIE: Fix back valgrind --db-attach=yes [fixup]
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 13 Jan 2010 14:08:21 -0700
- Subject: Re: [patch 14/15] PIE: Fix back valgrind --db-attach=yes [fixup]
- References: <20091109210114.GO19138@host0.dyn.jankratochvil.net> <20100110214208.GA1435@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> `valgrind --db-attach=yes' will run GDB on the crashed PID which is only
Jan> a virtual emulated program inside a virtual machine running at that PID.
Jan> The /proc/PID/exe program is a valgrind tool (such as `memcheck').
[...]
Thanks for the detailed explanation.
This was very helpful.
Jan> gdb/
Jan> Support Valgrind attachments broken by the PIE support.
Jan> * auxv.c: Include gdbcore.h.
Jan> (procfs_xfer_auxv): Make static. Reduce its comment. Drop its
Jan> parameters ops, object and annex. Remove their assertions.
Jan> (ld_so_xfer_auxv, memory_xfer_auxv): New function.
Jan> * auxv.h (procfs_xfer_auxv): Remove comment. Rename to ...
Jan> (memory_xfer_auxv): ... here.
Jan> * linux-nat.c (linux_xfer_partial): Rename procfs_xfer_auxv to
Jan> memory_xfer_auxv.
Jan> * procfs.c (procfs_xfer_partial): Likewise.
Jan> * solib-svr4.c (svr4_relocate_main_executable): New prototype.
Jan> (svr4_special_symbol_handling): Call svr4_relocate_main_executable.
Jan> (svr4_solib_create_inferior_hook): Conditionalize the
Jan> svr4_relocate_main_executable call.
Jan> gdb/testsuite/
Jan> * gdb.base/valgrind-db-attach.exp, gdb.base/valgrind-db-attach.c: New.
Ok. Thanks.
Tom