Skip to content

Commit 18dbeb2

Browse files
Zephyr support: fixed detection of stack_info and curTaskObjBase.prio
1 parent 38dc7e8 commit 18dbeb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rtos/rtos-zephyr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export class RTOSZEPHYR extends RTOSCommon.RTOSBase {
232232
mySetter(DisplayFields.Status, thState, thStateObject.fullData());
233233
mySetter(
234234
DisplayFields.Priority,
235-
curTaskObjBase ? parseInt(curTaskObjBase.prio.val).toString() : '???'
235+
(curTaskObjBase && curTaskObjBase.prio) ? parseInt(curTaskObjBase.prio.val).toString() : '???'
236236
);
237237

238238
if (stackInfo.stackUsed !== undefined && stackInfo.stackSize !== undefined) {
@@ -366,7 +366,7 @@ export class RTOSZEPHYR extends RTOSCommon.RTOSBase {
366366
stackInfo.stackTop = parseInt(TopOfStack);
367367

368368
/* only available with CONFIG_THREAD_STACK_INFO (optional) */
369-
if (thInfo.stack_info !== null) {
369+
if (thInfo.stack_info !== null && thInfo.stack_info !== undefined) {
370370
const stack_info = await this.getVarChildrenObj(thInfo.stack_info.ref, 'stack_info');
371371
if (stack_info !== null) {
372372
const StackSize = stack_info['size']?.val;

0 commit comments

Comments
 (0)