1 #ifndef __DEBUG_INTERNALS_H__ 2 #define __DEBUG_INTERNALS_H__ 3 4 #include <glib.h> 5 #include <mono/metadata/debug-helpers.h> 6 #include <mono/metadata/mono-debug.h> 7 #include <mono/utils/mono-compiler.h> 8 9 struct _MonoDebugMethodInfo { 10 MonoMethod *method; 11 MonoDebugHandle *handle; 12 uint32_t index; 13 uint32_t data_offset; 14 uint32_t lnt_offset; 15 }; 16 17 typedef struct { 18 int parent; 19 int type; 20 /* IL offsets */ 21 int start_offset, end_offset; 22 } MonoDebugCodeBlock; 23 24 typedef struct { 25 char *name; 26 int index; 27 /* Might be null for the main scope */ 28 MonoDebugCodeBlock *block; 29 } MonoDebugLocalVar; 30 31 /* 32 * Information about local variables retrieved from a symbol file. 33 */ 34 struct _MonoDebugLocalsInfo { 35 int num_locals; 36 MonoDebugLocalVar *locals; 37 int num_blocks; 38 MonoDebugCodeBlock *code_blocks; 39 }; 40 41 /* 42 * Information about method await yield and resume offsets retrieved from a symbol file. 43 */ 44 struct _MonoDebugMethodAsyncInfo { 45 uint32_t catch_handler_offset; 46 int num_awaits; 47 uint32_t *yield_offsets; 48 uint32_t *resume_offsets; 49 uint32_t *move_next_method_token; 50 }; 51 52 struct _MonoDebugLineNumberEntry { 53 uint32_t il_offset; 54 uint32_t native_offset; 55 }; 56 57 /* 58 * Information about a source file retrieved from a symbol file. 59 */ 60 typedef struct { 61 char *source_file; 62 /* 16 byte long */ 63 guint8 *guid, *hash; 64 } MonoDebugSourceInfo; 65 66 typedef struct { 67 int il_offset; 68 int line, column; 69 int end_line, end_column; 70 } MonoSymSeqPoint; 71 72 void mono_debugger_lock (void); 73 void mono_debugger_unlock (void); 74 75 void 76 mono_debug_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrArray **source_file_list, int **source_files, MonoSymSeqPoint **seq_points, int *n_seq_points); 77 78 MONO_API void 79 mono_debug_free_locals (MonoDebugLocalsInfo *info); 80 81 void 82 mono_debug_free_method_async_debug_info (MonoDebugMethodAsyncInfo *info); 83 84 gboolean 85 mono_debug_image_has_debug_info (MonoImage *image); 86 87 MonoDebugSourceLocation * 88 mono_debug_lookup_source_location_by_il (MonoMethod *method, guint32 il_offset, MonoDomain *domain); 89 90 #endif /* __DEBUG_INTERNALS_H__ */ 91