emulator rebuilt by GCC 4.1.2 fails to run

11 views
Skip to first unread message

motz

unread,
Dec 2, 2007, 7:23:07 AM12/2/07
to Android Internals
Hi,

Does anyone succeeded in running the emulator compiled by gcc 4.1 or
later?
Seeing qemu/configure which skips check_gcc, I thought gcc 4 has been
already supported.

check_gcc="no" # 2006-10-10; digit: no check required anymore

Is this right?

I succeeded in running the one compiled by gcc 3.4.

My host is Fedora 8 and gcc versions is in the following:

$ gcc --version
gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)
$ gcc34 --version
gcc34 (GCC) 3.4.6 20060404 (Red Hat 3.4.6-8)

The emulator dumps registers like the following:

$ emulator -debug-kernel
...
eth0: SMC91C11xFD (rev 1) at c6800000 IRQ 12 [nowait]
eth0: Ethernet addr: 52:54:00:12:34:56
goldfish nand dev0: size 4000000, page 2048, extra 64, erase 131072
goldfish nand dev1: size 4000000, page 2048, extra 64, erase 131072
qemu: fatal: Bad mode 8

R00=00000006 R01=00000000 R02=00000000 R03=c09d9780
R04=00000000 R05=00000000 R06=00000008 R07=00000040
R08=04200000 R09=c08332c0 R10=80000013 R11=c03afe54
R12=e9bd37a7 R13=c03afe3c R14=c6802000 R15=c014ef14
PSR=60000093 -ZC- A svc32 7a3ff4
s00=00000000(0.000000) s01=00000000(0.000000)
d00=0000000000000000(0.000000)
s02=00000000(0.000000) s03=00000000(0.000000)
d01=0000000000000000(0.000000)
s04=00000000(0.000000) s05=00000000(0.000000)
d02=0000000000000000(0.000000)
s06=00000000(0.000000) s07=00000000(0.000000)
d03=0000000000000000(0.000000)
s08=00000000(0.000000) s09=00000000(0.000000)
d04=0000000000000000(0.000000)
s10=00000000(0.000000) s11=00000000(0.000000)
d05=0000000000000000(0.000000)
s12=00000000(0.000000) s13=00000000(0.000000)
d06=0000000000000000(0.000000)
s14=00000000(0.000000) s15=00000000(0.000000)
d07=0000000000000000(0.000000)
s16=00000000(0.000000) s17=00000000(0.000000)
d08=0000000000000000(0.000000)
s18=00000000(0.000000) s19=00000000(0.000000)
d09=0000000000000000(0.000000)
s20=00000000(0.000000) s21=00000000(0.000000)
d10=0000000000000000(0.000000)
s22=00000000(0.000000) s23=00000000(0.000000)
d11=0000000000000000(0.000000)
s24=00000000(0.000000) s25=00000000(0.000000)
d12=0000000000000000(0.000000)
s26=00000000(0.000000) s27=00000000(0.000000)
d13=0000000000000000(0.000000)
s28=00000000(0.000000) s29=00000000(0.000000)
d14=0000000000000000(0.000000)
s30=00000000(0.000000) s31=00000000(0.000000)
d15=0000000000000000(0.000000)
FPSCR: 00000000

I understand mode 8 is illeagal. Actually mode has varoius illegal
values each time.

Next is gdb's output.

$ gdb emulator
...
AbortedProgram received signal SIGABRT, Aborted.
[Switching to Thread 0xb7f076c0 (LWP 16095)]
0x00110402 in __kernel_vsyscall ()
(gdb) info stack
#0 0x00110402 in __kernel_vsyscall ()
#1 0x00678690 in raise () from /lib/libc.so.6
#2 0x00679f91 in abort () from /lib/libc.so.6
#3 0x080aabbc in cpu_abort (env=0xba63db0, fmt=0x8184e98 "Bad mode %x
\n")
at /home/kurotsu/tmp/android/android-emulator-20071111/qemu/exec.c:
1220
#4 0x080daf81 in switch_mode (env=0xba63db0, mode=8)
at /home/kurotsu/tmp/android/android-emulator-20071111/qemu/target-
arm/helper.c:129
#5 0x090d40b8 in code_gen_buffer ()
#6 0x0ba63db0 in ?? ()
#7 0x00000008 in ?? ()
#8 0x00000008 in ?? ()
#9 0x0ba63db0 in ?? ()
#10 0x080b0986 in cpu_arm_exec (env1=0xba63db0)
at /home/kurotsu/tmp/android/android-emulator-20071111/qemu/cpu-
exec.c:789
#11 0x08052b16 in main_loop ()
at /home/kurotsu/tmp/android/android-emulator-20071111/qemu/vl.c:
5766
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

Does anyone have an idea?

motz

Digit

unread,
Dec 2, 2007, 8:16:20 AM12/2/07
to android-...@googlegroups.com
It turns out that while we had some success compiling the emulator with GCC 4.1.2,
we recently had to switch back to GCC 3.3 on Linux to avoid some rare unexplainable bugs.
this is really a long-standing QEMU issue that is very difficult to resolve.

I would thus advice using a GCC in the 3.3.x series exclusively. the compiler check will
likely reappear soon in the officially distribute sources.

s00=00000000(0.000000 ) s01=00000000(0.000000)

d00=0000000000000000(0.000000)
s02=00000000(0.000000) s03=00000000(0.000000)
d01=0000000000000000(0.000000)
s04=00000000(0.000000) s05=00000000(0.000000)
d02=0000000000000000(0.000000 )
s06=00000000(0.000000) s07=00000000(0.000000)
d03=0000000000000000(0.000000)
s08=00000000(0.000000) s09=00000000(0.000000)
d04=0000000000000000(0.000000)
s10=00000000(0.000000) s11=00000000(0.000000)
d05=0000000000000000( 0.000000)
s12=00000000(0.000000) s13=00000000(0.000000)
d06=0000000000000000(0.000000)
s14=00000000(0.000000) s15=00000000(0.000000)
d07=0000000000000000(0.000000)
s16=00000000(0.000000) s17=00000000(0.000000 )
d08=0000000000000000(0.000000)
s18=00000000(0.000000) s19=00000000(0.000000)
d09=0000000000000000(0.000000)
s20=00000000(0.000000) s21=00000000(0.000000)
d10=0000000000000000(0.000000)
s22=00000000(0.000000 ) s23=00000000(0.000000)
Reply all
Reply to author
Forward
0 new messages