Skip to contentSkip to conversation

linux-user qemu-arm NEON support

Qemu-devel Christopher Horler 2 participants 8 messages May 5, 2014 – Jan 10, 2015

lore
Share & tools
lore
#0 lore raw

Public bug reported:

I was reading the mailing list and saw NEON support in QEmu was making progress.

Is it not supported in user mode? or am I running into something else here? (I've tried to include some what may be useful information)

using qemu from git (last commits as below):
fdaad47 Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging e50bf23 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging c090c10 Merge remote-tracking branch 'remotes/cohuck/tags/kvm_cap_helpers' into staging

(for completeness I should point out this is not actually libQtCore.so.4.6.2 - the SONAME shows libQt5Core.so.5).

chorler@linux-foxtrot:~/projects/src/CustomFirmware> qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
qemu: unhandled CPU exception 0x2 - aborting
R00=00000000 R01=f6c84fdd R02=00000000 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=f6ff9d80 R11=00000000
R12=00000000 R13=f6c84d90 R14=00000000 R15=f6cdef74
PSR=00000010 ---- A usr32
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted

chorler@linux-foxtrot:~/projects/src/CustomFirmware> arm-linux-gnueabihf-readelf -A ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: SP and DP
Tag_ABI_VFP_args: VFP registers
Tag_ABI_optimization_goals: Aggressive Speed
Tag_CPU_unaligned_access: v6
Tag_DIV_use: Not allowed

chorler@linux-foxtrot:~/projects/src/CustomFirmware> gdb qemu-arm GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
..
Reading symbols from /home/chorler/projects/bin/qemu-arm...done. (gdb) list main.c:685
680
681 for(;;) {

682             cpu_exec_start(cs);
683             trapnr = cpu_arm_exec(env);
684             cpu_exec_end(cs);
685             switch(trapnr) {
686             case EXCP_UDEF:

687 {
688 TaskState *ts = cs->opaque;
689 uint32_t opcode;
(gdb) break main.c:685
Breakpoint 3 at 0x60059773: file /home/chorler/projects/src/qemu/linux-user/main.c, line 685.
(gdb) run -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
Starting program: /home/chorler/projects/bin/qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 [Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 3, cpu_loop (env=env@entry=0x6255e650) at /home/chorler/projects/src/qemu/linux-user/main.c:685
685 switch(trapnr) {
(gdb) print trapnr
$1 = 2
(gdb) n
762 if (trapnr == EXCP_BKPT) {
(gdb) n
760 env->eabi = 1;
(gdb) n
762 if (trapnr == EXCP_BKPT) {
(gdb) n
775 if (env->thumb) {
(gdb) n
777 get_user_code_u16(insn, env->regs[15] - 2,
(gdb) n
775 if (env->thumb) {
(gdb) n
782 get_user_code_u32(insn, env->regs[15] - 4,
(gdb) n
784 n = insn & 0xffffff;
(gdb) n
788 if (n == ARM_NR_cacheflush) {
(gdb) print n
$2 = 587775
(gdb) n
790 } else if (n == ARM_NR_semihosting
(gdb) n
793 } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
(gdb) n
872 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
(gdb) n
qemu: unhandled CPU exception 0x2 - aborting
874 cpu_dump_state(cs, stderr, fprintf, 0);
(gdb) print env
$3 = (CPUARMState *) 0x6255e650
(gdb) print *env
$4 = {regs = {0, 4140322822, 0, 0, 0, 0, 0, 0, 0, 0, 4143947136, 0, 0, 4140322224, 0, 4140691316}, xregs = {0 <repeats 32 times>}, pc = 0, pstate = 0, aarch64 = 0, uncached_cpsr = 16,
spsr = 0, banked_spsr = {0, 0, 0, 0, 0, 0}, banked_r13 = {0, 0, 0, 0, 0, 0}, banked_r14 = {0, 0, 0, 0, 0, 0}, usr_regs = {0, 0, 0, 0, 0}, fiq_regs = {0, 0, 0, 0, 0}, CF = 0, VF = 0, NF = 16, ZF = 1073741824, QF = 0, GE = 0, thumb = 0, condexec_bits = 0, daif = 0, elr_el1 = 0, sp_el = {0, 0}, cp15 = {c0_cpuid = 0, c0_cssel = 0, c1_sys = 0, c1_coproc = 15728640,

    c1_xscaleauxcr = 0, c1_scr = 0, ttbr0_el1 = 0, ttbr1_el1 = 0, c2_control = 0, c2_mask = 0, c2_base_mask = 4294950912, c2_data = 0, c2_insn = 0, c3 = 0, pmsav5_data_ap = 0, 
    pmsav5_insn_ap = 0, ifsr_el2 = 0, esr_el1 = 0, c6_region = {0, 0, 0, 0, 0, 0, 0, 0}, far_el1 = 0, par_el1 = 0, c9_insn = 0, c9_data = 0, c9_pmcr = 0, c9_pmcnten = 0, c9_pmovsr = 0, 
    c9_pmxevtyper = 0, c9_pmuserenr = 0, c9_pminten = 0, mair_el1 = 0, c12_vbar = 0, c13_fcse = 0, contextidr_el1 = 0, tpidr_el0 = 0, tpidrro_el0 = 0, tpidr_el1 = 0, c14_cntfrq = 0, 
    c14_cntkctl = 0, c14_timer = {{cval = 0, ctl = 0}, {cval = 0, ctl = 0}}, c15_cpar = 0, c15_ticonfig = 0, c15_i_max = 0, c15_i_min = 0, c15_threadid = 0, c15_config_base_address = 0, 
    c15_diagnostic = 0, c15_power_diagnostic = 0, c15_power_control = 0, dbgbvr = {0 <repeats 16 times>}, dbgbcr = {0 <repeats 16 times>}, dbgwvr = {0 <repeats 16 times>}, dbgwcr = {
      0 <repeats 16 times>}, c15_ccnt = 0}, v7m = {other_sp = 0, vecbase = 0, basepri = 0, control = 0, current_sp = 0, exception = 0, pending_exception = 0}, exception = {
    syndrome = 1174468607, fsr = 0, vaddress = 0}, teecr = 0, teehbr = 0, vfp = {regs = {0 <repeats 64 times>}, xregs = {0, 0, 0, 0, 0, 0, 0, 0, 1073741824, 0, 0, 0, 0, 0, 0, 0}, 
    vec_len = 0, vec_stride = 0, scratch = {0, 0, 0, 0, 0, 0, 0, 0}, fp_status = {float_detect_tininess = 1 '\001', float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', 
      floatx80_rounding_precision = 0 '\000', flush_to_zero = 0 '\000', flush_inputs_to_zero = 0 '\000', default_nan_mode = 0 '\000'}, standard_fp_status = {float_detect_tininess = 1 '\001', 
      float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', floatx80_rounding_precision = 0 '\000', flush_to_zero = 1 '\001', flush_inputs_to_zero = 1 '\001', 
      default_nan_mode = 1 '\001'}}, exclusive_addr = 0, exclusive_val = 0, exclusive_high = 0, exclusive_test = 0, exclusive_info = 0, iwmmxt = {regs = {0 <repeats 16 times>}, val = 0, 
    cregs = {0 <repeats 16 times>}}, bswap_code = false, eabi = 1, features = 93977026291, nvic = 0x0, boot_info = 0x0}

(gdb) quit
A debugging session is active.

Inferior 1 [process 13185] will be killed.

Quit anyway? (y or n) y

** Affects: qemu
Importance: Undecided
Status: New

** Tags: neon qemu-arm

Signature · 155 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1316115

Title:
  linux-user qemu-arm NEON support

Status in QEMU:
  New

Bug description:
  I was reading the mailing list and saw NEON support in QEmu was making
  progress.

  Is it not supported in user mode?  or am I running into something else
  here?  (I've tried to include some what may be useful information)

  using qemu from git (last commits as below):
  fdaad47 Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging
  e50bf23 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
  c090c10 Merge remote-tracking branch 'remotes/cohuck/tags/kvm_cap_helpers' into staging

  (for completeness I should point out this is not actually
  libQtCore.so.4.6.2 - the SONAME shows libQt5Core.so.5).

  chorler@linux-foxtrot:~/projects/src/CustomFirmware> qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  qemu: unhandled CPU exception 0x2 - aborting
  R00=00000000 R01=f6c84fdd R02=00000000 R03=00000000
  R04=00000000 R05=00000000 R06=00000000 R07=00000000
  R08=00000000 R09=00000000 R10=f6ff9d80 R11=00000000
  R12=00000000 R13=f6c84d90 R14=00000000 R15=f6cdef74
  PSR=00000010 ---- A usr32
  qemu: uncaught target signal 6 (Aborted) - core dumped
  Aborted

  
  chorler@linux-foxtrot:~/projects/src/CustomFirmware> arm-linux-gnueabihf-readelf -A ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  Attribute Section: aeabi
  File Attributes
    Tag_CPU_name: "7-A"
    Tag_CPU_arch: v7
    Tag_CPU_arch_profile: Application
    Tag_ARM_ISA_use: Yes
    Tag_THUMB_ISA_use: Thumb-2
    Tag_FP_arch: VFPv3
    Tag_Advanced_SIMD_arch: NEONv1
    Tag_ABI_PCS_wchar_t: 4
    Tag_ABI_FP_denormal: Needed
    Tag_ABI_FP_exceptions: Needed
    Tag_ABI_FP_number_model: IEEE 754
    Tag_ABI_align_needed: 8-byte
    Tag_ABI_align_preserved: 8-byte, except leaf SP
    Tag_ABI_enum_size: int
    Tag_ABI_HardFP_use: SP and DP
    Tag_ABI_VFP_args: VFP registers
    Tag_ABI_optimization_goals: Aggressive Speed
    Tag_CPU_unaligned_access: v6
    Tag_DIV_use: Not allowed


  chorler@linux-foxtrot:~/projects/src/CustomFirmware> gdb qemu-arm
  GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-suse-linux".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://bugs.opensuse.org/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word".
  ..
  Reading symbols from /home/chorler/projects/bin/qemu-arm...done.
  (gdb) list main.c:685
  680
  681         for(;;) {
  682             cpu_exec_start(cs);
  683             trapnr = cpu_arm_exec(env);
  684             cpu_exec_end(cs);
  685             switch(trapnr) {
  686             case EXCP_UDEF:
  687                 {
  688                     TaskState *ts = cs->opaque;
  689                     uint32_t opcode;
  (gdb) break main.c:685
  Breakpoint 3 at 0x60059773: file /home/chorler/projects/src/qemu/linux-user/main.c, line 685.
  (gdb) run -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  Starting program: /home/chorler/projects/bin/qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib64/libthread_db.so.1".

  Breakpoint 3, cpu_loop (env=env@entry=0x6255e650) at /home/chorler/projects/src/qemu/linux-user/main.c:685
  685             switch(trapnr) {
  (gdb) print trapnr
  $1 = 2
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  760                     env->eabi = 1;
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  777                             get_user_code_u16(insn, env->regs[15] - 2,
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  782                             get_user_code_u32(insn, env->regs[15] - 4,
  (gdb) n
  784                             n = insn & 0xffffff;
  (gdb) n
  788                     if (n == ARM_NR_cacheflush) {
  (gdb) print n
  $2 = 587775
  (gdb) n
  790                     } else if (n == ARM_NR_semihosting
  (gdb) n
  793                     } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
  (gdb) n
  872                 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
  (gdb) n
  qemu: unhandled CPU exception 0x2 - aborting
  874                 cpu_dump_state(cs, stderr, fprintf, 0);
  (gdb) print env
  $3 = (CPUARMState *) 0x6255e650
  (gdb) print *env
  $4 = {regs = {0, 4140322822, 0, 0, 0, 0, 0, 0, 0, 0, 4143947136, 0, 0, 4140322224, 0, 4140691316}, xregs = {0 <repeats 32 times>}, pc = 0, pstate = 0, aarch64 = 0, uncached_cpsr = 16, 
    spsr = 0, banked_spsr = {0, 0, 0, 0, 0, 0}, banked_r13 = {0, 0, 0, 0, 0, 0}, banked_r14 = {0, 0, 0, 0, 0, 0}, usr_regs = {0, 0, 0, 0, 0}, fiq_regs = {0, 0, 0, 0, 0}, CF = 0, VF = 0, 
    NF = 16, ZF = 1073741824, QF = 0, GE = 0, thumb = 0, condexec_bits = 0, daif = 0, elr_el1 = 0, sp_el = {0, 0}, cp15 = {c0_cpuid = 0, c0_cssel = 0, c1_sys = 0, c1_coproc = 15728640, 
      c1_xscaleauxcr = 0, c1_scr = 0, ttbr0_el1 = 0, ttbr1_el1 = 0, c2_control = 0, c2_mask = 0, c2_base_mask = 4294950912, c2_data = 0, c2_insn = 0, c3 = 0, pmsav5_data_ap = 0, 
      pmsav5_insn_ap = 0, ifsr_el2 = 0, esr_el1 = 0, c6_region = {0, 0, 0, 0, 0, 0, 0, 0}, far_el1 = 0, par_el1 = 0, c9_insn = 0, c9_data = 0, c9_pmcr = 0, c9_pmcnten = 0, c9_pmovsr = 0, 
      c9_pmxevtyper = 0, c9_pmuserenr = 0, c9_pminten = 0, mair_el1 = 0, c12_vbar = 0, c13_fcse = 0, contextidr_el1 = 0, tpidr_el0 = 0, tpidrro_el0 = 0, tpidr_el1 = 0, c14_cntfrq = 0, 
      c14_cntkctl = 0, c14_timer = {{cval = 0, ctl = 0}, {cval = 0, ctl = 0}}, c15_cpar = 0, c15_ticonfig = 0, c15_i_max = 0, c15_i_min = 0, c15_threadid = 0, c15_config_base_address = 0, 
      c15_diagnostic = 0, c15_power_diagnostic = 0, c15_power_control = 0, dbgbvr = {0 <repeats 16 times>}, dbgbcr = {0 <repeats 16 times>}, dbgwvr = {0 <repeats 16 times>}, dbgwcr = {
        0 <repeats 16 times>}, c15_ccnt = 0}, v7m = {other_sp = 0, vecbase = 0, basepri = 0, control = 0, current_sp = 0, exception = 0, pending_exception = 0}, exception = {
      syndrome = 1174468607, fsr = 0, vaddress = 0}, teecr = 0, teehbr = 0, vfp = {regs = {0 <repeats 64 times>}, xregs = {0, 0, 0, 0, 0, 0, 0, 0, 1073741824, 0, 0, 0, 0, 0, 0, 0}, 
      vec_len = 0, vec_stride = 0, scratch = {0, 0, 0, 0, 0, 0, 0, 0}, fp_status = {float_detect_tininess = 1 '\001', float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', 
        floatx80_rounding_precision = 0 '\000', flush_to_zero = 0 '\000', flush_inputs_to_zero = 0 '\000', default_nan_mode = 0 '\000'}, standard_fp_status = {float_detect_tininess = 1 '\001', 
        float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', floatx80_rounding_precision = 0 '\000', flush_to_zero = 1 '\001', flush_inputs_to_zero = 1 '\001', 
        default_nan_mode = 1 '\001'}}, exclusive_addr = 0, exclusive_val = 0, exclusive_high = 0, exclusive_test = 0, exclusive_info = 0, iwmmxt = {regs = {0 <repeats 16 times>}, val = 0, 
      cregs = {0 <repeats 16 times>}}, bswap_code = false, eabi = 1, features = 93977026291, nvic = 0x0, boot_info = 0x0}
  (gdb) quit
  A debugging session is active.

          Inferior 1 [process 13185] will be killed.

  Quit anyway? (y or n) y

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1316115/+subscriptions
#1 lore raw
Quoted 7 lines · Christopher Horler

Public bug reported:

I was reading the mailing list and saw NEON support in QEmu was making progress.

Is it not supported in user mode? or am I running into something else here? (I've tried to include some what may be useful information)

Neon in the 32-bit CPUs has been supported for several releases now; what you're seeing is probably something else.

Quoted 9 lines

using qemu from git (last commits as below):
fdaad47 Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging e50bf23 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging c090c10 Merge remote-tracking branch 'remotes/cohuck/tags/kvm_cap_helpers' into staging

(for completeness I should point out this is not actually libQtCore.so.4.6.2 - the SONAME shows libQt5Core.so.5).

chorler@linux-foxtrot:~/projects/src/CustomFirmware> qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2

Are you trying to execute a DLL on purpose?

Quoted 8 lines

qemu: unhandled CPU exception 0x2 - aborting R00=00000000 R01=f6c84fdd R02=00000000 R03=00000000 R04=00000000 R05=00000000 R06=00000000 R07=00000000 R08=00000000 R09=00000000 R10=f6ff9d80 R11=00000000 R12=00000000 R13=f6c84d90 R14=00000000 R15=f6cdef74 PSR=00000010 ---- A usr32
qemu: uncaught target signal 6 (Aborted) - core dumped Aborted

This means your guest program tried to execute an SWI instruction which didn't have a sensible immediate value in it to be a Linux system call. This seems to me to be likely because we're trying to execute garbage because you've tried to execute a DLL rather than an executable.

thanks
-- PMM

#2 lore raw
In reply to Christopher Horler
Quoted 1 line

Are you trying to execute a DLL on purpose?

Yes - it's executable and should print out something like this (this from my host system):

chorler@linux-foxtrot:~> /usr/lib64/libQt5Core.so.5 This is the QtCore library version 5.1.1 Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal

Build date:          2014-01-22
Installation prefix: /usr
Library path:        /usr/lib64
Include path:        /usr/include/qt5
Processor features:  sse2[required] sse3 ssse3

chorler@linux-foxtrot:~>

For an earlier version of the Shared Library that I've compiled myself it works:
chorler@linux-foxtrot:~/projects/src/buildroot> qemu-arm -L ./output/target ./output/target/usr/lib/libQtCore.so.4.8.5 This is the QtCore library version 4.8.5
Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal

Build key:           arm linux g++-4 full-config
Compat build key:    | armv6 linux g++-4 full-config |
Build date:          2013-10-14
Installation prefix: /usr
Library path:        /usr/lib
Include path:        /usr/include
Processor features:  neon

chorler@linux-foxtrot:~/projects/src/buildroot> arm-linux-gnueabihf-readelf -A ./output/target/usr/lib/libQtCore.so.4.8.5 Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: SP and DP
Tag_ABI_VFP_args: VFP registers
Tag_ABI_optimization_goals: Aggressive Speed
Tag_CPU_unaligned_access: v6
Tag_DIV_use: Not allowed

If this is more likely to be a problem with the library rather than qemu, I can build Qt5 myself for comparison (at the moment I'm just trying to execute a third party's work).

Signature · 155 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1316115

Title:
  linux-user qemu-arm NEON support

Status in QEMU:
  New

Bug description:
  I was reading the mailing list and saw NEON support in QEmu was making
  progress.

  Is it not supported in user mode?  or am I running into something else
  here?  (I've tried to include some what may be useful information)

  using qemu from git (last commits as below):
  fdaad47 Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging
  e50bf23 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
  c090c10 Merge remote-tracking branch 'remotes/cohuck/tags/kvm_cap_helpers' into staging

  (for completeness I should point out this is not actually
  libQtCore.so.4.6.2 - the SONAME shows libQt5Core.so.5).

  chorler@linux-foxtrot:~/projects/src/CustomFirmware> qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  qemu: unhandled CPU exception 0x2 - aborting
  R00=00000000 R01=f6c84fdd R02=00000000 R03=00000000
  R04=00000000 R05=00000000 R06=00000000 R07=00000000
  R08=00000000 R09=00000000 R10=f6ff9d80 R11=00000000
  R12=00000000 R13=f6c84d90 R14=00000000 R15=f6cdef74
  PSR=00000010 ---- A usr32
  qemu: uncaught target signal 6 (Aborted) - core dumped
  Aborted

  
  chorler@linux-foxtrot:~/projects/src/CustomFirmware> arm-linux-gnueabihf-readelf -A ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  Attribute Section: aeabi
  File Attributes
    Tag_CPU_name: "7-A"
    Tag_CPU_arch: v7
    Tag_CPU_arch_profile: Application
    Tag_ARM_ISA_use: Yes
    Tag_THUMB_ISA_use: Thumb-2
    Tag_FP_arch: VFPv3
    Tag_Advanced_SIMD_arch: NEONv1
    Tag_ABI_PCS_wchar_t: 4
    Tag_ABI_FP_denormal: Needed
    Tag_ABI_FP_exceptions: Needed
    Tag_ABI_FP_number_model: IEEE 754
    Tag_ABI_align_needed: 8-byte
    Tag_ABI_align_preserved: 8-byte, except leaf SP
    Tag_ABI_enum_size: int
    Tag_ABI_HardFP_use: SP and DP
    Tag_ABI_VFP_args: VFP registers
    Tag_ABI_optimization_goals: Aggressive Speed
    Tag_CPU_unaligned_access: v6
    Tag_DIV_use: Not allowed


  chorler@linux-foxtrot:~/projects/src/CustomFirmware> gdb qemu-arm
  GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-suse-linux".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://bugs.opensuse.org/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word".
  ..
  Reading symbols from /home/chorler/projects/bin/qemu-arm...done.
  (gdb) list main.c:685
  680
  681         for(;;) {
  682             cpu_exec_start(cs);
  683             trapnr = cpu_arm_exec(env);
  684             cpu_exec_end(cs);
  685             switch(trapnr) {
  686             case EXCP_UDEF:
  687                 {
  688                     TaskState *ts = cs->opaque;
  689                     uint32_t opcode;
  (gdb) break main.c:685
  Breakpoint 3 at 0x60059773: file /home/chorler/projects/src/qemu/linux-user/main.c, line 685.
  (gdb) run -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  Starting program: /home/chorler/projects/bin/qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib64/libthread_db.so.1".

  Breakpoint 3, cpu_loop (env=env@entry=0x6255e650) at /home/chorler/projects/src/qemu/linux-user/main.c:685
  685             switch(trapnr) {
  (gdb) print trapnr
  $1 = 2
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  760                     env->eabi = 1;
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  777                             get_user_code_u16(insn, env->regs[15] - 2,
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  782                             get_user_code_u32(insn, env->regs[15] - 4,
  (gdb) n
  784                             n = insn & 0xffffff;
  (gdb) n
  788                     if (n == ARM_NR_cacheflush) {
  (gdb) print n
  $2 = 587775
  (gdb) n
  790                     } else if (n == ARM_NR_semihosting
  (gdb) n
  793                     } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
  (gdb) n
  872                 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
  (gdb) n
  qemu: unhandled CPU exception 0x2 - aborting
  874                 cpu_dump_state(cs, stderr, fprintf, 0);
  (gdb) print env
  $3 = (CPUARMState *) 0x6255e650
  (gdb) print *env
  $4 = {regs = {0, 4140322822, 0, 0, 0, 0, 0, 0, 0, 0, 4143947136, 0, 0, 4140322224, 0, 4140691316}, xregs = {0 <repeats 32 times>}, pc = 0, pstate = 0, aarch64 = 0, uncached_cpsr = 16, 
    spsr = 0, banked_spsr = {0, 0, 0, 0, 0, 0}, banked_r13 = {0, 0, 0, 0, 0, 0}, banked_r14 = {0, 0, 0, 0, 0, 0}, usr_regs = {0, 0, 0, 0, 0}, fiq_regs = {0, 0, 0, 0, 0}, CF = 0, VF = 0, 
    NF = 16, ZF = 1073741824, QF = 0, GE = 0, thumb = 0, condexec_bits = 0, daif = 0, elr_el1 = 0, sp_el = {0, 0}, cp15 = {c0_cpuid = 0, c0_cssel = 0, c1_sys = 0, c1_coproc = 15728640, 
      c1_xscaleauxcr = 0, c1_scr = 0, ttbr0_el1 = 0, ttbr1_el1 = 0, c2_control = 0, c2_mask = 0, c2_base_mask = 4294950912, c2_data = 0, c2_insn = 0, c3 = 0, pmsav5_data_ap = 0, 
      pmsav5_insn_ap = 0, ifsr_el2 = 0, esr_el1 = 0, c6_region = {0, 0, 0, 0, 0, 0, 0, 0}, far_el1 = 0, par_el1 = 0, c9_insn = 0, c9_data = 0, c9_pmcr = 0, c9_pmcnten = 0, c9_pmovsr = 0, 
      c9_pmxevtyper = 0, c9_pmuserenr = 0, c9_pminten = 0, mair_el1 = 0, c12_vbar = 0, c13_fcse = 0, contextidr_el1 = 0, tpidr_el0 = 0, tpidrro_el0 = 0, tpidr_el1 = 0, c14_cntfrq = 0, 
      c14_cntkctl = 0, c14_timer = {{cval = 0, ctl = 0}, {cval = 0, ctl = 0}}, c15_cpar = 0, c15_ticonfig = 0, c15_i_max = 0, c15_i_min = 0, c15_threadid = 0, c15_config_base_address = 0, 
      c15_diagnostic = 0, c15_power_diagnostic = 0, c15_power_control = 0, dbgbvr = {0 <repeats 16 times>}, dbgbcr = {0 <repeats 16 times>}, dbgwvr = {0 <repeats 16 times>}, dbgwcr = {
        0 <repeats 16 times>}, c15_ccnt = 0}, v7m = {other_sp = 0, vecbase = 0, basepri = 0, control = 0, current_sp = 0, exception = 0, pending_exception = 0}, exception = {
      syndrome = 1174468607, fsr = 0, vaddress = 0}, teecr = 0, teehbr = 0, vfp = {regs = {0 <repeats 64 times>}, xregs = {0, 0, 0, 0, 0, 0, 0, 0, 1073741824, 0, 0, 0, 0, 0, 0, 0}, 
      vec_len = 0, vec_stride = 0, scratch = {0, 0, 0, 0, 0, 0, 0, 0}, fp_status = {float_detect_tininess = 1 '\001', float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', 
        floatx80_rounding_precision = 0 '\000', flush_to_zero = 0 '\000', flush_inputs_to_zero = 0 '\000', default_nan_mode = 0 '\000'}, standard_fp_status = {float_detect_tininess = 1 '\001', 
        float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', floatx80_rounding_precision = 0 '\000', flush_to_zero = 1 '\001', flush_inputs_to_zero = 1 '\001', 
        default_nan_mode = 1 '\001'}}, exclusive_addr = 0, exclusive_val = 0, exclusive_high = 0, exclusive_test = 0, exclusive_info = 0, iwmmxt = {regs = {0 <repeats 16 times>}, val = 0, 
      cregs = {0 <repeats 16 times>}}, bswap_code = false, eabi = 1, features = 93977026291, nvic = 0x0, boot_info = 0x0}
  (gdb) quit
  A debugging session is active.

          Inferior 1 [process 13185] will be killed.

  Quit anyway? (y or n) y

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1316115/+subscriptions
#3 lore raw
In reply to Christopher Horler

Now I look at the two sets of architecture specific information for the two versions of the library it's almost certain this has nothing to do with NEON.

I'll build a version of Qt5 of my own to test, if that works then from my perspective it's not a qemu bug.

Signature · 155 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1316115

Title:
  linux-user qemu-arm NEON support

Status in QEMU:
  New

Bug description:
  I was reading the mailing list and saw NEON support in QEmu was making
  progress.

  Is it not supported in user mode?  or am I running into something else
  here?  (I've tried to include some what may be useful information)

  using qemu from git (last commits as below):
  fdaad47 Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging
  e50bf23 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
  c090c10 Merge remote-tracking branch 'remotes/cohuck/tags/kvm_cap_helpers' into staging

  (for completeness I should point out this is not actually
  libQtCore.so.4.6.2 - the SONAME shows libQt5Core.so.5).

  chorler@linux-foxtrot:~/projects/src/CustomFirmware> qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  qemu: unhandled CPU exception 0x2 - aborting
  R00=00000000 R01=f6c84fdd R02=00000000 R03=00000000
  R04=00000000 R05=00000000 R06=00000000 R07=00000000
  R08=00000000 R09=00000000 R10=f6ff9d80 R11=00000000
  R12=00000000 R13=f6c84d90 R14=00000000 R15=f6cdef74
  PSR=00000010 ---- A usr32
  qemu: uncaught target signal 6 (Aborted) - core dumped
  Aborted

  
  chorler@linux-foxtrot:~/projects/src/CustomFirmware> arm-linux-gnueabihf-readelf -A ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  Attribute Section: aeabi
  File Attributes
    Tag_CPU_name: "7-A"
    Tag_CPU_arch: v7
    Tag_CPU_arch_profile: Application
    Tag_ARM_ISA_use: Yes
    Tag_THUMB_ISA_use: Thumb-2
    Tag_FP_arch: VFPv3
    Tag_Advanced_SIMD_arch: NEONv1
    Tag_ABI_PCS_wchar_t: 4
    Tag_ABI_FP_denormal: Needed
    Tag_ABI_FP_exceptions: Needed
    Tag_ABI_FP_number_model: IEEE 754
    Tag_ABI_align_needed: 8-byte
    Tag_ABI_align_preserved: 8-byte, except leaf SP
    Tag_ABI_enum_size: int
    Tag_ABI_HardFP_use: SP and DP
    Tag_ABI_VFP_args: VFP registers
    Tag_ABI_optimization_goals: Aggressive Speed
    Tag_CPU_unaligned_access: v6
    Tag_DIV_use: Not allowed


  chorler@linux-foxtrot:~/projects/src/CustomFirmware> gdb qemu-arm
  GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-suse-linux".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://bugs.opensuse.org/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word".
  ..
  Reading symbols from /home/chorler/projects/bin/qemu-arm...done.
  (gdb) list main.c:685
  680
  681         for(;;) {
  682             cpu_exec_start(cs);
  683             trapnr = cpu_arm_exec(env);
  684             cpu_exec_end(cs);
  685             switch(trapnr) {
  686             case EXCP_UDEF:
  687                 {
  688                     TaskState *ts = cs->opaque;
  689                     uint32_t opcode;
  (gdb) break main.c:685
  Breakpoint 3 at 0x60059773: file /home/chorler/projects/src/qemu/linux-user/main.c, line 685.
  (gdb) run -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  Starting program: /home/chorler/projects/bin/qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib64/libthread_db.so.1".

  Breakpoint 3, cpu_loop (env=env@entry=0x6255e650) at /home/chorler/projects/src/qemu/linux-user/main.c:685
  685             switch(trapnr) {
  (gdb) print trapnr
  $1 = 2
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  760                     env->eabi = 1;
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  777                             get_user_code_u16(insn, env->regs[15] - 2,
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  782                             get_user_code_u32(insn, env->regs[15] - 4,
  (gdb) n
  784                             n = insn & 0xffffff;
  (gdb) n
  788                     if (n == ARM_NR_cacheflush) {
  (gdb) print n
  $2 = 587775
  (gdb) n
  790                     } else if (n == ARM_NR_semihosting
  (gdb) n
  793                     } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
  (gdb) n
  872                 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
  (gdb) n
  qemu: unhandled CPU exception 0x2 - aborting
  874                 cpu_dump_state(cs, stderr, fprintf, 0);
  (gdb) print env
  $3 = (CPUARMState *) 0x6255e650
  (gdb) print *env
  $4 = {regs = {0, 4140322822, 0, 0, 0, 0, 0, 0, 0, 0, 4143947136, 0, 0, 4140322224, 0, 4140691316}, xregs = {0 <repeats 32 times>}, pc = 0, pstate = 0, aarch64 = 0, uncached_cpsr = 16, 
    spsr = 0, banked_spsr = {0, 0, 0, 0, 0, 0}, banked_r13 = {0, 0, 0, 0, 0, 0}, banked_r14 = {0, 0, 0, 0, 0, 0}, usr_regs = {0, 0, 0, 0, 0}, fiq_regs = {0, 0, 0, 0, 0}, CF = 0, VF = 0, 
    NF = 16, ZF = 1073741824, QF = 0, GE = 0, thumb = 0, condexec_bits = 0, daif = 0, elr_el1 = 0, sp_el = {0, 0}, cp15 = {c0_cpuid = 0, c0_cssel = 0, c1_sys = 0, c1_coproc = 15728640, 
      c1_xscaleauxcr = 0, c1_scr = 0, ttbr0_el1 = 0, ttbr1_el1 = 0, c2_control = 0, c2_mask = 0, c2_base_mask = 4294950912, c2_data = 0, c2_insn = 0, c3 = 0, pmsav5_data_ap = 0, 
      pmsav5_insn_ap = 0, ifsr_el2 = 0, esr_el1 = 0, c6_region = {0, 0, 0, 0, 0, 0, 0, 0}, far_el1 = 0, par_el1 = 0, c9_insn = 0, c9_data = 0, c9_pmcr = 0, c9_pmcnten = 0, c9_pmovsr = 0, 
      c9_pmxevtyper = 0, c9_pmuserenr = 0, c9_pminten = 0, mair_el1 = 0, c12_vbar = 0, c13_fcse = 0, contextidr_el1 = 0, tpidr_el0 = 0, tpidrro_el0 = 0, tpidr_el1 = 0, c14_cntfrq = 0, 
      c14_cntkctl = 0, c14_timer = {{cval = 0, ctl = 0}, {cval = 0, ctl = 0}}, c15_cpar = 0, c15_ticonfig = 0, c15_i_max = 0, c15_i_min = 0, c15_threadid = 0, c15_config_base_address = 0, 
      c15_diagnostic = 0, c15_power_diagnostic = 0, c15_power_control = 0, dbgbvr = {0 <repeats 16 times>}, dbgbcr = {0 <repeats 16 times>}, dbgwvr = {0 <repeats 16 times>}, dbgwcr = {
        0 <repeats 16 times>}, c15_ccnt = 0}, v7m = {other_sp = 0, vecbase = 0, basepri = 0, control = 0, current_sp = 0, exception = 0, pending_exception = 0}, exception = {
      syndrome = 1174468607, fsr = 0, vaddress = 0}, teecr = 0, teehbr = 0, vfp = {regs = {0 <repeats 64 times>}, xregs = {0, 0, 0, 0, 0, 0, 0, 0, 1073741824, 0, 0, 0, 0, 0, 0, 0}, 
      vec_len = 0, vec_stride = 0, scratch = {0, 0, 0, 0, 0, 0, 0, 0}, fp_status = {float_detect_tininess = 1 '\001', float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', 
        floatx80_rounding_precision = 0 '\000', flush_to_zero = 0 '\000', flush_inputs_to_zero = 0 '\000', default_nan_mode = 0 '\000'}, standard_fp_status = {float_detect_tininess = 1 '\001', 
        float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', floatx80_rounding_precision = 0 '\000', flush_to_zero = 1 '\001', flush_inputs_to_zero = 1 '\001', 
        default_nan_mode = 1 '\001'}}, exclusive_addr = 0, exclusive_val = 0, exclusive_high = 0, exclusive_test = 0, exclusive_info = 0, iwmmxt = {regs = {0 <repeats 16 times>}, val = 0, 
      cregs = {0 <repeats 16 times>}}, bswap_code = false, eabi = 1, features = 93977026291, nvic = 0x0, boot_info = 0x0}
  (gdb) quit
  A debugging session is active.

          Inferior 1 [process 13185] will be killed.

  Quit anyway? (y or n) y

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1316115/+subscriptions
#4 lore raw
In reply to Christopher Horler

I built Qt5 myself, and tested and it crashed again.

I think the entry point getting set in the ELF header is probably invalid and leading to the crash - I'm going to try and fix that - but it's almost certainly not a qemu bug.

I suggest closing the bug report.

Signature · 155 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1316115

Title:
  linux-user qemu-arm NEON support

Status in QEMU:
  New

Bug description:
  I was reading the mailing list and saw NEON support in QEmu was making
  progress.

  Is it not supported in user mode?  or am I running into something else
  here?  (I've tried to include some what may be useful information)

  using qemu from git (last commits as below):
  fdaad47 Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging
  e50bf23 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
  c090c10 Merge remote-tracking branch 'remotes/cohuck/tags/kvm_cap_helpers' into staging

  (for completeness I should point out this is not actually
  libQtCore.so.4.6.2 - the SONAME shows libQt5Core.so.5).

  chorler@linux-foxtrot:~/projects/src/CustomFirmware> qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  qemu: unhandled CPU exception 0x2 - aborting
  R00=00000000 R01=f6c84fdd R02=00000000 R03=00000000
  R04=00000000 R05=00000000 R06=00000000 R07=00000000
  R08=00000000 R09=00000000 R10=f6ff9d80 R11=00000000
  R12=00000000 R13=f6c84d90 R14=00000000 R15=f6cdef74
  PSR=00000010 ---- A usr32
  qemu: uncaught target signal 6 (Aborted) - core dumped
  Aborted

  
  chorler@linux-foxtrot:~/projects/src/CustomFirmware> arm-linux-gnueabihf-readelf -A ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  Attribute Section: aeabi
  File Attributes
    Tag_CPU_name: "7-A"
    Tag_CPU_arch: v7
    Tag_CPU_arch_profile: Application
    Tag_ARM_ISA_use: Yes
    Tag_THUMB_ISA_use: Thumb-2
    Tag_FP_arch: VFPv3
    Tag_Advanced_SIMD_arch: NEONv1
    Tag_ABI_PCS_wchar_t: 4
    Tag_ABI_FP_denormal: Needed
    Tag_ABI_FP_exceptions: Needed
    Tag_ABI_FP_number_model: IEEE 754
    Tag_ABI_align_needed: 8-byte
    Tag_ABI_align_preserved: 8-byte, except leaf SP
    Tag_ABI_enum_size: int
    Tag_ABI_HardFP_use: SP and DP
    Tag_ABI_VFP_args: VFP registers
    Tag_ABI_optimization_goals: Aggressive Speed
    Tag_CPU_unaligned_access: v6
    Tag_DIV_use: Not allowed


  chorler@linux-foxtrot:~/projects/src/CustomFirmware> gdb qemu-arm
  GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-suse-linux".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://bugs.opensuse.org/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word".
  ..
  Reading symbols from /home/chorler/projects/bin/qemu-arm...done.
  (gdb) list main.c:685
  680
  681         for(;;) {
  682             cpu_exec_start(cs);
  683             trapnr = cpu_arm_exec(env);
  684             cpu_exec_end(cs);
  685             switch(trapnr) {
  686             case EXCP_UDEF:
  687                 {
  688                     TaskState *ts = cs->opaque;
  689                     uint32_t opcode;
  (gdb) break main.c:685
  Breakpoint 3 at 0x60059773: file /home/chorler/projects/src/qemu/linux-user/main.c, line 685.
  (gdb) run -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  Starting program: /home/chorler/projects/bin/qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib64/libthread_db.so.1".

  Breakpoint 3, cpu_loop (env=env@entry=0x6255e650) at /home/chorler/projects/src/qemu/linux-user/main.c:685
  685             switch(trapnr) {
  (gdb) print trapnr
  $1 = 2
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  760                     env->eabi = 1;
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  777                             get_user_code_u16(insn, env->regs[15] - 2,
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  782                             get_user_code_u32(insn, env->regs[15] - 4,
  (gdb) n
  784                             n = insn & 0xffffff;
  (gdb) n
  788                     if (n == ARM_NR_cacheflush) {
  (gdb) print n
  $2 = 587775
  (gdb) n
  790                     } else if (n == ARM_NR_semihosting
  (gdb) n
  793                     } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
  (gdb) n
  872                 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
  (gdb) n
  qemu: unhandled CPU exception 0x2 - aborting
  874                 cpu_dump_state(cs, stderr, fprintf, 0);
  (gdb) print env
  $3 = (CPUARMState *) 0x6255e650
  (gdb) print *env
  $4 = {regs = {0, 4140322822, 0, 0, 0, 0, 0, 0, 0, 0, 4143947136, 0, 0, 4140322224, 0, 4140691316}, xregs = {0 <repeats 32 times>}, pc = 0, pstate = 0, aarch64 = 0, uncached_cpsr = 16, 
    spsr = 0, banked_spsr = {0, 0, 0, 0, 0, 0}, banked_r13 = {0, 0, 0, 0, 0, 0}, banked_r14 = {0, 0, 0, 0, 0, 0}, usr_regs = {0, 0, 0, 0, 0}, fiq_regs = {0, 0, 0, 0, 0}, CF = 0, VF = 0, 
    NF = 16, ZF = 1073741824, QF = 0, GE = 0, thumb = 0, condexec_bits = 0, daif = 0, elr_el1 = 0, sp_el = {0, 0}, cp15 = {c0_cpuid = 0, c0_cssel = 0, c1_sys = 0, c1_coproc = 15728640, 
      c1_xscaleauxcr = 0, c1_scr = 0, ttbr0_el1 = 0, ttbr1_el1 = 0, c2_control = 0, c2_mask = 0, c2_base_mask = 4294950912, c2_data = 0, c2_insn = 0, c3 = 0, pmsav5_data_ap = 0, 
      pmsav5_insn_ap = 0, ifsr_el2 = 0, esr_el1 = 0, c6_region = {0, 0, 0, 0, 0, 0, 0, 0}, far_el1 = 0, par_el1 = 0, c9_insn = 0, c9_data = 0, c9_pmcr = 0, c9_pmcnten = 0, c9_pmovsr = 0, 
      c9_pmxevtyper = 0, c9_pmuserenr = 0, c9_pminten = 0, mair_el1 = 0, c12_vbar = 0, c13_fcse = 0, contextidr_el1 = 0, tpidr_el0 = 0, tpidrro_el0 = 0, tpidr_el1 = 0, c14_cntfrq = 0, 
      c14_cntkctl = 0, c14_timer = {{cval = 0, ctl = 0}, {cval = 0, ctl = 0}}, c15_cpar = 0, c15_ticonfig = 0, c15_i_max = 0, c15_i_min = 0, c15_threadid = 0, c15_config_base_address = 0, 
      c15_diagnostic = 0, c15_power_diagnostic = 0, c15_power_control = 0, dbgbvr = {0 <repeats 16 times>}, dbgbcr = {0 <repeats 16 times>}, dbgwvr = {0 <repeats 16 times>}, dbgwcr = {
        0 <repeats 16 times>}, c15_ccnt = 0}, v7m = {other_sp = 0, vecbase = 0, basepri = 0, control = 0, current_sp = 0, exception = 0, pending_exception = 0}, exception = {
      syndrome = 1174468607, fsr = 0, vaddress = 0}, teecr = 0, teehbr = 0, vfp = {regs = {0 <repeats 64 times>}, xregs = {0, 0, 0, 0, 0, 0, 0, 0, 1073741824, 0, 0, 0, 0, 0, 0, 0}, 
      vec_len = 0, vec_stride = 0, scratch = {0, 0, 0, 0, 0, 0, 0, 0}, fp_status = {float_detect_tininess = 1 '\001', float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', 
        floatx80_rounding_precision = 0 '\000', flush_to_zero = 0 '\000', flush_inputs_to_zero = 0 '\000', default_nan_mode = 0 '\000'}, standard_fp_status = {float_detect_tininess = 1 '\001', 
        float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', floatx80_rounding_precision = 0 '\000', flush_to_zero = 1 '\001', flush_inputs_to_zero = 1 '\001', 
        default_nan_mode = 1 '\001'}}, exclusive_addr = 0, exclusive_val = 0, exclusive_high = 0, exclusive_test = 0, exclusive_info = 0, iwmmxt = {regs = {0 <repeats 16 times>}, val = 0, 
      cregs = {0 <repeats 16 times>}}, bswap_code = false, eabi = 1, features = 93977026291, nvic = 0x0, boot_info = 0x0}
  (gdb) quit
  A debugging session is active.

          Inferior 1 [process 13185] will be killed.

  Quit anyway? (y or n) y

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1316115/+subscriptions
#5 lore raw
Quoted 5 lines · Christopher Horler

I built Qt5 myself, and tested and it crashed again.

I think the entry point getting set in the ELF header is probably invalid and leading to the crash - I'm going to try and fix that - but it's almost certainly not a qemu bug.

Does the same ARM binary work on real hardware?

thanks
-- PMM

#6 lore raw
In reply to Christopher Horler

I didn't test it on real hardware yet - but I resolved the issue and found the root cause last night:

This perhaps should have been more obvious to me in the beginning, but "readelf -l" shows a program header similar to this:
INTERP 0x0000000000394600 0x0000000000394600 0x0000000000394600

                 0x000000000000001c 0x000000000000001c  R      10
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

This triggered a 9 month old memory of me fixing the Qt4.8 project file (used to create the Makefile) to ensure the correct loader (program interpreter).

Meanwhile, upstream made this patch in Qt5 - which I don't want, when I revert it and implement what I had before I get the expected result under qemu - it runs.

https://qt.gitorious.org/qt/qtbase/commit/b2a45e02a23fcbc9db29d700e2abaf627a1fdedf

(the !cross_compile causes the variables not to be set, my own patch for Qt 4.8 was setting these from buildroot / patch)

In the default unpatched case for a cross-compiled build, the shared library is not directly executable because the entry point and interpreter define never get set (eliminating the code that outputs the desired specific version information!)

Signature · 155 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1316115

Title:
  linux-user qemu-arm NEON support

Status in QEMU:
  New

Bug description:
  I was reading the mailing list and saw NEON support in QEmu was making
  progress.

  Is it not supported in user mode?  or am I running into something else
  here?  (I've tried to include some what may be useful information)

  using qemu from git (last commits as below):
  fdaad47 Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging
  e50bf23 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
  c090c10 Merge remote-tracking branch 'remotes/cohuck/tags/kvm_cap_helpers' into staging

  (for completeness I should point out this is not actually
  libQtCore.so.4.6.2 - the SONAME shows libQt5Core.so.5).

  chorler@linux-foxtrot:~/projects/src/CustomFirmware> qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  qemu: unhandled CPU exception 0x2 - aborting
  R00=00000000 R01=f6c84fdd R02=00000000 R03=00000000
  R04=00000000 R05=00000000 R06=00000000 R07=00000000
  R08=00000000 R09=00000000 R10=f6ff9d80 R11=00000000
  R12=00000000 R13=f6c84d90 R14=00000000 R15=f6cdef74
  PSR=00000010 ---- A usr32
  qemu: uncaught target signal 6 (Aborted) - core dumped
  Aborted

  
  chorler@linux-foxtrot:~/projects/src/CustomFirmware> arm-linux-gnueabihf-readelf -A ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  Attribute Section: aeabi
  File Attributes
    Tag_CPU_name: "7-A"
    Tag_CPU_arch: v7
    Tag_CPU_arch_profile: Application
    Tag_ARM_ISA_use: Yes
    Tag_THUMB_ISA_use: Thumb-2
    Tag_FP_arch: VFPv3
    Tag_Advanced_SIMD_arch: NEONv1
    Tag_ABI_PCS_wchar_t: 4
    Tag_ABI_FP_denormal: Needed
    Tag_ABI_FP_exceptions: Needed
    Tag_ABI_FP_number_model: IEEE 754
    Tag_ABI_align_needed: 8-byte
    Tag_ABI_align_preserved: 8-byte, except leaf SP
    Tag_ABI_enum_size: int
    Tag_ABI_HardFP_use: SP and DP
    Tag_ABI_VFP_args: VFP registers
    Tag_ABI_optimization_goals: Aggressive Speed
    Tag_CPU_unaligned_access: v6
    Tag_DIV_use: Not allowed


  chorler@linux-foxtrot:~/projects/src/CustomFirmware> gdb qemu-arm
  GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-suse-linux".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://bugs.opensuse.org/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word".
  ..
  Reading symbols from /home/chorler/projects/bin/qemu-arm...done.
  (gdb) list main.c:685
  680
  681         for(;;) {
  682             cpu_exec_start(cs);
  683             trapnr = cpu_arm_exec(env);
  684             cpu_exec_end(cs);
  685             switch(trapnr) {
  686             case EXCP_UDEF:
  687                 {
  688                     TaskState *ts = cs->opaque;
  689                     uint32_t opcode;
  (gdb) break main.c:685
  Breakpoint 3 at 0x60059773: file /home/chorler/projects/src/qemu/linux-user/main.c, line 685.
  (gdb) run -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  Starting program: /home/chorler/projects/bin/qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib64/libthread_db.so.1".

  Breakpoint 3, cpu_loop (env=env@entry=0x6255e650) at /home/chorler/projects/src/qemu/linux-user/main.c:685
  685             switch(trapnr) {
  (gdb) print trapnr
  $1 = 2
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  760                     env->eabi = 1;
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  777                             get_user_code_u16(insn, env->regs[15] - 2,
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  782                             get_user_code_u32(insn, env->regs[15] - 4,
  (gdb) n
  784                             n = insn & 0xffffff;
  (gdb) n
  788                     if (n == ARM_NR_cacheflush) {
  (gdb) print n
  $2 = 587775
  (gdb) n
  790                     } else if (n == ARM_NR_semihosting
  (gdb) n
  793                     } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
  (gdb) n
  872                 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
  (gdb) n
  qemu: unhandled CPU exception 0x2 - aborting
  874                 cpu_dump_state(cs, stderr, fprintf, 0);
  (gdb) print env
  $3 = (CPUARMState *) 0x6255e650
  (gdb) print *env
  $4 = {regs = {0, 4140322822, 0, 0, 0, 0, 0, 0, 0, 0, 4143947136, 0, 0, 4140322224, 0, 4140691316}, xregs = {0 <repeats 32 times>}, pc = 0, pstate = 0, aarch64 = 0, uncached_cpsr = 16, 
    spsr = 0, banked_spsr = {0, 0, 0, 0, 0, 0}, banked_r13 = {0, 0, 0, 0, 0, 0}, banked_r14 = {0, 0, 0, 0, 0, 0}, usr_regs = {0, 0, 0, 0, 0}, fiq_regs = {0, 0, 0, 0, 0}, CF = 0, VF = 0, 
    NF = 16, ZF = 1073741824, QF = 0, GE = 0, thumb = 0, condexec_bits = 0, daif = 0, elr_el1 = 0, sp_el = {0, 0}, cp15 = {c0_cpuid = 0, c0_cssel = 0, c1_sys = 0, c1_coproc = 15728640, 
      c1_xscaleauxcr = 0, c1_scr = 0, ttbr0_el1 = 0, ttbr1_el1 = 0, c2_control = 0, c2_mask = 0, c2_base_mask = 4294950912, c2_data = 0, c2_insn = 0, c3 = 0, pmsav5_data_ap = 0, 
      pmsav5_insn_ap = 0, ifsr_el2 = 0, esr_el1 = 0, c6_region = {0, 0, 0, 0, 0, 0, 0, 0}, far_el1 = 0, par_el1 = 0, c9_insn = 0, c9_data = 0, c9_pmcr = 0, c9_pmcnten = 0, c9_pmovsr = 0, 
      c9_pmxevtyper = 0, c9_pmuserenr = 0, c9_pminten = 0, mair_el1 = 0, c12_vbar = 0, c13_fcse = 0, contextidr_el1 = 0, tpidr_el0 = 0, tpidrro_el0 = 0, tpidr_el1 = 0, c14_cntfrq = 0, 
      c14_cntkctl = 0, c14_timer = {{cval = 0, ctl = 0}, {cval = 0, ctl = 0}}, c15_cpar = 0, c15_ticonfig = 0, c15_i_max = 0, c15_i_min = 0, c15_threadid = 0, c15_config_base_address = 0, 
      c15_diagnostic = 0, c15_power_diagnostic = 0, c15_power_control = 0, dbgbvr = {0 <repeats 16 times>}, dbgbcr = {0 <repeats 16 times>}, dbgwvr = {0 <repeats 16 times>}, dbgwcr = {
        0 <repeats 16 times>}, c15_ccnt = 0}, v7m = {other_sp = 0, vecbase = 0, basepri = 0, control = 0, current_sp = 0, exception = 0, pending_exception = 0}, exception = {
      syndrome = 1174468607, fsr = 0, vaddress = 0}, teecr = 0, teehbr = 0, vfp = {regs = {0 <repeats 64 times>}, xregs = {0, 0, 0, 0, 0, 0, 0, 0, 1073741824, 0, 0, 0, 0, 0, 0, 0}, 
      vec_len = 0, vec_stride = 0, scratch = {0, 0, 0, 0, 0, 0, 0, 0}, fp_status = {float_detect_tininess = 1 '\001', float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', 
        floatx80_rounding_precision = 0 '\000', flush_to_zero = 0 '\000', flush_inputs_to_zero = 0 '\000', default_nan_mode = 0 '\000'}, standard_fp_status = {float_detect_tininess = 1 '\001', 
        float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', floatx80_rounding_precision = 0 '\000', flush_to_zero = 1 '\001', flush_inputs_to_zero = 1 '\001', 
        default_nan_mode = 1 '\001'}}, exclusive_addr = 0, exclusive_val = 0, exclusive_high = 0, exclusive_test = 0, exclusive_info = 0, iwmmxt = {regs = {0 <repeats 16 times>}, val = 0, 
      cregs = {0 <repeats 16 times>}}, bswap_code = false, eabi = 1, features = 93977026291, nvic = 0x0, boot_info = 0x0}
  (gdb) quit
  A debugging session is active.

          Inferior 1 [process 13185] will be killed.

  Quit anyway? (y or n) y

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1316115/+subscriptions
#7 lore raw
In reply to Christopher Horler

** Changed in: qemu
Status: New => Invalid

Signature · 155 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1316115

Title:
  linux-user qemu-arm NEON support

Status in QEMU:
  Invalid

Bug description:
  I was reading the mailing list and saw NEON support in QEmu was making
  progress.

  Is it not supported in user mode?  or am I running into something else
  here?  (I've tried to include some what may be useful information)

  using qemu from git (last commits as below):
  fdaad47 Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging
  e50bf23 Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
  c090c10 Merge remote-tracking branch 'remotes/cohuck/tags/kvm_cap_helpers' into staging

  (for completeness I should point out this is not actually
  libQtCore.so.4.6.2 - the SONAME shows libQt5Core.so.5).

  chorler@linux-foxtrot:~/projects/src/CustomFirmware> qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  qemu: unhandled CPU exception 0x2 - aborting
  R00=00000000 R01=f6c84fdd R02=00000000 R03=00000000
  R04=00000000 R05=00000000 R06=00000000 R07=00000000
  R08=00000000 R09=00000000 R10=f6ff9d80 R11=00000000
  R12=00000000 R13=f6c84d90 R14=00000000 R15=f6cdef74
  PSR=00000010 ---- A usr32
  qemu: uncaught target signal 6 (Aborted) - core dumped
  Aborted

  
  chorler@linux-foxtrot:~/projects/src/CustomFirmware> arm-linux-gnueabihf-readelf -A ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2 
  Attribute Section: aeabi
  File Attributes
    Tag_CPU_name: "7-A"
    Tag_CPU_arch: v7
    Tag_CPU_arch_profile: Application
    Tag_ARM_ISA_use: Yes
    Tag_THUMB_ISA_use: Thumb-2
    Tag_FP_arch: VFPv3
    Tag_Advanced_SIMD_arch: NEONv1
    Tag_ABI_PCS_wchar_t: 4
    Tag_ABI_FP_denormal: Needed
    Tag_ABI_FP_exceptions: Needed
    Tag_ABI_FP_number_model: IEEE 754
    Tag_ABI_align_needed: 8-byte
    Tag_ABI_align_preserved: 8-byte, except leaf SP
    Tag_ABI_enum_size: int
    Tag_ABI_HardFP_use: SP and DP
    Tag_ABI_VFP_args: VFP registers
    Tag_ABI_optimization_goals: Aggressive Speed
    Tag_CPU_unaligned_access: v6
    Tag_DIV_use: Not allowed


  chorler@linux-foxtrot:~/projects/src/CustomFirmware> gdb qemu-arm
  GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-suse-linux".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://bugs.opensuse.org/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word".
  ..
  Reading symbols from /home/chorler/projects/bin/qemu-arm...done.
  (gdb) list main.c:685
  680
  681         for(;;) {
  682             cpu_exec_start(cs);
  683             trapnr = cpu_arm_exec(env);
  684             cpu_exec_end(cs);
  685             switch(trapnr) {
  686             case EXCP_UDEF:
  687                 {
  688                     TaskState *ts = cs->opaque;
  689                     uint32_t opcode;
  (gdb) break main.c:685
  Breakpoint 3 at 0x60059773: file /home/chorler/projects/src/qemu/linux-user/main.c, line 685.
  (gdb) run -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  Starting program: /home/chorler/projects/bin/qemu-arm -L ./root ./root/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/libQtCore.so.4.6.2
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib64/libthread_db.so.1".

  Breakpoint 3, cpu_loop (env=env@entry=0x6255e650) at /home/chorler/projects/src/qemu/linux-user/main.c:685
  685             switch(trapnr) {
  (gdb) print trapnr
  $1 = 2
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  760                     env->eabi = 1;
  (gdb) n
  762                     if (trapnr == EXCP_BKPT) {
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  777                             get_user_code_u16(insn, env->regs[15] - 2,
  (gdb) n
  775                         if (env->thumb) {
  (gdb) n
  782                             get_user_code_u32(insn, env->regs[15] - 4,
  (gdb) n
  784                             n = insn & 0xffffff;
  (gdb) n
  788                     if (n == ARM_NR_cacheflush) {
  (gdb) print n
  $2 = 587775
  (gdb) n
  790                     } else if (n == ARM_NR_semihosting
  (gdb) n
  793                     } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
  (gdb) n
  872                 fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
  (gdb) n
  qemu: unhandled CPU exception 0x2 - aborting
  874                 cpu_dump_state(cs, stderr, fprintf, 0);
  (gdb) print env
  $3 = (CPUARMState *) 0x6255e650
  (gdb) print *env
  $4 = {regs = {0, 4140322822, 0, 0, 0, 0, 0, 0, 0, 0, 4143947136, 0, 0, 4140322224, 0, 4140691316}, xregs = {0 <repeats 32 times>}, pc = 0, pstate = 0, aarch64 = 0, uncached_cpsr = 16, 
    spsr = 0, banked_spsr = {0, 0, 0, 0, 0, 0}, banked_r13 = {0, 0, 0, 0, 0, 0}, banked_r14 = {0, 0, 0, 0, 0, 0}, usr_regs = {0, 0, 0, 0, 0}, fiq_regs = {0, 0, 0, 0, 0}, CF = 0, VF = 0, 
    NF = 16, ZF = 1073741824, QF = 0, GE = 0, thumb = 0, condexec_bits = 0, daif = 0, elr_el1 = 0, sp_el = {0, 0}, cp15 = {c0_cpuid = 0, c0_cssel = 0, c1_sys = 0, c1_coproc = 15728640, 
      c1_xscaleauxcr = 0, c1_scr = 0, ttbr0_el1 = 0, ttbr1_el1 = 0, c2_control = 0, c2_mask = 0, c2_base_mask = 4294950912, c2_data = 0, c2_insn = 0, c3 = 0, pmsav5_data_ap = 0, 
      pmsav5_insn_ap = 0, ifsr_el2 = 0, esr_el1 = 0, c6_region = {0, 0, 0, 0, 0, 0, 0, 0}, far_el1 = 0, par_el1 = 0, c9_insn = 0, c9_data = 0, c9_pmcr = 0, c9_pmcnten = 0, c9_pmovsr = 0, 
      c9_pmxevtyper = 0, c9_pmuserenr = 0, c9_pminten = 0, mair_el1 = 0, c12_vbar = 0, c13_fcse = 0, contextidr_el1 = 0, tpidr_el0 = 0, tpidrro_el0 = 0, tpidr_el1 = 0, c14_cntfrq = 0, 
      c14_cntkctl = 0, c14_timer = {{cval = 0, ctl = 0}, {cval = 0, ctl = 0}}, c15_cpar = 0, c15_ticonfig = 0, c15_i_max = 0, c15_i_min = 0, c15_threadid = 0, c15_config_base_address = 0, 
      c15_diagnostic = 0, c15_power_diagnostic = 0, c15_power_control = 0, dbgbvr = {0 <repeats 16 times>}, dbgbcr = {0 <repeats 16 times>}, dbgwvr = {0 <repeats 16 times>}, dbgwcr = {
        0 <repeats 16 times>}, c15_ccnt = 0}, v7m = {other_sp = 0, vecbase = 0, basepri = 0, control = 0, current_sp = 0, exception = 0, pending_exception = 0}, exception = {
      syndrome = 1174468607, fsr = 0, vaddress = 0}, teecr = 0, teehbr = 0, vfp = {regs = {0 <repeats 64 times>}, xregs = {0, 0, 0, 0, 0, 0, 0, 0, 1073741824, 0, 0, 0, 0, 0, 0, 0}, 
      vec_len = 0, vec_stride = 0, scratch = {0, 0, 0, 0, 0, 0, 0, 0}, fp_status = {float_detect_tininess = 1 '\001', float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', 
        floatx80_rounding_precision = 0 '\000', flush_to_zero = 0 '\000', flush_inputs_to_zero = 0 '\000', default_nan_mode = 0 '\000'}, standard_fp_status = {float_detect_tininess = 1 '\001', 
        float_rounding_mode = 0 '\000', float_exception_flags = 0 '\000', floatx80_rounding_precision = 0 '\000', flush_to_zero = 1 '\001', flush_inputs_to_zero = 1 '\001', 
        default_nan_mode = 1 '\001'}}, exclusive_addr = 0, exclusive_val = 0, exclusive_high = 0, exclusive_test = 0, exclusive_info = 0, iwmmxt = {regs = {0 <repeats 16 times>}, val = 0, 
      cregs = {0 <repeats 16 times>}}, bswap_code = false, eabi = 1, features = 93977026291, nvic = 0x0, boot_info = 0x0}
  (gdb) quit
  A debugging session is active.

          Inferior 1 [process 13185] will be killed.

  Quit anyway? (y or n) y

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1316115/+subscriptions