diff options
author | Fred Fish <fnf@specifix.com> | 2003-12-09 18:19:20 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 2003-12-09 18:19:20 +0000 |
commit | a1dea79abed02b14c9984aecc843f1295366e54c (patch) | |
tree | ef2d6de68f91bb2ad567f20f2d21bd9016dbcbef /gdb/testsuite/gdb.base/define.exp | |
parent | 5533419b3dc29dea299870ccddd08fcb77187465 (diff) | |
download | gdb-a1dea79abed02b14c9984aecc843f1295366e54c.zip gdb-a1dea79abed02b14c9984aecc843f1295366e54c.tar.gz gdb-a1dea79abed02b14c9984aecc843f1295366e54c.tar.bz2 |
Committed after testing and independent approval/endorsement.
2003-12-09 Fred Fish <fnf@redhat.com>
* gdb.base/break.c (marker1, marker2, marker3, marker4): Move
functions to break1.c and leave prototypes behind. Add more
"set breakpoint NN here" comments.
* gdb.base/break1.c: New file.
* gdb.base/break.exp: Handle compiling test case from multiple
source files and change source file references as needed.
* gdb.base/completion.exp: Ditto.
* gdb.base/condbreak.exp: Ditto.
* gdb.base/define.exp: Ditto.
* gdb.base/ena-dis-br.exp: Ditto.
* gdb.base/info-proc.exp: Ditto.
* gdb.base/maint.exp: Ditto.
* gdb.base/until.exp: Ditto.
* gdb.base/condbreak.exp: Use bp_locationNN variables instead of
hardcoded line numbers.
* gdb.base/define.exp: Ditto.
* gdb.base/ena-dis-br.exp: Ditto.
* gdb.base/maint.exp: Ditto.
* gdb.base/until.exp: Ditto.
* gdb.base/completion.exp: Use "break1" for completion tests since
"break" is no longer a unique prefix.
Diffstat (limited to 'gdb/testsuite/gdb.base/define.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/define.exp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp index 06ea1c0..7e948f1 100644 --- a/gdb/testsuite/gdb.base/define.exp +++ b/gdb/testsuite/gdb.base/define.exp @@ -1,4 +1,4 @@ -# Copyright 1998, 1999, 2001 Free Software Foundation, Inc. +# Copyright 1998, 1999, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 @@ -34,10 +34,19 @@ set bug_id 0 set testfile "break" set srcfile ${testfile}.c +set srcfile1 ${testfile}1.c set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +} + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +} + +if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } gdb_exit @@ -45,6 +54,9 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} +set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] +set bp_location11 [gdb_get_line_number "set breakpoint 11 here"] + if ![runto_main] then { fail "define tests suppressed" } # Verify that GDB allows a user to define their very own commands. @@ -68,7 +80,7 @@ gdb_expect { # send_gdb "nextwhere\n" gdb_expect { - -re ".*79\[ \t\]*printf.*#0\[ \t\]*main.*:79.*$gdb_prompt $"\ + -re ".*$bp_location1\[ \t\]*printf.*#0\[ \t\]*main.*:$bp_location1.*$gdb_prompt $"\ {pass "use user command: nextwhere"} -re "$gdb_prompt $"\ {fail "use user command: nextwhere"} @@ -224,7 +236,7 @@ gdb_expect { send_gdb "next\n" gdb_expect { - -re "#0\[ \t\]*main.*:81.*$gdb_prompt $"\ + -re "#0\[ \t\]*main.*:$bp_location11.*$gdb_prompt $"\ {pass "use hook-stop command"} -re "$gdb_prompt $"\ {fail "use hook-stop command"} |