Re: Help with building gdb with BDM support for the Coldfire
"Mark Giacobbe" <[email protected]> Thu, 8 May 2008 14:03:12 -0400
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <[email protected]> |
I may have spoke to soon about my changes working. Looking deeper, it seems if I do a info all-registers, I get the V4E set, which is probably why none of my changes are really working. I'm going to keep looking, but if you have any other suggestions or places to look at, I'll be glad to hear them!! :) I'll try to send my patches for your review to see if I missed anything. Regards Mark On Thu, May 8, 2008 at 9:34 AM, Mark Giacobbe <[email protected]> wrote: > Hey Chris - > I made the changes and now when gdb starts I get > [pcmadm@localhost bin]$ ./m68k-elf-gdb --command=5307.gdb > GNU gdb 6.7 > Copyright (C) 2007 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later < > http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "--host=i686-pc-linux-gnu --target=m68k-elf". > trying kernel driver: /dev/bdmcf0 > trying bdm server: localhost:/dev/bdmcf0 > m68k-bdm: detected MCF5307 > m68k-bdm: architecture CF5307 connected to /dev/bdmcf0 > m68k-bdm: Coldfire debug module version is 1 (5307/5407(e)) > Process /dev/bdmcf0 created; pid = 0 > 0xb6eb7912 in ?? () > > So it seems the changes were accepted. But my memory issue is still there. > > No matter what memory address I read/write to the values are all the same. > And I can only do unsigned long writes (it seems). If I try to do a > unsigned char, the entire 32 bit address get's the value. > > (gdb) d32 0xb0000000 16 > 0xb0000000: 0xbeaddeed 0x01000100 0xbff559d1 0xb6eb7913 > 0xb0000010: 0xe23d3498 0x4072b7d4 0xf8d2f259 0xf7fe8c37 > 0xb0000020: 0xabb859ee 0xbe70cddd 0x3e4be7df 0xdaaf9f34 > 0xb0000030: 0x5de39431 0x2dd2e5df 0x5b38fddd 0x8fbe22df > (gdb) d32 0x00000000 16 > 0x0: 0xbeaddeed 0x01000100 0xbff559d1 0xb6eb7913 > 0x10: 0xe23d3498 0x4072b7d4 0xf8d2f259 0xf7fe8c37 > 0x20: 0xabb859ee 0xbe70cddd 0x3e4be7df 0xdaaf9f34 > 0x30: 0x5de39431 0x2dd2e5df 0x5b38fddd 0x8fbe22df > (gdb) set32 0xb0000000 0x12345678 > (gdb) d32 0x00000000 16 > 0x0: 0x12345678 0x01000100 0xbff559d1 0xb6eb7913 > 0x10: 0xe23d3498 0x4072b7d4 0xf8d2f259 0xf7fe8c37 > 0x20: 0xabb859ee 0xbe70cddd 0x3e4be7df 0xdaaf9f34 > 0x30: 0x5de39431 0x2dd2e5df 0x5b38fddd 0x8fbe22df > (gdb) d32 0xb0000000 16 > 0xb0000000: 0x12345678 0x01000100 0xbff559d1 0xb6eb7913 > 0xb0000010: 0xe23d3498 0x4072b7d4 0xf8d2f259 0xf7fe8c37 > 0xb0000020: 0xabb859ee 0xbe70cddd 0x3e4be7df 0xdaaf9f34 > 0xb0000030: 0x5de39431 0x2dd2e5df 0x5b38fddd 0x8fbe22df > (gdb) set8 0xb0000000 0xaa > (gdb) d32 0xb0000000 16 > 0xb0000000: 0xaaaaaaaa 0x01000100 0xbff559d1 0xb6eb7913 > 0xb0000010: 0xe23d3498 0x4072b7d4 0xf8d2f259 0xf7fe8c37 > 0xb0000020: 0xabb859ee 0xbe70cddd 0x3e4be7df 0xdaaf9f34 > 0xb0000030: 0x5de39431 0x2dd2e5df 0x5b38fddd 0x8fbe22df > (gdb) Quit > (gdb) > > Any other ideas?? > > Thanks for the help > Mark > > > > On Tue, May 6, 2008 at 7:57 PM, Chris Johns <[email protected]> > wrote: > >> Mark Giacobbe wrote: >> >>> I'm sorry, I don't understand your question. What registers do you want >>> me to add? >>> >>> >> Take a look in the top of m68k/gdbserver/m68k-bdm-low.c in the BDM package >> and you will see the register mappings for the various devices. The >> 5307/5407 is missing. A table with the registers for this device needs to be >> added and then an entry added to the m68k_bdm_reg_map table. After that add >> a little logic in m68k_bdm_create_inferior. For this device I think the >> version number of the debug module is all you need to check. The last part >> is the XML definition. I would just copy the closest one and change it. This >> file needs to be added to the list in m68k/gdbserver/Makefile.am. >> >> The XML file is sent to GDB and all you need to make sure if the >> definitions in the XML match the table in m68k/gdbserver/m68k-bdm-low.c. >> >> >> Regards >> Chris >> --- >> [email protected] Send a post to the list. >> [email protected] Join the list. >> [email protected] Join the list in digest mode. >> [email protected] Leave the list. >> >> >