I am trying to write a GDB stub for a custom chip. Since the target is custom, it needs a GDB stub/server to handle GDB’s requests. I seem to be able to handle all the requests GDB gives fine when connecting initially. However, one gives an issue where GDB tries to read at address near zero. Since address near zero are not possible on this chip, this creates an issue.
So, the question is what does GDB try to read from memory when connecting initially to the target? Is the dependent on the ELF file or something more simple?
I hope learning what GDB needs to read from memory on the initial connection will point me in the right direction (maybe I have something mapped wrong in the ELF file?).
I tried looking at the elf file but am not sure what it would tell me.
user25670369 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.