본문 바로가기

Programming/Tip&Informaion

Mac에서 메모리 덤프 및 프로세스 바이너리 확인하기

  1. 실행 중인 프로세스의 메모리 dump
    1. 복구모드(recovery mode)로 진입하여 터미널 실행
    2. csrutil disable 실행 (보호모드 해제 같은 걸로 작업 완료 후 다시 enable 하는 걸 추천)
    3. 재부팅
  2. 메모리 dump
    1. lldb --attach-pid <PID>
    2. process save-core "filename"
  3. hexedit 설치
    1. brew install hexedit
    2. hexedit 명령어 참조해서 메모리 확인 (http://rigaux.org/hexedit.html)

출처: http://rigaux.org/hexedit.html