From: "Munzir Taha (منذر طه)" <munzirtaha@gmail.com>
To: gdb@sourceware.org
Subject: Why type = <data variable, no debug info>?
Date: Sat, 21 Oct 2006 03:20:00 -0000 [thread overview]
Message-ID: <200610210620.24201.munzirtaha@gmail.com> (raw)
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 <errno.h>
2 #include <stdio.h>
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 = <data variable, no debug info>
(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
next reply other threads:[~2006-10-21 3:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-21 3:20 Munzir Taha (منذر طه) [this message]
2006-10-21 3:51 ` Brian Dessent
2006-10-21 4:44 ` Munzir Taha (منذر طه)
2006-10-21 5:13 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200610210620.24201.munzirtaha@gmail.com \
--to=munzirtaha@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox