From jin@iss-p5.lbl.gov Fri Aug 27 17:25:55 1999
Return-Path: <jin@iss-p5.lbl.gov>
Received: from iss-p5.lbl.gov (iss-p5.lbl.gov [131.243.2.30])
	by hub.freebsd.org (Postfix) with ESMTP id 937AB14BDC
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 27 Aug 1999 17:25:53 -0700 (PDT)
	(envelope-from jin@iss-p5.lbl.gov)
Received: (from jin@localhost)
	by iss-p5.lbl.gov (8.9.3/8.9.3) id RAA02316;
	Fri, 27 Aug 1999 17:25:50 -0700 (PDT)
	(envelope-from jin)
Message-Id: <199908280025.RAA02316@iss-p5.lbl.gov>
Date: Fri, 27 Aug 1999 17:25:50 -0700 (PDT)
From: Jin Guojun (FTG staff) <jin@iss-p5.lbl.gov>
Reply-To: jin@iss-p5.lbl.gov
To: FreeBSD-gnats-submit@freebsd.org
Subject: gdb reports wrong info
X-Send-Pr-Version: 3.2

>Number:         13427
>Category:       gnu
>Synopsis:       gdb reports wrong info
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 27 17:30:01 PDT 1999
>Closed-Date:    Mon Jan 21 13:49:07 PST 2002
>Last-Modified:  Thu Jan 31 02:10:02 PST 2002
>Originator:     Jin Guojun (FTG staff)
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
>Environment:

	3.2-RELEASE with gdb 4.18

>Description:

% gdb timidity
GNU gdb 4.18
Copyright 1998 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 "i386-unknown-freebsd"...
(gdb) l
518              }
519       close_file(fp);
520       return 0;
521     }
522     #ifdef __WIN32__
523     int __cdecl main(int argc, char **argv)
524     #else
525     int main(int argc, char **argv)
526     #endif
527     {
(gdb) b 698
Breakpoint 1 at 0x804a7a3: file timidity.c, line 698.
(gdb) run ~/music/club.MID
Starting program: /tmp/timidity-0.2i/timidity ~/music/club.MID
argc = 2, optind = 1

Breakpoint 1, main (argc=-1077945350, argv=0xbfbfdc26) at timidity.c:699
699             fprintf(stderr, "argc = %d, optind = %d\n", argc, optind);
(gdb) p argc
$1 = -1077945350
(gdb) n
argc = 2, optind = 1
700       if (optind<argc)
(gdb) p optind
$2 = 1
(gdb) p argc
$3 = -1077945350
(gdb) display optind
1: {<data variable, no debug info>} (void *) 0x805db78 = 1
(gdb) display argc
2: argc = -1077945350
(gdb) 


>How-To-Repeat:

	

>Fix:
	
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Mon Jul 10 02:49:43 PDT 2000 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=13427 
Responsible-Changed-From-To: obrien->freebsd-bugs 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Mon Sep 10 09:25:06 PDT 2001 
Responsible-Changed-Why:  
I am not the maintainer. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=13427 
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Mon Jan 21 13:16:05 PST 2002 
State-Changed-Why:  

Does this problem still exist in more recent FreeBSD releases? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=13427 
State-Changed-From-To: feedback->closed 
State-Changed-By: iedowse 
State-Changed-When: Mon Jan 21 13:49:07 PST 2002 
State-Changed-Why:  

Mail to submitter bounces. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=13427 

From: Sheldon Hearn <sheldonh@starjuice.net>
To: Giorgos Keramidas <keramida@FreeBSD.org>
Cc: iedowse@FreeBSD.org, bug-followup@freebsd.org
Subject: Re: gnu/13427: gdb reports wrong info 
Date: Thu, 31 Jan 2002 12:09:59 +0200

 On Tue, 22 Jan 2002 06:15:03 +0200, Giorgos Keramidas wrote:
 
 > > Does this problem still exist in more recent FreeBSD releases?
 > 
 > Yes, on -CURRENT built on Jan 12 (I 've been lazy updating my CURRENT
 > box) and on a fresh installation of 4.4-RELEASE I did this afternoon,
 > the bug is still there.  The information printed for the current stack
 > frame by gdb(1) is wrong, in programs compiled with -ggdb.
 > 
 > I'm trying to find out why this happens on my machine, and I've
 > contacted Rexpixel <gmh003532@brfmasthugget.se> (who frequents that
 > IRC channel) with today's tests and results.
 > 
 > Can we leave this open for a while?
 
 The PR doesn't need to remain open if it's the same problem as PR 24132,
 which is open and assigned to a willling GDB maintainer.
 
 Ciao,
 Sheldon.
>Unformatted:
