From: Svante Signell <svante.signell@telia.com>
To: gdb-patches@sourceware.org
Subject: Patch to enable a fully working gdb for GNU/Hurd
Date: Wed, 29 Jun 2011 17:14:00 -0000 [thread overview]
Message-ID: <1309367642.3172.82.camel@s1499.it.kth.se> (raw)
Dear list,
Here is an attempt to create a complete patch for gdb to make it run
successfully on GNU/Hurd.
Problem description:
When starting gdb the following output is written:
Can't fetch registers from thread bogus thread id 1: No such thread
This makes gdb completely unusable for debugging purposes without this
patch.
Patch size: Small change
ChangeLog:
gdb/
2011-06-29 Svante Signell <svante.signell@telia.com>
* gnu_nat.c: Activate prune_threads() for Hurd
* thread.c: Make prune_threads() visible outside current scope.
* gdbthread.h: Declare prune_threads()
* Fix PR gdb/12222
gdb-7.2.patch
--- 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. */
next reply other threads:[~2011-06-29 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 17:14 Svante Signell [this message]
2011-07-04 18:34 ` Thomas Schwinge
2011-07-04 19:20 ` Svante Signell
2011-07-04 19:56 ` Joel Brobecker
2011-07-05 14:53 ` Svante Signell
2011-07-05 15:09 ` Thomas Schwinge
2011-07-05 16:26 ` Tom Tromey
2011-07-05 17:51 ` Svante Signell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1309367642.3172.82.camel@s1499.it.kth.se \
--to=svante.signell@telia.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox