Generally, we can change the endianness when debuging, but is there someone knows what does gdb do when we running a command as (gdb) set endian big or (gdb) set endian small
I have the gdb sources in hand, but haven't found where to refer yet.
Generally, we can change the endianness when debuging, but is there someone knows what does gdb do when we running a command as (gdb) set endian big or (gdb) set endian small
I have the gdb sources in hand, but haven't found where to refer yet.
See gdb/arch-utils.c:set_endian. It tries to select a new gdbarch that matches the specified endianness, via gdbarch_update_p.