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]
Other format: [Raw text]

Re: MI testsuite to use PTY for inferior


I haven't had time to look at the whole patch yet; I'll do that later
today or tomorrow, I had a couple of comments.  But let me respond to a
couple of things here first...

On Sat, Jul 30, 2005 at 01:38:56PM -0400, Bob Rossi wrote:
> > > +
> > > +    # spawn off the new pty for the inferior process
> > 
> > Open a new pty for the inferior process? (spawn means new process?)
> 
> I used the verb "spawn" because in order to get a new pty you have to
> call 'spawn pty'. If it is prefered to say "Create the new pty ...", I
> can change that.

Either way, formatting - capitals and periods.  I would recommend
"create the new pty", because you can't spawn off a PTY; it's not
something which runs on its own.

> > > -# mi_gdb_test COMMAND PATTERN MESSAGE -- send a command to gdb; test the result.
> > > +# mi_gdb_test COMMAND PATTERN IPATTERN MESSAGE -- send a command to gdb; test the result.
> > >  #
> > >  # COMMAND is the command to execute, send to GDB with send_gdb.  If
> > >  #   this is the null string no command is sent.
> > >  # PATTERN is the pattern to match for a PASS, and must NOT include
> > >  #   the \r\n sequence immediately before the gdb prompt.
> > > +# IPATTERN is the pattern to match for the inferior's output. This will not 
> > > +#   produce a PASS if successfull, but will produce a FAIL if unsuccessful.
> > >  # MESSAGE is an optional message to be printed.  If this is
> > >  #   omitted, then the pass/fail messages use the command string as the
> > >  #   message.  (If this is the empty string, then sometimes we don't
> > > @@ -533,14 +568,20 @@
> > 
> > With these arguments, you can't discriminate between
> > 
> > mi_gdb_test COMMAND PATTERN MESSAGE
> > 
> > and
> > 
> > mi_gdb_test COMMAND PATTERN IPATTERN
> > 
> > (MESSAGE is optional).
> 
> Yeah, this does look like a problem. Thanks. Is there a good way to work
> around this in TCL? Or should I make the IPATTERN parameter necessary?
> Force the user to put "" for IPATTERN? 
> 
> Or rather, should I make the MESSAGE parameter necessary? I have a feeling 
> that all of the MI tests use the MESSAGE parameter. If I do that, I can
> make the IPATTERN parameter optional, and last.

You're adding a new parameter; having it optional is fine, as long as
you add it after all existing optional parameters.  COMMAND PATTERN
IPATTERN MESSAGE is more intuitive, but I think that's less important
than correctness, so I would recommend COMMAND PATTERN [MESSAGE
[IPATTERN]].  Make sense?

> > I know that "Ditto." and "Likewise." are used often in GDB but I prefer:
> > 
> > 	* gdb.mi/gdb669.exp, gdb.mi/gdb680.exp, gdb.mi/gdb701.exp,
> > 	gdb.mi/gdb792.exp, gdb.mi/mi-break.exp, gdb.mi/mi-disassemble.exp,
> > 	gdb.mi/mi-eval.exp: Tell mi_gdb_start to use a PTY for inferior.
> > 	Update Copyright.
> 
> I will gladly change my ChangeLog sytle if either Daneil or Eli agree
> with your assessment. I have currently built up my ChangeLog style as a
> repetitive response from Daneil and Eli in order to comply with there
> style, in order to get faster patch review time.

I don't much care which of these you use.  You don't need to mention
updating the copyright year in the changelog unless you're doing
archaeology, though - if you're just adding the current year, don't
bother.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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