Updated gdb patch: Re: Success: Was Re: Linking problems with gdb-7.2
- To: Samuel Thibault <sthibault@debian.org>
- Cc: debian-hurd@lists.debian.org, Bug hurd mailing list <bug-hurd@gnu.org>
- Subject: Updated gdb patch: Re: Success: Was Re: Linking problems with gdb-7.2
- From: Svante Signell <svante.signell@telia.com>
- Date: Tue, 17 May 2011 17:34:16 +0200
- Message-id: <[🔎] 1305646456.4698.375.camel@s1499.it.kth.se>
- Reply-to: svante.signell@telia.com
- In-reply-to: <20110322235706.GO4808@const.famille.thibault.fr>
- References: <1300654955.4839.188.camel@hp.my.own.domain> <20110320210911.GN7161@const.famille.thibault.fr> <1300655735.4839.190.camel@hp.my.own.domain> <20110320212125.GO7161@const.famille.thibault.fr> <1300657535.4839.192.camel@hp.my.own.domain> <1300741777.4839.203.camel@hp.my.own.domain> <20110321211946.GG4992@const.famille.thibault.fr> <1300742934.4839.207.camel@hp.my.own.domain> <20110321215324.GI4992@const.famille.thibault.fr> <1300780154.4839.223.camel@hp.my.own.domain> <20110322235706.GO4808@const.famille.thibault.fr>
On Wed, 2011-03-23 at 00:57 +0100, Samuel Thibault wrote:
> I've uploaded a package with your fix on debian-ports. Upstream
> discussion still has to happen on
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=12222
Looks like the patch at sourceware.org is not the right one, neither is
the patch in #579834. Correct patch is attached. I could add it to the
Debian bug. How to get it updated in in sourceware?
I recompiled gdb with gcc-4.6 to see if the bogus memory addresses when
debugging exim4 disappeared, but they did not.
But something else was improved:
path/to/compiled/gdb /usr/sbin/exim4
(gdb) run --version
(gdb) Starting program: /usr/sbin/exim4 --version
This warning disappeared:
warning: Error setting exception port for process 1701: (ipc/send)
invalid destination port
And this console message disappears:
task 520b4efc deallocating an invalid port 27260952, most probably a bug
This message is still there:
Can't fetch registers from thread bogus thread id 3: No such thread
--- gdb-7.2/gdb/gnu-nat.c.orig 2010-05-14 22:17:37.000000000 +0200
+++ gdb-7.2/gdb/gnu-nat.c 2011-03-28 09:07:49.000000000 +0200
@@ -1578,8 +1578,8 @@
if (--inf->pending_execs == 0)
/* We're done! */
{
+ prune_threads (); /* Get rid of the old shell threads */
#if 0 /* do we need this? */
- prune_threads (1); /* Get rid of the old shell threads */
renumber_threads (0); /* Give our threads reasonable names. */
#endif
}
--- gdb-7.2/gdb/thread.c.orig 2010-08-06 21:51:49.000000000 +0200
+++ gdb-7.2/gdb/thread.c 2011-03-28 09:04:52.000000000 +0200
@@ -61,7 +61,6 @@
static void info_threads_command (char *, int);
static void thread_apply_command (char *, int);
static void restore_current_thread (ptid_t);
-static void prune_threads (void);
/* Frontend view of the thread state. Possible extensions: stepping,
finishing, until(ling),... */
@@ -518,7 +517,7 @@
return 1;
}
-static void
+void
prune_threads (void)
{
struct thread_info *tp, *next;
--- gdb-7.2/gdb/gdbthread.h.orig 2010-01-12 22:40:24.000000000 +0100
+++ gdb-7.2/gdb/gdbthread.h 2011-03-28 09:03:55.000000000 +0200
@@ -213,6 +213,9 @@
/* Delete an existing thread list entry. */
extern void delete_thread (ptid_t);
+/* Prune inactive threads */
+extern void prune_threads (void);
+
/* Delete an existing thread list entry, and be quiet about it. Used
after the process this thread having belonged to having already
exited, for example. */
Reply to: