From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24674 invoked by alias); 5 Jul 2011 14:38:24 -0000 Received: (qmail 24665 invoked by uid 22791); 5 Jul 2011 14:38:23 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TW_DB 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; Tue, 05 Jul 2011 14:38:07 +0000 Received: from [130.237.20.66] (130.237.20.66) by smtp-out12.han.skanova.net (8.5.133) (authenticated as u84406617) id 4DF89E7F0047D1CD; Tue, 5 Jul 2011 16:38:05 +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, 579834@bugs.debian.org In-Reply-To: <1309807063.3172.126.camel@s1499.it.kth.se> References: <1309367642.3172.82.camel@s1499.it.kth.se> <87k4bxj4ed.fsf@kepler.schwinge.homeip.net> <1309807063.3172.126.camel@s1499.it.kth.se> Content-Type: text/plain; charset="UTF-8" Date: Tue, 05 Jul 2011 14:53:00 -0000 Message-ID: <1309876684.3172.144.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/msg00147.txt.bz2 On Mon, 2011-07-04 at 21:17 +0200, Svante Signell wrote: > On Mon, 2011-07-04 at 20:18 +0200, Thomas Schwinge wrote: > > Hallo! ... > > 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. I have now built gdb HEAD and found that the patch is no longer needed. Additionally adding update_thread_list in gnu_nat.c works for gdb-7.2, will propose the following patch to the Debian bug report #579834 in case there will be more releases of the 7.2-series until 7.4 is released. --- gdb/gnu-nat.c.orig 2011-07-05 15:41:54.000000000 +0200 +++ gdb/gnu-nat.c 2011-07-05 14:27:31.000000000 +0200 @@ -1578,6 +1578,7 @@ if (--inf->pending_execs == 0) /* We're done! */ { + update_thread_list(); #if 0 /* do we need this? */ prune_threads (1); /* Get rid of the old shell threads */ renumber_threads (0); /* Give our threads reasonable names. */ A few observations when building gdb HEAD: GNU gdb (GDB) 7.3.50.20110704-cvs though: 1) I had to uncomment -Werror when compiling gdb/msg_U.c with Debian 4.6.1-1+hurd.1 due to the -Wstrict-aliasing flag set by -Wall, see below: msg_U.c: In function 'msg_del_auth': msg_U.c:505:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c:520:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_get_init_ports': msg_U.c:957:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_set_init_ports': msg_U.c:1050:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_get_init_ints': msg_U.c:1481:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_set_init_ints': msg_U.c:1573:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_get_dtable': msg_U.c:1739:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_set_dtable': msg_U.c:1832:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_get_environment': msg_U.c:2253:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_set_environment': msg_U.c:2345:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_get_env_variable': msg_U.c:2511:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c: In function 'msg_describe_ports': msg_U.c:3018:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] msg_U.c:3083:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] cc1: all warnings being treated as errors 2) When debugging an executable gdb does not find the debugging symbols for libraries. For example with libc0.3-dbg installed, the symbols are found with 7.2 but not with 7.3.50 when running the built gdb directly on an executable having debugging symbols (they are found).