DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
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@
NSLIBS = ../../lib/ns/libns.@A@
NSDEPENDLIBS = ../../lib/ns/libns.@A@
LIBS = ${ISCLIBS} @LIBS@
-NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@
SUBDIRS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
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@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
-NOSYMLIBS = ${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@
-
CONFDEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
SRCS= rndc-confgen.c ddns-confgen.c
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
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}
IRSLIBS = ../../lib/irs/libirs.@A@
DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
LIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
-NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@
SUBDIRS =
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
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@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
-NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
- ${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@
-
SUBDIRS =
TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
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@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
-NOSYMLIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@
-
# Alphabetically
TARGETS = dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \
dnssec-importkey@EXEEXT@ dnssec-keyfromlabel@EXEEXT@ \
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
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@
NSLIBS = ../../lib/ns/libns.@A@
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
@LIBS@
-NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
- ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
- ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
- @LIBS@
-
SUBDIRS = unix
TARGETS = named@EXEEXT@
UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
-SYMOBJS = symtbl.@O@
-
GEOIP2LINKSRCS = geoip.c
SRCS = builtin.c config.c control.c \
-DVERSION=\"${VERSION}\" -c ${srcdir}/server.c
named@EXEEXT@: ${OBJS} ${DEPLIBS}
- export MAKE_SYMTABLE="yes"; \
export BASEOBJS="${OBJS} ${UOBJS}"; \
${FINALBUILDCMD}
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named@EXEEXT@
@DLZ_DRIVER_RULES@
-
-named-symtbl.@O@: named-symtbl.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c named-symtbl.c
int i, nframes;
isc_result_t result;
const char *logsuffix = "";
- const char *fname;
/*
* Handle assertion failures.
isc_assertion_typetotext(type), cond, logsuffix);
if (result == ISC_R_SUCCESS) {
for (i = 0; i < nframes; i++) {
- unsigned long offset;
-
- fname = NULL;
- result = isc_backtrace_getsymbol(
- 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,
+ NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL,
+ "#%d %p in ??", i, tracebuf[i]);
}
}
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
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
setup(void) {
isc_result_t result;
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"----------------------------------------------------");
- dump_symboltable();
-
/*
* Get the initial resource limits.
*/
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
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@
IRSLIBS = ../../lib/irs/libirs.@A@
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} \
${ISCCFGLIBS} ${ISCLIBS} @LIBS@
-NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} \
- ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@
-
SUBDIRS =
TARGETS = nsupdate@EXEEXT@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
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@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
LIBS = ${ISCLIBS} @LIBS@
-NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@
RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS}
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_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@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
-ISCDEPNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
LIBS = @LIBS@
/backtrace_test.dSYM/
/backtrace_test0.dSYM/
-/backtrace_test_nosymtbl
-/backtrace_test_nosymtbl.dSYM/
/nsecify
DNSLIBS = ../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_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@
DNSDEPLIBS = ../../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../../lib/isc/libisc.@A@
-ISCDEPNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@
ISCCFGDEPLIBS = ../../../lib/isccfg/libisccfg.@A@
LIBS = @LIBS@
XTARGETS = adb_test@EXEEXT@ \
byaddr_test@EXEEXT@ \
backtrace_test@EXEEXT@ \
- backtrace_test_nosymtbl@EXEEXT@ \
byname_test@EXEEXT@ \
db_test@EXEEXT@ \
gsstest@EXEEXT@ \
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ adb_test.@O@ \
${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 $@ \
${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}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nsecify.@O@ \
${DNSLIBS} ${ISCLIBS} ${LIBS}
#include <isc/print.h>
#include <isc/result.h>
-const char *expected_symbols[] = { "func3", "func2", "func1", "main" };
-
static int
func3() {
void *tracebuf[16];
- int i, nframes;
- int error = 0;
- const char *fname;
+ int nframes;
isc_result_t result;
- unsigned long offset;
result = isc_backtrace_gettrace(tracebuf, 16, &nframes);
if (result != ISC_R_SUCCESS) {
}
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(" # of frames: %d (expected: at least 4)\n", nframes);
- printf(" symbols:\n");
- 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 (1);
}
- return (error);
+ return (0);
}
static int
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
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@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
LIBS = ${ISCLIBS} @LIBS@
-NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@
SUBDIRS =
string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
tm.@O@ timer.@O@ version.@O@ \
${UNIXOBJS} ${THREADOBJS}
-SYMTBLOBJS = backtrace-emptytbl.@O@
# Alphabetically
SRCS = pk11.c pk11_result.c \
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
-libisc.@SA@: ${OBJS} ${SYMTBLOBJS}
- ${AR} ${ARFLAGS} $@ ${OBJS} ${SYMTBLOBJS}
+libisc.@SA@: ${OBJS}
+ ${AR} ${ARFLAGS} $@ ${OBJS}
${RANLIB} $@
libisc-nosymtbl.@SA@: ${OBJS}
${AR} ${ARFLAGS} $@ ${OBJS}
${RANLIB} $@
-libisc.la: ${OBJS} ${SYMTBLOBJS}
+libisc.la: ${OBJS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
- ${OBJS} ${SYMTBLOBJS} ${LIBS}
+ ${OBJS} ${LIBS}
libisc-nosymtbl.la: ${OBJS}
${LIBTOOL_MODE_LINK} \
void *tracebuf[BACKTRACE_MAXFRAME];
int i, nframes;
const char *logsuffix = ".";
- const char *fname;
isc_result_t result;
result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes);
if (result == ISC_R_SUCCESS) {
for (i = 0; i < nframes; i++) {
- unsigned long offset;
-
- 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]);
- }
+ fprintf(stderr, "#%d %p in ??\n", i, tracebuf[i]);
}
}
fflush(stderr);
+++ /dev/null
-/*
- * 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, "" }
-};
return (ISC_R_NOTIMPLEMENTED);
}
#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);
-}
#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
***/
*\li #ISC_R_NOTFOUND
*\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
#endif /* ISC_BACKTRACE_H */
/* Core Types. Alphabetized by defined type. */
-typedef struct isc_astack isc_astack_t; /*%< Array-based fast stack */
-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 ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */
-typedef struct isc_constregion isc_constregion_t; /*%< Const region */
+typedef struct isc_astack isc_astack_t; /*%< Array-based fast stack */
+typedef struct isc_appctx isc_appctx_t; /*%< Application context */
+typedef struct isc_buffer isc_buffer_t; /*%< Buffer */
+typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */
+typedef struct isc_constregion isc_constregion_t; /*%< Const region */
typedef struct isc_consttextregion isc_consttextregion_t; /*%< Const Text Region
*/
typedef struct isc_counter isc_counter_t; /*%< Counter */
isc_assertion_failed
isc_assertion_setcallback
isc_assertion_typetotext
-isc_backtrace_getsymbol
-isc_backtrace_getsymbolfromindex
isc_backtrace_gettrace
isc_base32_decoderegion
isc_base32_decodestring
EXPORTS
-isc__backtrace_nsymbols DATA
-isc__backtrace_symtable DATA
isc_bind9 DATA
isc_commandline_argument DATA
isc_commandline_errprint DATA
<ClCompile Include="..\backtrace.c">
<Filter>Library Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\backtrace-emptytbl.c">
- <Filter>Library Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\base32.c">
<Filter>Library Source Files</Filter>
</ClCompile>
<ClCompile Include="..\app.c" />
<ClCompile Include="..\assertions.c" />
<ClCompile Include="..\astack.c" />
- <ClCompile Include="..\backtrace-emptytbl.c" />
<ClCompile Include="..\backtrace.c" />
<ClCompile Include="..\base32.c" />
<ClCompile Include="..\base64.c" />
./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/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/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