🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10081

GDB 3.5 gets seriously confused on Sparc+SunOS 4.03

#10081
From: rfg
Date: Fri, 20 Jul 1990 11:22
93 lines
4199 bytes
Is anybody else getting this problem with GDB 3.5 on a Sparc under
SunOS 4.03?

This seems to occur regardless of whether or not gdb itself was compiled
with Sun's C compier (without optimization) or with gcc (with optimization).
It also seems to be independent of the compiler used to compile the
program being debugged (in this example, that happens to be GNU Make 3.58).
I believe that I have now seen this irritating behavior when debugging
both programs compiled with Sun's C compiler and when debugging programs
compiled with GCC (target is Sparc+SunOS 4.03 in all cases).

Once you get to the point where GDB thinks that you are at etext() you
can never recover.  You must exit GDB and start over completely.

Any clues would be appreciated.

Note that I have included enough information to reproduce this problem.
In particular, the typescript file shows the contents of the (short) file 
called `test.mk' which I was using as the input file for my debugging run
of GNU Make 3.58.  (And by the way, `test.mk' demonstrates a bug in
GNU Make 3.58 which causes commands to be printed but not executed.)

(NOTE:  The Surgeon General has determined that the presence of bugs in your
 debugger can cause premature hair loss due to tearing.)

// Ron Guilmette
// C++ Entomologist
// Internet: rfg@ncd.com      uucp: ...uunet!lupine!rfg
// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.

-----------------------------------------------------------------------------
Script started on Fri Jul 20 12:09:46 1990
hansen> nl -ba test.mk
     1	MFLAGS='Xn'
     2	
     3	all:
     4		/bin/echo hello world
hansen> gdb ./make
GDB 3.5, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /u6/rfg/gnu/make/build/sparc/3.58.0/make...done.
Type "help" for a list of commands.
(gdb) r -v
Starting program: /u6/rfg/gnu/make/build/sparc/3.58.0/make -v
GNU Make version 3.58, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.


Program exited normally.
(gdb) b start_job
Reading in symbols for job.c... and commands.c... and glob.c...done.
Breakpoint 1 at 0x4fd0: file job.c, line 412.
(gdb) r -f test.mk
Starting program: /u6/rfg/gnu/make/build/sparc/3.58.0/make -f test.mk

Bpt 1, start_job (child=(struct child *) 0x20) (job.c line 412)
412	{
(gdb) n
420	  if (child->command_ptr == 0 || *child->command_ptr == '\0')
(gdb) n
422	    if (child->file->cmds->command_lines[child->command_line] == 0)
(gdb) n
436		     child->file);
(gdb) n
440	  recursive = child->file->cmds->lines_recurse[child->command_line - 1];
(gdb) n
444	  end = child->command_ptr;
(gdb) n
445	  while (*end != '\0')
(gdb) n
447	      p = index (end, '\n');
(gdb) n
0x20108 in etext ()
(gdb) n
Current function has no line number information.
Single stepping until function exit.
0xf77acde0 in ?? ()
(gdb) n
Current function has no line number information.
No data available on pc function.
(gdb) n
Current function has no line number information.
No data available on pc function.
(gdb) quit
The program is running.  Quit anyway? (y or n) y
hansen> ^D
script done on Fri Jul 20 12:11:43 1990
Technical Details
Message-ID: <12588.648501770@hansen>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ncd.com!rfg

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,6c0c961812334f15,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-07-20 13:55:59 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ncd.com!rfg
From: rfg@ncd.com
Newsgroups: gnu.gdb.bug
Subject: GDB 3.5 gets seriously confused on Sparc+SunOS 4.03
Message-ID: <12588.648501770@hansen>
Date: 20 Jul 90 11:22:50 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: rfg@ncd.com
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 93
Posted: Fri Jul 20 12:22:50 1990