본문 바로가기

공부/보안

나 보려고 정리해두는 gdb 명령어

반응형

gdb 명령어

  • info functions : 함수의 이름과 주소 출력
  • disassemble(disass) main : main 함수의 디스어셈블리 출력
  • break(bp) : 주소에 breakpoint 설정
  • info breakpoints(bl) : breakpoint 정보 출력
  • run(r) : 프로그램을 처음부터 실행
  • display : 매 실행 시 인자로 전달된 값 출력

  • continue(c) : 다음 브레이크 포인트까지 실행
  • si : step instruction으로 명령어 1개 실행

  • finish : 현재 함수 모두 실행

  • info register : 레지스터 정보 출력

  • x/ : 지정된 메모리 영역을 특정 단위로 표현
  • p : print, 인자로 전달된 값 출력
  • delete(d) [break number] : 브레이크포인트 번호에 해당하는 브레이크포인트 삭제
  • quit : gdb 종료
반응형

'공부 > 보안' 카테고리의 다른 글

[dreamhack] System Exploitation 5강  (0) 2021.03.08
[dreamhack] System Exploitation 3강  (0) 2021.03.07
[dreamhack] System Exploitation 2강  (0) 2021.03.06
[dreamhack] System Exploitation 1강  (0) 2021.03.04
[pwnable.kr] - collision  (0) 2021.03.01