From keramida@ceid.upatras.gr  Sat Jun 23 12:49:57 2001
Return-Path: <keramida@ceid.upatras.gr>
Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5])
	by hub.freebsd.org (Postfix) with ESMTP id 753B137B401
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 23 Jun 2001 12:49:56 -0700 (PDT)
	(envelope-from keramida@ceid.upatras.gr)
Received: from hades.hell.gr (patr530-a210.otenet.gr [212.205.215.210])
	by mailsrv.otenet.gr (8.11.1/8.11.1) with ESMTP id f5NJnnx16015;
	Sat, 23 Jun 2001 22:49:49 +0300 (EEST)
Received: (from charon@localhost)
	by hades.hell.gr (8.11.4/8.11.3) id f5NHNWv03578;
	Sat, 23 Jun 2001 20:23:32 +0300 (EEST)
	(envelope-from keramida@ceid.upatras.gr)
Message-Id: <20010623202331.A3506@hades.hell.gr>
Date: Sat, 23 Jun 2001 20:23:31 +0300
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: jms@geriatrix.circlesquared.com
Cc: freebsd-gnats-submit@FreeBSD.org
In-Reply-To: <200101072035.f07KZA708908@freefall.freebsd.org>; from jms@geriatrix.circlesquared.com on Sun, Jan 07, 2001 at 12:35:10PM -0800
Subject: Re: gdb output is wrong (same as #13427 ?)
References: <200101072035.f07KZA708908@freefall.freebsd.org>

>Number:         28374
>Category:       misc
>Synopsis:       Re: gdb output is wrong (same as #13427 ?)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 23 12:50:04 PDT 2001
>Closed-Date:    Wed Jan 30 05:08:25 PST 2002
>Last-Modified:  Wed Jan 30 05:09:12 PST 2002
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 On Sun, Jan 07, 2001 at 12:35:10PM -0800, jms@geriatrix.circlesquared.com wrote:
 
 > >How-To-Repeat:
 > cc -g then gdb the following
 
     void do_chunk (char *p, unsigned long sequence, unsigned long length,
  		   unsigned sadd, unsigned short sport, unsigned dadd,
  		   unsigned short dport)
     {
     }
     
     int main (void)
     {
  	    do_chunk("ha ha", 1, 2, 3, 4, 5, 6);
     }  
 
 I tested this on a -CURRENT system (compiled from sources of Tue Jun 19)
 which is running gdb 4.18, and it seems to have the same problem.
 
 An interesting thing is that if I compile with `gcc -O -ggdb' the problem
 seems to go away:
 
     % gcc -O -ggdb lala.c
 
     % gdb a.out
 
     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) b main
     Breakpoint 1 at 0x804849a: file lala.c, line 10.
     (gdb) r
     Starting program: /home/charon/freebsd/a.out 
     
     Breakpoint 1, main () at lala.c:10
     10              do_chunk("ha ha", 1, 2, 3, 4, 5, 6);
     (gdb) s
     do_chunk (p=0x80484ef "ha ha", sequence=1, length=2, sadd=3, sport=4, dadd=5,
     dport=6) at lala.c:6
     6       }
     (gdb) quit
     The program is running.  Exit anyway? (y or n) y
 
 It must be something with the code that GCC generates when -O is not used,
 that messes up the idea gdb has about the stack :/
 
 -giorgos
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: greid 
Responsible-Changed-When: Mon Jul 2 11:30:50 PDT 2001 
Responsible-Changed-Why:  
Misfiled; should be part of the audit trail of 24132 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28374 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Wed Jan 30 05:08:25 PST 2002 
State-Changed-Why:  
Referenced from misc/24132, which has been assigned to the maintainer. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28374 
>Unformatted:
