c/debug: func addr and info
This commit is contained in:
14
c/debug/_wrap/debug.c
Normal file
14
c/debug/_wrap/debug.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#if defined(__linux__)
|
||||
#define _GNU_SOURCE
|
||||
#include <features.h>
|
||||
#endif
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
void *llgo_address() {
|
||||
return __builtin_return_address(0);
|
||||
}
|
||||
|
||||
int llgo_addrinfo(void *addr, Dl_info *info) {
|
||||
return dladdr(addr, info);
|
||||
}
|
||||
Reference in New Issue
Block a user