Hi experts, I built a coreboot image with following steps for tracing coreboot ramstage flow:
1. make menuconfig --- CONFIG_BOARD_EMULATION_QEMU_X86_Q35=y CONFIG_GDB_STUB=y CONFIG_GDB_WAIT=y ---
1. make crossgcc-i386 2. make
Then I start gdb:
1. gdb 2. (gdb) file /mnt/e/work/coreboot/build/cbfs/fallback/ramstage.debug
Reading symbols from /mnt/e/work/coreboot/build/cbfs/fallback/ramstage.debug...
1. (gdb) target remote:1234
Then I start QEMU:
1. qemu-system-i386 --bios build/coreboot.rom -nographic -M q35 -s --- tty out put as below --- ... Timestamp - finished loading ramstage: 627985288 BS: postcar times (exec / console): total (unknown) / 80 ms $S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02# ------------ (The "$S02#B5" repeats infinitely. I guess it's to report a stop event to GDB.)
The GDB successfully connects to coreboot. "disassemble $eip, +20" works fine. "n" command doesn't work. (gdb) n Cannot find bounds of current function
What mistake I might make?
Thanks, Ray
ping.
From: Ni, Ray ray.ni@intel.com Sent: Saturday, September 18, 2021 9:15 AM To: coreboot@coreboot.org Subject: [coreboot] Help debugging qemu + coreboot using GDB
Hi experts, I built a coreboot image with following steps for tracing coreboot ramstage flow:
1. make menuconfig --- CONFIG_BOARD_EMULATION_QEMU_X86_Q35=y CONFIG_GDB_STUB=y CONFIG_GDB_WAIT=y ---
1. make crossgcc-i386 2. make
Then I start gdb:
1. gdb 2. (gdb) file /mnt/e/work/coreboot/build/cbfs/fallback/ramstage.debug
Reading symbols from /mnt/e/work/coreboot/build/cbfs/fallback/ramstage.debug...
1. (gdb) target remote:1234
Then I start QEMU:
1. qemu-system-i386 --bios build/coreboot.rom -nographic -M q35 -s --- tty out put as below --- ... Timestamp - finished loading ramstage: 627985288 BS: postcar times (exec / console): total (unknown) / 80 ms $S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02#b5$S02# ------------ (The "$S02#B5" repeats infinitely. I guess it's to report a stop event to GDB.)
The GDB successfully connects to coreboot. "disassemble $eip, +20" works fine. "n" command doesn't work. (gdb) n Cannot find bounds of current function
What mistake I might make?
Thanks, Ray