223 lines
8.5 KiB
HTML
223 lines
8.5 KiB
HTML
<HTML>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<!-- Created on October, 26 2002 by texi2html 1.64 -->
|
|
<!--
|
|
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
|
Karl Berry <karl@freefriends.org>
|
|
Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
|
and many others.
|
|
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
|
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
|
|
|
|
-->
|
|
<HEAD>
|
|
<TITLE>GDB Internals: Porting GDB</TITLE>
|
|
|
|
<META NAME="description" CONTENT="GDB Internals: Porting GDB">
|
|
<META NAME="keywords" CONTENT="GDB Internals: Porting GDB">
|
|
<META NAME="resource-type" CONTENT="document">
|
|
<META NAME="distribution" CONTENT="global">
|
|
<META NAME="Generator" CONTENT="texi2html 1.64">
|
|
|
|
</HEAD>
|
|
|
|
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
|
|
|
|
<A NAME="SEC126"></A>
|
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_13.html#SEC125"> < </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_14.html#SEC127"> > </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_2.html#SEC2"> << </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint.html#SEC_Top"> Up </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_15.html#SEC129"> >> </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint.html#SEC_Top">Top</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_toc.html#SEC_Contents">Contents</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_19.html#SEC186">Index</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_abt.html#SEC_About"> ? </A>]</TD>
|
|
</TR></TABLE>
|
|
<H1> 14. Porting GDB </H1>
|
|
<!--docid::SEC126::-->
|
|
<P>
|
|
|
|
Most of the work in making GDB compile on a new machine is in
|
|
specifying the configuration of the machine. This is done in a
|
|
dizzying variety of header files and configuration scripts, which we
|
|
hope to make more sensible soon. Let's say your new host is called an
|
|
<VAR>xyz</VAR> (e.g., <SAMP>`sun4'</SAMP>), and its full three-part configuration
|
|
name is <CODE><VAR>arch</VAR>-<VAR>xvend</VAR>-<VAR>xos</VAR></CODE> (e.g.,
|
|
<SAMP>`sparc-sun-sunos4'</SAMP>). In particular:
|
|
</P><P>
|
|
|
|
<UL>
|
|
<LI>
|
|
In the top level directory, edit <TT>`config.sub'</TT> and add <VAR>arch</VAR>,
|
|
<VAR>xvend</VAR>, and <VAR>xos</VAR> to the lists of supported architectures,
|
|
vendors, and operating systems near the bottom of the file. Also, add
|
|
<VAR>xyz</VAR> as an alias that maps to
|
|
<CODE><VAR>arch</VAR>-<VAR>xvend</VAR>-<VAR>xos</VAR></CODE>. You can test your changes by
|
|
running
|
|
<P>
|
|
|
|
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre>./config.sub <VAR>xyz</VAR>
|
|
</FONT></pre></td></tr></table></P><P>
|
|
|
|
and
|
|
</P><P>
|
|
|
|
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre>./config.sub <CODE><VAR>arch</VAR>-<VAR>xvend</VAR>-<VAR>xos</VAR></CODE>
|
|
</FONT></pre></td></tr></table></P><P>
|
|
|
|
which should both respond with <CODE><VAR>arch</VAR>-<VAR>xvend</VAR>-<VAR>xos</VAR></CODE>
|
|
and no error messages.
|
|
</P><P>
|
|
|
|
You need to port BFD, if that hasn't been done already. Porting BFD is
|
|
beyond the scope of this manual.
|
|
</P><P>
|
|
|
|
<LI>
|
|
To configure GDB itself, edit <TT>`gdb/configure.host'</TT> to recognize
|
|
your system and set <CODE>gdb_host</CODE> to <VAR>xyz</VAR>, and (unless your
|
|
desired target is already available) also edit <TT>`gdb/configure.tgt'</TT>,
|
|
setting <CODE>gdb_target</CODE> to something appropriate (for instance,
|
|
<VAR>xyz</VAR>).
|
|
<P>
|
|
|
|
<EM>Maintainer's note: Work in progress. The file
|
|
<TT>`gdb/configure.host'</TT> originally needed to be modified when either a
|
|
new native target or a new host machine was being added to GDB.
|
|
Recent changes have removed this requirement. The file now only needs
|
|
to be modified when adding a new native configuration. This will likely
|
|
changed again in the future.</EM>
|
|
</P><P>
|
|
|
|
<LI>
|
|
Finally, you'll need to specify and define GDB's host-, native-, and
|
|
target-dependent <TT>`.h'</TT> and <TT>`.c'</TT> files used for your
|
|
configuration.
|
|
</UL>
|
|
<P>
|
|
|
|
<HR SIZE="6">
|
|
<A NAME="SEC127"></A>
|
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_14.html#SEC126"> < </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_15.html#SEC129"> > </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_14.html#SEC126"> << </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_14.html#SEC126"> Up </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_15.html#SEC129"> >> </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint.html#SEC_Top">Top</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_toc.html#SEC_Contents">Contents</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_19.html#SEC186">Index</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_abt.html#SEC_About"> ? </A>]</TD>
|
|
</TR></TABLE>
|
|
<H2> 14.1 Configuring GDB for Release </H2>
|
|
<!--docid::SEC127::-->
|
|
<P>
|
|
|
|
<A NAME="IDX520"></A>
|
|
<A NAME="IDX521"></A>
|
|
From the top level directory (containing <TT>`gdb'</TT>, <TT>`bfd'</TT>,
|
|
<TT>`libiberty'</TT>, and so on):
|
|
</P><P>
|
|
|
|
<TABLE><tr><td> </td><td class=smallexample><FONT SIZE=-1><pre>make -f Makefile.in gdb.tar.gz
|
|
</FONT></pre></td></tr></table></P><P>
|
|
|
|
This will properly configure, clean, rebuild any files that are
|
|
distributed pre-built (e.g. <TT>`c-exp.tab.c'</TT> or <TT>`refcard.ps'</TT>),
|
|
and will then make a tarfile. (If the top level directory has already
|
|
been configured, you can just do <CODE>make gdb.tar.gz</CODE> instead.)
|
|
</P><P>
|
|
|
|
This procedure requires:
|
|
</P><P>
|
|
|
|
<UL>
|
|
|
|
<LI>
|
|
symbolic links;
|
|
<P>
|
|
|
|
<LI>
|
|
<CODE>makeinfo</CODE> (texinfo2 level);
|
|
<P>
|
|
|
|
<LI>
|
|
TeX;
|
|
<P>
|
|
|
|
<LI>
|
|
<CODE>dvips</CODE>;
|
|
<P>
|
|
|
|
<LI>
|
|
<CODE>yacc</CODE> or <CODE>bison</CODE>.
|
|
</UL>
|
|
<P>
|
|
|
|
<small>...</small> and the usual slew of utilities (<CODE>sed</CODE>, <CODE>tar</CODE>, etc.).
|
|
</P><P>
|
|
|
|
<A NAME="SEC128"></A>
|
|
<H3> TEMPORARY RELEASE PROCEDURE FOR DOCUMENTATION </H3>
|
|
<!--docid::SEC128::-->
|
|
<P>
|
|
|
|
<TT>`gdb.texinfo'</TT> is currently marked up using the texinfo-2 macros,
|
|
which are not yet a default for anything (but we have to start using
|
|
them sometime).
|
|
</P><P>
|
|
|
|
For making paper, the only thing this implies is the right generation of
|
|
<TT>`texinfo.tex'</TT> needs to be included in the distribution.
|
|
</P><P>
|
|
|
|
For making info files, however, rather than duplicating the texinfo2
|
|
distribution, generate <TT>`gdb-all.texinfo'</TT> locally, and include the
|
|
files <TT>`gdb.info*'</TT> in the distribution. Note the plural;
|
|
<CODE>makeinfo</CODE> will split the document into one overall file and five
|
|
or so included files.
|
|
</P><P>
|
|
|
|
<A NAME="Releasing GDB"></A>
|
|
</P><P>
|
|
|
|
<HR SIZE="6">
|
|
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
|
|
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_14.html#SEC126"> << </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_15.html#SEC129"> >> </A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint.html#SEC_Top">Top</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_toc.html#SEC_Contents">Contents</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_19.html#SEC186">Index</A>]</TD>
|
|
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdbint_abt.html#SEC_About"> ? </A>]</TD>
|
|
</TR></TABLE>
|
|
<BR>
|
|
<FONT SIZE="-1">
|
|
|
|
<address>
|
|
|
|
<p>Please send FSF & GNU inquiries & questions to <a
|
|
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
|
|
href="http://www.gnu.org/home.html#ContactInfo">other ways to
|
|
contact</a> the FSF.</p>
|
|
|
|
<p>These pages are maintained by <a
|
|
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
|
|
|
|
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
|
|
330, Boston, MA 02111, USA.</p>
|
|
|
|
<p>Verbatim copying and distribution of this entire article is
|
|
permitted in any medium, provided this notice is preserved.</p>
|
|
|
|
</address>
|
|
|
|
This document was generated
|
|
by <I>GDB Administrator</I> on <I>October, 26 2002</I>
|
|
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
|
"><I>texi2html</I></A>
|
|
|
|
</BODY>
|
|
</HTML>
|