Make process_lookup_symbol() return a string. Delete

2006-08-20  Soren Sandmann  <sandmann@daimi.au.dk>

	* process.h: Make process_lookup_symbol() return a string. Delete
	process_lookup_symbol_with_filename().

	* process.c (struct Process): Make "undefined" a string
	(lookup_kernel_symbol): Return a string
	(process_lookup_symbol): Return a string, not a symbol

	* collector.c (unique_dup): Take a string instead of a
	Symbol.
	(lookup_symbol): Make sym a string instead of a Symbol.

	* binfile.c (bin_symbol_get_name): New function.

	* binfile.[ch] (struct BinSymbol): Rename Symbol to BinSymbol and
	make it an opaque structure.

	* binfile.[ch]: Remove unused symbol operations
This commit is contained in:
Soren Sandmann
2006-08-21 02:33:38 +00:00
committed by Søren Sandmann Pedersen
parent 7d8f3c232d
commit a880ee7f60
6 changed files with 67 additions and 105 deletions

View File

@ -265,15 +265,15 @@ typedef struct
} ResolveInfo;
static char *
unique_dup (GHashTable *unique_symbols, char *s)
unique_dup (GHashTable *unique_symbols, const char *sym)
{
char *result;
result = g_hash_table_lookup (unique_symbols, s);
result = g_hash_table_lookup (unique_symbols, sym);
if (!result)
{
result = g_strdup (s);
g_hash_table_insert (unique_symbols, s, result);
result = g_strdup (sym);
g_hash_table_insert (unique_symbols, (char *)sym, result);
}
return result;
@ -282,9 +282,9 @@ unique_dup (GHashTable *unique_symbols, char *s)
static char *
lookup_symbol (Process *process, gpointer address, GHashTable *unique_symbols)
{
const Symbol *s = process_lookup_symbol (process, (gulong)address);
const char *sym = process_lookup_symbol (process, (gulong)address);
return unique_dup (unique_symbols, s->name);
return unique_dup (unique_symbols, sym);
}
static void