This is the mail archive of the gdb@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: How do I get regexp from expect at gdb_expect?


On Tue, Feb 01, 2005 at 09:23:15AM -0500, Daniel Jacobowitz wrote:
> On Tue, Feb 01, 2005 at 09:20:08AM -0500, Bob Rossi wrote:
> > Could we have GDB turn off echo'ing with an MI command. 
> > 
> > -mi-disable-echo
> > 
> > I think that would fix this entire problem.
> 
> I don't think there's a problem to be fixed; and it wouldn't "fix"
> anything, since you'd still have to go through the testsuite, add
> leading anchors, and make sure any other messages were handled.  Plus
> it would mean teaching the MI driver to mess with terminal modes.

Well, I'm trying to take testing the output of the MI testsuite to the
next level. Instead of just matching regular expressions, and letting
any output from GDB before the "match" get by, I'm trying to match only
output that has the correct MI output syntax.

Unfortunately, as of know, there are 2 holes in the testsuite that I have
found so far. The first is that Expect also matches the "echoed" data.
This data isn't even seen by real front end clients, and, it's not even
really the output of GDB. So this data must be removed from the output
stream if the syntax of the MI command is going to be validated.

Second, it looks as if extra data could come out of GDB, and still pass
the testsuite. This certainly would stop me from validating the syntax,
since, there would be no point in validating only 9/10 of the output of
an MI output command. Also, if GDB was outputting some extra data, front
end clients would most likely break, while the testsuite could continue
passing just fine.

I would do the work of adding, the leading anchors and making sure all
other loose ends were tied up.

With all of this in mind, does disabling the 'echoing' of the terminal
sound reasonable?

Thanks,
Bob Rossi


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