1 |
/* |
/* |
2 |
* Copyright (C) 2005 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: ic_statistics.c,v 1.2 2005/12/19 02:16:39 debug Exp $ |
* $Id: ic_statistics.c,v 1.3 2006/03/30 19:36:03 debug Exp $ |
29 |
* |
* |
30 |
* This program is not optimized for speed, but it should work. |
* This program is not optimized for speed, but it should work. |
31 |
* |
* |
37 |
#include <stdlib.h> |
#include <stdlib.h> |
38 |
#include <string.h> |
#include <string.h> |
39 |
#include <sys/types.h> |
#include <sys/types.h> |
40 |
|
#include <inttypes.h> |
41 |
|
|
42 |
|
|
43 |
struct entry { |
struct entry { |
74 |
cache_s[n_cached_symbols - 1] = s; |
cache_s[n_cached_symbols - 1] = s; |
75 |
|
|
76 |
snprintf(tmp, sizeof(tmp), "nm ../gxemul | grep " |
snprintf(tmp, sizeof(tmp), "nm ../gxemul | grep " |
77 |
"%llx", (long long)s); |
"%"PRIx64, (uint64_t)s); |
78 |
q = popen(tmp, "r"); |
q = popen(tmp, "r"); |
79 |
if (q == NULL) { |
if (q == NULL) { |
80 |
perror("popen()"); |
perror("popen()"); |