mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
zdb/ztest: use libspl backtrace for crashes
We can show much nicer backtraces these days, lets use them. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16181
This commit is contained in:
committed by
Brian Behlendorf
parent
91c46d4399
commit
e7b451941b
+6
-3
@@ -55,7 +55,7 @@
|
||||
#define UNW_LOCAL_ONLY
|
||||
#include <libunwind.h>
|
||||
|
||||
static inline void
|
||||
void
|
||||
libspl_dump_backtrace(void)
|
||||
{
|
||||
unw_context_t uc;
|
||||
@@ -85,7 +85,7 @@ libspl_dump_backtrace(void)
|
||||
#elif defined(HAVE_BACKTRACE)
|
||||
#include <execinfo.h>
|
||||
|
||||
static inline void
|
||||
void
|
||||
libspl_dump_backtrace(void)
|
||||
{
|
||||
void *btptrs[100];
|
||||
@@ -97,7 +97,10 @@ libspl_dump_backtrace(void)
|
||||
free(bt);
|
||||
}
|
||||
#else
|
||||
#define libspl_dump_backtrace()
|
||||
void
|
||||
libspl_dump_backtrace(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
||||
@@ -60,6 +60,8 @@ libspl_assert(const char *buf, const char *file, const char *func, int line)
|
||||
return (0);
|
||||
}
|
||||
|
||||
extern void libspl_dump_backtrace(void);
|
||||
|
||||
#ifdef verify
|
||||
#undef verify
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user