我正在尝试将gdb
连接到正在运行的simulavr
会话。使用的命令是:
simulavr -d atmega328 -f tiny.elf -B main -g
在此之后我得到消息:
Waiting on port 1212 for gdb client to connect...
发送^ C时,我得到:
^CSystemClock::Endless stopped
number of cpu cycles simulated: 909726536
这似乎令人鼓舞。当我尝试使用gdb
连接到该会话时,我得到:
(gdb) file tiny.elf
Reading symbols from tiny.elf...done.
(gdb) target remote localhost:1212
localhost:1212: Connection timed out. (This is after about 2')
正在监视localhost
,我看到发送了连接请求(SYN
),但没有收到simulavr
的回复
不确定这是否行得通,但我也尝试使用simulavr
连接到netcat
-也不走运。
有想法的人如何调试/解决这个问题?这可能是防火墙的问题吗?
编辑:尽管ifconfig lo
显示活动:
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 25540 bytes 2149477 (2.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 25540 bytes 2149477 (2.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
还在/ etc / hosts中定义了127.0.0.1
EDIT2 :这是iptables -L -n
的输出Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT all -- 10.0.0.2 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:631
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3000
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination