From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9667 invoked by alias); 21 Oct 2006 03:20:08 -0000 Received: (qmail 9655 invoked by uid 22791); 21 Oct 2006 03:20:06 -0000 X-Spam-Check-By: sourceware.org Received: from hu-out-0506.google.com (HELO hu-out-0506.google.com) (72.14.214.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Oct 2006 03:20:03 +0000 Received: by hu-out-0506.google.com with SMTP id 28so700451hug for ; Fri, 20 Oct 2006 20:20:00 -0700 (PDT) Received: by 10.48.162.15 with SMTP id k15mr1622830nfe; Fri, 20 Oct 2006 20:20:00 -0700 (PDT) Received: from amd64-00-0c-76-b4-ad-33.lan ( [86.60.39.155]) by mx.google.com with ESMTP id o53sm187983nfa.2006.10.20.20.19.58; Fri, 20 Oct 2006 20:20:00 -0700 (PDT) From: "Munzir Taha (=?utf-8?q?=D9=85=D9=86=D8=B0=D8=B1?= =?utf-8?q?_=D8=B7=D9=87?=)" To: gdb@sourceware.org Subject: Why type = ? Date: Sat, 21 Oct 2006 03:20:00 -0000 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610210620.24201.munzirtaha@gmail.com> 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/msg00165.txt.bz2 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? # gdb ./testgdb GNU gdb 6.4.90-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) l 1 #include 2 #include 3 4 int main(int argc, char *argv[]) 5 { 6 errno = ENOENT; 7 int n = errno; 8 printf("%d, %d\n", n, errno); 9 return(0); 10 } (gdb) break 8 Breakpoint 1 at 0x80483ba: file testgdb.c, line 8. (gdb) r Starting program: /home/munzir/testgdb warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4 Breakpoint 1, main () at testgdb.c:8 8 printf("%d, %d\n", n, errno); (gdb) p errno $1 = 0 (gdb) p n $2 = 2 (gdb) whatis errno type = (gdb) whatis n type = int -- Munzir Taha Telecommunications and Electronics Engineer Maintainer of Fedora Arabic Translation Project https://listman.redhat.com/mailman/listinfo/fedora-trans-ar Maintainer of the OpenBugs project page at http://www.arabic-fedora.org/munzir/OpenBugs.html Master CIW Designer, ICDL, MOUS, Linux+, LPI 101 Riyadh, SA