aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/cp-relocate.cc
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-02-26 20:04:38 +0000
committerDaniel Jacobowitz <drow@false.org>2007-02-26 20:04:38 +0000
commit2711e4564f4ab411bdf2cedff3fb92abadd630b8 (patch)
tree53e997b7e4ecb939ec38343c531c5a7aab8aaf7c /gdb/testsuite/gdb.cp/cp-relocate.cc
parentbaef701fc2712c0e7119fc5e7996b15af154e88b (diff)
downloadgdb-2711e4564f4ab411bdf2cedff3fb92abadd630b8.zip
gdb-2711e4564f4ab411bdf2cedff3fb92abadd630b8.tar.gz
gdb-2711e4564f4ab411bdf2cedff3fb92abadd630b8.tar.bz2
* symfile.c (place_section): Check SEC_ALLOC. Do not check VMA.
(default_symfile_offsets): Check VMA here. Update section VMAs. * gdb.cp/cp-relocate.cc, gdb.cp/cp-relocate.exp: New.
Diffstat (limited to 'gdb/testsuite/gdb.cp/cp-relocate.cc')
-rw-r--r--gdb/testsuite/gdb.cp/cp-relocate.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/cp-relocate.cc b/gdb/testsuite/gdb.cp/cp-relocate.cc
new file mode 100644
index 0000000..e129d73
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/cp-relocate.cc
@@ -0,0 +1,29 @@
+/* This test file is part of GDB, the GNU debugger.
+
+ Copyright 2007
+ 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 2 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, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+template<int X> int func(int)
+{
+ return X;
+}
+
+int caller()
+{
+ return func<1>(1) + func<2>(2);
+}