Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't connect to gdbserver
Can't connect to gdbserver [message #169484] Fri, 12 May 2006 15:21 Go to next message
Doug Abbott is currently offline Doug AbbottFriend
Messages: 30
Registered: July 2009
Member
Hi,

Searched the archives for this one but didn't find anything. I'm
running Eclipse 3.1.2 with CDT 3.0.1. I'm trying to debug a remote
target using gdbserver.

I start up gdbserver on the target. But when I click Debug in the Debug
dialog window, I get:
Error creating session: 192.168.1.200:1234 Connection refused.

Opening the Details window shows that it tried to connect three times.
Meanwhile gdbserver on the target seems to think it's connected. It says:
Remote debugging using :1234

But then it says:
Killing inferior
end exits.

I swear this worked last fall because I included a chapter on Eclipse in
my embedded Linux book. It's possible I now have a different
combination of Eclipse and CDT versions. Could this be the problem?

Thanks,

Doug
Re: Can't connect to gdbserver [message #169499 is a reply to message #169484] Fri, 12 May 2006 21:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

Did you try to do it from the command line?

"Doug Abbott" <doug@intellimetrix.us> wrote in message
news:e4295h$708$1@utils.eclipse.org...
> Hi,
>
> Searched the archives for this one but didn't find anything. I'm running
> Eclipse 3.1.2 with CDT 3.0.1. I'm trying to debug a remote target using
> gdbserver.
>
> I start up gdbserver on the target. But when I click Debug in the Debug
> dialog window, I get:
> Error creating session: 192.168.1.200:1234 Connection refused.
>
> Opening the Details window shows that it tried to connect three times.
> Meanwhile gdbserver on the target seems to think it's connected. It says:
> Remote debugging using :1234
>
> But then it says:
> Killing inferior
> end exits.
>
> I swear this worked last fall because I included a chapter on Eclipse in
> my embedded Linux book. It's possible I now have a different combination
> of Eclipse and CDT versions. Could this be the problem?
>
> Thanks,
>
> Doug
Re: Can't connect to gdbserver [message #169515 is a reply to message #169499] Sat, 13 May 2006 04:15 Go to previous messageGo to next message
Doug Abbott is currently offline Doug AbbottFriend
Messages: 30
Registered: July 2009
Member
Sorry, forgot to mention that. Yes, it runs fine from the command line
and also under DDD.

Mikhail Khodjaiants wrote:
> Did you try to do it from the command line?
>
> "Doug Abbott" <doug@intellimetrix.us> wrote in message
> news:e4295h$708$1@utils.eclipse.org...
>> Hi,
>>
>> Searched the archives for this one but didn't find anything. I'm running
>> Eclipse 3.1.2 with CDT 3.0.1. I'm trying to debug a remote target using
>> gdbserver.
>>
>> I start up gdbserver on the target. But when I click Debug in the Debug
>> dialog window, I get:
>> Error creating session: 192.168.1.200:1234 Connection refused.
>>
>> Opening the Details window shows that it tried to connect three times.
>> Meanwhile gdbserver on the target seems to think it's connected. It says:
>> Remote debugging using :1234
>>
>> But then it says:
>> Killing inferior
>> end exits.
>>
>> I swear this worked last fall because I included a chapter on Eclipse in
>> my embedded Linux book. It's possible I now have a different combination
>> of Eclipse and CDT versions. Could this be the problem?
>>
>> Thanks,
>>
>> Doug
>
>
Re: Can't connect to gdbserver [message #169607 is a reply to message #169515] Mon, 15 May 2006 20:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

You can analyse the gdb trace to see what exactly is causing the problem.
See the CDT Debugger FAQ #5.

