Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: gdb/doc/gdbint.texinfo

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/doc/gdbint.info-2 ('k') | gdb/doc/observer.texi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 \input texinfo @c -*- texinfo -*- 1 \input texinfo @c -*- texinfo -*-
2 @setfilename gdbint.info 2 @setfilename gdbint.info
3 @include gdb-cfg.texi 3 @include gdb-cfg.texi
4 @settitle @value{GDBN} Internals 4 @settitle @value{GDBN} Internals
5 @setchapternewpage off 5 @setchapternewpage off
6 @dircategory Software development 6 @dircategory Software development
7 @direntry 7 @direntry
8 * Gdb-Internals: (gdbint). The GNU debugger's internals. 8 * Gdb-Internals: (gdbint). The GNU debugger's internals.
9 @end direntry 9 @end direntry
10 10
(...skipping 10 matching lines...) Expand all
21 Texts. A copy of the license is included in the section entitled ``GNU 21 Texts. A copy of the license is included in the section entitled ``GNU
22 Free Documentation License''. 22 Free Documentation License''.
23 @end copying 23 @end copying
24 24
25 @ifnottex 25 @ifnottex
26 This file documents the internals of the GNU debugger @value{GDBN}. 26 This file documents the internals of the GNU debugger @value{GDBN}.
27 27
28 @insertcopying 28 @insertcopying
29 @end ifnottex 29 @end ifnottex
30 30
31 31 @syncodeindex vr fn
32 @syncodeindex fn cp
33 @syncodeindex vr cp
34 32
35 @titlepage 33 @titlepage
36 @title @value{GDBN} Internals 34 @title @value{GDBN} Internals
37 @subtitle{A guide to the internals of the GNU debugger} 35 @subtitle A guide to the internals of the GNU debugger
38 @author John Gilmore 36 @author John Gilmore
39 @author Cygnus Solutions 37 @author Cygnus Solutions
40 @author Second Edition: 38 @author Second Edition:
41 @author Stan Shebs 39 @author Stan Shebs
42 @author Cygnus Solutions 40 @author Cygnus Solutions
43 @page 41 @page
44 @tex 42 @tex
45 \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ 43 \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
46 \xdef\manvers{\$Revision$} % For use in headers, footers too 44 \xdef\manvers{\$Revision$} % For use in headers, footers too
47 {\parskip=0pt 45 {\parskip=0pt
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 * Misc Guidelines:: 84 * Misc Guidelines::
87 * Porting GDB:: 85 * Porting GDB::
88 * Versions and Branches:: 86 * Versions and Branches::
89 * Start of New Year Procedure:: 87 * Start of New Year Procedure::
90 * Releasing GDB:: 88 * Releasing GDB::
91 * Testsuite:: 89 * Testsuite::
92 * Hints:: 90 * Hints::
93 91
94 * GDB Observers:: @value{GDBN} Currently available observers 92 * GDB Observers:: @value{GDBN} Currently available observers
95 * GNU Free Documentation License:: The license for this documentation 93 * GNU Free Documentation License:: The license for this documentation
96 * Index:: 94 * Concept Index::
95 * Function and Variable Index::
97 @end menu 96 @end menu
98 97
99 @node Summary 98 @node Summary
100 @chapter Summary 99 @chapter Summary
101 100
102 @menu 101 @menu
103 * Requirements:: 102 * Requirements::
104 * Contributors:: 103 * Contributors::
105 @end menu 104 @end menu
106 105
(...skipping 4802 matching lines...) Expand 10 before | Expand all | Expand 10 after
4909 @item int gdbarch_deprecated_fp_regnum (@var{gdbarch}) 4908 @item int gdbarch_deprecated_fp_regnum (@var{gdbarch})
4910 @findex gdbarch_deprecated_fp_regnum 4909 @findex gdbarch_deprecated_fp_regnum
4911 If the frame pointer is in a register, use this function to return the 4910 If the frame pointer is in a register, use this function to return the
4912 number of that register. 4911 number of that register.
4913 4912
4914 @item int gdbarch_stab_reg_to_regnum (@var{gdbarch}, @var{stab_regnr}) 4913 @item int gdbarch_stab_reg_to_regnum (@var{gdbarch}, @var{stab_regnr})
4915 @findex gdbarch_stab_reg_to_regnum 4914 @findex gdbarch_stab_reg_to_regnum
4916 Use this function to convert stab register @var{stab_regnr} into @value{GDBN} 4915 Use this function to convert stab register @var{stab_regnr} into @value{GDBN}
4917 regnum. If not defined, no conversion will be done. 4916 regnum. If not defined, no conversion will be done.
4918 4917
4919 @item SYMBOL_RELOADING_DEFAULT
4920 @findex SYMBOL_RELOADING_DEFAULT
4921 The default value of the ``symbol-reloading'' variable. (Never defined in
4922 current sources.)
4923
4924 @item TARGET_CHAR_BIT 4918 @item TARGET_CHAR_BIT
4925 @findex TARGET_CHAR_BIT 4919 @findex TARGET_CHAR_BIT
4926 Number of bits in a char; defaults to 8. 4920 Number of bits in a char; defaults to 8.
4927 4921
4928 @item int gdbarch_char_signed (@var{gdbarch}) 4922 @item int gdbarch_char_signed (@var{gdbarch})
4929 @findex gdbarch_char_signed 4923 @findex gdbarch_char_signed
4930 Non-zero if @code{char} is normally signed on this architecture; zero if 4924 Non-zero if @code{char} is normally signed on this architecture; zero if
4931 it should be unsigned. 4925 it should be unsigned.
4932 4926
4933 The ISO C standard requires the compiler to treat @code{char} as 4927 The ISO C standard requires the compiler to treat @code{char} as
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
5842 @tab @code{- x} 5836 @tab @code{- x}
5843 @tab (unary minus) 5837 @tab (unary minus)
5844 @item @code{(foo) x} 5838 @item @code{(foo) x}
5845 @tab @code{(foo)x} 5839 @tab @code{(foo)x}
5846 @tab (cast) 5840 @tab (cast)
5847 @item @code{*x} 5841 @item @code{*x}
5848 @tab @code{* x} 5842 @tab @code{* x}
5849 @tab (pointer dereference) 5843 @tab (pointer dereference)
5850 @end multitable 5844 @end multitable
5851 5845
5846 Any two or more lines in code should be wrapped in braces, even if
5847 they are comments, as they look like separate statements:
5848
5849 @smallexample
5850 if (i)
5851 @{
5852 /* Return success. */
5853 return 0;
5854 @}
5855 @end smallexample
5856
5857 @noindent
5858 and not:
5859
5860 @smallexample
5861 if (i)
5862 /* Return success. */
5863 return 0;
5864 @end smallexample
5865
5852 @subsection Comments 5866 @subsection Comments
5853 5867
5854 @cindex comment formatting 5868 @cindex comment formatting
5855 The standard GNU requirements on comments must be followed strictly. 5869 The standard GNU requirements on comments must be followed strictly.
5856 5870
5857 Block comments must appear in the following form, with no @code{/*}- or 5871 Block comments must appear in the following form, with no @code{/*}- or
5858 @code{*/}-only lines, and no leading @code{*}: 5872 @code{*/}-only lines, and no leading @code{*}:
5859 5873
5860 @smallexample 5874 @smallexample
5861 /* Wait for control to return from inferior to debugger. If inferior 5875 /* Wait for control to return from inferior to debugger. If inferior
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
6791 @itemize @bullet 6805 @itemize @bullet
6792 @item 6806 @item
6793 file @file{top.c}, function @code{print_gdb_version} 6807 file @file{top.c}, function @code{print_gdb_version}
6794 @item 6808 @item
6795 file @file{gdbserver/server.c}, function @code{gdbserver_version} 6809 file @file{gdbserver/server.c}, function @code{gdbserver_version}
6796 @item 6810 @item
6797 file @file{gdbserver/gdbreplay.c}, function @code{gdbreplay_version} 6811 file @file{gdbserver/gdbreplay.c}, function @code{gdbreplay_version}
6798 @end itemize 6812 @end itemize
6799 6813
6800 @item 6814 @item
6801 Run the @file{copyright.sh} script to add the new year in the copyright 6815 Run the @file{copyright.py} Python script to add the new year in the copyright
6802 notices of most source files. This script requires Emacs 22 or later to 6816 notices of most source files. This script has been tested with Python
6803 be installed. 6817 2.6 and 2.7.
6804
6805 @item
6806 The new year also needs to be added manually in all other files that
6807 are not already taken care of by the @file{copyright.sh} script:
6808 @itemize @bullet
6809 @item
6810 @file{*.s}
6811 @item
6812 @file{*.f}
6813 @item
6814 @file{*.f90}
6815 @item
6816 @file{*.igen}
6817 @item
6818 @file{*.ac}
6819 @item
6820 @file{*.texi}
6821 @item
6822 @file{*.texinfo}
6823 @item
6824 @file{*.tex}
6825 @item
6826 @file{*.defs}
6827 @item
6828 @file{*.1}
6829 @end itemize
6830 6818
6831 @end itemize 6819 @end itemize
6832 6820
6833 @node Releasing GDB 6821 @node Releasing GDB
6834 6822
6835 @chapter Releasing @value{GDBN} 6823 @chapter Releasing @value{GDBN}
6836 @cindex making a new release of gdb 6824 @cindex making a new release of gdb
6837 6825
6838 @section Branch Commit Policy 6826 @section Branch Commit Policy
6839 6827
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
7682 7670
7683 @smallexample 7671 @smallexample
7684 make check RUNTESTFLAGS="GDB=/usr/bin/gdb GDBSERVER=/usr/bin/gdbserver" 7672 make check RUNTESTFLAGS="GDB=/usr/bin/gdb GDBSERVER=/usr/bin/gdbserver"
7685 @end smallexample 7673 @end smallexample
7686 7674
7687 @item @code{INTERNAL_GDBFLAGS} 7675 @item @code{INTERNAL_GDBFLAGS}
7688 7676
7689 When running the testsuite normally one doesn't want whatever is in 7677 When running the testsuite normally one doesn't want whatever is in
7690 @file{~/.gdbinit} to interfere with the tests, therefore the test harness 7678 @file{~/.gdbinit} to interfere with the tests, therefore the test harness
7691 passes @option{-nx} to @value{GDBN}. One also doesn't want any windowed 7679 passes @option{-nx} to @value{GDBN}. One also doesn't want any windowed
7692 version of @value{GDBN}, e.g., @command{gdbtui}, to run. 7680 version of @value{GDBN}, e.g., @samp{gdb -tui}, to run.
7693 This is achieved via @code{INTERNAL_GDBFLAGS}. 7681 This is achieved via @code{INTERNAL_GDBFLAGS}.
7694 7682
7695 @smallexample 7683 @smallexample
7696 set INTERNAL_GDBFLAGS "-nw -nx" 7684 set INTERNAL_GDBFLAGS "-nw -nx"
7697 @end smallexample 7685 @end smallexample
7698 7686
7699 This is all well and good, except when testing an installed @value{GDBN} 7687 This is all well and good, except when testing an installed @value{GDBN}
7700 that has been configured with @option{--with-system-gdbinit}. Here one 7688 that has been configured with @option{--with-system-gdbinit}. Here one
7701 does not want @file{~/.gdbinit} loaded but one may want the system 7689 does not want @file{~/.gdbinit} loaded but one may want the system
7702 @file{.gdbinit} file loaded. This can be achieved by pointing @code{$HOME} 7690 @file{.gdbinit} file loaded. This can be achieved by pointing @code{$HOME}
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
7838 On some operating systems (e.g.@: OpenBSD) the TTY layer expands tabs to 7826 On some operating systems (e.g.@: OpenBSD) the TTY layer expands tabs to
7839 spaces, so by the time @value{GDBN}'s output reaches expect the tab is gone. 7827 spaces, so by the time @value{GDBN}'s output reaches expect the tab is gone.
7840 7828
7841 The source language programs do @emph{not} need to be in a consistent 7829 The source language programs do @emph{not} need to be in a consistent
7842 style. Since @value{GDBN} is used to debug programs written in many different 7830 style. Since @value{GDBN} is used to debug programs written in many different
7843 styles, it's worth having a mix of styles in the testsuite; for 7831 styles, it's worth having a mix of styles in the testsuite; for
7844 instance, some @value{GDBN} bugs involving the display of source lines would 7832 instance, some @value{GDBN} bugs involving the display of source lines would
7845 never manifest themselves if the programs used GNU coding style 7833 never manifest themselves if the programs used GNU coding style
7846 uniformly. 7834 uniformly.
7847 7835
7836 Some testcase results need more detailed explanation:
7837
7838 @table @code
7839 @item KFAIL
7840 Known problem of @value{GDBN} itself. You must specify the @value{GDBN} bug
7841 report number like in these sample tests:
7842 @smallexample
7843 kfail "gdb/13392" "continue to marker 2"
7844 @end smallexample
7845 or
7846 @smallexample
7847 setup_kfail gdb/13392 "*-*-*"
7848 kfail "continue to marker 2"
7849 @end smallexample
7850
7851 @item XFAIL
7852 Known problem of environment. This typically includes @value{NGCC} but it
7853 includes also many other system components which cannot be fixed in the
7854 @value{GDBN} project. Sample test with sanity check not knowing the specific
7855 cause of the problem:
7856 @smallexample
7857 # On x86_64 it is commonly about 4MB.
7858 if @{$stub_size > 25000000@} @{
7859 xfail "stub size $stub_size is too large"
7860 return
7861 @}
7862 @end smallexample
7863
7864 You should provide bug report number for the failing component of the
7865 environment, if such bug report is available:
7866 @smallexample
7867 if @{[test_compiler_info @{gcc-[0-3]-*@}]
7868 || [test_compiler_info @{gcc-4-[0-5]-*@}]@} @{
7869 setup_xfail "gcc/46955" *-*-*
7870 @}
7871 gdb_test "python print ttype.template_argument(2)" "&C::c"
7872 @end smallexample
7873 @end table
7874
7875 @section Board settings
7876 In @value{GDBN} testsuite, the tests can be configured or customized in the boar d
7877 file by means of @dfn{Board Settings}. Each setting should be consulted by
7878 test cases that depend on the corresponding feature.
7879
7880 Here are the supported board settings:
7881
7882 @table @code
7883
7884 @item gdb,cannot_call_functions
7885 The board does not support inferior call, that is, invoking inferior functions
7886 in @value{GDBN}.
7887 @item gdb,can_reverse
7888 The board supports reverse execution.
7889 @item gdb,no_hardware_watchpoints
7890 The board does not support hardware watchpoints.
7891 @item gdb,nofileio
7892 @value{GDBN} is unable to intercept target file operations in remote and perform
7893 them on the host.
7894 @item gdb,noinferiorio
7895 The board is unable to provide I/O capability to the inferior.
7896 @c @item gdb,noresults
7897 @c NEED DOCUMENT.
7898 @item gdb,nosignals
7899 The board does not support signals.
7900 @item gdb,skip_huge_test
7901 Skip time-consuming tests on the board with slow connection.
7902 @item gdb,skip_float_tests
7903 Skip tests related to float points on target board.
7904 @item gdb,use_precord
7905 The board supports process record.
7906 @item gdb_server_prog
7907 The location of GDBserver. If GDBserver somewhere other than its default
7908 location is used in test, specify the location of GDBserver in this variable.
7909 The location is a file name of GDBserver that can be either absolute or
7910 relative to testsuite subdirectory in build directory.
7911 @item in_proc_agent
7912 The location of in-process agent. If in-process agent other than its default
7913 location is used in test, specify the location of in-process agent in
7914 this variable. The location is a file name of in-process agent that can be
7915 either absolute or relative to testsuite subdirectory in build directory.
7916 @item noargs
7917 @value{GDBN} does not support argument passing for inferior.
7918 @item no_long_long
7919 The board does not support type @code{long long}.
7920 @c @item use_cygmon
7921 @c NEED DOCUMENT.
7922 @item use_gdb_stub
7923 The tests are running with gdb stub.
7924 @end table
7925
7848 @node Hints 7926 @node Hints
7849 7927
7850 @chapter Hints 7928 @chapter Hints
7851 7929
7852 Check the @file{README} file, it often has useful information that does not 7930 Check the @file{README} file, it often has useful information that does not
7853 appear anywhere else in the directory. 7931 appear anywhere else in the directory.
7854 7932
7855 @menu 7933 @menu
7856 * Getting Started:: Getting started working on @value{GDBN} 7934 * Getting Started:: Getting started working on @value{GDBN}
7857 * Debugging GDB:: Debugging @value{GDBN} with itself 7935 * Debugging GDB:: Debugging @value{GDBN} with itself
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
7945 @section Debugging @value{GDBN} with itself 8023 @section Debugging @value{GDBN} with itself
7946 @cindex debugging @value{GDBN} 8024 @cindex debugging @value{GDBN}
7947 8025
7948 If @value{GDBN} is limping on your machine, this is the preferred way to get it 8026 If @value{GDBN} is limping on your machine, this is the preferred way to get it
7949 fully functional. Be warned that in some ancient Unix systems, like 8027 fully functional. Be warned that in some ancient Unix systems, like
7950 Ultrix 4.2, a program can't be running in one process while it is being 8028 Ultrix 4.2, a program can't be running in one process while it is being
7951 debugged in another. Rather than typing the command @kbd{@w{./gdb 8029 debugged in another. Rather than typing the command @kbd{@w{./gdb
7952 ./gdb}}, which works on Suns and such, you can copy @file{gdb} to 8030 ./gdb}}, which works on Suns and such, you can copy @file{gdb} to
7953 @file{gdb2} and then type @kbd{@w{./gdb ./gdb2}}. 8031 @file{gdb2} and then type @kbd{@w{./gdb ./gdb2}}.
7954 8032
7955 When you run @value{GDBN} in the @value{GDBN} source directory, it will read a 8033 When you run @value{GDBN} in the @value{GDBN} source directory, it will read
7956 @file{.gdbinit} file that sets up some simple things to make debugging 8034 @file{gdb-gdb.gdb} file (plus possibly @file{gdb-gdb.py} file) that sets up
7957 gdb easier. The @code{info} command, when executed without a subcommand 8035 some simple things to make debugging gdb easier. The @code{info} command, when
7958 in a @value{GDBN} being debugged by gdb, will pop you back up to the top level 8036 executed without a subcommand in a @value{GDBN} being debugged by gdb, will pop
7959 gdb. See @file{.gdbinit} for details. 8037 you back up to the top level gdb. See @file{gdb-gdb.gdb} for details.
7960 8038
7961 If you use emacs, you will probably want to do a @code{make TAGS} after 8039 If you use emacs, you will probably want to do a @code{make TAGS} after
7962 you configure your distribution; this will put the machine dependent 8040 you configure your distribution; this will put the machine dependent
7963 routines for your local machine where they will be accessed first by 8041 routines for your local machine where they will be accessed first by
7964 @kbd{M-.} 8042 @kbd{M-.}
7965 8043
7966 Also, make sure that you've either compiled @value{GDBN} with your local cc, or 8044 Also, make sure that you've either compiled @value{GDBN} with your local cc, or
7967 have run @code{fixincludes} if you are compiling with gcc. 8045 have run @code{fixincludes} if you are compiling with gcc.
7968 8046
7969 @section Submitting Patches 8047 @section Submitting Patches
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
8046 supported and then switches the current architecture to each of those to get 8124 supported and then switches the current architecture to each of those to get
8047 information about the architecture. The test results are stored in log files 8125 information about the architecture. The test results are stored in log files
8048 in the directory the script was called from. 8126 in the directory the script was called from.
8049 8127
8050 @include observer.texi 8128 @include observer.texi
8051 8129
8052 @node GNU Free Documentation License 8130 @node GNU Free Documentation License
8053 @appendix GNU Free Documentation License 8131 @appendix GNU Free Documentation License
8054 @include fdl.texi 8132 @include fdl.texi
8055 8133
8056 @node Index 8134 @node Concept Index
8057 @unnumbered Index 8135 @unnumbered Concept Index
8058 8136
8059 @printindex cp 8137 @printindex cp
8060 8138
8139 @node Function and Variable Index
8140 @unnumbered Function and Variable Index
8141
8142 @printindex fn
8143
8061 @bye 8144 @bye
OLDNEW
« no previous file with comments | « gdb/doc/gdbint.info-2 ('k') | gdb/doc/observer.texi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698