On 26 November 2005 16:41, Sven Panne wrote:

> Am Samstag, 26. November 2005 16:46 schrieb Sigbjorn Finne:
>> Have a look at fptools/mk/build.mk.sample
> 
> Well, that doesn't exactly contain what I'm looking for. But anyway,
> I've re-linked the stage 2 compiler by hand with -debug to get at
> least a debug RTS.

GhcStage2HcOpts += -debug

would be the right way to do this.

> What happens when I try to use the stage 2
> compiler then is as follows: 
> 
> ------------------------------------------------
> [EMAIL PROTECTED]:~ >
> gdb /usr/src/packages/BUILD/ghc-6.5/ghc/compiler/stage2/ghc-6.5
> GNU gdb 6.3
> Copyright 2004 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 "i586-suse-linux"...Using host
> libthread_db library "/lib/tls/libthread_db.so.1".
> 
> (gdb) set args  -B/usr/src/packages/BUILD/ghc-6.5 -e 'putStrLn "Hello,
> world..."'
> (gdb) run
> Starting program:
> /usr/src/packages/BUILD/ghc-6.5/ghc/compiler/stage2/ghc-6.5
> -B/usr/src/packages/BUILD/ghc-6.5 -e 'putStrLn "Hello, world..."'
> [Thread debugging using libthread_db enabled] [New Thread -1211717088
> (LWP 6325)] 
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1211717088 (LWP 6325)]
> 0x0896db28 in stg_END_TSO_QUEUE_closure ()
> (gdb) bt
> #0  0x0896db28 in stg_END_TSO_QUEUE_closure ()
> #1  0x0896db28 in stg_NO_TREC_closure ()
> #2  0x00000001 in ?? ()
> #3  0x00000000 in ?? ()
> ...

Very strange indeed.  You should be able to find a smaller program that
fails - GHC itself is rather a large case to debug.  Try running the
testsuite with your stage1 compiler to see if there are any obvious
failures we could investigate.

Which non-default options are you using for your build?  Can you post
your build.mk?

Cheers,
        Simon

Reply via email to