connect gdb client through terminal server with authentication

↘锁芯ラ 提交于 2019-12-24 05:44:52

问题


I am trying to do remote debugging. My GDB server runs as expected (in my case it is KGDB in kernel side). KGDB hangs up well so that GDB client can connect.

I need to connect GDB client using terminal server and port number because my device is connected via terminal server in real case scenario where username and password are required to get in.

Hence just doing target remote terminal-server:port is not helping to connect because there is no method to supply username and password.

If I connect my device directly with serial port and try with target remote /dev/ttyS0, it works as expected.

But I want to debug more devices which are connected through terminal server. Can you help me to solve this issue? I also try the command target remote | expect_script (which will try to login with username and password), I couldn't succeed. Suggest me right way of doing this.


回答1:


It worked now. I wrote expect script like this.

!/usr/bin/expect

spawn "telnet" "172.26.26.18" "3016"

expect "Username: " send "sample\r" expect "Password: " send "pass\r" expect "Authentication Complete" interact



来源:https://stackoverflow.com/questions/24013387/connect-gdb-client-through-terminal-server-with-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!