Click here to Skip to main content
15,886,639 members
Articles / Mobile Apps

The StateWizard VC++ Add-in and Engine with Source Code

Rate me:
Please Sign up or sign in to vote.
4.73/5 (24 votes)
26 Mar 2009CPOL12 min read 190.2K   2.8K   132  
A cross-platform state-oriented application framework and a ClassWizard-like round-trip UML dynamic modeling/development tool that runs in popular IDEs. Aims at providing concurrent, distributed, and real-time application development tools for Win32/Linux
#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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Alex "Question is more important than the answer."

Comments and Discussions