Merge pull request #2721 from ludovic-henry/fix-mono_ms_ticks
[mono.git] / mono / mini / debugger-agent.c
index c7e18a0f0d9af49c4a515e255662d5781568a4e1..8c4d16aa4f27b4a3fb88d33e64e4e858d048365e 100644 (file)
@@ -1120,8 +1120,8 @@ socket_transport_recv (void *buf, int len)
        int total = 0;
        int fd = conn_fd;
        int flags = 0;
-       static gint32 last_keepalive;
-       gint32 msecs;
+       static gint64 last_keepalive;
+       gint64 msecs;
 
        MONO_PREPARE_BLOCKING;
 
@@ -9255,6 +9255,7 @@ string_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
 static ErrorCode
 object_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
 {
+       MonoError error;
        int objid;
        ErrorCode err;
        MonoObject *obj;
@@ -9332,7 +9333,11 @@ object_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
 
                                if (remote_obj) {
 #ifndef DISABLE_REMOTING
-                                       field_value = mono_load_remote_field(obj, obj_type, f, &field_storage);
+                                       field_value = mono_load_remote_field_checked(obj, obj_type, f, &field_storage, &error);
+                                       if (!is_ok (&error)) {
+                                               mono_error_cleanup (&error); /* FIXME report the error */
+                                               return ERR_INVALID_OBJECT;
+                                       }
 #else
                                        g_assert_not_reached ();
 #endif