🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #177

queer GDB 4.6 behaviour on DECstation 5000 and Sparc 2

#177
From: Nicholas Tan
Date: Tue, 11 Aug 1992 06:16
34 lines
1410 bytes
I have installed gcc 2.2.2, libg++ 2.2, gdb 4.6, and Emacs 18.58.  I compiled my
programs and everything behaved fine.  I invoked gdb, and that's when I noticed
something wrong.  When I invoke gdb (inside or outside emacs) and step into a
'new' statement, instead of stepping through the code, gdb continues running
until the next breakpoint or the end of the program.  The program below
illustrates this behaviour.  I would appreciate someone's help on this.
Thank you.

p.s.  The behaviour was similar on a DECstation 5000/120 and a Sparc 2

-------------------------------------------------------------------------------

// -*- Mode:C++ -*-

#include <stdio.h>


class A
{
    private:
	char val;
    public:
	A(char ch = 'a') { this->val = ch; }
	char value() { return this->val; }
};


int main()
{
	A *a = new A;	// issuing a 'step' here causes gdb to 'cont' instead
	printf("a's value: %c\n", a->value());

	return 0;
}
Technical Details
Message-ID: <1992Aug11.141608@iti.gov.sg>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!iti.gov.sg!nicholas

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!iti.gov.sg!nicholas
From: nicholas@iti.gov.sg (Nicholas Tan)
Subject: queer GDB 4.6 behaviour on DECstation 5000 and Sparc 2
Message-ID: <1992Aug11.141608@iti.gov.sg>
Sender: gnulists@ai.mit.edu
Organization: Information Technology Institute, National Computer Board, S'pore
Distribution: gnu
Date: Tue, 11 Aug 1992 06:16:08 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 39