1 #ifndef __MONO_DEBUG_SYMFILE_H__
2 #define __MONO_DEBUG_SYMFILE_H__
5 #include <mono/metadata/class.h>
6 #include <mono/metadata/reflection.h>
8 typedef struct MonoDebugSymbolFile MonoDebugSymbolFile;
9 typedef struct MonoDebugSymbolFileSection MonoDebugSymbolFileSection;
10 typedef struct MonoDebugMethodInfo MonoDebugMethodInfo;
11 typedef struct MonoDebugILOffsetInfo MonoDebugILOffsetInfo;
13 /* Machine dependent information about a method.
15 * This structure is created by the MonoDebugMethodInfoFunc callback of
16 * mono_debug_update_symbol_file (). */
17 struct MonoDebugMethodInfo {
23 guint32 *param_offsets;
25 guint32 *local_offsets;
26 guint32 num_il_offsets;
27 MonoDebugILOffsetInfo *il_offsets;
31 struct MonoDebugILOffsetInfo {
36 struct MonoDebugSymbolFile {
40 /* Pointer to the mmap()ed contents of the file. */
42 size_t raw_contents_size;
43 /* Array of MONO_DEBUG_SYMBOL_SECTION_MAX elements. */
44 MonoDebugSymbolFileSection *section_offsets;
48 struct MonoDebugSymbolFileSection {
54 #define MONO_DEBUG_SYMBOL_FILE_VERSION 7
56 /* Keep in sync with Mono.CSharp.Debugger.MonoDwarfFileWriter.Section */
57 #define MONO_DEBUG_SYMBOL_SECTION_DEBUG_INFO 0x01
58 #define MONO_DEBUG_SYMBOL_SECTION_DEBUG_ABBREV 0x02
59 #define MONO_DEBUG_SYMBOL_SECTION_DEBUG_LINE 0x03
60 #define MONO_DEBUG_SYMBOL_SECTION_MONO_RELOC_TABLE 0x04
62 #define MONO_DEBUG_SYMBOL_SECTION_MAX 0x05
64 /* Tries to load `filename' as a debugging information file, if `emit_warnings" is set,
65 * use g_warning() to signal error messages on failure, otherwise silently return NULL. */
66 MonoDebugSymbolFile *mono_debug_open_symbol_file (MonoImage *image,
68 gboolean emit_warnings);
70 /* This callback function needs to return a MonoDebugMethodInfo structure containing the
71 * machine-dependent information about method associated with the metadata_token.
72 * It's highly recommended to cache the generated data since this function can be called
73 * several times per method. */
74 typedef MonoDebugMethodInfo * (*MonoDebugMethodInfoFunc) (MonoDebugSymbolFile *symbol_file,
75 guint32 metadata_token,
78 void mono_debug_update_symbol_file (MonoDebugSymbolFile *symbol_file,
79 MonoDebugMethodInfoFunc method_info_func,
82 void mono_debug_close_symbol_file (MonoDebugSymbolFile *symbol_file);
85 ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig (MonoReflectionAssembly *assembly,
86 MonoArray *signature);
88 MonoReflectionMethod *
89 ves_icall_Debugger_MonoSymbolWriter_method_from_token (MonoReflectionAssembly *assembly,
93 ves_icall_Debugger_DwarfFileWriter_get_type_token (MonoReflectionType *type);
96 #endif /* __MONO_DEBUG_SYMFILE_H__ */