riscv-software-src / riscv-software-src/opensbi
qemu+gdb Debug issue
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 712
- PR merge metrics
- No merged PRs in 30d
Description
How to use qemu+gdb to debug opensbi
When i trying to set breakpoint in sbi_init
If i use s
It shows Cannot find bounds of current function
If i use c ,it's just stop there
I'm looking forward to your reply .Thanks.
Reading symbols from /opensbi-1.1/build/platform/generic/firmware/fw_payload.elf...
(gdb) target remote:1234
Remote debugging using :1234
0x0000000000001004 in ?? ()
(gdb) b sbi_init
Breakpoint 1 at 0x800005b4: file /opensbi-1.1/lib/sbi/sbi_init.c, line 467.
(gdb) s
Cannot find bounds of current function
(gdb) c
Continuing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported QEMU/GDB session and the breakpoint at sbi_init in lib/sbi/sbi_init.c, line 467. Reproduce the stepping and continuing behavior from the transcript, then investigate why GDB cannot find the current function bounds. Done means identifying a reproducible cause and documenting or correcting the debugging procedure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100