From owner-freebsd-threads@FreeBSD.ORG Sun Mar 28 06:47:37 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0F5816A4CE for ; Sun, 28 Mar 2004 06:47:37 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C27943D1D for ; Sun, 28 Mar 2004 06:47:37 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i2SElatf019814; Sun, 28 Mar 2004 09:47:36 -0500 (EST) Date: Sun, 28 Mar 2004 09:47:36 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Niall Douglas In-Reply-To: <406605CC.14911.CD2D006@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: GDB 6.0 and FreeBSD threads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 14:47:37 -0000 On Sat, 27 Mar 2004, Niall Douglas wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I'm nearly finished porting my project to FreeBSD from Linux but I'm > getting a SIGSEGV at odd places in the code. Unfortunately my project > absolutely requires G++ v3.4 as the template support in v3.3 is not > up to par. Hence one has a problem debugging the executable with gdb > <6.0 (it works, but it's flaky). > > I tried compiling gdb 6.0 on FreeBSD and it compiles fine. > Unfortunately it appears to be missing thread support which is most > annoying. After searching around, I've discovered you guys patched > gdb 5.x with uthread.c. > > Here's my question - how much work would be required to getting the > 5.x uthread.c to work with gdb 6.0? Has somebody already done most of > the work (if so, can you supply me with a diff)? I don't need > fantastic support, just enough to help me find this bug (it's weird - > it's almost as though g++ is writing off the end of the stack ie; bad > code generation. Yet surely if that were the case, we'd have the same > SIGSEGV on Linux :( ). Could be the threads have different stack sizes under FreeBSD. Try using a larger stack. No-one has touched uthread support for other GDB's as far as I know. Most work is going in to our other thread libraries. There is work trying to get GDB thread support for libpthread, and that should be here by 5.3-release. -- Dan Eischen