🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2478

Don't compile gdb 3.1 with gcc 1.34!

#2478
From: Ron Guilmette
Date: Wed, 29 Mar 1989 19:55
55 lines
2449 bytes
I have just learned that it is *not* a good idea to use GCC 1.34
to compile GDB 3.1 (or GDB 3.1.1 from yahi for G++ fans).

Now I realize that the Makefile for GDB 3.1 invokes the "native"
/bin/cc command for compilations, but the Makefile for GDB 3.1.1
which I got from yahi.stanford.edu invokes GCC instead.

After trying 4 permutations, I have learned that on a Sun3 (using
SunOS 3.5) the compilation of either GDB 3.1 or GDB 3.1.1 with
GCC 1.34 causes the resulting program to malfunction, while
compiling either of these with the Sun (native) C compiler
causes the resulting GDB's to work correctly.

The specific bug which shows up in a GCC-compiled GDB is that
you cannot get the debugger to STOP when you type a control/C
(i.e. SIGINT).  The programm being debugged just keeps on running
as though nothing had happened.

As far as I could tell, this has something to do with the variable
"immediate_quit" not getting set.  When you type a control/C, you
are forced into the "quit()" routine in GDB, but if the "immediate_quit"
variable is not set, basically nothing happens.

If someone wants to look into this problem, it may help to have a little
program to test the debugger on, while trying to get control/C to
work.  I used the following small program which just keeps looping
for awhile (but not forever), while slowly printing out asterisks.

Until this problem is fixed, GDB 3.1.x should be compiled with the
"native" compiler on a Sun3.

--------------------------------------------------------------------
#include <stdio.h>

int k, l;

int main ()
{
	int i, j;

	for (i = 0; i < 50; i++) {
		for (j = 0; j < 200000; j++) {
			k = l + i + j;
		}
		printf ("%s", "*");
		fflush (stdout);
	}
}
---------------------------------------------------------------------

// Ron Guilmette  -  MCC  -  Experimental (parallel) Systems Kit Project
// 3500 West Balcones Center Drive,  Austin, TX  78759  -  (512)338-3740
// ARPA: rfg@mcc.com
// UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg
Technical Details
Message-ID: <8903291955.AA27964@riunite.aca.mcc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MCC.COM!rfg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MCC.COM!rfg
From: rfg@MCC.COM (Ron Guilmette)
Newsgroups: gnu.gcc.bug
Subject: Don't compile gdb 3.1 with gcc 1.34!
Message-ID: <8903291955.AA27964@riunite.aca.mcc.com>
Date: 29 Mar 89 19:55:18 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 55