Altera_Forum
Honored Contributor
20 years agoMemory access problems in gdb-server
I have a lot of errors when download a program into RAM via gdb-server. The downloading will go fine for a second or two, and then gdb aborts the download and reports
Memory access error while loading section .text The nios2-gdb-server is replying with an "E0d" response to a perfectly valid "X" command. Sometimes the program will finish loading into RAM -- once it does, it works fine. But, about 80% of the time the download will stop at some point with the above error. AFAICT, there is no pattern or repeatability to the location where it stops. Initially I suspected faulty hardware, but it's not just one board that does it. Once it stops, no memory can be accessed until the board is reset. Attempts to read memory with an "m" command result in an "E0b" response from nios2-gdb-server. I've tried lower the download write size (to as low as 4 bytes per packet and as high as 4K bytes per packet). I've tried disabling usage of the "X" download command. No change. What causes nios-gdb-server to reply with "E0d" to an "X" command? Once again, if I had the source code, I could probably answer the question (and fix the problem) for myself...