aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-03-10 18:04:00 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-03-10 18:04:00 +0000
commit9112db09262029f15cc9e8c77fc06b79b8148e8c (patch)
tree09f1f3e63b12d2653db730f729b647ff360830cc /gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc
parent55e937314353eed91f473043e4faea1f6e3871a8 (diff)
downloadgdb-9112db09262029f15cc9e8c77fc06b79b8148e8c.zip
gdb-9112db09262029f15cc9e8c77fc06b79b8148e8c.tar.gz
gdb-9112db09262029f15cc9e8c77fc06b79b8148e8c.tar.bz2
gdb/
Fix entry-values in C++ across CUs. * dwarf2loc.c (call_site_to_target_addr) <FIELD_LOC_KIND_PHYSNAME>: Use lookup_minimal_symbol. Add a comment. * dwarf2read.c (read_call_site_scope) <is_ref_attr> <die_is_declaration>: Prefer DW_AT_linkage_name. gdb/testsuite/ Fix entry-values in C++ across CUs. * gdb.arch/amd64-tailcall-cxx.exp: New file. * gdb.arch/amd64-tailcall-cxx1.S: New file. * gdb.arch/amd64-tailcall-cxx1.cc: New file. * gdb.arch/amd64-tailcall-cxx2.S: New file. * gdb.arch/amd64-tailcall-cxx2.cc: New file.
Diffstat (limited to 'gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc')
-rw-r--r--gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc
new file mode 100644
index 0000000..7af9936
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.cc
@@ -0,0 +1,32 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2013 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/>. */
+
+volatile int v;
+
+__attribute__ ((noinline, noclone)) void
+g (int x)
+{
+ v = x;
+}
+
+extern void f (int x);
+
+int
+main ()
+{
+ f (1);
+}