DWARF information support updates
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / DWARFManager.h
1
2
3 #ifndef __DWARFMANAGER_H__
4 #define __DWARFMANAGER_H__
5
6
7 // Definition for the DWARF status of each source file
8 typedef enum
9 {
10 DWARFSTATUS_OK = 0x0,
11 DWARFSTATUS_OUTDATEDFILE = 0x1,
12 DWARFSTATUS_NOFILE = 0x2,
13 DWARFSTATUS_NOFILEINFO = 0x4,
14 DWARFSTATUS_UNKNOWN = 0xff
15 }DWARFstatus;
16
17 // Internal manager
18 extern bool DWARFManager_Reset(void);
19 extern bool DWARFManager_Close(void);
20 extern void DWARFManager_Init(void);
21 extern int DWARFManager_ElfInit(Elf *ElfPtr, struct stat FileElfInfo);
22 extern void DWARFManager_Set(size_t NbPathsInList, char **PtrListPaths);
23 extern size_t DWARFManager_GetNbSources(void);
24
25 // General manager
26 extern char *DWARFManager_GetFunctionName(size_t Adr);
27 extern size_t DWARFManager_GetSrcLanguageFromIndex(size_t Index);
28
29 // Source text files manager
30 extern char *DWARFManager_GetFullSourceFilenameFromAdr(size_t Adr, DWARFstatus *Status);
31 extern char *DWARFManager_GetNumFullSourceFilename(size_t Index);
32 extern char *DWARFManager_GetNumSourceFilename(size_t Index);
33
34 // Symbols manager
35 extern char *DWARFManager_GetSymbolnameFromAdr(size_t Adr);
36
37 // Source text lines manager
38 extern size_t DWARFManager_GetNumLineFromAdr(size_t Adr, size_t Tag);
39 extern char *DWARFManager_GetLineSrcFromAdr(size_t Adr, size_t Tag);
40 extern char *DWARFManager_GetLineSrcFromAdrNumLine(size_t Adr, size_t NumLine);
41 extern char *DWARFManager_GetLineSrcFromNumLineBaseAdr(size_t Adr, size_t NumLine);
42 extern char **DWARFManager_GetSrcListPtrFromIndex(size_t Index, bool Used);
43 extern size_t DWARFManager_GetSrcNbListPtrFromIndex(size_t Index, bool Used);
44 extern size_t *DWARFManager_GetSrcNumLinesPtrFromIndex(size_t Index, bool Used);
45
46 // Variables manager
47 extern size_t DWARFManager_GetNbVariables(size_t Adr);
48 extern void* DWARFManager_GetInfosVariable(size_t Adr, size_t Index);
49
50 // Global variables manager
51 extern size_t DWARFManager_GetGlobalVariableAdrFromName(char *VariableName);
52
53 #if 0
54 // Global variables manager
55 extern char *DWARFManager_GetGlobalVariableName(size_t Index);
56 extern size_t DWARFManager_GetGlobalVariableTypeEncoding(size_t Index);
57 extern char *DWARFManager_GetGlobalVariableTypeName(size_t Index);
58 extern size_t DWARFManager_GetGlobalVariableTypeByteSize(size_t Index);
59 extern size_t DWARFManager_GetGlobalVariableAdr(size_t Index);
60 extern size_t DWARFManager_GetGlobalVariableTypeTag(size_t Index);
61
62 // Local variables manager
63 extern char *DWARFManager_GetLocalVariableName(size_t Adr, size_t Index);
64 extern size_t DWARFManager_GetLocalVariableTypeEncoding(size_t Adr, size_t Index);
65 extern char *DWARFManager_GetLocalVariableTypeName(size_t Adr, size_t Index);
66 extern size_t DWARFManager_GetLocalVariableTypeByteSize(size_t Adr, size_t Index);
67 extern size_t DWARFManager_GetLocalVariableTypeTag(size_t Adr, size_t Index);
68 extern size_t DWARFManager_GetLocalVariableOp(size_t Adr, size_t Index);
69 extern int DWARFManager_GetLocalVariableOffset(size_t Adr, size_t Index);
70 #endif
71
72
73 #endif // __DWARFMANAGER_H__