Common part of GDB and GDBserver

This page describes the work to move duplicate code of GDB and GDBserver to files in the gdb/common/ directory.

1. Goal

There's a lot of code duplication between GDB and GDBserver. The project has been taking baby steps in reducing such duplication, by putting shared code in the gdb/common/ directory. The goal of this project is to reduce the duplication as much as possible, and to signify the contents of the gdb/common/ directory.

2. Where's the duplication then?

3. Plan

Here is something like a plan on what we can do on this project,

4. Guidelines

4.1. File Naming

5. Build/Configure

In order not to mess up the plan above, Yao moves build/configure related stuff into a separate section. In March 2011, Yao gave a try to build stuffs in common/ directory into libcommon.a, for GDB and GDBserver to link. See the thread on this here. Finally, patches were dropped from CVS, because of various failures they caused.

So far, we have three possible approaches,

  1. Don't have its own build stuff in common/, let gdb or gdbserver to build them.
  2. Create Makefile.am and m4 files, but don't creat configure files. Similar to what we did for gnulib. This is suggested by Pedro.
  3. Use Yao's original's patches, with various bugs fixed.


OngoingWork

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.