Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Debugging PowerPC 860 embedded target with Abatron BDI 2000: Remo te packet too long errors.
@ 2001-11-19 11:38 Cristian Alonso
  2001-11-19 12:17 ` Elena Zannoni
  2001-11-29  3:21 ` Cristian Alonso
  0 siblings, 2 replies; 6+ messages in thread
From: Cristian Alonso @ 2001-11-19 11:38 UTC (permalink / raw)
  To: gdb-patches

Hi,
I am using an Abatron (Swiss company that makes BDM's which work whith gdb)
BDI2000 to debug an embedded target with a PowerPC 860 CPU using Insight-5.1
(last prerelease snapshot available). 

After compiing last Insight-5.1 prerelease available and connecting to the
remote target i get lots of the following errors:
(gdb) target remote 172.24.78.42:2001
Remote debugging using 172.24.78.42:2001
Remote packet too long:
000000ff0079800400080bc00000000000000000002be6d8009166100038eb38006f00000000
80000000000a00009032006f000000080bc00000000000000000000000000000000000000000
0000000000000000000000000000000000000000009171e40091686400000000000080000091
65e8009166100000000000798004000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
00000000002be8d40000903240000002002be8c00000000000000000deadbeefdeadbeefdead
beefdeadbeefdeadbee
Ignoring packet error, continuing...

After taking a look at GDB's source files, i found function
build_remote_packet_sizes in remote.c, in which 
the following lines are executed:
.
.
.
  remote_packet_size = 400 - 1;
  /* Should REGISTER_BYTES needs more space than the default, adjust
     the size accordingly. Remember that each byte is encoded as two
     characters. 32 is the overhead for the packet header /
     footer. NOTE: cagney/1999-10-26: I suspect that 8
     (``$NN:G...#NN'') is a better guess, the below has been padded a
     little. */
  if (REGISTER_BYTES > ((remote_packet_size - 32) / 2))
    remote_packet_size = (REGISTER_BYTES * 2 + 32);
.
.

Changing the value of remote_packet_size to 5 Kbytes works fine with my
BDI2000. It makes my insight work fine and allows me to laugh at all the
Windriver Visionclick users who told me i would not be able to debug using
"that free software of yours" ;-).

It seems that i should be able to find the definition of REGISTER_BYTES and
change it to a different value and submit the patch but i have the following
problems:
  - I have not been able to find in which file exactly (ppc.h does not seem
to work...)do i have to change the definition of REGISTER_BYTES.
  - I do not know which value is correct for this #define (it seems that it
has to be higher, and it has something to do with how many registers do i
have in my arch, but how do i find out?)

Thanks in advance,
Cristian Alonso Aldama
Development Group Manager
R&D Department
e-mail: calonso@teldat.es 
http://www.teldat.es


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Debugging PowerPC 860 embedded target with Abatron BDI 2000: Remo te packet too long errors.
@ 2001-11-29  9:16 Cristian Alonso
  2001-11-19 13:02 ` Cristian Alonso
  0 siblings, 1 reply; 6+ messages in thread
From: Cristian Alonso @ 2001-11-29  9:16 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: gdb-patches

Thanks a lot Elena. 
It worked great with the command 'set architecture powerpc:MPC8xx' 
I have to confess I had no idea about this 'set achitecture' command... :(

My default architecture was rs6000:6000 which obviously was wrong. I took a
look at rs6000-tdep.c and bfd/cpu-powerpc.c and they look ok to me.

Thanks again for your quick response,
Cristian Alonso Aldama
Development Group Manager
R&D Department
e-mail: calonso@teldat.es 
http://www.teldat.es



-----Mensaje original-----
De: Elena Zannoni [ mailto:ezannoni@cygnus.com ]
Enviado el: jueves 29 de noviembre de 2001 16:50
Para: Cristian Alonso
CC: gdb-patches@sourceware.cygnus.com
Asunto: Re: Debugging PowerPC 860 embedded target with Abatron BDI 2000:
Remo te packet too long errors.



Hi, have you tried changing the default architecture that gdb thinks
it is dealing with?

If your current architecture (use 'show architecture') is powerpc:common,
the
register set is smaller. Try 'set architecture powerpc:860'

Look in rs6000-tdep.c at the 'variants' array.

Hope this helps a bit
Elena

Cristian Alonso writes:
 > Hi,
 > I am using an Abatron (Swiss company that makes BDM's which work whith
gdb)
 > BDI2000 to debug an embedded target with a PowerPC 860 CPU using
Insight-5.1
 > (last prerelease snapshot available). 
 > 
 > 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-11-29 17:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-19 11:38 Debugging PowerPC 860 embedded target with Abatron BDI 2000: Remo te packet too long errors Cristian Alonso
2001-11-19 12:17 ` Elena Zannoni
2001-11-29  7:43   ` Debugging PowerPC 860 embedded target with Abatron BDI 2000: Remote " Elena Zannoni
2001-11-29  3:21 ` Cristian Alonso
2001-11-29  9:16 Debugging PowerPC 860 embedded target with Abatron BDI 2000: Remo te " Cristian Alonso
2001-11-19 13:02 ` Cristian Alonso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox