mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-16 04:22:22 +00:00
gdbstub: added cpu id of running tasks to the output
This commit is contained in:
@@ -5058,6 +5058,25 @@ TickType_t uxReturn;
|
||||
pxTaskSnapshotArray[ *uxTask ].pxTCB = pxTCB;
|
||||
pxTaskSnapshotArray[ *uxTask ].pxTopOfStack = (StackType_t *)pxTCB->pxTopOfStack;
|
||||
pxTaskSnapshotArray[ *uxTask ].eState = eTaskGetState(pxTCB);
|
||||
|
||||
if(pxTaskSnapshotArray[ *uxTask ].eState == eRunning)
|
||||
{
|
||||
BaseType_t xCoreId = xPortGetCoreID();
|
||||
/* task is running, let's find in which core it is located */
|
||||
if(pxTCB == pxCurrentTCB[xCoreId])
|
||||
{
|
||||
pxTaskSnapshotArray[ *uxTask ].xCpuId = xCoreId;
|
||||
}
|
||||
else
|
||||
{
|
||||
pxTaskSnapshotArray[ *uxTask ].xCpuId = !xCoreId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pxTaskSnapshotArray[ *uxTask ].xCpuId = -1;
|
||||
}
|
||||
|
||||
#if( portSTACK_GROWTH < 0 )
|
||||
{
|
||||
pxTaskSnapshotArray[ *uxTask ].pxEndOfStack = pxTCB->pxEndOfStack;
|
||||
|
||||
Reference in New Issue
Block a user