diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-10-31 18:03:54 -0700 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-10-31 18:03:54 -0700 |
commit | c352c96f74bd5d5c3a498805856e4c2e6145eb0a (patch) | |
tree | 2e602f1a44f94743a8a98c735a96602190d14c25 | |
parent | 0da0bfd40a0ba46a68a6b9db428700241d2700b1 (diff) | |
download | openocd_libswd-c352c96f74bd5d5c3a498805856e4c2e6145eb0a.tar.gz openocd_libswd-c352c96f74bd5d5c3a498805856e4c2e6145eb0a.tar.bz2 openocd_libswd-c352c96f74bd5d5c3a498805856e4c2e6145eb0a.tar.xz openocd_libswd-c352c96f74bd5d5c3a498805856e4c2e6145eb0a.zip |
arm9tdmi: more correct fix for vector_catch
Just use the array of names we're given, ignoring indices.
The "reserved means don't use" patch missed that change.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-rw-r--r-- | src/target/arm9tdmi.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index e3c6ca35..9c90f002 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -1042,14 +1042,11 @@ static int handle_arm9tdmi_catch_vectors_command( embeddedice_store_reg(vector_catch); } - /* output current settings (skip RESERVED vector) */ - for (i = 0; i < 8; i++) - { - if (i != 5) - { - command_print(cmd_ctx, "%s: %s", arm9tdmi_vectors[i].name, - (vector_catch_value & (1 << i)) ? "catch" : "don't catch"); - } + /* output current settings */ + for (i = 0; arm9tdmi_vectors[i].name; i++) { + command_print(cmd_ctx, "%s: %s", arm9tdmi_vectors[i].name, + (vector_catch_value & arm9tdmi_vectors[i].value) + ? "catch" : "don't catch"); } return ERROR_OK; |