ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ns3::ElfCache Class Reference

#include <elf-cache.h>

+ Collaboration diagram for ns3::ElfCache:

Classes

struct  ElfCachedFile
struct  FileInfo
struct  Overriden

Public Member Functions

 ElfCache (std::string directory, uint32_t uid)
struct ElfCachedFile Add (std::string filename)

Private Member Functions

void CopyFile (std::string source, std::string destination) const
struct FileInfo EditBuffer (uint8_t *map, uint32_t selfId) const
struct FileInfo EditFile (std::string filename, uint32_t selfId) const
std::string EnsureCacheDirectory (void) const
unsigned long GetBaseAddress (ElfW(Phdr)*phdr, long phnum) const
std::string GetBasename (std::string filename) const
uint32_t GetDepId (std::string depname) const
long GetDtStrTab (ElfW(Dyn)*dyn, long baseAddress) const
uint8_t NumberToChar (uint8_t c) const
void WriteString (char *str, uint32_t uid) const

Static Private Member Functions

static uint32_t AllocateId (void)

Private Attributes

std::string m_directory
std::vector< struct ElfCachedFilem_files
std::vector< struct Overridenm_overriden
uint32_t m_uid

Detailed Description

Definition at line 12 of file elf-cache.h.

Constructor & Destructor Documentation

ns3::ElfCache::ElfCache ( std::string  directory,
uint32_t  uid 
)

Member Function Documentation

uint32_t ns3::ElfCache::AllocateId ( void  )
staticprivate

Definition at line 272 of file elf-cache.cc.

Referenced by Add().

+ Here is the caller graph for this function:

void ns3::ElfCache::CopyFile ( std::string  source,
std::string  destination 
) const
private

Definition at line 49 of file elf-cache.cc.

Referenced by Add().

+ Here is the caller graph for this function:

struct ElfCache::FileInfo ns3::ElfCache::EditBuffer ( uint8_t *  map,
uint32_t  selfId 
) const
readprivate

Definition at line 157 of file elf-cache.cc.

References ns3::ElfCache::FileInfo::deps, ns3::ElfW(), GetBaseAddress(), GetDepId(), GetDtStrTab(), ns3::ElfCache::FileInfo::p_memsz, ns3::ElfCache::FileInfo::p_vaddr, and WriteString().

Referenced by EditFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct ElfCache::FileInfo ns3::ElfCache::EditFile ( std::string  filename,
uint32_t  selfId 
) const
readprivate

Definition at line 246 of file elf-cache.cc.

References EditBuffer(), and errno.

Referenced by Add().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::ElfCache::EnsureCacheDirectory ( void  ) const
private

Definition at line 304 of file elf-cache.cc.

References m_directory, and m_uid.

Referenced by Add().

+ Here is the caller graph for this function:

unsigned long ns3::ElfCache::GetBaseAddress ( ElfW(Phdr)*  phdr,
long  phnum 
) const
private

Definition at line 96 of file elf-cache.cc.

Referenced by EditBuffer().

+ Here is the caller graph for this function:

std::string ns3::ElfCache::GetBasename ( std::string  filename) const
private

Definition at line 38 of file elf-cache.cc.

Referenced by Add().

+ Here is the caller graph for this function:

uint32_t ns3::ElfCache::GetDepId ( std::string  depname) const
private

Definition at line 280 of file elf-cache.cc.

References ns3::ElfCache::Overriden::from, m_files, m_overriden, and ns3::ElfCache::Overriden::to.

Referenced by EditBuffer().

+ Here is the caller graph for this function:

long ns3::ElfCache::GetDtStrTab ( ElfW(Dyn)*  dyn,
long  baseAddress 
) const
private

Definition at line 72 of file elf-cache.cc.

Referenced by EditBuffer().

+ Here is the caller graph for this function:

uint8_t ns3::ElfCache::NumberToChar ( uint8_t  c) const
private

Definition at line 120 of file elf-cache.cc.

Referenced by WriteString().

+ Here is the caller graph for this function:

void ns3::ElfCache::WriteString ( char *  str,
uint32_t  uid 
) const
private

Definition at line 138 of file elf-cache.cc.

References NumberToChar().

Referenced by EditBuffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::string ns3::ElfCache::m_directory
private

Definition at line 53 of file elf-cache.h.

Referenced by EnsureCacheDirectory().

std::vector<struct ElfCachedFile> ns3::ElfCache::m_files
private

Definition at line 55 of file elf-cache.h.

Referenced by Add(), and GetDepId().

std::vector<struct Overriden> ns3::ElfCache::m_overriden
private

Definition at line 56 of file elf-cache.h.

Referenced by Add(), ElfCache(), and GetDepId().

uint32_t ns3::ElfCache::m_uid
private

Definition at line 54 of file elf-cache.h.

Referenced by EnsureCacheDirectory().


The documentation for this class was generated from the following files: