https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127449

            Bug ID: 127449
           Summary: MIPS: R6 forbidden slots not avoided for the purpose
                    of debugging (-Og, etc.)
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: macro at orcam dot me.uk
  Target Milestone: ---
            Target: mips*-*-*

GDB is currently unable to handle breakpoints in forbidden slots, and for
some debug targets it may never be, owing to environment limitations.  An
attempt to place such a breakpoint will make GDB move it forwards to the
following machine instruction.  Consequently the state of the program at
the time such a breakpoint is hit may not correspond to what the person
debugging wants to see.  This may in particular mean that a breakpoint
specified by a source line reference may not cause the program to be
stopped before machine code produced for said line has started executing.

There is no code in GCC currently to arrange for forbidden slots to be
always filled with a NOP instruction for debugging; this should happen at
least at -Og and possibly in other circumstances as well.

Reply via email to