mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
target/target: fix RTOS thread awareness support
This prior patch replaces "LOG_xxx()" with "LOG_TARGET_xxx()"
to indicate which target the message belongs to.
commit 7f2db80ebc ("rtos/hwthread: Use LOG_TARGET_xxx()")
To support this change for hardware thread awareness,
the target command name needs to be established before
calling the "target_configure()" routine.
Change-Id: I0dc70c23b84e983a2ee694fb5b9d01758f5c84a3
Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8800
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
b7ad702bc8
commit
b2016dc443
@@ -5829,6 +5829,16 @@ static int target_create(struct jim_getopt_info *goi)
|
||||
target->gdb_port_override = NULL;
|
||||
target->gdb_max_connections = 1;
|
||||
|
||||
cp = Jim_GetString(new_cmd, NULL);
|
||||
target->cmd_name = strdup(cp);
|
||||
if (!target->cmd_name) {
|
||||
LOG_ERROR("Out of memory");
|
||||
free(target->trace_info);
|
||||
free(target->type);
|
||||
free(target);
|
||||
return JIM_ERR;
|
||||
}
|
||||
|
||||
/* Do the rest as "configure" options */
|
||||
goi->is_configure = true;
|
||||
e = target_configure(goi, target);
|
||||
@@ -5865,19 +5875,6 @@ static int target_create(struct jim_getopt_info *goi)
|
||||
target->endianness = TARGET_LITTLE_ENDIAN;
|
||||
}
|
||||
|
||||
cp = Jim_GetString(new_cmd, NULL);
|
||||
target->cmd_name = strdup(cp);
|
||||
if (!target->cmd_name) {
|
||||
LOG_ERROR("Out of memory");
|
||||
rtos_destroy(target);
|
||||
free(target->gdb_port_override);
|
||||
free(target->trace_info);
|
||||
free(target->type);
|
||||
free(target->private_config);
|
||||
free(target);
|
||||
return JIM_ERR;
|
||||
}
|
||||
|
||||
if (target->type->target_create) {
|
||||
e = (*(target->type->target_create))(target, goi->interp);
|
||||
if (e != ERROR_OK) {
|
||||
|
||||
Reference in New Issue
Block a user