Changeset 824553ed in mainline


Ignore:
Timestamp:
2005-09-04T23:18:16Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ae9624e
Parents:
db64c093
Message:

Add byteorder.h to support conversions between different endianesses.
Add native_le2host().

Use native_le2host() in get_symtab_entry().

Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • doc/requirements

    rdb64c093 r824553ed  
    1212        o Bochs 2.0.2 - Bochs 2.2
    1313                o 2x-8x 686 CPU
    14         o Simics 2.0.28 - Simics 2.2.14
    15                 o 2x-4x Pentium 4 CPU
     14        o Simics 2.0.28 - Simics 2.2.19
     15                o 2x-8x Pentium 4 CPU
    1616        o ASUS P/I-P65UP5 + ASUS C-P55T2D REV. 1.41
    1717                o 2x 200Mhz Pentium CPU
  • include/symtab.h

    rdb64c093 r824553ed  
    3535
    3636struct symtab_entry {
    37         __u64 address;
     37        __u64 address_le;
    3838        char symbol_name[MAX_SYMBOL_NAME];
    3939};
  • src/debug/symtab.c

    rdb64c093 r824553ed  
    3030#include <symtab.h>
    3131#include <typedefs.h>
     32#include <arch/byteorder.h>
    3233
    3334/** Return entry that seems most likely to correspond to the @addr
     
    3839        count_t i;
    3940
    40         for (i=1;symbol_table[i].address;++i) {
    41                 if (addr < symbol_table[i].address)
     41        for (i=1;symbol_table[i].address_le;++i) {
     42                if (addr < native_le2host(symbol_table[i].address_le))
    4243                        break;
    4344        }
    44         if (addr >= symbol_table[i-1].address)
     45        if (addr >= native_le2host(symbol_table[i-1].address_le))
    4546                return symbol_table[i-1].symbol_name;
    4647        return NULL;
Note: See TracChangeset for help on using the changeset viewer.