🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Paul Vaughan Fri, 11 Dec 1992 23:09
print object fails
#553
Author: Paul Vaughan
Date: Fri, 11 Dec 1992 23:09
46 lines
1576 bytes
Setting print object on does not accomplish anything for me. Does it
work? I searched in the manual for "print object" and found no
disclaimers.

This is gdb 4.7 on a Sun Sparc 2 (both host and target), SunOS 4.1,
SUN CC compiled program under test, with help from cback version 2.05.

There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.7, Copyright 1992 Free Software Foundation, Inc...
(gdb) break fiz
Breakpoint 1 at 0x22ec: file trash.cc, line 20.
(gdb) run
Starting program: /home/vaughan/trilogy/engine/src/trash 

Breakpoint 1, fiz (b=0xf7fff8c4) at trash.cc:20
(gdb) set print object on
(gdb) show print object
Printing of object's derived type based on vtable info is on.
(gdb) print b
$1 = (struct Base *) 0xf7fff8c4            <------------ shouldn't this be Foo*?

--------------------------------trash.cc----------------------------------------
class Base {
public:
	virtual void fuz(int);
};


class Foo : public Base {
public:
	virtual void fuz(int);
};

void fiz(Base*);

void main () { 
	Foo foo;
	fiz(&foo);
}

void fiz(Base* b) {
	b->fuz(3);
}

void Base::fuz(int) {}
void Foo::fuz(int) {}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads