Are you reposting this any time soon? In meanwhile I hit a problem when I cannot step over the "stdu" instruction.
I basically put this: stdu r1,-368(r1) and "ni" in gdb does not stop on the next instruction which is quite confusing. Ideas? On 20/03/2019 12:42, Alexey Kardashevskiy wrote: > > > On 20/03/2019 01:32, Fabiano Rosas wrote: >> Alexey Kardashevskiy <a...@ozlabs.ru> writes: >> >>> Looks good to me, does not break what already works. However I cannot >>> debug SLOF real mode and I am not sure why. >>> >>> (gdb) set endian big >>> >>> The target is assumed to be big endian >>> (gdb) b *0x3f00 >>> >>> Breakpoint 2 at 0x3f00 >> >> I think I'm missing the point here. Why 0x3f00? > > Because I am stupid and did not realize that 0x3f00 is a relative offset > and 0x4000 is the correct address which works. > > > Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru> > > >> >> (qemu) info roms >> addr=0000000000000000 size=0x0e22b8 mem=ram name="...qemu/slof.bin" >> >> addr=0000000000400000 size=0x17976d0 mem=ram name="...vmlinux" >> >> >> $ objdump -d board-qemu/llfw/stage1.elf | grep "_start>" >> 0000000000000100 <__start>: >> 100: 48 00 3f 00 b 4000 <_start> >> 0000000000004000 <_start>: >> >> >> Thread 1 hit Breakpoint 3, _start () at startup.S:82 >> (gdb) p/x $pc >> $1 = 0x4000 >> (gdb) si >> (gdb) p/x $pc >> $3 = 0x4004 >> (gdb) c >> Thread 1 hit Breakpoint 4, early_c_entry (start_addr=49056, fdt_addr=49024) >> at stage2.c:202 >> (gdb) p/x $pc >> $4 = 0x4d18 >> > -- Alexey