aboutdebug.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-aboutdebug">
  7. <title>About Debugging Symbols</title>
  8. <?dbhtml filename="aboutdebug.html"?>
  9. <para>Most programs and libraries are, by default, compiled with
  10. debugging symbols included (with <command>gcc</command>'s
  11. <parameter>-g</parameter> option). This means that when debugging a
  12. program or library that was compiled with debugging information
  13. included, the debugger can provide not only memory addresses, but also
  14. the names of the routines and variables.</para>
  15. <para>However, the inclusion of these debugging symbols enlarges a
  16. program or library significantly. The following is an example of the
  17. amount of space these symbols occupy:</para>
  18. <itemizedlist>
  19. <listitem><para>a bash binary
  20. with debugging symbols: 1200 KB</para></listitem>
  21. <listitem><para>a bash binary
  22. without debugging symbols: 480 KB</para></listitem>
  23. <listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>
  24. and <filename class="directory">/usr/lib</filename>)
  25. with debugging symbols: 87 MB</para></listitem>
  26. <listitem><para>Glibc and GCC files
  27. without debugging symbols: 16 MB</para></listitem>
  28. </itemizedlist>
  29. <para>Sizes may vary depending on which compiler and C
  30. library were used, but when comparing programs with and without debugging
  31. symbols, the difference will usually be a factor between two and
  32. five.</para>
  33. <para>Because most users will never use a debugger on their system
  34. software, a lot of disk space can be regained by removing these
  35. symbols. The next section shows how to strip all debugging symbols
  36. from the programs and libraries. Additional information on system
  37. optimization can be found at <ulink url="&hints-root;optimization.txt"/>.</para>
  38. </sect1>