X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fmono-debug-debugger.h;h=f4ed9621fa25127228ca34056a7ec9b95c1070a7;hb=5d7d39edc023af97d9b96d96199acc7f1cfea4ea;hp=9388b6916b3b65a3c4ba57f461c9cabac8b56fe8;hpb=699e59742843044f6efa1726b7cb64f19d909e64;p=mono.git diff --git a/mono/metadata/mono-debug-debugger.h b/mono/metadata/mono-debug-debugger.h index 9388b6916b3..f4ed9621fa2 100644 --- a/mono/metadata/mono-debug-debugger.h +++ b/mono/metadata/mono-debug-debugger.h @@ -12,220 +12,22 @@ #include typedef struct _MonoDebuggerBreakpointInfo MonoDebuggerBreakpointInfo; -typedef struct _MonoDebuggerBuiltinTypeInfo MonoDebuggerBuiltinTypeInfo; -typedef struct _MonoDebuggerBuiltinTypes MonoDebuggerBuiltinTypes; -typedef struct _MonoDebuggerSymbolTable MonoDebuggerSymbolTable; -typedef struct _MonoDebuggerSymbolFile MonoDebuggerSymbolFile; -typedef struct _MonoDebuggerSymbolFilePriv MonoDebuggerSymbolFilePriv; -typedef struct _MonoDebuggerRangeInfo MonoDebuggerRangeInfo; -typedef struct _MonoDebuggerClassEntry MonoDebuggerClassEntry; -typedef struct _MonoDebuggerClassInfo MonoDebuggerClassInfo; -typedef struct _MonoDebuggerClassTable MonoDebuggerClassTable; typedef struct _MonoDebuggerIOLayer MonoDebuggerIOLayer; typedef enum { MONO_DEBUGGER_EVENT_BREAKPOINT, + MONO_DEBUGGER_EVENT_ADD_MODULE, MONO_DEBUGGER_EVENT_RELOAD_SYMTABS, MONO_DEBUGGER_EVENT_UNHANDLED_EXCEPTION, MONO_DEBUGGER_EVENT_EXCEPTION, MONO_DEBUGGER_EVENT_THROW_EXCEPTION } MonoDebuggerEvent; -typedef enum { - MONO_DEBUGGER_TYPE_KIND_UNKNOWN = 1, - MONO_DEBUGGER_TYPE_KIND_FUNDAMENTAL, - MONO_DEBUGGER_TYPE_KIND_STRING, - MONO_DEBUGGER_TYPE_KIND_SZARRAY, - MONO_DEBUGGER_TYPE_KIND_ARRAY, - MONO_DEBUGGER_TYPE_KIND_POINTER, - MONO_DEBUGGER_TYPE_KIND_ENUM, - MONO_DEBUGGER_TYPE_KIND_OBJECT, - MONO_DEBUGGER_TYPE_KIND_STRUCT, - MONO_DEBUGGER_TYPE_KIND_CLASS, - MONO_DEBUGGER_TYPE_KIND_CLASS_INFO, - MONO_DEBUGGER_TYPE_KIND_REFERENCE -} MonoDebuggerTypeKind; - -typedef enum { - MONO_DEBUGGER_TYPE_UNKNOWN = 0, - MONO_DEBUGGER_TYPE_VOID, - MONO_DEBUGGER_TYPE_BOOLEAN, - MONO_DEBUGGER_TYPE_CHAR, - MONO_DEBUGGER_TYPE_I1, - MONO_DEBUGGER_TYPE_U1, - MONO_DEBUGGER_TYPE_I2, - MONO_DEBUGGER_TYPE_U2, - MONO_DEBUGGER_TYPE_I4, - MONO_DEBUGGER_TYPE_U4, - MONO_DEBUGGER_TYPE_I8, - MONO_DEBUGGER_TYPE_U8, - MONO_DEBUGGER_TYPE_R4, - MONO_DEBUGGER_TYPE_R8, - MONO_DEBUGGER_TYPE_I, - MONO_DEBUGGER_TYPE_U, - MONO_DEBUGGER_TYPE_STRING, - MONO_DEBUGGER_TYPE_ARRAY, - MONO_DEBUGGER_TYPE_ENUM, - MONO_DEBUGGER_TYPE_MAX = 100 -} MonoDebuggerType; - struct _MonoDebuggerBreakpointInfo { guint32 index; MonoMethodDesc *desc; }; -struct _MonoDebuggerBuiltinTypeInfo -{ - MonoDebuggerClassEntry *centry; - MonoClass *klass; - guint32 type_info; - guint32 class_info; - guint8 *type_data; -}; - -struct _MonoDebuggerBuiltinTypes { - guint32 total_size; - guint32 type_info_size; - MonoDebuggerBuiltinTypeInfo *object_type; - MonoDebuggerBuiltinTypeInfo *valuetype_type; - MonoDebuggerBuiltinTypeInfo *byte_type; - MonoDebuggerBuiltinTypeInfo *void_type; - MonoDebuggerBuiltinTypeInfo *boolean_type; - MonoDebuggerBuiltinTypeInfo *sbyte_type; - MonoDebuggerBuiltinTypeInfo *int16_type; - MonoDebuggerBuiltinTypeInfo *uint16_type; - MonoDebuggerBuiltinTypeInfo *int32_type; - MonoDebuggerBuiltinTypeInfo *uint32_type; - MonoDebuggerBuiltinTypeInfo *int_type; - MonoDebuggerBuiltinTypeInfo *uint_type; - MonoDebuggerBuiltinTypeInfo *int64_type; - MonoDebuggerBuiltinTypeInfo *uint64_type; - MonoDebuggerBuiltinTypeInfo *single_type; - MonoDebuggerBuiltinTypeInfo *double_type; - MonoDebuggerBuiltinTypeInfo *char_type; - MonoDebuggerBuiltinTypeInfo *string_type; - MonoDebuggerBuiltinTypeInfo *enum_type; - MonoDebuggerBuiltinTypeInfo *array_type; - MonoDebuggerBuiltinTypeInfo *exception_type; - MonoDebuggerBuiltinTypeInfo *type_type; -}; - -struct _MonoDebuggerSymbolTable { - guint64 magic; - guint32 version; - guint32 total_size; - - /* - * Corlib and builtin types. - */ - MonoDebuggerSymbolFile *corlib; - MonoDebuggerBuiltinTypes *builtin_types; - - /* - * The symbol files. - */ - guint32 num_symbol_files; - MonoDebuggerSymbolFile **symbol_files; - - /* - * Type table. - * This is intentionally not a GPtrArray to make it more easy to - * read for the debugger. The `type_tables' field contains - * `num_type_tables' pointers to continuous memory areas of - * `type_table_chunk_size' bytes each. - * - * The type table is basically a big continuous blob, but we need - * to split it up into pieces because we don't know the total size - * in advance and using g_realloc() doesn't work because that may - * reallocate the block to a different address. - */ - guint32 num_type_tables; - guint32 type_table_chunk_size; - gpointer *type_tables; - /* - * Current type table. - * The `current_type_table' points to a blob of `type_table_chunk_size' - * bytes. - */ - gpointer current_type_table; - /* - * This is the total size of the type table, including all the tables - * in the `type_tables' vector. - */ - guint32 type_table_size; - /* - * These are global offsets - the `current_type_table' starts at global - * offset `type_table_start' and we've already allocated stuff in it - * until offset `type_table_offset'. - */ - guint32 type_table_offset; - guint32 type_table_start; - - /* - * New in version 44. - */ - guint32 num_misc_tables; - guint32 misc_table_chunk_size; - gpointer *misc_tables; - gpointer current_misc_table; - guint32 misc_table_size; - guint32 misc_table_offset; - guint32 misc_table_start; -}; - -struct _MonoDebuggerSymbolFile { - guint32 index; - MonoSymbolFile *symfile; - MonoImage *image; - const char *image_file; - guint32 class_entry_size; - /* Pointer to the malloced range table. */ - guint32 locked; - guint32 generation; - MonoDebuggerRangeInfo *range_table; - guint32 range_entry_size; - guint32 num_range_entries; - /* Pointer to the class table. */ - guint32 class_table_size; - MonoDebuggerClassTable *current_class_table; - MonoDebuggerClassTable *class_table_start; - /* Private. */ - MonoDebuggerSymbolFilePriv *_priv; -}; - -struct _MonoDebuggerRangeInfo { - const guint8 *start_address; - const guint8 *end_address; - guint32 index; - gpointer dynamic_data; - guint32 dynamic_size; -}; - -struct _MonoDebuggerClassTable { - MonoDebuggerClassTable *next; - guint32 index, size; - MonoDebuggerClassInfo *data; -}; - -struct _MonoDebuggerClassInfo { - MonoClass *klass; - guint32 rank; - guint32 token; - guint32 type_info; -}; - -struct _MonoDebuggerClassEntry { - MonoDebuggerClassInfo *info; - guint32 type_reference; -}; - -enum { - MONO_DEBUGGER_MISC_ENTRY_TYPE_UNKNOWN = 0, - MONO_DEBUGGER_MISC_ENTRY_TYPE_WRAPPER -}; - -extern MonoDebuggerSymbolTable *mono_debugger_symbol_table; - /* * Address of the x86 trampoline code. This is used by the debugger to check * whether a method is a trampoline. @@ -267,26 +69,21 @@ extern MonoDebuggerIOLayer mono_debugger_io_layer; #endif -extern void (*mono_debugger_event_handler) (MonoDebuggerEvent event, gpointer data, guint32 arg); +extern void (*mono_debugger_event_handler) (MonoDebuggerEvent event, guint64 data, guint64 arg); void mono_debugger_initialize (void); void mono_debugger_cleanup (void); void mono_debugger_lock (void); void mono_debugger_unlock (void); -void mono_debugger_event (MonoDebuggerEvent event, gpointer data, guint32 arg); - -MonoDebuggerSymbolFile *_mono_debugger_get_symfile (MonoImage *image); -MonoDebuggerSymbolFile *mono_debugger_add_symbol_file (MonoDebugHandle *handle); -void mono_debugger_start_add_type (MonoDebuggerSymbolFile *symfile, - MonoClass *klass); -void mono_debugger_add_type (MonoDebuggerSymbolFile *symfile, - MonoClass *klass); -MonoDebuggerBuiltinTypes *mono_debugger_add_builtin_types (MonoDebuggerSymbolFile *symfile); - -void mono_debugger_add_method (MonoDebuggerSymbolFile *symfile, - MonoDebugMethodInfo *minfo, - MonoDebugMethodJitInfo *jit); +void mono_debugger_event (MonoDebuggerEvent event, guint64 data, guint64 arg); + +void mono_debugger_add_symbol_file (MonoDebugHandle *handle); +void mono_debugger_start_add_type (MonoDebugHandle *symfile, MonoClass *klass); +void mono_debugger_add_type (MonoDebugHandle *symfile, MonoClass *klass); +void mono_debugger_add_builtin_types (MonoDebugHandle *symfile); + +void mono_debugger_add_method (MonoDebugMethodJitInfo *jit); void mono_debugger_add_wrapper (MonoMethod *wrapper, MonoDebugMethodJitInfo *jit,