aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-17 23:30:55 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-17 23:30:55 +0000
commite81ed3fc262e65b8e5f2a3d207c1b435ca2e669d (patch)
tree74460e8cd1b5b2149afa0f07b856a96ad8bac972 /include
parent1c923ad9517ce0ce50806f1348fc861089285b01 (diff)
Merged revisions 298905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r298905 | tilghman | 2010-12-17 15:40:56 -0600 (Fri, 17 Dec 2010) | 6 lines Let Asterisk find better backtrace information with libbfd. The menuselect option BETTER_BACKTRACES, if enabled, will use libbfd to search for better symbol information within both the Asterisk binary, as well as loaded modules, to assist when using inline backtraces to track down problems. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@298957 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/autoconfig.h.in6
-rw-r--r--include/asterisk/logger.h10
-rw-r--r--include/asterisk/utils.h9
3 files changed, 25 insertions, 0 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index ae5f9d136..327a44ee0 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -110,6 +110,9 @@
/* Define to 1 if your GCC C compiler supports the 'weak_import' attribute. */
#undef HAVE_ATTRIBUTE_weak_import
+/* Define to 1 if you have the Debug symbol decoding library. */
+#undef HAVE_BFD
+
/* Define to 1 if you have the Stack Backtrace library. */
#undef HAVE_BKTR
@@ -165,6 +168,9 @@
*/
#undef HAVE_DIRENT_H
+/* Define to 1 if your system has the dladdr() GNU extension */
+#undef HAVE_DLADDR
+
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h
index 65448cfe4..214738a25 100644
--- a/include/asterisk/logger.h
+++ b/include/asterisk/logger.h
@@ -276,6 +276,16 @@ int ast_bt_get_addresses(struct ast_bt *bt);
*/
void *ast_bt_destroy(struct ast_bt *bt);
+/* \brief Retrieve symbols for a set of backtrace addresses
+ *
+ * \param addresses A list of addresses, such as the ->addresses structure element of struct ast_bt.
+ * \param num_frames Number of addresses in the addresses list
+ * \retval NULL Unable to allocate memory
+ * \return List of strings
+ * \since 1.6.2.16
+ */
+char **ast_bt_get_symbols(void **addresses, size_t num_frames);
+
#endif /* HAVE_BKTR */
#endif /* _LOGGER_BACKTRACE_H */
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 91de914b5..c940f4d51 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -726,4 +726,13 @@ int ast_str_to_eid(struct ast_eid *eid, const char *s);
*/
int ast_eid_cmp(const struct ast_eid *eid1, const struct ast_eid *eid2);
+/*!\brief Resolve a binary to a full pathname
+ * \param binary Name of the executable to resolve
+ * \param fullpath Buffer to hold the complete pathname
+ * \param fullpath_size Size of \a fullpath
+ * \retval NULL \a binary was not found or the environment variable PATH is not set
+ * \return \a fullpath
+ */
+char *ast_utils_which(const char *binary, char *fullpath, size_t fullpath_size);
+
#endif /* _ASTERISK_UTILS_H */