PTC MKS Toolkit Knowledge Base

Section:IO
Product:MKS Toolkit (TKPDev/TKEDev)
Version:
OS:All
Keywords:porting, SIGSEGV
Category:Porting/Knowledge Base


Why do I see a SIGSEGV from my ported UNIX application?


Just because your code runs on UNIX does not mean that it will run unmodified on Windows. In our experience, your code may really have a latent bug (or non-portable code) which simply does not manifest on UNIX. To debug such situations:

  • Build your code with -g to enable debugging symbols.

  • Either run msdev <executable>.exe (devenv in VC++ .NET),

    • Set the "stop always" state for the Access Violation exception in the Debug/Exceptions menu.


  • Or,

    • Set NUT_DEFAULT_WIN32_FAULT=1 in the environment.

    • Set SIGSEGV to SIG_DFL.

    • On a segmentation violation, a pop-up dialog box will let you launch the debugger at the location of the fault.

See the Debugging the Application section of the Developing Cross-Platform Solutions chapter of the UNIX to Windows Porting Guide for more details about debugging applications.