← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Print stacktrace when SIGSEGV or SIGABRT appears

 

Am Mi., 19. Sep. 2018 um 11:14 Uhr schrieb Thomas Pointhuber <
thomas.pointhuber@xxxxxx>:

> Hi,
>
> I rewrote it to use wxDebugReport and wxHandleFatalExceptions. What I
> noticed (at least for my build setup), the stack-trace is unusable in
> this version for me because it lacks all kicad internals:
>
> ```
>   <stack>
>     <frame level="0"/>
>     <frame level="1"/>
>     <frame level="2" function="__poll" offset="00000051"/>
>     <frame level="3"/>
>     <frame level="4" function="g_main_loop_run" offset="000000d2"/>
>     <frame level="5" function="gtk_main" offset="000000c3"/>
>     <frame level="6" function="wxGUIEventLoop::DoRun()" offset="00000025"/>
>     <frame level="7" function="wxEventLoopBase::Run()" offset="00000093"/>
>     <frame level="8" function="wxAppConsoleBase::MainLoop()"
> offset="00000056"/>
>     <frame level="9"/>
>     <frame level="10" function="wxEntry(int&amp;, wchar_t**)"
> offset="00000045"/>
>     <frame level="11"/>
>     <frame level="12" function="__libc_start_main" offset="000000f3"/>
>     <frame level="13" function="_start" offset="0000002e"/>
>   </stack>
> ```
>


FWIW, I like the idea of using wxDebugReport to capture additional
information.  Whether or not the is system-native debug reporting, I'd
rather error on the side of too much information.

@Thomas-  You should take a look at hugin for an example that includes
module/file call information in the XML.  It would be a good idea as well
to put the information in the wxDebugReport dialog with a copy to clipboard
option for users that are not running from the commandline.

-S

References