You are not logged in.

#1 2021-08-09 08:37:26

arture
Member
Registered: 2021-08-09
Posts: 3

[SOLVED] gdbserver : cannot resolve name: No address associated with

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

#2 2021-08-09 09:53:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,007

Re: [SOLVED] gdbserver : cannot resolve name: No address associated with

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

#3 2021-08-09 11:12:12

arture
Member
Registered: 2021-08-09
Posts: 3

Re: [SOLVED] gdbserver : cannot resolve name: No address associated with

Ah, thanks. I changed that. It still doesn't work though, even after a reboot.

Offline

#4 2021-08-09 14:33:43

Raynman
Member
Registered: 2011-10-22
Posts: 1,312

Re: [SOLVED] gdbserver : cannot resolve name: No address associated with

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

#5 2021-08-09 17:27:56

arture
Member
Registered: 2021-08-09
Posts: 3

Re: [SOLVED] gdbserver : cannot resolve name: No address associated with

Ah thank you, it works. By the way, so does localhost:1234, which makes sense.

Offline

Board footer

Powered by FluxBB