#include <relocationinfo.h>
Public Methods | |
| void | AddRelocation (const Relocation &rel, vma_t address) |
| const Relocation * | GetRelocation (vma_t address, unsigned bytes) const |
| return relocation at a given address. More... | |
| const Relocation * | GetRelocation (vma_t address) const |
Static Public Attributes | |
| const Relocation | relError |
| Hold relocation info for returning error. More... | |
Private Types | |
| typedef std::set< vma_t, std::less< vma_t > > | t_relocations |
Private Attributes | |
| t_relocations | relocations |
|
|
Definition at line 59 of file relocationinfo.h. |
|
||||||||||||
|
Definition at line 32 of file relocationinfo.cpp. References _PRG_ASSERT, Relocation::GetType(), Relocation::relNone, relocations, Relocation::relRelative, and vma_t. Referenced by AddRelocationInfo().
00033 {
00034 _PRG_ASSERT(rel.GetType() == Relocation::relNone ||
00035 rel.GetType() == Relocation::relRelative);
00036 if ( rel.GetType() != Relocation::relNone )
00037 relocations.insert(address);
00038 }
|
|
|
Definition at line 56 of file relocationinfo.cpp. References relError, relocations, and vma_t.
00057 {
00058 // !!! memoriazzre ultimo byte per rilocazioni ?
00059 t_relocations::const_iterator i = relocations.lower_bound(address-3);
00060 if ( i == relocations.end() )
00061 return NULL;
00062 if ( *i == address)
00063 return &relRelative;
00064 if ( (address - *i) < 4 ) // !!! constants !!!
00065 return &relError;
00066 return NULL;
00067 }
|
|
||||||||||||
|
return relocation at a given address.
Definition at line 42 of file relocationinfo.cpp. References relError, relocations, and vma_t. Referenced by CodeParser::ExecuteComplexReferenceMemory(), CodeParser::GetStringStats(), InstructionDecoder::getv_rel(), and CodeParser::Parse().
00043 {
00044 t_relocations::const_iterator i = relocations.lower_bound(address);
00045 if ( i == relocations.end() )
00046 return NULL;
00047
00048 if ( *i == address && bytes == 4 ) // !!! constants !!!
00049 // la rilocazione e' ok!
00050 return &relRelative;
00051 else if ( address+bytes > *i )
00052 return &relError;
00053 return NULL;
00054 }
|
|
|
Hold relocation info for returning error.
Referenced by GetRelocation(), InstructionDecoder::getv_rel(), and CodeParser::Parse(). |
|
|
Definition at line 60 of file relocationinfo.h. Referenced by AddRelocation(), and GetRelocation(). |
1.2.15