Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [RFC] gdb.mi tests
@ 2008-03-28 15:24 Aleksandar Ristovski
  2008-03-28 15:59 ` Daniel Jacobowitz
  2008-03-28 16:00 ` Daniel Jacobowitz
  0 siblings, 2 replies; 12+ messages in thread
From: Aleksandar Ristovski @ 2008-03-28 15:24 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

Daniel Jacobowitz wrote:
> On Wed, Mar 12, 2008 at 03:18:15PM -0400, Aleksandar Ristovski wrote:
>> Attached working diff. Comments welcome.
> 
> I think this patch is OK, if you add a changelog entry for it.  Do
> you have write access?  If not, would you like to?
> 

In the context of this thread, I have reduced the originally proposed diff.
Now 
it is a simple change in mi-support.exp, diff attached.

I gave up the removal of "load_lib mi-support.exp" from all tests since, as 
Daniel pointed out, the overriding can still be done by loading the file in
your 
board file, and after the load_lib statement redefining the functions of 
interest; load_lib makes sure to not reload already loaded file.

Leaving "load_lib mi-support.exp" maybe makes it a bit more clear what file 
contains functions that can be overridden.

Thanks,

Aleksandar Ristovski
QNX Software Systems



2008-03-28  Aleksandar Ristovski  <aristovski@qnx.com>

	* lib/mi-support.exp: Rename mi_gdb_start to default_mi_gdb_start
and
	add mi_gdb_start to simply call the default one. Brings mi-support
	in line with gdb.exp.



