diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/a2-run.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/a2-run.exp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp index 9f34fdc..88392b9 100644 --- a/gdb/testsuite/gdb.base/a2-run.exp +++ b/gdb/testsuite/gdb.base/a2-run.exp @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Please email any bugs, comments, and/or additions to this file to: # bug-gdb@prep.ai.mit.edu @@ -23,7 +23,7 @@ if $noargs then { verbose "Skipping a2-run.exp because of noargs." - continue + return } if $tracelevel then { @@ -36,17 +36,18 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set binfile "run" - -if ![file exists $objdir/$subdir/$binfile] then { - perror "$objdir/$subdir/$binfile does not exist." - return 0 +set testfile "run" +set srcfile ${srcdir}/$subdir/${testfile}.c +set binfile ${objdir}/${subdir}/${testfile} +if { [compile "${srcfile} -g -o ${binfile}"] != "" } { + perror "Couldn't compile ${srcfile}" + return -1 } gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir -gdb_load $objdir/$subdir/$binfile +gdb_load ${binfile} # Run with no arguments. # On VxWorks this justs make sure the program was run. |