]> git.gag.com Git - fw/openocd/blobdiff - src/target/nds32.c
target: Rename 'linked_BRP' to 'linked_brp'
[fw/openocd] / src / target / nds32.c
index 487e19c6ad054d4b2a9845cea1523e96c5ceb156..cc6e2da4416bd1968556bc53d1868d3d18b1d237 100644 (file)
@@ -1660,7 +1660,7 @@ int nds32_init_arch_info(struct target *target, struct nds32 *nds32)
        nds32->syscall_break.orig_instr = NULL;
        nds32->syscall_break.next = NULL;
        nds32->syscall_break.unique_id = 0x515CAll + target->target_number;
-       nds32->syscall_break.linked_BRP = 0;
+       nds32->syscall_break.linked_brp = 0;
 
        nds32_reg_init();
 
@@ -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;