ARM semihosting: use breakpoint on ARM7
Fall back to software breakpoint when vector catch isn't available. Possible enhancements: - add extra optional command parameter to select high vectors - add extra optional command parameter to select hardware breakpoint Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
parent
e8599cc3d8
commit
ec8c3b5a67
|
@ -2835,7 +2835,6 @@ COMMAND_HANDLER(handle_arm7_9_semihosting_command)
|
||||||
|
|
||||||
COMMAND_PARSE_ENABLE(CMD_ARGV[0], semihosting);
|
COMMAND_PARSE_ENABLE(CMD_ARGV[0], semihosting);
|
||||||
|
|
||||||
/* TODO: support other methods if vector catch is unavailable */
|
|
||||||
if (arm7_9->has_vector_catch) {
|
if (arm7_9->has_vector_catch) {
|
||||||
struct reg *vector_catch = &arm7_9->eice_cache
|
struct reg *vector_catch = &arm7_9->eice_cache
|
||||||
->reg_list[EICE_VEC_CATCH];
|
->reg_list[EICE_VEC_CATCH];
|
||||||
|
@ -2844,14 +2843,17 @@ COMMAND_HANDLER(handle_arm7_9_semihosting_command)
|
||||||
embeddedice_read_reg(vector_catch);
|
embeddedice_read_reg(vector_catch);
|
||||||
buf_set_u32(vector_catch->value, 2, 1, semihosting);
|
buf_set_u32(vector_catch->value, 2, 1, semihosting);
|
||||||
embeddedice_store_reg(vector_catch);
|
embeddedice_store_reg(vector_catch);
|
||||||
|
} else {
|
||||||
/* FIXME never let that "catch" be dropped! */
|
/* TODO: allow optional high vectors and/or BKPT_HARD */
|
||||||
|
if (semihosting)
|
||||||
arm7_9->armv4_5_common.is_semihosting = semihosting;
|
breakpoint_add(target, 8, 4, BKPT_SOFT);
|
||||||
|
else
|
||||||
} else if (semihosting) {
|
breakpoint_remove(target, 8);
|
||||||
command_print(CMD_CTX, "vector catch unavailable");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME never let that "catch" be dropped! */
|
||||||
|
arm7_9->armv4_5_common.is_semihosting = semihosting;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
command_print(CMD_CTX, "semihosting is %s",
|
command_print(CMD_CTX, "semihosting is %s",
|
||||||
|
|
Loading…
Reference in New Issue