Need help in debugging a testsuite over qemu and gdb
Richi Dubey
richidubey at gmail.com
Tue Aug 11 09:40:45 UTC 2020
Thank you for the quick response. The script helped.
I hate asking others for a lot of help, but I do not know what to do now
that I have caught the exception. I also put Init as a breakpoint, but the
program breaks at _ARMV4_Exception first, What should I do about this? How
do I resolve/fix the cause of this exception?
This happened:
------------------------------------------
~/quick-start/rtems/5/bin$ ./arm-rtems5-gdb --command=arm.gdb
~/quick-start/build/b3-realview/arm-rtems5/c/realview_pbx_a9_qemu/testsuites/smptests/smpstrongapa01.exe
GNU gdb (GDB) 9.1
.
.
.
Loading section .data, size 0x530 lma 0x200000
Start address 0x00100040, load size 136903
Transfer rate: 26738 KB/sec, 1777 bytes/write.
(gdb) continue
Continuing.
Thread 1 hit Breakpoint 2, _ARMV4_Exception_data_abort_default () at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:70
70 sub sp, #MORE_CONTEXT_SIZE
(gdb) info thread
Id Target Id Frame
* 1 Thread 1.1 (CPU#0 [running]) _ARMV4_Exception_data_abort_default ()
at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:70
2 Thread 1.2 (CPU#1 [running]) _Per_CPU_State_busy_wait (cpu=0x203780
<_Per_CPU_Information+512>, new_state=PER_CPU_STATE_UP) at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/percpu.c:77
3 Thread 1.3 (CPU#2 [running]) _SMP_ticket_lock_Do_release
(lock=0x203af4 <_Per_CPU_Information+1396>) at
/home/richi/quick-start/src/rtems/cpukit/include/rtems/score/smplockticket.h:176
(gdb) ni
71 stmdb sp!, {r0-r12}
(gdb)
72 mov r4, #4
(gdb)
74 b save_more_context
(gdb)
save_more_context () at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:112
112 mov r2, lr
(gdb)
113 mrs r3, spsr
(gdb)
114 mrs r7, cpsr
(gdb)
115 orr r5, r3, #ARM_PSR_I
(gdb)
116 bic r5, #ARM_PSR_T
(gdb)
117 msr cpsr, r5
(gdb)
save_more_context () at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:118
118 mov r0, sp
(gdb)
119 mov r1, lr
(gdb)
120 msr cpsr, r7
(gdb)
save_more_context () at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:121
121 mov r5, #0
(gdb)
122 add r6, sp, #ARM_EXCEPTION_FRAME_REGISTER_SP_OFFSET
(gdb)
123 stm r6, {r0-r5}
(gdb)
126 mov r0, sp
(gdb)
129 add r3, sp, #ARM_EXCEPTION_FRAME_VFP_CONTEXT_OFFSET
(gdb)
130 mov r1, #0
(gdb)
131 str r1, [r3]
(gdb)
135 vmrs r1, FPEXC
(gdb)
136 tst r1, #(1 << 30)
(gdb)
137 beq 1f
(gdb)
140 sub sp, #(ARM_VFP_CONTEXT_SIZE + 8)
(gdb)
save_more_context () at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:141
141 add r4, sp, #8
(gdb)
142 bic r4, r4, #7
(gdb)
143 str r4, [r3]
(gdb)
144 vmrs r2, FPSCR
(gdb)
145 stmia r4!, {r1-r2}
(gdb)
146 vstmia r4!, {d0-d15}
(gdb)
148 vstmia r4!, {d16-d31}
(gdb)
162 SWITCH_FROM_ARM_TO_THUMB r1
(gdb)
0x0011a12c 162 SWITCH_FROM_ARM_TO_THUMB r1
(gdb)
163 bl _ARM_Exception_default
(gdb)
Thread 1 hit Breakpoint 1, _ARM_Exception_default (frame=0x2082f0
<_ISR_Stack_area_begin+4016>) at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/cpu/arm/arm-exception-default.c:24
24 rtems_fatal( RTEMS_FATAL_SOURCE_EXCEPTION, (rtems_fatal_code) frame );
(gdb)
0x0011d2ae 24 rtems_fatal( RTEMS_FATAL_SOURCE_EXCEPTION,
(rtems_fatal_code) frame );
(gdb)
0x0011d2b0 24 rtems_fatal( RTEMS_FATAL_SOURCE_EXCEPTION,
(rtems_fatal_code) frame );
(gdb)
0x0011d2b2 24 rtems_fatal( RTEMS_FATAL_SOURCE_EXCEPTION,
(rtems_fatal_code) frame );
(gdb)
Thread 1 hit Breakpoint 5, _Terminate
(the_source=RTEMS_FATAL_SOURCE_EXCEPTION, the_error=2130672) at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/interr.c:36
36 _User_extensions_Fatal( the_source, the_error );
(gdb)
0x00114ba2 36 _User_extensions_Fatal( the_source, the_error );
(gdb)
0x00114ba4 36 _User_extensions_Fatal( the_source, the_error );
(gdb)
Thread 1 hit Breakpoint 4, bsp_reset () at
/home/richi/quick-start/src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../../../../../../bsps/arm/realview-pbx-a9/start/bspreset.c:19
19 volatile uint32_t *sys_lock = (volatile uint32_t *) 0x10000020;
(gdb)
0x001014b6 19 volatile uint32_t *sys_lock = (volatile uint32_t *)
0x10000020;
----------------------------------------------------------------------------------------------
After this, the qemu screen shows the
*** FATAL ***
fatal source: 9 (RTEMS_FATAL_SOURCE_EXCEPTION)
screen. What can I do now?
On Tue, Aug 11, 2020 at 1:31 PM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
> On 11/08/2020 09:59, Sebastian Huber wrote:
> >
> > arm-rtems6-gdb --arm.gdb app.exe
>
> arm-rtems6-gdb --command=arm.gdb app.exe
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail : sebastian.huber at embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200811/243a4016/attachment.html>
More information about the devel
mailing list