OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [libdbg64g/] [services/] [elfloader/] [elfreader.h] - Diff between revs 2 and 4

Show entire file | Details | Blame | View Log

Rev 2 Rev 4
Line 10... Line 10...
 
 
#include "iclass.h"
#include "iclass.h"
#include "iservice.h"
#include "iservice.h"
#include "coreservices/itap.h"
#include "coreservices/itap.h"
#include "coreservices/ielfreader.h"
#include "coreservices/ielfreader.h"
 
#include "coreservices/isrccode.h"
#include "elf_types.h"
#include "elf_types.h"
 
 
namespace debugger {
namespace debugger {
 
 
class ElfReaderService : public IService,
class ElfReaderService : public IService,
Line 46... Line 47...
 
 
    virtual uint8_t *sectionData(unsigned idx)  {
    virtual uint8_t *sectionData(unsigned idx)  {
        return loadSectionList_[idx][LoadSh_data].data();
        return loadSectionList_[idx][LoadSh_data].data();
    }
    }
 
 
    virtual void getSymbols(AttributeType *list) { *list = symbolList_; }
 
 
 
    virtual void addressToSymbol(uint64_t addr, AttributeType *info);
 
 
 
private:
private:
    int readElfHeader();
    int readElfHeader();
    int loadSections();
    int loadSections();
    void processStringTable(SectionHeaderType *sh);
 
    void processDebugSymbol(SectionHeaderType *sh);
    void processDebugSymbol(SectionHeaderType *sh);
 
 
private:
private:
    enum ELoadSectionItem {
    enum ELoadSectionItem {
        LoadSh_name,
        LoadSh_name,
Line 65... Line 61...
        LoadSh_size,
        LoadSh_size,
        LoadSh_data,
        LoadSh_data,
        LoadSh_Total,
        LoadSh_Total,
    };
    };
 
 
 
    enum EMode {
 
        Mode_32bits,
 
        Mode_64bits
 
    } emode_;
 
 
 
    AttributeType sourceProc_;
    AttributeType symbolList_;
    AttributeType symbolList_;
    AttributeType symbolListSortByAddr_;
 
    AttributeType loadSectionList_;
    AttributeType loadSectionList_;
 
 
 
    ISourceCode *isrc_;
    uint8_t *image_;
    uint8_t *image_;
    ElfHeaderType *header_;
    ElfHeaderType *header_;
    SectionHeaderType *sh_tbl_;
    SectionHeaderType **sh_tbl_;
    char *sectionNames_;
    char *sectionNames_;
    char *symbolNames_;
    char *symbolNames_;
};
};
 
 
DECLARE_CLASS(ElfReaderService)
DECLARE_CLASS(ElfReaderService)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.