Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Elena Zannoni <ezannoni@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA: mi testsuite] Gdbserver support for the MI testsuite
Date: Wed, 03 Dec 2003 23:32:00 -0000	[thread overview]
Message-ID: <16334.29304.223622.767814@localhost.redhat.com> (raw)
In-Reply-To: <20031124041957.GA7603@nevyn.them.org>

Daniel Jacobowitz writes:
 > On Mon, Sep 08, 2003 at 03:53:38PM -0400, Elena Zannoni wrote:
 > > Daniel Jacobowitz writes:
 > >  > Updated and improved version of a patch I've posted several times over the
 > >  > last year and a half or so.  This adds support for gdbserver-style remote
 > >  > stubs to the MI testsuite; the differences between the MI support and non-MI
 > >  > support are mostly cosmetic at this point (i.e. it doesn't go out of its way
 > >  > to use -target-select).  Just handles the different prompt.
 > >  > 
 > >  > There's still an unnecessary restart of gdbserver every test; fixing that is
 > >  > going to take some serious work.
 > >  > 
 > >  > Results with the patch are OK: linux-proc tests fail, not surprisingly;
 > >  > gcore fails; there are some new thread failures since I last updated it
 > >  > which I will have to investigate.  But most of the MI tests pass instead of
 > >  > timing out.
 > >  > 
 > >  > Does this patch look OK for 6.0?
 > >  > 
 > > 
 > > I still have the same objection I had back then. I'd like to see the
 > > mi_* functions be moved to mi-support.exp.
 > > see: http://sources.redhat.com/ml/gdb-patches/2002-07/msg00227.html
 > > 
 > > I'd still like to have mi-support.exp be loaded only when the mi tests
 > > are being done. 
 > > 
 > > The flo is like this: an mi test file calls mi_gdb_load (indirectly,
 > > via mi_run_to_main), which in turn decides what different mechanism to
 > > use depenging on the target. This stuff you are adding is just another
 > > kind of target that should be handled from the same central core
 > > place.  If you really are that desperate to keep the mi_ versions in
 > > gdbserver.exp and monitor.exp, could those be called from
 > > mi-support.exp at least, so that the path of execution is consistent
 > > with the rest?
 > 
 > Hi Elena,
 > 
 > I'm a little dense but after a couple of tries I think I've got it :)
 > The attached patch:
 >   - breaks mi_gdb_file_cmd out of mi_gdb_load, as before.
 >   - Moves the new mi_gdb_target_cmd from monitor.exp to mi-support.exp
 >     (keeps it with all the other MI support, and it's really not
 >     monitor-related anyway).
 >   - Adds a case to mi_gdb_load for gdbserver.
 >   - Breaks gdb_load up into two functions, one for the actions of
 >     starting a server (common to both cases) and the other for the
 >     non-MI overriding of gdb_load.
 > 
 > Also included is a change local to gdbserver.exp which improves the way
 > we start gdbserver to be more reliable (and less prone to leaving
 > zombies!).  The trick of waiting for an output character doesn't appear
 > to work 100% (I believe gdbserver prints the message too early) but
 > with the five-second retry in mi_gdb_target_cmd everything works OK.
 > 
 > Testsuite results, with NPTL disabled (gdbserver doesn't support NPTL
 > yet; I'll fix it sometime soon...):
 > 
 >                 === gdb Summary ===
 > 
 > # of expected passes            9791
 > # of unexpected failures        89
 > # of expected failures          62
 > # of unknown successes          28
 > # of known failures             40
 > # of unresolved testcases       1
 > # of untested testcases         6
 > # of unsupported tests          6
 > /opt/src/binutils/x86-as/gdb/testsuite/../../gdb/gdb version 2003-11-23-cvs -nx
 > 
 > Not stellar, but it's definitely progress, and this patch is much
 > cleaner than the last.
 > 
 > OK?
 > 
 > -- 
 > Daniel Jacobowitz
 > MontaVista Software                         Debian GNU/Linux Developer
 > 
 > 2003-06-22  Daniel Jacobowitz  <drow@mvista.com>
 > 
 > 	* config/gdbserver.exp (gdbserver_gdb_load): Rename from gdb_load.
 > 	Remove downloading, guessing the host executable, the calls to
 > 	gdb_file_cmd and gdb_target_cmd, and "load" support.
 > 	(infer_host_exec): New function broken out from gdb_load.
 > 	(gdb_load): New wrapper for gdbserver_gdb_load.
 > 	* lib/mi-support.exp (mi_gdb_target_cmd): New function, based on
 > 	gdb_target_cmd.
 > 	(mi_gdb_file_cmd): New function, broken out from mi_gdb_load.
 > 	Download binaries to the host.  Clear last_mi_remote_file when
 > 	we load a new binary.
 > 	(mi_gdb_load): Call mi_gdb_file_cmd.  If gdbserver.exp is loaded,
 > 	call gdbserver_gdb_load and mi_gdb_target_cmd.
 > 

Ok, but one more thing. see below

 > Index: lib/mi-support.exp
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
 > retrieving revision 1.23
 > diff -u -p -r1.23 mi-support.exp
 > --- lib/mi-support.exp	22 Jun 2003 00:04:27 -0000	1.23
 > +++ lib/mi-support.exp	24 Nov 2003 03:43:08 -0000
 > @@ -1,4 +1,4 @@
 > -# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
 > +# Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
 >  
 >  # This program is free software; you can redistribute it and/or modify
 >  # it under the terms of the GNU General Public License as published by
 > @@ -281,35 +281,95 @@ proc mi_gdb_reinitialize_dir { subdir } 
 >      }
 >  }
 >  
 > +# Send GDB the "target" command.
 > +# FIXME: Some of these patterns are not appropriate for MI.  Based on
 > +# config/monitor.exp:gdb_target_command.

 > +# FIXME: Should use -target-select.

please use -target-select. mi_gdb_load already uses it. 

 > +proc mi_gdb_target_cmd { targetname serialport } {
 > +    global mi_gdb_prompt
 > +
 > +    for {set i 1} {$i <= 3} {incr i} {
 > +	send_gdb "target $targetname $serialport\n"


  reply	other threads:[~2003-12-03 23:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-22  4:23 Daniel Jacobowitz
2003-07-24 18:40 ` Daniel Jacobowitz
2003-07-24 19:19   ` Daniel Jacobowitz
2003-08-17 20:57 ` Daniel Jacobowitz
2003-09-07  4:10   ` Daniel Jacobowitz
2003-09-08 19:45 ` Elena Zannoni
2003-11-24  4:20   ` Daniel Jacobowitz
2003-12-03 23:32     ` Elena Zannoni [this message]
2004-01-18 15:23       ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16334.29304.223622.767814@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox