From: "Lan Zhang" <Lan.Zhang@Zoran.com>
To: <gdb@sources.redhat.com>
Subject: RE: Remote communication error
Date: Fri, 24 Sep 2004 21:57:00 -0000 [thread overview]
Message-ID: <E65CD2CAB74C80498703D6EF7624BB4C4ACBC3@zmaex.zma.zoran.com> (raw)
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
next reply other threads:[~2004-09-24 21:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-24 21:57 Lan Zhang [this message]
2004-09-24 22:11 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2004-09-24 22:25 Lan Zhang
2004-09-24 22:21 Xinan Tang
2004-09-24 21:30 Xinan Tang
2004-09-24 19:09 Lan Zhang
2004-09-24 21:23 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E65CD2CAB74C80498703D6EF7624BB4C4ACBC3@zmaex.zma.zoran.com \
--to=lan.zhang@zoran.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).