gdb + 68360 + bdm

Kai Ruottu karuottu@freenet.hut.fi
Wed May 24 11:42:00 GMT 2000


Stephane Dalton wrote:
> 
> Hi there,
> 
> I've succesfully compile gdb 4-18 with bdm patches and personal tweaks to
> work with ICD cable and have correct access to MBAR register. Now  I've a
> couple of questions:
> 
> - I'm not able to trace code which access the vbr, sfc and dfc register and
> trying to get the address of a variable allocated on the stack I get 0x0???

 This sounds familiar, gdb-4.18 has a known bug, which causes variables
to be shown as '0x0'. The patch follows :

------------------ clip ----------------------------------------
*** /home3/src/gdb-4.18.1/gdb/findvar.c	Fri Jan 29 11:46:03 1999
--- ./findvar.c	Sat Dec 18 04:13:50 1999
***************
*** 252,276 ****
       int len;
       LONGEST val;
  {
-   if( TARGET_BYTE_ORDER == BIG_ENDIAN
-       &&  len != sizeof( LONGEST )) {
-     /* On big-endian machines (e.g., HPPA 2.0, narrow mode)
-      * just letting this fall through to the call below will
-      * lead to the wrong bits being stored.
-      *
-      * Only the simplest case is fixed here, the others just
-      * get the old behavior.
-      */
-     if( (len == sizeof( CORE_ADDR ))
- 	&&  (sizeof( LONGEST ) == 2 * sizeof( CORE_ADDR ))) {
-       /* Watch out!  The high bits are garbage! */
-       CORE_ADDR coerce[2];
-       *(LONGEST*)&coerce = val;
- 
-       store_unsigned_integer (addr, len, coerce[1] ); /* BIG_ENDIAN code! */
-       return;
-     }
-   }
    store_unsigned_integer (addr, len, val);
  }
  

--- 252,257 ----
------------------ clip ----------------------------------------

> My target is 68360, am I the only one with this problem? (it seems that I'll
> have to write a howto on this one too... :)

 Yes, please include this too, all those 'm68k-palmos-coff', 'PublicDomain-BDM'
etc. patches etc. are now for gdb-4.18, so it can be the 'expected' GDB for the
m68k users....

 BTW, I have totally forgotten to review your HowTo, but don't let this disturb
you, just release it, it will surely be needed...

Cheers, Kai



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list