delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/12/12:46:00

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Sun, 12 May 2002 19:42:14 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: jwvm AT umich DOT edu
Message-Id: <2593-Sun12May2002194214+0300-eliz@is.elta.co.il>
X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9
Cc: djgpp AT delorie DOT com
In-reply-to: <002101c1f9c8$0e1f43f0$a4b576cc@ATHLON> (jwvm@umich.edu)
Subject: Re: Debugging Problem with win2k
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020512083022 DOT 329F-100000 AT is> <002101c1f9c8$0e1f43f0$a4b576cc AT ATHLON>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019