diff options
author | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2015-01-18 15:36:52 +0100 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2015-02-11 22:17:21 +0000 |
commit | 25e7a69e266b7c848af3c88f5743c88120d28d0f (patch) | |
tree | 990a68cb9dccb877656f36180083df745639eda5 /src/target/target.c | |
parent | 18c86b1c456e8623b5fb6df9fa110190abcadc9b (diff) | |
download | riscv-openocd-25e7a69e266b7c848af3c88f5743c88120d28d0f.zip riscv-openocd-25e7a69e266b7c848af3c88f5743c88120d28d0f.tar.gz riscv-openocd-25e7a69e266b7c848af3c88f5743c88120d28d0f.tar.bz2 |
target/profiling: Use the correct method to access registers
Change-Id: I6b8590dc9d07886b885013b1b767fe2f0739cd6a
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2479
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/target/target.c')
-rw-r--r-- | src/target/target.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/target.c b/src/target/target.c index c2408b2..9f12704 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1819,7 +1819,7 @@ static int target_profiling_default(struct target *target, uint32_t *samples, for (;;) { target_poll(target); if (target->state == TARGET_HALTED) { - uint32_t t = *((uint32_t *)reg->value); + uint32_t t = buf_get_u32(reg->value, 0, 32); samples[sample_count++] = t; /* current pc, addr = 0, do not handle breakpoints, not debugging */ retval = target_resume(target, 1, 0, 0, 0); |