[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1
From: |
Peter Dyballa |
Subject: |
Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1 |
Date: |
Tue, 25 Jul 2006 23:14:44 +0200 |
Am 25.07.2006 um 14:15 schrieb Nick Roberts:
If my understanding of (old) C still stands, d is a local variable
inside the function's body. At line #556 a 'print d' tells:
$1 = {<text variable, no debug info>} 0x901aea38 <d>
That's odd because your previous post said you got 527076.
Before I was working in Apple's Terminal. Then more details were
demanded by RMS, so I needed to see the sources. The only solution
that came to my mind was gdb in Emacs.app. And it has different
geometry ... ?
No. What value does the GDB command `finish' print if starting from
extract_float,
(gdb) step
extract_float (num=2) at floatfns.c:219
(gdb) finish
Run till exit from #0 extract_float (num=2) at floatfns.c:219
Breakpoint 2, extract_float (num=4216608) at floatfns.c:220
(gdb) finish
Run till exit from #0 extract_float (num=4216608) at floatfns.c:220
0x001f27dc in Fsqrt (arg=4216608) at floatfns.c:556
Value returned is $7 = 527076
(gdb) finish
Run till exit from #0 0x001f27dc in Fsqrt (arg=4216608) at
floatfns.c:556
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/
operand.
0x001f2828 in Fsqrt (arg=4216608) at floatfns.c:561
or equivalently, what do you get if you type `print d'
after
556 double d = extract_float (arg);
Breakpoint 1, Fsqrt (arg=4216608) at floatfns.c:556
(gdb) print d
$5 = 7.1699012343114344e-308
i.e at
561 IN_FLOAT (d = sqrt (d), "sqrt", arg);
(gdb) n
Fsqrt (arg=4216608) at floatfns.c:561
(gdb) print d
$1 = 527076
(gdb) fin
Run till exit from #0 Fsqrt (arg=4216608) at floatfns.c:561
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/
operand.
0x001f2828 in Fsqrt (arg=4216608) at floatfns.c:561
(gdb) print d
$2 = 527076
What happens if you start Emacs as a graphical application and
evaluate
(sqrt 527076) in the scratch buffer?
pete 317 /\ ./emacs -Q --debug-init
Fatal error (4)Illegal instruction
Between these two lines I let the X client compute the square root --
after some seconds it crashed!
The GCC docs say about -mpowerpc-gpopt:
The -mpowerpc option allows GCC to generate instructions that are
found only in the 32-bit subset of the PowerPC architecture.
Specifying -mpowerpc-gpopt implies -mpowerpc and also allows GCC to
use the optional PowerPC architecture instructions in the General
Purpose group, including floating-point square root. Specifying -
mpowerpc-gfxopt implies -mpowerpc and also allows GCC to use the
optional PowerPC architecture instructions in the Graphics group,
including floating-point select.
Freescale documents:
The MPC7447A processor is a high-performance, low-power, 32-bit
implementation of the PowerPC™ RISC architecture. Key architectural
features include 512 KB of on-chip L2 cache, a 64-bit bus interface
and a full 128-bit implementation of Freescale's AltiVec™
technology. MPC7447A processors are ideal for leading-edge computing,
embedded network control and signal processing applications.
Superscalar Microprocessor
MPC7447A processors feature a high-frequency superscalar PowerPC
core, capable of issuing four instructions per clock cycle (three
instructions plus one branch) into 11 independent execution units:
• Four integer units (three simple plus one complex)
• Double-precision floating point unit
• Four AltiVec technology units (simple, complex, floating and
permute)
• Load/store unit
• Branch processing unit
Since leaving away -mpowerpc-gpopt leads to an executable that runs
without windows it must be either a bug in the (Apple) compiler or in
my hardware, isn't it? (Configuring with the Fink supplied tools gcc
4.1.0, autoconf 2.60, automake 1.9 does not seem to work.)
--
Greetings
Pete
Math illiteracy affects 7 out of every 5 Americans.
- Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/23
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/24
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/24
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/24
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Nick Roberts, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1,
Peter Dyballa <=
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Nick Roberts, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, YAMAMOTO Mitsuharu, 2006/07/25
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/26
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/26
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/27
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Peter Dyballa, 2006/07/27
- Re: Crash when launched -nw on Mac OS X, compiled with gcc 4.0.1, Richard Stallman, 2006/07/25