"Doug Abbott" <doug@intellimetrix.us> wrote in message
news:e43mgl$ub6$1@utils.eclipse.org...
> Sorry, forgot to mention that. Yes, it runs fine from the command line
> and also under DDD.
>
> Mikhail Khodjaiants wrote:
>> Did you try to do it from the command line?
>>
>> "Doug Abbott" <doug@intellimetrix.us> wrote in message
>> news:e4295h$708$1@utils.eclipse.org...
>>> Hi,
>>>
>>> Searched the archives for this one but didn't find anything. I'm
>>> running Eclipse 3.1.2 with CDT 3.0.1. I'm trying to debug a remote
>>> target using gdbserver.
>>>
>>> I start up gdbserver on the target. But when I click Debug in the Debug
>>> dialog window, I get:
>>> Error creating session: 192.168.1.200:1234 Connection refused.
>>>
>>> Opening the Details window shows that it tried to connect three times.
>>> Meanwhile gdbserver on the target seems to think it's connected. It
>>> says:
>>> Remote debugging using :1234
>>>
>>> But then it says:
>>> Killing inferior
>>> end exits.
>>>
>>> I swear this worked last fall because I included a chapter on Eclipse in
>>> my embedded Linux book. It's possible I now have a different
>>> combination of Eclipse and CDT versions. Could this be the problem?
>>>
>>> Thanks,
>>>
>>> Doug
>>
Re: Can't connect to gdbserver [message #170393 is a reply to message #169607] Fri, 26 May 2006 20:30 Go to previous messageGo to next message
Doug Abbott is currently offline Doug AbbottFriend
Messages: 30
Registered: July 2009
Member
It's taken me a while to get back to this problem. Thanks, Mikhail, for
the trace suggestion. Here's the trace I get when starting up gdb:

[1,148,562,373,072] arm-linux-gdb --cd=/home/doug/ELLK/src/hello
--command=.gdbinit --quiet -nw -i m\i /home/doug/ELLK/src/hello/hello
[1,148,562,373,564] 1-gdb-set confirm off
[1,148,562,373,576] 1^done
[1,148,562,373,651] 2-gdb-set width 0
[1,148,562,373,656] (gdb)
[1,148,562,373,660] 2^done
[1,148,562,373,666] 3-gdb-set height 0
[1,148,562,373,670] (gdb)
[1,148,562,373,675] 3^done
[1,148,562,373,681] 4-interpreter-exec console echo
[1,148,562,373,687] (gdb)
[1,148,562,373,691] 4^error,msg="Undefined MI command: interpreter-exec"
[1,148,562,373,751] 5-gdb-show prompt
[1,148,562,373,756] (gdb)
[1,148,562,373,760] 5^done,value="(gdb) "
[1,148,562,373,768] 6-target-select remote 192.168.1.200:1234
[1,148,562,373,773] (gdb)
[1,148,562,373,784] &"192.168.1.200:1234: Connection refused.\n"
[1,148,562,373,858] 6^error,msg="192.168.1.200:1234: Connection refused."
[1,148,562,374,209] (gdb)
[1,148,562,375,971] 7-gdb-exit

Indeed, a search through the sources of gdb v5.3 shows that there is not
an "interpreter-exec" command. So presumably, that is somehow
connected to the perceived connection refusal.

I had tried using gdb 6.3 but ran into other problems that sent me back
to 5.3. Does anyone know the minimum gdb version that Eclipse requires?

Thanks,

Doug

Mikhail Khodjaiants wrote:
> You can analyse the gdb trace to see what exactly is causing the problem.
> See the CDT Debugger FAQ #5.
>
> "Doug Abbott" <doug@intellimetrix.us> wrote in message
> news:e43mgl$ub6$1@utils.eclipse.org...
>> Sorry, forgot to mention that. Yes, it runs fine from the command line
>> and also under DDD.
>>
>> Mikhail Khodjaiants wrote:
>>> Did you try to do it from the command line?
>>>
>>> "Doug Abbott" <doug@intellimetrix.us> wrote in message
>>> news:e4295h$708$1@utils.eclipse.org...
>>>> Hi,
>>>>
>>>> Searched the archives for this one but didn't find anything. I'm
>>>> running Eclipse 3.1.2 with CDT 3.0.1. I'm trying to debug a remote
>>>> target using gdbserver.
>>>>
>>>> I start up gdbserver on the target. But when I click Debug in the Debug
>>>> dialog window, I get:
>>>> Error creating session: 192.168.1.200:1234 Connection refused.
>>>>
>>>> Opening the Details window shows that it tried to connect three times.
>>>> Meanwhile gdbserver on the target seems to think it's connected. It
>>>> says:
>>>> Remote debugging using :1234
>>>>
>>>> But then it says:
>>>> Killing inferior
>>>> end exits.
>>>>
>>>> I swear this worked last fall because I included a chapter on Eclipse in
>>>> my embedded Linux book. It's possible I now have a different
>>>> combination of Eclipse and CDT versions. Could this be the problem?
>>>>
>>>> Thanks,
>>>>
>>>> Doug
>
Re: Can't connect to gdbserver [message #170401 is a reply to message #170393] Fri, 26 May 2006 21:18 Go to previous message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

