🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #783

Maybe bug in gdb-3.1

#783
From: Shinichirou Sugou
Date: Sun, 14 May 1989 06:12
65 lines
1967 bytes
Dear FSF people:

My system is Sun3/60 with OS3.4, gdb-3.1, and gcc-1.34.  'finish' command
doesn't work fine in some situation (it is ok in gdb-2.8.1).

The example program and shell logging record are appended to the last of this
letter.

Please try to set breakpoint at the function 'bar' and run program.  When
progrm stops at the head of 'bar', invoke finish.

----------beginning of example program----------------
#include	<stdio.h>

typedef enum { ok, error } e_fv;

e_fv
bar()
{
   return error;
}

void
foo()
{
   if (bar() != ok)
      (void)printf("error");
}

void
main()
{
   foo();
}
--------end of example program-------------------------

----------beginning of shell logging---------------
shin% !gcc
gcc -g tmp.c -o tmp
shin% gdb tmp
Reading symbol data from /mnt1/usr/usr1/shin/tmp/tmp...done.
(gdb) b bar
Breakpoint 1 at 0x20a4: file tmp.c, line 8.
(gdb) run
Starting program: /mnt1/usr/usr1/shin/tmp/tmp 

Bpt 1, bar () (tmp.c line 8)
8	   return error;
(gdb) finish
Run till exit from #0  bar () (tmp.c line 8)
0x20ba in foo () (tmp.c line 14)
14	   if (bar() != ok)
ptrace: I/O error.
Cannot read memory: address 0x1 out of bounds.
(gdb)
---------end of shell logging--------------

CAUTION: Reply-command supplied by your mail system may NOT generate
         my address correctly.
         Please use the following address instead.

         shin%sgtp.apple.juice%lkbreth.foretune.junet@uunet.uu.net

---
  Shinichirou Sugou   shin%sgtp.apple.juice%lkbreth.foretune.junet@uunet.uu.net
Technical Details
Message-ID: <8905140612.AA03710@sgtp.apple.juice>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!sgtp.apple.juice!shin

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!sgtp.apple.juice!shin
From: shin@sgtp.apple.juice (Shinichirou Sugou)
Newsgroups: gnu.gdb.bug
Subject: Maybe bug in gdb-3.1
Message-ID: <8905140612.AA03710@sgtp.apple.juice>
Date: 14 May 89 06:12:53 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 65