From: klee AT seri DOT re DOT kr (klee) Subject: B19: Gdb bug?(NT 4.0 SP3) 3 Jun 1998 13:22:37 -0700 Message-ID: <000301bd8ec0$65ae51f0$38624b86.cygnus.gnu-win32@leo123.seri.re.kr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit To: Hi, everyone. When I was debugging a program I found a strange behavior of gdb. When I step in, I get "0x... in LM.." Is this the bug of B19 Gdb? I attached screen copy and my program 'sdate.cpp'. Thanks in advance. klee klee AT seri DOT re DOT kr *** Screen copy *** Breakpoint 1, main () at sdate.cpp:51 51 ADate ad(9, 29, 91); (gdb) s 0x40e19f in LM21 () (gdb) s Single stepping until exit from function __5ADateiii, which has no line number information. 0x40e175 in LM25 () (gdb) info stack #0 0x40e175 in LM25 () #1 0x9 in ?? () #2 0x40e1aa in LM21 () #3 0x401129 in main () at sdate.cpp:51 #4 0x10006b89 in _size_of_stack_reserve__ () #5 0x10006b9c in _size_of_stack_reserve__ () #6 0x40d9f6 in cygwin_crt0 () (gdb) s *** my program source *** #include // base class Date class Date { protected: int mo, da, yr; public: Date(int m, int d, int y) { mo = m; da = d; yr = y; } virtual void print() = 0; // virtual function // no definition of this function }; // derived calss ADate class ADate : public Date { public: ADate(int m, int d, int y) : Date(m, d, y) { /* ... */ } void print() { cout << mo << '/' << da << '/' << yr; } }; // derived class BDate class BDate : public Date { public: BDate(int m, int d, int y) : Date(m, d, y) { /* ... */ } void print(); }; // BDate prin function void BDate::print() { static char *mos[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; cout << mos[Date::mo - 1] << ' ' << da << ", " << yr + 1900; } void main() { ADate ad(9, 29, 91); BDate bd(11, 19, 91); Date& dt1 = ad; // reference to ADate Date& dt2 = bd; // reference to BDate dt1.print(); cout << '\n'; dt2.print(); exit(0); } - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".