25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: symbol.c,v 1.34 2006/01/14 12:51:59 debug Exp $ |
* $Id: symbol.c,v 1.35 2006/03/22 21:39:23 debug Exp $ |
29 |
* |
* |
30 |
* Address to symbol translation routines. |
* Address to symbol translation routines. |
31 |
* |
* |
37 |
#include <stdlib.h> |
#include <stdlib.h> |
38 |
#include <string.h> |
#include <string.h> |
39 |
|
|
|
#include "misc.h" |
|
|
|
|
40 |
#include "symbol.h" |
#include "symbol.h" |
41 |
|
|
42 |
|
|
266 |
exit(1); |
exit(1); |
267 |
} |
} |
268 |
|
|
269 |
s->name = strdup(name); |
memset(s, 0, sizeof(struct symbol)); |
270 |
|
|
271 |
|
s->name = symbol_demangle_cplusplus(name); |
272 |
|
|
273 |
if (s->name == NULL) { |
if (s->name == NULL) { |
274 |
fprintf(stderr, "out of memory\n"); |
s->name = strdup(name); |
275 |
exit(1); |
if (s->name == NULL) { |
276 |
|
fprintf(stderr, "out of memory\n"); |
277 |
|
exit(1); |
278 |
|
} |
279 |
} |
} |
280 |
|
|
281 |
s->addr = addr; |
s->addr = addr; |
282 |
s->len = len; |
s->len = len; |
283 |
s->type = type; |
s->type = type; |