[-- Attachment #2: mi-support.diff --]
[-- Type: text/plain, Size: 1492 bytes --]

Index: gdb/testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.51
diff -u -p -r1.51 mi-support.exp
--- gdb/testsuite/lib/mi-support.exp	29 Jan 2008 19:36:58 -0000	1.51
+++ gdb/testsuite/lib/mi-support.exp	28 Mar 2008 15:07:52 -0000
@@ -84,7 +84,7 @@ proc mi_uncatched_gdb_exit {} {
 }
 
 #
-# mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure
+# default_mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure
 #
 # INFERIOR_PTY should be set to separate-inferior-tty to have the inferior work 
 # with it's own PTY. If set to same-inferior-tty, the inferior shares GDB's PTY. 
@@ -94,7 +94,7 @@ proc mi_uncatched_gdb_exit {} {
 # tests on different hosts all using the same server, things can
 # get really slow.  Give gdb at least 3 minutes to start up.
 #
-proc mi_gdb_start { args } {
+proc default_mi_gdb_start { args } {
     global verbose
     global GDB
     global GDBFLAGS
@@ -230,6 +230,14 @@ proc mi_gdb_start { args } {
     return 0;
 }
 
+#
+# Overridable function. You can override this function in your
+# baseboard file.
+# 
+proc mi_gdb_start { args } {
+  return [default_mi_gdb_start $args]
+}
+
 # Many of the tests depend on setting breakpoints at various places and
 # running until that breakpoint is reached.  At times, we want to start
 # with a clean-slate with respect to breakpoints, so this utility proc 

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

* Re: [RFC] gdb.mi tests
  2008-03-28 15:24 [RFC] gdb.mi tests Aleksandar Ristovski
@ 2008-03-28 15:59 ` Daniel Jacobowitz
  2008-03-28 16:00 ` Daniel Jacobowitz
  1 sibling, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2008-03-28 15:59 UTC (permalink / raw)
  To: Aleksandar Ristovski; +Cc: gdb-patches

On Fri, Mar 28, 2008 at 11:24:27AM -0400, Aleksandar Ristovski wrote:
> 2008-03-28  Aleksandar Ristovski  <aristovski@qnx.com>
> 
> 	* lib/mi-support.exp: Rename mi_gdb_start to default_mi_gdb_start
> and
> 	add mi_gdb_start to simply call the default one. Brings mi-support
> 	in line with gdb.exp.

This is OK.  The changelog entry should describe the functions which
changed; if you want to include an overall "purpose of this change"
comment, it goes at the top.  Like this:

	Bring mi-support in line with gdb.exp.
	* lib/mi-support.exp (default_mi_gdb_start): Rename from mi_gdb_start.
	(mi_gdb_start): New function.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [RFC] gdb.mi tests
  2008-03-28 15:24 [RFC] gdb.mi tests Aleksandar Ristovski
  2008-03-28 15:59 ` Daniel Jacobowitz
@ 2008-03-28 16:00 ` Daniel Jacobowitz
  1 sibling, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2008-03-28 16:00 UTC (permalink / raw)
  To: Aleksandar Ristovski; +Cc: gdb-patches

By the way, since you now have write access, please add yourself
to gdb/MAINTAINERS in the write-after-approval section.  Thanks.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [RFC] gdb.mi tests
@ 2008-03-28 16:16 Aleksandar Ristovski
  0 siblings, 0 replies; 12+ messages in thread
From: Aleksandar Ristovski @ 2008-03-28 16:16 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

Daniel Jacobowitz wrote:
> By the way, since you now have write access, please add yourself
> to gdb/MAINTAINERS in the write-after-approval section.  Thanks.
>
>   
2008-03-28  Aleksandar Ristovski  <aristovski@qnx.com>

    * MAINTAINERS: Added myself.





[-- Attachment #2: MAINTAINERS.diff --]
[-- Type: text/plain, Size: 628 bytes --]

Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.391
diff -u -p -r1.391 MAINTAINERS
--- MAINTAINERS	7 Mar 2008 11:17:45 -0000	1.391
+++ MAINTAINERS	28 Mar 2008 16:09:10 -0000
@@ -546,6 +546,7 @@ Denis Pilat					denis.pilat@st.com
 Vladimir Prus                                   vladimir@codesourcery.com
 Qinwei						qinwei@sunnorth.com.cn
 Frederic Riss					frederic.riss@st.com
+Aleksandar Ristovski				aristovski@qnx.com
 Tom Rix						trix@redhat.com
 Nick Roberts					nickrob@snap.net.nz
 Bob Rossi 					bob_rossi@cox.net

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

* Re: [RFC] gdb.mi tests
  2008-03-12 19:18 ` Aleksandar Ristovski
  2008-03-12 19:25   ` Vladimir Prus
@ 2008-03-21 15:07   ` Daniel Jacobowitz
  1 sibling, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2008-03-21 15:07 UTC (permalink / raw)
  To: Aleksandar Ristovski; +Cc: gdb-patches

On Wed, Mar 12, 2008 at 03:18:15PM -0400, Aleksandar Ristovski wrote:
> Attached working diff. Comments welcome.

I think this patch is OK, if you add a changelog entry for it.  Do
you have write access?  If not, would you like to?

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [RFC] gdb.mi tests
  2008-03-12 21:05         ` Daniel Jacobowitz
@ 2008-03-14 18:07           ` Aleksandar Ristovski
  0 siblings, 0 replies; 12+ messages in thread
From: Aleksandar Ristovski @ 2008-03-14 18:07 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Vladimir Prus, gdb-patches

Daniel Jacobowitz wrote:
> On Wed, Mar 12, 2008 at 04:49:08PM -0400, Aleksandar Ristovski wrote:
>> This means that the order in which files are loaded matters and the latter 
>> in the process a file gets loaded, it carries more 'overriding' 
>> capabilities. Therefore, first files loaded should be very generic, going 
>> towards customization files.
> 
> Yes.  But load_lib will not reload an already loaded file - we have
> some board files which check if $tool == "gdb", and load_lib
> mi-support.exp themselves, and use "rename".  I didn't say it was
> pretty or the right way!
> 

True. It means that load_lib mi-support.exp can safely stay in the testcases, 
and who needs to override something from there should add 'load_lib 
mi-support.exp' in their baseboard file and then rewrite the function (or use 
rename) after load_lib.

I would still like to see changes to mi-support.exp go in to make it more 
in-line with gdb.exp; I think "rename" would be avoided in most of the cases.

Nothing critical though...


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

* Re: [RFC] gdb.mi tests
  2008-03-12 20:49       ` Aleksandar Ristovski
@ 2008-03-12 21:05         ` Daniel Jacobowitz
  2008-03-14 18:07           ` Aleksandar Ristovski
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2008-03-12 21:05 UTC (permalink / raw)
  To: Aleksandar Ristovski; +Cc: Vladimir Prus, gdb-patches

On Wed, Mar 12, 2008 at 04:49:08PM -0400, Aleksandar Ristovski wrote:
> This means that the order in which files are loaded matters and the latter 
> in the process a file gets loaded, it carries more 'overriding' 
> capabilities. Therefore, first files loaded should be very generic, going 
> towards customization files.

Yes.  But load_lib will not reload an already loaded file - we have
some board files which check if $tool == "gdb", and load_lib
mi-support.exp themselves, and use "rename".  I didn't say it was
pretty or the right way!

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [RFC] gdb.mi tests
  2008-03-12 19:34     ` Daniel Jacobowitz
@ 2008-03-12 20:49       ` Aleksandar Ristovski
  2008-03-12 21:05         ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: Aleksandar Ristovski @ 2008-03-12 20:49 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Vladimir Prus, gdb-patches

Daniel Jacobowitz wrote:
> On Wed, Mar 12, 2008 at 10:25:12PM +0300, Vladimir Prus wrote:
>> Aleksandar Ristovski wrote:
>>
>>>> Something like the diffs attached (I manually removed some things from my diff
>>>> so the diff may not be patchable, but it should be sufficient to illustrate what
>>>> am I talking about.
>>>>
>>> Attached working diff. Comments welcome.
>> I don't have any objections to this course of action, if this simplifies
>> your testing.
>>
>> But just for the record, can you tell how you override mi_gdb_start? Of course,
>> assuming it's not some proprietary information.
> 
> FWIW, I tried something similar long ago and Elena preferred it the
> way it is - you'll see that sid and gdbserver target support is also
> in mi-support.exp, not in config/ with the other pieces.
> 
>   http://sources.redhat.com/ml/gdb-patches/2002-07/msg00227.html
> 
> However, CodeSourcery's test harness goes to some trouble to work
> around this - you still can, you just need to be handy with TCL to do
> it.  We load mi-support.exp in our board files and use "rename".
> Which is a bit silly to have to do.
> 

The way I understand it, tcl is dynamically scoped language (I hope I used the 
right term) and will, effectively override a definition with the subsequent 
redefinition.

This means that the order in which files are loaded matters and the latter in 
the process a file gets loaded, it carries more 'overriding' capabilities. 
Therefore, first files loaded should be very generic, going towards 
customization files.

If tests are run with --verbose flag, the order of loaded files is clear:

/usr/share/dejagnu/runtest.exp as main test driver$
site.exp (generated by the makefile, specifies tool name and such)
site.exp (global site.exp as defined by DEJAGNU env. var - optional, I use it to 
add my baseboard directory)
then follow bunch of dejagnu framework files loaded by runtest.exp:
Loading /usr/share/dejagnu/utils.exp
Loading /usr/share/dejagnu/framework.exp
...
Loading /usr/share/dejagnu/libgloss.exp
Loading library file ../../../gdb/testsuite/lib/gdb.exp

After that,
boardfile is loaded and finally the test file.


For gdb.base tests, gdb_start, gdb_load and such are easily overriden by 
redefinition in baseboard file. However, due to the fact that mi-support.exp is 
explicitly loaded from gdb.mi/* tests, it will have the final say, thus 
preventing us from overriding mi_gdb_load and such in the baseboard file.


Thanks,

Aleksandar


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

* Re: [RFC] gdb.mi tests
  2008-03-12 19:25   ` Vladimir Prus
@ 2008-03-12 19:34     ` Daniel Jacobowitz
  2008-03-12 20:49       ` Aleksandar Ristovski
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2008-03-12 19:34 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb-patches

On Wed, Mar 12, 2008 at 10:25:12PM +0300, Vladimir Prus wrote:
> Aleksandar Ristovski wrote:
> 
> >> Something like the diffs attached (I manually removed some things from my diff
> >> so the diff may not be patchable, but it should be sufficient to illustrate what
> >> am I talking about.
> >> 
> > 
> > Attached working diff. Comments welcome.
> 
> I don't have any objections to this course of action, if this simplifies
> your testing.
> 
> But just for the record, can you tell how you override mi_gdb_start? Of course,
> assuming it's not some proprietary information.

FWIW, I tried something similar long ago and Elena preferred it the
way it is - you'll see that sid and gdbserver target support is also
in mi-support.exp, not in config/ with the other pieces.

  http://sources.redhat.com/ml/gdb-patches/2002-07/msg00227.html

However, CodeSourcery's test harness goes to some trouble to work
around this - you still can, you just need to be handy with TCL to do
it.  We load mi-support.exp in our board files and use "rename".
Which is a bit silly to have to do.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [RFC] gdb.mi tests
  2008-03-12 19:18 ` Aleksandar Ristovski
@ 2008-03-12 19:25   ` Vladimir Prus
  2008-03-12 19:34     ` Daniel Jacobowitz
  2008-03-21 15:07   ` Daniel Jacobowitz
  1 sibling, 1 reply; 12+ messages in thread
From: Vladimir Prus @ 2008-03-12 19:25 UTC (permalink / raw)
  To: gdb-patches

Aleksandar Ristovski wrote:

>> Something like the diffs attached (I manually removed some things from my diff
>> so the diff may not be patchable, but it should be sufficient to illustrate what
>> am I talking about.
>> 
> 
> Attached working diff. Comments welcome.

I don't have any objections to this course of action, if this simplifies
your testing.

But just for the record, can you tell how you override mi_gdb_start? Of course,
assuming it's not some proprietary information.

Thanks,
Volodya



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

* Re: [RFC] gdb.mi tests
  2008-03-11 19:32 Aleksandar Ristovski
@ 2008-03-12 19:18 ` Aleksandar Ristovski
  2008-03-12 19:25   ` Vladimir Prus
  2008-03-21 15:07   ` Daniel Jacobowitz
  0 siblings, 2 replies; 12+ messages in thread
From: Aleksandar Ristovski @ 2008-03-12 19:18 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]

Aleksandar Ristovski wrote:
> Hello,
> 
> By looking at gdb.mi I have noticed that (unfortunately) the way they are 
> written, they do not allow baseboard files to override mi_* functions.
> 
> gdb.base allows overriding which is great. For example, we override gdb_start 
> and gdb_load. In overriden functions we call default_ versions and then we 
> perform some additional tasks.
> 
> For gdb.mi, that is not possible since mi-support.exp is going to be loaded 
> after baseboard file.
> 
> 
> I would propose the following changes (only one test from gdb.mi is given as an 
> example) and would ask you to, please, comment.
> 
> Changes:
> 
> 1. gdb.exp loads mi-support.exp
> 2. mi-support.exp to "export" overridable functions. By this I mean to have 
> mi_cmd and default_mi_cmd pairs, where mi_cmd calls default_mi_cmd. Baseboard 
> can override mi_cmd (well, it can override anything, but this would be meant to 
> be overriden).
> 3. gdb.mi/* do not load explicitly mi-support.exp
> 
> Something like the diffs attached (I manually removed some things from my diff 
> so the diff may not be patchable, but it should be sufficient to illustrate what 
> am I talking about.
> 

Attached working diff. Comments welcome.

Thanks,

Aleksandar Ristovski
QNX Software Systems

[-- Attachment #2: mi-support.diff --]
[-- Type: text/plain, Size: 26132 bytes --]

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.96
diff -u -p -r1.96 gdb.exp
--- lib/gdb.exp	23 Jan 2008 06:20:34 -0000	1.96
+++ lib/gdb.exp	12 Mar 2008 19:12:14 -0000
@@ -27,6 +27,7 @@ if {$tool == ""} {
 }
 
 load_lib libgloss.exp
+load_lib mi-support.exp
 
 global GDB
 
Index: lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.51
diff -u -p -r1.51 mi-support.exp
--- lib/mi-support.exp	29 Jan 2008 19:36:58 -0000	1.51
+++ lib/mi-support.exp	12 Mar 2008 19:12:14 -0000
@@ -84,7 +84,7 @@ proc mi_uncatched_gdb_exit {} {
 }
 
 #
-# mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure
+# default_mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure
 #
 # INFERIOR_PTY should be set to separate-inferior-tty to have the inferior work 
 # with it's own PTY. If set to same-inferior-tty, the inferior shares GDB's PTY. 
@@ -94,7 +94,7 @@ proc mi_uncatched_gdb_exit {} {
 # tests on different hosts all using the same server, things can
 # get really slow.  Give gdb at least 3 minutes to start up.
 #
-proc mi_gdb_start { args } {
+proc default_mi_gdb_start { args } {
     global verbose
     global GDB
     global GDBFLAGS
@@ -230,6 +230,14 @@ proc mi_gdb_start { args } {
     return 0;
 }
 
+#
+# Overridable function. You can override this function in your
+# baseboard file.
+# 
+proc mi_gdb_start { args } {
+  return [default_mi_gdb_start $args]
+}
+
 # Many of the tests depend on setting breakpoints at various places and
 # running until that breakpoint is reached.  At times, we want to start
 # with a clean-slate with respect to breakpoints, so this utility proc 
Index: gdb.mi/gdb669.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb669.exp,v
retrieving revision 1.9
diff -u -p -r1.9 gdb669.exp
--- gdb.mi/gdb669.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/gdb669.exp	12 Mar 2008 19:12:14 -0000
@@ -25,7 +25,7 @@ if {![isnative]} {
   return
 }
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/gdb680.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb680.exp,v
retrieving revision 1.4
diff -u -p -r1.4 gdb680.exp
--- gdb.mi/gdb680.exp	1 Jan 2008 22:53:20 -0000	1.4
+++ gdb.mi/gdb680.exp	12 Mar 2008 19:12:14 -0000
@@ -20,7 +20,7 @@
 # test gdb/680
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/gdb701.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb701.exp,v
retrieving revision 1.7
diff -u -p -r1.7 gdb701.exp
--- gdb.mi/gdb701.exp	1 Jan 2008 22:53:20 -0000	1.7
+++ gdb.mi/gdb701.exp	12 Mar 2008 19:12:14 -0000
@@ -20,7 +20,7 @@
 # test gdb/701
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/gdb792.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb792.exp,v
retrieving revision 1.9
diff -u -p -r1.9 gdb792.exp
--- gdb.mi/gdb792.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/gdb792.exp	12 Mar 2008 19:12:14 -0000
@@ -22,7 +22,7 @@
 
 if { [skip_cplus_tests] } { continue }
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-basics.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-basics.exp,v
retrieving revision 1.19
diff -u -p -r1.19 mi-basics.exp
--- gdb.mi/mi-basics.exp	1 Jan 2008 22:53:20 -0000	1.19
+++ gdb.mi/mi-basics.exp	12 Mar 2008 19:12:14 -0000
@@ -29,7 +29,7 @@
 # but the command syntax and correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-break.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-break.exp,v
retrieving revision 1.16
diff -u -p -r1.16 mi-break.exp
--- gdb.mi/mi-break.exp	27 Feb 2008 20:29:31 -0000	1.16
+++ gdb.mi/mi-break.exp	12 Mar 2008 19:12:14 -0000
@@ -24,7 +24,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-cli.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-cli.exp,v
retrieving revision 1.11
diff -u -p -r1.11 mi-cli.exp
--- gdb.mi/mi-cli.exp	22 Jan 2008 19:43:10 -0000	1.11
+++ gdb.mi/mi-cli.exp	12 Mar 2008 19:12:14 -0000
@@ -19,7 +19,7 @@
 # Console commands executed via MI should use MI output wrappers, MI event
 # handlers, etc.
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-console.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-console.exp,v
retrieving revision 1.21
diff -u -p -r1.21 mi-console.exp
--- gdb.mi/mi-console.exp	1 Jan 2008 22:53:20 -0000	1.21
+++ gdb.mi/mi-console.exp	12 Mar 2008 19:12:14 -0000
@@ -32,7 +32,7 @@
 # through GDB.  Check that we're either talking to a simulator or a
 # remote target.
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-disassemble.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-disassemble.exp,v
retrieving revision 1.19
diff -u -p -r1.19 mi-disassemble.exp
--- gdb.mi/mi-disassemble.exp	1 Jan 2008 22:53:20 -0000	1.19
+++ gdb.mi/mi-disassemble.exp	12 Mar 2008 19:12:14 -0000
@@ -21,7 +21,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-eval.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-eval.exp,v
retrieving revision 1.13
diff -u -p -r1.13 mi-eval.exp
--- gdb.mi/mi-eval.exp	1 Jan 2008 22:53:20 -0000	1.13
+++ gdb.mi/mi-eval.exp	12 Mar 2008 19:12:14 -0000
@@ -23,7 +23,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-file-transfer.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-file-transfer.exp,v
retrieving revision 1.2
diff -u -p -r1.2 mi-file-transfer.exp
--- gdb.mi/mi-file-transfer.exp	1 Jan 2008 22:53:20 -0000	1.2
+++ gdb.mi/mi-file-transfer.exp	12 Mar 2008 19:12:14 -0000
@@ -17,7 +17,7 @@
 # Test gdbserver monitor commands.
 
 load_lib gdbserver-support.exp
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 if { [skip_gdbserver_tests] } {
Index: gdb.mi/mi-file.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-file.exp,v
retrieving revision 1.12
diff -u -p -r1.12 mi-file.exp
--- gdb.mi/mi-file.exp	30 Jan 2008 08:49:52 -0000	1.12
+++ gdb.mi/mi-file.exp	12 Mar 2008 19:12:14 -0000
@@ -24,7 +24,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-hack-cli.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-hack-cli.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi-hack-cli.exp
--- gdb.mi/mi-hack-cli.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/mi-hack-cli.exp	12 Mar 2008 19:12:14 -0000
@@ -19,7 +19,7 @@
 
 # Some basic checks for the CLI.
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-pending.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-pending.exp,v
retrieving revision 1.3
diff -u -p -r1.3 mi-pending.exp
--- gdb.mi/mi-pending.exp	26 Feb 2008 08:14:11 -0000	1.3
+++ gdb.mi/mi-pending.exp	12 Mar 2008 19:12:14 -0000
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 if $tracelevel then {
Index: gdb.mi/mi-pthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-pthreads.exp,v
retrieving revision 1.11
diff -u -p -r1.11 mi-pthreads.exp
--- gdb.mi/mi-pthreads.exp	1 Jan 2008 22:53:20 -0000	1.11
+++ gdb.mi/mi-pthreads.exp	12 Mar 2008 19:12:14 -0000
@@ -27,7 +27,7 @@ if {![isnative]} {
   return
 }
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-read-memory.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-read-memory.exp,v
retrieving revision 1.13
diff -u -p -r1.13 mi-read-memory.exp
--- gdb.mi/mi-read-memory.exp	1 Jan 2008 22:53:20 -0000	1.13
+++ gdb.mi/mi-read-memory.exp	12 Mar 2008 19:12:14 -0000
@@ -28,7 +28,7 @@
 # but the command syntax and correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-regs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-regs.exp,v
retrieving revision 1.18
diff -u -p -r1.18 mi-regs.exp
--- gdb.mi/mi-regs.exp	1 Jan 2008 22:53:20 -0000	1.18
+++ gdb.mi/mi-regs.exp	12 Mar 2008 19:12:14 -0000
@@ -25,7 +25,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-return.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-return.exp,v
retrieving revision 1.17
diff -u -p -r1.17 mi-return.exp
--- gdb.mi/mi-return.exp	1 Jan 2008 22:53:20 -0000	1.17
+++ gdb.mi/mi-return.exp	12 Mar 2008 19:12:14 -0000
@@ -23,7 +23,7 @@
 # the correct output response to MI operations.  
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-simplerun.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-simplerun.exp,v
retrieving revision 1.18
diff -u -p -r1.18 mi-simplerun.exp
--- gdb.mi/mi-simplerun.exp	27 Feb 2008 20:29:31 -0000	1.18
+++ gdb.mi/mi-simplerun.exp	12 Mar 2008 19:12:14 -0000
@@ -25,7 +25,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-stack.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-stack.exp,v
retrieving revision 1.25
diff -u -p -r1.25 mi-stack.exp
--- gdb.mi/mi-stack.exp	1 Jan 2008 22:53:20 -0000	1.25
+++ gdb.mi/mi-stack.exp	12 Mar 2008 19:12:14 -0000
@@ -23,7 +23,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-stepi.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-stepi.exp,v
retrieving revision 1.16
diff -u -p -r1.16 mi-stepi.exp
--- gdb.mi/mi-stepi.exp	1 Jan 2008 22:53:20 -0000	1.16
+++ gdb.mi/mi-stepi.exp	12 Mar 2008 19:12:14 -0000
@@ -23,7 +23,7 @@
 # the correct output response to MI operations.  
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-syn-frame.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-syn-frame.exp,v
retrieving revision 1.13
diff -u -p -r1.13 mi-syn-frame.exp
--- gdb.mi/mi-syn-frame.exp	1 Jan 2008 22:53:20 -0000	1.13
+++ gdb.mi/mi-syn-frame.exp	12 Mar 2008 19:12:14 -0000
@@ -24,7 +24,7 @@ if [target_info exists gdb,nosignals] {
     continue
 }
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 set testfile "mi-syn-frame"
Index: gdb.mi/mi-until.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-until.exp,v
retrieving revision 1.15
diff -u -p -r1.15 mi-until.exp
--- gdb.mi/mi-until.exp	1 Jan 2008 22:53:20 -0000	1.15
+++ gdb.mi/mi-until.exp	12 Mar 2008 19:12:14 -0000
@@ -25,7 +25,7 @@
 # the correct output response to MI operations.  
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-var-block.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-block.exp,v
retrieving revision 1.17
diff -u -p -r1.17 mi-var-block.exp
--- gdb.mi/mi-var-block.exp	1 Jan 2008 22:53:20 -0000	1.17
+++ gdb.mi/mi-var-block.exp	12 Mar 2008 19:12:14 -0000
@@ -20,7 +20,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-var-child-f.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child-f.exp,v
retrieving revision 1.8
diff -u -p -r1.8 mi-var-child-f.exp
--- gdb.mi/mi-var-child-f.exp	1 Jan 2008 22:53:20 -0000	1.8
+++ gdb.mi/mi-var-child-f.exp	12 Mar 2008 19:12:14 -0000
@@ -15,7 +15,7 @@
 
 # Test variable objects treat non-zero offsets in Fortran arrays correctly.
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.exp,v
retrieving revision 1.30
diff -u -p -r1.30 mi-var-child.exp
--- gdb.mi/mi-var-child.exp	17 Jan 2008 14:34:22 -0000	1.30
+++ gdb.mi/mi-var-child.exp	12 Mar 2008 19:12:14 -0000
@@ -20,7 +20,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.34
diff -u -p -r1.34 mi-var-cmd.exp
--- gdb.mi/mi-var-cmd.exp	1 Jan 2008 22:53:20 -0000	1.34
+++ gdb.mi/mi-var-cmd.exp	12 Mar 2008 19:12:14 -0000
@@ -20,7 +20,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-var-cp.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cp.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi-var-cp.exp
--- gdb.mi/mi-var-cp.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/mi-var-cp.exp	12 Mar 2008 19:12:14 -0000
@@ -15,7 +15,7 @@
 
 if { [skip_cplus_tests] } { continue }
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-display.exp,v
retrieving revision 1.21
diff -u -p -r1.21 mi-var-display.exp
--- gdb.mi/mi-var-display.exp	23 Jan 2008 06:20:57 -0000	1.21
+++ gdb.mi/mi-var-display.exp	12 Mar 2008 19:12:14 -0000
@@ -20,7 +20,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-var-invalidate.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-invalidate.exp,v
retrieving revision 1.3
diff -u -p -r1.3 mi-var-invalidate.exp
--- gdb.mi/mi-var-invalidate.exp	1 Jan 2008 22:53:20 -0000	1.3
+++ gdb.mi/mi-var-invalidate.exp	12 Mar 2008 19:12:14 -0000
@@ -20,7 +20,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi-watch.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-watch.exp,v
retrieving revision 1.20
diff -u -p -r1.20 mi-watch.exp
--- gdb.mi/mi-watch.exp	1 Jan 2008 22:53:20 -0000	1.20
+++ gdb.mi/mi-watch.exp	12 Mar 2008 19:12:15 -0000
@@ -25,7 +25,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi"
 
 gdb_exit
Index: gdb.mi/mi2-basics.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-basics.exp,v
retrieving revision 1.11
diff -u -p -r1.11 mi2-basics.exp
--- gdb.mi/mi2-basics.exp	1 Jan 2008 22:53:20 -0000	1.11
+++ gdb.mi/mi2-basics.exp	12 Mar 2008 19:12:18 -0000
@@ -29,7 +29,7 @@
 # but the command syntax and correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-break.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-break.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi2-break.exp
--- gdb.mi/mi2-break.exp	27 Feb 2008 20:29:31 -0000	1.9
+++ gdb.mi/mi2-break.exp	12 Mar 2008 19:12:18 -0000
@@ -25,7 +25,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-cli.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-cli.exp,v
retrieving revision 1.10
diff -u -p -r1.10 mi2-cli.exp
--- gdb.mi/mi2-cli.exp	22 Jan 2008 19:43:10 -0000	1.10
+++ gdb.mi/mi2-cli.exp	12 Mar 2008 19:12:18 -0000
@@ -19,7 +19,7 @@
 # Console commands executed via MI should use MI output wrappers, MI event
 # handlers, etc.
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-console.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-console.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi2-console.exp
--- gdb.mi/mi2-console.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/mi2-console.exp	12 Mar 2008 19:12:18 -0000
@@ -32,7 +32,7 @@
 # through GDB.  Check that we're either talking to a simulator or a
 # remote target.
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-disassemble.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-disassemble.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi2-disassemble.exp
--- gdb.mi/mi2-disassemble.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/mi2-disassemble.exp	12 Mar 2008 19:12:19 -0000
@@ -21,7 +21,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-eval.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-eval.exp,v
retrieving revision 1.7
diff -u -p -r1.7 mi2-eval.exp
--- gdb.mi/mi2-eval.exp	1 Jan 2008 22:53:20 -0000	1.7
+++ gdb.mi/mi2-eval.exp	12 Mar 2008 19:12:19 -0000
@@ -23,7 +23,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-file.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-file.exp,v
retrieving revision 1.12
diff -u -p -r1.12 mi2-file.exp
--- gdb.mi/mi2-file.exp	30 Jan 2008 08:50:10 -0000	1.12
+++ gdb.mi/mi2-file.exp	12 Mar 2008 19:12:19 -0000
@@ -24,7 +24,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-hack-cli.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-hack-cli.exp,v
retrieving revision 1.5
diff -u -p -r1.5 mi2-hack-cli.exp
--- gdb.mi/mi2-hack-cli.exp	1 Jan 2008 22:53:20 -0000	1.5
+++ gdb.mi/mi2-hack-cli.exp	12 Mar 2008 19:12:19 -0000
@@ -19,7 +19,7 @@
 
 # Some basic checks for the CLI.
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-pthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-pthreads.exp,v
retrieving revision 1.6
diff -u -p -r1.6 mi2-pthreads.exp
--- gdb.mi/mi2-pthreads.exp	1 Jan 2008 22:53:20 -0000	1.6
+++ gdb.mi/mi2-pthreads.exp	12 Mar 2008 19:12:19 -0000
@@ -27,7 +27,7 @@ if {![isnative]} {
   return
 }
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-read-memory.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-read-memory.exp,v
retrieving revision 1.6
diff -u -p -r1.6 mi2-read-memory.exp
--- gdb.mi/mi2-read-memory.exp	1 Jan 2008 22:53:20 -0000	1.6
+++ gdb.mi/mi2-read-memory.exp	12 Mar 2008 19:12:19 -0000
@@ -29,7 +29,7 @@
 # but the command syntax and correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-regs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-regs.exp,v
retrieving revision 1.8
diff -u -p -r1.8 mi2-regs.exp
--- gdb.mi/mi2-regs.exp	1 Jan 2008 22:53:20 -0000	1.8
+++ gdb.mi/mi2-regs.exp	12 Mar 2008 19:12:19 -0000
@@ -26,7 +26,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-return.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-return.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi2-return.exp
--- gdb.mi/mi2-return.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/mi2-return.exp	12 Mar 2008 19:12:19 -0000
@@ -23,7 +23,7 @@
 # the correct output response to MI operations.  
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-simplerun.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-simplerun.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi2-simplerun.exp
--- gdb.mi/mi2-simplerun.exp	27 Feb 2008 20:29:31 -0000	1.9
+++ gdb.mi/mi2-simplerun.exp	12 Mar 2008 19:12:19 -0000
@@ -25,7 +25,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-stack.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-stack.exp,v
retrieving revision 1.11
diff -u -p -r1.11 mi2-stack.exp
--- gdb.mi/mi2-stack.exp	1 Jan 2008 22:53:20 -0000	1.11
+++ gdb.mi/mi2-stack.exp	12 Mar 2008 19:12:19 -0000
@@ -23,7 +23,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-stepi.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-stepi.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi2-stepi.exp
--- gdb.mi/mi2-stepi.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/mi2-stepi.exp	12 Mar 2008 19:12:19 -0000
@@ -23,7 +23,7 @@
 # the correct output response to MI operations.  
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-syn-frame.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-syn-frame.exp,v
retrieving revision 1.10
diff -u -p -r1.10 mi2-syn-frame.exp
--- gdb.mi/mi2-syn-frame.exp	1 Jan 2008 22:53:20 -0000	1.10
+++ gdb.mi/mi2-syn-frame.exp	12 Mar 2008 19:12:19 -0000
@@ -24,7 +24,7 @@ if [target_info exists gdb,nosignals] {
     continue
 }
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 set testfile "mi-syn-frame"
Index: gdb.mi/mi2-until.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-until.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi2-until.exp
--- gdb.mi/mi2-until.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/mi2-until.exp	12 Mar 2008 19:12:19 -0000
@@ -26,7 +26,7 @@
 # the correct output response to MI operations.  
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-var-block.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-block.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi2-var-block.exp
--- gdb.mi/mi2-var-block.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/mi2-var-block.exp	12 Mar 2008 19:12:19 -0000
@@ -20,7 +20,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-child.exp,v
retrieving revision 1.12
diff -u -p -r1.12 mi2-var-child.exp
--- gdb.mi/mi2-var-child.exp	17 Jan 2008 14:34:22 -0000	1.12
+++ gdb.mi/mi2-var-child.exp	12 Mar 2008 19:12:19 -0000
@@ -19,7 +19,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-cmd.exp,v
retrieving revision 1.16
diff -u -p -r1.16 mi2-var-cmd.exp
--- gdb.mi/mi2-var-cmd.exp	1 Jan 2008 22:53:20 -0000	1.16
+++ gdb.mi/mi2-var-cmd.exp	12 Mar 2008 19:12:19 -0000
@@ -20,7 +20,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-display.exp,v
retrieving revision 1.14
diff -u -p -r1.14 mi2-var-display.exp
--- gdb.mi/mi2-var-display.exp	23 Jan 2008 21:05:16 -0000	1.14
+++ gdb.mi/mi2-var-display.exp	12 Mar 2008 19:12:19 -0000
@@ -20,7 +20,7 @@
 #
 
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit
Index: gdb.mi/mi2-watch.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-watch.exp,v
retrieving revision 1.11
diff -u -p -r1.11 mi2-watch.exp
--- gdb.mi/mi2-watch.exp	1 Jan 2008 22:53:20 -0000	1.11
+++ gdb.mi/mi2-watch.exp	12 Mar 2008 19:12:19 -0000
@@ -25,7 +25,7 @@
 # but to verify the correct output response to MI operations.
 #
 
-load_lib mi-support.exp
+
 set MIFLAGS "-i=mi2"
 
 gdb_exit

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

* [RFC] gdb.mi tests
@ 2008-03-11 19:32 Aleksandar Ristovski
  2008-03-12 19:18 ` Aleksandar Ristovski
  0 siblings, 1 reply; 12+ messages in thread
From: Aleksandar Ristovski @ 2008-03-11 19:32 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

Hello,

By looking at gdb.mi I have noticed that (unfortunately) the way they are 
written, they do not allow baseboard files to override mi_* functions.

gdb.base allows overriding which is great. For example, we override gdb_start 
and gdb_load. In overriden functions we call default_ versions and then we 
perform some additional tasks.

For gdb.mi, that is not possible since mi-support.exp is going to be loaded 
after baseboard file.


I would propose the following changes (only one test from gdb.mi is given as an 
example) and would ask you to, please, comment.

Changes:

1. gdb.exp loads mi-support.exp
2. mi-support.exp to "export" overridable functions. By this I mean to have 
mi_cmd and default_mi_cmd pairs, where mi_cmd calls default_mi_cmd. Baseboard 
can override mi_cmd (well, it can override anything, but this would be meant to 
be overriden).
3. gdb.mi/* do not load explicitly mi-support.exp

Something like the diffs attached (I manually removed some things from my diff 
so the diff may not be patchable, but it should be sufficient to illustrate what 
am I talking about.

Thanks,

Aleksandar Ristovski
QNX Software Systems

[-- Attachment #2: mitests.diff --]
[-- Type: text/plain, Size: 1837 bytes --]

Index: lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.51
diff -u -p -r1.51 mi-support.exp
--- lib/mi-support.exp	29 Jan 2008 19:36:58 -0000	1.51
+++ lib/mi-support.exp	11 Mar 2008 19:20:13 -0000
@@ -84,7 +84,7 @@ proc mi_uncatched_gdb_exit {} {
 }
 
 #
-# mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure
+# default_mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure
 #
 # INFERIOR_PTY should be set to separate-inferior-tty to have the inferior work 
 # with it's own PTY. If set to same-inferior-tty, the inferior shares GDB's PTY. 
@@ -94,7 +94,7 @@ proc mi_uncatched_gdb_exit {} {
 # tests on different hosts all using the same server, things can
 # get really slow.  Give gdb at least 3 minutes to start up.
 #
-proc mi_gdb_start { args } {
+proc default_mi_gdb_start { args } {
     global verbose
     global GDB
     global GDBFLAGS
@@ -230,6 +230,14 @@ proc mi_gdb_start { args } {
     return 0;
 }
 
+#
+# Overridable function. You can override this function in your
+# baseboard file.
+# 
+proc mi_gdb_start { args } {
+  return [default_mi_gdb_start $args]
+}
+
 # Many of the tests depend on setting breakpoints at various places and
 # running until that breakpoint is reached.  At times, we want to start
 # with a clean-slate with respect to breakpoints, so this utility proc 
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.96
diff -u -p -r1.96 gdb.exp
--- lib/gdb.exp	23 Jan 2008 06:20:34 -0000	1.96
+++ lib/gdb.exp	11 Mar 2008 19:20:24 -0000
@@ -27,6 +27,7 @@ if {$tool == ""} {
 }
 
 load_lib libgloss.exp
+load_lib mi-support.exp
 
 global GDB
 


[-- Attachment #3: gdb669.exp.diff --]
[-- Type: text/plain, Size: 440 bytes --]

Index: gdb.mi/gdb669.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb669.exp,v
retrieving revision 1.9
diff -u -p -r1.9 gdb669.exp
--- gdb.mi/gdb669.exp	1 Jan 2008 22:53:20 -0000	1.9
+++ gdb.mi/gdb669.exp	11 Mar 2008 19:28:38 -0000
@@ -25,7 +25,7 @@ if {![isnative]} {
   return
 }
 
-load_lib mi-support.exp
+# load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
 gdb_exit

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

end of thread, other threads:[~2008-03-28 16:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-28 15:24 [RFC] gdb.mi tests Aleksandar Ristovski
2008-03-28 15:59 ` Daniel Jacobowitz
2008-03-28 16:00 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2008-03-28 16:16 Aleksandar Ristovski
2008-03-11 19:32 Aleksandar Ristovski
2008-03-12 19:18 ` Aleksandar Ristovski
2008-03-12 19:25   ` Vladimir Prus
2008-03-12 19:34     ` Daniel Jacobowitz
2008-03-12 20:49       ` Aleksandar Ristovski
2008-03-12 21:05         ` Daniel Jacobowitz
2008-03-14 18:07           ` Aleksandar Ristovski
2008-03-21 15:07   ` Daniel Jacobowitz

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