diff --git a/fsw/cfe-core/src/es/cfe_es_api.c b/fsw/cfe-core/src/es/cfe_es_api.c index cb5545ca0..1279c3bb0 100644 --- a/fsw/cfe-core/src/es/cfe_es_api.c +++ b/fsw/cfe-core/src/es/cfe_es_api.c @@ -970,6 +970,7 @@ int32 CFE_ES_GetAppInfo(CFE_ES_AppInfo_t *AppInfo, CFE_ES_ResourceID_t AppId) CFE_ES_AppRecord_t *AppRecPtr; CFE_ES_TaskRecord_t *TaskRecPtr; int32 Status; + osal_id_t ModuleId; uint32 i; if ( AppInfo == NULL ) @@ -979,6 +980,7 @@ int32 CFE_ES_GetAppInfo(CFE_ES_AppInfo_t *AppInfo, CFE_ES_ResourceID_t AppId) } memset(AppInfo, 0, sizeof(*AppInfo)); + ModuleId = OS_OBJECT_ID_UNDEFINED; AppRecPtr = CFE_ES_LocateAppRecordByID(AppId); @@ -1000,7 +1002,9 @@ int32 CFE_ES_GetAppInfo(CFE_ES_AppInfo_t *AppInfo, CFE_ES_ResourceID_t AppId) AppInfo->Type = AppRecPtr->Type; CFE_ES_CopyModuleBasicInfo(&AppRecPtr->StartParams.BasicInfo, AppInfo); - CFE_ES_CopyModuleStatusInfo(&AppRecPtr->ModuleInfo, AppInfo); + + ModuleId = AppRecPtr->ModuleInfo.ModuleId; + CFE_SB_SET_MEMADDR(AppInfo->StartAddress, AppRecPtr->ModuleInfo.EntryAddress); AppInfo->StackSize = AppRecPtr->StartParams.StackSize; AppInfo->ExceptionAction = AppRecPtr->StartParams.ExceptionAction; @@ -1044,7 +1048,7 @@ int32 CFE_ES_GetAppInfo(CFE_ES_AppInfo_t *AppInfo, CFE_ES_ResourceID_t AppId) */ if (Status == CFE_SUCCESS) { - CFE_ES_CopyModuleAddressInfo(AppInfo->ModuleId, AppInfo); + CFE_ES_CopyModuleAddressInfo(ModuleId, AppInfo); } return Status; @@ -1057,6 +1061,7 @@ int32 CFE_ES_GetLibInfo(CFE_ES_AppInfo_t *LibInfo, CFE_ES_ResourceID_t LibId) { int32 Status; CFE_ES_LibRecord_t *LibRecPtr; + osal_id_t ModuleId; if ( LibInfo == NULL ) { @@ -1064,6 +1069,9 @@ int32 CFE_ES_GetLibInfo(CFE_ES_AppInfo_t *LibInfo, CFE_ES_ResourceID_t LibId) return CFE_ES_ERR_BUFFER; } + memset(LibInfo, 0, sizeof(*LibInfo)); + ModuleId = OS_OBJECT_ID_UNDEFINED; + LibRecPtr = CFE_ES_LocateLibRecordByID(LibId); CFE_ES_LockSharedData(__func__,__LINE__); @@ -1084,7 +1092,9 @@ int32 CFE_ES_GetLibInfo(CFE_ES_AppInfo_t *LibInfo, CFE_ES_ResourceID_t LibId) LibInfo->Type = CFE_ES_AppType_LIBRARY; CFE_ES_CopyModuleBasicInfo(&LibRecPtr->BasicInfo, LibInfo); - CFE_ES_CopyModuleStatusInfo(&LibRecPtr->ModuleInfo, LibInfo); + + ModuleId = LibRecPtr->ModuleInfo.ModuleId; + CFE_SB_SET_MEMADDR(LibInfo->StartAddress, LibRecPtr->ModuleInfo.EntryAddress); Status = CFE_SUCCESS; } @@ -1096,7 +1106,7 @@ int32 CFE_ES_GetLibInfo(CFE_ES_AppInfo_t *LibInfo, CFE_ES_ResourceID_t LibId) */ if (Status == CFE_SUCCESS) { - CFE_ES_CopyModuleAddressInfo(LibInfo->ModuleId, LibInfo); + CFE_ES_CopyModuleAddressInfo(ModuleId, LibInfo); } return Status; diff --git a/fsw/cfe-core/src/es/cfe_es_apps.c b/fsw/cfe-core/src/es/cfe_es_apps.c index d0b1bbb0d..fe5f47b1b 100644 --- a/fsw/cfe-core/src/es/cfe_es_apps.c +++ b/fsw/cfe-core/src/es/cfe_es_apps.c @@ -1737,22 +1737,6 @@ void CFE_ES_CopyModuleBasicInfo(const CFE_ES_ModuleLoadParams_t *ParamsPtr, CFE_ AppInfoPtr->FileName[sizeof(AppInfoPtr->FileName) - 1] = '\0'; } -/* -**--------------------------------------------------------------------------------------- -** Name: CFE_ES_CopyModuleStatusInfo -** -** Purpose: Populate the cFE_ES_AppInfo structure with the data for an app. -** -** This internal function does not log any errors/events. The caller is expected -** to check the return code and log any relevant errors based on the context. -**--------------------------------------------------------------------------------------- -*/ -void CFE_ES_CopyModuleStatusInfo(const CFE_ES_ModuleLoadStatus_t *StatusPtr, CFE_ES_AppInfo_t *AppInfoPtr) -{ - AppInfoPtr->ModuleId = StatusPtr->ModuleId; - CFE_SB_SET_MEMADDR(AppInfoPtr->StartAddress, StatusPtr->EntryAddress); -} - /* **--------------------------------------------------------------------------------------- ** Name: CFE_ES_CopyModuleAddressInfo diff --git a/fsw/cfe-core/src/es/cfe_es_apps.h b/fsw/cfe-core/src/es/cfe_es_apps.h index e9aaa7562..46438accb 100644 --- a/fsw/cfe-core/src/es/cfe_es_apps.h +++ b/fsw/cfe-core/src/es/cfe_es_apps.h @@ -289,15 +289,6 @@ int32 CFE_ES_CleanupTaskResources(CFE_ES_ResourceID_t TaskId); */ void CFE_ES_CopyModuleBasicInfo(const CFE_ES_ModuleLoadParams_t *ParamsPtr, CFE_ES_AppInfo_t *AppInfoPtr); -/* -**--------------------------------------------------------------------------------------- -** Name: CFE_ES_CopyModuleStatusInfo -** -** Purpose: Populate the cFE_ES_AppInfo structure from the CFE_ES_ModuleLoadStatus_t data -**--------------------------------------------------------------------------------------- -*/ -void CFE_ES_CopyModuleStatusInfo(const CFE_ES_ModuleLoadStatus_t *StatusPtr, CFE_ES_AppInfo_t *AppInfoPtr); - /* **--------------------------------------------------------------------------------------- ** Name: CFE_ES_CopyModuleAddressInfo diff --git a/fsw/cfe-core/src/inc/cfe_es_msg.h b/fsw/cfe-core/src/inc/cfe_es_msg.h index 5f6b71ff3..8b1697a9f 100644 --- a/fsw/cfe-core/src/inc/cfe_es_msg.h +++ b/fsw/cfe-core/src/inc/cfe_es_msg.h @@ -1406,8 +1406,6 @@ typedef struct CFE_ES_AppInfo CFE_ES_MemOffset_t StackSize; /**< \cfetlmmnemonic \ES_STACKSIZE \brief The Stack Size of the Application */ - osal_id_t ModuleId; /**< \cfetlmmnemonic \ES_MODULEID - \brief The ID of the Loadable Module for the Application */ uint32 AddressesAreValid; /**< \cfetlmmnemonic \ES_ADDRVALID \brief Indicates that the Code, Data, and BSS addresses/sizes are valid */ CFE_ES_MemAddress_t CodeAddress; /**< \cfetlmmnemonic \ES_CODEADDR