WinDBG/Exts/CodeAnalyzer/gdbplus/gdb-7.7/gdb/gdb_dep.c
// find a symbol or type associated with given address
find a symbol or type associated with given address
find a symbol or type associated with given address
static struct ca_addr_type_pair*
lookup_type_by_addr(address_t addr)
{
	int i;
	for (i=addr_type_map_sz-1; i>=0; i--)
	{
		if (addr >= addr_type_map[i].addr
			&& addr < addr_type_map[i].addr + addr_type_map[i].size)
			return &addr_type_map[i];
	}
	return NULL;
}
static struct ca_addr_type_pair * lookup_type_by_addr ( address_t addr ) { int i ; for ( i = addr_type_map_sz - 1 ; i >= 0 ; i -- ) { if ( addr >= addr_type_map [ i ] . addr && addr < addr_type_map [ i ] . addr + addr_type_map [ i ] . size ) return & addr_type_map [ i ] ; } return NULL ; }
find a symbol or type associated with given address
find a symbol or type associated with given address
// pick up the latest first