From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15638 invoked by alias); 4 Jul 2011 19:18:02 -0000 Received: (qmail 15624 invoked by uid 22791); 4 Jul 2011 19:18:01 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from smtp-out12.han.skanova.net (HELO smtp-out12.han.skanova.net) (195.67.226.212) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Jul 2011 19:17:47 +0000 Received: from [130.237.20.66] (130.237.20.66) by smtp-out12.han.skanova.net (8.5.133) (authenticated as u84406617) id 4DF89E7F00444BF1; Mon, 4 Jul 2011 21:17:44 +0200 Subject: Re: Patch to enable a fully working gdb for GNU/Hurd From: Svante Signell Reply-To: svante.signell@telia.com To: Thomas Schwinge Cc: gdb-patches@sourceware.org In-Reply-To: <87k4bxj4ed.fsf@kepler.schwinge.homeip.net> References: <1309367642.3172.82.camel@s1499.it.kth.se> <87k4bxj4ed.fsf@kepler.schwinge.homeip.net> Content-Type: text/plain; charset="UTF-8" Date: Mon, 04 Jul 2011 19:20:00 -0000 Message-ID: <1309807063.3172.126.camel@s1499.it.kth.se> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00113.txt.bz2 On Mon, 2011-07-04 at 20:18 +0200, Thomas Schwinge wrote: > Hallo! > > On Wed, 29 Jun 2011 19:14:02 +0200, Svante Signell wrote: > > 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 > > > > * 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 > > At the time I had originally written this patch, I rather considered it > to be a hack than a proper fix -- I just needed a functional GDB on > GNU/Hurd back then. > > I think that update_thread_list (which already is exported) should rather > be invoked instead of additionally exporting prune_threads. > > But -- I can no longer reproduce the original problem with GDB HEAD. Can > you? I haven't compiled gdb for some time now. I can take a look, how to get the GDB HEAD? The prune_threads enabled gdb to work properly, and then Samuel applied an earlier version of the patch on debian-ports. Since then the new Debian gdb maintainer wanted to get this patch applied upstream, so I did as was requested. Don't know if it is the correct approach or not. I can try to use update_thread_list instead, once I have the GDB HEAD files.