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:
Drasko DRASKOVIC 2011-07-04 12:55:00 +02:00 committed by Øyvind Harboe
parent d4cd6f0320
commit ac43d7a69f
2 changed files with 2 additions and 1 deletions

View File

@ -392,6 +392,7 @@ static int arm7_9_unset_breakpoint(struct target *target, struct breakpoint *bre
{
return retval;
}
current_instr = target_buffer_get_u16(target, (uint8_t *)&current_instr);
if (current_instr == arm7_9->thumb_bkpt)
if ((retval = target_write_memory(target, breakpoint->address, 2, 1, breakpoint->orig_instr)) != ERROR_OK)
{

View File

@ -643,7 +643,7 @@ static int mips_m4k_unset_breakpoint(struct target *target,
{
return retval;
}
current_instr = target_buffer_get_u16(target, (uint8_t *)&current_instr);
if (current_instr == MIPS16_SDBBP)
{
if ((retval = target_write_memory(target, breakpoint->address, 2, 1,