core dump after segfault - VxWorks

This is a discussion on core dump after segfault - VxWorks ; Hi. Is it possible to dump core on VxWorks 6.2 with gnu toolchain? I am able to see assertion messages, but I can't find what's the reason for segmentation faults when they happen. I can't debug my software under debugger ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: core dump after segfault

  1. core dump after segfault

    Hi.

    Is it possible to dump core on VxWorks 6.2 with gnu toolchain?

    I am able to see assertion messages, but I can't find what's the reason
    for segmentation faults when they happen.

    I can't debug my software under debugger because we are using automated
    testsuite - it runs our product many times and only sometimes it crashes.

    I tried to find information about core dumps in VxWorks but failed. Any
    tips?

  2. Re: core dump after segfault

    When the segmentation fault happens, it must have the displayed the
    address where it is generating the exception from.
    You can compile your image with an option to include the symbol table
    in the image by default.
    And then use the Dump tools provided by the WindRiver to check out the
    address which is generating the segmentation fault.

    Raj.


  3. Re: core dump after segfault


    During the exception, it can also retrive the exception task, so you
    can go the task and get the stack pointer, using the dump, dump the
    whole stack. Now take the map file and go one by one see the
    functional calls. This way you can figure it out the line which is
    causing the exceptions.

    Lakshmana Chintada
    On Jan 24, 3:26 am, "Raj" wrote:
    > When the segmentation fault happens, it must have the displayed the
    > address where it is generating the exception from.
    > You can compile your image with an option to include the symbol table
    > in the image by default.
    > And then use the Dump tools provided by the WindRiver to check out the
    > address which is generating the segmentation fault.
    >
    > Raj.



  4. Re: core dump after segfault

    clax123@hotmail.com napisał(a):
    > During the exception, it can also retrive the exception task, so you
    > can go the task and get the stack pointer, using the dump, dump the
    > whole stack. Now take the map file and go one by one see the
    > functional calls. This way you can figure it out the line which is
    > causing the exceptions.


    How to do it without human interaction (from the code or script)?

  5. Re: core dump after segfault

    On Jan 26, 2:22 pm, Jacek Popławski wrote:
    > clax...@hotmail.com napisał(a):
    >
    > > During the exception, it can also retrive the exception task, so you
    > > can go the task and get the stack pointer, using the dump, dump the
    > > whole stack. Now take the map file and go one by one see the
    > > functional calls. This way you can figure it out the line which is
    > > causing the exceptions.

    >
    > How to do it without human interaction (from the code or script)?



    You can write a custom exception handler and use excHootAdd() to add
    it to the default exception handler logic. See details in excLib
    documentation. Inside the handler routine, you can dump stack trace
    and task info details to a log file. I have done this by redirecting
    STD_OUT to a log file and then calling tt() and ti() functions on the
    task that crashes.

    hth
    Amit


+ Reply to Thread