Fixes #60. I've extended the unit tests to cover the error. Some things to notice about this pull requests:
I've consolidated the logic into a single function and removed the new get_symbol_from_list. It seems that it was never intended to be part of the interface so no harm done there.
get_symbol_list was nullifying the size of the returned symbol. I see no reason for that so now the size is left intact.
I've refactored the names to make it more clear what the function is doing. It looks for the symbol with the closest starting address <= address where symbols which fully contain the address have priority.
Fixes #60. I've extended the unit tests to cover the error. Some things to notice about this pull requests:
I've consolidated the logic into a single function and removed the new
get_symbol_from_list
. It seems that it was never intended to be part of the interface so no harm done there.get_symbol_list
was nullifying the size of the returned symbol. I see no reason for that so now the size is left intact.I've refactored the names to make it more clear what the function is doing. It looks for the symbol with the closest starting address <= address where symbols which fully contain the address have priority.
PS: perhaps somebody can do a quick review =)