mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 12:38:51 +01:00
Debugger Kit: Rename "TextDelta" to "LoadDelta".
It's both the offset of the first TEXT segment as well as the overall load address, so we should call it that for clarity. Change-Id: I370e14054e9b4f8f88a6ce6c80e0a743f9f14d64 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8820 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
parent
ad85518214
commit
7105c3f66d
@ -213,7 +213,7 @@ private:
|
|||||||
SymbolLookup* fSymbolLookup;
|
SymbolLookup* fSymbolLookup;
|
||||||
const image_t* fImage;
|
const image_t* fImage;
|
||||||
int32 fSymbolCount;
|
int32 fSymbolCount;
|
||||||
size_t fTextDelta;
|
size_t fLoadDelta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -567,7 +567,7 @@ SymbolLookup::LoadedImage::LoadedImage(SymbolLookup* symbolLookup,
|
|||||||
fSymbolLookup(symbolLookup),
|
fSymbolLookup(symbolLookup),
|
||||||
fImage(image),
|
fImage(image),
|
||||||
fSymbolCount(symbolCount),
|
fSymbolCount(symbolCount),
|
||||||
fTextDelta(image->regions[0].delta)
|
fLoadDelta(image->regions[0].delta)
|
||||||
{
|
{
|
||||||
// init info
|
// init info
|
||||||
fInfo.id = fImage->id;
|
fInfo.id = fImage->id;
|
||||||
@ -686,7 +686,7 @@ SymbolLookup::LoadedImage::NextSymbol(int32& iterator, const char** _symbolName,
|
|||||||
*_symbolName = (const char*)fSymbolLookup->PrepareAddressNoThrow(
|
*_symbolName = (const char*)fSymbolLookup->PrepareAddressNoThrow(
|
||||||
SYMNAME(fImage, symbol), 1);
|
SYMNAME(fImage, symbol), 1);
|
||||||
*_symbolNameLen = fSymbolLookup->_SymbolNameLen(*_symbolName);
|
*_symbolNameLen = fSymbolLookup->_SymbolNameLen(*_symbolName);
|
||||||
*_symbolAddress = symbol->st_value + fTextDelta;
|
*_symbolAddress = symbol->st_value + fLoadDelta;
|
||||||
*_symbolSize = symbol->st_size;
|
*_symbolSize = symbol->st_size;
|
||||||
*_symbolType = symbol->Type() == STT_FUNC ? B_SYMBOL_TYPE_TEXT
|
*_symbolType = symbol->Type() == STT_FUNC ? B_SYMBOL_TYPE_TEXT
|
||||||
: B_SYMBOL_TYPE_DATA;
|
: B_SYMBOL_TYPE_DATA;
|
||||||
|
@ -137,7 +137,7 @@ public:
|
|||||||
|
|
||||||
ElfSymbolLookupImpl(ElfSymbolLookupSource* source, uint64 symbolTable,
|
ElfSymbolLookupImpl(ElfSymbolLookupSource* source, uint64 symbolTable,
|
||||||
uint64 symbolHash, uint64 stringTable, uint32 symbolCount,
|
uint64 symbolHash, uint64 stringTable, uint32 symbolCount,
|
||||||
uint32 symbolTableEntrySize, uint64 textDelta, bool swappedByteOrder)
|
uint32 symbolTableEntrySize, uint64 loadDelta, bool swappedByteOrder)
|
||||||
:
|
:
|
||||||
fSource(NULL),
|
fSource(NULL),
|
||||||
fSymbolTable(symbolTable),
|
fSymbolTable(symbolTable),
|
||||||
@ -145,7 +145,7 @@ public:
|
|||||||
fStringTable(stringTable),
|
fStringTable(stringTable),
|
||||||
fSymbolCount(symbolCount),
|
fSymbolCount(symbolCount),
|
||||||
fSymbolTableEntrySize(symbolTableEntrySize),
|
fSymbolTableEntrySize(symbolTableEntrySize),
|
||||||
fTextDelta(textDelta),
|
fLoadDelta(loadDelta),
|
||||||
fSwappedByteOrder(swappedByteOrder)
|
fSwappedByteOrder(swappedByteOrder)
|
||||||
{
|
{
|
||||||
SetSource(source);
|
SetSource(source);
|
||||||
@ -233,7 +233,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the values
|
// get the values
|
||||||
target_addr_t address = Get(symbol.st_value) + fTextDelta;
|
target_addr_t address = Get(symbol.st_value) + fLoadDelta;
|
||||||
target_size_t size = Get(symbol.st_size);
|
target_size_t size = Get(symbol.st_size);
|
||||||
uint32 type = symbol.Type() == STT_FUNC
|
uint32 type = symbol.Type() == STT_FUNC
|
||||||
? B_SYMBOL_TYPE_TEXT : B_SYMBOL_TYPE_DATA;
|
? B_SYMBOL_TYPE_TEXT : B_SYMBOL_TYPE_DATA;
|
||||||
@ -309,7 +309,7 @@ private:
|
|||||||
uint64 fStringTable;
|
uint64 fStringTable;
|
||||||
uint32 fSymbolCount;
|
uint32 fSymbolCount;
|
||||||
uint32 fSymbolTableEntrySize;
|
uint32 fSymbolTableEntrySize;
|
||||||
uint64 fTextDelta;
|
uint64 fLoadDelta;
|
||||||
bool fSwappedByteOrder;
|
bool fSwappedByteOrder;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -325,7 +325,7 @@ ElfSymbolLookup::~ElfSymbolLookup()
|
|||||||
/*static*/ status_t
|
/*static*/ status_t
|
||||||
ElfSymbolLookup::Create(ElfSymbolLookupSource* source, uint64 symbolTable,
|
ElfSymbolLookup::Create(ElfSymbolLookupSource* source, uint64 symbolTable,
|
||||||
uint64 symbolHash, uint64 stringTable, uint32 symbolCount,
|
uint64 symbolHash, uint64 stringTable, uint32 symbolCount,
|
||||||
uint32 symbolTableEntrySize, uint64 textDelta, bool is64Bit,
|
uint32 symbolTableEntrySize, uint64 loadDelta, bool is64Bit,
|
||||||
bool swappedByteOrder, bool cacheSource, ElfSymbolLookup*& _lookup)
|
bool swappedByteOrder, bool cacheSource, ElfSymbolLookup*& _lookup)
|
||||||
{
|
{
|
||||||
// create
|
// create
|
||||||
@ -333,11 +333,11 @@ ElfSymbolLookup::Create(ElfSymbolLookupSource* source, uint64 symbolTable,
|
|||||||
if (is64Bit) {
|
if (is64Bit) {
|
||||||
lookup = new(std::nothrow) ElfSymbolLookupImpl<ElfClass64>(source,
|
lookup = new(std::nothrow) ElfSymbolLookupImpl<ElfClass64>(source,
|
||||||
symbolTable, symbolHash, stringTable, symbolCount,
|
symbolTable, symbolHash, stringTable, symbolCount,
|
||||||
symbolTableEntrySize, textDelta, swappedByteOrder);
|
symbolTableEntrySize, loadDelta, swappedByteOrder);
|
||||||
} else {
|
} else {
|
||||||
lookup = new(std::nothrow) ElfSymbolLookupImpl<ElfClass32>(source,
|
lookup = new(std::nothrow) ElfSymbolLookupImpl<ElfClass32>(source,
|
||||||
symbolTable, symbolHash, stringTable, symbolCount,
|
symbolTable, symbolHash, stringTable, symbolCount,
|
||||||
symbolTableEntrySize, textDelta, swappedByteOrder);
|
symbolTableEntrySize, loadDelta, swappedByteOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lookup == NULL)
|
if (lookup == NULL)
|
||||||
|
@ -30,7 +30,7 @@ public:
|
|||||||
uint64 symbolTable, uint64 symbolHash,
|
uint64 symbolTable, uint64 symbolHash,
|
||||||
uint64 stringTable, uint32 symbolCount,
|
uint64 stringTable, uint32 symbolCount,
|
||||||
uint32 symbolTableEntrySize,
|
uint32 symbolTableEntrySize,
|
||||||
uint64 textDelta, bool is64Bit,
|
uint64 loadDelta, bool is64Bit,
|
||||||
bool swappedByteOrder, bool cacheSource,
|
bool swappedByteOrder, bool cacheSource,
|
||||||
ElfSymbolLookup*& _lookup);
|
ElfSymbolLookup*& _lookup);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user