mips_m4k and arm7_9 : Fix soft bkpt endianess for 16-bit instructions
The patch fix comparison of target data on the host by using target_buffer_get_u16() to transform current_instr to _host_ endianess before comparison.
This commit is contained in:
parent
d4cd6f0320
commit
ac43d7a69f
|
@ -392,6 +392,7 @@ static int arm7_9_unset_breakpoint(struct target *target, struct breakpoint *bre
|
||||||
{
|
{
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
current_instr = target_buffer_get_u16(target, (uint8_t *)¤t_instr);
|
||||||
if (current_instr == arm7_9->thumb_bkpt)
|
if (current_instr == arm7_9->thumb_bkpt)
|
||||||
if ((retval = target_write_memory(target, breakpoint->address, 2, 1, breakpoint->orig_instr)) != ERROR_OK)
|
if ((retval = target_write_memory(target, breakpoint->address, 2, 1, breakpoint->orig_instr)) != ERROR_OK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -643,7 +643,7 @@ static int mips_m4k_unset_breakpoint(struct target *target,
|
||||||
{
|
{
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
current_instr = target_buffer_get_u16(target, (uint8_t *)¤t_instr);
|
||||||
if (current_instr == MIPS16_SDBBP)
|
if (current_instr == MIPS16_SDBBP)
|
||||||
{
|
{
|
||||||
if ((retval = target_write_memory(target, breakpoint->address, 2, 1,
|
if ((retval = target_write_memory(target, breakpoint->address, 2, 1,
|
||||||
|
|
Loading…
Reference in New Issue