From 45f07fef904eaea82751dab3fca4fd15fc4b1302 Mon Sep 17 00:00:00 2001 From: Michael Chastain Date: Sun, 15 Aug 2004 10:15:58 +0000 Subject: 2004-08-15 Michael Chastain * 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. --- gdb/testsuite/gdb.mi/mi-file.exp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'gdb/testsuite/gdb.mi/mi-file.exp') diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp index 6107496..0ce4fd6 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})" } -- cgit v1.1