Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / metadata / debug-mono-symfile.h
index bafdbffd0d8b58d22e7511587989d5d13017e1b9..67a125133d5475dbaa2b97bb32aa0f8f96e80181 100644 (file)
@@ -20,10 +20,6 @@ typedef struct MonoSymbolFileSourceEntry     MonoSymbolFileSourceEntry;
 typedef struct MonoSymbolFileMethodIndexEntry  MonoSymbolFileMethodIndexEntry;
 typedef struct MonoSymbolFileLexicalBlockEntry MonoSymbolFileLexicalBlockEntry;
 
-typedef struct MonoDebugMethodInfo             MonoDebugMethodInfo;
-typedef struct MonoDebugLexicalBlockEntry      MonoDebugLexicalBlockEntry;
-typedef struct MonoDebugLineNumberEntry                MonoDebugLineNumberEntry;
-
 /* Keep in sync with OffsetTable in mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs */
 struct MonoSymbolFileOffsetTable {
        guint32 _total_file_size;
@@ -43,8 +39,6 @@ struct MonoSymbolFileMethodEntry {
        guint32 _token;
        guint32 _start_row;
        guint32 _end_row;
-       guint32 _class_type_index;
-       guint32 _num_parameters;
        guint32 _num_locals;
        guint32 _num_line_numbers;
        guint32 _name_offset;
@@ -79,10 +73,12 @@ struct MonoSymbolFileMethodAddress {
        const guint8 *method_end_address;
        const guint8 *wrapper_address;
        guint32 has_this;
+       guint32 num_params;
        guint32 variable_table_offset;
        guint32 type_table_offset;
        guint32 num_line_numbers;
        guint32 line_number_offset;
+       guint32 num_lexical_blocks;
        guint32 lexical_block_table_offset;
        guint8 data [MONO_ZERO_LEN_ARRAY];
 };
@@ -97,55 +93,63 @@ struct MonoSymbolFileLineNumberEntry {
        guint32 _offset;
 };
 
-struct MonoDebugMethodInfo {
+struct _MonoDebugMethodInfo {
        MonoMethod *method;
        MonoDebugHandle *handle;
        guint32 index;
        guint32 num_il_offsets;
        MonoSymbolFileLineNumberEntry *il_offsets;
+       guint32 num_lexical_blocks;
+       MonoSymbolFileLexicalBlockEntry *lexical_blocks;
        MonoSymbolFileMethodEntry *entry;
 };
 
-struct MonoDebugLexicalBlockEntry {
-       guint32 start_address;
-       guint32 end_address;
+struct _MonoDebugLexicalBlockEntry {
+       guint32 il_start_offset;
+       guint32 native_start_offset;
+       guint32 il_end_offset;
+       guint32 native_end_offset;
 };
 
-struct MonoDebugLineNumberEntry {
-       guint32 offset;
-       guint32 address;
+struct _MonoDebugLineNumberEntry {
+       guint32 il_offset;
+       guint32 native_offset;
 };
 
 struct _MonoSymbolFile {
        const guint8 *raw_contents;
        int raw_contents_size;
+       gchar *filename;
        GHashTable *method_hash;
        MonoSymbolFileOffsetTable *offset_table;
 };
 
-#define MONO_SYMBOL_FILE_VERSION               37
+#define MONO_SYMBOL_FILE_VERSION               39
 #define MONO_SYMBOL_FILE_MAGIC                 0x45e82623fd7fa614ULL
 
+G_BEGIN_DECLS
+
 MonoSymbolFile *
-mono_debug_open_mono_symbol_file   (MonoDebugHandle           *handle,
-                                   gboolean                   create_symfile);
+mono_debug_open_mono_symbols       (MonoDebugHandle          *handle,
+                                   const guint8             *raw_contents,
+                                   int                       size,
+                                   gboolean                  in_the_debugger);
 
 void
 mono_debug_close_mono_symbol_file  (MonoSymbolFile           *symfile);
 
-gchar *
-mono_debug_find_source_location    (MonoSymbolFile           *symfile,
-                                   MonoMethod               *method,
-                                   guint32                   offset,
-                                   guint32                  *line_number);
+MonoDebugSourceLocation *
+mono_debug_symfile_lookup_location (MonoDebugMethodInfo      *minfo,
+                                   guint32                   offset);
 
 gint32
 _mono_debug_address_from_il_offset (MonoDebugMethodJitInfo   *jit,
                                    guint32                   il_offset);
 
 MonoDebugMethodInfo *
-mono_debug_find_method             (MonoDebugHandle           *handle,
+mono_debug_symfile_lookup_method   (MonoDebugHandle          *handle,
                                    MonoMethod               *method);
+G_END_DECLS
 
 #endif /* __MONO_SYMFILE_H__ */