diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-12-18 00:08:13 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-12-18 00:08:13 +0000 |
commit | b98e47d1195bd6e1da8aae20844095bec1d88847 (patch) | |
tree | 6df839e0e6f2e1b5ae9c9524ed3942edd3d562e3 /utils | |
parent | d8744246aa377d2275f6f72e745ee11bdc13bac8 (diff) |
Merged revisions 298960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r298960 | tilghman | 2010-12-17 17:52:04 -0600 (Fri, 17 Dec 2010) | 20 lines
Merged revisions 298957 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r298957 | tilghman | 2010-12-17 17:30:55 -0600 (Fri, 17 Dec 2010) | 13 lines
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.
Review: https://reviewboard.asterisk.org/r/1055/
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ael_main.c | 11 | ||||
-rw-r--r-- | utils/check_expr.c | 12 | ||||
-rw-r--r-- | utils/conf2ael.c | 12 | ||||
-rw-r--r-- | utils/hashtest.c | 13 | ||||
-rw-r--r-- | utils/hashtest2.c | 12 | ||||
-rw-r--r-- | utils/refcounter.c | 13 |
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 48a18392c..538818b25 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) { |