🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10230

bug(?) report

#10230
From: ha
Date: Wed, 01 Nov 1989 17:12
34 lines
1526 bytes
I am using gdb version 3.3 on Sun 3/50 running SunOS 4.0.

If I compile a program with `cc' and debug it with `gdb', I can't
step over library function calls using the `next' command, nor can
I use library functions while evaluating expressions within gdb
(with `print' or `set' commands). If the program is compiled with
`gcc,' however, the above problems go away. 

When I issue the `next' command to step over a `printf' call, gdb
steps into `etext().' When I use a library function, say `memcpy'
(which is linked into the object code), it complains that `memcpy' 
symbol is not in current context.

Try this experiment with the following program. Try stepping over
the last two statements, and try the command `set memcpy(b, a, 12)'
from within gdb.

#include <memory.h>
main()
{
  int a[3], b[3]; 

  a[0] = 0;
  a[1] = 1;
  a[2] = 2;

  memcpy(b, a, 3*sizeof(int));
  printf("b = {%d, %d, %d}\n", b[0], b[1], b[2]);

} 

-- Hira.
   ha@cs.purdue.edu
Technical Details
Message-ID: <8911011712.AA26560@serc3.cs.purdue.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CS.PURDUE.EDU!ha

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,ea4d95cf51c139b0,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1989-11-02 05:31:25 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CS.PURDUE.EDU!ha
From: ha@CS.PURDUE.EDU
Newsgroups: gnu.gdb.bug
Subject: bug(?) report
Message-ID: <8911011712.AA26560@serc3.cs.purdue.edu>
Date: 1 Nov 89 17:12:40 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 34
Posted: Wed Nov  1 18:12:40 1989