does rtems 5.1 support create a core dump file when accessing a invalid address or other fatal errors?

smallphd at aliyun.com smallphd at aliyun.com
Wed Sep 16 00:57:32 UTC 2020


You are right. Anything in the target could not been used to generate a core dump.
In Linux kernel, there is a mini kernel outside the running kernel. When the running kernel crash, it will trigger the mini kernel to run.
The mini kernel will analyse the memory of the crashed kernel and generate a core dump file. Then, I will use the crash cmd to analyse the core dump and find the reason of this crash.
Is it possible to reserve some memory for a mini rtems kernel. This memory can not be used by the normal kernel. Once the normal kernel crashed, the mini kernel can generate a core dump of the normal kernel.



smallphd at aliyun.com
 
From: Gedare Bloom
Date: 2020-09-15 23:26
To: smallphd at aliyun.com
CC: devel
Subject: Re: does rtems 5.1 support create a core dump file when accessing a invalid address or other fatal errors?
No, there is no facility to generate a core dump. Due to shared
address space, once there is a fatal error you can't really trust
anything running in the target. You wouldn't necessarily want to try
writing to a mounted filesystem.
 
You could probably set up a debugger to do something like this by
triggering it in the fatal exception handler. You'd need to make use
of whatever the debugger can do already though. You really can't rely
on the executing target.
 
Gedare
 
On Tue, Sep 15, 2020 at 4:58 AM smallphd at aliyun.com <smallphd at aliyun.com> wrote:
>
> I am developing applications in rtems 5.1. As we know, my application and rtems kernel are both in the same address space.
> So if my application access an invalid address or encounter other fatal errors, I want the kernel not just being hunging, but create a core dump file.
> This file contains the whole contents of memory and I could use a debuger to analyse the file to handle the bug.
> The question arise because I do not want always debug rtems in the bsp.
>
> ________________________________
> smallphd at aliyun.com
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200916/6fed2767/attachment.html>


More information about the devel mailing list