diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/msym-lang-main.c | 28 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/msym-lang.c | 22 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/msym-lang.exp | 25 |
4 files changed, 81 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a0e614f..015028c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-11-09 Tom de Vries <tdevries@suse.de> + + * gdb.base/msym-lang.c: New test. + * gdb.base/msym-lang.exp: New file. + * gdb.base/msym-lang-main.c: New test. + 2018-11-08 Tom Tromey <tom@tromey.com> PR gdb/23555: diff --git a/gdb/testsuite/gdb.base/msym-lang-main.c b/gdb/testsuite/gdb.base/msym-lang-main.c new file mode 100644 index 0000000..f093f71 --- /dev/null +++ b/gdb/testsuite/gdb.base/msym-lang-main.c @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2018 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 <http://www.gnu.org/licenses/>. */ + +static int +foo (void) +{ + return 2; +} + +int +main (void) +{ + return 0; +} diff --git a/gdb/testsuite/gdb.base/msym-lang.c b/gdb/testsuite/gdb.base/msym-lang.c new file mode 100644 index 0000000..c961015 --- /dev/null +++ b/gdb/testsuite/gdb.base/msym-lang.c @@ -0,0 +1,22 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2018 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 <http://www.gnu.org/licenses/>. */ + +static int +foo (void) +{ + return 1; +} diff --git a/gdb/testsuite/gdb.base/msym-lang.exp b/gdb/testsuite/gdb.base/msym-lang.exp new file mode 100644 index 0000000..993225c --- /dev/null +++ b/gdb/testsuite/gdb.base/msym-lang.exp @@ -0,0 +1,25 @@ +# Copyright (C) 2018 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 <http://www.gnu.org/licenses/>. + +standard_testfile msym-lang-main.c msym-lang.c + +if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2] \ + {c++}]} { + return -1 +} + +clean_restart ${testfile} + +gdb_test "info func foo" ".* foo\\(\\).* foo\\(\\).*" |