Debugging with gdbserver, IDA

gdbserver host:port file

그리고 IDA에서 역시 해당 파일을 열고 아래와 같은 순서로 설정한다.

1) [Debugger] - [Select debugger] 에서 "Remote GDB debugger" 선택
2) [Debugger] - [Process options] 에서 Hostname과 Port를 위에서 설정한 값으로 설정
3) 그리고 실행!

Debugging with gdbserver
gdbserver is a GDB stub implemented as a separate program. It runs a program to be debugged or attaches to a process and then waits for commands. IDA's remote GDB debugger module has been tested with gdbserver available with Cygwin and Linux.

To debug a specific program from the start, run the following command:

gdbserver localhost:23946 <program>

and then choose Debugger,Attach, in IDA Pro.

To debug a running process:

gdbserver --multi localhost:23947

then choose Debugger,Attach, in IDA and enter the PID of the process to attach to.

Another method of debugging a running process is:

gdbserver localhost:23947 --attach <PID>

then choose Debugger,Attach, in IDA Pro.

To start a program from inside IDA, first launch the debugger server:

gdbserver --multi localhost:23947

Then use Debugger,Start process or Debugger,Run in IDA Pro.

NOTE
The --multi option is only available in GDB 6.8 or higher.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다