This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

B19: Gdb bug?(NT 4.0 SP3)


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@seri.re.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 <iostream.h>

// 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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]