* RE: Remote communication error
@ 2004-09-24 22:25 Lan Zhang
0 siblings, 0 replies; 7+ messages in thread
From: Lan Zhang @ 2004-09-24 22:25 UTC (permalink / raw)
To: gdb
I can access this address:
(gdb-usb) x/i 0xec2d0
Sending packet: $mec2d0,4#5b...Ack
Packet received: 1500000a
target_xfer_memory (0xec2d0, xxx, 4, read, xxx) = 4, bytes = 15 00 00 0a
0xec2d0 <FirstMode+32>: beq 0xec32c <FirstMode+124>
(gdb-usb)
The stop address is randomly, it can stop at any address, and I can
access (read and write) any memory address before stopped. If I restart
over, it would pass the last stopped address and stopped at a different
place. That is why I think I didn't add my USB interface correctly into
the GDB, or on my target.
Thanks a lot.
Lan
-----Original Message-----
From: Andrew Cagney [mailto:cagney@gnu.org]
Sent: Friday, September 24, 2004 6:09 PM
To: Lan Zhang
Cc: gdb@sources.redhat.com
Subject: Re: Remote communication error
> w +
> c set debug serial 1
> c n
> w $mec2b0,4#59
> r +$04e02de5#29
> w +$mec2b4,4#5d
> ...
> ...
> ...
> w +$mec2cc,4#8d
> r +$000050e3#bd
> w +$mec2d0,4#5b
> r <Error: Connection timed out>
If this is deterministic then it looks like an attempt to read 0xec2d0
hangs your remote stub / machine :-(
Instead of a NEXT, try:
x/i 0xec2d0
after that, you've got a hardware problem.
Andrew
> r <Error: Connection timed out>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Remote communication error
@ 2004-09-24 22:21 Xinan Tang
0 siblings, 0 replies; 7+ messages in thread
From: Xinan Tang @ 2004-09-24 22:21 UTC (permalink / raw)
To: Lan Zhang, gdb
Hi
Does this address (0xec2d0) have a special meaning, such as I/O
device?
The timeout occurred when gdb tries to read 4 bytes from this address.
Since all other 'm' commands worked previously, it is kind of strange to
see this 'm' command failed.
Good luck
--Xinan
-----Original Message-----
From: gdb-owner@sources.redhat.com [mailto:gdb-owner@sources.redhat.com]
On Behalf Of Lan Zhang
Sent: Friday, September 24, 2004 2:58 PM
To: gdb@sources.redhat.com
Subject: RE: Remote communication error
Yes, I set the debug serial to 1, but I cannot see any clue from that.
It just stopped there when it tries to read a memory, and it didn't
depend on the memory address, it could stop at any address. And it also
stopped sometime when host try to get response for "$s#" packet, and pop
out same message.
I tried to change remotetimeout value, and it didn't help also.
I think it could be USB buffer problem on host. But I have no idea how
to debug this debugger bug and how to check the USB in and out buffer.
By the way, I am not using the standard GDB, my target is arm processor,
and I used armcc compiler, so I check out some version which works for
this special symbol table from CVS.
What can I do?
Thanks a lot.
Lan
(gdb-usb) r
usbname name= /dev/usb/lp0
ops->name = usb
usb open
Found TI** device
Sending packet: $Hc-1#09...Ack
Packet received: T050f:4cc30e00;0d:7c066300;
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received:
target_terminal_ours ()
warning: Invalid remote reply:
Packet received: S05
target_wait (-1, status) = 42000, status->kind = stopped, signal =
SIGTRAP
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $g#67...Ack
Packet received:
0000000013000060c0445b00000000001600000000000000010000000100000000000000
0000000038c7620034076300a50affff7c066300a8df09004cc30e001300002013000020
target_fetch_registers (pc) = 4cc30e00 0xec34c 967500
target_terminal_ours_for_output ()
target_terminal_ours ()
FirstMode () at ../fp/fp.c:1054
remote name line 2280 = /dev/usb/lp0
(gdb-usb) set debug serial 1
(gdb-usb) n
Sending packet: $mec2b0,4#59...[+]Ack
[$][0][4][e][0][2][d][e][5][#][2][9]Packet received: 04e02de5
target_xfer_memory (0xec2b0, xxx, 4, read, xxx) = 4, bytes = 04 e0 2d e5
Sending packet: $mec2b4,4#5d...[+]Ack
[$][2][c][d][0][4][d][e][2][#][5][8]Packet received: 2cd04de2
target_xfer_memory (0xec2b4, xxx, 4, read, xxx) = 4, bytes = 2c d0 4d e2
...
...
...
Sending packet: $mec2c8,4#62...[+]Ack
[$][1][4][0][0][9][d][e][5][#][f][c]Packet received: 14009de5
target_xfer_memory (0xec2c8, xxx, 4, read, xxx) = 4, bytes = 14 00 9d e5
Sending packet: $mec2cc,4#8d...[+]Ack
[$][0][0][0][0][5][0][e][3][#][b][d]Packet received: 000050e3
target_xfer_memory (0xec2cc, xxx, 4, read, xxx) = 4, bytes = 00 00 50 e3
Sending packet: $mec2d0,4#5b...[<Error: Connection timed
out>]target_terminal_ours ()
Remote communication error: Connection timed out.
Sending packet: $z0,ec394,4#9e...[<Error: Connection timed
out>]target_terminal_ours ()
Remote communication error: Connection timed out.
(gdb-usb)
FROM GDB log:
w +$Hc-1#09
r +$T050f:4cc30e00;0d:7c066300;#b8
w +$qC#b4
r +$#00
w +$qOffsets#4b
r +$#00
w +$?#3f
r +$#00
w +
r +$S05#b8
w +$Hg0#df
r +$OK#9a
w +$g#67
r
+$0000000013000060c0445b000000000016000000000000000100000001000000000000
000000000038c7620034076300a50affff7c066300a8df09004cc30e0013000020130000
20#cb
w +
c set debug serial 1
c n
w $mec2b0,4#59
r +$04e02de5#29
w +$mec2b4,4#5d
...
...
...
w +$mec2cc,4#8d
r +$000050e3#bd
w +$mec2d0,4#5b
r <Error: Connection timed out>
w $z0,ec394,4#9e
r <Error: Connection timed out>
-----Original Message-----
From: Andrew Cagney [mailto:cagney@gnu.org]
Sent: Friday, September 24, 2004 4:49 PM
To: Lan Zhang
Cc: gdb@sources.redhat.com
Subject: Re: Remote communication error
> Hi,
>
> I set up a remote debug using USB port. I got some message like:
> Remote communication error: Connection timed out. And this can happen
> at the begin of the debug or after I already did some debug commands.
> But the whole remote debug works fine for the serial port. I think I
> didn't add USB interface correctly. Could anyone point me which code
> related to the remote communication error, and why this happens?
>
> Thanks a lot
That it works with a simple serial device and not USB suggests a bug in
the kernel or h/w. GDB (assuming this is with a standard GDB) uses
identical code to drive both devices.
You can use "(gdb) set debug serial" to see exactly what GDB is doing
when it hangs.
ANdrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remote communication error
2004-09-24 21:57 Lan Zhang
@ 2004-09-24 22:11 ` Andrew Cagney
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 2004-09-24 22:11 UTC (permalink / raw)
To: Lan Zhang; +Cc: gdb
> w +
> c set debug serial 1
> c n
> w $mec2b0,4#59
> r +$04e02de5#29
> w +$mec2b4,4#5d
> ...
> ...
> ...
> w +$mec2cc,4#8d
> r +$000050e3#bd
> w +$mec2d0,4#5b
> r <Error: Connection timed out>
If this is deterministic then it looks like an attempt to read 0xec2d0
hangs your remote stub / machine :-(
Instead of a NEXT, try:
x/i 0xec2d0
after that, you've got a hardware problem.
Andrew
> r <Error: Connection timed out>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Remote communication error
@ 2004-09-24 21:57 Lan Zhang
2004-09-24 22:11 ` Andrew Cagney
0 siblings, 1 reply; 7+ messages in thread
From: Lan Zhang @ 2004-09-24 21:57 UTC (permalink / raw)
To: gdb
Yes, I set the debug serial to 1, but I cannot see any clue from that.
It just stopped there when it tries to read a memory, and it didn't
depend on the memory address, it could stop at any address. And it also
stopped sometime when host try to get response for "$s#" packet, and pop
out same message.
I tried to change remotetimeout value, and it didn't help also.
I think it could be USB buffer problem on host. But I have no idea how
to debug this debugger bug and how to check the USB in and out buffer.
By the way, I am not using the standard GDB, my target is arm processor,
and I used armcc compiler, so I check out some version which works for
this special symbol table from CVS.
What can I do?
Thanks a lot.
Lan
(gdb-usb) r
usbname name= /dev/usb/lp0
ops->name = usb
usb open
Found TI** device
Sending packet: $Hc-1#09...Ack
Packet received: T050f:4cc30e00;0d:7c066300;
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received:
target_terminal_ours ()
warning: Invalid remote reply:
Packet received: S05
target_wait (-1, status) = 42000, status->kind = stopped, signal =
SIGTRAP
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $g#67...Ack
Packet received:
0000000013000060c0445b00000000001600000000000000010000000100000000000000
0000000038c7620034076300a50affff7c066300a8df09004cc30e001300002013000020
target_fetch_registers (pc) = 4cc30e00 0xec34c 967500
target_terminal_ours_for_output ()
target_terminal_ours ()
FirstMode () at ../fp/fp.c:1054
remote name line 2280 = /dev/usb/lp0
(gdb-usb) set debug serial 1
(gdb-usb) n
Sending packet: $mec2b0,4#59...[+]Ack
[$][0][4][e][0][2][d][e][5][#][2][9]Packet received: 04e02de5
target_xfer_memory (0xec2b0, xxx, 4, read, xxx) = 4, bytes = 04 e0 2d e5
Sending packet: $mec2b4,4#5d...[+]Ack
[$][2][c][d][0][4][d][e][2][#][5][8]Packet received: 2cd04de2
target_xfer_memory (0xec2b4, xxx, 4, read, xxx) = 4, bytes = 2c d0 4d e2
...
...
...
Sending packet: $mec2c8,4#62...[+]Ack
[$][1][4][0][0][9][d][e][5][#][f][c]Packet received: 14009de5
target_xfer_memory (0xec2c8, xxx, 4, read, xxx) = 4, bytes = 14 00 9d e5
Sending packet: $mec2cc,4#8d...[+]Ack
[$][0][0][0][0][5][0][e][3][#][b][d]Packet received: 000050e3
target_xfer_memory (0xec2cc, xxx, 4, read, xxx) = 4, bytes = 00 00 50 e3
Sending packet: $mec2d0,4#5b...[<Error: Connection timed
out>]target_terminal_ours ()
Remote communication error: Connection timed out.
Sending packet: $z0,ec394,4#9e...[<Error: Connection timed
out>]target_terminal_ours ()
Remote communication error: Connection timed out.
(gdb-usb)
FROM GDB log:
w +$Hc-1#09
r +$T050f:4cc30e00;0d:7c066300;#b8
w +$qC#b4
r +$#00
w +$qOffsets#4b
r +$#00
w +$?#3f
r +$#00
w +
r +$S05#b8
w +$Hg0#df
r +$OK#9a
w +$g#67
r
+$0000000013000060c0445b000000000016000000000000000100000001000000000000
000000000038c7620034076300a50affff7c066300a8df09004cc30e0013000020130000
20#cb
w +
c set debug serial 1
c n
w $mec2b0,4#59
r +$04e02de5#29
w +$mec2b4,4#5d
...
...
...
w +$mec2cc,4#8d
r +$000050e3#bd
w +$mec2d0,4#5b
r <Error: Connection timed out>
w $z0,ec394,4#9e
r <Error: Connection timed out>
-----Original Message-----
From: Andrew Cagney [mailto:cagney@gnu.org]
Sent: Friday, September 24, 2004 4:49 PM
To: Lan Zhang
Cc: gdb@sources.redhat.com
Subject: Re: Remote communication error
> Hi,
>
> I set up a remote debug using USB port. I got some message like:
> Remote communication error: Connection timed out. And this can happen
> at the begin of the debug or after I already did some debug commands.
> But the whole remote debug works fine for the serial port. I think I
> didn't add USB interface correctly. Could anyone point me which code
> related to the remote communication error, and why this happens?
>
> Thanks a lot
That it works with a simple serial device and not USB suggests a bug in
the kernel or h/w. GDB (assuming this is with a standard GDB) uses
identical code to drive both devices.
You can use "(gdb) set debug serial" to see exactly what GDB is doing
when it hangs.
ANdrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Remote communication error
@ 2004-09-24 21:30 Xinan Tang
0 siblings, 0 replies; 7+ messages in thread
From: Xinan Tang @ 2004-09-24 21:30 UTC (permalink / raw)
To: Lan Zhang, gdb
Hi
By default, the gdb (I am using v6.1) will time out in 2 seconds if no
response comes back from the remote stub. You can increase it to a large
value by modifying the variable 'remote_timeout' in file "top.c" and see
whether that can fix your problem (of course you need to rebuild gdb
after that).
Good luck
--Xinan
-----Original Message-----
From: gdb-owner@sources.redhat.com [mailto:gdb-owner@sources.redhat.com]
On Behalf Of Lan Zhang
Sent: Friday, September 24, 2004 12:10 PM
To: gdb@sources.redhat.com
Subject: Remote communication error
Hi,
I set up a remote debug using USB port. I got some message like: Remote
communication error: Connection timed out. And this can happen at the
begin of the debug or after I already did some debug commands. But the
whole remote debug works fine for the serial port. I think I didn't add
USB interface correctly. Could anyone point me which code related to the
remote communication error, and why this happens?
Thanks a lot
Lan Zhang
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remote communication error
2004-09-24 19:09 Lan Zhang
@ 2004-09-24 21:23 ` Andrew Cagney
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 2004-09-24 21:23 UTC (permalink / raw)
To: Lan Zhang; +Cc: gdb
> Hi,
>
> I set up a remote debug using USB port. I got some message like: Remote
> communication error: Connection timed out. And this can happen at the
> begin of the debug or after I already did some debug commands. But the
> whole remote debug works fine for the serial port. I think I didn't add
> USB interface correctly. Could anyone point me which code related to the
> remote communication error, and why this happens?
>
> Thanks a lot
That it works with a simple serial device and not USB suggests a bug in
the kernel or h/w. GDB (assuming this is with a standard GDB) uses
identical code to drive both devices.
You can use "(gdb) set debug serial" to see exactly what GDB is doing
when it hangs.
ANdrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Remote communication error
@ 2004-09-24 19:09 Lan Zhang
2004-09-24 21:23 ` Andrew Cagney
0 siblings, 1 reply; 7+ messages in thread
From: Lan Zhang @ 2004-09-24 19:09 UTC (permalink / raw)
To: gdb
Hi,
I set up a remote debug using USB port. I got some message like: Remote
communication error: Connection timed out. And this can happen at the
begin of the debug or after I already did some debug commands. But the
whole remote debug works fine for the serial port. I think I didn't add
USB interface correctly. Could anyone point me which code related to the
remote communication error, and why this happens?
Thanks a lot
Lan Zhang
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-09-24 22:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24 22:25 Remote communication error Lan Zhang
-- strict thread matches above, loose matches on Subject: below --
2004-09-24 22:21 Xinan Tang
2004-09-24 21:57 Lan Zhang
2004-09-24 22:11 ` Andrew Cagney
2004-09-24 21:30 Xinan Tang
2004-09-24 19:09 Lan Zhang
2004-09-24 21:23 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).