This is the mail archive of the 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: [PATCH] Make tests more flexible

David Carlton writes:
 > On Thu, 16 Jan 2003 09:40:14 -0500, Fernando Nasser <> said:
 > > I see a few other files with the
 > > set srcfile ${srcdir}/${subdir}/${testfile}.c
 > > line.  They should be breaking runs with "different test tree
 > > configurations" as well.
 > > display.exp:set srcfile  ${srcdir}/${subdir}/${testfile}.c
 > > long_long.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
 > > mips_pro.exp:set srcfile ${srcdir}/$subdir/${testfile}.c
 > > overlays.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
 > > relocate.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
 > > setshow.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
 > > step-line.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
 > > step-test.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
 > For what it's worth, all those files pass for me.  But that doesn't
 > mean much; they might not use srcfile in ways that trigger this
 > particular bug, and one of them (overlays.exp) doesn't actually do
 > anything on my platform.  So we might as well convert them all to use
 > the proper definition of srcfile, it seems to me.

I just checked this, and all those files don't use the variable
srcfile except for the compilation line, 

if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } 

the problem that David uncovered was with the matching of ${srcfile}
in the output of a command, like for a breakpoint hit.  By defining
srcfile to be the long path name, instead of just the source fle name,
it was trying to match the wrong string when src==build tree.

Ok, so I am OK with changing all the above to be just 
set srcfile  ${testfile}.c


if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } 

I'll send a patch in a bit.


 > David Carlton

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