[packages/gdb] - updated to 7.9
baggins
baggins at pld-linux.org
Mon Feb 23 00:42:04 CET 2015
commit b1b25d28f76e313545f07b2460d6a34077ab53e5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Feb 23 00:41:48 2015 +0100
- updated to 7.9
gdb-6.6-buildid-locate-core-as-arg.patch | 61 +--
gdb-6.6-buildid-locate-rpm.patch | 108 ++---
gdb-6.6-buildid-locate.patch | 176 ++++---
gdb-vla-intel-logical-not.patch | 11 +
gdb-vla-intel-stringbt-fix.patch | 48 +-
gdb-vla-intel.patch | 802 ++++++++++---------------------
gdb.spec | 10 +-
7 files changed, 494 insertions(+), 722 deletions(-)
---
diff --git a/gdb.spec b/gdb.spec
index 3ee09b8..4518eac 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -20,12 +20,12 @@ Summary(zh_CN.UTF-8): [开发]C和其他语言的调试器
Summary(zh_TW.UTF-8): [.-A開發]C和.$)B其.-A他語.$)B言的調試器
%define snap 20120926
Name: gdb
-Version: 7.8.1
+Version: 7.9
Release: 1
License: GPL v3+
Group: Development/Debuggers
Source0: http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.xz
-# Source0-md5: 8072be87a94be0936bc3b4b6941b0862
+# Source0-md5: e6279f26559d839f0b4218a482bcb43e
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source1-md5: 2e8a48939ae282c12bbacdd54e398247
Source3: %{name}-gstack.man
@@ -41,6 +41,7 @@ Patch112: gdb-archer-vla-tests.patch
Patch113: gdb-vla-intel.patch
Patch114: gdb-vla-intel-04of23-fix.patch
Patch115: gdb-vla-intel-stringbt-fix.patch
+Patch116: gdb-vla-intel-logical-not.patch
Patch1000: %{name}-readline.patch
Patch1001: %{name}-info.patch
Patch1002: %{name}-passflags.patch
@@ -187,6 +188,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch113 -p1
%patch114 -p1
%patch115 -p1
+%patch116 -p1
%patch1000 -p1
%patch1001 -p1
@@ -294,8 +296,8 @@ install libdecnumber/libdecnumber.a $RPM_BUILD_ROOT%{_libdir}
# Remove the files that are part of a gdb build but that are owned and provided by other packages.
# These are part of binutils:
%{__rm} $RPM_BUILD_ROOT%{_localedir}/*/LC_MESSAGES/{bfd,opcodes}.mo
-%{__rm} $RPM_BUILD_ROOT%{_infodir}/{bfd,configure,standards}.info*
-%{__rm} $RPM_BUILD_ROOT%{_includedir}/{ansidecl,bfd,bfdlink,dis-asm,symcat}.h
+%{__rm} $RPM_BUILD_ROOT%{_infodir}/bfd.info*
+%{__rm} $RPM_BUILD_ROOT%{_includedir}/{ansidecl,bfd,bfdlink,dis-asm,symcat,plugin-api}.h
%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.a
diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch
index 1138658..c98e686 100644
--- a/gdb-6.6-buildid-locate-core-as-arg.patch
+++ b/gdb-6.6-buildid-locate-core-as-arg.patch
@@ -58,24 +58,10 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
* exec.c (exec_file_attach): Print a more useful error message if the
user did "gdb core".
-Index: gdb-7.7.50.20140609/gdb/exceptions.h
+Index: gdb-7.8.50.20141228/gdb/exec.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/exceptions.h 2014-06-13 20:26:46.988804553 +0200
-+++ gdb-7.7.50.20140609/gdb/exceptions.h 2014-06-13 20:27:01.930820057 +0200
-@@ -100,6 +100,9 @@ enum errors {
- /* Requested feature, method, mechanism, etc. is not supported. */
- NOT_SUPPORTED_ERROR,
-
-+ /* Attempt to load a core file as executable. */
-+ IS_CORE_ERROR,
-+
- /* Add more errors here. */
- NR_ERRORS
- };
-Index: gdb-7.7.50.20140609/gdb/exec.c
-===================================================================
---- gdb-7.7.50.20140609.orig/gdb/exec.c 2014-06-13 20:26:44.831802315 +0200
-+++ gdb-7.7.50.20140609/gdb/exec.c 2014-06-13 20:27:17.282836454 +0200
+--- gdb-7.8.50.20141228.orig/gdb/exec.c 2015-01-03 23:18:38.097427908 +0100
++++ gdb-7.8.50.20141228/gdb/exec.c 2015-01-03 23:19:02.448556391 +0100
@@ -35,6 +35,7 @@
#include "progspace.h"
#include "gdb_bfd.h"
@@ -84,7 +70,7 @@ Index: gdb-7.7.50.20140609/gdb/exec.c
#include <fcntl.h>
#include "readline/readline.h"
-@@ -231,12 +232,27 @@ exec_file_attach (char *filename, int fr
+@@ -222,12 +223,27 @@ exec_file_attach (const char *filename,
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{
@@ -115,11 +101,11 @@ Index: gdb-7.7.50.20140609/gdb/exec.c
}
if (build_section_table (exec_bfd, §ions, §ions_end))
-Index: gdb-7.7.50.20140609/gdb/main.c
+Index: gdb-7.8.50.20141228/gdb/main.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/main.c 2014-06-13 20:26:44.831802315 +0200
-+++ gdb-7.7.50.20140609/gdb/main.c 2014-06-13 20:26:46.990804555 +0200
-@@ -341,6 +341,36 @@ typedef struct cmdarg {
+--- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-03 23:18:38.098427913 +0100
++++ gdb-7.8.50.20141228/gdb/main.c 2015-01-03 23:22:10.157546792 +0100
+@@ -426,6 +426,36 @@ typedef struct cmdarg {
/* Define type VEC (cmdarg_s). */
DEF_VEC_O (cmdarg_s);
@@ -128,7 +114,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c
+ core_file_command failed to find a matching executable. */
+
+static void
-+exec_or_core_file_attach (char *filename, int from_tty)
++exec_or_core_file_attach (const char *filename, int from_tty)
+{
+ volatile struct gdb_exception e;
+
@@ -142,7 +128,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c
+ {
+ if (e.error == IS_CORE_ERROR)
+ {
-+ core_file_command (filename, from_tty);
++ core_file_command ((char *) filename, from_tty);
+
+ /* Iff the core file found its executable suppress the error message
+ from exec_file_attach. */
@@ -156,7 +142,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c
static int
captured_main (void *data)
{
-@@ -854,6 +884,8 @@ captured_main (void *data)
+@@ -910,6 +940,8 @@ captured_main (void *data)
{
symarg = argv[optind];
execarg = argv[optind];
@@ -165,11 +151,11 @@ Index: gdb-7.7.50.20140609/gdb/main.c
optind++;
}
-@@ -1017,11 +1049,25 @@ captured_main (void *data)
+@@ -1069,11 +1101,26 @@ captured_main (void *data)
&& symarg != NULL
&& strcmp (execarg, symarg) == 0)
{
-+ catch_command_errors_ftype *func;
++ catch_command_errors_const_ftype *func;
+
+ /* Call exec_or_core_file_attach only if the file was specified as
+ a command line argument (and not an a command line option). */
@@ -184,13 +170,28 @@ Index: gdb-7.7.50.20140609/gdb/main.c
/* The exec file and the symbol-file are the same. If we can't
open it, better only print one error message.
- catch_command_errors returns non-zero on success! */
-- if (catch_command_errors (exec_file_attach, execarg,
-- !batch_flag, RETURN_MASK_ALL))
+- if (catch_command_errors_const (exec_file_attach, execarg,
+- !batch_flag, RETURN_MASK_ALL))
+ catch_command_errors returns non-zero on success!
+ Do not load EXECARG as a symbol file if it has been already processed
+ as a core file. */
-+ if (catch_command_errors (func, execarg, !batch_flag, RETURN_MASK_ALL)
++ if (catch_command_errors_const (func, execarg, !batch_flag,
++ RETURN_MASK_ALL)
+ && core_bfd == NULL)
catch_command_errors_const (symbol_file_add_main, symarg,
!batch_flag, RETURN_MASK_ALL);
}
+Index: gdb-7.8.50.20141228/gdb/common/common-exceptions.h
+===================================================================
+--- gdb-7.8.50.20141228.orig/gdb/common/common-exceptions.h 2015-01-03 23:18:38.097427908 +0100
++++ gdb-7.8.50.20141228/gdb/common/common-exceptions.h 2015-01-03 23:19:02.449556396 +0100
+@@ -99,6 +99,9 @@ enum errors {
+ /* Requested feature, method, mechanism, etc. is not supported. */
+ NOT_SUPPORTED_ERROR,
+
++ /* Attempt to load a core file as executable. */
++ IS_CORE_ERROR,
++
+ /* Add more errors here. */
+ NR_ERRORS
+ };
diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch
index 746877f..8dc4bcc 100644
--- a/gdb-6.6-buildid-locate-rpm.patch
+++ b/gdb-6.6-buildid-locate-rpm.patch
@@ -1,8 +1,8 @@
-Index: gdb-7.7.50.20140609/gdb/event-top.c
+Index: gdb-7.8.50.20141228/gdb/event-top.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/event-top.c 2014-06-13 20:10:19.632787642 +0200
-+++ gdb-7.7.50.20140609/gdb/event-top.c 2014-06-13 20:11:49.605878557 +0200
-@@ -38,6 +38,7 @@
+--- gdb-7.8.50.20141228.orig/gdb/event-top.c 2015-01-01 17:12:24.881489087 +0100
++++ gdb-7.8.50.20141228/gdb/event-top.c 2015-01-01 17:12:28.821486803 +0100
+@@ -37,6 +37,7 @@
#include "gdbcmd.h" /* for dont_repeat() */
#include "annotate.h"
#include "maint.h"
@@ -10,7 +10,7 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c
/* readline include files. */
#include "readline/readline.h"
-@@ -176,6 +177,8 @@ rl_callback_read_char_wrapper (gdb_clien
+@@ -180,6 +181,8 @@ rl_callback_read_char_wrapper (gdb_clien
void
cli_command_loop (void *data)
{
@@ -19,7 +19,7 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c
display_gdb_prompt (0);
/* Now it's time to start the event loop. */
-@@ -243,6 +246,8 @@ display_gdb_prompt (char *new_prompt)
+@@ -298,6 +301,8 @@ display_gdb_prompt (const char *new_prom
/* Reset the nesting depth used when trace-commands is set. */
reset_command_nest_depth ();
@@ -28,11 +28,11 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c
old_chain = make_cleanup (free_current_contents, &actual_gdb_prompt);
/* Do not call the python hook on an explicit prompt change as
-Index: gdb-7.7.50.20140609/gdb/symfile.h
+Index: gdb-7.8.50.20141228/gdb/symfile.h
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/symfile.h 2014-06-13 20:10:19.633787643 +0200
-+++ gdb-7.7.50.20140609/gdb/symfile.h 2014-06-13 20:10:31.066799158 +0200
-@@ -573,6 +573,8 @@ void map_symbol_filenames (symbol_filena
+--- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-01 17:12:24.881489087 +0100
++++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-01 17:12:28.822486802 +0100
+@@ -577,6 +577,8 @@ void map_symbol_filenames (symbol_filena
/* build-id support. */
extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr);
extern void debug_print_missing (const char *binary, const char *debug);
@@ -41,11 +41,11 @@ Index: gdb-7.7.50.20140609/gdb/symfile.h
/* From dwarf2read.c */
-Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/gdb.exp 2014-06-13 20:10:19.634787644 +0200
-+++ gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp 2014-06-13 20:10:31.067799159 +0200
-@@ -1492,7 +1492,7 @@ proc default_gdb_start { } {
+--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-01 17:12:24.883489085 +0100
++++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-01 17:12:28.823486801 +0100
+@@ -1522,7 +1522,7 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@@ -54,11 +54,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
send_gdb "set build-id-verbose 0\n"
gdb_expect 10 {
-re "$gdb_prompt $" {
-Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:10:19.635787645 +0200
-+++ gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:10:31.068799160 +0200
-@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } {
+--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-01 17:12:24.884489085 +0100
++++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-01 17:12:28.823486801 +0100
+@@ -214,7 +214,7 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0."
}
}
@@ -67,22 +67,22 @@ Index: gdb-7.7.50.20140609/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.7.50.20140609/gdb/tui/tui-interp.c
+Index: gdb-7.8.50.20141228/gdb/tui/tui-interp.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/tui/tui-interp.c 2014-06-13 20:10:31.068799160 +0200
-+++ gdb-7.7.50.20140609/gdb/tui/tui-interp.c 2014-06-13 20:10:47.806816542 +0200
-@@ -32,6 +32,7 @@
- #include "exceptions.h"
+--- gdb-7.8.50.20141228.orig/gdb/tui/tui-interp.c 2015-01-01 17:12:28.824486801 +0100
++++ gdb-7.8.50.20141228/gdb/tui/tui-interp.c 2015-01-01 17:12:43.240478444 +0100
+@@ -31,6 +31,7 @@
+ #include "tui/tui-io.h"
#include "infrun.h"
#include "observer.h"
+#include "symfile.h"
static struct ui_out *tui_ui_out (struct interp *self);
-Index: gdb-7.7.50.20140609/gdb/aclocal.m4
+Index: gdb-7.8.50.20141228/gdb/aclocal.m4
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/aclocal.m4 2014-06-13 20:10:19.636787646 +0200
-+++ gdb-7.7.50.20140609/gdb/aclocal.m4 2014-06-13 20:10:31.069799161 +0200
+--- gdb-7.8.50.20141228.orig/gdb/aclocal.m4 2015-01-01 17:12:24.885489084 +0100
++++ gdb-7.8.50.20141228/gdb/aclocal.m4 2015-01-01 17:12:28.824486801 +0100
@@ -11,6 +11,221 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@@ -305,10 +305,10 @@ Index: gdb-7.7.50.20140609/gdb/aclocal.m4
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-Index: gdb-7.7.50.20140609/gdb/config.in
+Index: gdb-7.8.50.20141228/gdb/config.in
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/config.in 2014-06-13 20:10:19.637787647 +0200
-+++ gdb-7.7.50.20140609/gdb/config.in 2014-06-13 20:10:31.069799161 +0200
+--- gdb-7.8.50.20141228.orig/gdb/config.in 2015-01-01 17:12:24.885489084 +0100
++++ gdb-7.8.50.20141228/gdb/config.in 2015-01-01 17:12:28.824486801 +0100
@@ -33,6 +33,9 @@
/* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC
@@ -319,7 +319,7 @@ Index: gdb-7.7.50.20140609/gdb/config.in
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
-@@ -210,6 +213,9 @@
+@@ -207,6 +210,9 @@
/* Define if Python 2.7 is being used. */
#undef HAVE_LIBPYTHON2_7
@@ -329,11 +329,11 @@ Index: gdb-7.7.50.20140609/gdb/config.in
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H
-Index: gdb-7.7.50.20140609/gdb/configure
+Index: gdb-7.8.50.20141228/gdb/configure
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/configure 2014-06-13 20:10:19.642787652 +0200
-+++ gdb-7.7.50.20140609/gdb/configure 2014-06-13 20:10:31.073799165 +0200
-@@ -692,6 +692,11 @@ PKGVERSION
+--- gdb-7.8.50.20141228.orig/gdb/configure 2015-01-01 17:12:24.891489081 +0100
++++ gdb-7.8.50.20141228/gdb/configure 2015-01-01 17:12:28.828486798 +0100
+@@ -698,6 +698,11 @@ PKGVERSION
HAVE_NATIVE_GCORE_TARGET
TARGET_OBS
subdirs
@@ -345,7 +345,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
GDB_DATADIR
DEBUGDIR
MAKEINFO_EXTRA_FLAGS
-@@ -795,6 +800,7 @@ with_gdb_datadir
+@@ -801,6 +806,7 @@ with_gdb_datadir
with_relocated_sources
with_auto_load_dir
with_auto_load_safe_path
@@ -353,7 +353,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
enable_targets
enable_64_bit_bfd
enable_gdbcli
-@@ -846,6 +852,11 @@ CPPFLAGS
+@@ -852,6 +858,11 @@ CPPFLAGS
CPP
MAKEINFO
MAKEINFOFLAGS
@@ -365,7 +365,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
YACC
YFLAGS
XMKMF'
-@@ -1516,6 +1527,8 @@ Optional Packages:
+@@ -1522,6 +1533,8 @@ Optional Packages:
[--with-auto-load-dir]
--without-auto-load-safe-path
do not restrict auto-loaded files locations
@@ -374,7 +374,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap
library
-@@ -1565,6 +1578,13 @@ Some influential environment variables:
+@@ -1571,6 +1584,13 @@ Some influential environment variables:
MAKEINFO Parent configure detects if it is of sufficient version.
MAKEINFOFLAGS
Parameters for MAKEINFO.
@@ -388,7 +388,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
YACC The `Yet Another C Compiler' implementation to use. Defaults to
the first program found out of: `bison -y', `byacc', `yacc'.
YFLAGS The list of arguments that will be passed by default to $YACC.
-@@ -5160,6 +5180,491 @@ _ACEOF
+@@ -5267,6 +5287,491 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; }
@@ -880,11 +880,11 @@ Index: gdb-7.7.50.20140609/gdb/configure
subdirs="$subdirs testsuite"
-Index: gdb-7.7.50.20140609/gdb/configure.ac
+Index: gdb-7.8.50.20141228/gdb/configure.ac
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/configure.ac 2014-06-13 20:10:19.643787653 +0200
-+++ gdb-7.7.50.20140609/gdb/configure.ac 2014-06-13 20:10:31.074799166 +0200
-@@ -165,6 +165,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
+--- gdb-7.8.50.20141228.orig/gdb/configure.ac 2015-01-01 17:12:24.893489079 +0100
++++ gdb-7.8.50.20141228/gdb/configure.ac 2015-01-01 17:12:28.829486798 +0100
+@@ -172,6 +172,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
[Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path])
@@ -1084,11 +1084,11 @@ Index: gdb-7.7.50.20140609/gdb/configure.ac
AC_CONFIG_SUBDIRS(testsuite)
# Check whether to support alternative target configurations
-Index: gdb-7.7.50.20140609/gdb/corelow.c
+Index: gdb-7.8.50.20141228/gdb/corelow.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/corelow.c 2014-06-13 20:10:19.644787654 +0200
-+++ gdb-7.7.50.20140609/gdb/corelow.c 2014-06-13 20:10:31.074799166 +0200
-@@ -316,7 +316,7 @@ build_id_locate_exec (int from_tty)
+--- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-01 17:12:24.894489079 +0100
++++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-01 17:12:28.829486798 +0100
+@@ -310,7 +310,7 @@ build_id_locate_exec (int from_tty)
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
}
else
@@ -1097,11 +1097,11 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
do_cleanups (back_to);
-Index: gdb-7.7.50.20140609/gdb/build-id.c
+Index: gdb-7.8.50.20141228/gdb/build-id.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/build-id.c 2014-06-13 20:10:19.644787654 +0200
-+++ gdb-7.7.50.20140609/gdb/build-id.c 2014-06-13 20:10:31.075799167 +0200
-@@ -32,6 +32,7 @@
+--- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-01 17:12:24.894489079 +0100
++++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-01 17:12:28.830486797 +0100
+@@ -31,6 +31,7 @@
#include "gdbcmd.h"
#include "observer.h"
#include <sys/stat.h>
@@ -1109,7 +1109,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
#define BUILD_ID_VERBOSE_NONE 0
#define BUILD_ID_VERBOSE_FILENAMES 1
-@@ -666,8 +667,360 @@ build_id_to_filename (const struct elf_b
+@@ -664,8 +665,360 @@ build_id_to_filename (const struct elf_b
return result;
}
@@ -1471,7 +1471,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
avoidance. */
struct missing_filepair
-@@ -721,11 +1074,17 @@ missing_filepair_change (void)
+@@ -719,11 +1072,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL;
}
@@ -1489,7 +1489,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
missing_filepair_change ();
}
-@@ -792,14 +1151,34 @@ debug_print_missing (const char *binary,
+@@ -790,14 +1149,34 @@ debug_print_missing (const char *binary,
*slot = missing_filepair;
diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch
index eb4f1d3..71de4d0 100644
--- a/gdb-6.6-buildid-locate.patch
+++ b/gdb-6.6-buildid-locate.patch
@@ -1,8 +1,8 @@
-Index: gdb-7.7.50.20140609/gdb/corelow.c
+Index: gdb-7.8.50.20141228/gdb/corelow.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/corelow.c 2014-06-13 20:09:37.369745221 +0200
-+++ gdb-7.7.50.20140609/gdb/corelow.c 2014-06-13 20:09:42.407750265 +0200
-@@ -49,6 +49,10 @@
+--- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-03 23:12:08.691349454 +0100
+@@ -45,6 +45,10 @@
#include "gdb_bfd.h"
#include "completer.h"
#include "filestuff.h"
@@ -13,7 +13,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
-@@ -272,6 +276,53 @@ add_to_thread_list (bfd *abfd, asection
+@@ -266,6 +270,53 @@ add_to_thread_list (bfd *abfd, asection
inferior_ptid = ptid; /* Yes, make it current. */
}
@@ -67,7 +67,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
/* This routine opens and sets up the core file bfd. */
static void
-@@ -410,6 +461,14 @@ core_open (char *filename, int from_tty)
+@@ -405,6 +456,14 @@ core_open (const char *arg, int from_tty
switch_to_thread (thread->ptid);
}
@@ -82,7 +82,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
post_create_inferior (&core_ops, from_tty);
/* Now go through the target stack looking for threads since there
-@@ -1029,4 +1088,11 @@ _initialize_corelow (void)
+@@ -1035,4 +1094,11 @@ _initialize_corelow (void)
init_core_ops ();
add_target_with_completer (&core_ops, filename_completer);
@@ -94,11 +94,11 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
+ NULL, NULL, NULL,
+ &setlist, &showlist);
}
-Index: gdb-7.7.50.20140609/gdb/doc/gdb.texinfo
+Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/doc/gdb.texinfo 2014-06-13 20:09:37.380745232 +0200
-+++ gdb-7.7.50.20140609/gdb/doc/gdb.texinfo 2014-06-13 20:09:42.417750275 +0200
-@@ -17547,6 +17547,27 @@ information files.
+--- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-03 23:12:08.701349509 +0100
+@@ -17930,6 +17930,27 @@ information files.
@end table
@@ -126,19 +126,19 @@ Index: gdb-7.7.50.20140609/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.7.50.20140609/gdb/solib-svr4.c
+Index: gdb-7.8.50.20141228/gdb/solib-svr4.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/solib-svr4.c 2014-06-13 20:09:37.382745234 +0200
-+++ gdb-7.7.50.20140609/gdb/solib-svr4.c 2014-06-13 20:09:42.418750276 +0200
-@@ -48,6 +48,7 @@
- #include "exceptions.h"
+--- gdb-7.8.50.20141228.orig/gdb/solib-svr4.c 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/solib-svr4.c 2015-01-03 23:12:08.702349514 +0100
+@@ -45,6 +45,7 @@
+ #include "auxv.h"
#include "gdb_bfd.h"
#include "probe.h"
+#include "build-id.h"
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
static int svr4_have_link_map_offsets (void);
-@@ -1369,9 +1370,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
+@@ -1366,9 +1367,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
continue;
}
@@ -194,11 +194,11 @@ Index: gdb-7.7.50.20140609/gdb/solib-svr4.c
xfree (buffer);
/* If this entry has no name, or its name matches the name
-Index: gdb-7.7.50.20140609/gdb/elfread.c
+Index: gdb-7.8.50.20141228/gdb/elfread.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/elfread.c 2014-06-13 20:09:37.383745235 +0200
-+++ gdb-7.7.50.20140609/gdb/elfread.c 2014-06-13 20:09:42.418750276 +0200
-@@ -1335,9 +1335,10 @@ elf_symfile_read (struct objfile *objfil
+--- gdb-7.8.50.20141228.orig/gdb/elfread.c 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/elfread.c 2015-01-03 23:12:08.703349519 +0100
+@@ -1339,9 +1339,10 @@ elf_symfile_read (struct objfile *objfil
&& objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL)
{
@@ -211,7 +211,7 @@ Index: gdb-7.7.50.20140609/gdb/elfread.c
if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile);
-@@ -1351,6 +1352,12 @@ elf_symfile_read (struct objfile *objfil
+@@ -1355,6 +1356,12 @@ elf_symfile_read (struct objfile *objfil
symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
do_cleanups (cleanup);
}
@@ -224,11 +224,11 @@ Index: gdb-7.7.50.20140609/gdb/elfread.c
}
}
-Index: gdb-7.7.50.20140609/gdb/symfile.h
+Index: gdb-7.8.50.20141228/gdb/symfile.h
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/symfile.h 2014-06-13 20:09:42.419750277 +0200
-+++ gdb-7.7.50.20140609/gdb/symfile.h 2014-06-13 20:10:04.478772510 +0200
-@@ -570,6 +570,10 @@ void expand_symtabs_matching (expand_sym
+--- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-03 23:12:08.703349519 +0100
+@@ -574,6 +574,10 @@ void expand_symtabs_matching (expand_sym
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
int need_fullname);
@@ -239,11 +239,11 @@ Index: gdb-7.7.50.20140609/gdb/symfile.h
/* From dwarf2read.c */
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
-Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/gdb.exp 2014-06-13 20:09:37.384745236 +0200
-+++ gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp 2014-06-13 20:09:42.420750278 +0200
-@@ -1492,6 +1492,16 @@ proc default_gdb_start { } {
+--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-03 23:12:08.704349525 +0100
+@@ -1522,6 +1522,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@@ -260,11 +260,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
return 0
}
-Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:09:37.385745237 +0200
-+++ gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:09:42.421750279 +0200
-@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } {
+--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:12:08.705349530 +0100
+@@ -214,6 +214,16 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0."
}
}
@@ -281,11 +281,11 @@ Index: gdb-7.7.50.20140609/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.7.50.20140609/gdb/objfiles.h
+Index: gdb-7.8.50.20141228/gdb/objfiles.h
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/objfiles.h 2014-06-13 20:09:37.385745237 +0200
-+++ gdb-7.7.50.20140609/gdb/objfiles.h 2014-06-13 20:09:42.421750279 +0200
-@@ -464,6 +464,10 @@ struct objfile
+--- gdb-7.8.50.20141228.orig/gdb/objfiles.h 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/objfiles.h 2015-01-03 23:12:08.705349530 +0100
+@@ -459,6 +459,10 @@ struct objfile
#define OBJF_NOT_FILENAME (1 << 6)
@@ -296,10 +296,10 @@ Index: gdb-7.7.50.20140609/gdb/objfiles.h
/* Declarations for functions defined in objfiles.c */
extern struct objfile *allocate_objfile (bfd *, const char *name, int);
-Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp
+Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.base/corefile.exp 2014-06-13 20:09:37.385745237 +0200
-+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp 2014-06-13 20:09:42.421750279 +0200
+--- gdb-7.8.50.20141228.orig/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:12:08.705349530 +0100
@@ -293,3 +293,33 @@ gdb_test_multiple "core-file $corefile"
pass $test
}
@@ -334,11 +334,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp
+ gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*"
+ pass $wholetest
+}
-Index: gdb-7.7.50.20140609/gdb/build-id.c
+Index: gdb-7.8.50.20141228/gdb/build-id.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/build-id.c 2014-06-13 20:09:37.386745238 +0200
-+++ gdb-7.7.50.20140609/gdb/build-id.c 2014-06-13 20:09:42.422750280 +0200
-@@ -27,11 +27,65 @@
+--- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-03 23:12:40.792523085 +0100
+@@ -26,11 +26,64 @@
#include "symfile.h"
#include "objfiles.h"
#include "filenames.h"
@@ -359,11 +359,11 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
+ value);
+}
-+
+
+-/* See build-id.h. */
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
-
--/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */
++
+static struct elf_build_id *
+build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size)
+{
@@ -389,24 +389,23 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
+ retval = xmalloc (sizeof *retval - 1 + size);
+ retval->size = size;
+ memcpy (retval->data, data, size);
-+
+
+ return retval;
+ }
+ p = descdata + BFD_ALIGN (descsz, 4);
+ }
+ return NULL;
+}
-
-+/* Separate debuginfo files have corrupted PHDR but SHDR is correct there.
-+ Locate NT_GNU_BUILD_ID from ABFD and return its content. */
++
++/* See build-id.h. */
+
- static const struct elf_build_id *
+ const struct elf_build_id *
-build_id_bfd_get (bfd *abfd)
+build_id_bfd_shdr_get (bfd *abfd)
{
if (!bfd_check_format (abfd, bfd_object)
|| bfd_get_flavour (abfd) != bfd_target_elf_flavour
-@@ -45,6 +99,348 @@ build_id_bfd_get (bfd *abfd)
+@@ -44,6 +97,348 @@ build_id_bfd_get (bfd *abfd)
return elf_tdata (abfd)->build_id;
}
@@ -755,7 +754,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
/* See build-id.h. */
int
-@@ -53,7 +449,7 @@ build_id_verify (bfd *abfd, size_t check
+@@ -52,7 +447,7 @@ build_id_verify (bfd *abfd, size_t check
const struct elf_build_id *found;
int retval = 0;
@@ -764,7 +763,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"),
-@@ -68,20 +464,56 @@ build_id_verify (bfd *abfd, size_t check
+@@ -67,20 +462,56 @@ build_id_verify (bfd *abfd, size_t check
return retval;
}
@@ -825,7 +824,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */
-@@ -94,8 +526,11 @@ build_id_to_debug_bfd (size_t build_id_l
+@@ -93,8 +524,11 @@ build_id_to_debug_bfd (size_t build_id_l
size_t debugdir_len = strlen (debugdir);
const gdb_byte *data = build_id;
size_t size = build_id_len;
@@ -838,7 +837,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
memcpy (link, debugdir, debugdir_len);
s = &link[debugdir_len];
-@@ -109,44 +544,282 @@ build_id_to_debug_bfd (size_t build_id_l
+@@ -108,44 +542,282 @@ build_id_to_debug_bfd (size_t build_id_l
*s++ = '/';
while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++);
@@ -909,7 +908,9 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
+ xfree (filename);
+ filename = NULL;
+ }
-+
+
+- gdb_bfd_unref (abfd);
+- abfd = NULL;
+ if (filename != NULL)
+ {
+ /* LINK_ALL is not used below in this non-NULL FILENAME case. */
@@ -935,9 +936,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with
+ its possible use as an argument for installation command. */
+ link_all[len_orig] = ' ';
-
-- gdb_bfd_unref (abfd);
-- abfd = NULL;
++
+ strcpy (&link_all[len_orig + 1], link0_resolved);
+ xfree (link0_resolved);
+ }
@@ -1138,7 +1137,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
/* Prevent looping on a stripped .debug file. */
if (abfd != NULL
&& filename_cmp (bfd_get_filename (abfd),
-@@ -166,3 +839,21 @@ find_separate_debug_file_by_buildid (str
+@@ -165,3 +837,21 @@ find_separate_debug_file_by_buildid (str
}
return NULL;
}
@@ -1160,11 +1159,24 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
+
+ observer_attach_executable_changed (debug_print_executable_changed);
+}
-Index: gdb-7.7.50.20140609/gdb/build-id.h
+Index: gdb-7.8.50.20141228/gdb/build-id.h
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/build-id.h 2014-06-13 20:09:37.386745238 +0200
-+++ gdb-7.7.50.20140609/gdb/build-id.h 2014-06-13 20:09:42.422750280 +0200
-@@ -32,13 +32,18 @@ extern int build_id_verify (bfd *abfd,
+--- gdb-7.8.50.20141228.orig/gdb/build-id.h 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/build-id.h 2015-01-03 23:12:08.706349536 +0100
+@@ -20,9 +20,10 @@
+ #ifndef BUILD_ID_H
+ #define BUILD_ID_H
+
+-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */
++/* Separate debuginfo files have corrupted PHDR but SHDR is correct there.
++ Locate NT_GNU_BUILD_ID from ABFD and return its content. */
+
+-extern const struct elf_build_id *build_id_bfd_get (bfd *abfd);
++extern const struct elf_build_id *build_id_bfd_shdr_get (bfd *abfd);
+
+ /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value.
+ Otherwise, issue a warning and return false. */
+@@ -36,13 +37,18 @@ extern int build_id_verify (bfd *abfd,
the caller. */
extern bfd *build_id_to_debug_bfd (size_t build_id_len,
@@ -1185,11 +1197,11 @@ Index: gdb-7.7.50.20140609/gdb/build-id.h
+ char **build_id_filename_return);
#endif /* BUILD_ID_H */
-Index: gdb-7.7.50.20140609/gdb/dwarf2read.c
+Index: gdb-7.8.50.20141228/gdb/dwarf2read.c
===================================================================
---- gdb-7.7.50.20140609.orig/gdb/dwarf2read.c 2014-06-13 20:09:37.389745241 +0200
-+++ gdb-7.7.50.20140609/gdb/dwarf2read.c 2014-06-13 20:09:42.425750283 +0200
-@@ -2446,7 +2446,7 @@ dwarf2_get_dwz_file (void)
+--- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-03 23:12:08.711349563 +0100
+@@ -2443,7 +2443,7 @@ dwarf2_get_dwz_file (void)
}
if (dwz_bfd == NULL)
@@ -1198,3 +1210,25 @@ Index: gdb-7.7.50.20140609/gdb/dwarf2read.c
if (dwz_bfd == NULL)
error (_("could not find '.gnu_debugaltlink' file for %s"),
+Index: gdb-7.8.50.20141228/gdb/python/py-objfile.c
+===================================================================
+--- gdb-7.8.50.20141228.orig/gdb/python/py-objfile.c 2015-01-03 23:11:54.018270090 +0100
++++ gdb-7.8.50.20141228/gdb/python/py-objfile.c 2015-01-03 23:12:08.712349568 +0100
+@@ -118,7 +118,7 @@ objfpy_get_build_id (PyObject *self, voi
+
+ TRY_CATCH (except, RETURN_MASK_ALL)
+ {
+- build_id = build_id_bfd_get (objfile->obfd);
++ build_id = build_id_bfd_shdr_get (objfile->obfd);
+ }
+ GDB_PY_HANDLE_EXCEPTION (except);
+
+@@ -467,7 +467,7 @@ objfpy_lookup_objfile_by_build_id (const
+ /* Don't return separate debug files. */
+ if (objfile->separate_debug_objfile_backlink != NULL)
+ continue;
+- obfd_build_id = build_id_bfd_get (objfile->obfd);
++ obfd_build_id = build_id_bfd_shdr_get (objfile->obfd);
+ if (obfd_build_id == NULL)
+ continue;
+ if (objfpy_build_id_matches (obfd_build_id, build_id))
diff --git a/gdb-vla-intel-logical-not.patch b/gdb-vla-intel-logical-not.patch
new file mode 100644
index 0000000..0c51c84
--- /dev/null
+++ b/gdb-vla-intel-logical-not.patch
@@ -0,0 +1,11 @@
+--- ./gdb/value.c-orig 2015-02-11 15:17:58.413241779 +0100
++++ ./gdb/value.c 2015-02-11 15:19:42.068716949 +0100
+@@ -3074,7 +3074,7 @@ value_primitive_field (struct value *arg
+ }
+
+ if (!TYPE_DATA_LOCATION (type)
+- || !TYPE_DATA_LOCATION_KIND (type) == PROP_CONST)
++ || TYPE_DATA_LOCATION_KIND (type) != PROP_CONST)
+ v->offset = (value_offset (arg1) + offset
+ + value_embedded_offset (arg1));
+ }
diff --git a/gdb-vla-intel-stringbt-fix.patch b/gdb-vla-intel-stringbt-fix.patch
index 937f8fe..67850f3 100644
--- a/gdb-vla-intel-stringbt-fix.patch
+++ b/gdb-vla-intel-stringbt-fix.patch
@@ -31,11 +31,11 @@ Jan
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="vlastringonly.patch"
-diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
-index 53cae2c..cf7ac26 100644
---- a/gdb/gdbtypes.c
-+++ b/gdb/gdbtypes.c
-@@ -1659,6 +1659,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
+Index: gdb-7.8.50.20141228/gdb/gdbtypes.c
+===================================================================
+--- gdb-7.8.50.20141228.orig/gdb/gdbtypes.c 2015-01-08 18:15:18.475682523 +0100
++++ gdb-7.8.50.20141228/gdb/gdbtypes.c 2015-01-08 18:39:01.423134700 +0100
+@@ -1684,6 +1684,7 @@ is_dynamic_type_internal (struct type *t
return !has_static_range (TYPE_RANGE_DATA (type));
case TYPE_CODE_ARRAY:
@@ -43,11 +43,18 @@ index 53cae2c..cf7ac26 100644
{
gdb_assert (TYPE_NFIELDS (type) == 1);
-diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
-new file mode 100644
-index 0000000..261ce17
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
+@@ -1992,6 +1993,7 @@ resolve_dynamic_type_internal (struct ty
+ }
+
+ case TYPE_CODE_ARRAY:
++ case TYPE_CODE_STRING:
+ resolved_type = resolve_dynamic_array (type, addr);
+ break;
+
+Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2015-01-08 18:15:18.897684435 +0100
@@ -0,0 +1,24 @@
+! Copyright 2010 Free Software Foundation, Inc.
+!
@@ -73,11 +80,10 @@ index 0000000..261ce17
+ real :: dummy
+ dummy = 1
+end subroutine bar
-diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
-new file mode 100644
-index 0000000..570a28c
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
+Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp 2015-01-08 18:15:18.897684435 +0100
@@ -0,0 +1,39 @@
+# Copyright 2010 Free Software Foundation, Inc.
+
@@ -118,11 +124,10 @@ index 0000000..570a28c
+}
+
+gdb_test "bt" {foo \(string='hello'.*}
-diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
-new file mode 100644
-index 0000000..2bc637d
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
+Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 2015-01-08 18:15:18.897684435 +0100
@@ -0,0 +1,36 @@
+! Copyright 2010 Free Software Foundation, Inc.
+!
@@ -160,6 +165,3 @@ index 0000000..2bc637d
+ end interface
+ call foo ('hello')
+end
-
---FCuugMFkClbJLl1L--
-
diff --git a/gdb-vla-intel.patch b/gdb-vla-intel.patch
index d4f9eed..9b86bde 100644
--- a/gdb-vla-intel.patch
+++ b/gdb-vla-intel.patch
@@ -6,25 +6,11 @@ GIT snapshot:
commit 511bff520372ffc10fa2ff569c176bdf1e6e475d
-diff --git a/gdb/NEWS b/gdb/NEWS
-index d9a19ae..e6885d2 100644
-### a/gdb/NEWS
-### b/gdb/NEWS
-@@ -3,6 +3,9 @@
-
- *** Changes since GDB 7.8
-
-+* Fortran dynamic array support: It allows the user to evaluate
-+ dynamic arrays like an ordinary static array.
-+
- *** Changes in GDB 7.8
-
- * New command line options
-diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
-index f4694b0..8c45276 100644
---- a/gdb/c-valprint.c
-+++ b/gdb/c-valprint.c
-@@ -538,7 +538,16 @@ c_value_print (struct value *val, struct ui_file *stream,
+Index: gdb-7.8.90.20150126/gdb/c-valprint.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/c-valprint.c 2015-01-26 07:47:25.832758314 +0100
++++ gdb-7.8.90.20150126/gdb/c-valprint.c 2015-01-26 07:47:42.394829861 +0100
+@@ -537,7 +537,16 @@ c_value_print (struct value *val, struct
{
/* normal case */
fprintf_filtered (stream, "(");
@@ -42,237 +28,30 @@ index f4694b0..8c45276 100644
fprintf_filtered (stream, ") ");
}
}
-diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
-index 36c9f66..274ba62 100644
---- a/gdb/dwarf2expr.c
-+++ b/gdb/dwarf2expr.c
-@@ -1478,6 +1478,12 @@ execute_stack_op (struct dwarf_expr_context *ctx,
- }
- break;
-
-+ case DW_OP_push_object_address:
-+ /* Return the address of the object we are currently observing. */
-+ result = (ctx->funcs->get_object_address) (ctx->baton);
-+ result_val = value_from_ulongest (address_type, result);
-+ break;
-+
- default:
- error (_("Unhandled dwarf expression opcode 0x%x"), op);
- }
-diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
-index 39dadf3..8cebbe8 100644
---- a/gdb/dwarf2expr.h
-+++ b/gdb/dwarf2expr.h
-@@ -84,12 +84,8 @@ struct dwarf_expr_context_funcs
- This can throw an exception if the index is out of range. */
- CORE_ADDR (*get_addr_index) (void *baton, unsigned int index);
-
--#if 0
-- /* Not yet implemented. */
--
- /* Return the `object address' for DW_OP_push_object_address. */
- CORE_ADDR (*get_object_address) (void *baton);
--#endif
- };
-
- /* The location of a value. */
-diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
-index fcab9b9..a624dac 100644
---- a/gdb/dwarf2loc.c
-+++ b/gdb/dwarf2loc.c
-@@ -306,6 +306,7 @@ struct dwarf_expr_baton
- {
- struct frame_info *frame;
- struct dwarf2_per_cu_data *per_cu;
-+ CORE_ADDR obj_address;
- };
-
- /* Helper functions for dwarf2_evaluate_loc_desc. */
-@@ -1209,6 +1210,7 @@ dwarf_expr_push_dwarf_reg_entry_value (struct dwarf_expr_context *ctx,
-
- baton_local.frame = caller_frame;
- baton_local.per_cu = caller_per_cu;
-+ baton_local.obj_address = 0;
-
- saved_ctx.gdbarch = ctx->gdbarch;
- saved_ctx.addr_size = ctx->addr_size;
-@@ -1238,6 +1240,22 @@ dwarf_expr_get_addr_index (void *baton, unsigned int index)
- return dwarf2_read_addr_index (debaton->per_cu, index);
- }
-
-+/* Callback function for get_object_address. Return the address of the VLA
-+ object. */
-+
-+static CORE_ADDR
-+dwarf_expr_get_obj_addr (void *baton)
-+{
-+ struct dwarf_expr_baton *debaton = baton;
-+
-+ gdb_assert (debaton != NULL);
-+
-+ if (debaton->obj_address == 0)
-+ error (_("Location address is not set."));
-+
-+ return debaton->obj_address;
-+}
-+
- /* VALUE must be of type lval_computed with entry_data_value_funcs. Perform
- the indirect method on it, that is use its stored target value, the sole
- purpose of entry_data_value_funcs.. */
-@@ -2202,7 +2220,8 @@ static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs =
- dwarf_expr_dwarf_call,
- dwarf_expr_get_base_type,
- dwarf_expr_push_dwarf_reg_entry_value,
-- dwarf_expr_get_addr_index
-+ dwarf_expr_get_addr_index,
-+ dwarf_expr_get_obj_addr
- };
-
- /* Evaluate a location description, starting at DATA and with length
-@@ -2231,6 +2250,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
-
- baton.frame = frame;
- baton.per_cu = per_cu;
-+ baton.obj_address = 0;
-
- ctx = new_dwarf_expr_context ();
- old_chain = make_cleanup_free_dwarf_expr_context (ctx);
-@@ -2326,6 +2346,11 @@ 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);
-+
-+ /* Select right frame to correctly evaluate VLA's during a backtrace. */
-+ if (is_dynamic_type (type))
-+ select_frame (frame);
-+
- retval = value_at_lazy (type, address + byte_offset);
- if (in_stack_memory)
- set_value_stack (retval, 1);
-@@ -2436,6 +2461,7 @@ dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame,
-
- static int
- dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
-+ CORE_ADDR addr,
- CORE_ADDR *valp)
- {
- struct dwarf_expr_context *ctx;
-@@ -2451,6 +2477,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
-
- baton.frame = get_selected_frame (NULL);
- baton.per_cu = dlbaton->per_cu;
-+ baton.obj_address = addr;
-
- objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
-
-@@ -2491,7 +2518,8 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
- /* See dwarf2loc.h. */
-
- int
--dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR *value)
-+dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR address,
-+ CORE_ADDR *value)
- {
- if (prop == NULL)
- return 0;
-@@ -2502,7 +2530,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR *value)
- {
- const struct dwarf2_property_baton *baton = prop->data.baton;
-
-- if (dwarf2_locexpr_baton_eval (&baton->locexpr, value))
-+ if (dwarf2_locexpr_baton_eval (&baton->locexpr, address, value))
- {
- if (baton->referenced_type)
- {
-@@ -2546,6 +2574,20 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, CORE_ADDR *value)
- return 0;
- }
-
-+/* See dwarf2loc.h. */
-+
-+int
-+dwarf2_address_data_valid (const struct type *type)
-+{
-+ if (TYPE_NOT_ASSOCIATED (type))
-+ return 0;
-+
-+ if (TYPE_NOT_ALLOCATED (type))
-+ return 0;
-+
-+ return 1;
-+}
-+
-
- /* Helper functions and baton for dwarf2_loc_desc_needs_frame. */
-
-@@ -2653,6 +2695,15 @@ needs_get_addr_index (void *baton, unsigned int index)
- return 1;
- }
-
-+/* DW_OP_push_object_address has a frame already passed through. */
-+
-+static CORE_ADDR
-+needs_get_obj_addr (void *baton)
-+{
-+ /* Nothing to do. */
-+ return 1;
-+}
-+
- /* Virtual method table for dwarf2_loc_desc_needs_frame below. */
-
- static const struct dwarf_expr_context_funcs needs_frame_ctx_funcs =
-@@ -2667,7 +2718,8 @@ static const struct dwarf_expr_context_funcs needs_frame_ctx_funcs =
- needs_frame_dwarf_call,
- NULL, /* get_base_type */
- needs_dwarf_reg_entry_value,
-- needs_get_addr_index
-+ needs_get_addr_index,
-+ needs_get_obj_addr
- };
-
- /* Return non-zero iff the location expression at DATA (length SIZE)
-@@ -3316,6 +3368,10 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
- unimplemented (op);
- break;
-
-+ case DW_OP_push_object_address:
-+ unimplemented (op);
-+ break;
-+
- case DW_OP_skip:
- offset = extract_signed_integer (op_ptr, 2, byte_order);
- op_ptr += 2;
-diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h
-index 8ad5fa9..fb65c5c 100644
---- a/gdb/dwarf2loc.h
-+++ b/gdb/dwarf2loc.h
-@@ -96,11 +96,18 @@ struct value *dwarf2_evaluate_loc_desc (struct type *type,
- into VALUE, otherwise returns 0. */
-
- int dwarf2_evaluate_property (const struct dynamic_prop *prop,
-+ CORE_ADDR address,
+Index: gdb-7.8.90.20150126/gdb/dwarf2loc.h
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/dwarf2loc.h 2015-01-26 07:47:25.832758314 +0100
++++ gdb-7.8.90.20150126/gdb/dwarf2loc.h 2015-01-26 07:47:42.395829865 +0100
+@@ -111,6 +111,11 @@ int dwarf2_evaluate_property (const stru
+ CORE_ADDR address,
CORE_ADDR *value);
- CORE_ADDR dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu,
- unsigned int addr_index);
-
+/* Checks if a dwarf location definition is valid.
+ Returns 1 if valid; 0 otherwise. */
+
+extern int dwarf2_address_data_valid (const struct type *type);
+
-+
- /* The symbol location baton types used by the DWARF-2 reader (i.e.
- SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct
- dwarf2_locexpr_baton" is for a symbol with a single location
-diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
-index 276d2f1..fbf13ce 100644
---- a/gdb/dwarf2read.c
-+++ b/gdb/dwarf2read.c
-@@ -1847,6 +1847,12 @@ static void free_dwo_file_cleanup (void *);
- static void process_cu_includes (void);
+ /* A helper for the compiler interface that compiles a single dynamic
+ property to C code.
+Index: gdb-7.8.90.20150126/gdb/dwarf2read.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/dwarf2read.c 2015-01-26 07:47:25.845758371 +0100
++++ gdb-7.8.90.20150126/gdb/dwarf2read.c 2015-01-26 07:48:05.833931116 +0100
+@@ -1855,6 +1855,12 @@ static void process_cu_includes (void);
static void check_producer (struct dwarf2_cu *cu);
+
+ static void free_line_header_voidp (void *arg);
+
+static int
+attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
@@ -282,16 +61,16 @@ index 276d2f1..fbf13ce 100644
/* Various complaints about symbol reading that don't abort the process. */
-@@ -14201,29 +14207,92 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -14354,29 +14360,92 @@ read_tag_string_type (struct die_info *d
struct gdbarch *gdbarch = get_objfile_arch (objfile);
struct type *type, *range_type, *index_type, *char_type;
struct attribute *attr;
- unsigned int length;
+ unsigned int length = UINT_MAX;
-+
+
+ index_type = objfile_type (objfile)->builtin_int;
+ range_type = create_static_range_type (NULL, index_type, 1, length);
-
++
+ /* If DW_AT_string_length is defined, the length is stored at some location
+ * in memory. */
attr = dwarf2_attr (die, DW_AT_string_length, cu);
@@ -382,7 +161,7 @@ index 276d2f1..fbf13ce 100644
char_type = language_string_char_type (cu->language_defn, gdbarch);
type = create_string_type (NULL, char_type, range_type);
-@@ -14540,13 +14609,15 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -14693,13 +14762,15 @@ read_base_type (struct die_info *die, st
return set_die_type (die, type, cu);
}
@@ -399,7 +178,7 @@ index 276d2f1..fbf13ce 100644
{
struct dwarf2_property_baton *baton;
struct obstack *obstack = &cu->objfile->objfile_obstack;
-@@ -14559,8 +14630,25 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
+@@ -14712,8 +14783,25 @@ attr_to_dynamic_prop (const struct attri
baton = obstack_alloc (obstack, sizeof (*baton));
baton->referenced_type = NULL;
baton->locexpr.per_cu = cu->per_cu;
@@ -427,7 +206,7 @@ index 276d2f1..fbf13ce 100644
prop->data.baton = baton;
prop->kind = PROP_LOCEXPR;
gdb_assert (prop->data.baton != NULL);
-@@ -14590,8 +14678,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
+@@ -14743,8 +14831,28 @@ attr_to_dynamic_prop (const struct attri
baton = obstack_alloc (obstack, sizeof (*baton));
baton->referenced_type = die_type (target_die, target_cu);
baton->locexpr.per_cu = cu->per_cu;
@@ -458,7 +237,7 @@ index 276d2f1..fbf13ce 100644
prop->data.baton = baton;
prop->kind = PROP_LOCEXPR;
gdb_assert (prop->data.baton != NULL);
-@@ -14626,7 +14734,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -14779,7 +14887,7 @@ read_subrange_type (struct die_info *die
struct type *base_type, *orig_base_type;
struct type *range_type;
struct attribute *attr;
@@ -467,7 +246,7 @@ index 276d2f1..fbf13ce 100644
int low_default_is_valid;
int high_bound_is_count = 0;
const char *name;
-@@ -14646,7 +14754,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -14799,7 +14907,9 @@ read_subrange_type (struct die_info *die
low.kind = PROP_CONST;
high.kind = PROP_CONST;
@@ -477,7 +256,7 @@ index 276d2f1..fbf13ce 100644
/* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
omitting DW_AT_lower_bound. */
-@@ -14679,19 +14789,26 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -14832,19 +14942,26 @@ read_subrange_type (struct die_info *die
break;
}
@@ -507,7 +286,7 @@ index 276d2f1..fbf13ce 100644
{
/* If bounds are constant do the final calculation here. */
if (low.kind == PROP_CONST && high.kind == PROP_CONST)
-@@ -14755,7 +14872,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -14908,7 +15025,7 @@ read_subrange_type (struct die_info *die
&& !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask))
high.data.const_val |= negative_mask;
@@ -516,19 +295,18 @@ index 276d2f1..fbf13ce 100644
if (high_bound_is_count)
TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1;
-@@ -21673,6 +21790,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;
-+ struct attribute *attr;
-+ struct dynamic_prop prop;
-
- /* For Ada types, make sure that the gnat-specific data is always
- initialized (if not already set). There are a few types where
-@@ -21687,6 +21806,43 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
- && !HAVE_GNAT_AUX_INFO (type))
- INIT_GNAT_SPECIFIC (type);
+@@ -21994,7 +22111,44 @@ set_die_type (struct die_info *die, stru
+ /* Read DW_AT_data_location and set in type. */
+ attr = dwarf2_attr (die, DW_AT_data_location, cu);
+- if (attr_to_dynamic_prop (attr, die, cu, &prop))
++ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0))
++ {
++ TYPE_DATA_LOCATION (type)
++ = obstack_alloc (&objfile->objfile_obstack, sizeof (prop));
++ *TYPE_DATA_LOCATION (type) = prop;
++ }
++
+ /* Read DW_AT_allocated and set in type. */
+ attr = dwarf2_attr (die, DW_AT_allocated, cu);
+ if (attr_form_is_block (attr))
@@ -560,28 +338,22 @@ index 276d2f1..fbf13ce 100644
+ /* Read DW_AT_data_location and set in type. */
+ attr = dwarf2_attr (die, DW_AT_data_location, cu);
+ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0))
-+ {
-+ TYPE_DATA_LOCATION (type)
-+ = obstack_alloc (&objfile->objfile_obstack, sizeof (prop));
-+ *TYPE_DATA_LOCATION (type) = prop;
-+ }
-+
- if (dwarf2_per_objfile->die_type_hash == NULL)
{
- dwarf2_per_objfile->die_type_hash =
-diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
-index 8356aab..69e67f4 100644
---- a/gdb/f-typeprint.c
-+++ b/gdb/f-typeprint.c
+ TYPE_DATA_LOCATION (type)
+ = obstack_alloc (&objfile->objfile_obstack, sizeof (prop));
+Index: gdb-7.8.90.20150126/gdb/f-typeprint.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/f-typeprint.c 2015-01-26 07:47:25.846758375 +0100
++++ gdb-7.8.90.20150126/gdb/f-typeprint.c 2015-01-26 07:47:42.402829895 +0100
@@ -30,6 +30,7 @@
#include "gdbcore.h"
#include "target.h"
#include "f-lang.h"
+#include "valprint.h"
- #include <string.h>
- #include <errno.h>
-@@ -56,6 +57,17 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream,
+ #if 0 /* Currently unused. */
+ static void f_type_print_args (struct type *, struct ui_file *);
+@@ -53,6 +54,17 @@ f_print_type (struct type *type, const c
enum type_code code;
int demangled_args;
@@ -599,7 +371,7 @@ index 8356aab..69e67f4 100644
f_type_print_base (type, stream, show, level);
code = TYPE_CODE (type);
if ((varstring != NULL && *varstring != '\0')
-@@ -170,28 +182,36 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
+@@ -167,28 +179,36 @@ f_type_print_varspec_suffix (struct type
if (arrayprint_recurse_level == 1)
fprintf_filtered (stream, "(");
@@ -657,11 +429,11 @@ index 8356aab..69e67f4 100644
if (arrayprint_recurse_level == 1)
fprintf_filtered (stream, ")");
else
-diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
-index 408c8cc..38f32e0 100644
---- a/gdb/f-valprint.c
-+++ b/gdb/f-valprint.c
-@@ -39,8 +39,6 @@
+Index: gdb-7.8.90.20150126/gdb/f-valprint.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/f-valprint.c 2015-01-26 07:47:25.847758379 +0100
++++ gdb-7.8.90.20150126/gdb/f-valprint.c 2015-01-26 07:47:42.403829900 +0100
+@@ -36,8 +36,6 @@
extern void _initialize_f_valprint (void);
static void info_common_command (char *, int);
@@ -670,7 +442,7 @@ index 408c8cc..38f32e0 100644
static void f77_get_dynamic_length_of_aggregate (struct type *);
int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
-@@ -48,15 +46,6 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
+@@ -45,15 +43,6 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIM
/* Array which holds offsets to be applied to get a row's elements
for a given array. Array also holds the size of each subarray. */
@@ -686,7 +458,7 @@ index 408c8cc..38f32e0 100644
int
f77_get_lowerbound (struct type *type)
{
-@@ -114,47 +103,6 @@ f77_get_dynamic_length_of_aggregate (struct type *type)
+@@ -111,47 +100,6 @@ f77_get_dynamic_length_of_aggregate (str
* TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type)));
}
@@ -734,7 +506,7 @@ index 408c8cc..38f32e0 100644
/* Actual function which prints out F77 arrays, Valaddr == address in
the superior. Address == the address in the inferior. */
-@@ -167,41 +115,62 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type,
+@@ -164,41 +112,62 @@ f77_print_array_1 (int nss, int ndimensi
const struct value_print_options *options,
int *elts)
{
@@ -813,7 +585,7 @@ index 408c8cc..38f32e0 100644
fprintf_filtered (stream, "...");
}
}
-@@ -228,12 +197,6 @@ f77_print_array (struct type *type, const gdb_byte *valaddr,
+@@ -225,12 +194,6 @@ f77_print_array (struct type *type, cons
Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"),
ndimensions, MAX_FORTRAN_DIMS);
@@ -826,7 +598,7 @@ index 408c8cc..38f32e0 100644
f77_print_array_1 (1, ndimensions, type, valaddr, embedded_offset,
address, stream, recurse, val, options, &elts);
}
-@@ -378,12 +341,15 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+@@ -375,12 +338,15 @@ f_val_print (struct type *type, const gd
fprintf_filtered (stream, "( ");
for (index = 0; index < TYPE_NFIELDS (type); index++)
{
@@ -847,11 +619,11 @@ index 408c8cc..38f32e0 100644
if (index != TYPE_NFIELDS (type) - 1)
fputs_filtered (", ", stream);
}
-diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
-index e99a2f3..53cae2c 100644
---- a/gdb/gdbtypes.c
-+++ b/gdb/gdbtypes.c
-@@ -805,7 +805,8 @@ allocate_stub_method (struct type *type)
+Index: gdb-7.8.90.20150126/gdb/gdbtypes.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/gdbtypes.c 2015-01-26 07:47:25.850758392 +0100
++++ gdb-7.8.90.20150126/gdb/gdbtypes.c 2015-01-26 07:47:42.404829904 +0100
+@@ -815,7 +815,8 @@ allocate_stub_method (struct type *type)
struct type *
create_range_type (struct type *result_type, struct type *index_type,
const struct dynamic_prop *low_bound,
@@ -861,7 +633,7 @@ index e99a2f3..53cae2c 100644
{
if (result_type == NULL)
result_type = alloc_type_copy (index_type);
-@@ -820,6 +821,7 @@ create_range_type (struct type *result_type, struct type *index_type,
+@@ -830,6 +831,7 @@ create_range_type (struct type *result_t
TYPE_ZALLOC (result_type, sizeof (struct range_bounds));
TYPE_RANGE_DATA (result_type)->low = *low_bound;
TYPE_RANGE_DATA (result_type)->high = *high_bound;
@@ -869,7 +641,7 @@ index e99a2f3..53cae2c 100644
if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0)
TYPE_UNSIGNED (result_type) = 1;
-@@ -841,7 +843,7 @@ struct type *
+@@ -858,7 +860,7 @@ struct type *
create_static_range_type (struct type *result_type, struct type *index_type,
LONGEST low_bound, LONGEST high_bound)
{
@@ -878,7 +650,7 @@ index e99a2f3..53cae2c 100644
low.kind = PROP_CONST;
low.data.const_val = low_bound;
-@@ -849,7 +851,11 @@ create_static_range_type (struct type *result_type, struct type *index_type,
+@@ -866,7 +868,11 @@ create_static_range_type (struct type *r
high.kind = PROP_CONST;
high.data.const_val = high_bound;
@@ -891,7 +663,7 @@ index e99a2f3..53cae2c 100644
return result_type;
}
-@@ -1003,18 +1009,24 @@ create_array_type_with_stride (struct type *result_type,
+@@ -1020,18 +1026,24 @@ create_array_type_with_stride (struct ty
TYPE_CODE (result_type) = TYPE_CODE_ARRAY;
TYPE_TARGET_TYPE (result_type) = element_type;
@@ -918,7 +690,7 @@ index e99a2f3..53cae2c 100644
else if (bit_stride > 0)
TYPE_LENGTH (result_type) =
(bit_stride * (high_bound - low_bound + 1) + 7) / 8;
-@@ -1616,12 +1628,31 @@ stub_noname_complaint (void)
+@@ -1630,12 +1642,31 @@ stub_noname_complaint (void)
static int
is_dynamic_type_internal (struct type *type, int top_level)
{
@@ -947,10 +719,10 @@ index e99a2f3..53cae2c 100644
+ if (is_dynamic_type (TYPE_FIELD_TYPE (type, index)))
+ return 1;
+
- switch (TYPE_CODE (type))
- {
- case TYPE_CODE_RANGE:
-@@ -1631,11 +1662,19 @@ is_dynamic_type_internal (struct type *type, int top_level)
+ /* Types that have a dynamic TYPE_DATA_LOCATION are considered
+ dynamic, even if the type itself is statically defined.
+ From a user's point of view, this may appear counter-intuitive;
+@@ -1656,11 +1687,19 @@ is_dynamic_type_internal (struct type *t
{
gdb_assert (TYPE_NFIELDS (type) == 1);
@@ -973,7 +745,7 @@ index e99a2f3..53cae2c 100644
}
case TYPE_CODE_STRUCT:
-@@ -1648,6 +1687,17 @@ is_dynamic_type_internal (struct type *type, int top_level)
+@@ -1673,6 +1712,17 @@ is_dynamic_type_internal (struct type *t
&& is_dynamic_type_internal (TYPE_FIELD_TYPE (type, i), 0))
return 1;
}
@@ -991,20 +763,7 @@ index e99a2f3..53cae2c 100644
break;
}
-@@ -1666,22 +1716,23 @@ static struct type *resolve_dynamic_type_internal (struct type *type,
- CORE_ADDR addr,
- int top_level);
-
--/* Given a dynamic range type (dyn_range_type), return a static version
-- of that type. */
-+/* Given a dynamic range type (dyn_range_type) and address,
-+ return a static version of that type. */
-
- static struct type *
--resolve_dynamic_range (struct type *dyn_range_type)
-+resolve_dynamic_range (struct type *dyn_range_type, CORE_ADDR addr)
- {
- CORE_ADDR value;
+@@ -1701,7 +1751,8 @@ resolve_dynamic_range (struct type *dyn_
struct type *static_range_type;
const struct dynamic_prop *prop;
const struct dwarf2_locexpr_baton *baton;
@@ -1014,22 +773,7 @@ index e99a2f3..53cae2c 100644
gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE);
- prop = &TYPE_RANGE_DATA (dyn_range_type)->low;
-- if (dwarf2_evaluate_property (prop, &value))
-+ if (dwarf2_evaluate_property (prop, addr, &value))
- {
- low_bound.kind = PROP_CONST;
- low_bound.data.const_val = value;
-@@ -1693,7 +1744,7 @@ resolve_dynamic_range (struct type *dyn_range_type)
- }
-
- prop = &TYPE_RANGE_DATA (dyn_range_type)->high;
-- if (dwarf2_evaluate_property (prop, &value))
-+ if (dwarf2_evaluate_property (prop, addr, &value))
- {
- high_bound.kind = PROP_CONST;
- high_bound.data.const_val = value;
-@@ -1707,10 +1758,17 @@ resolve_dynamic_range (struct type *dyn_range_type)
+@@ -1732,10 +1783,17 @@ resolve_dynamic_range (struct type *dyn_
high_bound.kind = PROP_UNDEFINED;
high_bound.data.const_val = 0;
}
@@ -1050,14 +794,7 @@ index e99a2f3..53cae2c 100644
TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1;
return static_range_type;
}
-@@ -1720,29 +1778,52 @@ resolve_dynamic_range (struct type *dyn_range_type)
- of the associated array. */
-
- static struct type *
--resolve_dynamic_array (struct type *type)
-+resolve_dynamic_array (struct type *type, CORE_ADDR addr)
- {
- CORE_ADDR value;
+@@ -1751,23 +1809,46 @@ resolve_dynamic_array (struct type *type
struct type *elt_type;
struct type *range_type;
struct type *ary_dim;
@@ -1066,13 +803,12 @@ index e99a2f3..53cae2c 100644
- gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY);
+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY
-+ || TYPE_CODE (type) == TYPE_CODE_STRING);
++ || TYPE_CODE (type) == TYPE_CODE_STRING);
elt_type = type;
range_type = check_typedef (TYPE_INDEX_TYPE (elt_type));
-- range_type = resolve_dynamic_range (range_type);
-+ range_type = resolve_dynamic_range (range_type, addr);
-+
+ range_type = resolve_dynamic_range (range_type, addr);
+
+ prop = TYPE_ALLOCATED_PROP (type);
+ if (dwarf2_evaluate_property (prop, addr, &value))
+ {
@@ -1086,11 +822,11 @@ index e99a2f3..53cae2c 100644
+ TYPE_ASSOCIATED_PROP (copy)->kind = PROP_CONST;
+ TYPE_ASSOCIATED_PROP (copy)->data.const_val = value;
+ }
-
++
ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type));
- if (ary_dim != NULL && TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY)
-- elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (type));
+- elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (type), addr);
+ if (ary_dim != NULL && (TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY
+ || TYPE_CODE (ary_dim) == TYPE_CODE_STRING))
+ elt_type = resolve_dynamic_array (TYPE_TARGET_TYPE (copy), addr);
@@ -1102,42 +838,18 @@ index e99a2f3..53cae2c 100644
- range_type);
+ if (TYPE_CODE (type) == TYPE_CODE_STRING)
+ return create_string_type (copy,
-+ elt_type,
-+ range_type);
++ elt_type,
++ range_type);
+ else
+ return create_array_type (copy,
-+ elt_type,
-+ range_type);
++ elt_type,
++ range_type);
}
/* Resolve dynamic bounds of members of the union TYPE to static
-@@ -1846,6 +1927,8 @@ resolve_dynamic_type_internal (struct type *type, CORE_ADDR addr,
- {
- struct type *real_type = check_typedef (type);
- struct type *resolved_type = type;
-+ const struct dynamic_prop *prop;
-+ CORE_ADDR value;
-
- if (!is_dynamic_type_internal (real_type, top_level))
- return type;
-@@ -1871,11 +1954,12 @@ resolve_dynamic_type_internal (struct type *type, CORE_ADDR addr,
- }
-
- case TYPE_CODE_ARRAY:
-- resolved_type = resolve_dynamic_array (type);
-+ case TYPE_CODE_STRING:
-+ resolved_type = resolve_dynamic_array (type, addr);
- break;
-
- case TYPE_CODE_RANGE:
-- resolved_type = resolve_dynamic_range (type);
-+ resolved_type = resolve_dynamic_range (type, addr);
- break;
-
- case TYPE_CODE_UNION:
-@@ -1887,6 +1971,25 @@ resolve_dynamic_type_internal (struct type *type, CORE_ADDR addr,
- break;
- }
+@@ -1938,6 +2019,25 @@ resolve_dynamic_type_internal (struct ty
+ else
+ TYPE_DATA_LOCATION (resolved_type) = NULL;
+ /* Resolve data_location attribute. */
+ prop = TYPE_DATA_LOCATION (resolved_type);
@@ -1161,8 +873,8 @@ index e99a2f3..53cae2c 100644
return resolved_type;
}
-@@ -4104,6 +4207,27 @@ copy_type_recursive (struct objfile *objfile,
- *TYPE_RANGE_DATA (new_type) = *TYPE_RANGE_DATA (type);
+@@ -4174,6 +4274,27 @@ copy_type_recursive (struct objfile *obj
+ sizeof (struct dynamic_prop));
}
+ /* Copy the data location information. */
@@ -1189,9 +901,9 @@ index e99a2f3..53cae2c 100644
/* Copy pointers to other types. */
if (TYPE_TARGET_TYPE (type))
TYPE_TARGET_TYPE (new_type) =
-@@ -4150,6 +4274,44 @@ copy_type (const struct type *type)
- memcpy (TYPE_MAIN_TYPE (new_type), TYPE_MAIN_TYPE (type),
- sizeof (struct main_type));
+@@ -4227,6 +4348,44 @@ copy_type (const struct type *type)
+ sizeof (struct dynamic_prop));
+ }
+ if (TYPE_ALLOCATED_PROP (type))
+ {
@@ -1234,11 +946,11 @@ index e99a2f3..53cae2c 100644
return new_type;
}
-diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
-index 5008ef4..436edf8 100644
---- a/gdb/gdbtypes.h
-+++ b/gdb/gdbtypes.h
-@@ -669,6 +669,10 @@ struct main_type
+Index: gdb-7.8.90.20150126/gdb/gdbtypes.h
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/gdbtypes.h 2015-01-26 07:47:25.852758401 +0100
++++ gdb-7.8.90.20150126/gdb/gdbtypes.h 2015-01-26 07:47:42.405829908 +0100
+@@ -660,6 +660,10 @@ struct main_type
struct dynamic_prop high;
@@ -1249,15 +961,10 @@ index 5008ef4..436edf8 100644
/* True if HIGH range bound contains the number of elements in the
subrange. This affects how the final hight bound is computed. */
-@@ -724,6 +728,23 @@ struct main_type
+@@ -720,6 +724,18 @@ struct main_type
+ this field yields to the location of the data for an object. */
- struct func_type *func_stuff;
- } type_specific;
-+
-+ /* * Contains a location description value for the current type. Evaluating
-+ this field yields to the location of the data for an object. */
-+
-+ struct dynamic_prop *data_location;
+ struct dynamic_prop *data_location;
+
+ /* Structure for DW_AT_allocated.
+ The presence of this attribute indicates that the object of the type
@@ -1273,7 +980,7 @@ index 5008ef4..436edf8 100644
};
/* * A ``struct type'' describes a particular instance of a type, with
-@@ -1202,6 +1223,39 @@ extern void allocate_gnat_aux_type (struct type *);
+@@ -1198,6 +1214,39 @@ extern void allocate_gnat_aux_type (stru
TYPE_RANGE_DATA(range_type)->high.kind
#define TYPE_LOW_BOUND_KIND(range_type) \
TYPE_RANGE_DATA(range_type)->low.kind
@@ -1311,9 +1018,9 @@ index 5008ef4..436edf8 100644
+ && TYPE_ASSOCIATED_PROP (t)->kind == PROP_CONST \
+ && !TYPE_ASSOCIATED_PROP (t)->data.const_val)
- /* Moto-specific stuff for FORTRAN arrays. */
-
-@@ -1209,6 +1263,9 @@ extern void allocate_gnat_aux_type (struct type *);
+ /* Attribute accessors for the type data location. */
+ #define TYPE_DATA_LOCATION(thistype) \
+@@ -1215,6 +1264,9 @@ extern void allocate_gnat_aux_type (stru
TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
@@ -1323,7 +1030,7 @@ index 5008ef4..436edf8 100644
#define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
(TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype))))
-@@ -1677,6 +1734,7 @@ extern struct type *create_array_type_with_stride
+@@ -1685,6 +1737,7 @@ extern struct type *create_array_type_wi
extern struct type *create_range_type (struct type *, struct type *,
const struct dynamic_prop *,
@@ -1331,11 +1038,10 @@ index 5008ef4..436edf8 100644
const struct dynamic_prop *);
extern struct type *create_array_type (struct type *, struct type *,
-diff --git a/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
-new file mode 100644
-index 0000000..20607c3
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp 2015-01-26 07:47:42.405829908 +0100
@@ -0,0 +1,65 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -1402,11 +1108,10 @@ index 0000000..20607c3
+gdb_continue_to_breakpoint "vla2-deallocated"
+gdb_test "print l" " = \\.FALSE\\." "print vla2 deallocated"
+gdb_test "print vla2" " = <not allocated>" "print deallocated vla2"
-diff --git a/gdb/testsuite/gdb.fortran/vla-datatypes.exp b/gdb/testsuite/gdb.fortran/vla-datatypes.exp
-new file mode 100644
-index 0000000..20276d6
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-datatypes.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.exp 2015-01-26 07:47:42.405829908 +0100
@@ -0,0 +1,82 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -1490,11 +1195,10 @@ index 0000000..20276d6
+ "print logicalvla(5,5,5) (2nd)"
+gdb_test "print charactervla(5,5,5)" " = 'X'" \
+ "print charactervla(5,5,5) (2nd)"
-diff --git a/gdb/testsuite/gdb.fortran/vla-datatypes.f90 b/gdb/testsuite/gdb.fortran/vla-datatypes.f90
-new file mode 100644
-index 0000000..b11879a
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-datatypes.f90
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-datatypes.f90 2015-01-26 07:47:42.405829908 +0100
@@ -0,0 +1,51 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
@@ -1547,11 +1251,10 @@ index 0000000..b11879a
+ ! dummy statement for bp
+ l = .FALSE. ! vlas-modified
+end program vla_primitives
-diff --git a/gdb/testsuite/gdb.fortran/vla-func.exp b/gdb/testsuite/gdb.fortran/vla-func.exp
-new file mode 100644
-index 0000000..f0f236b
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-func.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.exp 2015-01-26 07:47:42.406829913 +0100
@@ -0,0 +1,61 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -1614,11 +1317,10 @@ index 0000000..f0f236b
+ "print vla3 (after func2)"
+gdb_test "ptype vla3" "type = integer\\\(kind=4\\\) \\\(10\\\)" \
+ "ptype vla3 (after func2)"
-diff --git a/gdb/testsuite/gdb.fortran/vla-func.f90 b/gdb/testsuite/gdb.fortran/vla-func.f90
-new file mode 100644
-index 0000000..4f45da1
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-func.f90
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-func.f90 2015-01-26 07:47:42.406829913 +0100
@@ -0,0 +1,71 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
@@ -1691,11 +1393,10 @@ index 0000000..4f45da1
+
+ ret = .TRUE. ! func2-returned
+end program vla_func
-diff --git a/gdb/testsuite/gdb.fortran/vla-history.exp b/gdb/testsuite/gdb.fortran/vla-history.exp
-new file mode 100644
-index 0000000..170e1eb
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-history.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-history.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-history.exp 2015-01-26 07:47:42.406829913 +0100
@@ -0,0 +1,62 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -1759,11 +1460,10 @@ index 0000000..170e1eb
+# Try to access history values for vla values.
+gdb_test "print \$9" " = 1311" "print \$9"
+gdb_test "print \$10" " = 1001" "print \$10"
-diff --git a/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
-new file mode 100644
-index 0000000..2ee2914
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp 2015-01-26 07:47:42.406829913 +0100
@@ -0,0 +1,87 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -1852,11 +1552,10 @@ index 0000000..2ee2914
+ "ptype array1(100) (arbitrary length)"
+gdb_test "ptype array2(4,100)" "type = integer\\\(kind=4\\\)" \
+ "ptype array2(4,100) (arbitrary length)"
-diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran/vla-ptype.exp
-new file mode 100644
-index 0000000..9267723
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-ptype.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-ptype.exp 2015-01-26 07:47:42.406829913 +0100
@@ -0,0 +1,96 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -1954,11 +1653,10 @@ index 0000000..9267723
+gdb_test "ptype vla2(5, 45, 20)" \
+ "no such vector element because not allocated" \
+ "ptype vla2(5, 45, 20) not allocated"
-diff --git a/gdb/testsuite/gdb.fortran/vla-sizeof.exp b/gdb/testsuite/gdb.fortran/vla-sizeof.exp
-new file mode 100644
-index 0000000..6053c17
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-sizeof.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sizeof.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2015-01-26 07:47:42.406829913 +0100
@@ -0,0 +1,46 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -2006,11 +1704,10 @@ index 0000000..6053c17
+gdb_breakpoint [gdb_get_line_number "pvla-associated"]
+gdb_continue_to_breakpoint "pvla-associated"
+gdb_test "print sizeof(pvla)" " = 4000" "print sizeof associated pvla"
-diff --git a/gdb/testsuite/gdb.fortran/vla-stride.exp b/gdb/testsuite/gdb.fortran/vla-stride.exp
-new file mode 100644
-index 0000000..35f585d
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-stride.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.exp 2015-01-26 07:47:42.407829917 +0100
@@ -0,0 +1,44 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -2056,11 +1753,10 @@ index 0000000..35f585d
+gdb_continue_to_breakpoint "single-element"
+gdb_test "print pvla" " = \\\(5\\\)" "print single-element"
+gdb_test "print pvla(1)" " = 5" "print one single-element"
-diff --git a/gdb/testsuite/gdb.fortran/vla-stride.f90 b/gdb/testsuite/gdb.fortran/vla-stride.f90
-new file mode 100644
-index 0000000..6aa4f2b
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-stride.f90
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-stride.f90 2015-01-26 07:47:42.407829917 +0100
@@ -0,0 +1,30 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
@@ -2092,11 +1788,10 @@ index 0000000..6aa4f2b
+
+ pvla => null() ! single-element
+end program vla_stride
-diff --git a/gdb/testsuite/gdb.fortran/vla-strings.exp b/gdb/testsuite/gdb.fortran/vla-strings.exp
-new file mode 100644
-index 0000000..7fc1734
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-strings.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-01-26 07:47:42.407829917 +0100
@@ -0,0 +1,104 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -2202,11 +1897,10 @@ index 0000000..7fc1734
+ "whatis var_char_p after associated"
+gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \
+ "ptype var_char_p after associated"
-diff --git a/gdb/testsuite/gdb.fortran/vla-strings.f90 b/gdb/testsuite/gdb.fortran/vla-strings.f90
-new file mode 100644
-index 0000000..0a1d522
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-strings.f90
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-strings.f90 2015-01-26 07:47:42.407829917 +0100
@@ -0,0 +1,40 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
@@ -2248,11 +1942,10 @@ index 0000000..0a1d522
+ var_char_p => null()
+ l = associated(var_char_p) ! var_char_p-not-associated
+end program vla_strings
-diff --git a/gdb/testsuite/gdb.fortran/vla-sub.f90 b/gdb/testsuite/gdb.fortran/vla-sub.f90
-new file mode 100644
-index 0000000..8c2c9ff
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-sub.f90
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sub.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-sub.f90 2015-01-26 07:47:42.407829917 +0100
@@ -0,0 +1,82 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
@@ -2336,11 +2029,10 @@ index 0000000..8c2c9ff
+
+ call bar(sub_arr3, sub_arr1)
+end program vla_sub
-diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
-new file mode 100644
-index 0000000..fd11adb
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp 2015-01-26 07:47:42.407829917 +0100
@@ -0,0 +1,35 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -2377,11 +2069,10 @@ index 0000000..fd11adb
+gdb_test "p array1(100)" " = 100" "print arbitary array1(100)"
+gdb_test "p array2(4,10)" " = 1" "print arbitary array2(4,10)"
+gdb_test "p array2(4,100)" " = 1" "print arbitary array2(4,100)"
-diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
-new file mode 100644
-index 0000000..a163617
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp 2015-01-26 07:47:42.407829917 +0100
@@ -0,0 +1,49 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -2432,11 +2123,10 @@ index 0000000..a163617
+gdb_test "p sub_arr2(1, 1, 1)" " = 30" "sub_arr2(1, 1, 1) after finish"
+gdb_test "p sub_arr2(2, 1, 1)" " = 20" "sub_arr2(2, 1, 1) after finish"
+
-diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub.exp b/gdb/testsuite/gdb.fortran/vla-value-sub.exp
-new file mode 100644
-index 0000000..848f9d7
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-value-sub.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value-sub.exp 2015-01-26 07:47:42.408829922 +0100
@@ -0,0 +1,90 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -2528,11 +2218,10 @@ index 0000000..848f9d7
+ "set array(2,2,2) to 20 in subroutine (passed vla)"
+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \
+ "print array2 in foo after it was mofified in debugger (passed vla)"
-diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp
-new file mode 100644
-index 0000000..d7b8a1e
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla-value.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla-value.exp 2015-01-26 07:47:42.408829922 +0100
@@ -0,0 +1,148 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -2682,11 +2371,10 @@ index 0000000..d7b8a1e
+gdb_continue_to_breakpoint "pvla-deassociated"
+gdb_test "print \$mypvar(1,3,8)" " = 1001" \
+ "print \$mypvar(1,3,8) after deallocated"
-diff --git a/gdb/testsuite/gdb.fortran/vla.f90 b/gdb/testsuite/gdb.fortran/vla.f90
-new file mode 100644
-index 0000000..73425f3
---- /dev/null
-+++ b/gdb/testsuite/gdb.fortran/vla.f90
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.fortran/vla.f90 2015-01-26 07:47:42.408829922 +0100
@@ -0,0 +1,56 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
@@ -2744,11 +2432,10 @@ index 0000000..73425f3
+ allocate (vla3 (2,2)) ! vla2-deallocated
+ vla3(:,:) = 13
+end program vla
-diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
-new file mode 100644
-index 0000000..72b0be2
---- /dev/null
-+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2015-01-26 07:47:42.408829922 +0100
@@ -0,0 +1,182 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
@@ -2932,11 +2619,10 @@ index 0000000..72b0be2
+
+mi_gdb_exit
+return 0
-diff --git a/gdb/testsuite/gdb.mi/vla.f90 b/gdb/testsuite/gdb.mi/vla.f90
-new file mode 100644
-index 0000000..46edad2
---- /dev/null
-+++ b/gdb/testsuite/gdb.mi/vla.f90
+Index: gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/vla.f90
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.8.90.20150126/gdb/testsuite/gdb.mi/vla.f90 2015-01-26 07:47:42.409829926 +0100
@@ -0,0 +1,42 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
@@ -2980,11 +2666,11 @@ index 0000000..46edad2
+ pvla2 => null()
+ l = associated(pvla2) ! pvla2-set-to-null
+end program vla
-diff --git a/gdb/typeprint.c b/gdb/typeprint.c
-index 026f3a2..4c861ac 100644
---- a/gdb/typeprint.c
-+++ b/gdb/typeprint.c
-@@ -459,6 +459,13 @@ whatis_exp (char *exp, int show)
+Index: gdb-7.8.90.20150126/gdb/typeprint.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/typeprint.c 2015-01-26 07:47:25.856758418 +0100
++++ gdb-7.8.90.20150126/gdb/typeprint.c 2015-01-26 07:47:42.409829926 +0100
+@@ -456,6 +456,13 @@ whatis_exp (char *exp, int show)
type = value_type (val);
@@ -2998,11 +2684,11 @@ index 026f3a2..4c861ac 100644
get_user_print_options (&opts);
if (opts.objectprint)
{
-diff --git a/gdb/valarith.c b/gdb/valarith.c
-index 4da41cb..fb9671b 100644
---- a/gdb/valarith.c
-+++ b/gdb/valarith.c
-@@ -195,12 +195,31 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
+Index: gdb-7.8.90.20150126/gdb/valarith.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/valarith.c 2015-01-26 07:47:25.857758422 +0100
++++ gdb-7.8.90.20150126/gdb/valarith.c 2015-01-26 07:47:42.409829926 +0100
+@@ -193,12 +193,31 @@ value_subscripted_rvalue (struct value *
struct type *array_type = check_typedef (value_type (array));
struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
unsigned int elt_size = TYPE_LENGTH (elt_type);
@@ -3036,11 +2722,11 @@ index 4da41cb..fb9671b 100644
if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
v = allocate_value_lazy (elt_type);
-diff --git a/gdb/valprint.c b/gdb/valprint.c
-index 8600b34..2f8eac1 100644
---- a/gdb/valprint.c
-+++ b/gdb/valprint.c
-@@ -307,6 +307,18 @@ valprint_check_validity (struct ui_file *stream,
+Index: gdb-7.8.90.20150126/gdb/valprint.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/valprint.c 2015-01-26 07:47:25.858758427 +0100
++++ gdb-7.8.90.20150126/gdb/valprint.c 2015-01-26 07:47:42.410829930 +0100
+@@ -303,6 +303,18 @@ valprint_check_validity (struct ui_file
{
CHECK_TYPEDEF (type);
@@ -3059,7 +2745,7 @@ index 8600b34..2f8eac1 100644
if (TYPE_CODE (type) != TYPE_CODE_UNION
&& TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_ARRAY)
-@@ -362,6 +374,18 @@ val_print_invalid_address (struct ui_file *stream)
+@@ -359,6 +371,18 @@ val_print_invalid_address (struct ui_fil
fprintf_filtered (stream, _("<invalid address>"));
}
@@ -3078,7 +2764,7 @@ index 8600b34..2f8eac1 100644
/* A generic val_print that is suitable for use by language
implementations of the la_val_print method. This function can
handle most type codes, though not all, notably exception
-@@ -803,12 +827,16 @@ static int
+@@ -800,12 +824,16 @@ static int
value_check_printable (struct value *val, struct ui_file *stream,
const struct value_print_options *options)
{
@@ -3095,7 +2781,7 @@ index 8600b34..2f8eac1 100644
if (value_entirely_optimized_out (val))
{
if (options->summary && !val_print_scalar_type_p (value_type (val)))
-@@ -834,6 +862,18 @@ value_check_printable (struct value *val, struct ui_file *stream,
+@@ -831,6 +859,18 @@ value_check_printable (struct value *val
return 0;
}
@@ -3114,11 +2800,11 @@ index 8600b34..2f8eac1 100644
return 1;
}
-diff --git a/gdb/valprint.h b/gdb/valprint.h
-index 6698247..7a415cf 100644
---- a/gdb/valprint.h
-+++ b/gdb/valprint.h
-@@ -217,4 +217,8 @@ extern void output_command_const (const char *args, int from_tty);
+Index: gdb-7.8.90.20150126/gdb/valprint.h
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/valprint.h 2015-01-26 07:47:25.859758431 +0100
++++ gdb-7.8.90.20150126/gdb/valprint.h 2015-01-26 07:47:42.410829930 +0100
+@@ -217,4 +217,8 @@ extern void output_command_const (const
extern int val_print_scalar_type_p (struct type *type);
@@ -3127,11 +2813,11 @@ index 6698247..7a415cf 100644
+extern void val_print_not_associated (struct ui_file *stream);
+
#endif
-diff --git a/gdb/value.c b/gdb/value.c
-index 29abe5f..5efea89 100644
---- a/gdb/value.c
-+++ b/gdb/value.c
-@@ -43,6 +43,7 @@
+Index: gdb-7.8.90.20150126/gdb/value.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/value.c 2015-01-26 07:47:25.860758435 +0100
++++ gdb-7.8.90.20150126/gdb/value.c 2015-01-26 07:47:42.411829935 +0100
+@@ -40,6 +40,7 @@
#include "tracepoint.h"
#include "cp-abi.h"
#include "user-regs.h"
@@ -3139,7 +2825,7 @@ index 29abe5f..5efea89 100644
/* Prototypes for exported functions. */
-@@ -1627,6 +1628,25 @@ set_value_component_location (struct value *component,
+@@ -1755,6 +1756,25 @@ set_value_component_location (struct val
if (funcs->copy_closure)
component->location.computed.closure = funcs->copy_closure (whole);
}
@@ -3165,7 +2851,7 @@ index 29abe5f..5efea89 100644
}
-@@ -2931,13 +2951,22 @@ value_primitive_field (struct value *arg1, int offset,
+@@ -3041,13 +3061,22 @@ value_primitive_field (struct value *arg
v = allocate_value_lazy (type);
else
{
@@ -3194,7 +2880,7 @@ index 29abe5f..5efea89 100644
}
set_value_component_location (v, arg1);
VALUE_REGNUM (v) = VALUE_REGNUM (arg1);
-@@ -3520,7 +3549,8 @@ readjust_indirect_value_type (struct value *value, struct type *enc_type,
+@@ -3635,7 +3664,8 @@ readjust_indirect_value_type (struct val
struct value *original_value)
{
/* Re-adjust type. */
@@ -3204,7 +2890,7 @@ index 29abe5f..5efea89 100644
/* Add embedding info. */
set_value_enclosing_type (value, enc_type);
-@@ -3537,6 +3567,12 @@ coerce_ref (struct value *arg)
+@@ -3652,6 +3682,12 @@ coerce_ref (struct value *arg)
struct value *retval;
struct type *enc_type;
@@ -3217,7 +2903,7 @@ index 29abe5f..5efea89 100644
retval = coerce_ref_if_computed (arg);
if (retval)
return retval;
-@@ -3680,8 +3716,14 @@ value_fetch_lazy (struct value *val)
+@@ -3786,8 +3822,14 @@ value_fetch_lazy (struct value *val)
}
else if (VALUE_LVAL (val) == lval_memory)
{
@@ -3233,3 +2919,39 @@ index 29abe5f..5efea89 100644
if (TYPE_LENGTH (type))
read_value_memory (val, 0, value_stack (val),
+Index: gdb-7.8.90.20150126/gdb/dwarf2loc.c
+===================================================================
+--- gdb-7.8.90.20150126.orig/gdb/dwarf2loc.c 2015-01-26 07:47:25.862758444 +0100
++++ gdb-7.8.90.20150126/gdb/dwarf2loc.c 2015-01-26 07:47:42.412829939 +0100
+@@ -2293,6 +2293,11 @@ dwarf2_evaluate_loc_desc_full (struct ty
+ int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
+
+ do_cleanups (value_chain);
++
++ /* Select right frame to correctly evaluate VLA's during a backtrace. */
++ if (is_dynamic_type (type))
++ select_frame (frame);
++
+ retval = value_at_lazy (type, address + byte_offset);
+ if (in_stack_memory)
+ set_value_stack (retval, 1);
+@@ -2552,6 +2557,19 @@ dwarf2_compile_property_to_c (struct ui_
+ data, data + size, per_cu);
+ }
+
++/* See dwarf2loc.h. */
++
++int
++dwarf2_address_data_valid (const struct type *type)
++{
++ if (TYPE_NOT_ASSOCIATED (type))
++ return 0;
++
++ if (TYPE_NOT_ALLOCATED (type))
++ return 0;
++
++ return 1;
++}
+
+ /* Helper functions and baton for dwarf2_loc_desc_needs_frame. */
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gdb.git/commitdiff/b1b25d28f76e313545f07b2460d6a34077ab53e5
More information about the pld-cvs-commit
mailing list