From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29925 invoked by alias); 24 Jul 2002 18:57:47 -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 29917 invoked from network); 24 Jul 2002 18:57:45 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 24 Jul 2002 18:57:45 -0000 Received: from dsl254-114-118.nyc1.dsl.speakeasy.net ([216.254.114.118] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17XRKL-0004EZ-00; Wed, 24 Jul 2002 13:57:38 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17XRKR-0004O0-00; Wed, 24 Jul 2002 14:57:43 -0400 Date: Wed, 24 Jul 2002 11:57:00 -0000 From: Daniel Jacobowitz To: Dan Kegel Cc: Lucy Zhang , gdb@sources.redhat.com Subject: Re: Thread signal information Message-ID: <20020724185743.GA14821@nevyn.them.org> Mail-Followup-To: Dan Kegel , Lucy Zhang , gdb@sources.redhat.com References: <004501ea8fb2$e33da4c0$9a0a0109@zhangl> <20020724160422.GA5346@nevyn.them.org> <3D3EE3D4.9030502@ixiacom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D3EE3D4.9030502@ixiacom.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00255.txt.bz2 On Wed, Jul 24, 2002 at 10:28:52AM -0700, Dan Kegel wrote: > Daniel Jacobowitz wrote: > >On Wed, Jul 24, 2002 at 09:00:43AM -0700, Lucy Zhang wrote: > >>I'm constructing an ELF core dump (conversion from a different formatted > >>dump). I'm trying to add thread information by using a prstatus struct for > >>each thread. I was wondering what should I put for the signal information > >>for each thread. Do I even need this info for threads other than the > >>faulting thread? > > > >Not really. I believe that GDB only recognizes the signal in the first > >listed thread (or it may have been the last listed thread.... there was > >a fix in this area recently, I believe). First listed (faulting) > >certainly makes the most sense, and GDB definitely only cares about one > >thread. > > Does one give up anything by doing a postmortem gdb session > rather than a live session? Obviously one loses the ability to continue, > but what else? Presumably (once we coax the OS into producing the > proper core dump) we still can do 'info threads' and 'backtrace' on > each thread, right? > > (I haven't used core dumps for a long, long time. > Very recently, though, I used a signal handler to do just-in-time > startup of gdbserver to help debug a program running on a 100 node > cluster. If my nodes had hard disks, I'd be more likely to use > coredumps :-) >From a design perspective, in the corefiles we get each thread's registers from the kernel; in live debugging we use thread_db. Given Linux's one-process-one-thread model at present, this has no practical significance. >From a convenience perspective, as Andrew said, you lose inferior function calls. You can't modify memory. Etc. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer