4 * (C) 2005 Michael Beck beck@ipd.info.uni-karlsruhe.de
6 #ifndef __FIRM_EVALUATOR_H__
7 #define __FIRM_EVALUATOR_H__
9 typedef struct tagDEBUGHELPER {
11 BOOL (WINAPI *ReadDebuggeeMemory)( struct tagDEBUGHELPER *pThis, DWORD dwAddr, DWORD nWant, VOID* pWhere, DWORD *nGot );
12 /* from here only when dwVersion >= 0x20000 */
13 DWORDLONG (WINAPI *GetRealAddress)( struct tagDEBUGHELPER *pThis );
14 BOOL (WINAPI *ReadDebuggeeMemoryEx)( struct tagDEBUGHELPER *pThis, DWORDLONG qwAddr, DWORD nWant, VOID* pWhere, DWORD *nGot );
15 int (WINAPI *GetProcessorType)( struct tagDEBUGHELPER *pThis );
18 typedef HRESULT (WINAPI *CUSTOMVIEWER)( void *address, DEBUGHELPER *pHelper, int nBase, BOOL bUniStrings, char *pResult, size_t max, DWORD reserved );
23 * @param address address in debuggee's space to copy from
24 * @param pHelper debugger helper
25 * @param dst pointer in our space to copy to
26 * @param size number of bytes to copy
28 HRESULT copy_from_debuggee(const void *address, DEBUGHELPER *pHelper, void *dst, DWORD size);
31 * return the size of a firm object
35 int get_firm_object_size(firm_kind kind);
40 * @param pHelper debugger helper
41 * @param address ident address in debuggee's space
42 * @param pResult string buffer
43 * @param max length of the string buffer
45 HRESULT format_ident(DEBUGHELPER *pHelper, const void *address, char *pResult, size_t max);
50 * @param pHelper debugger helper
51 * @param address ident address in debuggee's space
52 * @param pResult string buffer
53 * @param max length of the string buffer
55 HRESULT format_op(DEBUGHELPER *pHelper, const void *address, char *pResult, size_t max);
60 * @param pHelper debugger helper
61 * @param nBase base for number's
62 * @param address pset address in debuggee's space
63 * @param pResult string buffer
64 * @param max length of the string buffer
66 HRESULT format_pset(DEBUGHELPER *pHelper, int nBase, const void *address, char *pResult, size_t max);
71 * @param pHelper debugger helper
72 * @param nBase base for number's
73 * @param address set address in debuggee's space
74 * @param pResult string buffer
75 * @param max length of the string buffer
77 HRESULT format_set(DEBUGHELPER *pHelper, int nBase, const void *address, char *pResult, size_t max);
80 * Format an array descriptor
82 * @param pHelper debugger helper
83 * @param nBase base for number's
84 * @param address array descriptor address in debuggee's space
85 * @param pResult string buffer
86 * @param max length of the string buffer
88 HRESULT format_arr_descr(DEBUGHELPER *pHelper, int nBase, const void *address, char *pResult, size_t max);
91 * Format a pointer double ended queue
93 * @param pHelper debugger helper
94 * @param nBase base for number's
95 * @param address pdeq address in debuggee's space
96 * @param pResult string buffer
97 * @param max length of the string buffer
99 HRESULT format_pdeq(DEBUGHELPER *pHelper, int nBase, const void *address, char *pResult, size_t max);
104 * @param pHelper debugger helper
105 * @param nBase base for number's
106 * @param address bitset address in debuggee's space
107 * @param pResult string buffer
108 * @param max length of the string buffer
110 HRESULT format_bitset(DEBUGHELPER *pHelper, int nBase, const void *address, char *pResult, size_t max);
113 * format a firm object
115 * @param pHelper debugger helper
116 * @param nBase base for number's
117 * @param kind Firm kind
118 * @param address firm object address in debuggee's space
119 * @param pResult string buffer
120 * @param max length of the string buffer
122 HRESULT FormatFirmObject(DEBUGHELPER *pHelper, int nBase, firm_kind kind, const void *address, char *pResult, size_t max);
124 #endif /* __FIRM_EVALUATOR_H__ */