Skip to content

Commit 87e1674

Browse files
monojenkinsthaystg
andauthored
[debugger] Bump protocol for this commit mono/mono#19248 (#34070)
Bump protocol for this commit mono/mono#19248 as suggested by @vargaz. Co-authored-by: thaystg <[email protected]>
1 parent cf32290 commit 87e1674

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/mono/mono/mini/debugger-agent.c

+14-8
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ typedef struct {
298298
#define HEADER_LENGTH 11
299299

300300
#define MAJOR_VERSION 2
301-
#define MINOR_VERSION 55
301+
#define MINOR_VERSION 56
302302

303303
typedef enum {
304304
CMD_SET_VM = 1,
@@ -6976,6 +6976,12 @@ get_types_for_source_file (gpointer key, gpointer value, gpointer user_data)
69766976
}
69776977
}
69786978

6979+
static void add_error_string (Buffer *buf, const char *str)
6980+
{
6981+
if (CHECK_PROTOCOL_VERSION (2, 56))
6982+
buffer_add_string (buf, str);
6983+
}
6984+
69796985
static ErrorCode
69806986
vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
69816987
{
@@ -7280,7 +7286,7 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
72807286
ignore_case = decode_byte (p, &p, end);
72817287

72827288
if (!mono_reflection_parse_type_checked (name, &info, error)) {
7283-
buffer_add_string (buf, mono_error_get_message (error));
7289+
add_error_string (buf, mono_error_get_message (error));
72847290
mono_error_cleanup (error);
72857291
g_free (name);
72867292
mono_reflection_free_type_info (&info);
@@ -7791,7 +7797,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
77917797
g_free (s);
77927798
mono_domain_set_fast (d, TRUE);
77937799
char* error_msg = g_strdup_printf ("Unexpected assembly-qualified type %s was provided", original_s);
7794-
buffer_add_string (buf, error_msg);
7800+
add_error_string (buf, error_msg);
77957801
g_free (error_msg);
77967802
g_free (original_s);
77977803
return ERR_INVALID_ARGUMENT;
@@ -7803,7 +7809,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
78037809
g_free (s);
78047810
mono_domain_set_fast (d, TRUE);
78057811
char* error_msg = g_strdup_printf ("Invalid type name %s", original_s);
7806-
buffer_add_string (buf, error_msg);
7812+
add_error_string (buf, error_msg);
78077813
g_free (error_msg);
78087814
g_free (original_s);
78097815
return ERR_INVALID_ARGUMENT;
@@ -7869,7 +7875,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
78697875
error_init (error);
78707876
MonoClass* mono_class = mono_class_get_checked (ass->image, token, error);
78717877
if (!is_ok (error)) {
7872-
buffer_add_string (buf, mono_error_get_message (error));
7878+
add_error_string (buf, mono_error_get_message (error));
78737879
mono_error_cleanup (error);
78747880
return ERR_INVALID_ARGUMENT;
78757881
}
@@ -7886,7 +7892,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
78867892
error_init (error);
78877893
MonoMethod* mono_method = mono_get_method_checked (ass->image, token, NULL, NULL, error);
78887894
if (!is_ok (error)) {
7889-
buffer_add_string (buf, mono_error_get_message (error));
7895+
add_error_string (buf, mono_error_get_message (error));
78907896
mono_error_cleanup (error);
78917897
return ERR_INVALID_ARGUMENT;
78927898
}
@@ -8739,7 +8745,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
87398745

87408746
header = mono_method_get_header_checked (method, error);
87418747
if (!header) {
8742-
buffer_add_string (buf, mono_error_get_message (error));
8748+
add_error_string (buf, mono_error_get_message (error));
87438749
mono_error_cleanup (error); /* FIXME don't swallow the error */
87448750
return ERR_INVALID_ARGUMENT;
87458751
}
@@ -9571,7 +9577,7 @@ string_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
95719577
if (!is_ok (error)) {
95729578
if (s)
95739579
g_free (s);
9574-
buffer_add_string (buf, mono_error_get_message (error));
9580+
add_error_string (buf, mono_error_get_message (error));
95759581
return ERR_INVALID_ARGUMENT;
95769582
}
95779583
buffer_add_string (buf, s);

0 commit comments

Comments
 (0)