simulAVR和gdb之间没有连接
我正在尝试将simulAVR和gdb之间没有连接,gdb,remote-debugging,avr,Gdb,Remote Debugging,Avr,我正在尝试将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
连接到正在运行的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
不确定这是否可行,但我也尝试用netcat
连接到simulavr
——也没有运气
有人知道如何调试/解决这个问题吗?这可能是防火墙的问题吗
编辑: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
你能ping localhost吗?从未测试过。。。似乎不是。ifconfig lo确实显示活动。难怪它不工作;)可以ping 127.0.0.1吗?ping localhost只会生成
ping localhost(127.0.0.1)56(84)字节的数据。
,因此localhost的解析正确。ping 127.0.0.1得到相同的结果(即根本没有回复)
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