2008-01-22 Pedro Alves * gdb.base/addbitsrem.c: New file. * gdb.base/addbitsrem.exp: New file. --- gdb/testsuite/gdb.base/addrbitsrem.c | 29 ++++++++++++++++ gdb/testsuite/gdb.base/addrbitsrem.exp | 57 +++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) Index: gdb-trunk/gdb/testsuite/gdb.base/addrbitsrem.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ gdb-trunk/gdb/testsuite/gdb.base/addrbitsrem.c 2008-01-22 12:16:57.000000000 -0800 @@ -0,0 +1,29 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2008 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 . */ + +int +main (int argc, char **argv) +{ + return argc; +} + +/* This should be the last function in the file, and it shall have no + code in it. */ +void +last_function (void) +{ +} Index: gdb-trunk/gdb/testsuite/gdb.base/addrbitsrem.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ gdb-trunk/gdb/testsuite/gdb.base/addrbitsrem.exp 2008-01-22 12:14:04.000000000 -0800 @@ -0,0 +1,57 @@ +# Copyright 2008 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 . + +if $tracelevel then { + strace $tracelevel +} + +# +# test running programs +# +set prms_id 0 +set bug_id 0 + +set testfile "addrbitsrem" +set srcfile ${testfile}.c +set binfile ${objdir}/${subdir}/${testfile} + +set binfile ${objdir}/${subdir}/${testfile} + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug nowarnings optimize=-O2}] != "" } { + untested addrbitsrem.exp + return -1 +} + +if { [gdb_compile "${binfile}.o" "${binfile}" executable {debug nowarnings}] != "" } { + untested addrbitsrem.exp + return -1 +} + +if [get_compiler_info ${binfile}] { + untested addrbitsrem.exp + return -1 +} + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir +gdb_load ${binfile} + +# +# test break at last_function +# +gdb_test "break last_function" \ + "Breakpoint.*at.* file .*$srcfile, line.*" \ + "breakpoint last_function"