Subversion Repositories HelenOS-historic

Rev

Rev 268 | Rev 332 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 268 Rev 292
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
 
29
 
30
#include <symtab.h>
30
#include <symtab.h>
31
#include <typedefs.h>
31
#include <typedefs.h>
-
 
32
#include <arch/byteorder.h>
32
 
33
 
33
/** Return entry that seems most likely to correspond to the @addr
34
/** Return entry that seems most likely to correspond to the @addr
34
 *
35
 *
35
 */
36
 */
36
char * get_symtab_entry(__native addr)
37
char * get_symtab_entry(__native addr)
37
{
38
{
38
    count_t i;
39
    count_t i;
39
 
40
 
40
    for (i=1;symbol_table[i].address;++i) {
41
    for (i=1;symbol_table[i].address_le;++i) {
41
        if (addr < symbol_table[i].address)
42
        if (addr < native_le2host(symbol_table[i].address_le))
42
            break;
43
            break;
43
    }
44
    }
44
    if (addr >= symbol_table[i-1].address)
45
    if (addr >= native_le2host(symbol_table[i-1].address_le))
45
        return symbol_table[i-1].symbol_name;
46
        return symbol_table[i-1].symbol_name;
46
    return NULL;
47
    return NULL;
47
}
48
}