@@ -741,6 +741,8 @@ static SingleStepReq *ss_req;
741
741
static int ss_count ;
742
742
#endif
743
743
744
+ bool g_unity_pause_point_active ;
745
+
744
746
/* The protocol version of the client */
745
747
static int major_version , minor_version ;
746
748
@@ -1165,13 +1167,27 @@ void mono_debugger_install_sequence_point_check(volatile uint32_t* check)
1165
1167
g_unity_check = check ;
1166
1168
}
1167
1169
1170
+ gboolean unity_debugger_agent_is_global_breakpoint_active ()
1171
+ {
1172
+ if (!ss_req )
1173
+ return FALSE;
1174
+ else
1175
+ return ss_req -> global ;
1176
+ }
1177
+
1178
+ int32_t unity_debugger_agent_is_single_stepping ()
1179
+ {
1180
+ return ss_count ;
1181
+ }
1182
+
1168
1183
#define INC_PAUSE_COUNT () do { mono_atomic_inc_i32 (g_unity_check); } while (0)
1169
1184
#define DEC_PAUSE_COUNT () do { mono_atomic_dec_i32 (g_unity_check); } while (0)
1170
-
1185
+ #define UPDATE_PAUSE_STATE () do { g_unity_pause_point_active = unity_debugger_agent_is_global_breakpoint_active() || unity_debugger_agent_is_single_stepping(); } while (0)
1171
1186
#else
1172
1187
1173
1188
#define INC_PAUSE_COUNT ()
1174
1189
#define DEC_PAUSE_COUNT ()
1190
+ #define UPDATE_PAUSE_STATE ()
1175
1191
1176
1192
#endif // RUNTIME_IL2CPP
1177
1193
@@ -6014,6 +6030,7 @@ start_single_stepping (void)
6014
6030
{
6015
6031
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
6016
6032
int val = mono_atomic_inc_i32 (& ss_count );
6033
+ UPDATE_PAUSE_STATE ();
6017
6034
INC_PAUSE_COUNT ();
6018
6035
6019
6036
if (val == 1 ) {
@@ -6032,6 +6049,7 @@ stop_single_stepping (void)
6032
6049
{
6033
6050
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
6034
6051
int val = mono_atomic_dec_i32 (& ss_count );
6052
+ UPDATE_PAUSE_STATE ();
6035
6053
DEC_PAUSE_COUNT ();
6036
6054
6037
6055
if (val == 0 ) {
@@ -6068,6 +6086,7 @@ ss_stop (SingleStepReq *ss_req)
6068
6086
if (ss_req -> global ) {
6069
6087
stop_single_stepping ();
6070
6088
ss_req -> global = FALSE;
6089
+ UPDATE_PAUSE_STATE ();
6071
6090
}
6072
6091
}
6073
6092
@@ -6435,6 +6454,7 @@ ss_start (SingleStepReq *ss_req, MonoMethod *method, SeqPoint* sp, MonoSeqPointI
6435
6454
} else {
6436
6455
ss_req -> global = FALSE;
6437
6456
}
6457
+ UPDATE_PAUSE_STATE ();
6438
6458
6439
6459
if (ss_req_bp_cache )
6440
6460
g_hash_table_destroy (ss_req_bp_cache );
@@ -6508,6 +6528,7 @@ ss_start_il2cpp(SingleStepReq *ss_req, DebuggerTlsData *tls, Il2CppSequencePoint
6508
6528
{
6509
6529
ss_req -> global = FALSE;
6510
6530
}
6531
+ UPDATE_PAUSE_STATE ();
6511
6532
}
6512
6533
6513
6534
#endif // RUNTIME_IL2CPP
@@ -12342,17 +12363,9 @@ unity_debugger_agent_breakpoint(Il2CppSequencePoint* sequencePoint)
12342
12363
unity_process_breakpoint_inner (tls , FALSE, sequencePoint );
12343
12364
}
12344
12365
12345
- gboolean unity_debugger_agent_is_global_breakpoint_active ()
12346
- {
12347
- if (!ss_req )
12348
- return FALSE;
12349
- else
12350
- return ss_req -> global ;
12351
- }
12352
-
12353
- int32_t unity_debugger_agent_is_single_stepping ()
12366
+ gboolean unity_pause_point_active ()
12354
12367
{
12355
- return ss_count ;
12368
+ return unity_debugger_agent_is_global_breakpoint_active () || unity_debugger_agent_is_single_stepping () ;
12356
12369
}
12357
12370
12358
12371
gboolean unity_sequence_point_active (Il2CppSequencePoint * seqPoint )
0 commit comments