Ticket #4738: haiku_enable_gdbtui.diff

File haiku_enable_gdbtui.diff, 3.2 KB (added by v, 15 years ago)

patch to enable gdb's tui mode

  • src/bin/gdb/gdb/config-x86/init.c

     
    103103extern initialize_file_ftype _initialize_mi_cmd_env;
    104104extern initialize_file_ftype _initialize_mi_interp;
    105105extern initialize_file_ftype _initialize_mi_main;
     106extern initialize_file_ftype _initialize_tui_hooks;
     107extern initialize_file_ftype _initialize_tui_interp;
     108extern initialize_file_ftype _initialize_tui_layout;
     109extern initialize_file_ftype _initialize_tui_out;
     110extern initialize_file_ftype _initialize_tui_regs;
     111extern initialize_file_ftype _initialize_tui_stack;
     112extern initialize_file_ftype _initialize_tui_win;
    106113void
    107114initialize_all_files (void)
    108115{
     
    207214  _initialize_mi_cmd_env ();
    208215  _initialize_mi_interp ();
    209216  _initialize_mi_main ();
     217  _initialize_tui_hooks ();
     218  _initialize_tui_interp ();
     219  _initialize_tui_layout ();
     220  _initialize_tui_out ();
     221  _initialize_tui_regs ();
     222  _initialize_tui_stack ();
     223  _initialize_tui_win ();
    210224}
  • src/bin/gdb/gdb/config-x86/config.h

     
    310310#define HAVE_MEMORY_H 1
    311311
    312312/* Define if you have the <ncurses.h> header file.  */
    313 /* #undef HAVE_NCURSES_H */
     313#define HAVE_NCURSES_H 1
    314314
    315315/* Define if you have the <ncurses/ncurses.h> header file.  */
    316316/* #undef HAVE_NCURSES_NCURSES_H */
  • src/bin/gdb/gdb/Jamfile

     
    1010    # Use gawk's libintl for the time being.
    1111    # TODO: Put a current version of intl ot src/libs and build a static lib
    1212    # all interested apps can link against.
     13UseLibraryHeaders ncurses ;
    1314UsePrivateHeaders debug ;
    1415
    1516SubDirCcFlags -DHAVE_CONFIG_H -DLOCALEDIR=\\\"/etc/locale\\\"
    16     -DMI_OUT=1 ;
     17    -DMI_OUT=1 -DTUI=1 ;
    1718
    1819# filter warnings we don't want here
    1920TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
     
    2223SEARCH_SOURCE += [ FDirName $(SUBDIR) cli ] ;
    2324SEARCH_SOURCE += [ FDirName $(SUBDIR) mi ] ;
    2425SEARCH_SOURCE += [ FDirName $(SUBDIR) signals ] ;
     26SEARCH_SOURCE += [ FDirName $(SUBDIR) tui ] ;
    2527
    2628# architecture specific sources
    2729local gdbHaikuArchTargetSources ;
     
    215217    mi-symbol-cmds.c
    216218;
    217219
     220local gdbTUISources =
     221    tui-command.c
     222    tui-data.c
     223    tui-disasm.c
     224    tui-file.c
     225    tui-hooks.c
     226    tui-interp.c
     227    tui-io.c
     228    tui-layout.c
     229    tui-out.c
     230    tui-regs.c
     231    tui-source.c
     232    tui-stack.c
     233    tui-win.c
     234    tui-windata.c
     235    tui-wingeneral.c
     236    tui-winsource.c
     237    tui.c
     238;
     239
    218240local gdbHaikuTargetSources =
    219241    haiku-tdep.c
    220242    solib.c
     
    232254    $(gdbBaseSources)
    233255    $(gdbGeneratedSources)
    234256    $(gdbHostSources)
     257    $(gdbTUISources)
    235258    $(gdbHaikuTargetSources)
    236259    $(gdbHaikuNativeSources)
    237260    $(gdbHaikuArchTargetSources)
     
    257280    <gdb>libreadline.a
    258281    <gawk>libintl.a # use gawk's libintl for the time being
    259282
    260     libtermcap.a
     283#   libtermcap.a
     284    libncurses.a
    261285
    262286    libroot.so
    263287    libdebug.so