Hi Maciej, > Hmm, whether it works or not seems to depend on GDB version. It looks to > me like we have a regression here. Working GDB has: > > (gdb) info files > Local core dump file: > `/proc/kcore', file type elf32-tradlittlemips. > 0xffffffffc0000000 - 0xfffffffffff94000 is load1 > 0xffffffff80000000 - 0xffffffff90000000 is load2 > (gdb) > > Broken GDB has: > > (gdb) info files > Local core dump file: > `/proc/kcore', file type elf32-tradlittlemips-freebsd. > 0xffffffffc0000000 - 0xfffffffffff94000 is load1 > 0xffffffff80000000 - 0xffffffff90000000 is load2 > (gdb) > > Notice the different BFD target, `elf32-tradlittlemips-freebsd'. You're > supposed to be able to override it with `set gnutarget', but that doesn't > seem to impress GDB, e.g.: > > (gdb) show gnutarget > The current BFD target is "auto". > (gdb) set gnutarget elf32-tradlittlemips > (gdb) show gnutarget > The current BFD target is "elf32-tradlittlemips". > (gdb) info files > Local core dump file: > `/home/mjr/src/kcore', file type elf32-tradlittlemips-freebsd. > 0xffffffffc0000000 - 0xfffffffffff94000 is load1 > 0xffffffff80000000 - 0xffffffff90000000 is load2 > (gdb) > > I'll see if I can track down what is going on here. Thank you for taking a closer look at GDB! However, I don't observe the "freebsd" BFD target with a cross-GDB version 8.1 (via v9fs in this case): # mipsel-linux-gdb --version | head -n1 GNU gdb (GDB) 8.1 # mipsel-linux-gdb -q -c /mnt/kcore [New process 1] Core was generated by `ramdisk_size=16384 crtmode=pal1 video=ps2fb:pal,640x480-32 rd_start=0x8062c000'. #0 0x00000000 in ?? () (gdb) show gnutarget The current BFD target is "auto". (gdb) info files Local core dump file: `/mnt/kcore', file type elf32-tradlittlemips. 0xffffffffc0000000 - 0xfffffffffffcd000 is load1 0xffffffff80000000 - 0xffffffff80001000 is load2 0xffffffff80010000 - 0xffffffff82000000 is load3 (gdb) x /32i 0xffffffff80000000 0x80000000: Cannot access memory at address 0x80000000 (gdb) x /32i 0x80000000 0x80000000: Cannot access memory at address 0x80000000 (gdb) > Good. You probably want to add `--adjust-vma=0x80000000' to `objdump', > so that addresses are right. You can use `-b binary' with `objdump' too, > to avoid the extra `objcopy' step. Perfect, thanks! By the way, what about presenting misaligned SQ instructions like # mipsel-linux-gdb -q busybox Reading symbols from busybox...(no debugging symbols found)...done. (gdb) set architecture mips:5900 The target architecture is assumed to be mips:5900 (gdb) x /i 0x4036b0 0x4036b0: sq v1,-6085(zero) as RDHWR, which is the interpretation with Linux? Fredrik