Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [5.1/rfc] Don't print ``(MI_OUT)'' during startup
@ 2001-10-20 18:23 Andrew Cagney
  2001-10-21 10:10 ` Fernando Nasser
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2001-10-20 18:23 UTC (permalink / raw)
  To: gdb-patches

Hello,

Given MI is enabled by default, I don't think it makes much sense to
print ``<version> (MI_OUT)''.  The attached eliminates that output
and updates the testsuite to match.

Thoughts, if there are no objections, I'll commit it to the 5.1 branch.

enjoy,
Andrew


Index: ChangeLog
2001-10-20  Andrew Cagney  <ac131313@redhat.com>

	* top.c (print_gdb_version): Do not print ``(MI_OUT)''.  MI
	interface is always enabled.

Index: testsuite/ChangeLog
2001-10-20  Andrew Cagney  <ac131313@redhat.com>

	* lib/mi-support.exp (mi_gdb_start): Don't require MI_OUT when
	checking MI enabled.

Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.41.2.1
diff -p -r1.41.2.1 top.c
*** top.c	2001/08/14 20:24:39	1.41.2.1
--- top.c	2001/10/21 01:19:16
*************** print_gdb_version (struct ui_file *strea
*** 1228,1239 ****
       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
  
    /* Second line is a copyright notice. */
  
--- 1228,1234 ----
Index: testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.8
diff -p -r1.8 mi-support.exp
*** mi-support.exp	2001/06/27 17:27:08	1.8
--- mi-support.exp	2001/10/21 01:19:19
*************** proc mi_gdb_start { } {
*** 117,129 ****
  	return 1;
      }
      gdb_expect {
- 	-re ".*MI_OUT.*$mi_gdb_prompt$" {
- 	    verbose "GDB initialized."
- 	}
  	-re ".*$mi_gdb_prompt$" {
! 	    untested "Skip mi tests (output not in headless format)."
! 	    remote_close host;
! 	    return -1;
  	}
  	-re ".*$gdb_prompt $" {
  	    untested "Skip mi tests (got non-mi prompt)."
--- 117,124 ----
  	return 1;
      }
      gdb_expect {
  	-re ".*$mi_gdb_prompt$" {
! 	    verbose "GDB initialized."
  	}
  	-re ".*$gdb_prompt $" {
  	    untested "Skip mi tests (got non-mi prompt)."


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [5.1/rfc] Don't print ``(MI_OUT)'' during startup
  2001-10-20 18:23 [5.1/rfc] Don't print ``(MI_OUT)'' during startup Andrew Cagney
@ 2001-10-21 10:10 ` Fernando Nasser
       [not found]   ` <3BD3057F.8070009@cygnus.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Fernando Nasser @ 2001-10-21 10:10 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

Andrew Cagney wrote:
> 
> Hello,
> 
> Given MI is enabled by default, I don't think it makes much sense to
> print ``<version> (MI_OUT)''.  The attached eliminates that output
> and updates the testsuite to match.
> 
> Thoughts, if there are no objections, I'll commit it to the 5.1 branch.
> 
> enjoy,
> Andrew
> 

What if someone disables the MI?  
How will you prevent the gdb.mi tests to run?

Fernando


> Index: ChangeLog
> 2001-10-20  Andrew Cagney  <ac131313@redhat.com>
> 
>         * top.c (print_gdb_version): Do not print ``(MI_OUT)''.  MI
>         interface is always enabled.
> 
> Index: testsuite/ChangeLog
> 2001-10-20  Andrew Cagney  <ac131313@redhat.com>
> 
>         * lib/mi-support.exp (mi_gdb_start): Don't require MI_OUT when
>         checking MI enabled.
> 
> Index: top.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/top.c,v
> retrieving revision 1.41.2.1
> diff -p -r1.41.2.1 top.c
> *** top.c       2001/08/14 20:24:39     1.41.2.1
> --- top.c       2001/10/21 01:19:16
> *************** print_gdb_version (struct ui_file *strea
> *** 1228,1239 ****
>        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
> 
>     /* Second line is a copyright notice. */
> 
> --- 1228,1234 ----
> Index: testsuite/lib/mi-support.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
> retrieving revision 1.8
> diff -p -r1.8 mi-support.exp
> *** mi-support.exp      2001/06/27 17:27:08     1.8
> --- mi-support.exp      2001/10/21 01:19:19
> *************** proc mi_gdb_start { } {
> *** 117,129 ****
>         return 1;
>       }
>       gdb_expect {
> -       -re ".*MI_OUT.*$mi_gdb_prompt$" {
> -           verbose "GDB initialized."
> -       }
>         -re ".*$mi_gdb_prompt$" {
> !           untested "Skip mi tests (output not in headless format)."
> !           remote_close host;
> !           return -1;
>         }
>         -re ".*$gdb_prompt $" {
>             untested "Skip mi tests (got non-mi prompt)."
> --- 117,124 ----
>         return 1;
>       }
>       gdb_expect {
>         -re ".*$mi_gdb_prompt$" {
> !           verbose "GDB initialized."
>         }
>         -re ".*$gdb_prompt $" {
>             untested "Skip mi tests (got non-mi prompt)."

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [5.1/rfc] Don't print ``(MI_OUT)'' during startup
       [not found]   ` <3BD3057F.8070009@cygnus.com>
@ 2001-10-21 11:16     ` Fernando Nasser
  0 siblings, 0 replies; 3+ messages in thread
From: Fernando Nasser @ 2001-10-21 11:16 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

Andrew Cagney wrote:
> 
> Also if the MI isn't
> linked in, GDB will report that the interpreter ``mi'' is unknown.
> 

Yes, the following pattern will do it.

	-re ".*Interpreter `mi' unrecognized." {
	    untested "Skip mi tests (not compiled with mi support)."
	    remote_close host;
	    return -1;
	}

Thanks.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-10-21 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-20 18:23 [5.1/rfc] Don't print ``(MI_OUT)'' during startup Andrew Cagney
2001-10-21 10:10 ` Fernando Nasser
     [not found]   ` <3BD3057F.8070009@cygnus.com>
2001-10-21 11:16     ` Fernando Nasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox