<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>You are right. Anything in the target could not been used to generate a core dump.</div><div>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.</div><div>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.</div><div>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.</div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>smallphd@aliyun.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:gedare@rtems.org">Gedare Bloom</a></div><div><b>Date:</b> 2020-09-15 23:26</div><div><b>To:</b> <a href="mailto:smallphd@aliyun.com">smallphd@aliyun.com</a></div><div><b>CC:</b> <a href="mailto:devel@rtems.org">devel</a></div><div><b>Subject:</b> Re: does rtems 5.1 support create a core dump file when accessing a invalid address or other fatal errors?</div></div></div><div><div>No, there is no facility to generate a core dump. Due to shared</div>
<div>address space, once there is a fatal error you can't really trust</div>
<div>anything running in the target. You wouldn't necessarily want to try</div>
<div>writing to a mounted filesystem.</div>
<div> </div>
<div>You could probably set up a debugger to do something like this by</div>
<div>triggering it in the fatal exception handler. You'd need to make use</div>
<div>of whatever the debugger can do already though. You really can't rely</div>
<div>on the executing target.</div>
<div> </div>
<div>Gedare</div>
<div> </div>
<div>On Tue, Sep 15, 2020 at 4:58 AM smallphd@aliyun.com <smallphd@aliyun.com> wrote:</div>
<div>></div>
<div>> I am developing applications in rtems 5.1. As we know, my application and rtems kernel are both in the same address space.</div>
<div>> 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.</div>
<div>> This file contains the whole contents of memory and I could use a debuger to analyse the file to handle the bug.</div>
<div>> The question arise because I do not want always debug rtems in the bsp.</div>
<div>></div>
<div>> ________________________________</div>
<div>> smallphd@aliyun.com</div>
<div>> _______________________________________________</div>
<div>> devel mailing list</div>
<div>> devel@rtems.org</div>
<div>> http://lists.rtems.org/mailman/listinfo/devel</div>
</div></blockquote>
</body></html>