Skip to content

Commit

Permalink
[debugger] Bump protocol for this commit mono/mono#19248 (#34070)
Browse files Browse the repository at this point in the history
Bump protocol for this commit mono/mono#19248 as suggested by @vargaz.

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
  • Loading branch information
monojenkins and thaystg authored Mar 26, 2020
1 parent cf32290 commit 87e1674
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/mono/mono/mini/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ typedef struct {
#define HEADER_LENGTH 11

#define MAJOR_VERSION 2
#define MINOR_VERSION 55
#define MINOR_VERSION 56

typedef enum {
CMD_SET_VM = 1,
Expand Down Expand Up @@ -6976,6 +6976,12 @@ get_types_for_source_file (gpointer key, gpointer value, gpointer user_data)
}
}

static void add_error_string (Buffer *buf, const char *str)
{
if (CHECK_PROTOCOL_VERSION (2, 56))
buffer_add_string (buf, str);
}

static ErrorCode
vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
{
Expand Down Expand Up @@ -7280,7 +7286,7 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
ignore_case = decode_byte (p, &p, end);

if (!mono_reflection_parse_type_checked (name, &info, error)) {
buffer_add_string (buf, mono_error_get_message (error));
add_error_string (buf, mono_error_get_message (error));
mono_error_cleanup (error);
g_free (name);
mono_reflection_free_type_info (&info);
Expand Down Expand Up @@ -7791,7 +7797,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
g_free (s);
mono_domain_set_fast (d, TRUE);
char* error_msg = g_strdup_printf ("Unexpected assembly-qualified type %s was provided", original_s);
buffer_add_string (buf, error_msg);
add_error_string (buf, error_msg);
g_free (error_msg);
g_free (original_s);
return ERR_INVALID_ARGUMENT;
Expand All @@ -7803,7 +7809,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
g_free (s);
mono_domain_set_fast (d, TRUE);
char* error_msg = g_strdup_printf ("Invalid type name %s", original_s);
buffer_add_string (buf, error_msg);
add_error_string (buf, error_msg);
g_free (error_msg);
g_free (original_s);
return ERR_INVALID_ARGUMENT;
Expand Down Expand Up @@ -7869,7 +7875,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
error_init (error);
MonoClass* mono_class = mono_class_get_checked (ass->image, token, error);
if (!is_ok (error)) {
buffer_add_string (buf, mono_error_get_message (error));
add_error_string (buf, mono_error_get_message (error));
mono_error_cleanup (error);
return ERR_INVALID_ARGUMENT;
}
Expand All @@ -7886,7 +7892,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
error_init (error);
MonoMethod* mono_method = mono_get_method_checked (ass->image, token, NULL, NULL, error);
if (!is_ok (error)) {
buffer_add_string (buf, mono_error_get_message (error));
add_error_string (buf, mono_error_get_message (error));
mono_error_cleanup (error);
return ERR_INVALID_ARGUMENT;
}
Expand Down Expand Up @@ -8739,7 +8745,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g

header = mono_method_get_header_checked (method, error);
if (!header) {
buffer_add_string (buf, mono_error_get_message (error));
add_error_string (buf, mono_error_get_message (error));
mono_error_cleanup (error); /* FIXME don't swallow the error */
return ERR_INVALID_ARGUMENT;
}
Expand Down Expand Up @@ -9571,7 +9577,7 @@ string_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
if (!is_ok (error)) {
if (s)
g_free (s);
buffer_add_string (buf, mono_error_get_message (error));
add_error_string (buf, mono_error_get_message (error));
return ERR_INVALID_ARGUMENT;
}
buffer_add_string (buf, s);
Expand Down

0 comments on commit 87e1674

Please sign in to comment.