From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22709 invoked by alias); 21 Oct 2006 03:51:52 -0000 Received: (qmail 22701 invoked by uid 22791); 21 Oct 2006 03:51:52 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Oct 2006 03:51:50 +0000 Received: from localhost ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.61) (envelope-from ) id 1Gb7tk-0003DY-Et for gdb@sourceware.org; Sat, 21 Oct 2006 03:51:48 +0000 Message-ID: <4539992E.626AAE3A@dessent.net> Date: Sat, 21 Oct 2006 03:51:00 -0000 From: Brian Dessent Reply-To: gdb@sourceware.org X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: Why type = ? References: <200610210620.24201.munzirtaha@gmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00167.txt.bz2 "Munzir Taha (???? ??)" wrote: > > Hi, in this small program logic tells me that errno and n should have the same > value displayed in gdb. Am I missing something obvious? You're probably running into the fact that on modern glibc errno is a TLS symbol, not a regular one. This means it can take on a different value in each thread, and thus is accessed through an indirection. You might get better debugging ability if you compile with -ggdb3 instead of just -g, which gives gdb some additional information. I believe that without any debug information in the binary, gdb cannot do anything about TLS symbols, but I'm not sure. See also the proposed patch and/or . Brian