* RE: Problems: Remote debugging over UDP.
@ 2004-02-24 14:55 Arun Vishwanathan
2004-02-24 16:51 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Arun Vishwanathan @ 2004-02-24 14:55 UTC (permalink / raw)
To: Daniel Jacobowitz, Atul Talesara; +Cc: gdb
So how is it that gdb supports the UDP protocol when the server itself
doesn't support it?
-----Original Message-----
From: gdb-owner@sources.redhat.com [mailto:gdb-owner@sources.redhat.com]
On Behalf Of Daniel Jacobowitz
Sent: Tuesday, February 24, 2004 8:03 PM
To: Atul Talesara
Cc: gdb@sources.redhat.com
Subject: Re: Problems: Remote debugging over UDP.
On Tue, Feb 24, 2004 at 06:31:39PM +0530, Atul Talesara wrote:
> Is it that "gdbserver" doesn't talk over UDP???
That's correct.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems: Remote debugging over UDP.
2004-02-24 14:55 Problems: Remote debugging over UDP Arun Vishwanathan
@ 2004-02-24 16:51 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-02-24 16:51 UTC (permalink / raw)
To: Arun Vishwanathan; +Cc: Atul Talesara, gdb
On Tue, Feb 24, 2004 at 08:25:09PM +0530, Arun Vishwanathan wrote:
> So how is it that gdb supports the UDP protocol when the server itself
> doesn't support it?
There are many other remote target implementations besides gdbserver.
I implemented UDP support for a MontaVista-local KGDB stub which spoke
UDP; I don't know what ever happened to that code.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems: Remote debugging over UDP.
2004-02-24 13:01 Atul Talesara
@ 2004-02-24 14:33 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-02-24 14:33 UTC (permalink / raw)
To: Atul Talesara; +Cc: gdb
On Tue, Feb 24, 2004 at 06:31:39PM +0530, Atul Talesara wrote:
> Is it that "gdbserver" doesn't talk over UDP???
That's correct.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Problems: Remote debugging over UDP.
@ 2004-02-24 13:01 Atul Talesara
2004-02-24 14:33 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Atul Talesara @ 2004-02-24 13:01 UTC (permalink / raw)
To: gdb
Is it that "gdbserver" doesn't talk over UDP???
Because when I do the following:
gdbserver udp:my_system:9000 test_program
I don't see the port "9000" (with netstat -elp)to be occupied
by any of the processes! Whereas I can see the port used when
I do the same over TCP.
Also, "strace" revealed that gdbserver NEVER opens a SOCK_DGRAM
(UDP) socket!!! Here are the last few lines that actually opens
the socket:
-------------------------------------------------------
.
.
.
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
^^^^^^^^^^^^^^
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
listen(3, 1) = 0
accept(3, <unfinished ...>
^^^^^^^^^^^^^^^ <-- I kill strace here
-------------------------------------------------------
At this point when I again do netstat, I see gdbserver running
on some ephemeral TCP port and not UDP port 9000 :-(
since port '0' is passed to "bind()" call.
This is the GDB that I'm using and gdbserver coupled with it.
-------------------------------------------------------
bash-2.05b$ ~/local/bin/gdb -v
GNU gdb 20040223
Copyright 2004 Free Software Foundation, Inc.
-------------------------------------------------------
Thanks in advance.
Atul P Talesara
------------------------------------------------------------------
When "Winning" and "Losing" don't have any meaning, that is when
the real game happens, play happens. Otherwise it is war.
War has a significance for Winning or Losing.
-Sri Sri
------------------------------------------------------------------
> -----Original Message-----
> From: gdb-owner@sources.redhat.com
[mailto:gdb-owner@sources.redhat.com]
> On Behalf Of Atul Talesara
> Sent: Monday, February 23, 2004 6:41 PM
> To: gdb@sources.redhat.com
> Subject: Problems: Remote debugging over UDP.
>
> Hello Everybody,
> I have had problems while attempting remote debugging over UDP.
> For ease, I used same system as target and host. Also, I'm
> logged in as "root" on both the consoles.
>
> On Target I do the following:
> ------------------------------
> gdbserver udp:localhost:9090 ./hello
> ^^^
>
> I get the following output:
> Process ./hello created; pid=2135
>
>
> On Host I do:
> --------------
> gdb ./hello
>
> gdb> target remote udp:localhost:9090
> ^^^
>
> and get the following o/p:
> Remote debugging using udp:localhost:9090
> Couldn't establish connection to remote target
> putpkt: write failed: connection refused.
>
>
> When I omit the "UDP" part, i.e. use TCP, everything
> works smoothly w same steps! Am I missing something important
> here because of which GDB over UDP is not working? Can anyone
> pl provide some inputs?
>
>
> Thanks and Regards,
> Atul P Talesara
> ------------------------------------------------------------------
> When "Winning" and "Losing" don't have any meaning, that is when
> the real game happens, play happens. Otherwise it is war.
> War has a significance for Winning or Losing.
> -Sri Sri
> ------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Problems: Remote debugging over UDP.
@ 2004-02-23 13:10 Atul Talesara
0 siblings, 0 replies; 5+ messages in thread
From: Atul Talesara @ 2004-02-23 13:10 UTC (permalink / raw)
To: gdb
Hello Everybody,
I have had problems while attempting remote debugging over UDP.
For ease, I used same system as target and host. Also, I'm
logged in as "root" on both the consoles.
On Target I do the following:
------------------------------
gdbserver udp:localhost:9090 ./hello
^^^
I get the following output:
Process ./hello created; pid=2135
On Host I do:
--------------
gdb ./hello
gdb> target remote udp:localhost:9090
^^^
and get the following o/p:
Remote debugging using udp:localhost:9090
Couldn't establish connection to remote target
putpkt: write failed: connection refused.
When I omit the "UDP" part, i.e. use TCP, everything
works smoothly w same steps! Am I missing something important
here because of which GDB over UDP is not working? Can anyone
pl provide some inputs?
Thanks and Regards,
Atul P Talesara
------------------------------------------------------------------
When "Winning" and "Losing" don't have any meaning, that is when
the real game happens, play happens. Otherwise it is war.
War has a significance for Winning or Losing.
-Sri Sri
------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-02-24 16:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-24 14:55 Problems: Remote debugging over UDP Arun Vishwanathan
2004-02-24 16:51 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2004-02-24 13:01 Atul Talesara
2004-02-24 14:33 ` Daniel Jacobowitz
2004-02-23 13:10 Atul Talesara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox