diff --git a/src/mono/mono/mini/debugger-agent.c b/src/mono/mono/mini/debugger-agent.c index c68454d813354..b8ef6083f4f26 100644 --- a/src/mono/mono/mini/debugger-agent.c +++ b/src/mono/mono/mini/debugger-agent.c @@ -3647,7 +3647,7 @@ static void runtime_initialized (MonoProfiler *prof) { process_profiler_event (EVENT_KIND_VM_START, mono_thread_current ()); - if (CHECK_PROTOCOL_VERSION (3, 0)) + if (CHECK_PROTOCOL_VERSION (2, 59)) process_profiler_event (EVENT_KIND_ASSEMBLY_LOAD, (mono_defaults.corlib->assembly)); if (agent_config.defer) { ERROR_DECL (error); @@ -5029,7 +5029,7 @@ buffer_add_value_full (Buffer *buf, MonoType *t, void *addr, MonoDomain *domain, if (!obj) { buffer_add_byte (buf, VALUE_TYPE_ID_NULL); - if (CHECK_PROTOCOL_VERSION (3, 0)) { + if (CHECK_PROTOCOL_VERSION (2, 59)) { buffer_add_info_for_null_value(buf, t, domain); } } else { @@ -5924,7 +5924,7 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 return ERR_INVALID_ARGUMENT; } else if (m_class_is_valuetype (m->klass) && (m->flags & METHOD_ATTRIBUTE_STATIC)) { /* Should be null */ - if (!CHECK_PROTOCOL_VERSION (3, 0)) { //on icordbg I couldn't find type information when invoking a static method maybe I can change this later + if (!CHECK_PROTOCOL_VERSION (2, 59)) { //on icordbg I couldn't find type information when invoking a static method maybe I can change this later int type = decode_byte (p, &p, end); if (type != VALUE_TYPE_ID_NULL) { PRINT_DEBUG_MSG (1, "[%p] Error: Static vtype method invoked with this argument.\n", (gpointer) (gsize) mono_native_thread_id_get ()); @@ -5946,14 +5946,14 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8 return err; } } else { - if (!(m->flags & METHOD_ATTRIBUTE_STATIC && CHECK_PROTOCOL_VERSION (3, 0))) { //on icordbg I couldn't find an object when invoking a static method maybe I can change this later + if (!(m->flags & METHOD_ATTRIBUTE_STATIC && CHECK_PROTOCOL_VERSION (2, 59))) { //on icordbg I couldn't find an object when invoking a static method maybe I can change this later err = decode_value(m_class_get_byval_arg(m->klass), domain, this_buf, p, &p, end, FALSE); if (err != ERR_NONE) return err; } } - if (!m_class_is_valuetype (m->klass) && !(m->flags & METHOD_ATTRIBUTE_STATIC && CHECK_PROTOCOL_VERSION (3, 0))) //on icordbg I couldn't find an object when invoking a static method maybe I can change this later + if (!m_class_is_valuetype (m->klass) && !(m->flags & METHOD_ATTRIBUTE_STATIC && CHECK_PROTOCOL_VERSION (2, 59))) //on icordbg I couldn't find an object when invoking a static method maybe I can change this later this_arg = *(MonoObject**)this_buf; else this_arg = NULL; @@ -6733,7 +6733,7 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf) tls->pending_invoke->endp = tls->pending_invoke->p + (end - p); tls->pending_invoke->suspend_count = suspend_count; tls->pending_invoke->nmethods = nmethods; - if (!CHECK_PROTOCOL_VERSION (3, 0)) { //on icordbg they send a resume after calling an invoke method + if (!CHECK_PROTOCOL_VERSION (2, 59)) { //on icordbg they send a resume after calling an invoke method if (flags & INVOKE_FLAG_SINGLE_THREADED) { resume_thread(THREAD_TO_INTERNAL(thread)); } @@ -7540,7 +7540,7 @@ field_commands (int command, guint8 *p, guint8 *end, Buffer *buf) buffer_add_typeid (buf, domain, f->parent); buffer_add_typeid (buf, domain, mono_class_from_mono_type_internal (f->type)); buffer_add_int (buf, f->type->attrs); - if (CHECK_PROTOCOL_VERSION (3, 0)) { + if (CHECK_PROTOCOL_VERSION (2, 59)) { buffer_add_int (buf, f->type->type); buffer_add_int (buf, m_class_get_type_token (f->parent)); buffer_add_int (buf, m_class_get_type_token (mono_class_from_mono_type_internal (f->type))); @@ -7684,7 +7684,7 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint while ((m = mono_class_get_methods (klass, &iter))) { buffer_add_methodid (buf, domain, m); - if (CHECK_PROTOCOL_VERSION (3, 0)) + if (CHECK_PROTOCOL_VERSION (2, 59)) buffer_add_int(buf, m->token); i ++; } diff --git a/src/mono/mono/mini/debugger-protocol.h b/src/mono/mono/mini/debugger-protocol.h index 038777aa966fe..bdf8ee5b277d7 100644 --- a/src/mono/mono/mini/debugger-protocol.h +++ b/src/mono/mono/mini/debugger-protocol.h @@ -10,8 +10,8 @@ * Wire Protocol definitions */ -#define MAJOR_VERSION 3 -#define MINOR_VERSION 0 +#define MAJOR_VERSION 2 +#define MINOR_VERSION 59 typedef enum { MDBGPROT_CMD_COMPOSITE = 100