summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-24 00:14:15 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-24 00:14:15 -0800
commit6ff33a4ee8db483e29bc78b8c35e50342ca60850 (patch)
tree1461b81f6713a00ef8c4887d3927e81ab1add3d2 /src
parentcaf827ee8122de66721e62b933b7133df2349c4f (diff)
downloadopenocd+libswd-6ff33a4ee8db483e29bc78b8c35e50342ca60850.tar.gz
openocd+libswd-6ff33a4ee8db483e29bc78b8c35e50342ca60850.tar.bz2
openocd+libswd-6ff33a4ee8db483e29bc78b8c35e50342ca60850.tar.xz
openocd+libswd-6ff33a4ee8db483e29bc78b8c35e50342ca60850.zip
ARM11: remove register "history" debug stuff
This was a private mechanism to snapshot registers before leaving debug state, and then on reentry to optionally display what changed. It was coupled to the private register cache, which won't be sticking around in that form for much longer. Remove (instead of teaching it how to handle *all* the registers). (The idea is interesting, but we ought to be able to implement this in a generic way. Ideally through Tcl scripts that can automatically be invoked following debug entry...) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/target/arm11.c50
-rw-r--r--src/target/arm11.h9
2 files changed, 0 insertions, 59 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index cb1af7bf..3c841bb7 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -155,9 +155,6 @@ static int arm11_build_reg_cache(struct target *target);
static int arm11_set_reg(struct reg *reg, uint8_t *buf);
static int arm11_get_reg(struct reg *reg);
-static void arm11_record_register_history(struct arm11_common * arm11);
-static void arm11_dump_reg_changes(struct arm11_common * arm11);
-
/** Check and if necessary take control of the system
*
@@ -380,41 +377,9 @@ static int arm11_on_enter_debug_state(struct arm11_common *arm11)
if (retval != ERROR_OK)
return retval;
- arm11_dump_reg_changes(arm11);
-
return ERROR_OK;
}
-static void arm11_dump_reg_changes(struct arm11_common * arm11)
-{
-
- if (!(debug_level >= LOG_LVL_DEBUG))
- {
- return;
- }
-
- for (size_t i = 0; i < ARM11_REGCACHE_COUNT; i++)
- {
- if (!arm11->reg_list[i].valid)
- {
- if (arm11->reg_history[i].valid)
- LOG_DEBUG("%8s INVALID (%08" PRIx32 ")", arm11_reg_defs[i].name, arm11->reg_history[i].value);
- }
- else
- {
- if (arm11->reg_history[i].valid)
- {
- if (arm11->reg_history[i].value != arm11->reg_values[i])
- LOG_DEBUG("%8s %08" PRIx32 " (%08" PRIx32 ")", arm11_reg_defs[i].name, arm11->reg_values[i], arm11->reg_history[i].value);
- }
- else
- {
- LOG_DEBUG("%8s %08" PRIx32 " (INVALID)", arm11_reg_defs[i].name, arm11->reg_values[i]);
- }
- }
- }
-}
-
/** Restore processor state
*
* This is called in preparation for the RESTART function.
@@ -532,24 +497,9 @@ static int arm11_leave_debug_state(struct arm11_common *arm11)
arm11_add_dr_scan_vc(ARRAY_SIZE(chain5_fields), chain5_fields, TAP_DRPAUSE);
}
- arm11_record_register_history(arm11);
-
return ERROR_OK;
}
-static void arm11_record_register_history(struct arm11_common *arm11)
-{
- for (size_t i = 0; i < ARM11_REGCACHE_COUNT; i++)
- {
- arm11->reg_history[i].value = arm11->reg_values[i];
- arm11->reg_history[i].valid = arm11->reg_list[i].valid;
-
- arm11->reg_list[i].valid = 0;
- arm11->reg_list[i].dirty = 0;
- }
-}
-
-
/* poll current target status */
static int arm11_poll(struct target *target)
{
diff --git a/src/target/arm11.h b/src/target/arm11.h
index a67c3371..033ba899 100644
--- a/src/target/arm11.h
+++ b/src/target/arm11.h
@@ -41,12 +41,6 @@
} \
} while (0)
-struct arm11_register_history
-{
- uint32_t value;
- uint8_t valid;
-};
-
enum arm11_debug_version
{
ARM11_DEBUG_V6 = 0x01,
@@ -84,9 +78,6 @@ struct arm11_common
/*@}*/
- struct arm11_register_history
- reg_history[ARM11_REGCACHE_COUNT]; /**< register state before last resume */
-
size_t free_brps; /**< keep track of breakpoints allocated by arm11_add_breakpoint() */
size_t free_wrps; /**< keep track of breakpoints allocated by arm11_add_watchpoint() */