So my struct values are becoming 0 after a "next" command in gdb, which should have no effect.
166 RawElfSymbol *currSymb = symbolTabSec;
(gdb) p *currSymb
$8 = {name = 623313010, addr = 540682099, size = 1931505518, type_and_bind = 117 'u', ignored = 99 'c', section_tag = 8296}
(gdb) next
167 int sizeOfSymb = currSymb->size;
(gdb) p *currSymb
$9 = {name = 0, addr = 0, size = 0, type_and_bind = 0 '\000', ignored = 0 '\000', section_tag = 0}
Any possible explanations for why this is happening? I can't figure it out:/
if this helps, this is the RawElfSymbol struct:
typedef struct {
unsigned int name; // offset in bytes from start of string table to symbol name
uintptr_t addr; // symbol address
unsigned int size; // symbol size in bytes
unsigned char type_and_bind; // low-order 4 bits are type (STT_FUNC, STT_OBJECT)
// high-order 4 bits are binding (STB_LOCAL, STB_GLOBAL)
unsigned char ignored;
unsigned short section_tag; // will be SHN_UNDEF if symbol is undefined
} RawElfSymbol;