Advertisement
Bond697

Untitled

Dec 12th, 2016
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.79 KB | None | 0 0
  1. debug_r = svcDebugActiveProcess(&kdbg, 0x11);
  2.         debug_r2 = svcDebugActiveProcess(&kdbg2, 0x12);
  3.  
  4.         if ( R_FAILED(debug_r) || R_FAILED(debug_r2) )
  5.         {
  6.             printf("Debug attempt failed!\n");
  7.             pause_X();
  8.         }
  9.         else
  10.         {
  11.             printf("Debug started!\n");
  12.         }
  13.  
  14.         DebugEventInfo info;
  15.         DebugEventInfo info2;
  16.         svcGetProcessDebugEvent(&info, kdbg);
  17.         svcGetProcessDebugEvent(&info2, kdbg2);
  18.  
  19.         if ((info.type == DBG_EVENT_EXCEPTION && info.exception.type == EXC_EVENT_ATTACH_BREAK) || (info2.type == DBG_EVENT_EXCEPTION && info2.exception.type == EXC_EVENT_ATTACH_BREAK))
  20.             break;
  21.         svcContinueDebugEvent(kdbg, BIT(DBG_EVENT_EXCEPTION) | BIT(DBG_EVENT_CREATE_THREAD));
  22.         svcContinueDebugEvent(kdbg2, BIT(DBG_EVENT_EXCEPTION) | BIT(DBG_EVENT_CREATE_THREAD));
  23.  
  24.         printf("Time to dump RAM!\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement