From 54a7631206a2cf54573fb4cc94474cb2f6f99245 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Sun, 24 Nov 2019 09:37:22 +0100 Subject: [PATCH 2/2] Add a test case for line 65535 --- gdb/testsuite/gdb.base/line65535.c | 19 +++++++++++++++++++ gdb/testsuite/gdb.base/line65535.exp | 26 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 gdb/testsuite/gdb.base/line65535.c create mode 100644 gdb/testsuite/gdb.base/line65535.exp diff --git a/gdb/testsuite/gdb.base/line65535.c b/gdb/testsuite/gdb.base/line65535.c new file mode 100644 index 0000000..d80a294 --- /dev/null +++ b/gdb/testsuite/gdb.base/line65535.c @@ -0,0 +1,19 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2019 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 + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#line 65535 "line65535.c" +int main() { return 0; } diff --git a/gdb/testsuite/gdb.base/line65535.exp b/gdb/testsuite/gdb.base/line65535.exp new file mode 100644 index 0000000..2535ba5 --- /dev/null +++ b/gdb/testsuite/gdb.base/line65535.exp @@ -0,0 +1,26 @@ +# Copyright 2019 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +standard_testfile + +if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { + return -1 +} + +gdb_test "break $srcfile:65535" \ + ".*Breakpoint 1 at .*: file $srcfile, line 65535\\..*" \ + "break at line 65535" + +return 0 -- 1.9.1