X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mono%2Fmini%2Fdebug-debugger.h;h=b7c5b43e6df38ec3999d531b53e8d8c47e738b31;hb=2c9f304f50cd3559a311215eb148ed0c0db182d7;hp=c56ec8c3ccefe97efa76474527dfbd6f1cefacad;hpb=9d61782c6e2392d7ceec2006b35be582598a70ae;p=mono.git diff --git a/mono/mini/debug-debugger.h b/mono/mini/debug-debugger.h index c56ec8c3cce..b7c5b43e6df 100644 --- a/mono/mini/debug-debugger.h +++ b/mono/mini/debug-debugger.h @@ -11,6 +11,8 @@ #include #include +#include +#include "debug-mini.h" typedef struct _MonoDebuggerInfo MonoDebuggerInfo; typedef struct _MonoDebuggerMetadataInfo MonoDebuggerMetadataInfo; @@ -21,6 +23,11 @@ typedef struct _MonoDebuggerMetadataInfo MonoDebuggerMetadataInfo; */ extern guint8 *mono_trampoline_code []; +typedef enum { + DEBUGGER_RUNTIME_FLAGS_NONE = 0, + DEBUGGER_RUNTIME_FLAGS_ATTACH_OK = 1 +} MonoDebuggerRuntimeFlags; + /* * There's a global data symbol called `MONO_DEBUGGER__debugger_info' which * contains pointers to global variables and functions which must be accessed @@ -28,30 +35,65 @@ extern guint8 *mono_trampoline_code []; */ struct _MonoDebuggerInfo { guint64 magic; - guint32 version; + guint32 major_version; + guint32 minor_version; + guint32 runtime_flags; guint32 total_size; guint32 symbol_table_size; - guint32 dummy; + guint32 mono_trampoline_num; + guint8 **mono_trampoline_code; gpointer notification_function; - guint8 ***mono_trampoline_code; MonoSymbolTable **symbol_table; MonoDebuggerMetadataInfo *metadata_info; + gint32 *debugger_version; + guint64 (*compile_method) (guint64 method_argument); guint64 (*get_virtual_method) (guint64 object_argument, guint64 method_argument); guint64 (*get_boxed_object_method) (guint64 klass_argument, guint64 val_argument); - guint64 (*insert_breakpoint) (guint64 method_argument, const gchar *string_argument); - guint64 (*remove_breakpoint) (guint64 breakpoint); MonoInvokeFunc runtime_invoke; - guint64 (*create_string) (guint64 dummy_argument, const gchar *string_argument); guint64 (*class_get_static_field_data) (guint64 klass); - guint64 (*lookup_class) (guint64 image_argument, guint64 token_arg); - guint64 (*lookup_type) (guint64 dummy_argument, const gchar *string_argument); - guint64 (*lookup_assembly) (guint64 dummy_argument, const gchar *string_argument); guint64 (*run_finally) (guint64 argument1, guint64 argument2); - guint64 (*get_current_thread) (void); - void (*attach) (void); - void (*detach) (void); void (*initialize) (void); + + guint64 (*create_string) (G_GNUC_UNUSED guint64 dummy1, G_GNUC_UNUSED guint64 dummy2, + G_GNUC_UNUSED guint64 dummy3, const gchar *string_argument); + gint64 (*lookup_class) (guint64 image_argument, G_GNUC_UNUSED guint64 dummy, + G_GNUC_UNUSED guint64 dummy2, gchar *full_name); + + guint64 (*insert_method_breakpoint) (guint64 method_argument, guint64 index); + guint64 (*insert_source_breakpoint) (guint64 image_argument, guint64 token, + guint64 index, const gchar *class_name); + void (*remove_breakpoint) (guint64 index, G_GNUC_UNUSED guint64 dummy); + + guint64 (*rgister_class_init_callback) (guint64 image_argument, guint64 token, + guint64 index, const gchar *class_name); + void (*remove_class_init_callback) (guint64 index, G_GNUC_UNUSED guint64 dummy); + + MonoDebuggerThreadInfo **thread_table; + + guint8 **executable_code_buffer; + MonoBreakpointInfo *mono_breakpoint_info; + gssize *mono_breakpoint_info_index; + + guint32 executable_code_buffer_size; + guint32 breakpoint_array_size; + + guint64 (*get_method_signature) (guint64 method_argument, G_GNUC_UNUSED guint64 dummy); + guint64 (*init_code_buffer) (void); + + /* + * These are only needed when attaching. + */ + GCThreadFunctions **thread_vtable_ptr; + GCThreadFunctions *debugger_thread_vtable; + void (**event_handler_ptr) (MonoDebuggerEvent event, guint64 data, guint64 arg); + void (*debugger_event_handler) (MonoDebuggerEvent event, guint64 data, guint64 arg); + gint32 *using_mono_debugger; + gint32 *interruption_request; + + guint64 (*abort_runtime_invoke) (G_GNUC_UNUSED guint64 dummy1, G_GNUC_UNUSED guint64 dummy2); + + guint32 *thread_abort_signal; }; struct _MonoDebuggerMetadataInfo { @@ -65,6 +107,7 @@ struct _MonoDebuggerMetadataInfo { int thread_tid_offset; int thread_stack_ptr_offset; int thread_end_stack_offset; + int klass_image_offset; int klass_instance_size_offset; int klass_parent_offset; int klass_token_offset; @@ -75,7 +118,10 @@ struct _MonoDebuggerMetadataInfo { int klass_byval_arg_offset; int klass_generic_class_offset; int klass_generic_container_offset; + int klass_vtable_offset; int field_info_size; + int field_info_type_offset; + int field_info_offset_offset; int mono_defaults_corlib_offset; int mono_defaults_object_offset; int mono_defaults_byte_offset; @@ -98,6 +144,12 @@ struct _MonoDebuggerMetadataInfo { int mono_defaults_array_offset; int mono_defaults_delegate_offset; int mono_defaults_exception_offset; + int mono_method_klass_offset; + int mono_method_token_offset; + int mono_method_flags_offset; + int mono_method_inflated_offset; + int mono_vtable_klass_offset; + int mono_vtable_vtable_offset; }; #endif