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:
Augustin Cavalier 2025-01-10 19:12:22 -05:00 committed by waddlesplash
parent ad85518214
commit 7105c3f66d
3 changed files with 11 additions and 11 deletions

View File

@ -213,7 +213,7 @@ private:
SymbolLookup* fSymbolLookup;
const image_t* fImage;
int32 fSymbolCount;
size_t fTextDelta;
size_t fLoadDelta;
};
@ -567,7 +567,7 @@ SymbolLookup::LoadedImage::LoadedImage(SymbolLookup* symbolLookup,
fSymbolLookup(symbolLookup),
fImage(image),
fSymbolCount(symbolCount),
fTextDelta(image->regions[0].delta)
fLoadDelta(image->regions[0].delta)
{
// init info
fInfo.id = fImage->id;
@ -686,7 +686,7 @@ SymbolLookup::LoadedImage::NextSymbol(int32& iterator, const char** _symbolName,
*_symbolName = (const char*)fSymbolLookup->PrepareAddressNoThrow(
SYMNAME(fImage, symbol), 1);
*_symbolNameLen = fSymbolLookup->_SymbolNameLen(*_symbolName);
*_symbolAddress = symbol->st_value + fTextDelta;
*_symbolAddress = symbol->st_value + fLoadDelta;
*_symbolSize = symbol->st_size;
*_symbolType = symbol->Type() == STT_FUNC ? B_SYMBOL_TYPE_TEXT
: B_SYMBOL_TYPE_DATA;

View File

@ -137,7 +137,7 @@ public:
ElfSymbolLookupImpl(ElfSymbolLookupSource* source, uint64 symbolTable,
uint64 symbolHash, uint64 stringTable, uint32 symbolCount,
uint32 symbolTableEntrySize, uint64 textDelta, bool swappedByteOrder)
uint32 symbolTableEntrySize, uint64 loadDelta, bool swappedByteOrder)
:
fSource(NULL),
fSymbolTable(symbolTable),
@ -145,7 +145,7 @@ public:
fStringTable(stringTable),
fSymbolCount(symbolCount),
fSymbolTableEntrySize(symbolTableEntrySize),
fTextDelta(textDelta),
fLoadDelta(loadDelta),
fSwappedByteOrder(swappedByteOrder)
{
SetSource(source);
@ -233,7 +233,7 @@ public:
}
// 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);
uint32 type = symbol.Type() == STT_FUNC
? B_SYMBOL_TYPE_TEXT : B_SYMBOL_TYPE_DATA;
@ -309,7 +309,7 @@ private:
uint64 fStringTable;
uint32 fSymbolCount;
uint32 fSymbolTableEntrySize;
uint64 fTextDelta;
uint64 fLoadDelta;
bool fSwappedByteOrder;
};
@ -325,7 +325,7 @@ ElfSymbolLookup::~ElfSymbolLookup()
/*static*/ status_t
ElfSymbolLookup::Create(ElfSymbolLookupSource* source, uint64 symbolTable,
uint64 symbolHash, uint64 stringTable, uint32 symbolCount,
uint32 symbolTableEntrySize, uint64 textDelta, bool is64Bit,
uint32 symbolTableEntrySize, uint64 loadDelta, bool is64Bit,
bool swappedByteOrder, bool cacheSource, ElfSymbolLookup*& _lookup)
{
// create
@ -333,11 +333,11 @@ ElfSymbolLookup::Create(ElfSymbolLookupSource* source, uint64 symbolTable,
if (is64Bit) {
lookup = new(std::nothrow) ElfSymbolLookupImpl<ElfClass64>(source,
symbolTable, symbolHash, stringTable, symbolCount,
symbolTableEntrySize, textDelta, swappedByteOrder);
symbolTableEntrySize, loadDelta, swappedByteOrder);
} else {
lookup = new(std::nothrow) ElfSymbolLookupImpl<ElfClass32>(source,
symbolTable, symbolHash, stringTable, symbolCount,
symbolTableEntrySize, textDelta, swappedByteOrder);
symbolTableEntrySize, loadDelta, swappedByteOrder);
}
if (lookup == NULL)

View File

@ -30,7 +30,7 @@ public:
uint64 symbolTable, uint64 symbolHash,
uint64 stringTable, uint32 symbolCount,
uint32 symbolTableEntrySize,
uint64 textDelta, bool is64Bit,
uint64 loadDelta, bool is64Bit,
bool swappedByteOrder, bool cacheSource,
ElfSymbolLookup*& _lookup);