This is the mail archive of the
archer-commits@sourceware.org
mailing list for the Archer project.
[SCM] archer-jankratochvil-pie-fedora12: Workaround crash in gdb-7.0 fixed post-7.0 upstream.
- From: jkratoch at sourceware dot org
- To: archer-commits at sourceware dot org
- Date: 6 Dec 2009 18:55:34 -0000
- Subject: [SCM] archer-jankratochvil-pie-fedora12: Workaround crash in gdb-7.0 fixed post-7.0 upstream.
The branch, archer-jankratochvil-pie-fedora12 has been updated
via e2198bd7b87fa442353763530d68afb991e1c9c0 (commit)
from a6ffb102240621b467c585dabadf2611fb0fdc75 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit e2198bd7b87fa442353763530d68afb991e1c9c0
Author: Jan Kratochvil <jkratoch@host1.dyn.jankratochvil.net>
Date: Sun Dec 6 19:54:36 2009 +0100
Workaround crash in gdb-7.0 fixed post-7.0 upstream.
* auxv.c (memory_xfer_auxv): New variable inf. Inline current_inferior
safely.
-----------------------------------------------------------------------
Summary of changes:
gdb/auxv.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
First 500 lines of diff:
diff --git a/gdb/auxv.c b/gdb/auxv.c
index d148031..7df8eb5 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -184,6 +184,15 @@ memory_xfer_auxv (struct target_ops *ops,
ULONGEST offset,
LONGEST len)
{
+ /* Workaround gdb-7.0 bug where linux_nat_xfer_partial() does
+ inferior_ptid = pid_to_ptid (GET_LWP (inferior_ptid));
+ and current_inferior() assertion fails not finding the LWP->PID.
+ It got fixed post-gdb-7.0 by:
+ Add base multi-executable/process support to GDB.
+ 40ff0a289e6165aa930af284df5c52162cb0cd5f
+ by introducing `current_inferior_'. */
+ struct inferior *inf = find_inferior_pid (ptid_get_pid (inferior_ptid));
+
gdb_assert (object == TARGET_OBJECT_AUXV);
gdb_assert (readbuf || writebuf);
@@ -191,7 +200,7 @@ memory_xfer_auxv (struct target_ops *ops,
executed by valgrind's memcheck. As using ld_so_xfer_auxv is problematic
during inferior startup GDB does call it only for attached processes. */
- if (current_inferior ()->attach_flag != 0)
+ if (inf == NULL || inf->attach_flag != 0)
{
LONGEST retval;
hooks/post-receive
--
Repository for Project Archer.