This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
varobj/1956: argc is always 0
- From: kernel-stuff at comcast dot net
- To: gdb-gnats at sources dot redhat dot com
- Date: 5 Jun 2005 01:49:17 -0000
- Subject: varobj/1956: argc is always 0
- Reply-to: kernel-stuff at comcast dot net
>Number: 1956
>Category: varobj
>Synopsis: argc is always 0
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 05 01:58:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator: kernel-stuff@comcast.net
>Release: gdb v6.3
>Organization:
>Environment:
AMD64 Gentoo 2005
>Description:
tux-gentoo flowlayout $ gdb ./flowlayout
GNU gdb 6.3
Copyright 2004 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 "x86_64-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x403bf0: file main.cpp, line 34.
(gdb) r 1 2 3 4
Starting program: /home/parag/qt-x11-opensource-4.0.0-rc1-snapshot-20050604/examples/layouts/flowlayout/flowlayout 1 2 3 4
[Thread debugging using libthread_db enabled]
[New Thread 46912531523776 (LWP 13010)]
[Switching to Thread 46912531523776 (LWP 13010)]
Breakpoint 1, main (argc=0, argv=0x7fffffffee38) at main.cpp:34
34 {
(gdb) print argc
$1=0
--------------------------------------------------------
As seen the argc value is wrong as shown by GDB. If I print out argc in the program that works fine.
>How-To-Repeat:
Debug any program. Run with arguments. Check for value of argc - GDB shows it is always 0.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: