Determining the cause of a segfault in RTEMS
Mohammed Khoory
mkhoory at eiast.ae
Wed Mar 13 00:51:02 UTC 2013
Hi,
Normally in general-purpose (not embedded) programming, the most
straightforward way to determine the cause of a segfault is to look at its
backtrace. However, this approach isn't really helpful in my case.. I'm
writing an RTEMS application that has around 4 tasks, and stepping through
the program doesn't exactly show context switches. When I get a segfault,
the backtrace only shows the following
#0 0xcd95a758 in ?? ()
#1 0x40000190 in trap_table () at
../../../../../../../../rtems-4.10.2/c/src/lib/libbsp/sparc/leon3/../../spar
c/shared/start.S:88
Which is extremely unhelpful. Stepping through the program also doesn't
really help, because it seems to crash while waiting for events, which makes
no sense to me.
Is there any other proper way to figure out what's causing the segfault in
RTEMS? I'm thinking maybe using the capture engine might be a good idea
because it should tell what task was running last, but I haven't used it
yet, I only know what it does.. so I'm not sure if that'll help.
Thanks
More information about the users
mailing list