From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18859 invoked by alias); 3 Jun 2003 22:09:20 -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 18842 invoked from network); 3 Jun 2003 22:09:20 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 3 Jun 2003 22:09:20 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19NJyi-00011d-00; Tue, 03 Jun 2003 17:10:00 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19NJxw-00024i-00; Tue, 03 Jun 2003 18:09:12 -0400 Date: Tue, 03 Jun 2003 22:09:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com, libc-alpha@sources.redhat.com Subject: Amusing problem in current libthread_db Message-ID: <20030603220912.GA7922@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com, libc-alpha@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00040.txt.bz2 In recent versions of libthread_db, there's this interesting code: td_err_e td_thr_getgregs (const td_thrhandle_t *th, prgregset_t gregs) { struct _pthread_descr_struct pds; LOG ("td_thr_getgregs"); if (th->th_unique == NULL) { /* No data yet. */ memset (gregs, '\0', sizeof (prgregset_t)); return TD_OK; } So, if we don't have a th_unique, claim to have no registers. So for the first thread, until the thread manager is initialized [for LinuxThreads at least - is it initialized earlier in NPTL?], we claim that all registers are zero. GDB loads the registers during this interval. So it thinks the PC is zero. Anyone know the reason for this change, which appears to have come in with: date: 2002/07/16 03:35:49; author: drepper; state: Exp; lines: +7 -0 Some more changes to handle TLS-enabled libpthread. It doesn't seem to cause any problems, which baffles me just a little bit. I'm still trying to figure that part out. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer