@@ -3458,7 +3458,7 @@ compute_frame_info (MonoInternalThread *thread, DebuggerTlsData *tls)
3458
3458
} else if (tls -> il2cpp_context -> frameCount > 0 ) {
3459
3459
for (int frame_index = tls -> il2cpp_context -> frameCount - 1 ; frame_index >= 0 ; -- frame_index )
3460
3460
{
3461
- Il2CppSequencePoint * seq_point = il2cpp_get_sequence_point ( tls -> il2cpp_context -> executionContexts [frame_index ]-> currentSequencePoint ) ;
3461
+ Il2CppSequencePoint * seq_point = tls -> il2cpp_context -> executionContexts [frame_index ]-> currentSequencePoint ;
3462
3462
StackFrame * frame = g_new0 (StackFrame , 1 );
3463
3463
MonoMethod * sp_method = il2cpp_get_seq_point_method (seq_point );
3464
3464
frame -> method = sp_method ;
@@ -5886,7 +5886,7 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal, Il2CppSeq
5886
5886
#ifndef RUNTIME_IL2CPP
5887
5887
process_event (EVENT_KIND_STEP , jinfo_get_method (ji ), il_offset , ctx , events , suspend_policy );
5888
5888
#else
5889
- Il2CppSequencePoint * sequence_pt = il2cpp_get_sequence_point ( tls -> il2cpp_context -> executionContexts [tls -> il2cpp_context -> frameCount - 1 ]-> currentSequencePoint ) ;
5889
+ Il2CppSequencePoint * sequence_pt = tls -> il2cpp_context -> executionContexts [tls -> il2cpp_context -> frameCount - 1 ]-> currentSequencePoint ;
5890
5890
MonoMethod * sp_method = il2cpp_get_seq_point_method (sequence_pt );
5891
5891
5892
5892
/*
@@ -6481,7 +6481,7 @@ ss_start_il2cpp(SingleStepReq *ss_req, DebuggerTlsData *tls, Il2CppSequencePoint
6481
6481
} else {
6482
6482
if (ss_req -> depth == STEP_DEPTH_OVER )
6483
6483
{
6484
- MonoMethod * currentMethod = il2cpp_get_seq_point_method (il2cpp_get_sequence_point ( tls -> il2cpp_context -> executionContexts [tls -> il2cpp_context -> frameCount - 1 ]-> currentSequencePoint ) );
6484
+ MonoMethod * currentMethod = il2cpp_get_seq_point_method (tls -> il2cpp_context -> executionContexts [tls -> il2cpp_context -> frameCount - 1 ]-> currentSequencePoint );
6485
6485
6486
6486
void * seqPointIter = NULL ;
6487
6487
Il2CppSequencePoint * seqPoint ;
@@ -6497,7 +6497,7 @@ ss_start_il2cpp(SingleStepReq *ss_req, DebuggerTlsData *tls, Il2CppSequencePoint
6497
6497
6498
6498
if (tls -> il2cpp_context -> frameCount > 1 )
6499
6499
{
6500
- Il2CppSequencePoint * sequencePointForStepOut = il2cpp_get_sequence_point ( tls -> il2cpp_context -> executionContexts [tls -> il2cpp_context -> frameCount - 2 ]-> currentSequencePoint ) ;
6500
+ Il2CppSequencePoint * sequencePointForStepOut = tls -> il2cpp_context -> executionContexts [tls -> il2cpp_context -> frameCount - 2 ]-> currentSequencePoint ;
6501
6501
g_assert (sequencePointForStepOut -> kind == kSequencePointKind_StepOut );
6502
6502
ss_bp_add_one_il2cpp (ss_req , & ss_req_bp_count , & ss_req_bp_cache , sequencePointForStepOut );
6503
6503
}
@@ -6593,7 +6593,7 @@ ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, StepFilte
6593
6593
6594
6594
if (tls -> il2cpp_context -> frameCount > 0 )
6595
6595
{
6596
- Il2CppSequencePoint * seq_point = il2cpp_get_sequence_point ( tls -> il2cpp_context -> executionContexts [tls -> il2cpp_context -> frameCount - 1 ]-> currentSequencePoint ) ;
6596
+ Il2CppSequencePoint * seq_point = tls -> il2cpp_context -> executionContexts [tls -> il2cpp_context -> frameCount - 1 ]-> currentSequencePoint ;
6597
6597
MonoMethod * sp_method = il2cpp_get_seq_point_method (seq_point );
6598
6598
ss_req -> start_method = sp_method ;
6599
6599
ss_req -> last_method = sp_method ;
@@ -6829,7 +6829,7 @@ static Il2CppSequencePoint* il2cpp_find_catch_sequence_point(DebuggerTlsData *tl
6829
6829
int frameIndex = tls -> il2cpp_context -> frameCount - 1 ;
6830
6830
while (frameIndex >= 0 )
6831
6831
{
6832
- Il2CppSequencePoint * sp = il2cpp_find_catch_sequence_point_in_method (il2cpp_get_sequence_point ( tls -> il2cpp_context -> executionContexts [frameIndex ]-> currentSequencePoint ) , tls -> exception );
6832
+ Il2CppSequencePoint * sp = il2cpp_find_catch_sequence_point_in_method (tls -> il2cpp_context -> executionContexts [frameIndex ]-> currentSequencePoint , tls -> exception );
6833
6833
if (sp )
6834
6834
return sp ;
6835
6835
@@ -6853,7 +6853,7 @@ static Il2CppSequencePoint* il2cpp_find_catch_sequence_point_from_exeption(Debug
6853
6853
int frameIndex = tls -> il2cpp_context -> frameCount - 1 ;
6854
6854
while (frameIndex >= 0 )
6855
6855
{
6856
- sp = il2cpp_find_catch_sequence_point_in_method (il2cpp_get_sequence_point ( tls -> il2cpp_context -> executionContexts [frameIndex ]-> currentSequencePoint ) , exc );
6856
+ sp = il2cpp_find_catch_sequence_point_in_method (tls -> il2cpp_context -> executionContexts [frameIndex ]-> currentSequencePoint , exc );
6857
6857
if (sp )
6858
6858
return sp ;
6859
6859
@@ -12363,27 +12363,48 @@ unity_debugger_agent_breakpoint(Il2CppSequencePoint* sequencePoint)
12363
12363
unity_process_breakpoint_inner (tls , FALSE, sequencePoint );
12364
12364
}
12365
12365
12366
+ void unity_debugger_agent_pausepoint ()
12367
+ {
12368
+ if (is_debugger_thread ())
12369
+ return ;
12370
+
12371
+ save_thread_context (NULL );
12372
+ suspend_current ();
12373
+ }
12374
+
12366
12375
gboolean unity_pause_point_active ()
12367
12376
{
12368
- return unity_debugger_agent_is_global_breakpoint_active () || unity_debugger_agent_is_single_stepping ();
12377
+ return unity_debugger_agent_is_global_breakpoint_active () || unity_debugger_agent_is_single_stepping ();
12369
12378
}
12370
12379
12371
- gboolean unity_sequence_point_active (Il2CppSequencePoint * seqPoint )
12380
+ gboolean unity_sequence_point_active_entry (Il2CppSequencePoint * seqPoint )
12372
12381
{
12373
- gboolean global = unity_debugger_agent_is_global_breakpoint_active ();
12382
+ int i = 0 ;
12383
+ while (i < event_requests -> len )
12384
+ {
12385
+ EventRequest * req = (EventRequest * )g_ptr_array_index (event_requests , i );
12374
12386
12375
- if ((seqPoint -> ilOffset != METHOD_ENTRY_IL_OFFSET ) && (seqPoint -> ilOffset != METHOD_EXIT_IL_OFFSET ))
12376
- return seqPoint -> isActive || global || unity_debugger_agent_is_single_stepping ();
12387
+ if (req -> event_kind == EVENT_KIND_METHOD_ENTRY )
12388
+ {
12389
+ return seqPoint -> isActive || g_unity_pause_point_active ;
12390
+ }
12391
+
12392
+ ++ i ;
12393
+ }
12377
12394
12395
+ return FALSE;
12396
+ }
12397
+
12398
+ gboolean unity_sequence_point_active_exit (Il2CppSequencePoint * seqPoint )
12399
+ {
12378
12400
int i = 0 ;
12379
12401
while (i < event_requests -> len )
12380
12402
{
12381
12403
EventRequest * req = (EventRequest * )g_ptr_array_index (event_requests , i );
12382
12404
12383
- if ((req -> event_kind == EVENT_KIND_METHOD_ENTRY && seqPoint -> ilOffset == METHOD_ENTRY_IL_OFFSET ) ||
12384
- (req -> event_kind == EVENT_KIND_METHOD_EXIT && seqPoint -> ilOffset == METHOD_EXIT_IL_OFFSET ))
12405
+ if (req -> event_kind == EVENT_KIND_METHOD_EXIT )
12385
12406
{
12386
- return seqPoint -> isActive || global || unity_debugger_agent_is_single_stepping () ;
12407
+ return seqPoint -> isActive || g_unity_pause_point_active ;
12387
12408
}
12388
12409
12389
12410
++ i ;
0 commit comments