It requires libexecinfo, so r2 buildsystem should check its presence.
R2 builds fine in fbsd for me
can anyone testing r2 in netbsd and openbsd?
@radare - yes, it should, because we disabled backtrace at all for *BSD.
But this bug is about checking libexecinfo dependency presence in the configure/makefile for *BSD systems, so users can enjoy backtrace on those systems too.
Aah ok
On 18 May 2016, at 12:54, Anton Kochkov [email protected] wrote:
@radare - yes, it should, because we disabled backtrace at all for *BSD.
But this bug is about checking libexecinfo dependency presence in the configure/makefile for *BSD systems, so users can enjoy backtrace on those systems too.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
can we close this now?
No, it's not solved yet.
we have #if (__linux__ && __GNU_LIBRARY__) || (__APPLE__ && APPLE_WITH_BACKTRACE) || defined(NETBSD_WITH_BACKTRACE) ... whats missing here? which specific bsd are you talking about? this is in libc, no need for execinfo imho
libexecinfo is still required. Just try it yourself on FreeBSD for example
@krytarowski @mscherer may be you can help here
Unless someone broke NetBSD, I got backtrace in the past and it worked correctly.
NAME
backtrace - fill in the backtrace of the currently executing thread
LIBRARY
Backtrace Information Library (libexecinfo, -lexecinfo)
SYNOPSIS
#include <execinfo.h>
size_t
backtrace(void **addrlist, size_t len);
char **
backtrace_symbols(void * const *addrlist, size_t len);
int
backtrace_symbols_fd(void * const *addrlist, size_t len, int fd);
char **
backtrace_symbols_fmt(void * const *addrlist, size_t len,
const char *fmt);
int
backtrace_symbols_fd_fmt(void * const *addrlist, size_t len, int fd,
const char *fmt);
NetBSD requires -lexecinfo.
I get the same output on Linux and FreeBSD when I use r2 -d /bin/ls and 'dbt', and no issue from building a fresh git checkout. FreeBSD has backtrace since FreeBSD 10.0 in the base system so I suspect that's the reason it work.
@Cka3o4Huk do you wanna take a look at this issue?
@radare never tried this feature before.
My first try (FreeBSD 12-CURRENT, radare 1.6.0):

What is expected result?
That's too old please try with the latest git version of radare2
Most helpful comment
Based on https://github.com/radare/radare2/issues/4900