You are not logged in.
Hello guys, new arch user here.
I'm trying to debug a ncurses application,which mean I can't just use gdb out of the box, because the input/output would be a nightmare. I googled how to do that, and I found this page : https://www.fayewilliams.com/2014/11/11 … ut-output/
Seemed good, except when I try to the first command,
gdbserver port:1234 target/debug/text_editor
I get this :
port:1234: cannot resolve name: No address associated with hostname
Exiting
I don't know much about networking, so I'm kind of stuck here. I looked at the arch wiki, tried googling that, but I haven't found a solution. I have an inkling that it has to do with my
/etc/hosts
file, so I'm including it here :
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
(At this part of the arch installation guide, I was a bit confused and I just copy pasted the file they gave. I didn't look further into it because I was able to connect to the Internet)
Last edited by arture (2021-08-09 17:30:57)
Offline
myhostname has to be the hostname you defined in /etc/hostname which is something you should pick that's unique within your network and something you can use to identify your own machine.
Last edited by V1del (2021-08-09 09:53:53)
Offline
Ah, thanks. I changed that. It still doesn't work though, even after a reboot.
Offline
port is not a known hostname on your network. There is something in the man page about the host part "currently" being ignored, so maybe this worked when that post was written in 2014, but if you only want to specify a port, simply use ":1234".
Offline
Ah thank you, it works. By the way, so does localhost:1234, which makes sense.
Offline