This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Building Insight snapshot on CygWin?


Keith, 

Here is the result of running my "home-baked" gdb/insight on the standard hello world program:

$ cat HelloWorld.c && gcc -g -o HelloWorld.exe HelloWorld.c && ./HelloWorld.exe
#include <stdio.h>

int main(int argc, char **argv) {

        printf ("Hello World!\n");
}

Hello World!

$ /usr/local/bin/gdb HelloWorld.exe
GNU gdb 20030621
Copyright 2003 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 "i686-pc-cygwin"...
(gdb) break main
Breakpoint 1 at 0x4010bc: file HelloWorld.c, line 5.
(gdb) run
Starting program: /home/Administrator/testing/HelloWorld.exe
     58 [main] gdb 2348 handle_exceptions: Error while dumping state (probably corrupted stack)
Segmentation fault (core dumped)


Note that it is gdb segfaulting there, not HelloWorld.  So, any clues there? Am I totally braindead?  

Does insight get compiled with optimization on by default? In any case, I'm reconfiguring with CFLAGS=-g -O0 right now.  I'll post results in a bit.

Kevin Powell

On Mon, 2003-06-23 at 16:15, Kevin Powell wrote:
> configure: error: source directory already configured; run make distclean
> there first
> configure: error:
> /usr/src/insight+dejagnu-20030520/dejagnu/example/calc/configure failed for
> example/calc
> make: *** [configure-dejagnu] Error 1
> 
> re-running make seemed to make this go away.

Sigh. I was under the impression that someone had fixed this.

> make[6]: Entering directory `/usr/src/insight/insight/dejagnu/testsuite/libdejagnu'
> c++ -DPACKAGE=\"dejagnu\" -DVERSION=\"1.4.2\"  -I. -I../../../../insight+dejagnu-20030621/dejagnu/testsuite/libdejagnu      -g -O2 -c ../../../../insight+dejagnu-20030621/dejagnu/testsuite/libdejagnu/unit.cc
> /usr/include/c++/3.2/streambuf: In function `int main(int, char**)':
> /usr/include/c++/3.2/streambuf:416: `std::basic_streambuf<_CharT, _Traits>*
>    std::basic_streambuf<_CharT, _Traits>::setbuf(_CharT*, int) [with _CharT =
>    char, _Traits = std::char_traits<char>]' is protected
> ../../../../insight+dejagnu-20030621/dejagnu/testsuite/libdejagnu/unit.cc:56: within
>    this context
> make[6]: *** [unit.o] Error 1

Of course, this has nothing to do with insight. I would harrass the
dejagnu maintainer about the problems. :-)

> Here's the stackdump:

[snip]

Make sure that you don't build Insight with optimization and run it
under gdb. When the error occurs, gdb will stop the process immediately.
You should have a valid, readable stack backtrace (unless it was
corrupted, of course). Use the distributed gdb to run the "bad" one.

BTW, can you describe what you're doing to crash it? (aka: test case).
Although I have not extensively tested on cygwin in a while, I do some
basic sanity checking, debugging insight with insight.

> I guess that to build my own, I need whatever makes the standard GDB into a cygwin-special gdb.

There is no difference of which I am aware. I think it's just
nomenclature.

I guess I'm just lucky? I still cannot reproduce any of these cygwin
errors (the Win98 and dejagnu problems excepted). Argh. I think this is
at least as frustrating for me as it is for everyone else. :v(

Keith

PS. If you're using CVS snapshots/CVS HEAD: make sure you get my patch
to src/Makefile.in. There was a small configury error which I never saw
because I had installed versions of insight (and tcl, tk, itcl, etc)
available. When configuring the gdb directory, make sure that "looking
for private itcl headers"-like stuff comes from the src directory and
not some random package on the system.



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