X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Farmv4_5.c;h=86d5dc89d553e94a2659ea29835c570531e351c6;hp=9ee0577d657300024cafa3ed31ff5131b08680d8;hb=3acb107b9ae4e3d38d3fcfd29b455ebcfb444696;hpb=da9eedc0f2c338b8ad136a4436a7781edc4a8884 diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index 9ee0577d65..86d5dc89d5 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -392,7 +392,7 @@ int handle_armv4_5_disassemble_command(struct command_context_s *cmd_ctx, char * int i; arm_instruction_t cur_instruction; u32 opcode; - int thumb; + int thumb = 0; if (armv4_5->common_magic != ARMV4_5_COMMON_MAGIC) { @@ -415,7 +415,7 @@ int handle_armv4_5_disassemble_command(struct command_context_s *cmd_ctx, char * for (i = 0; i < count; i++) { - target->type->read_memory(target, address, 4, 1, (u8*)&opcode); + target_read_u32(target, address, &opcode); evaluate_opcode(opcode, address, &cur_instruction); command_print(cmd_ctx, "%s", cur_instruction.text); address += (thumb) ? 2 : 4;