config/debug/gdb.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jun 19 15:33:33 2008 +0000 (2008-06-19)
changeset 583 44b87fb3f0d3
parent 573 2a1803b98186
child 596 d1651a3f42a3
permissions -rw-r--r--
A bunch of fixes/improvements to the gdb build:
- allow native builds (both shared and static)
- fix enabling threads
- better handle the gdbserver case
- introduce the ncurses library to allow native builds
- re-order config options adequately

/trunk/scripts/build/debug/300-gdb.sh | 126 79 47 0 ++++++++++++++++++++++++++---------------
/trunk/config/debug/gdb.in | 45 33 12 0 +++++++++++----
2 files changed, 112 insertions(+), 59 deletions(-)
     1 # GDB menu
     2 
     3 menuconfig GDB
     4     bool
     5     prompt "gdb"
     6     default n
     7     help
     8       Enable gdb for the target
     9 
    10 if GDB
    11 
    12 config GDB_CROSS
    13     bool
    14     prompt "Cross-gdb"
    15     default y
    16     select GDB_GDBSERVER
    17     help
    18       Build and install a cross-gdb for the target, to run on host.
    19 
    20 config GDB_CROSS_STATIC
    21     bool
    22     prompt "Build a static cross gdb"
    23     default n
    24     depends on GDB_CROSS
    25     help
    26       A static cross gdb can be usefull if you debug on a machine that is
    27       not the one that is used to compile the toolchain.
    28 
    29       That way, you can share the cross-gdb without installing a toolchain
    30       on every machine that will be used to debug target programs.
    31 
    32 config GDB_NATIVE
    33     bool
    34     prompt "Native gdb"
    35     default n
    36     select GDB_GDBSERVER
    37     help
    38       Build and install a native gdb for the target, to run on the target.
    39 
    40 config GDB_NATIVE_STATIC
    41     bool
    42     prompt "Build a static native gdb"
    43     default n
    44     depends on GDB_NATIVE
    45     help
    46       In case you have trouble with dynamic loading of shared libraries,
    47       you will find that a static gdb comes in handy.
    48 
    49 config GDB_GDBSERVER
    50     bool
    51     prompt "gdbserver"
    52     default n
    53     help
    54       Build and install a gdbserver for the target, to run on the target.
    55 
    56 config GDB_GDBSERVER_STATIC
    57     bool
    58     prompt "Build a static gdbserver"
    59     default n
    60     depends on GDB_GDBSERVER
    61     help
    62       In case you have trouble with dynamic loading of shared libraries,
    63       you will find that a static gdbserver comes in handy.
    64 
    65 choice
    66     bool
    67     prompt "gdb version"
    68     depends on GDB_CROSS || GDB_NATIVE || GDB_GDBSERVER
    69 
    70 config GDB_V_snapshot
    71     bool
    72     prompt "snapshot (EXPERIMENTAL)"
    73     depends on EXPERIMENTAL
    74 
    75 config GDB_V_6_4
    76     bool
    77     prompt "6.4 (OBSOLETE)"
    78     depends on OBSOLETE
    79 
    80 config GDB_V_6_5
    81     bool
    82     prompt "6.5"
    83 
    84 config GDB_V_6_6
    85     bool
    86     prompt "6.6"
    87 
    88 config GDB_V_6_7
    89     bool
    90     prompt "6.7 (EXPERIMENTAL)"
    91     depends on EXPERIMENTAL
    92 
    93 config GDB_V_6_7_1
    94     bool
    95     prompt "6.7.1 (EXPERIMENTAL)"
    96     depends on EXPERIMENTAL
    97 
    98 config GDB_V_6_8
    99     bool
   100     prompt "6.8 (EXPERIMENTAL)"
   101     depends on EXPERIMENTAL
   102 
   103 # CT_INSERT_VERSION_ABOVE
   104 # Don't remove above line!
   105 endchoice
   106 
   107 config GDB_VERSION
   108     string
   109     default "snapshot" if GDB_V_snapshot
   110     default "6.4" if GDB_V_6_4
   111     default "6.5" if GDB_V_6_5
   112     default "6.6" if GDB_V_6_6
   113     default "6.7" if GDB_V_6_7
   114     default "6.7.1" if GDB_V_6_7_1
   115     default "6.8" if GDB_V_6_8
   116 # CT_INSERT_VERSION_STRING_ABOVE
   117 # Don't remove above line!
   118 
   119 if GDB_NATIVE
   120 
   121 comment "Native gdb needs the ncurses library on the target"
   122 
   123 choice
   124     bool
   125     prompt "ncurses version"
   126 
   127 config NCURSES_V_4_2
   128     bool
   129     prompt "4.2"
   130 
   131 config NCURSES_V_5_6
   132     bool
   133     prompt "5.6"
   134 
   135 endchoice
   136 
   137 config NCURSES_VERSION
   138     string
   139     default "4.2" if NCURSES_V_4_2
   140     default "5.6" if NCURSES_V_5_6
   141 
   142 endif # GDB_NATIVE --> ncurses
   143 
   144 endif