Task context information available on crash

Matthew J Fletcher amimjf at gmail.com
Tue Mar 20 10:49:06 UTC 2018


Thank you for the advice.

So i can see that the executing task was "TIME", which is the timer server.
So the problem is almost certainly a bad function pointer passed as the
routine to invoke.

I can place a breakpoint in timerserver.c, but the crash is after several
minutes (and many tens of thousands of timer operations).

I think i will have to modify _Timer_server_Body() to copy the timer id to
a global variable so i can inspect it after an exception.

Unless there is a better way ?


On 20 March 2018 at 06:21, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 19/03/18 18:36, Matthew J Fletcher wrote:
>
>> Hi,
>>
>> When an application crashes and the bsp_fatal_extension() is invoked, is
>> there a way to see (in gdb or otherwise) what the last executing task was ?
>>
>> I guess there is some task context maintained but it would be internal to
>> rtems.
>>
>
> You can get the executing thread (and some other variables) from the
> global _Per_CPU_Information[], e.g.
>
> (gdb) p/x _Per_CPU_Information [0].per_cpu.executing->Object.id
> $1 = 0xa010001
>
> --
> 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.
>
>


-- 

regards
---
Matthew J Fletcher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20180320/76dc3425/attachment-0002.html>


More information about the users mailing list