Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

169 lines
7.5KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Free Software" and "Free Software Needs
  8. Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
  9. and with the Back-Cover Texts as in (a) below.
  10. (a) The FSF's Back-Cover Text is: "You are free to copy and modify
  11. this GNU Manual. Buying copies from GNU Press supports the FSF in
  12. developing GNU and promoting software freedom." -->
  13. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  16. <title>Running Configure (Debugging with GDB)</title>
  17. <meta name="description" content="Running Configure (Debugging with GDB)">
  18. <meta name="keywords" content="Running Configure (Debugging with GDB)">
  19. <meta name="resource-type" content="document">
  20. <meta name="distribution" content="global">
  21. <meta name="Generator" content="makeinfo">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="Installing-GDB.html#Installing-GDB" rel="up" title="Installing GDB">
  26. <link href="Separate-Objdir.html#Separate-Objdir" rel="next" title="Separate Objdir">
  27. <link href="Requirements.html#Requirements" rel="prev" title="Requirements">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.indentedblock {margin-right: 0em}
  32. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  33. blockquote.smallquotation {font-size: smaller}
  34. div.display {margin-left: 3.2em}
  35. div.example {margin-left: 3.2em}
  36. div.lisp {margin-left: 3.2em}
  37. div.smalldisplay {margin-left: 3.2em}
  38. div.smallexample {margin-left: 3.2em}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style: oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nolinebreak {white-space: nowrap}
  50. span.roman {font-family: initial; font-weight: normal}
  51. span.sansserif {font-family: sans-serif; font-weight: normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en">
  57. <a name="Running-Configure"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="Separate-Objdir.html#Separate-Objdir" accesskey="n" rel="next">Separate Objdir</a>, Previous: <a href="Requirements.html#Requirements" accesskey="p" rel="prev">Requirements</a>, Up: <a href="Installing-GDB.html#Installing-GDB" accesskey="u" rel="up">Installing GDB</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  61. </div>
  62. <hr>
  63. <a name="Invoking-the-GDB-configure-Script"></a>
  64. <h3 class="section">C.2 Invoking the <small>GDB</small> <samp>configure</samp> Script</h3>
  65. <a name="index-configuring-GDB"></a>
  66. <p><small>GDB</small> comes with a <samp>configure</samp> script that automates the process
  67. of preparing <small>GDB</small> for installation; you can then use <code>make</code> to
  68. build the <code>gdb</code> program.
  69. </p>
  70. <p>The <small>GDB</small> distribution includes all the source code you need for
  71. <small>GDB</small> in a single directory, whose name is usually composed by
  72. appending the version number to &lsquo;<samp>gdb</samp>&rsquo;.
  73. </p>
  74. <p>For example, the <small>GDB</small> version 10.1.90.20201028-git distribution is in the
  75. <samp>gdb-10.1.90.20201028-git</samp> directory. That directory contains:
  76. </p>
  77. <dl compact="compact">
  78. <dt><code>gdb-10.1.90.20201028-git/configure <span class="roman">(and supporting files)</span></code></dt>
  79. <dd><p>script for configuring <small>GDB</small> and all its supporting libraries
  80. </p>
  81. </dd>
  82. <dt><code>gdb-10.1.90.20201028-git/gdb</code></dt>
  83. <dd><p>the source specific to <small>GDB</small> itself
  84. </p>
  85. </dd>
  86. <dt><code>gdb-10.1.90.20201028-git/bfd</code></dt>
  87. <dd><p>source for the Binary File Descriptor library
  88. </p>
  89. </dd>
  90. <dt><code>gdb-10.1.90.20201028-git/include</code></dt>
  91. <dd><p><small>GNU</small> include files
  92. </p>
  93. </dd>
  94. <dt><code>gdb-10.1.90.20201028-git/libiberty</code></dt>
  95. <dd><p>source for the &lsquo;<samp>-liberty</samp>&rsquo; free software library
  96. </p>
  97. </dd>
  98. <dt><code>gdb-10.1.90.20201028-git/opcodes</code></dt>
  99. <dd><p>source for the library of opcode tables and disassemblers
  100. </p>
  101. </dd>
  102. <dt><code>gdb-10.1.90.20201028-git/readline</code></dt>
  103. <dd><p>source for the <small>GNU</small> command-line interface
  104. </p></dd>
  105. </dl>
  106. <p>There may be other subdirectories as well.
  107. </p>
  108. <p>The simplest way to configure and build <small>GDB</small> is to run <samp>configure</samp>
  109. from the <samp>gdb-<var>version-number</var></samp> source directory, which in
  110. this example is the <samp>gdb-10.1.90.20201028-git</samp> directory.
  111. </p>
  112. <p>First switch to the <samp>gdb-<var>version-number</var></samp> source directory
  113. if you are not already in it; then run <samp>configure</samp>. Pass the
  114. identifier for the platform on which <small>GDB</small> will run as an
  115. argument.
  116. </p>
  117. <p>For example:
  118. </p>
  119. <div class="smallexample">
  120. <pre class="smallexample">cd gdb-10.1.90.20201028-git
  121. ./configure
  122. make
  123. </pre></div>
  124. <p>Running &lsquo;<samp>configure</samp>&rsquo; and then running <code>make</code> builds the
  125. included supporting libraries, then <code>gdb</code> itself. The configured
  126. source files, and the binaries, are left in the corresponding source
  127. directories.
  128. </p>
  129. <p><samp>configure</samp> is a Bourne-shell (<code>/bin/sh</code>) script; if your
  130. system does not recognize this automatically when you run a different
  131. shell, you may need to run <code>sh</code> on it explicitly:
  132. </p>
  133. <div class="smallexample">
  134. <pre class="smallexample">sh configure
  135. </pre></div>
  136. <p>You should run the <samp>configure</samp> script from the top directory in the
  137. source tree, the <samp>gdb-<var>version-number</var></samp> directory. If you run
  138. <samp>configure</samp> from one of the subdirectories, you will configure only
  139. that subdirectory. That is usually not what you want. In particular,
  140. if you run the first <samp>configure</samp> from the <samp>gdb</samp> subdirectory
  141. of the <samp>gdb-<var>version-number</var></samp> directory, you will omit the
  142. configuration of <samp>bfd</samp>, <samp>readline</samp>, and other sibling
  143. directories of the <samp>gdb</samp> subdirectory. This leads to build errors
  144. about missing include files such as <samp>bfd/bfd.h</samp>.
  145. </p>
  146. <p>You can install <code><small>GDB</small></code> anywhere. The best way to do this
  147. is to pass the <code>--prefix</code> option to <code>configure</code>, and then
  148. install it with <code>make install</code>.
  149. </p>
  150. <hr>
  151. <div class="header">
  152. <p>
  153. Next: <a href="Separate-Objdir.html#Separate-Objdir" accesskey="n" rel="next">Separate Objdir</a>, Previous: <a href="Requirements.html#Requirements" accesskey="p" rel="prev">Requirements</a>, Up: <a href="Installing-GDB.html#Installing-GDB" accesskey="u" rel="up">Installing GDB</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  154. </div>
  155. </body>
  156. </html>