Doug,
I don't think the "-interpreter-exec console echo" command failure affects
your session.
Did you try to reproduce it from the command line? You can skip
"-interpreter-exec" and see what is happening.

"Doug Abbott" <doug@intellimetrix.us> wrote in message
news:e57oh9$vnj$1@utils.eclipse.org...
> It's taken me a while to get back to this problem. Thanks, Mikhail, for
> the trace suggestion. Here's the trace I get when starting up gdb:
>
> [1,148,562,373,072]
> arm-linux-gdb --cd=/home/doug/ELLK/src/hello --command=.gdbinit --quiet -nw
> -i m\i /home/doug/ELLK/src/hello/hello
> [1,148,562,373,564] 1-gdb-set confirm off
> [1,148,562,373,576] 1^done
> [1,148,562,373,651] 2-gdb-set width 0
> [1,148,562,373,656] (gdb)
> [1,148,562,373,660] 2^done
> [1,148,562,373,666] 3-gdb-set height 0
> [1,148,562,373,670] (gdb)
> [1,148,562,373,675] 3^done
> [1,148,562,373,681] 4-interpreter-exec console echo
> [1,148,562,373,687] (gdb)
> [1,148,562,373,691] 4^error,msg="Undefined MI command: interpreter-exec"
> [1,148,562,373,751] 5-gdb-show prompt
> [1,148,562,373,756] (gdb)
> [1,148,562,373,760] 5^done,value="(gdb) "
> [1,148,562,373,768] 6-target-select remote 192.168.1.200:1234
> [1,148,562,373,773] (gdb)
> [1,148,562,373,784] &"192.168.1.200:1234: Connection refused.\n"
> [1,148,562,373,858] 6^error,msg="192.168.1.200:1234: Connection refused."
> [1,148,562,374,209] (gdb)
> [1,148,562,375,971] 7-gdb-exit
>
> Indeed, a search through the sources of gdb v5.3 shows that there is not
> an "interpreter-exec" command. So presumably, that is somehow connected
> to the perceived connection refusal.
>
> I had tried using gdb 6.3 but ran into other problems that sent me back to
> 5.3. Does anyone know the minimum gdb version that Eclipse requires?
>
> Thanks,
>
> Doug
>
> Mikhail Khodjaiants wrote:
>> You can analyse the gdb trace to see what exactly is causing the problem.
>> See the CDT Debugger FAQ #5.
>>
>> "Doug Abbott" <doug@intellimetrix.us> wrote in message
>> news:e43mgl$ub6$1@utils.eclipse.org...
>>> Sorry, forgot to mention that. Yes, it runs fine from the command line
>>> and also under DDD.
>>>
>>> Mikhail Khodjaiants wrote:
>>>> Did you try to do it from the command line?
>>>>
>>>> "Doug Abbott" <doug@intellimetrix.us> wrote in message
>>>> news:e4295h$708$1@utils.eclipse.org...
>>>>> Hi,
>>>>>
>>>>> Searched the archives for this one but didn't find anything. I'm
>>>>> running Eclipse 3.1.2 with CDT 3.0.1. I'm trying to debug a remote
>>>>> target using gdbserver.
>>>>>
>>>>> I start up gdbserver on the target. But when I click Debug in the
>>>>> Debug dialog window, I get:
>>>>> Error creating session: 192.168.1.200:1234 Connection refused.
>>>>>
>>>>> Opening the Details window shows that it tried to connect three times.
>>>>> Meanwhile gdbserver on the target seems to think it's connected. It
>>>>> says:
>>>>> Remote debugging using :1234
>>>>>
>>>>> But then it says:
>>>>> Killing inferior
>>>>> end exits.
>>>>>
>>>>> I swear this worked last fall because I included a chapter on Eclipse
>>>>> in my embedded Linux book. It's possible I now have a different
>>>>> combination of Eclipse and CDT versions. Could this be the problem?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Doug
>>
Previous Topic:Setting output and source paths
Next Topic:How to save C/C++ Build targets
Goto Forum:
  


Current Time: Sat Jul 13 17:11:07 GMT 2024

Powered by FUDForum. Page generated in 0.03774 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top