[gdb] Rebase to FSF GDB 7.5.50.20130310 (pre-7.6 snapshot).
Jan Kratochvil
jankratochvil at fedoraproject.org
Sun Mar 10 16:12:52 UTC 2013
commit 1054fa6d0b04e767a444ca86c9eb6c549042f2a3
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date: Sun Mar 10 17:12:43 2013 +0100
Rebase to FSF GDB 7.5.50.20130310 (pre-7.6 snapshot).
- Fix various entry-values sub-optimal results.
.gitignore | 2 +-
gdb-6.6-buildid-locate-rpm.patch | 78 ++--
gdb-6.6-buildid-locate-solib-missing-ids.patch | 14 +-
gdb-6.6-buildid-locate.patch | 164 +++---
gdb-archer.patch | 115 ++--
gdb-entryval-1of2.patch | 872 ++++++++++++++++++++++++
gdb-entryval-2of2.patch | 845 +++++++++++++++++++++++
gdb-rhbz795424-bitpos-23of25.patch | 246 ++++----
gdb.spec | 17 +-
sources | 2 +-
10 files changed, 2049 insertions(+), 306 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0dc5293..a46cc98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
/gdb-libstdc++-v3-python-r155978.tar.bz2
-/gdb-7.5.50.20130215.tar.bz2
+/gdb-7.5.50.20130310.tar.bz2
diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch
index 0074db9..c24f309 100644
--- a/gdb-6.6-buildid-locate-rpm.patch
+++ b/gdb-6.6-buildid-locate-rpm.patch
@@ -1,7 +1,7 @@
-Index: gdb-7.5.50.20130215/gdb/event-top.c
+Index: gdb-7.5.50.20130310/gdb/event-top.c
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/event-top.c 2013-01-31 19:37:37.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/event-top.c 2013-02-15 22:36:11.217308539 +0100
+--- gdb-7.5.50.20130310.orig/gdb/event-top.c 2013-01-31 19:37:37.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/event-top.c 2013-03-10 16:44:05.471586917 +0100
@@ -36,6 +36,7 @@
#include "continuations.h"
#include "gdbcmd.h" /* for dont_repeat() */
@@ -28,10 +28,10 @@ Index: gdb-7.5.50.20130215/gdb/event-top.c
/* Each interpreter has its own rules on displaying the command
prompt. */
if (!current_interp_display_prompt_p ())
-Index: gdb-7.5.50.20130215/gdb/elfread.c
+Index: gdb-7.5.50.20130310/gdb/elfread.c
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/elfread.c 2013-02-15 22:35:36.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/elfread.c 2013-02-15 22:35:59.414292874 +0100
+--- gdb-7.5.50.20130310.orig/gdb/elfread.c 2013-03-10 16:38:01.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/elfread.c 2013-03-10 16:44:05.472586918 +0100
@@ -49,6 +49,7 @@
#include "gdbcore.h"
#include "gdbcmd.h"
@@ -40,7 +40,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
#include <sys/stat.h>
extern void _initialize_elfread (void);
-@@ -1649,8 +1650,361 @@ build_id_to_filename (struct build_id *b
+@@ -1628,8 +1629,361 @@ build_id_to_filename (const struct elf_b
return retval;
}
@@ -403,7 +403,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
avoidance. */
struct missing_filepair
-@@ -1704,11 +2058,17 @@ missing_filepair_change (void)
+@@ -1683,11 +2037,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL;
}
@@ -421,7 +421,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
missing_filepair_change ();
}
-@@ -1775,14 +2135,35 @@ debug_print_missing (const char *binary,
+@@ -1754,14 +2114,35 @@ debug_print_missing (const char *binary,
*slot = missing_filepair;
@@ -464,12 +464,12 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
}
static char *
-Index: gdb-7.5.50.20130215/gdb/symfile.h
+Index: gdb-7.5.50.20130310/gdb/symfile.h
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/symfile.h 2013-02-15 22:35:03.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/symfile.h 2013-02-15 22:35:59.414292874 +0100
-@@ -599,6 +599,8 @@ extern struct build_id *build_id_addr_ge
- extern char *build_id_to_filename (struct build_id *build_id,
+--- gdb-7.5.50.20130310.orig/gdb/symfile.h 2013-03-10 16:37:41.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/symfile.h 2013-03-10 16:44:23.409591946 +0100
+@@ -598,6 +598,8 @@ extern struct elf_build_id *build_id_add
+ extern char *build_id_to_filename (const struct elf_build_id *build_id,
char **link_return, int add_debug_suffix);
extern void debug_print_missing (const char *binary, const char *debug);
+extern void debug_flush_missing (void);
@@ -477,10 +477,10 @@ Index: gdb-7.5.50.20130215/gdb/symfile.h
/* From dwarf2read.c */
-Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.5.50.20130310/gdb/testsuite/lib/gdb.exp
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:03.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:59.415292878 +0100
+--- gdb-7.5.50.20130310.orig/gdb/testsuite/lib/gdb.exp 2013-03-10 16:17:15.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/testsuite/lib/gdb.exp 2013-03-10 16:44:05.474586918 +0100
@@ -1482,7 +1482,7 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
@@ -490,10 +490,10 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp
send_gdb "set build-id-verbose 0\n"
gdb_expect 10 {
-re "$gdb_prompt $" {
-Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.5.50.20130310/gdb/testsuite/lib/mi-support.exp
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:03.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:59.416292881 +0100
+--- gdb-7.5.50.20130310.orig/gdb/testsuite/lib/mi-support.exp 2013-03-10 16:17:15.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/testsuite/lib/mi-support.exp 2013-03-10 16:44:05.475586918 +0100
@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0."
}
@@ -503,10 +503,10 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp
send_gdb "190-gdb-set build-id-verbose 0\n"
gdb_expect 10 {
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
-Index: gdb-7.5.50.20130215/gdb/tui/tui-interp.c
+Index: gdb-7.5.50.20130310/gdb/tui/tui-interp.c
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/tui/tui-interp.c 2013-01-01 07:41:30.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/tui/tui-interp.c 2013-02-15 22:35:59.416292881 +0100
+--- gdb-7.5.50.20130310.orig/gdb/tui/tui-interp.c 2013-01-01 07:41:30.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/tui/tui-interp.c 2013-03-10 16:44:05.475586918 +0100
@@ -30,6 +30,7 @@
#include "tui/tui.h"
#include "tui/tui-io.h"
@@ -515,10 +515,10 @@ Index: gdb-7.5.50.20130215/gdb/tui/tui-interp.c
/* Set to 1 when the TUI mode must be activated when we first start
gdb. */
-Index: gdb-7.5.50.20130215/gdb/aclocal.m4
+Index: gdb-7.5.50.20130310/gdb/aclocal.m4
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/aclocal.m4 2013-01-17 12:06:26.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/aclocal.m4 2013-02-15 22:35:59.417292883 +0100
+--- gdb-7.5.50.20130310.orig/gdb/aclocal.m4 2013-01-17 12:06:26.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/aclocal.m4 2013-03-10 16:44:05.475586918 +0100
@@ -11,6 +11,164 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@@ -684,10 +684,10 @@ Index: gdb-7.5.50.20130215/gdb/aclocal.m4
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-Index: gdb-7.5.50.20130215/gdb/config.in
+Index: gdb-7.5.50.20130310/gdb/config.in
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/config.in 2012-12-09 19:39:58.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/config.in 2013-02-15 22:35:59.417292883 +0100
+--- gdb-7.5.50.20130310.orig/gdb/config.in 2012-12-09 19:39:58.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/config.in 2013-03-10 16:44:05.476586918 +0100
@@ -33,6 +33,9 @@
/* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC
@@ -708,10 +708,10 @@ Index: gdb-7.5.50.20130215/gdb/config.in
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H
-Index: gdb-7.5.50.20130215/gdb/configure
+Index: gdb-7.5.50.20130310/gdb/configure
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/configure 2013-01-09 18:21:33.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/configure 2013-02-15 22:35:59.422292893 +0100
+--- gdb-7.5.50.20130310.orig/gdb/configure 2013-01-09 18:21:33.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/configure 2013-03-10 16:44:05.480586919 +0100
@@ -683,6 +683,11 @@ REPORT_BUGS_TO
PKGVERSION
TARGET_OBS
@@ -1259,10 +1259,10 @@ Index: gdb-7.5.50.20130215/gdb/configure
subdirs="$subdirs testsuite"
-Index: gdb-7.5.50.20130215/gdb/configure.ac
+Index: gdb-7.5.50.20130310/gdb/configure.ac
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-01-09 18:21:35.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:35:59.423292895 +0100
+--- gdb-7.5.50.20130310.orig/gdb/configure.ac 2013-01-09 18:21:35.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/configure.ac 2013-03-10 16:44:05.481586919 +0100
@@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
[Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path])
@@ -1463,11 +1463,11 @@ Index: gdb-7.5.50.20130215/gdb/configure.ac
AC_CONFIG_SUBDIRS(testsuite)
# Check whether to support alternative target configurations
-Index: gdb-7.5.50.20130215/gdb/corelow.c
+Index: gdb-7.5.50.20130310/gdb/corelow.c
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/corelow.c 2013-02-15 22:35:03.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/corelow.c 2013-02-15 22:35:59.423292895 +0100
-@@ -313,7 +313,7 @@ build_id_locate_exec (int from_tty)
+--- gdb-7.5.50.20130310.orig/gdb/corelow.c 2013-03-10 16:36:37.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/corelow.c 2013-03-10 16:44:05.481586919 +0100
+@@ -314,7 +314,7 @@ build_id_locate_exec (int from_tty)
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
}
else
diff --git a/gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch
index 9a6a15e..9ad7fcb 100644
--- a/gdb-6.6-buildid-locate-solib-missing-ids.patch
+++ b/gdb-6.6-buildid-locate-solib-missing-ids.patch
@@ -1,11 +1,13 @@
---- gdb-7.4.50.20120120/gdb/solib-svr4.c.orig 2012-03-17 10:23:11.000000000 +0100
-+++ gdb-7.4.50.20120120/gdb/solib-svr4.c 2012-03-17 10:36:22.265628529 +0100
-@@ -1228,14 +1228,27 @@ svr4_read_so_list (CORE_ADDR lm, struct
+Index: gdb-7.5.50.20130310/gdb/solib-svr4.c
+===================================================================
+--- gdb-7.5.50.20130310.orig/gdb/solib-svr4.c 2013-03-10 16:37:49.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/solib-svr4.c 2013-03-10 16:43:45.498585091 +0100
+@@ -1225,14 +1225,27 @@ svr4_read_so_list (CORE_ADDR lm, struct
}
{
-- struct build_id *build_id;
-+ struct build_id *build_id = NULL;
+- struct elf_build_id *build_id;
++ struct elf_build_id *build_id = NULL;
strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
@@ -30,7 +32,7 @@
if (build_id != NULL)
{
char *name, *build_id_filename;
-@@ -1250,23 +1263,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
+@@ -1247,23 +1260,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
xfree (name);
}
else
diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch
index b4ca895..a363d1f 100644
--- a/gdb-6.6-buildid-locate.patch
+++ b/gdb-6.6-buildid-locate.patch
@@ -1,7 +1,7 @@
-Index: gdb-7.5.50.20130215/gdb/corelow.c
+Index: gdb-7.5.50.20130310/gdb/corelow.c
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/corelow.c 2013-01-31 19:37:37.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/corelow.c 2013-02-15 22:35:03.278219844 +0100
+--- gdb-7.5.50.20130310.orig/gdb/corelow.c 2013-01-31 19:37:37.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/corelow.c 2013-03-10 16:36:37.019937408 +0100
@@ -46,6 +46,9 @@
#include "progspace.h"
#include "objfiles.h"
@@ -12,7 +12,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
-@@ -271,6 +274,52 @@ add_to_thread_list (bfd *abfd, asection
+@@ -271,6 +274,53 @@ add_to_thread_list (bfd *abfd, asection
inferior_ptid = ptid; /* Yes, make it current. */
}
@@ -22,7 +22,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c
+build_id_locate_exec (int from_tty)
+{
+ CORE_ADDR at_entry;
-+ struct build_id *build_id;
++ struct elf_build_id *build_id;
+ char *exec_filename, *debug_filename;
+ char *build_id_filename;
+ struct cleanup *back_to;
@@ -36,6 +36,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c
+ build_id = build_id_addr_get (at_entry);
+ if (build_id == NULL)
+ return;
++ back_to = make_cleanup (xfree, build_id);
+
+ /* SYMFILE_OBJFILE should refer to the main executable (not only to its
+ separate debug info file). gcc44+ keeps .eh_frame only in the main
@@ -44,7 +45,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c
+ directly to the separate debug info file. */
+
+ exec_filename = build_id_to_filename (build_id, &build_id_filename, 0);
-+ back_to = make_cleanup (xfree, build_id_filename);
++ make_cleanup (xfree, build_id_filename);
+
+ if (exec_filename != NULL)
+ {
@@ -65,7 +66,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c
/* This routine opens and sets up the core file bfd. */
static void
-@@ -409,6 +458,14 @@ core_open (char *filename, int from_tty)
+@@ -409,6 +459,14 @@ core_open (char *filename, int from_tty)
switch_to_thread (thread->ptid);
}
@@ -80,7 +81,7 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c
post_create_inferior (&core_ops, from_tty);
/* Now go through the target stack looking for threads since there
-@@ -978,4 +1035,11 @@ _initialize_corelow (void)
+@@ -978,4 +1036,11 @@ _initialize_corelow (void)
init_core_ops ();
add_target (&core_ops);
@@ -92,11 +93,11 @@ Index: gdb-7.5.50.20130215/gdb/corelow.c
+ NULL, NULL, NULL,
+ &setlist, &showlist);
}
-Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo
+Index: gdb-7.5.50.20130310/gdb/doc/gdb.texinfo
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo 2013-02-15 22:34:22.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo 2013-02-15 22:35:03.287219863 +0100
-@@ -16662,6 +16662,27 @@ information files.
+--- gdb-7.5.50.20130310.orig/gdb/doc/gdb.texinfo 2013-03-10 16:16:23.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/doc/gdb.texinfo 2013-03-10 16:17:15.216114613 +0100
+@@ -16680,6 +16680,27 @@ information files.
@end table
@@ -124,10 +125,10 @@ Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo
@cindex @code{.gnu_debuglink} sections
@cindex debug link sections
A debug link is a special section of the executable file named
-Index: gdb-7.5.50.20130215/gdb/solib-svr4.c
+Index: gdb-7.5.50.20130310/gdb/solib-svr4.c
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/solib-svr4.c 2013-01-31 14:52:52.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/solib-svr4.c 2013-02-15 22:35:03.287219863 +0100
+--- gdb-7.5.50.20130310.orig/gdb/solib-svr4.c 2013-01-31 14:52:52.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/solib-svr4.c 2013-03-10 16:37:49.842963280 +0100
@@ -1224,9 +1224,52 @@ svr4_read_so_list (CORE_ADDR lm, struct
continue;
}
@@ -136,7 +137,7 @@ Index: gdb-7.5.50.20130215/gdb/solib-svr4.c
- new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
- strcpy (new->so_original_name, new->so_name);
+ {
-+ struct build_id *build_id;
++ struct elf_build_id *build_id;
+
+ strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
+ new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
@@ -184,10 +185,10 @@ Index: gdb-7.5.50.20130215/gdb/solib-svr4.c
xfree (buffer);
/* If this entry has no name, or its name matches the name
-Index: gdb-7.5.50.20130215/gdb/elfread.c
+Index: gdb-7.5.50.20130310/gdb/elfread.c
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/elfread.c 2013-02-01 20:39:03.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/elfread.c 2013-02-15 22:35:36.826263354 +0100
+--- gdb-7.5.50.20130310.orig/gdb/elfread.c 2013-03-06 22:20:02.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/elfread.c 2013-03-10 16:38:01.506968687 +0100
@@ -45,6 +45,11 @@
#include "regcache.h"
#include "bcache.h"
@@ -200,10 +201,11 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
extern void _initialize_elfread (void);
-@@ -1074,16 +1079,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
+@@ -1067,10 +1072,59 @@ elf_gnu_ifunc_resolver_return_stop (stru
update_breakpoint_locations (b, sals, sals_end);
}
+-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */
+#define BUILD_ID_VERBOSE_NONE 0
+#define BUILD_ID_VERBOSE_FILENAMES 1
+#define BUILD_ID_VERBOSE_BINARY_PARSE 2
@@ -216,18 +218,10 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+ value);
+}
+
- struct build_id
- {
- size_t size;
- gdb_byte data[1];
- };
-
--/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
-
- static struct build_id *
--build_id_bfd_get (bfd *abfd)
++
++static struct elf_build_id *
+build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size)
+{
+ bfd_byte *p;
@@ -247,7 +241,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+ {
+ size_t size = descsz;
+ gdb_byte *data = (void *) descdata;
-+ struct build_id *retval;
++ struct elf_build_id *retval;
+
+ retval = xmalloc (sizeof *retval - 1 + size);
+ retval->size = size;
@@ -262,26 +256,27 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+
+/* Separate debuginfo files have corrupted PHDR but SHDR is correct there.
+ Locate NT_GNU_BUILD_ID from ABFD and return its content. */
-+
-+static struct build_id *
+
+ static const struct elf_build_id *
+-build_id_bfd_get (bfd *abfd)
+build_id_bfd_shdr_get (bfd *abfd)
{
- struct build_id *retval;
-
-@@ -1099,6 +1153,348 @@ build_id_bfd_get (bfd *abfd)
- return retval;
+ if (!bfd_check_format (abfd, bfd_object)
+ || bfd_get_flavour (abfd) != bfd_target_elf_flavour
+@@ -1080,6 +1134,348 @@ build_id_bfd_get (bfd *abfd)
+ return elf_tdata (abfd)->build_id;
}
+/* Core files may have missing (corrupt) SHDR but PDHR is correct there.
+ bfd_elf_bfd_from_remote_memory () has too much overhead by
+ allocating/reading all the available ELF PT_LOADs. */
+
-+static struct build_id *
++static struct elf_build_id *
+build_id_phdr_get (bfd *templ, bfd_vma loadbase, unsigned e_phnum,
+ Elf_Internal_Phdr *i_phdr)
+{
+ int i;
-+ struct build_id *retval = NULL;
++ struct elf_build_id *retval = NULL;
+
+ for (i = 0; i < e_phnum; i++)
+ if (i_phdr[i].p_type == PT_NOTE && i_phdr[i].p_filesz > 0)
@@ -568,11 +563,11 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+ }
+}
+
-+struct build_id *
++struct elf_build_id *
+build_id_addr_get (CORE_ADDR addr)
+{
+ struct build_id_addr_sect *candidate;
-+ struct build_id *retval = NULL;
++ struct elf_build_id *retval = NULL;
+ Elf_Internal_Phdr *i_phdr = NULL;
+ bfd_vma loadbase = 0;
+ unsigned e_phnum = 0;
@@ -617,7 +612,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
static int
-@@ -1113,7 +1509,7 @@ build_id_verify (const char *filename, s
+@@ -1094,7 +1490,7 @@ build_id_verify (const char *filename, c
if (abfd == NULL)
return 0;
@@ -626,14 +621,14 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), filename);
-@@ -1131,17 +1527,18 @@ build_id_verify (const char *filename, s
+@@ -1110,17 +1506,18 @@ build_id_verify (const char *filename, c
return retval;
}
-static char *
--build_id_to_debug_filename (struct build_id *build_id)
+-build_id_to_debug_filename (const struct elf_build_id *build_id)
+char *
-+build_id_to_filename (struct build_id *build_id, char **link_return,
++build_id_to_filename (const struct elf_build_id *build_id, char **link_return,
+ int add_debug_suffix)
{
char *link, *debugdir, *retval = NULL;
@@ -649,16 +644,16 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */
-@@ -1154,6 +1551,8 @@ build_id_to_debug_filename (struct build
+@@ -1133,6 +1530,8 @@ build_id_to_debug_filename (const struct
size_t debugdir_len = strlen (debugdir);
- gdb_byte *data = build_id->data;
+ const gdb_byte *data = build_id->data;
size_t size = build_id->size;
+ unsigned seqno;
+ struct stat statbuf_trash;
char *s;
memcpy (link, debugdir, debugdir_len);
-@@ -1168,37 +1567,240 @@ build_id_to_debug_filename (struct build
+@@ -1147,37 +1546,240 @@ build_id_to_debug_filename (const struct
*s++ = '/';
while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++);
@@ -686,15 +681,15 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+ strcpy (s2, ".debug");
+ else
+ *s2 = 0;
-
-- if (retval != NULL && !build_id_verify (retval, build_id))
++
+ /* `access' automatically dereferences LINK. */
+ if (lstat (link, &statbuf_trash) != 0)
+ {
+ /* Stop increasing SEQNO. */
+ break;
+ }
-+
+
+- if (retval != NULL && !build_id_verify (retval, build_id))
+ retval = lrealpath (link);
+
+ if (retval != NULL && !build_id_verify (retval, build_id))
@@ -735,15 +730,15 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+ {
if (retval != NULL)
- break;
-+ {
-+ *link_return = link;
-+ link = NULL;
-+ }
++ {
++ *link_return = link;
++ link = NULL;
++ }
+ else
-+ {
-+ *link_return = link_all;
-+ link_all = NULL;
-+ }
++ {
++ *link_return = link_all;
++ link_all = NULL;
++ }
}
+ xfree (link);
+ xfree (link_all);
@@ -893,7 +888,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+find_separate_debug_file_by_buildid (struct objfile *objfile,
+ char **build_id_filename_return)
{
- struct build_id *build_id;
+ const struct elf_build_id *build_id;
- build_id = build_id_bfd_get (objfile->obfd);
+ if (build_id_filename_return)
@@ -907,10 +902,10 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
- build_id_name = build_id_to_debug_filename (build_id);
+ build_id_name = build_id_to_filename (build_id, build_id_filename_return,
+ 1);
- xfree (build_id);
/* Prevent looping on a stripped .debug file. */
if (build_id_name != NULL
-@@ -1209,7 +1811,7 @@ find_separate_debug_file_by_buildid (str
+ && filename_cmp (build_id_name, objfile->name) == 0)
+@@ -1187,7 +1789,7 @@ find_separate_debug_file_by_buildid (str
xfree (build_id_name);
}
else if (build_id_name != NULL)
@@ -919,7 +914,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
}
return NULL;
}
-@@ -1444,9 +2046,10 @@ elf_symfile_read (struct objfile *objfil
+@@ -1425,9 +2027,10 @@ elf_symfile_read (struct objfile *objfil
&& objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL)
{
@@ -932,7 +927,7 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile);
-@@ -1460,6 +2063,12 @@ elf_symfile_read (struct objfile *objfil
+@@ -1441,6 +2044,12 @@ elf_symfile_read (struct objfile *objfil
symbol_file_add_separate (abfd, symfile_flags, objfile);
do_cleanups (cleanup);
}
@@ -943,9 +938,9 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+
+ xfree (build_id_filename);
}
+ }
- if (symtab_create_debug)
-@@ -1782,4 +2391,16 @@ _initialize_elfread (void)
+@@ -1760,4 +2369,16 @@ _initialize_elfread (void)
elf_objfile_gnu_ifunc_cache_data = register_objfile_data ();
gnu_ifunc_fns_p = &elf_gnu_ifunc_fns;
@@ -962,28 +957,27 @@ Index: gdb-7.5.50.20130215/gdb/elfread.c
+
+ observer_attach_executable_changed (debug_print_executable_changed);
}
-Index: gdb-7.5.50.20130215/gdb/symfile.h
+Index: gdb-7.5.50.20130310/gdb/symfile.h
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/symfile.h 2013-02-03 17:20:18.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/symfile.h 2013-02-15 22:35:03.288219867 +0100
-@@ -593,6 +593,13 @@ void free_symfile_segment_data (struct s
+--- gdb-7.5.50.20130310.orig/gdb/symfile.h 2013-02-03 17:20:18.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/symfile.h 2013-03-10 16:37:41.203959517 +0100
+@@ -593,6 +593,12 @@ void free_symfile_segment_data (struct s
extern struct cleanup *increment_reading_symtab (void);
+/* build-id support. */
-+struct build_id;
-+extern struct build_id *build_id_addr_get (CORE_ADDR addr);
-+extern char *build_id_to_filename (struct build_id *build_id,
++extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr);
++extern char *build_id_to_filename (const struct elf_build_id *build_id,
+ char **link_return, int add_debug_suffix);
+extern void debug_print_missing (const char *binary, const char *debug);
+
/* From dwarf2read.c */
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
-Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.5.50.20130310/gdb/testsuite/lib/gdb.exp
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/gdb.exp 2013-02-15 22:31:37.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp 2013-02-15 22:35:03.289219870 +0100
+--- gdb-7.5.50.20130310.orig/gdb/testsuite/lib/gdb.exp 2013-03-10 16:16:22.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/testsuite/lib/gdb.exp 2013-03-10 16:17:15.219114612 +0100
@@ -1482,6 +1482,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
@@ -1001,10 +995,10 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/lib/gdb.exp
return 0;
}
-Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.5.50.20130310/gdb/testsuite/lib/mi-support.exp
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/testsuite/lib/mi-support.exp 2013-01-22 00:57:59.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp 2013-02-15 22:35:03.289219870 +0100
+--- gdb-7.5.50.20130310.orig/gdb/testsuite/lib/mi-support.exp 2013-01-22 00:57:59.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/testsuite/lib/mi-support.exp 2013-03-10 16:17:15.220114612 +0100
@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0."
}
@@ -1022,10 +1016,10 @@ Index: gdb-7.5.50.20130215/gdb/testsuite/lib/mi-support.exp
# If allowing the inferior to have its own PTY then assign the inferior
# its own terminal device here.
if { $separate_inferior_pty } {
-Index: gdb-7.5.50.20130215/gdb/objfiles.h
+Index: gdb-7.5.50.20130310/gdb/objfiles.h
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/objfiles.h 2013-01-01 07:32:47.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/objfiles.h 2013-02-15 22:35:03.290219872 +0100
+--- gdb-7.5.50.20130310.orig/gdb/objfiles.h 2013-02-28 20:00:31.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/objfiles.h 2013-03-10 16:17:15.220114612 +0100
@@ -432,6 +432,10 @@ struct objfile
#define OBJF_MAINLINE (1 << 5)
@@ -1037,10 +1031,10 @@ Index: gdb-7.5.50.20130215/gdb/objfiles.h
/* The object file that contains the runtime common minimal symbols
for SunOS4. Note that this objfile has no associated BFD. */
-Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.base/corefile.exp
+Index: gdb-7.5.50.20130310/gdb/testsuite/gdb.base/corefile.exp
===================================================================
---- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.base/corefile.exp 2013-01-01 07:33:25.000000000 +0100
-+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.base/corefile.exp 2013-02-15 22:35:03.290219872 +0100
+--- gdb-7.5.50.20130310.orig/gdb/testsuite/gdb.base/corefile.exp 2013-01-01 07:33:25.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/testsuite/gdb.base/corefile.exp 2013-03-10 16:17:15.220114612 +0100
@@ -256,3 +256,33 @@ if ![is_remote target] {
gdb_exit
diff --git a/gdb-archer.patch b/gdb-archer.patch
index fd2862b..4060cc0 100644
--- a/gdb-archer.patch
+++ b/gdb-archer.patch
@@ -2,13 +2,32 @@ http://sourceware.org/gdb/wiki/ProjectArcher
http://sourceware.org/gdb/wiki/ArcherBranchManagement
GIT snapshot:
-commit e72ce29f8e339fc6fffd73e9ff4b854b6f2f1452
+commit 92cf2d53a9c69b4fb361de662de9100c6e72caa0
-branch `archer' - the merge of branches:
-archer-jankratochvil-vla
-archer-tromey-python
+branch jankratochvil/fedora19 - the merge of branches:
+jankratochvil/vla
+tromey/python
+diff --git a/README.archer b/README.archer
+new file mode 100644
+index 0000000..1f7ab48
+--- /dev/null
++++ b/README.archer
+@@ -0,0 +1,13 @@
++Merge for Fedora 19: http://pkgs.fedoraproject.org/cgit/gdb.git/
++
++jankratochvil/vla
++tromey/python
++
++================================================================
++This branch originally held the Python code for gdb. It still exists
++because a small amount of code here has not yet been merged upstream.
++
++================================================================
++C variable length arrays / DW_FORM_block / Fortran dynamic arrays.
++implementation plan: http://sourceware.org/ml/gdb/2012-11/msg00094.html
++explanation of its merge status: http://sourceware.org/ml/gdb/2011-03/msg00021.html
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ed30db5..4356be7 100644
--- a/gdb/Makefile.in
@@ -27,10 +46,10 @@ index ed30db5..4356be7 100644
$(SHELL) config.status --recheck
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
-index 634e761..60276dc 100644
+index 75f1c3d..6243818 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
-@@ -12262,6 +12262,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp,
+@@ -12287,6 +12287,7 @@ ada_operator_length (const struct expression *exp, int pc, int *oplenp,
static int
ada_operator_check (struct expression *exp, int pos,
@@ -38,7 +57,7 @@ index 634e761..60276dc 100644
int (*objfile_func) (struct objfile *objfile, void *data),
void *data)
{
-@@ -12276,12 +12277,15 @@ ada_operator_check (struct expression *exp, int pos,
+@@ -12301,12 +12302,15 @@ ada_operator_check (struct expression *exp, int pos,
break;
default:
@@ -94,10 +113,10 @@ index 02e7e8b..2931401 100644
+
#endif /* BLOCK_H */
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
-index fb57a57..5c03b1c 100644
+index d6f8bc5..8a14224 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
-@@ -15656,6 +15656,24 @@ all_tracepoints (void)
+@@ -15653,6 +15653,24 @@ all_tracepoints (void)
return tp_vec;
}
@@ -122,7 +141,7 @@ index fb57a57..5c03b1c 100644
/* This help string is used for the break, hbreak, tbreak and thbreak
commands. It is defined as a macro to prevent duplication.
-@@ -16639,4 +16657,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\
+@@ -16636,4 +16654,7 @@ agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\
automatic_hardware_breakpoints = 1;
observer_attach_about_to_proceed (breakpoint_about_to_proceed);
@@ -187,10 +206,10 @@ index d98ac77..e248399 100644
FLAGS_TO_PASS = \
"prefix=$(prefix)" \
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
-index e8ac8c5..b18ccd6 100644
+index a607166..6913628 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
-@@ -1217,6 +1217,16 @@ for remote debugging.
+@@ -1216,6 +1216,16 @@ for remote debugging.
Run using @var{device} for your program's standard input and output.
@c FIXME: kingdon thinks there is more to -tty. Investigate.
@@ -207,7 +226,7 @@ index e8ac8c5..b18ccd6 100644
@c resolve the situation of these eventually
@item -tui
@cindex @code{--tui}
-@@ -22786,8 +22796,6 @@ containing @code{end}. For example:
+@@ -22804,8 +22814,6 @@ containing @code{end}. For example:
@smallexample
(@value{GDBP}) python
@@ -216,7 +235,7 @@ index e8ac8c5..b18ccd6 100644
>print 23
>end
23
-@@ -22801,6 +22809,14 @@ controlled using @code{set python print-stack}: if @code{full}, then
+@@ -22819,6 +22827,14 @@ controlled using @code{set python print-stack}: if @code{full}, then
full Python stack printing is enabled; if @code{none}, then Python stack
and message printing is disabled; if @code{message}, the default, only
the message component of the error is printed.
@@ -231,7 +250,7 @@ index e8ac8c5..b18ccd6 100644
@end table
It is also possible to execute a Python script from the @value{GDBN}
-@@ -22822,6 +22838,14 @@ and thus is always available.
+@@ -22840,6 +22856,14 @@ and thus is always available.
@cindex python api
@cindex programming in python
@@ -428,7 +447,7 @@ index e85486a..e7ac799 100644
/* The location of a value. */
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
-index 002387e..2e0e722 100644
+index 8a61ae6..451a759 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -298,6 +298,9 @@ struct dwarf_expr_baton
@@ -571,7 +590,7 @@ index 002387e..2e0e722 100644
/* Callback function for dwarf2_evaluate_loc_desc. */
static struct type *
-@@ -1155,10 +1248,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
+@@ -1156,10 +1249,12 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
saved_ctx.gdbarch = ctx->gdbarch;
saved_ctx.addr_size = ctx->addr_size;
@@ -584,7 +603,7 @@ index 002387e..2e0e722 100644
ctx->offset = dwarf2_per_cu_text_offset (baton_local.per_cu);
ctx->baton = &baton_local;
-@@ -1166,10 +1261,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
+@@ -1167,10 +1262,95 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
ctx->gdbarch = saved_ctx.gdbarch;
ctx->addr_size = saved_ctx.addr_size;
@@ -680,7 +699,7 @@ index 002387e..2e0e722 100644
/* Callback function for dwarf2_evaluate_loc_desc.
Fetch the address indexed by DW_OP_GNU_addr_index. */
-@@ -2105,22 +2285,6 @@ invalid_synthetic_pointer (void)
+@@ -2106,22 +2286,6 @@ invalid_synthetic_pointer (void)
"referenced via synthetic pointer"));
}
@@ -703,7 +722,7 @@ index 002387e..2e0e722 100644
/* Evaluate a location description, starting at DATA and with length
SIZE, to find the current location of variable of TYPE in the
context of FRAME. BYTE_OFFSET is applied after the contents are
-@@ -2133,7 +2297,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
+@@ -2134,7 +2298,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
LONGEST byte_offset)
{
struct value *retval;
@@ -711,7 +730,7 @@ index 002387e..2e0e722 100644
struct dwarf_expr_context *ctx;
struct cleanup *old_chain, *value_chain;
struct objfile *objfile = dwarf2_per_cu_objfile (per_cu);
-@@ -2145,29 +2308,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
+@@ -2146,29 +2309,18 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
if (size == 0)
return allocate_optimized_out_value (type);
@@ -742,7 +761,7 @@ index 002387e..2e0e722 100644
retval = allocate_value (type);
mark_value_bytes_unavailable (retval, 0, TYPE_LENGTH (type));
return retval;
-@@ -2231,6 +2383,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
+@@ -2232,6 +2384,16 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
do_cleanups (value_chain);
@@ -759,7 +778,7 @@ index 002387e..2e0e722 100644
retval = allocate_value_lazy (type);
VALUE_LVAL (retval) = lval_memory;
if (in_stack_memory)
-@@ -4147,8 +4309,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
+@@ -4148,8 +4310,7 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
dlbaton->per_cu);
}
@@ -769,7 +788,7 @@ index 002387e..2e0e722 100644
const struct symbol_computed_ops dwarf2_loclist_funcs = {
loclist_read_variable,
loclist_read_variable_at_entry,
-@@ -4157,6 +4318,48 @@ const struct symbol_computed_ops dwarf2_loclist_funcs = {
+@@ -4158,6 +4319,48 @@ const struct symbol_computed_ops dwarf2_loclist_funcs = {
loclist_tracepoint_var_ref
};
@@ -839,7 +858,7 @@ index 36641b3..1394578 100644
/* Compile a DWARF location expression to an agent expression.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
-index d26e7c8..9fbe61e 100644
+index df6298b..b11abf0 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1624,6 +1624,9 @@ static void fill_in_loclist_baton (struct dwarf2_cu *cu,
@@ -1071,7 +1090,7 @@ index d26e7c8..9fbe61e 100644
type = create_string_type (NULL, char_type, range_type);
@@ -12739,7 +12858,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
- struct type *base_type;
+ struct type *base_type, *orig_base_type;
struct type *range_type;
struct attribute *attr;
- LONGEST low, high;
@@ -1079,7 +1098,7 @@ index d26e7c8..9fbe61e 100644
int low_default_is_valid;
const char *name;
LONGEST negative_mask;
-@@ -12795,42 +12914,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -12798,42 +12917,6 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
"- DIE at 0x%x [in module %s]"),
die->offset.sect_off, cu->objfile->name);
@@ -1122,13 +1141,13 @@ index d26e7c8..9fbe61e 100644
/* Dwarf-2 specifications explicitly allows to create subrange types
without specifying a base type.
In that case, the base type must be set to the type of
-@@ -12869,24 +12952,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -12872,24 +12955,163 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
}
}
- negative_mask =
+ /* LOW_BOUND and HIGH_BOUND are set for real below. */
-+ range_type = create_range_type (NULL, base_type, 0, -1);
++ range_type = create_range_type (NULL, orig_base_type, 0, -1);
+ TYPE_UNSIGNED (range_type) = 0;
+
+ negative_mask =
@@ -1138,7 +1157,7 @@ index d26e7c8..9fbe61e 100644
- if (!TYPE_UNSIGNED (base_type) && (high & negative_mask))
- high |= negative_mask;
-- range_type = create_range_type (NULL, base_type, low, high);
+- range_type = create_range_type (NULL, orig_base_type, low, high);
+ /* Exclude language_ada from any TYPE_DYNAMIC constructs below. GDB Ada
+ supports implements the dynamic bounds in a non-DWARF way and the
+ existing DWARF dynamic bounds are invalid, leading to memory access
@@ -1300,7 +1319,7 @@ index d26e7c8..9fbe61e 100644
name = dwarf2_name (die, cu);
if (name)
-@@ -15746,10 +15968,12 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
+@@ -15749,10 +15971,12 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
(i.e. when the value of a register or memory location is
referenced, or a thread-local block, etc.). Then again, it might
not be worthwhile. I'm assuming that it isn't unless performance
@@ -1315,7 +1334,7 @@ index d26e7c8..9fbe61e 100644
if (SYMBOL_COMPUTED_OPS (sym) == &dwarf2_loclist_funcs)
cu->has_loclist = 1;
-@@ -15790,6 +16014,8 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
+@@ -15793,6 +16017,8 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
else
sym = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symbol);
OBJSTAT (objfile, n_syms++);
@@ -1324,7 +1343,7 @@ index d26e7c8..9fbe61e 100644
/* Cache this symbol's name and the name's demangled form (if any). */
SYMBOL_SET_LANGUAGE (sym, cu->language);
-@@ -16599,6 +16825,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
+@@ -16602,6 +16828,9 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
break;
}
@@ -1334,7 +1353,7 @@ index d26e7c8..9fbe61e 100644
return this_type;
}
-@@ -19043,62 +19272,100 @@ fill_in_loclist_baton (struct dwarf2_cu *cu,
+@@ -19046,62 +19275,100 @@ fill_in_loclist_baton (struct dwarf2_cu *cu,
baton->from_dwo = cu->dwo_unit != NULL;
}
@@ -1473,7 +1492,7 @@ index d26e7c8..9fbe61e 100644
}
}
-@@ -19469,6 +19736,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs)
+@@ -19472,6 +19739,25 @@ per_cu_offset_and_type_eq (const void *item_lhs, const void *item_rhs)
&& ofs_lhs->offset.sect_off == ofs_rhs->offset.sect_off);
}
@@ -1499,7 +1518,7 @@ index d26e7c8..9fbe61e 100644
/* Set the type associated with DIE to TYPE. Save it in CU's hash
table if necessary. For convenience, return TYPE.
-@@ -19493,6 +19779,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
+@@ -19496,6 +19782,8 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
struct dwarf2_per_cu_offset_and_type **slot, ofs;
struct objfile *objfile = cu->objfile;
@@ -2362,7 +2381,7 @@ index fb66e0f..45684f0 100644
&unavail);
diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
-index ffb7f53..a2e7e94 100644
+index 05a38b2..9801fdf 100644
--- a/gdb/gdb-gdb.gdb.in
+++ b/gdb/gdb-gdb.gdb.in
@@ -1,5 +1,15 @@
@@ -2378,9 +2397,9 @@ index ffb7f53..a2e7e94 100644
+end
+source @srcdir@/python/lib/gdb/__init__.py
+
- set complaints 1
+ if !$gdb_init_done
+ set variable $gdb_init_done = 1
- b internal_error
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 12730d7..5a614e0 100644
--- a/gdb/gdbtypes.c
@@ -4762,10 +4781,10 @@ index 11cc038..ef238f6 100644
diff --git a/gdb/python/python.c b/gdb/python/python.c
-index 8dd65a1..82c6c86 100644
+index cd8ddfb..e906c4f 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
-@@ -66,6 +66,8 @@ static const char *gdbpy_should_print_stack = python_excp_message;
+@@ -67,6 +67,8 @@ static const char *gdbpy_should_print_stack = python_excp_message;
#include "linespec.h"
#include "source.h"
#include "version.h"
@@ -4774,7 +4793,7 @@ index 8dd65a1..82c6c86 100644
#include "target.h"
#include "gdbthread.h"
#include "observer.h"
-@@ -1082,6 +1084,53 @@ gdbpy_print_stack (void)
+@@ -1099,6 +1101,53 @@ gdbpy_print_stack (void)
/* Return the current Progspace.
There always is one. */
@@ -4828,7 +4847,7 @@ index 8dd65a1..82c6c86 100644
static PyObject *
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
-@@ -1733,6 +1782,8 @@ static PyMethodDef GdbMethods[] =
+@@ -1749,6 +1798,8 @@ static PyMethodDef GdbMethods[] =
"Get a value from history" },
{ "execute", (PyCFunction) execute_gdb_command, METH_VARARGS | METH_KEYWORDS,
"Execute a gdb command" },
@@ -4851,10 +4870,10 @@ index 24e3077..0443087 100644
int embedded_offset, CORE_ADDR address,
struct ui_file *stream, int recurse,
diff --git a/gdb/stack.c b/gdb/stack.c
-index 147d815..51115cf 100644
+index f2aeb10..d20b2f1 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
-@@ -508,6 +508,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
+@@ -509,6 +509,10 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
stb = mem_fileopen ();
old_chain = make_cleanup_ui_file_delete (stb);
@@ -8479,10 +8498,10 @@ index 2d5a6af..5251e3f 100644
get_user_print_options (&opts);
diff --git a/gdb/utils.c b/gdb/utils.c
-index eb99f4b..2e17e8e 100644
+index 4c2f08c..d1c8710 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
-@@ -1804,6 +1804,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void)
+@@ -1805,6 +1805,36 @@ set_batch_flag_and_make_cleanup_restore_page_info (void)
return back_to;
}
@@ -8728,7 +8747,7 @@ index 93c09d8..aef0991 100644
{
struct type *element_type = TYPE_TARGET_TYPE (array_type);
diff --git a/gdb/valprint.c b/gdb/valprint.c
-index 05d6c3e..5430e66 100644
+index 18cff49..89cb01a 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -37,6 +37,7 @@
diff --git a/gdb-entryval-1of2.patch b/gdb-entryval-1of2.patch
new file mode 100644
index 0000000..01a31ec
--- /dev/null
+++ b/gdb-entryval-1of2.patch
@@ -0,0 +1,872 @@
+http://sourceware.org/ml/gdb-patches/2013-03/msg00061.html
+Subject: [patch] entry-values: Fix for C++ across CUs
+
+Hi,
+
+I have found with C++ entry-values do not work much. This is a problem
+primarily for 'this' being in $rdi clobbered very soon and having a function
+with 'this=<optimized out>' is pretty useless for core crash analysis.
+It happens if the call is across CUs, where GCC uses name reference:
+
+ <2><7c>: Abbrev Number: 6 (DW_TAG_GNU_call_site)
+ <7d> DW_AT_low_pc : 0x40049e
+ <85> DW_AT_abstract_origin: <0xa8>
+ <1><a8>: Abbrev Number: 10 (DW_TAG_subprogram)
+ <a9> DW_AT_external : 1
+ <a9> DW_AT_name : f
+ <ab> DW_AT_decl_file : 1
+ <ac> DW_AT_decl_line : 26
+ <ad> DW_AT_linkage_name: (indirect string, offset: 0x83): _Z1fi
+ <b1> DW_AT_declaration : 1
+
+The testcase tests tail calls which is another (compared to unrecovered values
+such as 'this') reproduction of the same problem:
+ Cannot find function "f(int)" for a call site target at 0x4004ae in main
+ #0 g (x=2) at gdb.arch/amd64-tailcall-cxx1.cc:23
+ #1 0x00000000004004ae in main () at gdb.arch/amd64-tailcall-cxx1.cc:31
+->
+ #0 g (x=x at entry=2) at gdb.arch/amd64-tailcall-cxx1.cc:23
+ #1 0x00000000004005c8 in f (x=x at entry=1) at gdb.arch/amd64-tailcall-cxx2.cc:23
+ #2 0x00000000004004ae in main () at gdb.arch/amd64-tailcall-cxx1.cc:31
+
+There are two different fixes below. The first one only always works but it
+always uses the demangled name, which is not exact. The second fix provides
+the mangled name (if available); the mangled name would not need the first fix
+but the mangled name is sometimes not available - for example in Fedora GCC.
+
+No regressions on {x86_64,x86_64-m32,i686}-fedora19pre-linux-gnu.
+
+Probably nothing interesting, I will check it in.
+
+
+Thanks,
+Jan
+
+
+gdb/
+2013-03-02 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ 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/
+2013-03-02 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ 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.
+
+diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
+index 8a61ae6..f300df2 100644
+--- a/gdb/dwarf2loc.c
++++ b/gdb/dwarf2loc.c
+@@ -542,7 +542,9 @@ call_site_to_target_addr (struct gdbarch *call_site_gdbarch,
+ struct minimal_symbol *msym;
+
+ physname = FIELD_STATIC_PHYSNAME (call_site->target);
+- msym = lookup_minimal_symbol_text (physname, NULL);
++
++ /* Handle both the mangled and demangled PHYSNAME. */
++ msym = lookup_minimal_symbol (physname, NULL, NULL);
+ if (msym == NULL)
+ {
+ msym = lookup_minimal_symbol_by_pc (call_site->pc - 1);
+diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
+index df6298b..faee1a8 100644
+--- a/gdb/dwarf2read.c
++++ b/gdb/dwarf2read.c
+@@ -9812,9 +9812,18 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
+ gdb_assert (target_cu->objfile == objfile);
+ if (die_is_declaration (target_die, target_cu))
+ {
+- const char *target_physname;
+-
+- target_physname = dwarf2_physname (NULL, target_die, target_cu);
++ const char *target_physname = NULL;
++ struct attribute *target_attr;
++
++ /* Prefer the mangled name; otherwise compute the demangled one. */
++ target_attr = dwarf2_attr (target_die, DW_AT_linkage_name, target_cu);
++ if (target_attr == NULL)
++ target_attr = dwarf2_attr (target_die, DW_AT_MIPS_linkage_name,
++ target_cu);
++ if (target_attr != NULL && DW_STRING (target_attr) != NULL)
++ target_physname = DW_STRING (target_attr);
++ else
++ target_physname = dwarf2_physname (NULL, target_die, target_cu);
+ if (target_physname == NULL)
+ complaint (&symfile_complaints,
+ _("DW_AT_GNU_call_site_target target DIE has invalid "
+diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
+new file mode 100644
+index 0000000..db2ab3c
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
+@@ -0,0 +1,36 @@
++# Copyright (C) 2012-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/>.
++
++set opts {}
++standard_testfile amd64-tailcall-cxx1.S amd64-tailcall-cxx2.S
++
++if [info exists COMPILE] {
++ # make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-cxx.exp COMPILE=1"
++ standard_testfile amd64-tailcall-cxx1.cc amd64-tailcall-cxx2.cc
++ lappend opts debug optimize=-O2
++} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
++ verbose "Skipping ${testfile}."
++ return
++}
++
++if { [prepare_for_testing ${testfile}.exp ${testfile} "${srcfile} ${srcfile2}" $opts] } {
++ return -1
++}
++
++if ![runto g] {
++ return -1
++}
++
++gdb_test "bt" "\r\n#0 +g \\(x=x at entry=2\\) at \[^\r\n\]*\r\n#1 +0x\[0-9a-f\]+ in f \\(x=x at entry=1\\) at \[^\r\n\]*\r\n#2 +0x\[0-9a-f\]+ in main .*"
+diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.S b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.S
+new file mode 100644
+index 0000000..d988446
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx1.S
+@@ -0,0 +1,367 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2012-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/>. */
++
++/* This source file was generated by:
++ g++ -o gdb.arch/amd64-tailcall-cxx1.S gdb.arch/amd64-tailcall-cxx1.cc -Wall -S -dA -O2 -g
++ Fedora GCC was used here to also test the case of missing DW_AT_linkage_name.
++ */
++
++ .file "amd64-tailcall-cxx1.cc"
++ .text
++.Ltext0:
++ .p2align 4,,15
++ .globl _Z1gi
++ .type _Z1gi, @function
++_Z1gi:
++.LFB0:
++ .file 1 "gdb.arch/amd64-tailcall-cxx1.cc"
++ # gdb.arch/amd64-tailcall-cxx1.cc:22
++ .loc 1 22 0
++ .cfi_startproc
++.LVL0:
++# BLOCK 2 freq:10000 seq:0
++# PRED: ENTRY [100.0%] (FALLTHRU)
++ # gdb.arch/amd64-tailcall-cxx1.cc:23
++ .loc 1 23 0
++ movl %edi, v(%rip)
++# SUCC: EXIT [100.0%]
++ ret
++ .cfi_endproc
++.LFE0:
++ .size _Z1gi, .-_Z1gi
++ .section .text.startup,"ax", at progbits
++ .p2align 4,,15
++ .globl main
++ .type main, @function
++main:
++.LFB1:
++ # gdb.arch/amd64-tailcall-cxx1.cc:30
++ .loc 1 30 0
++ .cfi_startproc
++# BLOCK 2 freq:10000 seq:0
++# PRED: ENTRY [100.0%] (FALLTHRU)
++ subq $8, %rsp
++ .cfi_def_cfa_offset 16
++ # gdb.arch/amd64-tailcall-cxx1.cc:31
++ .loc 1 31 0
++ movl $1, %edi
++ call _Z1fi
++.LVL1:
++ # gdb.arch/amd64-tailcall-cxx1.cc:32
++ .loc 1 32 0
++ xorl %eax, %eax
++ addq $8, %rsp
++ .cfi_def_cfa_offset 8
++# SUCC: EXIT [100.0%]
++ ret
++ .cfi_endproc
++.LFE1:
++ .size main, .-main
++ .globl v
++ .bss
++ .align 4
++ .type v, @object
++ .size v, 4
++v:
++ .zero 4
++ .text
++.Letext0:
++ .section .debug_info,"", at progbits
++.Ldebug_info0:
++ .long 0xb4 # Length of Compilation Unit Info
++ .value 0x4 # DWARF version number
++ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
++ .byte 0x8 # Pointer Size (in bytes)
++ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
++ .long .LASF1 # DW_AT_producer: "GNU C++ 4.8.0 20130220 (Red Hat 4.8.0-0.14) -mtune=generic -march=x86-64 -g -O2"
++ .byte 0x4 # DW_AT_language
++ .long .LASF2 # DW_AT_name: "gdb.arch/amd64-tailcall-cxx1.cc"
++ .long .LASF3 # DW_AT_comp_dir: ""
++ .long .Ldebug_ranges0+0 # DW_AT_ranges
++ .quad 0 # DW_AT_low_pc
++ .long .Ldebug_line0 # DW_AT_stmt_list
++ .uleb128 0x2 # (DIE (0x29) DW_TAG_subprogram)
++ # DW_AT_external
++ .ascii "g\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-cxx1.cc)
++ .byte 0x15 # DW_AT_decl_line
++ .long .LASF4 # DW_AT_linkage_name: "_Z1gi"
++ .quad .LFB0 # DW_AT_low_pc
++ .quad .LFE0-.LFB0 # DW_AT_high_pc
++ .uleb128 0x1 # DW_AT_frame_base
++ .byte 0x9c # DW_OP_call_frame_cfa
++ # DW_AT_GNU_all_call_sites
++ .long 0x54 # DW_AT_sibling
++ .uleb128 0x3 # (DIE (0x48) DW_TAG_formal_parameter)
++ .ascii "x\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-cxx1.cc)
++ .byte 0x15 # DW_AT_decl_line
++ .long 0x54 # DW_AT_type
++ .uleb128 0x1 # DW_AT_location
++ .byte 0x55 # DW_OP_reg5
++ .byte 0 # end of children of DIE 0x29
++ .uleb128 0x4 # (DIE (0x54) DW_TAG_base_type)
++ .byte 0x4 # DW_AT_byte_size
++ .byte 0x5 # DW_AT_encoding
++ .ascii "int\0" # DW_AT_name
++ .uleb128 0x5 # (DIE (0x5b) DW_TAG_subprogram)
++ # DW_AT_external
++ .long .LASF0 # DW_AT_name: "main"
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-cxx1.cc)
++ .byte 0x1d # DW_AT_decl_line
++ .long 0x54 # DW_AT_type
++ .quad .LFB1 # DW_AT_low_pc
++ .quad .LFE1-.LFB1 # DW_AT_high_pc
++ .uleb128 0x1 # DW_AT_frame_base
++ .byte 0x9c # DW_OP_call_frame_cfa
++ # DW_AT_GNU_all_call_sites
++ .long 0x90 # DW_AT_sibling
++ .uleb128 0x6 # (DIE (0x7c) DW_TAG_GNU_call_site)
++ .quad .LVL1 # DW_AT_low_pc
++ .long 0xa8 # DW_AT_abstract_origin
++ .uleb128 0x7 # (DIE (0x89) DW_TAG_GNU_call_site_parameter)
++ .uleb128 0x1 # DW_AT_location
++ .byte 0x55 # DW_OP_reg5
++ .uleb128 0x1 # DW_AT_GNU_call_site_value
++ .byte 0x31 # DW_OP_lit1
++ .byte 0 # end of children of DIE 0x7c
++ .byte 0 # end of children of DIE 0x5b
++ .uleb128 0x8 # (DIE (0x90) DW_TAG_variable)
++ .ascii "v\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-cxx1.cc)
++ .byte 0x12 # DW_AT_decl_line
++ .long 0xa3 # DW_AT_type
++ # DW_AT_external
++ .uleb128 0x9 # DW_AT_location
++ .byte 0x3 # DW_OP_addr
++ .quad v
++ .uleb128 0x9 # (DIE (0xa3) DW_TAG_volatile_type)
++ .long 0x54 # DW_AT_type
++ .uleb128 0xa # (DIE (0xa8) DW_TAG_subprogram)
++ # DW_AT_external
++ .ascii "f\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-cxx1.cc)
++ .byte 0x1a # DW_AT_decl_line
++ .long .LASF5 # DW_AT_linkage_name: "_Z1fi"
++ # DW_AT_declaration
++ .uleb128 0xb # (DIE (0xb1) DW_TAG_formal_parameter)
++ .long 0x54 # DW_AT_type
++ .byte 0 # end of children of DIE 0xa8
++ .byte 0 # end of children of DIE 0xb
++ .section .debug_abbrev,"", at progbits
++.Ldebug_abbrev0:
++ .uleb128 0x1 # (abbrev code)
++ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x25 # (DW_AT_producer)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x13 # (DW_AT_language)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x1b # (DW_AT_comp_dir)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x55 # (DW_AT_ranges)
++ .uleb128 0x17 # (DW_FORM_sec_offset)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x10 # (DW_AT_stmt_list)
++ .uleb128 0x17 # (DW_FORM_sec_offset)
++ .byte 0
++ .byte 0
++ .uleb128 0x2 # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x6e # (DW_AT_linkage_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x12 # (DW_AT_high_pc)
++ .uleb128 0x7 # (DW_FORM_data8)
++ .uleb128 0x40 # (DW_AT_frame_base)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x1 # (DW_AT_sibling)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0x3 # (abbrev code)
++ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
++ .byte 0 # DW_children_no
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .uleb128 0x2 # (DW_AT_location)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .byte 0
++ .byte 0
++ .uleb128 0x4 # (abbrev code)
++ .uleb128 0x24 # (TAG: DW_TAG_base_type)
++ .byte 0 # DW_children_no
++ .uleb128 0xb # (DW_AT_byte_size)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3e # (DW_AT_encoding)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .byte 0
++ .byte 0
++ .uleb128 0x5 # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x12 # (DW_AT_high_pc)
++ .uleb128 0x7 # (DW_FORM_data8)
++ .uleb128 0x40 # (DW_AT_frame_base)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x1 # (DW_AT_sibling)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0x6 # (abbrev code)
++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x31 # (DW_AT_abstract_origin)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0x7 # (abbrev code)
++ .uleb128 0x410a # (TAG: DW_TAG_GNU_call_site_parameter)
++ .byte 0 # DW_children_no
++ .uleb128 0x2 # (DW_AT_location)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .uleb128 0x2111 # (DW_AT_GNU_call_site_value)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .byte 0
++ .byte 0
++ .uleb128 0x8 # (abbrev code)
++ .uleb128 0x34 # (TAG: DW_TAG_variable)
++ .byte 0 # DW_children_no
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x2 # (DW_AT_location)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .byte 0
++ .byte 0
++ .uleb128 0x9 # (abbrev code)
++ .uleb128 0x35 # (TAG: DW_TAG_volatile_type)
++ .byte 0 # DW_children_no
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0xa # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x6e # (DW_AT_linkage_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x3c # (DW_AT_declaration)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .byte 0
++ .byte 0
++ .uleb128 0xb # (abbrev code)
++ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
++ .byte 0 # DW_children_no
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .byte 0
++ .section .debug_aranges,"", at progbits
++ .long 0x3c # Length of Address Ranges Info
++ .value 0x2 # DWARF Version
++ .long .Ldebug_info0 # Offset of Compilation Unit Info
++ .byte 0x8 # Size of Address
++ .byte 0 # Size of Segment Descriptor
++ .value 0 # Pad to 16 byte boundary
++ .value 0
++ .quad .Ltext0 # Address
++ .quad .Letext0-.Ltext0 # Length
++ .quad .LFB1 # Address
++ .quad .LFE1-.LFB1 # Length
++ .quad 0
++ .quad 0
++ .section .debug_ranges,"", at progbits
++.Ldebug_ranges0:
++ .quad .Ltext0 # Offset 0
++ .quad .Letext0
++ .quad .LFB1 # Offset 0x10
++ .quad .LFE1
++ .quad 0
++ .quad 0
++ .section .debug_line,"", at progbits
++.Ldebug_line0:
++ .section .debug_str,"MS", at progbits,1
++.LASF4:
++ .string "_Z1gi"
++.LASF3:
++ .string ""
++.LASF2:
++ .string "gdb.arch/amd64-tailcall-cxx1.cc"
++.LASF1:
++ .string "GNU C++ 4.8.0 20130220 (Red Hat 4.8.0-0.14) -mtune=generic -march=x86-64 -g -O2"
++.LASF0:
++ .string "main"
++.LASF5:
++ .string "_Z1fi"
++ .ident "GCC: (GNU) 4.8.0 20130220 (Red Hat 4.8.0-0.14)"
++ .section .note.GNU-stack,"", at progbits
+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);
++}
+diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.S b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.S
+new file mode 100644
+index 0000000..8a26d6f
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.S
+@@ -0,0 +1,276 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2012-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/>. */
++
++/* This source file was generated by:
++ g++ -o gdb.arch/amd64-tailcall-cxx2.S gdb.arch/amd64-tailcall-cxx2.cc -Wall -S -dA -O2 -g
++ Fedora GCC was used here to also test the case of missing DW_AT_linkage_name.
++ */
++
++ .file "amd64-tailcall-cxx2.cc"
++ .text
++.Ltext0:
++ .p2align 4,,15
++ .globl _Z1fi
++ .type _Z1fi, @function
++_Z1fi:
++.LFB0:
++ .file 1 "gdb.arch/amd64-tailcall-cxx2.cc"
++ # gdb.arch/amd64-tailcall-cxx2.cc:22
++ .loc 1 22 0
++ .cfi_startproc
++.LVL0:
++# BLOCK 2 freq:10000 seq:0
++# PRED: ENTRY [100.0%] (FALLTHRU)
++ # gdb.arch/amd64-tailcall-cxx2.cc:23
++ .loc 1 23 0
++ addl $1, %edi
++.LVL1:
++ jmp _Z1gi
++.LVL2:
++# SUCC: EXIT [100.0%] (ABNORMAL,SIBCALL)
++ .cfi_endproc
++.LFE0:
++ .size _Z1fi, .-_Z1fi
++.Letext0:
++ .section .debug_info,"", at progbits
++.Ldebug_info0:
++ .long 0x84 # Length of Compilation Unit Info
++ .value 0x4 # DWARF version number
++ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
++ .byte 0x8 # Pointer Size (in bytes)
++ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
++ .long .LASF0 # DW_AT_producer: "GNU C++ 4.8.0 20130220 (Red Hat 4.8.0-0.14) -mtune=generic -march=x86-64 -g -O2"
++ .byte 0x4 # DW_AT_language
++ .long .LASF1 # DW_AT_name: "gdb.arch/amd64-tailcall-cxx2.cc"
++ .long .LASF2 # DW_AT_comp_dir: ""
++ .quad .Ltext0 # DW_AT_low_pc
++ .quad .Letext0-.Ltext0 # DW_AT_high_pc
++ .long .Ldebug_line0 # DW_AT_stmt_list
++ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
++ # DW_AT_external
++ .ascii "f\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-cxx2.cc)
++ .byte 0x15 # DW_AT_decl_line
++ .long .LASF3 # DW_AT_linkage_name: "_Z1fi"
++ .quad .LFB0 # DW_AT_low_pc
++ .quad .LFE0-.LFB0 # DW_AT_high_pc
++ .uleb128 0x1 # DW_AT_frame_base
++ .byte 0x9c # DW_OP_call_frame_cfa
++ # DW_AT_GNU_all_call_sites
++ .long 0x71 # DW_AT_sibling
++ .uleb128 0x3 # (DIE (0x4c) DW_TAG_formal_parameter)
++ .ascii "x\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-cxx2.cc)
++ .byte 0x15 # DW_AT_decl_line
++ .long 0x71 # DW_AT_type
++ .long .LLST0 # DW_AT_location
++ .uleb128 0x4 # (DIE (0x59) DW_TAG_GNU_call_site)
++ .quad .LVL2 # DW_AT_low_pc
++ # DW_AT_GNU_tail_call
++ .long 0x78 # DW_AT_abstract_origin
++ .uleb128 0x5 # (DIE (0x66) DW_TAG_GNU_call_site_parameter)
++ .uleb128 0x1 # DW_AT_location
++ .byte 0x55 # DW_OP_reg5
++ .uleb128 0x5 # DW_AT_GNU_call_site_value
++ .byte 0xf3 # DW_OP_GNU_entry_value
++ .uleb128 0x1
++ .byte 0x55 # DW_OP_reg5
++ .byte 0x23 # DW_OP_plus_uconst
++ .uleb128 0x1
++ .byte 0 # end of children of DIE 0x59
++ .byte 0 # end of children of DIE 0x2d
++ .uleb128 0x6 # (DIE (0x71) DW_TAG_base_type)
++ .byte 0x4 # DW_AT_byte_size
++ .byte 0x5 # DW_AT_encoding
++ .ascii "int\0" # DW_AT_name
++ .uleb128 0x7 # (DIE (0x78) DW_TAG_subprogram)
++ # DW_AT_external
++ .ascii "g\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-cxx2.cc)
++ .byte 0x12 # DW_AT_decl_line
++ .long .LASF4 # DW_AT_linkage_name: "_Z1gi"
++ # DW_AT_declaration
++ .uleb128 0x8 # (DIE (0x81) DW_TAG_formal_parameter)
++ .long 0x71 # DW_AT_type
++ .byte 0 # end of children of DIE 0x78
++ .byte 0 # end of children of DIE 0xb
++ .section .debug_abbrev,"", at progbits
++.Ldebug_abbrev0:
++ .uleb128 0x1 # (abbrev code)
++ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x25 # (DW_AT_producer)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x13 # (DW_AT_language)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x1b # (DW_AT_comp_dir)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x12 # (DW_AT_high_pc)
++ .uleb128 0x7 # (DW_FORM_data8)
++ .uleb128 0x10 # (DW_AT_stmt_list)
++ .uleb128 0x17 # (DW_FORM_sec_offset)
++ .byte 0
++ .byte 0
++ .uleb128 0x2 # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x6e # (DW_AT_linkage_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x12 # (DW_AT_high_pc)
++ .uleb128 0x7 # (DW_FORM_data8)
++ .uleb128 0x40 # (DW_AT_frame_base)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x1 # (DW_AT_sibling)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0x3 # (abbrev code)
++ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
++ .byte 0 # DW_children_no
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .uleb128 0x2 # (DW_AT_location)
++ .uleb128 0x17 # (DW_FORM_sec_offset)
++ .byte 0
++ .byte 0
++ .uleb128 0x4 # (abbrev code)
++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x2115 # (DW_AT_GNU_tail_call)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x31 # (DW_AT_abstract_origin)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0x5 # (abbrev code)
++ .uleb128 0x410a # (TAG: DW_TAG_GNU_call_site_parameter)
++ .byte 0 # DW_children_no
++ .uleb128 0x2 # (DW_AT_location)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .uleb128 0x2111 # (DW_AT_GNU_call_site_value)
++ .uleb128 0x18 # (DW_FORM_exprloc)
++ .byte 0
++ .byte 0
++ .uleb128 0x6 # (abbrev code)
++ .uleb128 0x24 # (TAG: DW_TAG_base_type)
++ .byte 0 # DW_children_no
++ .uleb128 0xb # (DW_AT_byte_size)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3e # (DW_AT_encoding)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .byte 0
++ .byte 0
++ .uleb128 0x7 # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x6e # (DW_AT_linkage_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x3c # (DW_AT_declaration)
++ .uleb128 0x19 # (DW_FORM_flag_present)
++ .byte 0
++ .byte 0
++ .uleb128 0x8 # (abbrev code)
++ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
++ .byte 0 # DW_children_no
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .byte 0
++ .section .debug_loc,"", at progbits
++.Ldebug_loc0:
++.LLST0:
++ .quad .LVL0-.Ltext0 # Location list begin address (*.LLST0)
++ .quad .LVL1-.Ltext0 # Location list end address (*.LLST0)
++ .value 0x1 # Location expression size
++ .byte 0x55 # DW_OP_reg5
++ .quad .LVL1-.Ltext0 # Location list begin address (*.LLST0)
++ .quad .LVL2-1-.Ltext0 # Location list end address (*.LLST0)
++ .value 0x3 # Location expression size
++ .byte 0x75 # DW_OP_breg5
++ .sleb128 -1
++ .byte 0x9f # DW_OP_stack_value
++ .quad .LVL2-1-.Ltext0 # Location list begin address (*.LLST0)
++ .quad .LFE0-.Ltext0 # Location list end address (*.LLST0)
++ .value 0x4 # Location expression size
++ .byte 0xf3 # DW_OP_GNU_entry_value
++ .uleb128 0x1
++ .byte 0x55 # DW_OP_reg5
++ .byte 0x9f # DW_OP_stack_value
++ .quad 0 # Location list terminator begin (*.LLST0)
++ .quad 0 # Location list terminator end (*.LLST0)
++ .section .debug_aranges,"", at progbits
++ .long 0x2c # Length of Address Ranges Info
++ .value 0x2 # DWARF Version
++ .long .Ldebug_info0 # Offset of Compilation Unit Info
++ .byte 0x8 # Size of Address
++ .byte 0 # Size of Segment Descriptor
++ .value 0 # Pad to 16 byte boundary
++ .value 0
++ .quad .Ltext0 # Address
++ .quad .Letext0-.Ltext0 # Length
++ .quad 0
++ .quad 0
++ .section .debug_line,"", at progbits
++.Ldebug_line0:
++ .section .debug_str,"MS", at progbits,1
++.LASF0:
++ .string "GNU C++ 4.8.0 20130220 (Red Hat 4.8.0-0.14) -mtune=generic -march=x86-64 -g -O2"
++.LASF2:
++ .string ""
++.LASF3:
++ .string "_Z1fi"
++.LASF1:
++ .string "gdb.arch/amd64-tailcall-cxx2.cc"
++.LASF4:
++ .string "_Z1gi"
++ .ident "GCC: (GNU) 4.8.0 20130220 (Red Hat 4.8.0-0.14)"
++ .section .note.GNU-stack,"", at progbits
+diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.cc b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.cc
+new file mode 100644
+index 0000000..232f4fb
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx2.cc
+@@ -0,0 +1,24 @@
++/* 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/>. */
++
++extern void g (int x);
++
++__attribute__ ((noinline, noclone)) void
++f (int x)
++{
++ g (x + 1);
++}
+
diff --git a/gdb-entryval-2of2.patch b/gdb-entryval-2of2.patch
new file mode 100644
index 0000000..3c3c479
--- /dev/null
+++ b/gdb-entryval-2of2.patch
@@ -0,0 +1,845 @@
+http://sourceware.org/ml/gdb-patches/2013-03/msg00062.html
+Subject: [patch] entry-values: Fix if callee called noreturn function
+
+Hi,
+
+while debugging the previous bug I found this bug.
+
+THIS_PC found below is then passed to get_pc_function_start.
+get_pc_function_start cannot handle PC which has address of the end of the
+function.
+
+No regressions on {x86_64,x86_64-m32,i686}-fedora19pre-linux-gnu.
+
+I will check it in.
+
+
+Thanks,
+Jan
+
+
+gdb/
+2013-03-02 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ Fix entry-values if the callee called a noreturn function.
+ * dwarf2-frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
+ get_frame_address_in_block. Add new comment.
+
+gdb/testsuite/
+2013-03-02 Jan Kratochvil <jan.kratochvil at redhat.com>
+
+ Fix entry-values if the callee called a noreturn function.
+ * gdb.arch/amd64-tailcall-noret.S: New file.
+ * gdb.arch/amd64-tailcall-noret.c: New file.
+ * gdb.arch/amd64-tailcall-noret.exp: New file.
+
+diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2-frame-tailcall.c
+index b5f95c3..b82a051 100644
+--- a/gdb/dwarf2-frame-tailcall.c
++++ b/gdb/dwarf2-frame-tailcall.c
+@@ -374,7 +374,9 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame,
+
+ gdb_assert (*tailcall_cachep == NULL);
+
+- this_pc = get_frame_pc (this_frame);
++ /* PC may be after the function if THIS_FRAME calls noreturn function,
++ get_frame_address_in_block will decrease it by 1 in such case. */
++ this_pc = get_frame_address_in_block (this_frame);
+
+ /* Catch any unwinding errors. */
+ TRY_CATCH (except, RETURN_MASK_ERROR)
+diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.S b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.S
+new file mode 100644
+index 0000000..25397e9
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.S
+@@ -0,0 +1,694 @@
++/* 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/>. */
++
++/* This source file was generated by:
++ gcc -o gdb.arch/amd64-tailcall-noret.S gdb.arch/amd64-tailcall-noret.c -Wall -S -dA -O2 -g
++ */
++
++ .file "amd64-tailcall-noret.c"
++ .text
++.Ltext0:
++ .section .text.unlikely,"ax", at progbits
++ .type noret, @function
++noret:
++.LFB9:
++ .file 1 "gdb.arch/amd64-tailcall-noret.c"
++ # gdb.arch/amd64-tailcall-noret.c:24
++ .loc 1 24 0
++ .cfi_startproc
++.LVL0:
++# BLOCK 2 freq:10000 seq:0
++# PRED: ENTRY [100.0%] (fallthru)
++ pushq %rax
++.LCFI0:
++ .cfi_def_cfa_offset 16
++ # gdb.arch/amd64-tailcall-noret.c:25
++ .loc 1 25 0
++ call abort
++.LVL1:
++# SUCC:
++ .cfi_endproc
++.LFE9:
++ .size noret, .-noret
++ .text
++ .p2align 4,,15
++ .type mayret, @function
++mayret:
++.LFB10:
++ # gdb.arch/amd64-tailcall-noret.c:30
++ .loc 1 30 0
++ .cfi_startproc
++.LVL2:
++# BLOCK 2 freq:10000 seq:0
++# PRED: ENTRY [100.0%] (fallthru)
++ # gdb.arch/amd64-tailcall-noret.c:31
++ .loc 1 31 0
++ movl v(%rip), %eax
++ testl %eax, %eax
++# SUCC: 4 [0.0%] (can_fallthru) 3 [100.0%] (fallthru,can_fallthru)
++ jne .L8
++# BLOCK 3 freq:9996 seq:1
++# PRED: 2 [100.0%] (fallthru,can_fallthru)
++# SUCC: EXIT [100.0%]
++ rep
++ ret
++# BLOCK 4 freq:4 seq:2
++# PRED: 2 [0.0%] (can_fallthru)
++.L8:
++ # gdb.arch/amd64-tailcall-noret.c:30
++ .loc 1 30 0
++ pushq %rdx
++.LCFI1:
++ .cfi_def_cfa_offset 16
++ # gdb.arch/amd64-tailcall-noret.c:32
++ .loc 1 32 0
++ xorl %eax, %eax
++ call noret
++.LVL3:
++# SUCC:
++ .cfi_endproc
++.LFE10:
++ .size mayret, .-mayret
++ .p2align 4,,15
++ .type tailcall, @function
++tailcall:
++.LFB11:
++ # gdb.arch/amd64-tailcall-noret.c:37
++ .loc 1 37 0
++ .cfi_startproc
++.LVL4:
++# BLOCK 2 freq:10000 seq:0
++# PRED: ENTRY [100.0%] (fallthru)
++ # gdb.arch/amd64-tailcall-noret.c:38
++ .loc 1 38 0
++ jmp mayret
++.LVL5:
++# SUCC: EXIT [100.0%] (ab,sibcall)
++ .cfi_endproc
++.LFE11:
++ .size tailcall, .-tailcall
++ .section .text.startup,"ax", at progbits
++ .p2align 4,,15
++ .globl main
++ .type main, @function
++main:
++.LFB12:
++ # gdb.arch/amd64-tailcall-noret.c:43
++ .loc 1 43 0
++ .cfi_startproc
++# BLOCK 2 freq:10000 seq:0
++# PRED: ENTRY [100.0%] (fallthru)
++ subq $8, %rsp
++.LCFI2:
++ .cfi_def_cfa_offset 16
++ # gdb.arch/amd64-tailcall-noret.c:44
++ .loc 1 44 0
++ movl $1, %edi
++ call tailcall
++.LVL6:
++ # gdb.arch/amd64-tailcall-noret.c:46
++ .loc 1 46 0
++ xorl %eax, %eax
++ addq $8, %rsp
++.LCFI3:
++ .cfi_def_cfa_offset 8
++# SUCC: EXIT [100.0%]
++ ret
++ .cfi_endproc
++.LFE12:
++ .size main, .-main
++ .globl v
++ .data
++ .align 4
++ .type v, @object
++ .size v, 4
++v:
++ .long 1
++ .text
++.Letext0:
++ .file 2 "/usr/include/stdlib.h"
++ .section .debug_info,"", at progbits
++.Ldebug_info0:
++ .long 0x19d # Length of Compilation Unit Info
++ .value 0x2 # DWARF version number
++ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
++ .byte 0x8 # Pointer Size (in bytes)
++ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
++ .long .LASF14 # DW_AT_producer: "GNU C 4.7.3 20130221 (prerelease)"
++ .byte 0x1 # DW_AT_language
++ .long .LASF15 # DW_AT_name: "gdb.arch/amd64-tailcall-noret.c"
++ .long .LASF16 # DW_AT_comp_dir: ""
++ .long .Ldebug_ranges0+0 # DW_AT_ranges
++ .quad 0 # DW_AT_low_pc
++ .quad 0 # DW_AT_entry_pc
++ .long .Ldebug_line0 # DW_AT_stmt_list
++ .uleb128 0x2 # (DIE (0x31) DW_TAG_base_type)
++ .byte 0x8 # DW_AT_byte_size
++ .byte 0x7 # DW_AT_encoding
++ .long .LASF0 # DW_AT_name: "long unsigned int"
++ .uleb128 0x3 # (DIE (0x38) DW_TAG_base_type)
++ .byte 0x4 # DW_AT_byte_size
++ .byte 0x5 # DW_AT_encoding
++ .ascii "int\0" # DW_AT_name
++ .uleb128 0x2 # (DIE (0x3f) DW_TAG_base_type)
++ .byte 0x1 # DW_AT_byte_size
++ .byte 0x8 # DW_AT_encoding
++ .long .LASF1 # DW_AT_name: "unsigned char"
++ .uleb128 0x2 # (DIE (0x46) DW_TAG_base_type)
++ .byte 0x2 # DW_AT_byte_size
++ .byte 0x7 # DW_AT_encoding
++ .long .LASF2 # DW_AT_name: "short unsigned int"
++ .uleb128 0x2 # (DIE (0x4d) DW_TAG_base_type)
++ .byte 0x4 # DW_AT_byte_size
++ .byte 0x7 # DW_AT_encoding
++ .long .LASF3 # DW_AT_name: "unsigned int"
++ .uleb128 0x2 # (DIE (0x54) DW_TAG_base_type)
++ .byte 0x1 # DW_AT_byte_size
++ .byte 0x6 # DW_AT_encoding
++ .long .LASF4 # DW_AT_name: "signed char"
++ .uleb128 0x2 # (DIE (0x5b) DW_TAG_base_type)
++ .byte 0x2 # DW_AT_byte_size
++ .byte 0x5 # DW_AT_encoding
++ .long .LASF5 # DW_AT_name: "short int"
++ .uleb128 0x2 # (DIE (0x62) DW_TAG_base_type)
++ .byte 0x8 # DW_AT_byte_size
++ .byte 0x5 # DW_AT_encoding
++ .long .LASF6 # DW_AT_name: "long int"
++ .uleb128 0x2 # (DIE (0x69) DW_TAG_base_type)
++ .byte 0x8 # DW_AT_byte_size
++ .byte 0x7 # DW_AT_encoding
++ .long .LASF7 # DW_AT_name: "sizetype"
++ .uleb128 0x2 # (DIE (0x70) DW_TAG_base_type)
++ .byte 0x1 # DW_AT_byte_size
++ .byte 0x6 # DW_AT_encoding
++ .long .LASF8 # DW_AT_name: "char"
++ .uleb128 0x2 # (DIE (0x77) DW_TAG_base_type)
++ .byte 0x8 # DW_AT_byte_size
++ .byte 0x5 # DW_AT_encoding
++ .long .LASF9 # DW_AT_name: "long long int"
++ .uleb128 0x2 # (DIE (0x7e) DW_TAG_base_type)
++ .byte 0x8 # DW_AT_byte_size
++ .byte 0x7 # DW_AT_encoding
++ .long .LASF10 # DW_AT_name: "long long unsigned int"
++ .uleb128 0x4 # (DIE (0x85) DW_TAG_volatile_type)
++ .long 0x38 # DW_AT_type
++ .uleb128 0x5 # (DIE (0x8a) DW_TAG_subprogram)
++ .long .LASF11 # DW_AT_name: "noret"
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-noret.c)
++ .byte 0x17 # DW_AT_decl_line
++ .byte 0x1 # DW_AT_prototyped
++ .quad .LFB9 # DW_AT_low_pc
++ .quad .LFE9 # DW_AT_high_pc
++ .long .LLST0 # DW_AT_frame_base
++ .byte 0x1 # DW_AT_GNU_all_call_sites
++ .long 0xc7 # DW_AT_sibling
++ .uleb128 0x6 # (DIE (0xab) DW_TAG_formal_parameter)
++ .ascii "x\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-noret.c)
++ .byte 0x17 # DW_AT_decl_line
++ .long 0x38 # DW_AT_type
++ .long .LLST1 # DW_AT_location
++ .uleb128 0x7 # (DIE (0xb8) DW_TAG_unspecified_parameters)
++ .uleb128 0x8 # (DIE (0xb9) DW_TAG_GNU_call_site)
++ .quad .LVL1 # DW_AT_low_pc
++ .long 0x195 # DW_AT_abstract_origin
++ .byte 0 # end of children of DIE 0x8a
++ .uleb128 0x5 # (DIE (0xc7) DW_TAG_subprogram)
++ .long .LASF12 # DW_AT_name: "mayret"
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-noret.c)
++ .byte 0x1d # DW_AT_decl_line
++ .byte 0x1 # DW_AT_prototyped
++ .quad .LFB10 # DW_AT_low_pc
++ .quad .LFE10 # DW_AT_high_pc
++ .long .LLST2 # DW_AT_frame_base
++ .byte 0x1 # DW_AT_GNU_all_call_sites
++ .long 0x103 # DW_AT_sibling
++ .uleb128 0x6 # (DIE (0xe8) DW_TAG_formal_parameter)
++ .ascii "x\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-noret.c)
++ .byte 0x1d # DW_AT_decl_line
++ .long 0x38 # DW_AT_type
++ .long .LLST3 # DW_AT_location
++ .uleb128 0x8 # (DIE (0xf5) DW_TAG_GNU_call_site)
++ .quad .LVL3 # DW_AT_low_pc
++ .long 0x8a # DW_AT_abstract_origin
++ .byte 0 # end of children of DIE 0xc7
++ .uleb128 0x9 # (DIE (0x103) DW_TAG_subprogram)
++ .long .LASF13 # DW_AT_name: "tailcall"
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-noret.c)
++ .byte 0x24 # DW_AT_decl_line
++ .byte 0x1 # DW_AT_prototyped
++ .quad .LFB11 # DW_AT_low_pc
++ .quad .LFE11 # DW_AT_high_pc
++ .byte 0x2 # DW_AT_frame_base
++ .byte 0x77 # DW_OP_breg7
++ .sleb128 8
++ .byte 0x1 # DW_AT_GNU_all_call_sites
++ .long 0x147 # DW_AT_sibling
++ .uleb128 0x6 # (DIE (0x123) DW_TAG_formal_parameter)
++ .ascii "x\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-noret.c)
++ .byte 0x24 # DW_AT_decl_line
++ .long 0x38 # DW_AT_type
++ .long .LLST4 # DW_AT_location
++ .uleb128 0xa # (DIE (0x130) DW_TAG_GNU_call_site)
++ .quad .LVL5 # DW_AT_low_pc
++ .byte 0x1 # DW_AT_GNU_tail_call
++ .long 0xc7 # DW_AT_abstract_origin
++ .uleb128 0xb # (DIE (0x13e) DW_TAG_GNU_call_site_parameter)
++ .byte 0x1 # DW_AT_location
++ .byte 0x55 # DW_OP_reg5
++ .byte 0x3 # DW_AT_GNU_call_site_value
++ .byte 0xf3 # DW_OP_GNU_entry_value
++ .uleb128 0x1
++ .byte 0x55 # DW_OP_reg5
++ .byte 0 # end of children of DIE 0x130
++ .byte 0 # end of children of DIE 0x103
++ .uleb128 0xc # (DIE (0x147) DW_TAG_subprogram)
++ .byte 0x1 # DW_AT_external
++ .long .LASF17 # DW_AT_name: "main"
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-noret.c)
++ .byte 0x2a # DW_AT_decl_line
++ .byte 0x1 # DW_AT_prototyped
++ .long 0x38 # DW_AT_type
++ .quad .LFB12 # DW_AT_low_pc
++ .quad .LFE12 # DW_AT_high_pc
++ .long .LLST5 # DW_AT_frame_base
++ .byte 0x1 # DW_AT_GNU_all_call_sites
++ .long 0x181 # DW_AT_sibling
++ .uleb128 0xd # (DIE (0x16d) DW_TAG_GNU_call_site)
++ .quad .LVL6 # DW_AT_low_pc
++ .long 0x103 # DW_AT_abstract_origin
++ .uleb128 0xb # (DIE (0x17a) DW_TAG_GNU_call_site_parameter)
++ .byte 0x1 # DW_AT_location
++ .byte 0x55 # DW_OP_reg5
++ .byte 0x1 # DW_AT_GNU_call_site_value
++ .byte 0x31 # DW_OP_lit1
++ .byte 0 # end of children of DIE 0x16d
++ .byte 0 # end of children of DIE 0x147
++ .uleb128 0xe # (DIE (0x181) DW_TAG_variable)
++ .ascii "v\0" # DW_AT_name
++ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-tailcall-noret.c)
++ .byte 0x14 # DW_AT_decl_line
++ .long 0x85 # DW_AT_type
++ .byte 0x1 # DW_AT_external
++ .byte 0x9 # DW_AT_location
++ .byte 0x3 # DW_OP_addr
++ .quad v
++ .uleb128 0xf # (DIE (0x195) DW_TAG_subprogram)
++ .byte 0x1 # DW_AT_external
++ .long .LASF18 # DW_AT_name: "abort"
++ .byte 0x2 # DW_AT_decl_file (/usr/include/stdlib.h)
++ .value 0x202 # DW_AT_decl_line
++ .byte 0x1 # DW_AT_prototyped
++ .byte 0x1 # DW_AT_declaration
++ .byte 0 # end of children of DIE 0xb
++ .section .debug_abbrev,"", at progbits
++.Ldebug_abbrev0:
++ .uleb128 0x1 # (abbrev code)
++ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x25 # (DW_AT_producer)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x13 # (DW_AT_language)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x1b # (DW_AT_comp_dir)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x55 # (DW_AT_ranges)
++ .uleb128 0x6 # (DW_FORM_data4)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x52 # (DW_AT_entry_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x10 # (DW_AT_stmt_list)
++ .uleb128 0x6 # (DW_FORM_data4)
++ .byte 0
++ .byte 0
++ .uleb128 0x2 # (abbrev code)
++ .uleb128 0x24 # (TAG: DW_TAG_base_type)
++ .byte 0 # DW_children_no
++ .uleb128 0xb # (DW_AT_byte_size)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3e # (DW_AT_encoding)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .byte 0
++ .byte 0
++ .uleb128 0x3 # (abbrev code)
++ .uleb128 0x24 # (TAG: DW_TAG_base_type)
++ .byte 0 # DW_children_no
++ .uleb128 0xb # (DW_AT_byte_size)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3e # (DW_AT_encoding)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .byte 0
++ .byte 0
++ .uleb128 0x4 # (abbrev code)
++ .uleb128 0x35 # (TAG: DW_TAG_volatile_type)
++ .byte 0 # DW_children_no
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0x5 # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x27 # (DW_AT_prototyped)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x12 # (DW_AT_high_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x40 # (DW_AT_frame_base)
++ .uleb128 0x6 # (DW_FORM_data4)
++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x1 # (DW_AT_sibling)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0x6 # (abbrev code)
++ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
++ .byte 0 # DW_children_no
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .uleb128 0x2 # (DW_AT_location)
++ .uleb128 0x6 # (DW_FORM_data4)
++ .byte 0
++ .byte 0
++ .uleb128 0x7 # (abbrev code)
++ .uleb128 0x18 # (TAG: DW_TAG_unspecified_parameters)
++ .byte 0 # DW_children_no
++ .byte 0
++ .byte 0
++ .uleb128 0x8 # (abbrev code)
++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
++ .byte 0 # DW_children_no
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x31 # (DW_AT_abstract_origin)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0x9 # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x27 # (DW_AT_prototyped)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x12 # (DW_AT_high_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x40 # (DW_AT_frame_base)
++ .uleb128 0xa # (DW_FORM_block1)
++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x1 # (DW_AT_sibling)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0xa # (abbrev code)
++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x2115 # (DW_AT_GNU_tail_call)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x31 # (DW_AT_abstract_origin)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0xb # (abbrev code)
++ .uleb128 0x410a # (TAG: DW_TAG_GNU_call_site_parameter)
++ .byte 0 # DW_children_no
++ .uleb128 0x2 # (DW_AT_location)
++ .uleb128 0xa # (DW_FORM_block1)
++ .uleb128 0x2111 # (DW_AT_GNU_call_site_value)
++ .uleb128 0xa # (DW_FORM_block1)
++ .byte 0
++ .byte 0
++ .uleb128 0xc # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x27 # (DW_AT_prototyped)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x12 # (DW_AT_high_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x40 # (DW_AT_frame_base)
++ .uleb128 0x6 # (DW_FORM_data4)
++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x1 # (DW_AT_sibling)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0xd # (abbrev code)
++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
++ .byte 0x1 # DW_children_yes
++ .uleb128 0x11 # (DW_AT_low_pc)
++ .uleb128 0x1 # (DW_FORM_addr)
++ .uleb128 0x31 # (DW_AT_abstract_origin)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .byte 0
++ .byte 0
++ .uleb128 0xe # (abbrev code)
++ .uleb128 0x34 # (TAG: DW_TAG_variable)
++ .byte 0 # DW_children_no
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0x8 # (DW_FORM_string)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x49 # (DW_AT_type)
++ .uleb128 0x13 # (DW_FORM_ref4)
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x2 # (DW_AT_location)
++ .uleb128 0xa # (DW_FORM_block1)
++ .byte 0
++ .byte 0
++ .uleb128 0xf # (abbrev code)
++ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
++ .byte 0 # DW_children_no
++ .uleb128 0x3f # (DW_AT_external)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x3 # (DW_AT_name)
++ .uleb128 0xe # (DW_FORM_strp)
++ .uleb128 0x3a # (DW_AT_decl_file)
++ .uleb128 0xb # (DW_FORM_data1)
++ .uleb128 0x3b # (DW_AT_decl_line)
++ .uleb128 0x5 # (DW_FORM_data2)
++ .uleb128 0x27 # (DW_AT_prototyped)
++ .uleb128 0xc # (DW_FORM_flag)
++ .uleb128 0x3c # (DW_AT_declaration)
++ .uleb128 0xc # (DW_FORM_flag)
++ .byte 0
++ .byte 0
++ .byte 0
++ .section .debug_loc,"", at progbits
++.Ldebug_loc0:
++.LLST0:
++ .quad .LFB9 # Location list begin address (*.LLST0)
++ .quad .LCFI0 # Location list end address (*.LLST0)
++ .value 0x2 # Location expression size
++ .byte 0x77 # DW_OP_breg7
++ .sleb128 8
++ .quad .LCFI0 # Location list begin address (*.LLST0)
++ .quad .LFE9 # Location list end address (*.LLST0)
++ .value 0x2 # Location expression size
++ .byte 0x77 # DW_OP_breg7
++ .sleb128 16
++ .quad 0 # Location list terminator begin (*.LLST0)
++ .quad 0 # Location list terminator end (*.LLST0)
++.LLST1:
++ .quad .LVL0 # Location list begin address (*.LLST1)
++ .quad .LVL1-1 # Location list end address (*.LLST1)
++ .value 0x1 # Location expression size
++ .byte 0x55 # DW_OP_reg5
++ .quad .LVL1-1 # Location list begin address (*.LLST1)
++ .quad .LFE9 # Location list end address (*.LLST1)
++ .value 0x4 # Location expression size
++ .byte 0xf3 # DW_OP_GNU_entry_value
++ .uleb128 0x1
++ .byte 0x55 # DW_OP_reg5
++ .byte 0x9f # DW_OP_stack_value
++ .quad 0 # Location list terminator begin (*.LLST1)
++ .quad 0 # Location list terminator end (*.LLST1)
++.LLST2:
++ .quad .LFB10 # Location list begin address (*.LLST2)
++ .quad .LCFI1 # Location list end address (*.LLST2)
++ .value 0x2 # Location expression size
++ .byte 0x77 # DW_OP_breg7
++ .sleb128 8
++ .quad .LCFI1 # Location list begin address (*.LLST2)
++ .quad .LFE10 # Location list end address (*.LLST2)
++ .value 0x2 # Location expression size
++ .byte 0x77 # DW_OP_breg7
++ .sleb128 16
++ .quad 0 # Location list terminator begin (*.LLST2)
++ .quad 0 # Location list terminator end (*.LLST2)
++.LLST3:
++ .quad .LVL2 # Location list begin address (*.LLST3)
++ .quad .LVL3-1 # Location list end address (*.LLST3)
++ .value 0x1 # Location expression size
++ .byte 0x55 # DW_OP_reg5
++ .quad .LVL3-1 # Location list begin address (*.LLST3)
++ .quad .LFE10 # Location list end address (*.LLST3)
++ .value 0x4 # Location expression size
++ .byte 0xf3 # DW_OP_GNU_entry_value
++ .uleb128 0x1
++ .byte 0x55 # DW_OP_reg5
++ .byte 0x9f # DW_OP_stack_value
++ .quad 0 # Location list terminator begin (*.LLST3)
++ .quad 0 # Location list terminator end (*.LLST3)
++.LLST4:
++ .quad .LVL4 # Location list begin address (*.LLST4)
++ .quad .LVL5-1 # Location list end address (*.LLST4)
++ .value 0x1 # Location expression size
++ .byte 0x55 # DW_OP_reg5
++ .quad .LVL5-1 # Location list begin address (*.LLST4)
++ .quad .LFE11 # Location list end address (*.LLST4)
++ .value 0x4 # Location expression size
++ .byte 0xf3 # DW_OP_GNU_entry_value
++ .uleb128 0x1
++ .byte 0x55 # DW_OP_reg5
++ .byte 0x9f # DW_OP_stack_value
++ .quad 0 # Location list terminator begin (*.LLST4)
++ .quad 0 # Location list terminator end (*.LLST4)
++.LLST5:
++ .quad .LFB12 # Location list begin address (*.LLST5)
++ .quad .LCFI2 # Location list end address (*.LLST5)
++ .value 0x2 # Location expression size
++ .byte 0x77 # DW_OP_breg7
++ .sleb128 8
++ .quad .LCFI2 # Location list begin address (*.LLST5)
++ .quad .LCFI3 # Location list end address (*.LLST5)
++ .value 0x2 # Location expression size
++ .byte 0x77 # DW_OP_breg7
++ .sleb128 16
++ .quad .LCFI3 # Location list begin address (*.LLST5)
++ .quad .LFE12 # Location list end address (*.LLST5)
++ .value 0x2 # Location expression size
++ .byte 0x77 # DW_OP_breg7
++ .sleb128 8
++ .quad 0 # Location list terminator begin (*.LLST5)
++ .quad 0 # Location list terminator end (*.LLST5)
++ .section .debug_aranges,"", at progbits
++ .long 0x4c # Length of Address Ranges Info
++ .value 0x2 # DWARF Version
++ .long .Ldebug_info0 # Offset of Compilation Unit Info
++ .byte 0x8 # Size of Address
++ .byte 0 # Size of Segment Descriptor
++ .value 0 # Pad to 16 byte boundary
++ .value 0
++ .quad .Ltext0 # Address
++ .quad .Letext0-.Ltext0 # Length
++ .quad .LFB9 # Address
++ .quad .LFE9-.LFB9 # Length
++ .quad .LFB12 # Address
++ .quad .LFE12-.LFB12 # Length
++ .quad 0
++ .quad 0
++ .section .debug_ranges,"", at progbits
++.Ldebug_ranges0:
++ .quad .Ltext0 # Offset 0
++ .quad .Letext0
++ .quad .LFB9 # Offset 0x10
++ .quad .LFE9
++ .quad .LFB12 # Offset 0x20
++ .quad .LFE12
++ .quad 0
++ .quad 0
++ .section .debug_line,"", at progbits
++.Ldebug_line0:
++ .section .debug_str,"MS", at progbits,1
++.LASF9:
++ .string "long long int"
++.LASF14:
++ .string "GNU C 4.7.3 20130221 (prerelease)"
++.LASF3:
++ .string "unsigned int"
++.LASF17:
++ .string "main"
++.LASF0:
++ .string "long unsigned int"
++.LASF10:
++ .string "long long unsigned int"
++.LASF16:
++ .string ""
++.LASF13:
++ .string "tailcall"
++.LASF1:
++ .string "unsigned char"
++.LASF8:
++ .string "char"
++.LASF6:
++ .string "long int"
++.LASF11:
++ .string "noret"
++.LASF2:
++ .string "short unsigned int"
++.LASF4:
++ .string "signed char"
++.LASF12:
++ .string "mayret"
++.LASF18:
++ .string "abort"
++.LASF5:
++ .string "short int"
++.LASF7:
++ .string "sizetype"
++.LASF15:
++ .string "gdb.arch/amd64-tailcall-noret.c"
++ .ident "GCC: (GNU) 4.7.3 20130221 (prerelease)"
++ .section .note.GNU-stack,"", at progbits
+diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.c b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.c
+new file mode 100644
+index 0000000..6a84c76
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.c
+@@ -0,0 +1,46 @@
++/* 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/>. */
++
++#include <stdlib.h>
++
++volatile int v = 1;
++
++static __attribute__ ((noinline, noclone, noreturn)) void
++noret (int x, ...)
++{
++ abort ();
++}
++
++static __attribute__ ((noinline, noclone)) void
++mayret (int x)
++{
++ if (v)
++ noret (x);
++}
++
++static __attribute__ ((noinline, noclone)) void
++tailcall (int x)
++{
++ mayret (x);
++}
++
++int
++main (void)
++{
++ tailcall (1);
++ return 0;
++}
+diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
+new file mode 100644
+index 0000000..cd15596
+--- /dev/null
++++ b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
+@@ -0,0 +1,36 @@
++# Copyright (C) 2012-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/>.
++
++set opts {}
++standard_testfile .S
++
++if [info exists COMPILE] {
++ # make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-noret.exp COMPILE=1"
++ standard_testfile
++ lappend opts debug optimize=-O2
++} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
++ verbose "Skipping ${testfile}."
++ return
++}
++
++if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] } {
++ return -1
++}
++
++if ![runto noret] {
++ return -1
++}
++
++gdb_test "bt" "#0 +noret \\(x=1\\) at \[^\r\n\]*\r\n#1 +0x\[0-9a-f\]+ in mayret \\(x=x at entry=1\\) at \[^\r\n\]*\r\n#2 +0x\[0-9a-f\]+ in tailcall \\(x=x at entry=1\\) at \[^\r\n\]*\r\n#3 +0x\[0-9a-f\]+ in main \\(\\) at .*"
+
diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch
index 9e6b712..08e2cd4 100644
--- a/gdb-rhbz795424-bitpos-23of25.patch
+++ b/gdb-rhbz795424-bitpos-23of25.patch
@@ -137,10 +137,10 @@ Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bitpos-tdep.patch
-Index: gdb-7.5.50.20130118/gdb/alpha-tdep.c
+Index: gdb-7.5.50.20130310/gdb/alpha-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/alpha-tdep.c 2013-01-18 23:36:59.954290362 +0100
-+++ gdb-7.5.50.20130118/gdb/alpha-tdep.c 2013-01-18 23:37:12.465307566 +0100
+--- gdb-7.5.50.20130310.orig/gdb/alpha-tdep.c 2013-03-10 16:44:34.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/alpha-tdep.c 2013-03-10 16:44:42.111599838 +0100
@@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *g
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -184,10 +184,10 @@ Index: gdb-7.5.50.20130118/gdb/alpha-tdep.c
memcpy (arg_reg_buffer + offset, contents, tlen);
offset += tlen;
contents += tlen;
-Index: gdb-7.5.50.20130118/gdb/amd64-tdep.c
+Index: gdb-7.5.50.20130310/gdb/amd64-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/amd64-tdep.c 2013-01-18 23:36:59.955290365 +0100
-+++ gdb-7.5.50.20130118/gdb/amd64-tdep.c 2013-01-18 23:37:12.466307569 +0100
+--- gdb-7.5.50.20130310.orig/gdb/amd64-tdep.c 2013-03-10 16:16:23.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/amd64-tdep.c 2013-03-10 16:44:42.112599838 +0100
@@ -616,7 +616,7 @@ amd64_return_value (struct gdbarch *gdba
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -217,10 +217,10 @@ Index: gdb-7.5.50.20130118/gdb/amd64-tdep.c
enum amd64_reg_class class[2];
int needed_integer_regs = 0;
int needed_sse_regs = 0;
-Index: gdb-7.5.50.20130118/gdb/amd64-windows-tdep.c
+Index: gdb-7.5.50.20130310/gdb/amd64-windows-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/amd64-windows-tdep.c 2013-01-18 23:36:59.956290369 +0100
-+++ gdb-7.5.50.20130118/gdb/amd64-windows-tdep.c 2013-01-18 23:37:12.466307569 +0100
+--- gdb-7.5.50.20130310.orig/gdb/amd64-windows-tdep.c 2013-01-01 07:32:37.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/amd64-windows-tdep.c 2013-03-10 16:44:42.112599838 +0100
@@ -79,7 +79,7 @@ amd64_windows_return_value (struct gdbar
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
@@ -230,10 +230,10 @@ Index: gdb-7.5.50.20130118/gdb/amd64-windows-tdep.c
int regnum = -1;
/* See if our value is returned through a register. If it is, then
-Index: gdb-7.5.50.20130118/gdb/arm-tdep.c
+Index: gdb-7.5.50.20130310/gdb/arm-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/arm-tdep.c 2013-01-18 23:36:59.961290378 +0100
-+++ gdb-7.5.50.20130118/gdb/arm-tdep.c 2013-01-18 23:37:12.469307573 +0100
+--- gdb-7.5.50.20130310.orig/gdb/arm-tdep.c 2013-03-01 16:38:23.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/arm-tdep.c 2013-03-10 16:44:42.115599840 +0100
@@ -3496,7 +3496,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc
array). Vectors and complex types are not currently supported,
matching the generic AAPCS support. */
@@ -308,10 +308,10 @@ Index: gdb-7.5.50.20130118/gdb/arm-tdep.c
struct type *arg_type;
struct type *target_type;
enum type_code typecode;
-Index: gdb-7.5.50.20130118/gdb/avr-tdep.c
+Index: gdb-7.5.50.20130310/gdb/avr-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/avr-tdep.c 2013-01-18 23:36:59.963290385 +0100
-+++ gdb-7.5.50.20130118/gdb/avr-tdep.c 2013-01-18 23:37:12.470307574 +0100
+--- gdb-7.5.50.20130310.orig/gdb/avr-tdep.c 2013-03-01 16:38:24.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/avr-tdep.c 2013-03-10 16:44:42.116599840 +0100
@@ -1170,13 +1170,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s
struct stack_item
@@ -345,12 +345,12 @@ Index: gdb-7.5.50.20130118/gdb/avr-tdep.c
/* Calculate the potential last register needed. */
last_regnum = regnum - (len + (len & 1));
-Index: gdb-7.5.50.20130118/gdb/bfin-tdep.c
+Index: gdb-7.5.50.20130310/gdb/bfin-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/bfin-tdep.c 2013-01-18 23:36:59.963290385 +0100
-+++ gdb-7.5.50.20130118/gdb/bfin-tdep.c 2013-01-18 23:37:12.470307574 +0100
+--- gdb-7.5.50.20130310.orig/gdb/bfin-tdep.c 2013-03-01 16:38:24.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/bfin-tdep.c 2013-03-10 16:46:27.992669964 +0100
@@ -506,7 +506,7 @@ bfin_push_dummy_call (struct gdbarch *gd
- char buf[4];
+ gdb_byte buf[4];
int i;
long reg_r0, reg_r1, reg_r2;
- int total_len = 0;
@@ -367,10 +367,10 @@ Index: gdb-7.5.50.20130118/gdb/bfin-tdep.c
sp -= container_len;
write_memory (sp, value_contents_writeable (args[i]), container_len);
-Index: gdb-7.5.50.20130118/gdb/cris-tdep.c
+Index: gdb-7.5.50.20130310/gdb/cris-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/cris-tdep.c 2013-01-18 23:36:59.965290390 +0100
-+++ gdb-7.5.50.20130118/gdb/cris-tdep.c 2013-01-18 23:37:12.471307578 +0100
+--- gdb-7.5.50.20130310.orig/gdb/cris-tdep.c 2013-03-01 16:38:24.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/cris-tdep.c 2013-03-10 16:44:42.117599841 +0100
@@ -670,13 +670,13 @@ static CORE_ADDR cris_unwind_sp (struct
struct stack_item
@@ -405,10 +405,10 @@ Index: gdb-7.5.50.20130118/gdb/cris-tdep.c
/* How may registers worth of storage do we need for this argument? */
reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0);
-Index: gdb-7.5.50.20130118/gdb/h8300-tdep.c
+Index: gdb-7.5.50.20130310/gdb/h8300-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/h8300-tdep.c 2013-01-18 23:36:59.966290392 +0100
-+++ gdb-7.5.50.20130118/gdb/h8300-tdep.c 2013-01-18 23:37:12.472307583 +0100
+--- gdb-7.5.50.20130310.orig/gdb/h8300-tdep.c 2013-01-01 07:32:44.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/h8300-tdep.c 2013-03-10 16:44:42.118599841 +0100
@@ -640,7 +640,7 @@ h8300_push_dummy_call (struct gdbarch *g
int struct_return, CORE_ADDR struct_addr)
{
@@ -441,10 +441,10 @@ Index: gdb-7.5.50.20130118/gdb/h8300-tdep.c
for (offset = 0; offset < padded_len; offset += wordsize)
{
-Index: gdb-7.5.50.20130118/gdb/hppa-tdep.c
+Index: gdb-7.5.50.20130310/gdb/hppa-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/hppa-tdep.c 2013-01-18 23:36:59.966290392 +0100
-+++ gdb-7.5.50.20130118/gdb/hppa-tdep.c 2013-01-18 23:37:44.228351370 +0100
+--- gdb-7.5.50.20130310.orig/gdb/hppa-tdep.c 2013-03-01 16:38:24.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/hppa-tdep.c 2013-03-10 16:44:42.119599842 +0100
@@ -961,7 +961,7 @@ hppa64_push_dummy_call (struct gdbarch *
{
struct value *arg = args[i];
@@ -463,10 +463,10 @@ Index: gdb-7.5.50.20130118/gdb/hppa-tdep.c
int regnum, offset;
if (len > 16)
-Index: gdb-7.5.50.20130118/gdb/i386-darwin-tdep.c
+Index: gdb-7.5.50.20130310/gdb/i386-darwin-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/i386-darwin-tdep.c 2013-01-18 23:36:59.967290394 +0100
-+++ gdb-7.5.50.20130118/gdb/i386-darwin-tdep.c 2013-01-18 23:37:12.473307586 +0100
+--- gdb-7.5.50.20130310.orig/gdb/i386-darwin-tdep.c 2013-02-12 20:03:54.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/i386-darwin-tdep.c 2013-03-10 16:44:42.119599842 +0100
@@ -166,7 +166,7 @@ i386_darwin_push_dummy_call (struct gdba
for (write_pass = 0; write_pass < 2; write_pass++)
@@ -476,10 +476,10 @@ Index: gdb-7.5.50.20130118/gdb/i386-darwin-tdep.c
int num_m128 = 0;
if (struct_return)
-Index: gdb-7.5.50.20130118/gdb/i386-tdep.c
+Index: gdb-7.5.50.20130310/gdb/i386-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/i386-tdep.c 2013-01-18 23:36:59.969290398 +0100
-+++ gdb-7.5.50.20130118/gdb/i386-tdep.c 2013-01-18 23:37:12.475307589 +0100
+--- gdb-7.5.50.20130310.orig/gdb/i386-tdep.c 2013-03-10 16:16:23.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/i386-tdep.c 2013-03-10 16:44:42.120599842 +0100
@@ -2407,7 +2407,7 @@ i386_push_dummy_call (struct gdbarch *gd
gdb_byte buf[4];
int i;
@@ -543,10 +543,10 @@ Index: gdb-7.5.50.20130118/gdb/i386-tdep.c
if (i386_fp_regnum_p (get_frame_arch (frame), regnum))
{
-Index: gdb-7.5.50.20130118/gdb/ia64-tdep.c
+Index: gdb-7.5.50.20130310/gdb/ia64-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/ia64-tdep.c 2013-01-18 23:36:59.970290400 +0100
-+++ gdb-7.5.50.20130118/gdb/ia64-tdep.c 2013-01-18 23:37:12.476307589 +0100
+--- gdb-7.5.50.20130310.orig/gdb/ia64-tdep.c 2013-03-10 16:16:23.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/ia64-tdep.c 2013-03-10 16:44:42.121599843 +0100
@@ -3974,8 +3974,10 @@ ia64_push_dummy_call (struct gdbarch *gd
int argno;
struct value *arg;
@@ -560,10 +560,10 @@ Index: gdb-7.5.50.20130118/gdb/ia64-tdep.c
int floatreg;
ULONGEST bsp;
CORE_ADDR funcdescaddr, pc, global_pointer;
-Index: gdb-7.5.50.20130118/gdb/iq2000-tdep.c
+Index: gdb-7.5.50.20130310/gdb/iq2000-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/iq2000-tdep.c 2013-01-18 23:36:59.970290400 +0100
-+++ gdb-7.5.50.20130118/gdb/iq2000-tdep.c 2013-01-18 23:37:12.476307589 +0100
+--- gdb-7.5.50.20130310.orig/gdb/iq2000-tdep.c 2013-03-01 16:38:25.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/iq2000-tdep.c 2013-03-10 16:44:42.121599843 +0100
@@ -654,8 +654,9 @@ iq2000_push_dummy_call (struct gdbarch *
const bfd_byte *val;
bfd_byte buf[4];
@@ -576,10 +576,10 @@ Index: gdb-7.5.50.20130118/gdb/iq2000-tdep.c
/* Used to copy struct arguments into the stack. */
CORE_ADDR struct_ptr;
-Index: gdb-7.5.50.20130118/gdb/m32r-tdep.c
+Index: gdb-7.5.50.20130310/gdb/m32r-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/m32r-tdep.c 2013-01-18 23:36:59.971290402 +0100
-+++ gdb-7.5.50.20130118/gdb/m32r-tdep.c 2013-01-18 23:37:12.476307589 +0100
+--- gdb-7.5.50.20130310.orig/gdb/m32r-tdep.c 2013-01-01 07:32:46.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/m32r-tdep.c 2013-03-10 16:44:42.121599843 +0100
@@ -695,7 +695,7 @@ m32r_push_dummy_call (struct gdbarch *gd
CORE_ADDR regval;
gdb_byte *val;
@@ -589,10 +589,10 @@ Index: gdb-7.5.50.20130118/gdb/m32r-tdep.c
/* First force sp to a 4-byte alignment. */
sp = sp & ~3;
-Index: gdb-7.5.50.20130118/gdb/m68k-tdep.c
+Index: gdb-7.5.50.20130310/gdb/m68k-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/m68k-tdep.c 2013-01-18 23:36:59.971290402 +0100
-+++ gdb-7.5.50.20130118/gdb/m68k-tdep.c 2013-01-18 23:39:06.474459041 +0100
+--- gdb-7.5.50.20130310.orig/gdb/m68k-tdep.c 2013-01-01 07:32:46.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/m68k-tdep.c 2013-03-10 16:44:42.121599843 +0100
@@ -384,7 +384,7 @@ m68k_reg_struct_return_p (struct gdbarch
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -615,10 +615,10 @@ Index: gdb-7.5.50.20130118/gdb/m68k-tdep.c
/* Non-scalars bigger than 4 bytes are left aligned, others are
right aligned. */
-Index: gdb-7.5.50.20130118/gdb/m88k-tdep.c
+Index: gdb-7.5.50.20130310/gdb/m88k-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/m88k-tdep.c 2013-01-18 23:36:59.971290402 +0100
-+++ gdb-7.5.50.20130118/gdb/m88k-tdep.c 2013-01-18 23:37:12.477307590 +0100
+--- gdb-7.5.50.20130310.orig/gdb/m88k-tdep.c 2013-01-01 07:32:47.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/m88k-tdep.c 2013-03-10 16:44:42.121599843 +0100
@@ -260,13 +260,13 @@ m88k_store_arguments (struct regcache *r
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
@@ -646,10 +646,10 @@ Index: gdb-7.5.50.20130118/gdb/m88k-tdep.c
if (m88k_in_register_p (type))
{
-Index: gdb-7.5.50.20130118/gdb/mep-tdep.c
+Index: gdb-7.5.50.20130310/gdb/mep-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/mep-tdep.c 2013-01-18 23:36:59.972290404 +0100
-+++ gdb-7.5.50.20130118/gdb/mep-tdep.c 2013-01-18 23:37:12.477307590 +0100
+--- gdb-7.5.50.20130310.orig/gdb/mep-tdep.c 2013-03-01 16:38:25.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/mep-tdep.c 2013-03-10 16:44:42.122599843 +0100
@@ -2279,7 +2279,7 @@ push_large_arguments (CORE_ADDR sp, int
for (i = 0; i < argc; i++)
@@ -659,10 +659,10 @@ Index: gdb-7.5.50.20130118/gdb/mep-tdep.c
if (arg_len > MEP_GPR_SIZE)
{
-Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
+Index: gdb-7.5.50.20130310/gdb/mips-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/mips-tdep.c 2013-01-18 23:36:59.975290414 +0100
-+++ gdb-7.5.50.20130118/gdb/mips-tdep.c 2013-01-18 23:37:12.479307599 +0100
+--- gdb-7.5.50.20130310.orig/gdb/mips-tdep.c 2013-02-24 13:54:04.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/mips-tdep.c 2013-03-10 16:44:42.123599844 +0100
@@ -396,7 +396,7 @@ static void
mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_num, int length,
@@ -683,7 +683,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
if (mips_debug && out != NULL)
{
int i;
-@@ -4345,13 +4345,13 @@ mips_eabi_push_dummy_call (struct gdbarc
+@@ -4346,13 +4346,13 @@ mips_eabi_push_dummy_call (struct gdbarc
gdb_byte valbuf[MAX_REGISTER_SIZE];
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (value_type (arg));
@@ -700,7 +700,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
/* Function pointer arguments to mips16 code need to be made into
mips16 pointers. */
-@@ -4636,7 +4636,7 @@ mips_eabi_return_value (struct gdbarch *
+@@ -4637,7 +4637,7 @@ mips_eabi_return_value (struct gdbarch *
static int
mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type,
@@ -709,7 +709,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
{
int i;
-@@ -4651,7 +4651,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar
+@@ -4652,7 +4652,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar
for (i = 0; i < TYPE_NFIELDS (arg_type); i++)
{
@@ -718,7 +718,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
struct type *field_type;
/* We're only looking at normal fields. */
-@@ -4693,7 +4693,7 @@ mips_n32n64_push_dummy_call (struct gdba
+@@ -4694,7 +4694,7 @@ mips_n32n64_push_dummy_call (struct gdba
int argreg;
int float_argreg;
int argnum;
@@ -727,7 +727,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
int stack_offset = 0;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR func_addr = find_function_addr (function, NULL);
-@@ -5044,11 +5044,11 @@ mips_n32n64_return_value (struct gdbarch
+@@ -5045,11 +5045,11 @@ mips_n32n64_return_value (struct gdbarch
: MIPS_V0_REGNUM);
field < TYPE_NFIELDS (type); field++, regnum += 2)
{
@@ -743,7 +743,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16)
{
/* A 16-byte long double field goes in two consecutive
-@@ -5090,8 +5090,8 @@ mips_n32n64_return_value (struct gdbarch
+@@ -5091,8 +5091,8 @@ mips_n32n64_return_value (struct gdbarch
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
if (mips_debug)
@@ -754,7 +754,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
mips_xfer_register (gdbarch, regcache,
gdbarch_num_regs (gdbarch) + regnum,
xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf,
-@@ -5149,7 +5149,7 @@ mips_o32_push_dummy_call (struct gdbarch
+@@ -5150,7 +5150,7 @@ mips_o32_push_dummy_call (struct gdbarch
int argreg;
int float_argreg;
int argnum;
@@ -763,7 +763,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
int stack_offset = 0;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR func_addr = find_function_addr (function, NULL);
-@@ -5213,13 +5213,13 @@ mips_o32_push_dummy_call (struct gdbarch
+@@ -5214,13 +5214,13 @@ mips_o32_push_dummy_call (struct gdbarch
const gdb_byte *val;
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (value_type (arg));
@@ -780,7 +780,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
val = value_contents (arg);
-@@ -5677,8 +5677,8 @@ mips_o64_push_dummy_call (struct gdbarch
+@@ -5678,8 +5678,8 @@ mips_o64_push_dummy_call (struct gdbarch
int argreg;
int float_argreg;
int argnum;
@@ -791,7 +791,7 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR func_addr = find_function_addr (function, NULL);
-@@ -5739,13 +5739,13 @@ mips_o64_push_dummy_call (struct gdbarch
+@@ -5740,13 +5740,13 @@ mips_o64_push_dummy_call (struct gdbarch
gdb_byte valbuf[MAX_REGISTER_SIZE];
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (value_type (arg));
@@ -808,10 +808,10 @@ Index: gdb-7.5.50.20130118/gdb/mips-tdep.c
val = value_contents (arg);
-Index: gdb-7.5.50.20130118/gdb/mn10300-tdep.c
+Index: gdb-7.5.50.20130310/gdb/mn10300-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/mn10300-tdep.c 2013-01-18 23:36:59.976290416 +0100
-+++ gdb-7.5.50.20130118/gdb/mn10300-tdep.c 2013-01-18 23:37:12.479307599 +0100
+--- gdb-7.5.50.20130310.orig/gdb/mn10300-tdep.c 2013-03-01 16:38:25.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/mn10300-tdep.c 2013-03-10 16:44:42.123599844 +0100
@@ -1228,7 +1228,7 @@ mn10300_push_dummy_call (struct gdbarch
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const int push_size = register_size (gdbarch, E_PC_REGNUM);
@@ -821,10 +821,10 @@ Index: gdb-7.5.50.20130118/gdb/mn10300-tdep.c
int stack_offset = 0;
int argnum;
char *val, valbuf[MAX_REGISTER_SIZE];
-Index: gdb-7.5.50.20130118/gdb/mt-tdep.c
+Index: gdb-7.5.50.20130310/gdb/mt-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/mt-tdep.c 2013-01-18 23:36:59.976290416 +0100
-+++ gdb-7.5.50.20130118/gdb/mt-tdep.c 2013-01-18 23:37:12.479307599 +0100
+--- gdb-7.5.50.20130310.orig/gdb/mt-tdep.c 2013-01-01 07:32:47.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/mt-tdep.c 2013-03-10 16:44:42.124599844 +0100
@@ -783,9 +783,9 @@ mt_push_dummy_call (struct gdbarch *gdba
gdb_byte buf[MT_MAX_STRUCT_SIZE];
int argreg = MT_1ST_ARGREG;
@@ -837,10 +837,10 @@ Index: gdb-7.5.50.20130118/gdb/mt-tdep.c
int i, j;
/* First handle however many args we can fit into MT_1ST_ARGREG thru
-Index: gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c
+Index: gdb-7.5.50.20130310/gdb/ppc-sysv-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/ppc-sysv-tdep.c 2013-01-18 23:36:59.977290417 +0100
-+++ gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c 2013-01-18 23:37:12.480307602 +0100
+--- gdb-7.5.50.20130310.orig/gdb/ppc-sysv-tdep.c 2013-01-23 21:03:18.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/ppc-sysv-tdep.c 2013-03-10 16:44:42.124599844 +0100
@@ -68,7 +68,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
@@ -897,10 +897,10 @@ Index: gdb-7.5.50.20130118/gdb/ppc-sysv-tdep.c
if (len < tdep->wordsize)
write_memory (gparam + tdep->wordsize - len, val, len);
else
-Index: gdb-7.5.50.20130118/gdb/rl78-tdep.c
+Index: gdb-7.5.50.20130310/gdb/rl78-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/rl78-tdep.c 2013-01-18 23:36:59.977290417 +0100
-+++ gdb-7.5.50.20130118/gdb/rl78-tdep.c 2013-01-18 23:37:12.480307602 +0100
+--- gdb-7.5.50.20130310.orig/gdb/rl78-tdep.c 2013-01-01 07:32:50.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/rl78-tdep.c 2013-03-10 16:44:42.124599844 +0100
@@ -1019,8 +1019,8 @@ rl78_push_dummy_call (struct gdbarch *gd
for (i = nargs - 1; i >= 0; i--)
{
@@ -912,10 +912,10 @@ Index: gdb-7.5.50.20130118/gdb/rl78-tdep.c
sp -= container_len;
write_memory (rl78_make_data_address (sp),
-Index: gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c
+Index: gdb-7.5.50.20130310/gdb/rs6000-aix-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/rs6000-aix-tdep.c 2013-01-18 23:36:59.978290418 +0100
-+++ gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c 2013-01-18 23:37:12.480307602 +0100
+--- gdb-7.5.50.20130310.orig/gdb/rs6000-aix-tdep.c 2013-01-01 07:32:50.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/rs6000-aix-tdep.c 2013-03-10 16:44:42.125599845 +0100
@@ -198,9 +198,9 @@ rs6000_push_dummy_call (struct gdbarch *
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -937,10 +937,10 @@ Index: gdb-7.5.50.20130118/gdb/rs6000-aix-tdep.c
if (argbytes)
{
-Index: gdb-7.5.50.20130118/gdb/s390-tdep.c
+Index: gdb-7.5.50.20130310/gdb/s390-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/s390-tdep.c 2013-01-18 23:36:59.979290420 +0100
-+++ gdb-7.5.50.20130118/gdb/s390-tdep.c 2013-01-18 23:37:12.480307602 +0100
+--- gdb-7.5.50.20130310.orig/gdb/s390-tdep.c 2013-01-01 07:32:50.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/s390-tdep.c 2013-03-10 16:44:42.125599845 +0100
@@ -2482,7 +2482,7 @@ is_float_like (struct type *type)
@@ -959,10 +959,10 @@ Index: gdb-7.5.50.20130118/gdb/s390-tdep.c
if (s390_function_arg_pass_by_reference (type))
{
-Index: gdb-7.5.50.20130118/gdb/score-tdep.c
+Index: gdb-7.5.50.20130310/gdb/score-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/score-tdep.c 2013-01-18 23:36:59.979290420 +0100
-+++ gdb-7.5.50.20130118/gdb/score-tdep.c 2013-01-18 23:37:12.481307604 +0100
+--- gdb-7.5.50.20130310.orig/gdb/score-tdep.c 2013-03-01 16:38:26.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/score-tdep.c 2013-03-10 16:44:42.125599845 +0100
@@ -515,7 +515,7 @@ score_push_dummy_call (struct gdbarch *g
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int argnum;
@@ -972,10 +972,10 @@ Index: gdb-7.5.50.20130118/gdb/score-tdep.c
CORE_ADDR stack_offset = 0;
CORE_ADDR addr = 0;
-Index: gdb-7.5.50.20130118/gdb/sh-tdep.c
+Index: gdb-7.5.50.20130310/gdb/sh-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/sh-tdep.c 2013-01-18 23:36:59.980290423 +0100
-+++ gdb-7.5.50.20130118/gdb/sh-tdep.c 2013-01-18 23:37:12.481307604 +0100
+--- gdb-7.5.50.20130310.orig/gdb/sh-tdep.c 2013-01-01 07:32:50.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/sh-tdep.c 2013-03-10 16:44:42.126599845 +0100
@@ -807,7 +807,7 @@ sh_skip_prologue (struct gdbarch *gdbarc
static int
sh_use_struct_convention (int renesas_abi, struct type *type)
@@ -1014,10 +1014,10 @@ Index: gdb-7.5.50.20130118/gdb/sh-tdep.c
int pass_on_stack = 0;
int last_reg_arg = INT_MAX;
-Index: gdb-7.5.50.20130118/gdb/sh64-tdep.c
+Index: gdb-7.5.50.20130310/gdb/sh64-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/sh64-tdep.c 2013-01-18 23:36:59.980290423 +0100
-+++ gdb-7.5.50.20130118/gdb/sh64-tdep.c 2013-01-18 23:37:12.482307606 +0100
+--- gdb-7.5.50.20130310.orig/gdb/sh64-tdep.c 2013-03-01 16:38:26.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/sh64-tdep.c 2013-03-10 16:44:42.126599845 +0100
@@ -1058,7 +1058,7 @@ sh64_push_dummy_call (struct gdbarch *gd
CORE_ADDR struct_addr)
{
@@ -1036,10 +1036,10 @@ Index: gdb-7.5.50.20130118/gdb/sh64-tdep.c
int argreg_size;
int fp_args[12];
-Index: gdb-7.5.50.20130118/gdb/sparc-tdep.c
+Index: gdb-7.5.50.20130310/gdb/sparc-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/sparc-tdep.c 2013-01-18 23:36:59.981290427 +0100
-+++ gdb-7.5.50.20130118/gdb/sparc-tdep.c 2013-01-18 23:37:12.482307606 +0100
+--- gdb-7.5.50.20130310.orig/gdb/sparc-tdep.c 2013-03-10 16:44:33.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/sparc-tdep.c 2013-03-10 16:44:42.127599846 +0100
@@ -471,7 +471,7 @@ sparc32_store_arguments (struct regcache
for (i = 0; i < nargs; i++)
{
@@ -1049,10 +1049,10 @@ Index: gdb-7.5.50.20130118/gdb/sparc-tdep.c
if (sparc_structure_or_union_p (type)
|| (sparc_floating_p (type) && len == 16)
-Index: gdb-7.5.50.20130118/gdb/sparc64-tdep.c
+Index: gdb-7.5.50.20130310/gdb/sparc64-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/sparc64-tdep.c 2013-01-18 23:36:59.982290430 +0100
-+++ gdb-7.5.50.20130118/gdb/sparc64-tdep.c 2013-01-18 23:37:12.482307606 +0100
+--- gdb-7.5.50.20130310.orig/gdb/sparc64-tdep.c 2013-01-01 07:32:51.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/sparc64-tdep.c 2013-03-10 16:44:42.127599846 +0100
@@ -639,7 +639,8 @@ sparc64_16_byte_align_p (struct type *ty
static void
@@ -1108,10 +1108,10 @@ Index: gdb-7.5.50.20130118/gdb/sparc64-tdep.c
int regnum = -1;
gdb_byte buf[16];
-Index: gdb-7.5.50.20130118/gdb/spu-tdep.c
+Index: gdb-7.5.50.20130310/gdb/spu-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/spu-tdep.c 2013-01-18 23:36:59.982290430 +0100
-+++ gdb-7.5.50.20130118/gdb/spu-tdep.c 2013-01-18 23:37:12.483307607 +0100
+--- gdb-7.5.50.20130310.orig/gdb/spu-tdep.c 2013-01-01 07:32:51.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/spu-tdep.c 2013-03-10 16:44:42.127599846 +0100
@@ -1373,7 +1373,7 @@ spu_push_dummy_call (struct gdbarch *gdb
struct value *arg = args[i];
struct type *type = check_typedef (value_type (arg));
@@ -1130,10 +1130,10 @@ Index: gdb-7.5.50.20130118/gdb/spu-tdep.c
int preferred_slot;
if (spu_scalar_value_p (type))
-Index: gdb-7.5.50.20130118/gdb/tic6x-tdep.c
+Index: gdb-7.5.50.20130310/gdb/tic6x-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/tic6x-tdep.c 2013-01-18 23:36:59.983290432 +0100
-+++ gdb-7.5.50.20130118/gdb/tic6x-tdep.c 2013-01-18 23:39:27.770484516 +0100
+--- gdb-7.5.50.20130310.orig/gdb/tic6x-tdep.c 2013-03-01 16:38:27.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/tic6x-tdep.c 2013-03-10 16:44:42.128599846 +0100
@@ -896,7 +896,7 @@ tic6x_push_dummy_call (struct gdbarch *g
int argreg = 0;
int argnum;
@@ -1171,24 +1171,24 @@ Index: gdb-7.5.50.20130118/gdb/tic6x-tdep.c
addr = sp + stack_offset;
write_memory (addr, val, len);
-Index: gdb-7.5.50.20130118/gdb/tilegx-tdep.c
+Index: gdb-7.5.50.20130310/gdb/tilegx-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/tilegx-tdep.c 2013-01-18 23:36:59.983290432 +0100
-+++ gdb-7.5.50.20130118/gdb/tilegx-tdep.c 2013-01-18 23:37:12.483307607 +0100
+--- gdb-7.5.50.20130310.orig/gdb/tilegx-tdep.c 2013-03-02 02:34:40.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/tilegx-tdep.c 2013-03-10 16:45:31.857629100 +0100
@@ -291,7 +291,7 @@ tilegx_push_dummy_call (struct gdbarch *
CORE_ADDR stack_dest = sp;
int argreg = TILEGX_R0_REGNUM;
int i, j;
- int typelen, slacklen, alignlen;
+ LONGEST typelen, slacklen, alignlen;
- static const gdb_byte two_zero_words[8] = { 0 };
+ static const gdb_byte four_zero_words[16] = { 0 };
/* If struct_return is 1, then the struct return address will
-Index: gdb-7.5.50.20130118/gdb/v850-tdep.c
+Index: gdb-7.5.50.20130310/gdb/v850-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/v850-tdep.c 2013-01-18 23:36:59.984290434 +0100
-+++ gdb-7.5.50.20130118/gdb/v850-tdep.c 2013-01-18 23:37:12.484307608 +0100
-@@ -808,7 +808,7 @@ v850_push_dummy_call (struct gdbarch *gd
+--- gdb-7.5.50.20130310.orig/gdb/v850-tdep.c 2013-03-02 19:26:30.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/v850-tdep.c 2013-03-10 16:44:42.128599846 +0100
+@@ -817,7 +817,7 @@ v850_push_dummy_call (struct gdbarch *gd
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int argreg;
int argnum;
@@ -1197,7 +1197,7 @@ Index: gdb-7.5.50.20130118/gdb/v850-tdep.c
int stack_offset;
/* The offset onto the stack at which we will start copying parameters
-@@ -833,7 +833,7 @@ v850_push_dummy_call (struct gdbarch *gd
+@@ -842,7 +842,7 @@ v850_push_dummy_call (struct gdbarch *gd
in four registers available. Loop thru args from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
@@ -1206,10 +1206,10 @@ Index: gdb-7.5.50.20130118/gdb/v850-tdep.c
gdb_byte *val;
gdb_byte valbuf[v850_reg_size];
-Index: gdb-7.5.50.20130118/gdb/vax-tdep.c
+Index: gdb-7.5.50.20130310/gdb/vax-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/vax-tdep.c 2013-01-18 23:36:59.984290434 +0100
-+++ gdb-7.5.50.20130118/gdb/vax-tdep.c 2013-01-18 23:37:12.484307608 +0100
+--- gdb-7.5.50.20130310.orig/gdb/vax-tdep.c 2013-03-10 16:44:34.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/vax-tdep.c 2013-03-10 16:44:42.128599846 +0100
@@ -115,7 +115,7 @@ vax_store_arguments (struct regcache *re
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1228,10 +1228,10 @@ Index: gdb-7.5.50.20130118/gdb/vax-tdep.c
sp -= (len + 3) & ~3;
count += (len + 3) / 4;
-Index: gdb-7.5.50.20130118/gdb/xstormy16-tdep.c
+Index: gdb-7.5.50.20130310/gdb/xstormy16-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/xstormy16-tdep.c 2013-01-18 23:36:59.984290434 +0100
-+++ gdb-7.5.50.20130118/gdb/xstormy16-tdep.c 2013-01-18 23:37:12.484307608 +0100
+--- gdb-7.5.50.20130310.orig/gdb/xstormy16-tdep.c 2013-03-01 16:38:27.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/xstormy16-tdep.c 2013-03-10 16:46:05.888653201 +0100
@@ -235,8 +235,9 @@ xstormy16_push_dummy_call (struct gdbarc
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR stack_dest = sp;
@@ -1242,12 +1242,12 @@ Index: gdb-7.5.50.20130118/gdb/xstormy16-tdep.c
+ LONGEST j;
+ LONGEST typelen;
const gdb_byte *val;
- char buf[xstormy16_pc_size];
+ gdb_byte buf[xstormy16_pc_size];
-Index: gdb-7.5.50.20130118/gdb/xtensa-tdep.c
+Index: gdb-7.5.50.20130310/gdb/xtensa-tdep.c
===================================================================
---- gdb-7.5.50.20130118.orig/gdb/xtensa-tdep.c 2013-01-18 23:36:59.985290436 +0100
-+++ gdb-7.5.50.20130118/gdb/xtensa-tdep.c 2013-01-18 23:37:12.484307608 +0100
+--- gdb-7.5.50.20130310.orig/gdb/xtensa-tdep.c 2013-01-01 07:41:29.000000000 +0100
++++ gdb-7.5.50.20130310/gdb/xtensa-tdep.c 2013-03-10 16:44:42.129599847 +0100
@@ -1653,8 +1653,7 @@ xtensa_store_return_value (struct type *
if (len > (callsize > 8 ? 8 : 16))
diff --git a/gdb.spec b/gdb.spec
index 29136d1..7d4eb38 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -27,14 +27,14 @@
Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages
Name: %{?scl_prefix}gdb
-%global snap 20130215
+%global snap 20130310
# See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20121213
-Version: 7.5.50.20130215
+Version: 7.5.50.20130310
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers
@@ -557,6 +557,11 @@ Patch816: gdb-rhbz795424-bitpos-25of25.patch
Patch817: gdb-rhbz795424-bitpos-25of25-test.patch
Patch818: gdb-rhbz795424-bitpos-lazyvalue.patch
+# Fix various entry-values sub-optimal results.
+# =push
+Patch825: gdb-entryval-1of2.patch
+Patch826: gdb-entryval-2of2.patch
+
%if 0%{!?rhel:1} || 0%{?rhel} > 6
# RL_STATE_FEDORA_GDB would not be found for:
# Patch642: gdb-readline62-ask-more-rh.patch
@@ -869,6 +874,8 @@ find -name "*.info*"|xargs rm -f
%patch816 -p1
%patch817 -p1
%patch818 -p1
+%patch825 -p1
+%patch826 -p1
%patch393 -p1
%if 0%{!?el5:1} || 0%{?scl:1}
@@ -1370,6 +1377,10 @@ fi
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
%changelog
+* Sun Mar 10 2013 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.5.50.20130310-10.fc19
+- Rebase to FSF GDB 7.5.50.20130310 (pre-7.6 snapshot).
+- Fix various entry-values sub-optimal results.
+
* Mon Feb 25 2013 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.5.50.20130215-9.fc19
- testsuite: Fix gdb.arch/powerpc-power6.exp testcase (IBM, RH BZ 890900).
diff --git a/sources b/sources
index 2a782fe..e7a4c5c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
4981307aa9619bbec5b73261e4e41c8d gdb-libstdc++-v3-python-r155978.tar.bz2
-8d4d5baf06acf7c95211302efffb16ad gdb-7.5.50.20130215.tar.bz2
+d9769486fba1789e609685be0a383b88 gdb-7.5.50.20130310.tar.bz2
More information about the scm-commits
mailing list