aboutsummaryrefslogtreecommitdiffstats
path: root/utils
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 /utils
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 'utils')
-rw-r--r--utils/ael_main.c11
-rw-r--r--utils/check_expr.c12
-rw-r--r--utils/conf2ael.c12
-rw-r--r--utils/hashtest.c13
-rw-r--r--utils/hashtest2.c12
-rw-r--r--utils/refcounter.c13
6 files changed, 73 insertions, 0 deletions
diff --git a/utils/ael_main.c b/utils/ael_main.c
index 8b28d31d3..e5a7346ed 100644
--- a/utils/ael_main.c
+++ b/utils/ael_main.c
@@ -591,6 +591,17 @@ int ast_bt_get_addresses(struct ast_bt *bt)
return 0;
}
+char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+{
+ char **foo = calloc(num_frames, sizeof(char *) + 1);
+ if (foo) {
+ int i;
+ for (i = 0; i < num_frames; i++) {
+ foo[i] = (char *) foo + sizeof(char *) * num_frames;
+ }
+ }
+ return foo;
+}
#else
void ast_remove_lock_info(void *lock_addr)
{
diff --git a/utils/check_expr.c b/utils/check_expr.c
index a8d2e6525..b904b4824 100644
--- a/utils/check_expr.c
+++ b/utils/check_expr.c
@@ -73,6 +73,18 @@ int ast_bt_get_addresses(struct ast_bt *bt)
/* Suck it, you stupid utils directory! */
return 0;
}
+char **ast_bt_get_symbols(void **addresses, size_t num_frames);
+char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+{
+ char **foo = calloc(num_frames, sizeof(char *) + 1);
+ if (foo) {
+ int i;
+ for (i = 0; i < num_frames; i++) {
+ foo[i] = (char *) foo + sizeof(char *) * num_frames;
+ }
+ }
+ return foo;
+}
#else
void ast_store_lock_info(enum ast_lock_type type, const char *filename,
int line_num, const char *func, const char *lock_name, void *lock_addr);
diff --git a/utils/conf2ael.c b/utils/conf2ael.c
index 3b15336c3..cffd1bb67 100644
--- a/utils/conf2ael.c
+++ b/utils/conf2ael.c
@@ -724,6 +724,18 @@ int ast_bt_get_addresses(struct ast_bt *bt)
return 0;
}
+char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+{
+ char **foo = calloc(num_frames, sizeof(char *) + 1);
+ if (foo) {
+ int i;
+ for (i = 0; i < num_frames; i++) {
+ foo[i] = (char *) foo + sizeof(char *) * num_frames;
+ }
+ }
+ return foo;
+}
+
#else
void ast_remove_lock_info(void *lock_addr)
{
diff --git a/utils/hashtest.c b/utils/hashtest.c
index 16c5e1d9b..9ec597f4e 100644
--- a/utils/hashtest.c
+++ b/utils/hashtest.c
@@ -385,6 +385,19 @@ int ast_bt_get_addresses(struct ast_bt *bt)
return 0;
}
+char **ast_bt_get_symbols(void **addresses, size_t num_frames);
+char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+{
+ char **foo = calloc(num_frames, sizeof(char *) + 1);
+ if (foo) {
+ int i;
+ for (i = 0; i < num_frames; i++) {
+ foo[i] = (char *) foo + sizeof(char *) * num_frames;
+ }
+ }
+ return foo;
+}
+
void *ast_bt_destroy(struct ast_bt *bt);
void *ast_bt_destroy(struct ast_bt *bt)
{
diff --git a/utils/hashtest2.c b/utils/hashtest2.c
index a9fdf661b..7953decf6 100644
--- a/utils/hashtest2.c
+++ b/utils/hashtest2.c
@@ -395,6 +395,18 @@ int ast_bt_get_addresses(struct ast_bt *bt)
return -1;
}
+char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+{
+ char **foo = calloc(num_frames, sizeof(char *) + 1);
+ if (foo) {
+ int i;
+ for (i = 0; i < num_frames; i++) {
+ foo[i] = (char *) foo + sizeof(char *) * num_frames;
+ }
+ }
+ return foo;
+}
+
void *ast_bt_destroy(struct ast_bt *bt)
{
return NULL;
diff --git a/utils/refcounter.c b/utils/refcounter.c
index d71ebf1d8..1c679e822 100644
--- a/utils/refcounter.c
+++ b/utils/refcounter.c
@@ -287,6 +287,19 @@ int ast_bt_get_addresses(struct ast_bt *bt)
return 0;
}
+char **ast_bt_get_symbols(void **addresses, size_t num_frames);
+char **ast_bt_get_symbols(void **addresses, size_t num_frames)
+{
+ char **foo = calloc(num_frames, sizeof(char *) + 1);
+ if (foo) {
+ int i;
+ for (i = 0; i < num_frames; i++) {
+ foo[i] = (char *) foo + sizeof(char *) * num_frames;
+ }
+ }
+ return foo;
+}
+
void *ast_bt_destroy(struct ast_bt *bt);
void *ast_bt_destroy(struct ast_bt *bt)
{