[uCsimm] gdb/gdbserver...

From: Javier Ripoll (jripoll@cajamadrid.es)
Date: Thu Feb 10 2000 - 03:34:02 EST


Hi Kwonsk

Thank you very much for your gdbserver porting.
I've followed your instrunctions and it is working right.

But I've find two bugs in gdb-4.18:

1- If you try to print an array of 200 bytes or longer you will receive a Receive packet too long
2- commands like "p array[2]" doesn┤t work (I think there is something wrong in gdb dealing with big endian targets)

Here are two patches to resolve it:

*** remote.c.sav Wed Feb 9 21:59:42 2000
--- remote.c Wed Feb 9 21:18:42 2000
***************
*** 2277,2283 ****
  
    /* Chop the transfer down if necessary */
  
! max_buf_size = min (remote_write_size, PBUFSIZ);
    if (remote_register_buf_size != 0)
      max_buf_size = min (max_buf_size, remote_register_buf_size);
  
--- 2277,2283 ----
  
    /* Chop the transfer down if necessary */
  
! max_buf_size = min (remote_write_size, PBUFSIZ-1);
    if (remote_register_buf_size != 0)
      max_buf_size = min (max_buf_size, remote_register_buf_size);

Second patch:
*** findvar.c.sav Wed Feb 9 21:54:33 2000
--- findvar.c Wed Feb 9 22:03:36 2000
***************
*** 252,257 ****
--- 252,259 ----
       int len;
       LONGEST val;
  {
+ #if 0
+ printf_unfiltered("store_address addr=0x%x len=%d val=0x%llx sofadd=%d soflong=%d\n",addr,len,val,sizeof(CORE_ADDR),sizeof(LONGEST));
    if( TARGET_BYTE_ORDER == BIG_ENDIAN
        && len != sizeof( LONGEST )) {
      /* On big-endian machines (e.g., HPPA 2.0, narrow mode)
***************
*** 268,276 ****
--- 270,280 ----
        *(LONGEST*)&coerce = val;
  
        store_unsigned_integer (addr, len, coerce[1] ); /* BIG_ENDIAN code! */
+ printf_unfiltered("store_address val=0x%lx\n",coerce[1]);
        return;
      }
    }
+ #endif
    store_unsigned_integer (addr, len, val);
  }
 
  

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:34 EST