|
#if !defined(_MAPFILEANALYSIS_H)
#define _MAPFILEANALYSIS_H
enum {SEC_TEXT, SEC_BSS, SEC_DATA, SEC_RDATA};
typedef struct var_node{
TCHAR sVar[65];
int nLength;
DWORD dwAddr;
struct var_node *pNext;
} VAR_NODE_T;
typedef struct node{
TCHAR cName[50]; // obj name
DWORD dwFuncNum; // public function number.
DWORD dwMin; // the minimum function starting address.
DWORD dwMinBSS;
DWORD dwMinRData;
DWORD dwMinData;
DWORD dwLengthText;
DWORD dwLengthBSS;
DWORD dwLengthRData;
DWORD dwLengthData;
struct var_node * pVarListBSS;
struct var_node * pVarListRData;
struct var_node * pVarListData;
struct node * next;
}ListNode;
/* Data structure:
The first node contains the informat about the starting/end address of each section.
The starting address in each section initial value is MAX_INIT. If this value does not updated, there will be no any symbol in this section.
There is no order in object list. However, we keep an order in the variable list.
*/
ListNode * FindObjName(ListNode *pHead, LPCTSTR lpObjName);
ListNode* CalculatorCodeSize(LPCTSTR lpMapFilePath, DWORD *dwRdata, DWORD *dwData, DWORD *dwBss, bool &bFileisNull, bool &bIsNotMapfile);
BOOL DeleteList(ListNode *pHead);
ListNode* SortList(int nOrderBy, ListNode *pHead);
VAR_NODE_T* GetObjVarList(int nType, ListNode *p);
BOOL SetObjVarList(int nType, ListNode *p, VAR_NODE_T* pData);
DWORD GetObjMinAddr(int nType, ListNode *p);
BOOL SetObjMinAddr(int nType, ListNode *p, DWORD dwAddr);
DWORD GetObjLength(int nType, ListNode *p);
BOOL SetObjLength(int nType, ListNode *p, DWORD dwLength);
#endif _MAPFILEANALYSIS_H
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.