[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-users
Subject:    Re: Stack trace from C program
From:       Aleksey Cheusov <cheusov () tut ! by>
Date:       2010-05-25 13:46:44
Message-ID: 87y6f8drgb.fsf () asrock ! chizhovka ! net
[Download RAW message or body]

> 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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic