Skip to content
David Hill edited this page Jul 29, 2013 · 1 revision

backtrace is a drop-in replacement for libexecinfo's and glibc's backtrace API. While writing a more sophisticated backtrace interface it became obvious that writing a call compatible library was trivial. Since libexecinfo didn't work on OpenBSD and glibc's backtrace is pure linux goo it was decided to write a working replacement.

Installation and use

On OpenBSD go into the libbacktrace directory and type:

make obj
make depend
make
make includes
make install
This will compile and install libbacktrace.* in /usr/local/lib. To test the library go into the examples directory and run the following sequence of commands:
make obj
make depend
make
An example backtrace looks like this:
0x400db7 <f1+28> at examples/obj/backtrace_test
0x400e40 <f0+9> at examples/obj/backtrace_test
0x400e5b <main+20> at examples/obj/backtrace_test
0x400b61 <___start+113> at examples/obj/backtrace_test

Due to a bug in gcc one has to compile applications with the following flags -Wl,--export-dynamic in order to get human readable function names.

Stay tuned for updates that include much deeper insight into backtraces.

Backtrace Resources

  • Snapshots
  • Mailing lists
    • backtrace-commits
      • subscribe: email backtrace-commits+subscribe at opensource.conformal.com
      • unsubscribe: email backtrace-commits+unsubscribe at opensource.conformal.com
Clone this wiki locally