mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Remove support for internal symbol table
Since we can no longer generate an internal symbol table, there doesn't seem to be much reason to retain the code that reads it.
This commit is contained in:
parent
1628f5865a
commit
ad5250ff9c
@ -25,7 +25,6 @@ CWARNINGS =
|
|||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
NSLIBS = ../../lib/ns/libns.@A@
|
NSLIBS = ../../lib/ns/libns.@A@
|
||||||
|
|
||||||
@ -36,7 +35,6 @@ BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
|||||||
NSDEPENDLIBS = ../../lib/ns/libns.@A@
|
NSDEPENDLIBS = ../../lib/ns/libns.@A@
|
||||||
|
|
||||||
LIBS = ${ISCLIBS} @LIBS@
|
LIBS = ${ISCLIBS} @LIBS@
|
||||||
NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@
|
|
||||||
|
|
||||||
SUBDIRS =
|
SUBDIRS =
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ CWARNINGS =
|
|||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
|
|
||||||
@ -43,8 +42,6 @@ RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${I
|
|||||||
|
|
||||||
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
|
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
|
||||||
|
|
||||||
NOSYMLIBS = ${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@
|
|
||||||
|
|
||||||
CONFDEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
|
CONFDEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
|
||||||
|
|
||||||
SRCS= rndc-confgen.c ddns-confgen.c
|
SRCS= rndc-confgen.c ddns-confgen.c
|
||||||
|
@ -25,7 +25,6 @@ CWARNINGS =
|
|||||||
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||||
|
|
||||||
@ -37,7 +36,6 @@ IRSDEPLIBS = ../../lib/irs/libirs.@A@
|
|||||||
DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
|
DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
|
||||||
|
|
||||||
LIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
|
LIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
|
||||||
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@
|
|
||||||
|
|
||||||
SUBDIRS =
|
SUBDIRS =
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
|||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||||
|
|
||||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
@ -44,9 +43,6 @@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
|
|||||||
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
||||||
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
|
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
|
||||||
|
|
||||||
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
|
||||||
${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@
|
|
||||||
|
|
||||||
SUBDIRS =
|
SUBDIRS =
|
||||||
|
|
||||||
TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@
|
TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@
|
||||||
|
@ -24,7 +24,6 @@ CWARNINGS =
|
|||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
|
|
||||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||||
@ -34,8 +33,6 @@ DEPLIBS = ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
|
|||||||
|
|
||||||
LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
|
LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
|
||||||
|
|
||||||
NOSYMLIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@
|
|
||||||
|
|
||||||
# Alphabetically
|
# Alphabetically
|
||||||
TARGETS = dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \
|
TARGETS = dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \
|
||||||
dnssec-importkey@EXEEXT@ dnssec-keyfromlabel@EXEEXT@ \
|
dnssec-importkey@EXEEXT@ dnssec-keyfromlabel@EXEEXT@ \
|
||||||
|
@ -61,7 +61,6 @@ DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
|||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
NSLIBS = ../../lib/ns/libns.@A@
|
NSLIBS = ../../lib/ns/libns.@A@
|
||||||
|
|
||||||
@ -80,11 +79,6 @@ LIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
|
|||||||
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
|
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
|
||||||
@LIBS@
|
@LIBS@
|
||||||
|
|
||||||
NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
|
|
||||||
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
|
|
||||||
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
|
|
||||||
@LIBS@
|
|
||||||
|
|
||||||
SUBDIRS = unix
|
SUBDIRS = unix
|
||||||
|
|
||||||
TARGETS = named@EXEEXT@
|
TARGETS = named@EXEEXT@
|
||||||
@ -101,8 +95,6 @@ OBJS = builtin.@O@ config.@O@ control.@O@ \
|
|||||||
|
|
||||||
UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
|
UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
|
||||||
|
|
||||||
SYMOBJS = symtbl.@O@
|
|
||||||
|
|
||||||
GEOIP2LINKSRCS = geoip.c
|
GEOIP2LINKSRCS = geoip.c
|
||||||
|
|
||||||
SRCS = builtin.c config.c control.c \
|
SRCS = builtin.c config.c control.c \
|
||||||
@ -148,7 +140,6 @@ server.@O@: server.c
|
|||||||
-DVERSION=\"${VERSION}\" -c ${srcdir}/server.c
|
-DVERSION=\"${VERSION}\" -c ${srcdir}/server.c
|
||||||
|
|
||||||
named@EXEEXT@: ${OBJS} ${DEPLIBS}
|
named@EXEEXT@: ${OBJS} ${DEPLIBS}
|
||||||
export MAKE_SYMTABLE="yes"; \
|
|
||||||
export BASEOBJS="${OBJS} ${UOBJS}"; \
|
export BASEOBJS="${OBJS} ${UOBJS}"; \
|
||||||
${FINALBUILDCMD}
|
${FINALBUILDCMD}
|
||||||
|
|
||||||
@ -184,6 +175,3 @@ uninstall::
|
|||||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named@EXEEXT@
|
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named@EXEEXT@
|
||||||
|
|
||||||
@DLZ_DRIVER_RULES@
|
@DLZ_DRIVER_RULES@
|
||||||
|
|
||||||
named-symtbl.@O@: named-symtbl.c
|
|
||||||
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c named-symtbl.c
|
|
||||||
|
@ -200,7 +200,6 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type,
|
|||||||
int i, nframes;
|
int i, nframes;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
const char *logsuffix = "";
|
const char *logsuffix = "";
|
||||||
const char *fname;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle assertion failures.
|
* Handle assertion failures.
|
||||||
@ -224,27 +223,10 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type,
|
|||||||
isc_assertion_typetotext(type), cond, logsuffix);
|
isc_assertion_typetotext(type), cond, logsuffix);
|
||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS) {
|
||||||
for (i = 0; i < nframes; i++) {
|
for (i = 0; i < nframes; i++) {
|
||||||
unsigned long offset;
|
isc_log_write(
|
||||||
|
named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||||
fname = NULL;
|
NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL,
|
||||||
result = isc_backtrace_getsymbol(
|
"#%d %p in ??", i, tracebuf[i]);
|
||||||
tracebuf[i], &fname, &offset);
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
|
||||||
isc_log_write(named_g_lctx,
|
|
||||||
NAMED_LOGCATEGORY_GENERAL,
|
|
||||||
NAMED_LOGMODULE_MAIN,
|
|
||||||
ISC_LOG_CRITICAL,
|
|
||||||
"#%d %p in %s()+0x%lx", i,
|
|
||||||
tracebuf[i], fname,
|
|
||||||
offset);
|
|
||||||
} else {
|
|
||||||
isc_log_write(named_g_lctx,
|
|
||||||
NAMED_LOGCATEGORY_GENERAL,
|
|
||||||
NAMED_LOGMODULE_MAIN,
|
|
||||||
ISC_LOG_CRITICAL,
|
|
||||||
"#%d %p in ??", i,
|
|
||||||
tracebuf[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||||
@ -974,36 +956,6 @@ destroy_managers(void) {
|
|||||||
isc_nm_destroy(&named_g_nm);
|
isc_nm_destroy(&named_g_nm);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
dump_symboltable(void) {
|
|
||||||
int i;
|
|
||||||
isc_result_t result;
|
|
||||||
const char *fname;
|
|
||||||
const void *addr;
|
|
||||||
|
|
||||||
if (isc__backtrace_nsymbols == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isc_log_wouldlog(named_g_lctx, ISC_LOG_DEBUG(99))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
|
||||||
NAMED_LOGMODULE_MAIN, ISC_LOG_DEBUG(99), "Symbol table:");
|
|
||||||
|
|
||||||
for (i = 0, result = ISC_R_SUCCESS; result == ISC_R_SUCCESS; i++) {
|
|
||||||
addr = NULL;
|
|
||||||
fname = NULL;
|
|
||||||
result = isc_backtrace_getsymbolfromindex(i, &addr, &fname);
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
|
||||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
|
||||||
NAMED_LOGMODULE_MAIN, ISC_LOG_DEBUG(99),
|
|
||||||
"[%d] %p %s", i, addr, fname);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
setup(void) {
|
setup(void) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
@ -1191,8 +1143,6 @@ setup(void) {
|
|||||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||||
"----------------------------------------------------");
|
"----------------------------------------------------");
|
||||||
|
|
||||||
dump_symboltable();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the initial resource limits.
|
* Get the initial resource limits.
|
||||||
*/
|
*/
|
||||||
|
@ -29,7 +29,6 @@ CWARNINGS =
|
|||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||||
|
|
||||||
@ -45,9 +44,6 @@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
|
|||||||
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} \
|
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} \
|
||||||
${ISCCFGLIBS} ${ISCLIBS} @LIBS@
|
${ISCCFGLIBS} ${ISCLIBS} @LIBS@
|
||||||
|
|
||||||
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} \
|
|
||||||
${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@
|
|
||||||
|
|
||||||
SUBDIRS =
|
SUBDIRS =
|
||||||
|
|
||||||
TARGETS = nsupdate@EXEEXT@
|
TARGETS = nsupdate@EXEEXT@
|
||||||
|
@ -24,7 +24,6 @@ CWARNINGS =
|
|||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
|
|
||||||
@ -35,7 +34,6 @@ DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
|||||||
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
||||||
|
|
||||||
LIBS = ${ISCLIBS} @LIBS@
|
LIBS = ${ISCLIBS} @LIBS@
|
||||||
NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@
|
|
||||||
|
|
||||||
RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS}
|
RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS}
|
||||||
|
|
||||||
|
@ -22,12 +22,10 @@ BACKTRACECFLAGS = @BACKTRACECFLAGS@
|
|||||||
|
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
|
|
||||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||||
ISCDEPNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
|
|
||||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
|
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
|
2
bin/tests/optional/.gitignore
vendored
2
bin/tests/optional/.gitignore
vendored
@ -1,5 +1,3 @@
|
|||||||
/backtrace_test.dSYM/
|
/backtrace_test.dSYM/
|
||||||
/backtrace_test0.dSYM/
|
/backtrace_test0.dSYM/
|
||||||
/backtrace_test_nosymtbl
|
|
||||||
/backtrace_test_nosymtbl.dSYM/
|
|
||||||
/nsecify
|
/nsecify
|
||||||
|
@ -24,12 +24,10 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
|||||||
|
|
||||||
DNSLIBS = ../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
ISCLIBS = ../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@
|
||||||
|
|
||||||
DNSDEPLIBS = ../../../lib/dns/libdns.@A@
|
DNSDEPLIBS = ../../../lib/dns/libdns.@A@
|
||||||
ISCDEPLIBS = ../../../lib/isc/libisc.@A@
|
ISCDEPLIBS = ../../../lib/isc/libisc.@A@
|
||||||
ISCDEPNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@
|
|
||||||
ISCCFGDEPLIBS = ../../../lib/isccfg/libisccfg.@A@
|
ISCCFGDEPLIBS = ../../../lib/isccfg/libisccfg.@A@
|
||||||
|
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
@ -44,7 +42,6 @@ TARGETS = @XTARGETS@
|
|||||||
XTARGETS = adb_test@EXEEXT@ \
|
XTARGETS = adb_test@EXEEXT@ \
|
||||||
byaddr_test@EXEEXT@ \
|
byaddr_test@EXEEXT@ \
|
||||||
backtrace_test@EXEEXT@ \
|
backtrace_test@EXEEXT@ \
|
||||||
backtrace_test_nosymtbl@EXEEXT@ \
|
|
||||||
byname_test@EXEEXT@ \
|
byname_test@EXEEXT@ \
|
||||||
db_test@EXEEXT@ \
|
db_test@EXEEXT@ \
|
||||||
gsstest@EXEEXT@ \
|
gsstest@EXEEXT@ \
|
||||||
@ -109,27 +106,10 @@ adb_test@EXEEXT@: adb_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
|||||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ adb_test.@O@ \
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ adb_test.@O@ \
|
||||||
${DNSLIBS} ${ISCLIBS} ${LIBS}
|
${DNSLIBS} ${ISCLIBS} ${LIBS}
|
||||||
|
|
||||||
backtrace_test_nosymtbl@EXEEXT@: ${srcdir}/backtrace_test.c ${ISCDEPLIBS}
|
backtrace_test@EXEEXT@: ${srcdir}/backtrace_test.c ${ISCDEPLIBS}
|
||||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${BTTEST_CFLAGS} ${LDFLAGS} -o $@ \
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${BTTEST_CFLAGS} ${LDFLAGS} -o $@ \
|
||||||
${srcdir}/backtrace_test.c ${ISCLIBS} ${LIBS}
|
${srcdir}/backtrace_test.c ${ISCLIBS} ${LIBS}
|
||||||
|
|
||||||
backtrace_test@EXEEXT@: ${srcdir}/backtrace_test.c backtrace_test_nosymtbl@EXEEXT@
|
|
||||||
#first step: create a first symbol table
|
|
||||||
rm -f symtbl.c
|
|
||||||
cp ${top_srcdir}/lib/isc/backtrace-emptytbl.c symtbl.c
|
|
||||||
#second step: build a binary with the first symbol table
|
|
||||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${BTTEST_CFLAGS} ${LDFLAGS} \
|
|
||||||
-o $@0 ${srcdir}/backtrace_test.c symtbl.c \
|
|
||||||
${ISCNOSYMLIBS} ${LIBS}
|
|
||||||
rm -f symtbl.c
|
|
||||||
#third step: create a second symbol table
|
|
||||||
cp ${top_srcdir}/lib/isc/backtrace-emptytbl.c symtbl.c
|
|
||||||
#fourth step: build the final binary
|
|
||||||
rm -f $@0
|
|
||||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${BTTEST_CFLAGS} ${LDFLAGS} \
|
|
||||||
-o $@ ${srcdir}/backtrace_test.c symtbl.c ${ISCNOSYMLIBS} ${LIBS}
|
|
||||||
rm -f symtbl.c
|
|
||||||
|
|
||||||
nsecify@EXEEXT@: nsecify.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
nsecify@EXEEXT@: nsecify.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nsecify.@O@ \
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nsecify.@O@ \
|
||||||
${DNSLIBS} ${ISCLIBS} ${LIBS}
|
${DNSLIBS} ${ISCLIBS} ${LIBS}
|
||||||
|
@ -16,16 +16,11 @@
|
|||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/result.h>
|
#include <isc/result.h>
|
||||||
|
|
||||||
const char *expected_symbols[] = { "func3", "func2", "func1", "main" };
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
func3() {
|
func3() {
|
||||||
void *tracebuf[16];
|
void *tracebuf[16];
|
||||||
int i, nframes;
|
int nframes;
|
||||||
int error = 0;
|
|
||||||
const char *fname;
|
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
unsigned long offset;
|
|
||||||
|
|
||||||
result = isc_backtrace_gettrace(tracebuf, 16, &nframes);
|
result = isc_backtrace_gettrace(tracebuf, 16, &nframes);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
@ -35,39 +30,12 @@ func3() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nframes < 4) {
|
if (nframes < 4) {
|
||||||
error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < 4 && i < nframes; i++) {
|
|
||||||
fname = NULL;
|
|
||||||
result = isc_backtrace_getsymbol(tracebuf[i], &fname, &offset);
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
|
||||||
error++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (strcmp(fname, expected_symbols[i]) != 0) {
|
|
||||||
error++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
printf("Unexpected result:\n");
|
printf("Unexpected result:\n");
|
||||||
printf(" # of frames: %d (expected: at least 4)\n", nframes);
|
printf(" # of frames: %d (expected: at least 4)\n", nframes);
|
||||||
printf(" symbols:\n");
|
return (1);
|
||||||
for (i = 0; i < nframes; i++) {
|
|
||||||
fname = NULL;
|
|
||||||
result = isc_backtrace_getsymbol(tracebuf[i], &fname,
|
|
||||||
&offset);
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
|
||||||
printf(" [%d] %s\n", i, fname);
|
|
||||||
} else {
|
|
||||||
printf(" [%d] %p getsymbol failed: %s\n", i,
|
|
||||||
tracebuf[i], isc_result_totext(result));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (error);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -26,7 +26,6 @@ CWARNINGS =
|
|||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
|
|
||||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||||
@ -35,7 +34,6 @@ ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
|||||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
|
|
||||||
LIBS = ${ISCLIBS} @LIBS@
|
LIBS = ${ISCLIBS} @LIBS@
|
||||||
NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@
|
|
||||||
|
|
||||||
SUBDIRS =
|
SUBDIRS =
|
||||||
|
|
||||||
|
@ -64,7 +64,6 @@ OBJS = pk11.@O@ pk11_result.@O@ \
|
|||||||
string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
|
string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
|
||||||
tm.@O@ timer.@O@ version.@O@ \
|
tm.@O@ timer.@O@ version.@O@ \
|
||||||
${UNIXOBJS} ${THREADOBJS}
|
${UNIXOBJS} ${THREADOBJS}
|
||||||
SYMTBLOBJS = backtrace-emptytbl.@O@
|
|
||||||
|
|
||||||
# Alphabetically
|
# Alphabetically
|
||||||
SRCS = pk11.c pk11_result.c \
|
SRCS = pk11.c pk11_result.c \
|
||||||
@ -102,19 +101,19 @@ version.@O@: version.c
|
|||||||
-DLIBAGE=${LIBAGE} \
|
-DLIBAGE=${LIBAGE} \
|
||||||
-c ${srcdir}/version.c
|
-c ${srcdir}/version.c
|
||||||
|
|
||||||
libisc.@SA@: ${OBJS} ${SYMTBLOBJS}
|
libisc.@SA@: ${OBJS}
|
||||||
${AR} ${ARFLAGS} $@ ${OBJS} ${SYMTBLOBJS}
|
${AR} ${ARFLAGS} $@ ${OBJS}
|
||||||
${RANLIB} $@
|
${RANLIB} $@
|
||||||
|
|
||||||
libisc-nosymtbl.@SA@: ${OBJS}
|
libisc-nosymtbl.@SA@: ${OBJS}
|
||||||
${AR} ${ARFLAGS} $@ ${OBJS}
|
${AR} ${ARFLAGS} $@ ${OBJS}
|
||||||
${RANLIB} $@
|
${RANLIB} $@
|
||||||
|
|
||||||
libisc.la: ${OBJS} ${SYMTBLOBJS}
|
libisc.la: ${OBJS}
|
||||||
${LIBTOOL_MODE_LINK} \
|
${LIBTOOL_MODE_LINK} \
|
||||||
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc.la -rpath ${libdir} \
|
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc.la -rpath ${libdir} \
|
||||||
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
|
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
|
||||||
${OBJS} ${SYMTBLOBJS} ${LIBS}
|
${OBJS} ${LIBS}
|
||||||
|
|
||||||
libisc-nosymtbl.la: ${OBJS}
|
libisc-nosymtbl.la: ${OBJS}
|
||||||
${LIBTOOL_MODE_LINK} \
|
${LIBTOOL_MODE_LINK} \
|
||||||
|
@ -97,7 +97,6 @@ default_callback(const char *file, int line, isc_assertiontype_t type,
|
|||||||
void *tracebuf[BACKTRACE_MAXFRAME];
|
void *tracebuf[BACKTRACE_MAXFRAME];
|
||||||
int i, nframes;
|
int i, nframes;
|
||||||
const char *logsuffix = ".";
|
const char *logsuffix = ".";
|
||||||
const char *fname;
|
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
|
||||||
result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes);
|
result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes);
|
||||||
@ -110,18 +109,7 @@ default_callback(const char *file, int line, isc_assertiontype_t type,
|
|||||||
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS) {
|
||||||
for (i = 0; i < nframes; i++) {
|
for (i = 0; i < nframes; i++) {
|
||||||
unsigned long offset;
|
fprintf(stderr, "#%d %p in ??\n", i, tracebuf[i]);
|
||||||
|
|
||||||
fname = NULL;
|
|
||||||
result = isc_backtrace_getsymbol(tracebuf[i], &fname,
|
|
||||||
&offset);
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
|
||||||
fprintf(stderr, "#%d %p in %s()+0x%lx\n", i,
|
|
||||||
tracebuf[i], fname, offset);
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "#%d %p in ??\n", i,
|
|
||||||
tracebuf[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*
|
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
|
||||||
* information regarding copyright ownership.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! \file */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file defines an empty (default) symbol table used in backtrace.c
|
|
||||||
* If the application wants to have a complete symbol table, it should redefine
|
|
||||||
* isc__backtrace_symtable with the complete table in some way, and link the
|
|
||||||
* version of the library not including this definition
|
|
||||||
* (e.g. libisc-nosymbol.a).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <isc/backtrace.h>
|
|
||||||
|
|
||||||
LIBISC_EXTERNAL_DATA const int isc__backtrace_nsymbols = 0;
|
|
||||||
LIBISC_EXTERNAL_DATA const isc_backtrace_symmap_t isc__backtrace_symtable[] = {
|
|
||||||
{ NULL, "" }
|
|
||||||
};
|
|
@ -221,80 +221,3 @@ isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) {
|
|||||||
return (ISC_R_NOTIMPLEMENTED);
|
return (ISC_R_NOTIMPLEMENTED);
|
||||||
}
|
}
|
||||||
#endif /* ifdef BACKTRACE_LIBC */
|
#endif /* ifdef BACKTRACE_LIBC */
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
isc_backtrace_getsymbolfromindex(int idx, const void **addrp,
|
|
||||||
const char **symbolp) {
|
|
||||||
REQUIRE(addrp != NULL && *addrp == NULL);
|
|
||||||
REQUIRE(symbolp != NULL && *symbolp == NULL);
|
|
||||||
|
|
||||||
if (idx < 0 || idx >= isc__backtrace_nsymbols) {
|
|
||||||
return (ISC_R_RANGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
*addrp = isc__backtrace_symtable[idx].addr;
|
|
||||||
*symbolp = isc__backtrace_symtable[idx].symbol;
|
|
||||||
return (ISC_R_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
symtbl_compare(const void *addr, const void *entryarg) {
|
|
||||||
const isc_backtrace_symmap_t *entry = entryarg;
|
|
||||||
const isc_backtrace_symmap_t *end =
|
|
||||||
&isc__backtrace_symtable[isc__backtrace_nsymbols - 1];
|
|
||||||
|
|
||||||
if (isc__backtrace_nsymbols == 1 || entry == end) {
|
|
||||||
if (addr >= entry->addr) {
|
|
||||||
/*
|
|
||||||
* If addr is equal to or larger than that of the last
|
|
||||||
* entry of the table, we cannot be sure if this is
|
|
||||||
* within a valid range so we consider it valid.
|
|
||||||
*/
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* entry + 1 is a valid entry from now on. */
|
|
||||||
if (addr < entry->addr) {
|
|
||||||
return (-1);
|
|
||||||
} else if (addr >= (entry + 1)->addr) {
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
isc_backtrace_getsymbol(const void *addr, const char **symbolp,
|
|
||||||
unsigned long *offsetp) {
|
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
|
||||||
isc_backtrace_symmap_t *found;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Validate the arguments: intentionally avoid using REQUIRE().
|
|
||||||
* See notes in backtrace.h.
|
|
||||||
*/
|
|
||||||
if (symbolp == NULL || *symbolp != NULL || offsetp == NULL) {
|
|
||||||
return (ISC_R_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isc__backtrace_nsymbols < 1) {
|
|
||||||
return (ISC_R_NOTFOUND);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Search the table for the entry that meets:
|
|
||||||
* entry.addr <= addr < next_entry.addr.
|
|
||||||
*/
|
|
||||||
found = bsearch(addr, isc__backtrace_symtable, isc__backtrace_nsymbols,
|
|
||||||
sizeof(isc__backtrace_symtable[0]), symtbl_compare);
|
|
||||||
if (found == NULL) {
|
|
||||||
result = ISC_R_NOTFOUND;
|
|
||||||
} else {
|
|
||||||
*symbolp = found->symbol;
|
|
||||||
*offsetp = (unsigned long)((const char *)addr -
|
|
||||||
(char *)found->addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (result);
|
|
||||||
}
|
|
||||||
|
@ -39,18 +39,6 @@
|
|||||||
|
|
||||||
#include <isc/types.h>
|
#include <isc/types.h>
|
||||||
|
|
||||||
/***
|
|
||||||
*** Types
|
|
||||||
***/
|
|
||||||
struct isc_backtrace_symmap {
|
|
||||||
void * addr;
|
|
||||||
const char *symbol;
|
|
||||||
};
|
|
||||||
|
|
||||||
LIBISC_EXTERNAL_DATA extern const int isc__backtrace_nsymbols;
|
|
||||||
LIBISC_EXTERNAL_DATA extern const isc_backtrace_symmap_t
|
|
||||||
isc__backtrace_symtable[];
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Functions
|
*** Functions
|
||||||
***/
|
***/
|
||||||
@ -77,49 +65,6 @@ isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes);
|
|||||||
*\li #ISC_R_NOTFOUND
|
*\li #ISC_R_NOTFOUND
|
||||||
*\li #ISC_R_NOTIMPLEMENTED
|
*\li #ISC_R_NOTIMPLEMENTED
|
||||||
*/
|
*/
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
isc_backtrace_getsymbolfromindex(int index, const void **addrp,
|
|
||||||
const char **symbolp);
|
|
||||||
/*%<
|
|
||||||
* Returns the content of the internal symbol table of the given index.
|
|
||||||
* On success, *addrsp and *symbolp point to the address and the symbol of
|
|
||||||
* the 'index'th entry of the table, respectively. If 'index' is not in the
|
|
||||||
* range of the symbol table, ISC_R_RANGE will be returned.
|
|
||||||
*
|
|
||||||
* Requires
|
|
||||||
*
|
|
||||||
*\li 'addrp' must be non NULL && '*addrp' == NULL.
|
|
||||||
*
|
|
||||||
*\li 'symbolp' must be non NULL && '*symbolp' == NULL.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
*
|
|
||||||
*\li #ISC_R_SUCCESS
|
|
||||||
*\li #ISC_R_RANGE
|
|
||||||
*/
|
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
isc_backtrace_getsymbol(const void *addr, const char **symbolp,
|
|
||||||
unsigned long *offsetp);
|
|
||||||
/*%<
|
|
||||||
* Searches the internal symbol table for the symbol that most matches the
|
|
||||||
* given 'addr'. On success, '*symbolp' will point to the name of function
|
|
||||||
* to which the address 'addr' belong, and '*offsetp' will store the offset
|
|
||||||
* from the function's entry address to 'addr'.
|
|
||||||
*
|
|
||||||
* Requires (note that these are not ensured by assertion checks, see above):
|
|
||||||
*
|
|
||||||
*\li 'symbolp' must be non NULL && '*symbolp' == NULL.
|
|
||||||
*
|
|
||||||
*\li 'offsetp' must be non NULL.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
*
|
|
||||||
*\li #ISC_R_SUCCESS
|
|
||||||
*\li #ISC_R_FAILURE
|
|
||||||
*\li #ISC_R_NOTFOUND
|
|
||||||
*/
|
|
||||||
ISC_LANG_ENDDECLS
|
ISC_LANG_ENDDECLS
|
||||||
|
|
||||||
#endif /* ISC_BACKTRACE_H */
|
#endif /* ISC_BACKTRACE_H */
|
||||||
|
@ -33,8 +33,6 @@
|
|||||||
|
|
||||||
typedef struct isc_astack isc_astack_t; /*%< Array-based fast stack */
|
typedef struct isc_astack isc_astack_t; /*%< Array-based fast stack */
|
||||||
typedef struct isc_appctx isc_appctx_t; /*%< Application context */
|
typedef struct isc_appctx isc_appctx_t; /*%< Application context */
|
||||||
typedef struct isc_backtrace_symmap isc_backtrace_symmap_t; /*%< Symbol Table
|
|
||||||
* Entry */
|
|
||||||
typedef struct isc_buffer isc_buffer_t; /*%< Buffer */
|
typedef struct isc_buffer isc_buffer_t; /*%< Buffer */
|
||||||
typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */
|
typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */
|
||||||
typedef struct isc_constregion isc_constregion_t; /*%< Const region */
|
typedef struct isc_constregion isc_constregion_t; /*%< Const region */
|
||||||
|
@ -125,8 +125,6 @@ isc_appctx_destroy
|
|||||||
isc_assertion_failed
|
isc_assertion_failed
|
||||||
isc_assertion_setcallback
|
isc_assertion_setcallback
|
||||||
isc_assertion_typetotext
|
isc_assertion_typetotext
|
||||||
isc_backtrace_getsymbol
|
|
||||||
isc_backtrace_getsymbolfromindex
|
|
||||||
isc_backtrace_gettrace
|
isc_backtrace_gettrace
|
||||||
isc_base32_decoderegion
|
isc_base32_decoderegion
|
||||||
isc_base32_decodestring
|
isc_base32_decodestring
|
||||||
@ -755,8 +753,6 @@ syslog
|
|||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
|
|
||||||
isc__backtrace_nsymbols DATA
|
|
||||||
isc__backtrace_symtable DATA
|
|
||||||
isc_bind9 DATA
|
isc_bind9 DATA
|
||||||
isc_commandline_argument DATA
|
isc_commandline_argument DATA
|
||||||
isc_commandline_errprint DATA
|
isc_commandline_errprint DATA
|
||||||
|
@ -461,9 +461,6 @@
|
|||||||
<ClCompile Include="..\backtrace.c">
|
<ClCompile Include="..\backtrace.c">
|
||||||
<Filter>Library Source Files</Filter>
|
<Filter>Library Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\backtrace-emptytbl.c">
|
|
||||||
<Filter>Library Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\base32.c">
|
<ClCompile Include="..\base32.c">
|
||||||
<Filter>Library Source Files</Filter>
|
<Filter>Library Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -414,7 +414,6 @@ copy InstallFiles ..\Build\Release\
|
|||||||
<ClCompile Include="..\app.c" />
|
<ClCompile Include="..\app.c" />
|
||||||
<ClCompile Include="..\assertions.c" />
|
<ClCompile Include="..\assertions.c" />
|
||||||
<ClCompile Include="..\astack.c" />
|
<ClCompile Include="..\astack.c" />
|
||||||
<ClCompile Include="..\backtrace-emptytbl.c" />
|
|
||||||
<ClCompile Include="..\backtrace.c" />
|
<ClCompile Include="..\backtrace.c" />
|
||||||
<ClCompile Include="..\base32.c" />
|
<ClCompile Include="..\base32.c" />
|
||||||
<ClCompile Include="..\base64.c" />
|
<ClCompile Include="..\base64.c" />
|
||||||
|
@ -2123,7 +2123,6 @@
|
|||||||
./lib/isc/app.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2013,2014,2015,2016,2017,2018,2019,2020
|
./lib/isc/app.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2013,2014,2015,2016,2017,2018,2019,2020
|
||||||
./lib/isc/assertions.c C 1997,1998,1999,2000,2001,2004,2005,2007,2008,2009,2015,2016,2018,2019,2020
|
./lib/isc/assertions.c C 1997,1998,1999,2000,2001,2004,2005,2007,2008,2009,2015,2016,2018,2019,2020
|
||||||
./lib/isc/astack.c C 2019,2020
|
./lib/isc/astack.c C 2019,2020
|
||||||
./lib/isc/backtrace-emptytbl.c C 2009,2016,2018,2019,2020
|
|
||||||
./lib/isc/backtrace.c C 2009,2013,2014,2015,2016,2018,2019,2020
|
./lib/isc/backtrace.c C 2009,2013,2014,2015,2016,2018,2019,2020
|
||||||
./lib/isc/base32.c C 2008,2009,2013,2014,2015,2016,2018,2019,2020
|
./lib/isc/base32.c C 2008,2009,2013,2014,2015,2016,2018,2019,2020
|
||||||
./lib/isc/base64.c C 1998,1999,2000,2001,2003,2004,2005,2007,2009,2013,2014,2015,2016,2018,2019,2020
|
./lib/isc/base64.c C 1998,1999,2000,2001,2003,2004,2005,2007,2009,2013,2014,2015,2016,2018,2019,2020
|
||||||
|
Loading…
x
Reference in New Issue
Block a user