aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chastain <mec@google.com>2004-08-15 10:15:58 +0000
committerMichael Chastain <mec@google.com>2004-08-15 10:15:58 +0000
commit45f07fef904eaea82751dab3fca4fd15fc4b1302 (patch)
tree75f8e12d5d1e278ef1c332f986c4be7887fd5e87 /gdb/testsuite/gdb.mi/mi-file.exp
parent* configure.in: Add <ncurses/ncurses.h> to the list of possible (diff)
downloadbinutils-gdb-45f07fef904eaea82751dab3fca4fd15fc4b1302.tar.gz
binutils-gdb-45f07fef904eaea82751dab3fca4fd15fc4b1302.tar.bz2
binutils-gdb-45f07fef904eaea82751dab3fca4fd15fc4b1302.zip
2004-08-15 Michael Chastain <mec.gnu@mindspring.com>
* gdb.mi/mi-cli.exp: Use gdb_get_line_number. Remove reference to bug-gnu@prep.ai.mit.edu. * gdb.mi/mi-disassemble.exp: Likewise. * gdb.mi/mi-eval.exp: Likewise. * gdb.mi/mi-file.exp: Likewise. Also, add comment about the default line number. * gdb.mi/mi-return.exp: Likewise. * gdb.mi/mi-simplerun.exp: Likewise. * gdb.mi/mi-stack.exp: Likewise. * gdb.mi/mi-stepi.exp: Likewise. Also, replace wildcarded line number with explicit range test. * gdb.mi/mi-watch.exp: Likewise. * gdb.mi/mi2-break.exp: Likewise. * gdb.mi/mi2-cli.exp: Likewise. * gdb.mi/mi2-disassemble.exp: Likewise. * gdb.mi/mi2-eval.exp: Likewise. * gdb.mi/mi2-file.exp: Likewise. Also, add comment about the default line number. * gdb.mi/mi2-return.exp: Likewise. * gdb.mi/mi2-simplerun.exp: Likewise. * gdb.mi/mi2-stack.exp: Likewise. * gdb.mi/mi2-stepi.exp: Likewise. Also, replace wildcarded line number with explicit range test. * gdb.mi/mi2-watch.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-file.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-file.exp16
1 files changed, 12 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp
index 610749622bb..0ce4fd64948 100644
--- a/gdb/testsuite/gdb.mi/mi-file.exp
+++ b/gdb/testsuite/gdb.mi/mi-file.exp
@@ -14,9 +14,6 @@
# along with this program; if not, write to the Free Software
# 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
-
#
# Test essential Machine interface (MI) operations
#
@@ -54,8 +51,19 @@ proc test_file_list_exec_source_file {} {
set srcfilepath [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
# get the path and absolute path to the current executable
+ #
+ # In gdb 6.2 (at least), the default line number is set by
+ # select_source_symtab to the first line of "main" minus
+ # the value of "lines_to_list" (which defaults to 10) plus one.
+ # --chastain 2004-08-13
+
+ set line_main_head [gdb_get_line_number "main ("]
+ set line_main_body [expr $line_main_head + 2]
+ set gdb_lines_to_list 10
+ set line_default [expr $line_main_body - $gdb_lines_to_list + 1]
+
mi_gdb_test "111-file-list-exec-source-file" \
- "111\\\^done,line=\"23\",file=\"${srcfilepath}\",fullname=\"/.*/${srcfile}\"" \
+ "111\\\^done,line=\"$line_default\",file=\"${srcfilepath}\",fullname=\"/.*/${srcfile}\"" \
"request path info of current source file (${srcfile})"
}