Add commented out code to reject callback.

2008-02-17  Soren Sandmann  <sandmann@redhat.com>

	* collector.c (lookup_symbol): Add commented out code to reject
	callback.

	* elfparser.c (struct ElfParser): Store the filename if any
	(elf_parser_get_sym_address): Subtract the load address, so the
	result will be an offset into the text section.

	* process.[ch] (process_lookup_symbol): Add an offset out-argument
	
	* binfile.[ch] (bin_symbol_get_address): New function

	* TODO: updates



svn path=/trunk/; revision=397
This commit is contained in:
Soren Sandmann
2008-02-17 23:31:19 +00:00
committed by Søren Sandmann Pedersen
parent 9d2f7a1a9d
commit b98db05f9b
8 changed files with 100 additions and 18 deletions

View File

@ -673,7 +673,7 @@ process_lookup_kernel_symbol (gulong address,
}
const char *
process_lookup_symbol (Process *process, gulong address)
process_lookup_symbol (Process *process, gulong address, gulong *offset)
{
static const char *const kernel = "kernel";
const BinSymbol *result;
@ -752,6 +752,17 @@ process_lookup_symbol (Process *process, gulong address)
#endif
/* g_print ("(%x) %x %x name; %s\n", address, map->start, map->offset, result->name); */
#if 0
g_print ("name: %s (in %s)\n", bin_symbol_get_name (map->bin_file, result), map->filename);
g_print (" in addr: %lx\n", address);
g_print (" out addr: %lx\n", bin_symbol_get_address (map->bin_file, result));
g_print (" map start: %lx\n", map->start);
g_print (" map offset: %lx\n", map->offset);
#endif
if (offset)
*offset = address - bin_symbol_get_address (map->bin_file, result);
return bin_symbol_get_name (map->bin_file, result);
}