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: RFC: Additional testsuite alternative


On Thu, Sep 26, 2002 at 04:47:53PM -0400, Andrew Cagney wrote:
> 
> >Source file two.cc:
> >===
> >struct OneStruct {
> >  int simple;
> >};
> >struct OneStruct StrOne;
> >const struct OneStruct *ConstStrOnePtr;
> >
> >int FunctionWithPtrs (const struct OneStruct *one, const int *two)
> >{
> >  return 0;
> >}
> >
> >int
> >main ()
> >{
> >  return 0;
> >}
> 
> The nice thing about GCC's framework is that it is a single C file.  Is 
> the same possible here?  Comments would indicate where to set 
> breakpoints and what values to print.
> 
> The test then involves running the program, and for each breakpoint, 
> printing and checking the output.

I thought about it and decided it wasn't worthwhile.  That works on
GCC: You run GCC, you get output based on particular lines.  GDB has a
source and then a session.  So I have two files; one is source, the
other is the session.

> (How would this .x file handle regular expressions?  That is the one 
> thing I never figured out with the GCC framework.)

It just works :)  It's a little awkward for complex expressions but
works just fine for the simple cases I needed it for.  The response to
a #test directive is a regex.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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