Getting a stack trace on segmentation faults

necnecnecnec_at_gmail.com
Date: 10/12/05

  • Next message: John Reiser: "Re: Getting a stack trace on segmentation faults"
    Date: 12 Oct 2005 06:12:48 -0700
    
    

    Hello all,

    I work on embedded linux system, and I want to see a stack trace
    whenever there is a segmentaion fault (it happens rarely, but when it
    does, I want the develpoers to catch it), instead of the laconic
    "Segmentation fault".

    There are no dynamic memory allocations, so it's not a failed malloc or
    such. I guess it's more along the lines of reading after array end or
    such.

    About the system:
    1. I write only part of the user-space part of the application.
    2. I do not have the source code of the other parts of the user-space.
    (Only libraries)
    3. I do not have the source for the kernel (so I cannot recompile it
    for LTT and such).
    4. I do have the sources for my parts, and the abilty to compile them,
    and link the executable (which is ELF format, by the way)
    5. I use uclibc (if it was glibc I would have used the backtrace
    function on the siganl handler)
    6. For myself I use gdb when I can, or at least analyze core dumps.
    There are other developers on the field which can only get debug prints
    from the system.
    7. There is no dynamic linker/loader (so no easy function
    interpostioning or such).
    8. It's not X86 platform (MIPS).
    Yes, I know, long list of requirements...

    Does anyone know of a ready solution, even near this problem?
    The idea of parsing the stack myself give me vibrations.

    Thanks!

    Nec


  • Next message: John Reiser: "Re: Getting a stack trace on segmentation faults"