2 * This header is only installed for use by the debugger:
3 * the structures and the API declared here are not supported.
6 #ifndef __MONO_DEBUG_MONO_SYMFILE_H__
7 #define __MONO_DEBUG_MONO_SYMFILE_H__
10 #include <mono/metadata/class.h>
11 #include <mono/metadata/reflection.h>
12 #include <mono/metadata/mono-debug.h>
14 typedef struct MonoSymbolFileOffsetTable MonoSymbolFileOffsetTable
;
15 typedef struct MonoSymbolFileLineNumberEntry MonoSymbolFileLineNumberEntry
;
16 typedef struct MonoSymbolFileMethodAddress MonoSymbolFileMethodAddress
;
17 typedef struct MonoSymbolFileDynamicTable MonoSymbolFileDynamicTable
;
18 typedef struct MonoSymbolFileSourceEntry MonoSymbolFileSourceEntry
;
19 typedef struct MonoSymbolFileMethodEntry MonoSymbolFileMethodEntry
;
21 /* Keep in sync with OffsetTable in mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs */
22 struct MonoSymbolFileOffsetTable
{
23 guint32 _total_file_size
;
24 guint32 _data_section_offset
;
25 guint32 _data_section_size
;
26 guint32 _compile_unit_count
;
27 guint32 _compile_unit_table_offset
;
28 guint32 _compile_unit_table_size
;
29 guint32 _source_count
;
30 guint32 _source_table_offset
;
31 guint32 _source_table_size
;
32 guint32 _method_count
;
33 guint32 _method_table_offset
;
34 guint32 _method_table_size
;
36 guint32 _anonymous_scope_count
;
37 guint32 _anonymous_scope_table_offset
;
38 guint32 _anonymous_scope_table_size
;
39 guint32 _line_number_table_line_base
;
40 guint32 _line_number_table_line_range
;
41 guint32 _line_number_table_opcode_base
;
42 guint32 _is_aspx_source
;
45 struct MonoSymbolFileSourceEntry
{
50 struct MonoSymbolFileMethodEntry
{
53 guint32 _line_number_table
;
56 struct MonoSymbolFileMethodAddress
{
58 const guint8
*start_address
;
59 const guint8
*end_address
;
60 const guint8
*method_start_address
;
61 const guint8
*method_end_address
;
62 const guint8
*wrapper_address
;
65 guint32 variable_table_offset
;
66 guint32 type_table_offset
;
67 guint32 num_line_numbers
;
68 guint32 line_number_offset
;
69 guint8 data
[MONO_ZERO_LEN_ARRAY
];
72 struct _MonoDebugMethodInfo
{
74 MonoDebugHandle
*handle
;
80 struct _MonoDebugLineNumberEntry
{
82 guint32 native_offset
;
85 struct _MonoSymbolFile
{
86 const guint8
*raw_contents
;
87 int raw_contents_size
;
88 void *raw_contents_handle
;
92 GHashTable
*method_hash
;
93 MonoSymbolFileOffsetTable
*offset_table
;
96 #define MONO_SYMBOL_FILE_MAJOR_VERSION 50
97 #define MONO_SYMBOL_FILE_MINOR_VERSION 0
98 #define MONO_SYMBOL_FILE_MAGIC 0x45e82623fd7fa614ULL
103 mono_debug_open_mono_symbols (MonoDebugHandle
*handle
,
104 const guint8
*raw_contents
,
106 gboolean in_the_debugger
);
109 mono_debug_close_mono_symbol_file (MonoSymbolFile
*symfile
);
111 MonoDebugSourceLocation
*
112 mono_debug_symfile_lookup_location (MonoDebugMethodInfo
*minfo
,
116 _mono_debug_address_from_il_offset (MonoDebugMethodJitInfo
*jit
,
119 MonoDebugMethodInfo
*
120 mono_debug_symfile_lookup_method (MonoDebugHandle
*handle
,
124 mono_debug_symfile_lookup_locals (MonoDebugMethodInfo
*minfo
, char ***names
,
128 mono_debug_symfile_get_line_numbers (MonoDebugMethodInfo
*minfo
, char **source_file
, int *n_il_offsets
, int **il_offsets
, int **line_numbers
);
132 #endif /* __MONO_SYMFILE_H__ */