https://github.com/Torlus/qemu-rpi
I'm using mentor toolchain's arm gdb to hook up to localhost:1234 after starting qemu with -S -s
Then I can do something along these lines
Code: Select all
(gdb) ni
0x00010048 in ?? ()
(gdb) info registers
r0 0x10 16
r1 0x0 0
r2 0x20200000 538968064
r3 0x0 0
r4 0x0 0
r5 0x0 0
r6 0x0 0
r7 0x0 0
r8 0x0 0
r9 0x0 0
r10 0x0 0
r11 0x0 0
r12 0x0 0
...
1) I can't view the disassembly of what's going on, I just get "No function contains program counter for selected frame.".
3) The offsets don't look right. Why 0x00010048 instead of 0x00008048? The program counter is also showing the strange offsets.
All of the information I'm finding is mentioning debug symbols, but I'm using fasmarm, so getting those would be a bit of a pain.
Does anybody have any experience with what I'm trying to do? Alternatively, are there other ways to debug kernels which might be better? I've had a look at dwelch's arm jtag info but that seems like even more of a pain to set up.