delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/11/10/11:15:04

From: Martin Str|mberg <ams AT speedy DOT ludd DOT luth DOT se>
Subject: Re: i686-pc-msdosdjgpp-g++ problems (long)
Newsgroups: comp.os.msdos.djgpp
References: <lrplsuounbjm9n878rvu4e4sobqofcu437 AT 4ax DOT com> <aqfvt3$6t$1 AT antares DOT lu DOT erisoft DOT se> <taunsusrk60vfe987b0a0ncp0u2cqkh7of AT 4ax DOT com> <1036779663 DOT 158618 AT queeg DOT ludd DOT luth DOT se> <1h6osuka51oan46817ptm2o1loq3k6fqm7 AT 4ax DOT com> <200211082039 DOT gA8Kdck00835 AT envy DOT delorie DOT com> <c5aosuktk341qeu7fj7gj8954a32ktpk1a AT 4ax DOT com> <1036845028 DOT 195290 AT queeg DOT ludd DOT luth DOT se> <si3qsugank9hsrjrig0m72dne3rb8gm6hj AT 4ax DOT com>
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (NetBSD/1.5_BETA (alpha))
Message-ID: <1036944551.298873@queeg.ludd.luth.se>
Cache-Post-Path: queeg.ludd.luth.se!unknown AT speedy DOT ludd DOT luth DOT se
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
Date: 10 Nov 2002 16:09:11 GMT
Lines: 69
NNTP-Posting-Host: queeg.ludd.luth.se
X-Trace: 1036944551 news.luth.se 7337 130.240.16.109
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Charles Wilkins <chas AT pcscs DOT com> wrote:
: -========================-
: Gdb stuff:
: -========================-

: Here is the output of using gdb on welcome.exe
: compiled with djgpp-g++ -g welcome.cpp -o welcome.exe

: gdb welcome.exe

: (gdb) list
: 1        welcome.cpp: No such file or directory (ENOENT).
:         in welcome.cpp
: (gdb)

: (gdb) run
: Starting program: c:/Archives/RIP2/DJGPP/bin/welcome.exe

: Program received signal SIGSEGV, Segmentation fault.
: 0x0001f47f in std::ostream::sentry::sentry(std::ostream&) ()
: (gdb)

: not exactly a productive gdb session...
: any suggestions to get more information?

: Here is the output of using gdb on welcome.exe (no -g)
: compiled with djgpp-g++ welcome.cpp -o welcome.exe

: (gdb) list
: 1        globals.cc: No such file or directory (ENOENT).
:         in globals.cc
: (gdb)
: (gdb) run
: Starting program: c:/Archives/RIP2/DJGPP/bin/welcome.exe

: Program received signal SIGSEGV, Segmentation fault.
: 0x0001f47f in std::ostream::sentry::sentry(std::ostream&) ()
: (gdb)

Ok. Now do "br 0x0001f47f" or "br *0x0001f47f" (I forget the exact
syntax) and "run". Now you should stop just before the crash. Examine
the registers and figure out what's wrong. Do "disass 0x0001f47f" or
"disass *0x0001f47f" to see the exact machine instruction that
crashes. ("objdump -d welcome.exe should be able to do that as well.)

Get the C++ file that contains that
std::ostream::sentry::sentry(std::ostream&) () and add it to the
compile line after welcome.cpp. Now you might get the source
displayed.

: Note that globals.cc is a source file in the libstdc++-v3 source tree.
: The very first include directive in this file is #include
: "bits/c++config.h"  Notice the c++ in the name.  Unlike the DOS
: releases of DJGPP where this same file would be "bits/cxxconfig.h"

It's usually no good to "list" anything until having "run" and
stopping on a break point. Just because what runs first is startup
code which usually hasn't been compiled with debug information. Its
source code isn't available anyway if you don't make it available in
some way. That's what that adding on compile line and copying is
supposed to try to do.


Are your testings done in plain DOZE?


Right,

						MartinS

- Raw text -


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