gdb for Riscv, single stepping issue

James Becker james.becker@crossfire-tech.com
Mon Jun 27 20:40:02 GMT 2022


Hello,

I have a RISCV-EL2 core running in a Nexys A7 FPGA board.

I have openocd for riscv running over jtag with a connection by 
riscv-gdb to the openocd instance at port 3333.

Everything works fine, stepping, break points, load, view memory.

But I have one issue: Some of the memory in my design is 4 byte 
aligned.  Its designed for fast instruction fetch, its known as ICCM.

When I have code running in that memory, gdb still works fine for 
breakpoints, but it will not single step.

Looking at the openocd debug files, it appears that gdb is attempting to 
do a 2 byte read as a part of the single stepping procedure.

Since my memory does not support 2 byte reads or writes, this fails.

Is there some way that gdb can be configured to not do any 2-byte word 
reads or writes during single stepping?  I can't seem to find any.

-- 
Jim Becker
CrossFire Technologies Inc
1000 Westgate Dr. Suite 150-I
St. Paul, MN 55114
Mobile: +1 303-507-6399
www.CrossFire-Tech.com Warning: The information contained in this 
electronic mail message (and any attached document) from CrossFire 
Technologies Inc. is intended only for the personal and confidential use 
of the designated recipient(s) named above. This information may be 
considered confidential by CrossFire Technologies Inc, or may be 
privileged or otherwise exempt from disclosure under law. If the reader 
of this message is not the intended recipient or an agent responsible 
for delivering it to the intended recipient, you are hereby notified 
that you have received this message in error and that any review, 
dissemination, distribution, or copying of this message is strictly 
prohibited. If you have received the communication in error, please 
notify us immediately by telephone and e-mail and destroy any and all 
copies of this message (and all attached documents) in your possession 
(whether hard copies or electronically stored copies). This 
communication is covered by the Electronic Communications Privacy Act, 
18 U.S.C. §§ 2510 - 2521. Thank you.


More information about the Gdb mailing list