To backtrace the currently running process and thread, you can do one of the following:
if (bt_init_accessor(&acc, BT_SELF) == -1) { fprintf( stderr, "%s:%i %s (%i)%s\n", __FUNCTION__, __LINE__, "bt_init_accessor", errno, strerror(errno)); return -1; }
You can also use a preinitialized accessor called bt_acc_self.