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]

Re: Using gdb with unknown architectures


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.

I have done the same thing and written it as my B.S fulfilment thesis. But it is in Chinese, I didn't have a English version. If you have Chinese friends can help you read, you can get my thesis at http://www.solrex.cn . It is written by a student, so maybe not very good and clear.

I list the files that should be modified while porting GDB from my
experience bellow:
(Assume your target is named "solrex")
         gdb
       * gdb/config/solrex/tm-solrex.h: New file.
       * gdb/solrex-tdep.h: New file.
       * gdb/solrex-tdep.c: New file.
         bfd
       * include/elf/solrex.h: New file.
       * bfd/cpu-solrex.c: New file.
       * bfd/elf32-solrex.c: New file.
       * bfd/archures.c: New arch.
       * bfd/bfd-in2.h: New arch.
       * bfd/targets.c: New target.
         opcodes
       * opcodes/solrex-dis.c: New file.
       * include/dis-asm.h (print_insn_solrex): New function.
       * opcodes/disassemble.c (ARCH_solrex): New arch.
       Config files:
         gdb
       * gdb/config/solrex/solrex.mt: New file.
       * gdb/Makefile.in (solrex-tdep*): New target.
       * gdb/configure.host (solrex*, solrex*-*-elf*): New target.
       * gdb/configure.tgt (solrex*, solrex*-*-elf*): New target.
         bfd
       * bfd/config.bfd: New target.
       * bfd/configure.in: New target.
       * bfd/Makefile.am: New target.
         opcodes
       * opcodes/configure.in (bfd_solrex_arch): New target.
       * opcodes/Makefile.am (solrex-dis*): New target.
         general
       * configure.in (solrex*-*-elf*): New target.
       * config.sub (solrex, solrex*-*): New target.
       * readline/support/config.sub (solrex, solrex*-*): New target.
       Auto Generated files:
       * configure (solrex*-*-elf*): New.
       * bfd/configure: New.
       * bfd/Makefile.in: New.
       * bfd/doc/bfd.info: New.
       * opcodes/configure (bfd_solrex_arch): New.
       * opcodes/Makefile.in (solrex-dis*): New.

I hope that can help.

Regards,

Wenbo
--
Wenbo Yang

Student
Department of Mathematics, Nanjing Univ. 22 Hankou Road, Nanjing, China
Mobile: +86-013655175286  ---  Personal Email: solrex@gmail.com
MSN: solrex@live.com  ---  Homepage: http://www.solrex.cn

Intern Software Engineer
SimpLight Nanoelectronics Ltd. 6 Zhichun Road, 10th Floor, Beijing, China
Phone: +86-10-5126-6989 ext.110  ---  Email: wenbo.yang@simplnano.com


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