diff options
Diffstat (limited to 'src/target/nds32.c')
-rw-r--r-- | src/target/nds32.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/target/nds32.c b/src/target/nds32.c index 487e19c..add66b2 100644 --- a/src/target/nds32.c +++ b/src/target/nds32.c @@ -2496,6 +2496,12 @@ int nds32_profiling(struct target *target, uint32_t *samples, struct aice_port_s *aice = target_to_aice(target); struct nds32 *nds32 = target_to_nds32(target); + /* REVISIT: can nds32 profile without halting? */ + if (target->state != TARGET_HALTED) { + LOG_WARNING("target %s is not halted (profiling)", target->cmd_name); + return ERROR_TARGET_NOT_HALTED; + } + if (max_num_samples < iteration) iteration = max_num_samples; |