mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-10-20 10:02:55 -04:00
this is a more "clean" conversion to 64 bit than the type-fixups branch, which does borrow some elements from it but has far less find and replace...it is about 98-99% done, notes to follow later
This commit is contained in:
@@ -379,8 +379,8 @@ static bool dwarfSearch(char const *dwarfLines, unsigned int linesLength, void c
|
||||
if (valid)
|
||||
{
|
||||
unsigned int addrOffset = 0;
|
||||
if (progAddr < reinterpret_cast<unsigned int>(info.dli_fbase))
|
||||
addrOffset = reinterpret_cast<unsigned int>(info.dli_fbase);
|
||||
if (progAddr < reinterpret_cast<uintptr_t>(info.dli_fbase))
|
||||
addrOffset = reinterpret_cast<uintptr_t>(info.dli_fbase);
|
||||
const void *testAddr = reinterpret_cast<const void *>(progAddr+addrOffset);
|
||||
if (testAddr >= addr)
|
||||
{
|
||||
@@ -461,7 +461,7 @@ struct Stab
|
||||
unsigned int n_strx; // index into string table
|
||||
unsigned char n_type; // type of stab entry
|
||||
char n_other;
|
||||
unsigned short n_desc; // for N_SLINE entries, line number
|
||||
uint16_t n_desc; // for N_SLINE entries, line number
|
||||
unsigned int n_value; // value of symbol
|
||||
};
|
||||
|
||||
@@ -503,12 +503,12 @@ static bool stabSearch(Stab const *stab, unsigned int stabSize, char const *stab
|
||||
if (reinterpret_cast<void const *>(stab->n_value) > info.dli_fbase)
|
||||
funcBase = reinterpret_cast<void const *>(stab->n_value);
|
||||
else
|
||||
funcBase = reinterpret_cast<void const *>(reinterpret_cast<unsigned int>(info.dli_fbase)+stab->n_value);
|
||||
funcBase = reinterpret_cast<void const *>(reinterpret_cast<uintptr_t>(info.dli_fbase)+stab->n_value);
|
||||
foundSrcLine = -1;
|
||||
}
|
||||
else if (stab->n_type == N_SLINE && addr >= funcBase) // source line
|
||||
{
|
||||
if (stab->n_value < reinterpret_cast<unsigned int>(addr)-reinterpret_cast<unsigned int>(funcBase))
|
||||
if (stab->n_value < reinterpret_cast<uintptr_t>(addr)-reinterpret_cast<uintptr_t>(funcBase))
|
||||
foundSrcLine = stab->n_desc;
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user