aboutsummaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-06-19 08:58:07 -0700
committerTim Newsome <tim@sifive.com>2017-06-20 11:32:42 -0700
commit927f9d887379a0af17cc5ab51a008c7ab89007df (patch)
tree9b1384c1538595237c0e3cef996b1f71d15aea6a /src/target
parent8d79a7c18b47354e4577cb5580d8945cc0d918cc (diff)
downloadriscv-openocd-927f9d887379a0af17cc5ab51a008c7ab89007df.zip
riscv-openocd-927f9d887379a0af17cc5ab51a008c7ab89007df.tar.gz
riscv-openocd-927f9d887379a0af17cc5ab51a008c7ab89007df.tar.bz2
Update list of "threads" when harts are discovered.
This ensures that "info threads" is accurate as soon as gdb connects. Also print out number of triggers that is discovered in examine().
Diffstat (limited to 'src/target')
-rw-r--r--src/target/riscv/riscv-013.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index f1d4cfb..9053feb 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -20,6 +20,7 @@
#include "target/breakpoints.h"
#include "helper/time_support.h"
#include "riscv.h"
+#include "rtos/riscv_debug.h"
#include "debug_defines.h"
#include "rtos/rtos.h"
#include "program.h"
@@ -1192,14 +1193,19 @@ static int examine(struct target *target)
riscv_resume_all_harts(target);
target_set_examined(target);
+ if (target->rtos) {
+ riscv_update_threads(target->rtos);
+ }
+
// Some regression suites rely on seeing 'Examined RISC-V core' to know
// when they can connect with gdb/telnet.
// We will need to update those suites if we want to change that text.
LOG_INFO("Examined RISC-V core; found %d harts",
riscv_count_harts(target));
for (int i = 0; i < riscv_count_harts(target); ++i) {
- LOG_INFO(" hart %d: XLEN=%d, program buffer at 0x%" PRIx64, i,
- r->xlen[i], r->debug_buffer_addr[i]);
+ LOG_INFO(" hart %d: XLEN=%d, program buffer at 0x%" PRIx64
+ ", %d triggers", i, r->xlen[i], r->debug_buffer_addr[i],
+ r->trigger_count[i]);
}
return ERROR_OK;
}