'gdbserver'에 해당되는 글 1건

  1. 2010.05.18 gdb / gdbserver 접속명령어
gdbserver는 gdb를 돌릴만한 사정이 안되는 시스템을 위한 프로그램으로
단순하게 gdb의 앞단에서 데이터를 TCP나 시리얼 등으로 전송해 주는 역활을 한다.
그런 이유로 gdbserver 만으로는 아무런 것도 할수 없으며

크로스 컴파일 환경이라면, 내부적으로 크로스 환경에 맞추어진 gdb가 별도로 존재해야 한다.
gdbserver는 아래와 같이 host:port 식으로 선언을 하는데 현재까지는 host는 무시를 하고 port만을 받아들인다고 한다.

To use a TCP connection instead of a serial line:

     target> gdbserver host:2345 emacs foo.txt

The only difference from the previous example is the first argument, specifying that you are communicating with the host gdb via TCP. The `host:2345' argument means that gdbserver is to expect a TCP connection from machine `host' to local TCP port 2345. (Currently, the `host' part is ignored.)

[링크 : http://sourceware.org/gdb/current/onlinedocs/gdb/Server.html#Server]

그리고 gdb 쪽에서는 target remote 라는 명령어를 통해 접속이 가능하며, 기본값으로는 TCP로 접속하도록 되어있다.

target remote host:port
target remote tcp:host:port
    Debug using a TCP connection to port on host. The host may be either a host name or a numeric IP address; port must be a decimal number. The host could be the target machine itself, if it is directly connected to the net, or it might be a terminal server which in turn has a serial line to the target.

target remote udp:host:port
    Debug using UDP packets to port on host. For example, to connect to UDP port 2828 on a terminal server named manyfarms:
              target remote udp:manyfarms:2828
    When using a UDP connection for remote debugging, you should keep in mind that the `U' stands for “Unreliable”. UDP can silently drop packets on busy or unreliable networks, which will cause havoc with your debugging session.

[링크 : http://sourceware.org/gdb/current/onlinedocs/gdb/Connecting.html#Connecting]


음.. 그런데 gdb/insight 에서 보이는
GDBserver/TCP , remote/TCP는 멀까?
Posted by 구차니