Re: why gdb try to read address 0x0 when I set $pc ,how to suppress this behavior?
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> 庄秋彬 <[email protected]> writes: Sorry about the delay on this. > I use gdb with openocd to debug a riscv board, and found that when set > $pc=xxx(a non-zero value) in gdb, gdb would first read the address > 0x0, which caused an error on this riscv device. Is there any > documentation or suggestions for reading the source code to solve this > problem? I don't think so. Reading 0x0 when trying to set $pc is unexpected to me at least. I'd normally approach this by debugging gdb to try to understand why it is happening. Tom