NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Stack trace from C program



> Hi, is there a sane way of generating a stack trace from withink a C
> program on *BSD?

Have a look at wip/libstacktrace library.
It has the API similar to glibc's backtrace(3).
It works fine on {Free,Net,Open,DF,Mir}BSD, Solaris and Linux.

At the moment it depends on gcc's extensions:
__builtin_return_address and __builtin_frame_address.

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index