This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Using gdb with unknown architectures


(If this is not the appropriate venue, please direct this e-mail (or me) to concerned parties)
 
I have been given the task of implementing/modifying GDB to debug a totally new architecture (it only exists in a simulator, and the simulator is not yet mature either, and the architecture itself is confidential). Since we probably won't want to use GDB directly on the hardware, it seems that the RSP would be our most viable option, especially given that the simulator uses sockets to handle control signals anyway. Additionally, we could potentially write a translator using sockets and the RSP to talk to the hardware if we reach the hardware stage.
 
Having said that, I have a number of questions (in no particular order)
 
1. Will I need to create a file (like dis-i386, for example) to disassemble the project binaries? (Presumably yes)
 
2. Where are the regisister definitions that must be changed in order for gdb to request the appropriate registers from the simulator?
 
3. The GDB documentation states that a target can define itself by sending XML strings to GDB remotely, or that a target can be defined using an XML file (assuming the expat library is installed), but the commands "set tdesc filename" and "show tdesc filename" are not supported in my build of GDB (furthermore, it appears that the source files to do this are not included in the release of GDB-6.6...what files are necessary, and where can I obtain them?). In general, what steps are necessary to take the GDB-6.6 source and add support for these XML definitions?
 
4. If I manage to get the XML support going, do I still need to define any registers and/or disassembly instructions for the target architecture to be handled properly by GDB?
 
5. Will I need to build GDB explicitly to support this new target if we use RSP? (yes?) If we use the XML definitions?
 
6. Why can some targets (xstormy16?) be defined with a single file, while others have numerous files defining varying degrees of explicit registers, assembly routines, etc? How many files are necessary, and what must be contained in those? 
 
I have read just about everything I can find regarding this, but there doesn't seem to be a lot of information available...even if I had "long" descriptions of some of the filenames I might be able to start looking into it, but most file descriptions are 4-6 words long, which make it difficult to determine the necessity of a given file in using GDB for a different target. Additionally, there is pretty good documentation online about the XML support, but the support doesn't seem to be in the release, so I have been having a pretty tough time with all of this.
 
Any help would be greatly appreciated.
 
Thanks,
Tyler Harms


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]