From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15751 invoked by alias); 8 Feb 2002 16:16:43 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 15550 invoked from network); 8 Feb 2002 16:16:34 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 8 Feb 2002 16:16:34 -0000 Received: from cse.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id IAA10384; Fri, 8 Feb 2002 08:16:29 -0800 (PST) Received: (from kev@localhost) by cse.cygnus.com (8.11.6/8.11.6) id g18GExY09769; Fri, 8 Feb 2002 09:14:59 -0700 Date: Fri, 08 Feb 2002 08:16:00 -0000 From: Kevin Buettner Message-Id: <1020208161459.ZM9768@localhost.localdomain> In-Reply-To: Bill Bland "Debugging threaded console-based program" (Feb 8, 12:09pm) References: X-Mailer: Z-Mail (4.0.1 13Jan97 Caldera) To: Bill Bland , gdb mailing list Subject: Re: Debugging threaded console-based program MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-02/txt/msg00136.txt.bz2 On Feb 8, 12:09pm, Bill Bland wrote: > I'm trying to use gdb to find out more about a program whose > source I don't have (and I have no way of getting). The program is > multi-threaded which causes problems for me if I run it in one terminal > and use gdb in another terminal to attach to it. This means that I want > to start the program from inside gdb. > Unfortunately since the program is console-based it is very difficult to > see what's going on with the program's and gdb's output going to the same > terminal. Could anyone suggest a way around this? You didn't say which platform you're trying it on. If it's GNU/Linux, there have been a number of recent fixes in the development sources with regard to being able to attach to a multi-threaded program. If you haven't done so already, you might want to fetch and build a copy of the developement sources. Otherwise, you should provide us with more information so that we can try to fix the problem in GDB. See http://sources.redhat.com/gdb/current/ . Kevin