This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFA: [configure.in] Turn on UI_OUT code


Andrew Cagney wrote:
> 
> My only thought is to do this in two steps:
> 
>         o       enable the UI_OUT code
>                 (now)
> 

Done.


>         o       enable the MI
>                 (in a week, if there really are no regressions)
> 

Jan 2nd or 3rd.



Here is the change log and patch:


        * Makefile.in (UIOUT_CFLAGS): New macro. CFLAGS needed for uiout code
        to be compiled.  Defines UI_OUT.
        (SUBDIR_MI_CFLAGS): Defines MI_OUT, not UI_OUT.
        (INTERNAL_WARN_CFLAGS): Also include UIOUT_CFLAGS.
        * configure.in (UIOUT_CFLAGS): New configuration variable.
        (--with-uiout): New configuration option.  Causes uiout code to
        be compiled, instead of the old *printf one.
        * configure: Regenerate.
        * top.c (print_gdb_version): Test for and print MI_OUT, not UI_OUT.


        * lib/mi-support.exp (mi_gdb_start): Test for MI_OUT, not UI_OUT.



Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.53
diff -c -p -r1.53 Makefile.in
*** Makefile.in 2000/12/11 22:36:26     1.53
--- Makefile.in 2000/12/20 21:08:17
*************** LIBIBERTY = ../libiberty/libiberty.a
*** 106,111 ****
--- 106,114 ----
  MMALLOC = @MMALLOC@
  MMALLOC_CFLAGS = @MMALLOC_CFLAGS@
  
+ # Configured by the --with-uiout option to configure.
+ UIOUT_CFLAGS = @UIOUT_CFLAGS@
+ 
  # We are using our own version of REGEX now to be consistent across
  # machines.
  REGEX = @REGEX@
*************** SUBDIR_MI_INITS = \
*** 169,175 ****
        mi/mi-cmds.c mi/mi-parse.c mi/mi-main.c mi/mi-out.c
  SUBDIR_MI_LDFLAGS=
  SUBDIR_MI_CFLAGS= \
!       -DUI_OUT=1
  SUBDIR_MI_ALL=
  SUBDIR_MI_CLEAN=
  SUBDIR_MI_INSTALL=
--- 172,178 ----
        mi/mi-cmds.c mi/mi-parse.c mi/mi-main.c mi/mi-out.c
  SUBDIR_MI_LDFLAGS=
  SUBDIR_MI_CFLAGS= \
!       -DMI_OUT=1
  SUBDIR_MI_ALL=
  SUBDIR_MI_CLEAN=
  SUBDIR_MI_INSTALL=
*************** INTERNAL_WARN_CFLAGS = \
*** 318,324 ****
        $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
        $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
        $(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
!       $(INTL_CFLAGS) $(ENABLE_CFLAGS) \
        $(GDB_WARN_CFLAGS)
  INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
  
--- 321,327 ----
        $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
        $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
        $(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
!       $(INTL_CFLAGS) $(ENABLE_CFLAGS) $(UIOUT_CFLAGS) \
        $(GDB_WARN_CFLAGS)
  INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
  
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.51
diff -c -p -r1.51 configure.in
*** configure.in        2000/12/11 22:36:26     1.51
--- configure.in        2000/12/20 21:08:18
*************** case ${enable_gdbmi} in
*** 525,530 ****
--- 525,553 ----
      ;;
  esac
  
+ # Configure UI_OUT by default (before 5.2 it can be disabled)
+ # It must be configured if gdbmi is configured
+ 
+ UIOUT_CFLAGS=
+ AC_SUBST(UIOUT_CFLAGS)
+ 
+ AC_ARG_WITH(uiout,
+ [  --with-uiout          Use new uiout functions intead of *printf's],
+ [case "${withval}" in
+   yes)  want_uiout=true ;;
+   no)   if test $enable_gdbmi = yes; then
+           AC_MSG_ERROR(uiout is needed for MI and cannot be disabled)
+         else
+            want_uiout=false
+         fi ;;
+   *)    AC_MSG_ERROR(bad value ${withval} for GDB with-uiout option) ;;
+ esac],
+ [want_uiout=true])dnl
+ 
+ if test $want_uiout = true; then
+    UIOUT_CFLAGS="-DUI_OUT=1"
+ fi
+ 
  AC_ARG_ENABLE(tui,
  [  --enable-tui            Enable full-screen terminal user interface],
  [
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.25
diff -c -p -r1.25 top.c
*** top.c       2000/12/15 01:01:50     1.25
--- top.c       2000/12/20 21:08:19
*************** print_gdb_version (struct ui_file *strea
*** 1385,1393 ****
       program to parse, and is just canonical program name and version
       number, which starts after last space. */
  
! #ifdef UI_OUT
    /* Print it console style until a format is defined */
!   fprintf_filtered (stream, "GNU gdb %s (UI_OUT)\n", version);
  #else
    fprintf_filtered (stream, "GNU gdb %s\n", version);
  #endif
--- 1385,1393 ----
       program to parse, and is just canonical program name and version
       number, which starts after last space. */
  
! #ifdef MI_OUT
    /* Print it console style until a format is defined */
!   fprintf_filtered (stream, "GNU gdb %s (MI_OUT)\n", version);
  #else
    fprintf_filtered (stream, "GNU gdb %s\n", version);
  #endif
Index: testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.2
diff -c -p -r1.2 mi-support.exp
*** mi-support.exp      2000/03/04 03:01:38     1.2
--- mi-support.exp      2000/12/20 21:08:21
*************** proc mi_gdb_start { } {
*** 117,123 ****
        return 1;
      }
      gdb_expect {
!       -re ".*UI_OUT.*$mi_gdb_prompt$" {
            verbose "GDB initialized."
        }
        -re ".*$mi_gdb_prompt$" {
--- 117,123 ----
        return 1;
      }
      gdb_expect {
!       -re ".*MI_OUT.*$mi_gdb_prompt$" {
            verbose "GDB initialized."
        }
        -re ".*$mi_gdb_prompt$" {


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]