foss-for-synopsys-dwc-arc-processors/toolchain

GDB cannot step through DBNZ

Closed this issue · 2 comments

If you step over the DBNZ instruction, the debugee will crash. Probably because the debugger inserts the wrong breakpoint at the wrong place.

Affects all HS4/5/6 targets.

gdb-dbnz

sample: gdb-dbnz-lnx.tgz

The fix from @kolerov is upstream:

arc: Put DBNZ instruction to a separate class
arc: Determine a branch target of DBNZ correctly

@kolerov Please cherry-pick your patches from upstream for the relevant (release) branches and then close this issue.

There are no next release branches for ARC classic. Thus, I reverted old version of those patches in arc64 and pushed upstream versions (they are slightly different).