0

I have built u-boot with rpi_3_b_plus_defconfig for raspberry pi 3B+. On qemu, the closest target I could find is raspi3b and it all works fine so far :

$ qemu-system-aarch64 -machine raspi3b -kernel u-boot.bin -display none -serial null -serial stdio

Now I want to step through the code line by line to understand boot flow for u-boot. However, I am not able to get the symbols working on gdb.

On one side, I have launched qemu using -s -S. On other hand, I am launching gdb with below command :

$ /opt/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gdb u-boot -ex "target remote localhost:1234"

However, the symbols seem not to be working :

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from u-boot...
Remote debugging using localhost:1234
0x0000000000000000 in ?? ()
(gdb) s
Cannot find bounds of current function
(gdb) step
Cannot find bounds of current function
(gdb) s
Cannot find bounds of current function
(gdb)

What am I doing wrong? How can I fix this?

EDIT Looks like everything was working fine already. I just moved ahead, put a breakpoint at 0x80000 and hit continue and I hit the breakpoint as well as could list the code at breakpoint. All fine. I just got worried by the line

0x0000000000000000 in ?? ()

Why is that getting printed? Any idea?

Naveen
  • 7,944
  • 12
  • 78
  • 165

0 Answers0