25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: symbol_demangle.c,v 1.7 2006/12/30 13:30:53 debug Exp $ |
* $Id: symbol_demangle.c,v 1.8 2007/06/15 17:02:38 debug Exp $ |
29 |
* |
* |
30 |
* C++ symbol name demangling. |
* C++ symbol name demangling. |
31 |
* |
* |
65 |
*/ |
*/ |
66 |
static char *symbol_demangle_cplusplus_nested(char *name) |
static char *symbol_demangle_cplusplus_nested(char *name) |
67 |
{ |
{ |
68 |
char *result = malloc(MAXLEN + 1); |
char *result; |
69 |
size_t result_len = 0, len; |
size_t result_len = 0, len; |
70 |
int first = 1, type_added = 0, pointercounter, reference; |
int first = 1, type_added = 0, pointercounter, reference; |
71 |
|
|
72 |
|
CHECK_ALLOCATION(result = malloc(MAXLEN + 1)); |
73 |
result[0] = '\0'; |
result[0] = '\0'; |
74 |
|
|
75 |
while (name[0] && name[0] != 'E' && result_len < MAXLEN) { |
while (name[0] && name[0] != 'E' && result_len < MAXLEN) { |