Browse Source

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.
tags/v0.5.0
Drasko DRASKOVIC 12 years ago
committed by Øyvind Harboe
parent
commit
ac43d7a69f
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      src/target/arm7_9_common.c
  2. +1
    -1
      src/target/mips_m4k.c

+ 1
- 0
src/target/arm7_9_common.c 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)
{


+ 1
- 1
src/target/mips_m4k.c 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,


Loading…
Cancel
Save