Mail Archives: djgpp/2002/05/12/12:46:00
> From: "JWV Miller" <jwvm AT umich DOT edu>
> Date: Sun, 12 May 2002 11:16:56 -0400
>
> Take your pick. It fails with all programs. Here is a trivial example:
>
> #include <iostream.h>
>
> int main()
> {
> int a = 1;
> cout << a << endl;
> return 0;
> }
I cannot reproduce the problem, at least not with command-line
compilation and GDB as the debugger (I don't have RHIDE installed, so
I couldn't try that).
What compilation switches did you try to build the program? Did you
actually link it to produce a .exe file, or just compiled the source
into an object file? What debugging switches did you use (like I use
"-gstabs+" in the example below)?
Below is what I tried with this short program. As you see, I can
successfully step through the program line by line.
c:\> gpp -gstabs+ testcpp.cc -o testcpp.exe
c:\> gdb ./testcpp.exe
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-msdosdjgpp"...
(gdb) break main
Breakpoint 1 at 0x15e9: file testcpp.cc, line 5.
(gdb) run
Starting program: d:/usr/djgpp/gnu/eli/rmail/./testcpp.exe
Breakpoint 1, main () at cppt2.cc:5
5 int a = 1;
(gdb) next
6 cout << a << endl;
(gdb) next
1
7 return 0;
(gdb) next
8 }
(gdb) next
0x000051f2 in __crt1_startup ()
at d:/usr/djgpp/lang/cxx-v3/bits/locale_facets.tcc:75
75 const locale::facet* __fp = (*__facet)[__i];
(gdb) next
Program exited normally.
(gdb) q
- Raw text -