From 2f7eca470778c8b3ba3da698206f69e27c67e54b Mon Sep 17 00:00:00 2001 From: drath Date: Thu, 26 Apr 2007 14:41:27 +0000 Subject: - improved ETB trace output - use BKPT instruction on cores supporting it (ARM926EJ-S, ARM966E-S) - correctly handle endianness of software breakpoint instruction git-svn-id: svn://svn.berlios.de/openocd/trunk@143 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/arm7_9_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/target/arm7_9_common.c') diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 9cf38c3e..5569ad5b 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -187,15 +187,15 @@ int arm7_9_set_breakpoint(struct target_s *target, breakpoint_t *breakpoint) { /* keep the original instruction in target endianness */ target->type->read_memory(target, breakpoint->address, 4, 1, breakpoint->orig_instr); - /* write the original instruction in target endianness (arm7_9->arm_bkpt is host endian) */ + /* write the breakpoint instruction in target endianness (arm7_9->arm_bkpt is host endian) */ target_write_u32(target, breakpoint->address, arm7_9->arm_bkpt); } else { /* keep the original instruction in target endianness */ target->type->read_memory(target, breakpoint->address, 2, 1, breakpoint->orig_instr); - /* write the original instruction in target endianness (arm7_9->arm_bkpt is host endian) */ - target_write_u32(target, breakpoint->address, arm7_9->thumb_bkpt); + /* write the breakpoint instruction in target endianness (arm7_9->thumb_bkpt is host endian) */ + target_write_u16(target, breakpoint->address, arm7_9->thumb_bkpt); } breakpoint->set = 1; } -- cgit v1.2.3