Add ref_count and filename (bin_files): Add map from filenames to BinFiles

2006-08-21  Soren Sandmann <sandmann@redhat.com>

	* binfile.c (struct BinFile): Add ref_count and filename
	(bin_files): Add map from filenames to BinFiles
	(bin_file_new): First look for BinFile in the cache.
	(bin_file_free): If refcount reaches 0, remove BinFile from cache.

	* TODO: Updates
This commit is contained in:
Soren Sandmann
2006-08-22 03:26:57 +00:00
committed by Søren Sandmann Pedersen
parent a1bddd8d9f
commit bb616fd754
3 changed files with 60 additions and 16 deletions

7
TODO
View File

@ -32,7 +32,12 @@ Before 1.0.4:
Before 1.2:
* Delete elf_parser_new() and rename elf_parser_new_from_file()
* See if we can make "In file <blah>" not be treated as a recursive function.
Maybe simply treat each individual address in the file as a function.
Or try to parse the machine code. Places that are called are likely
to be functions.
* Give more sensible 'error messages'. Ie., if you get permission denied for
a file, put "Permission denied" instead of "No map"
@ -606,6 +611,8 @@ Later:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ALREADY DONE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
* Restore filename => binfile cache.
* It is apparently possible to get another timer interrupt in the middle
of timer_notify. If this happens the circular buffer gets screwed up and
you get crashes. Note this gets much worse on SMP (in fact how did this