Meng Hu | ae7b91b | 2009-11-05 16:10:50 -0600 | [diff] [blame] | 1 | #ifndef SYMBOL_TABLE_H |
| 2 | #define SYMBOL_TABLE_H |
| 3 | |
| 4 | struct symbol { |
| 5 | unsigned int addr; |
| 6 | unsigned int size; |
| 7 | char *name; |
| 8 | }; |
| 9 | |
| 10 | struct symbol_table { |
| 11 | struct symbol *symbols; |
| 12 | int num_symbols; |
Bruce Beare | 6cc4923 | 2010-10-13 16:11:15 -0700 | [diff] [blame] | 13 | char *name; |
Meng Hu | ae7b91b | 2009-11-05 16:10:50 -0600 | [diff] [blame] | 14 | }; |
| 15 | |
| 16 | struct symbol_table *symbol_table_create(const char *filename); |
| 17 | void symbol_table_free(struct symbol_table *table); |
| 18 | const struct symbol *symbol_table_lookup(struct symbol_table *table, unsigned int addr); |
| 19 | |
| 20 | #endif |