On Sun, Sep 22, 2002 at 08:10:38PM +0200, Alexander Leidinger wrote:
> What about a "ktrace -i": http://www.leidinger.net/ktrace.out.bz2
> (~50k), please tell me when you got it, I want to remove it then.


What you want to do is, figure out exactly which program is crashing.
Add -v to your gcc flags, eg.

gcc -v -march=pentium-pro -c a.c

This will show you which programs are being invoked by gcc, which 
do the actual compiling.

For example,
===============================================================================
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.2.1 [FreeBSD] 20020901 (prerelease)
 /usr/libexec/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL
__=1 -D__GXX_ABI_VERSION=102 -D__FreeBSD__=5 -D__FreeBSD_cc_version=500003 -Duni
x -D__KPRINTF_ATTRIBUTE__ -D__FreeBSD__=5 -D__FreeBSD_cc_version=500003 -D__unix
__ -D__KPRINTF_ATTRIBUTE__ -D__unix -Asystem=unix -Asystem=bsd -Asystem=FreeBSD
-D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D
__i386__ -D__ELF__ a.c -quiet -dumpbase a.c -march=pentium-pro -version -o /var/
tmp//ccqHiDhs.s
GNU CPP version 3.2.1 [FreeBSD] 20020901 (prerelease) (cpplib) (i386 FreeBSD/ELF)
===============================================================================

The next thing you want to do is, invoke /usr/libexec/cc1 (or whatever
the program is on your system), manually from the command-line, with
all the same command-line flags, and verify that the crash still occurs.

The next thing you want to do is to invoke the same program under
gdb:

gdb /usr/libexec/cc1

==============================================================================
GNU gdb 5.2.0 (FreeBSD) 20020627
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-undermydesk-freebsd"...
(no debugging symbols found)...

(gdb) run [put all the command-line flags to cc1]
==============================================================================

>From there, you should be able to see what the backtrace is to where
things are crashing.

Another helpful thing to do is to follow the instructions at:
http://gcc.gnu.org/bugs.html, and use the -save-temps flag to 
save the preprocessed source code of what is causing gcc to crash.
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to