Debugging with gdbserver, IDA

[code]gdbserver host:port file
[/code]

그리고 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:
[code]gdbserver localhost:23946 <program>
[/code]
and then choose Debugger,Attach,<process running on target> in IDA Pro.

To debug a running process:
[code]gdbserver –multi localhost:23947
[/code]
then choose Debugger,Attach,<enter PID to attach> in IDA and enter the PID of the process to attach to.

Another method of debugging a running process is:
[code]gdbserver localhost:23947 –attach <PID>
[/code]
then choose Debugger,Attach,<process running on target> in IDA Pro.

To start a program from inside IDA, first launch the debugger server:
[code]gdbserver –multi localhost:23947
[/code]
Then use Debugger,Start process or Debugger,Run in IDA Pro.

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

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다