phycore_mpc5554 idle thread exits when GDB invoked
Peter Dufault
dufault at hda.com
Fri May 30 13:03:28 UTC 2014
On the Phytec MPC5554 with the current head as of yesterday I'm having funny problems with GDB and the McGraigor wiggler. I don't need to use this setup that often so everything has changed since I last used it: GCC, GDB, RTEMS, the version of Linux, the McGraigor driver... So I'm at basic principles.
If I just start the program, interrupt with ^C, and continue it exits.
I start, hit ^C, and enter GDB. I'm in the idle thread, as you would expect. I have a hardware breakpoint set in bsp_reset(), which is the fatal handler. This "c" below is the initial setup and will start the program. Then I type the ^C:
====
(gdb) c
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
bsp_idle_thread (arg=0x0)
at ../../../../../../../../rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/idle-thread.c:30
30 mpc55xx_wait_for_interrupt();
(gdb)
====
Now when I continue I will hit the breakpoint in bsp_reset:
====
(gdb) c
Continuing.
Breakpoint 2, bsp_reset ()
at ../../../../../../../../rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspreset.c:35
35 SIU.SRCR.R = 1U << (31 - 0);
(gdb)
====
The stack backtrace shows _Heap_Iterate returning to _Thread_Handler(), and then that exits:
====
#0 bsp_reset () at ../../../../../../../../rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspreset.c:35
#1 0x000a80b0 in _User_extensions_Iterate (arg=arg at entry=0x21056580,
visitor=0xa8008 <_User_extensions_Fatal_visitor>)
at ../../../../../../rtems/c/src/../../cpukit/score/src/userextiterate.c:155
#2 0x000a3f4c in _User_extensions_Fatal (error=0x5, is_internal=0x1, source=INTERNAL_ERROR_CORE)
at ../../cpukit/../../../phycore_mpc5554/lib/include/rtems/score/userextimpl.h:253
#3 _Terminate (the_source=the_source at entry=INTERNAL_ERROR_CORE, is_internal=is_internal at entry=0x1,
the_error=the_error at entry=0x5) at ../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:44
#4 0x000f0078 in _Thread_Handler ()
at ../../../../../../rtems/c/src/../../cpukit/score/src/threadhandler.c:230
#5 0x000effdc in _Heap_Iterate (heap=<optimized out>, visitor=<optimized out>, visitor_arg=<optimized out>)
at ../../../../../../rtems/c/src/../../cpukit/score/src/heapiterate.c:48
Backtrace stopped: frame did not save the PC
(gdb)
====
It's exiting because it thinks the thread exited at line 230 in threadhandler.c:
====
_Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_THREAD_EXITTED
);
====
What it says is exiting is the idle thread:
====
(gdb) print executing->Wait.return_argument
$6 = (void *) 0x0 <bsp_section_start_begin>
(gdb) print executing->Start.entry_point
$7 = (Thread_Entry) 0x6fee8 <bsp_idle_thread>
(gdb)
====
Anybody have some clues on what might be happening or what info I need to collect?
Peter
-----------------
Peter Dufault
HD Associates, Inc. Software and System Engineering
More information about the devel
mailing list