Hexagon is a VLIW processor. It can execute multiple instructions at once, called a packet. Breakpoints need to be alone in a packet. This patch will make sure that temporary breakpoints used for stepping are set at the start of a packet, which will put the breakpoint in a packet by itself.
Patch by Deepak Panickal of CodePlay and Ted Woodward of Qualcomm.
This should probably be moved into
And the GetIndexOfNextBranchInstruction should probably take a new argument: "const ArchSpec &arch" so it can do the right thing. We would want your code above to not happen for any other clients of InstructionList::GetIndexOfNextBranchInstruction().