Rebase to FSF GDB 7.11.50.20160716 (pre-7.12 trunk snapshot).
This commit is contained in:
parent
fb74e3a749
commit
7306e88eb4
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
/gdb-libstdc++-v3-python-r225521.tar.xz
|
||||
/gdb-7.11.1.tar.xz
|
||||
/gdb-7.11.50.20160716.tar.xz
|
||||
|
@ -1,25 +1,16 @@
|
||||
Index: gdb-7.10.50.20160106/gdb/event-top.c
|
||||
Index: gdb-7.11.50.20160630/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/event-top.c
|
||||
+++ gdb-7.10.50.20160106/gdb/event-top.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "gdbcmd.h" /* for dont_repeat() */
|
||||
#include "annotate.h"
|
||||
#include "maint.h"
|
||||
--- gdb-7.11.50.20160630.orig/gdb/event-top.c 2016-07-02 23:43:24.085214144 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/event-top.c 2016-07-03 14:37:12.572130734 +0200
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "buffer.h"
|
||||
#include "ser-event.h"
|
||||
#include "gdb_select.h"
|
||||
+#include "symfile.h"
|
||||
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -180,6 +181,8 @@ rl_callback_read_char_wrapper (gdb_clien
|
||||
void
|
||||
cli_command_loop (void *data)
|
||||
{
|
||||
+ debug_flush_missing ();
|
||||
+
|
||||
display_gdb_prompt (0);
|
||||
|
||||
/* Now it's time to start the event loop. */
|
||||
@@ -298,6 +301,8 @@ display_gdb_prompt (const char *new_prom
|
||||
@@ -347,6 +348,8 @@
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -28,11 +19,23 @@ Index: gdb-7.10.50.20160106/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.10.50.20160106/gdb/symfile.h
|
||||
@@ -794,7 +797,10 @@
|
||||
command_handler (cmd);
|
||||
|
||||
if (ui->prompt_state != PROMPTED)
|
||||
- display_gdb_prompt (0);
|
||||
+ {
|
||||
+ debug_flush_missing ();
|
||||
+ display_gdb_prompt (0);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
Index: gdb-7.11.50.20160630/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/symfile.h
|
||||
+++ gdb-7.10.50.20160106/gdb/symfile.h
|
||||
@@ -587,6 +587,8 @@ void map_symbol_filenames (symbol_filena
|
||||
--- gdb-7.11.50.20160630.orig/gdb/symfile.h 2016-07-03 14:34:32.032753668 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/symfile.h 2016-07-03 14:37:12.573130742 +0200
|
||||
@@ -592,6 +592,8 @@
|
||||
/* build-id support. */
|
||||
extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
|
||||
extern void debug_print_missing (const char *binary, const char *debug);
|
||||
@ -41,48 +44,10 @@ Index: gdb-7.10.50.20160106/gdb/symfile.h
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.11.50.20160630/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/testsuite/lib/gdb.exp
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/lib/gdb.exp
|
||||
@@ -1642,7 +1642,7 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
- # Turn off the missing warnings as the testsuite does not expect it.
|
||||
+ # Turn off the missing RPMs warnings as the testsuite does not expect it.
|
||||
send_gdb "set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re "$gdb_prompt $" {
|
||||
Index: gdb-7.10.50.20160106/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/testsuite/lib/mi-support.exp
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/lib/mi-support.exp
|
||||
@@ -204,7 +204,7 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
- # Turn off the missing warnings as the testsuite does not expect it.
|
||||
+ # Turn off the missing RPMs warnings as the testsuite does not expect it.
|
||||
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.10.50.20160106/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/tui/tui-interp.c
|
||||
+++ gdb-7.10.50.20160106/gdb/tui/tui-interp.c
|
||||
@@ -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.10.50.20160106/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/aclocal.m4
|
||||
+++ gdb-7.10.50.20160106/gdb/aclocal.m4
|
||||
--- gdb-7.11.50.20160630.orig/gdb/aclocal.m4 2016-07-02 23:43:24.085214144 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/aclocal.m4 2016-07-03 14:37:12.576130768 +0200
|
||||
@@ -11,6 +11,221 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
@ -305,10 +270,10 @@ Index: gdb-7.10.50.20160106/gdb/aclocal.m4
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
Index: gdb-7.10.50.20160106/gdb/config.in
|
||||
Index: gdb-7.11.50.20160630/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/config.in
|
||||
+++ gdb-7.10.50.20160106/gdb/config.in
|
||||
--- gdb-7.11.50.20160630.orig/gdb/config.in 2016-07-02 23:43:24.085214144 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/config.in 2016-07-03 14:37:12.576130768 +0200
|
||||
@@ -33,6 +33,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
@ -319,7 +284,7 @@ Index: gdb-7.10.50.20160106/gdb/config.in
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
@@ -258,6 +261,9 @@
|
||||
@@ -261,6 +264,9 @@
|
||||
/* Define if Python 2.7 is being used. */
|
||||
#undef HAVE_LIBPYTHON2_7
|
||||
|
||||
@ -329,11 +294,11 @@ Index: gdb-7.10.50.20160106/gdb/config.in
|
||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/configure
|
||||
Index: gdb-7.11.50.20160630/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/configure
|
||||
+++ gdb-7.10.50.20160106/gdb/configure
|
||||
@@ -705,6 +705,11 @@ PKGVERSION
|
||||
--- gdb-7.11.50.20160630.orig/gdb/configure 2016-07-02 23:43:24.085214144 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/configure 2016-07-03 14:37:12.581130811 +0200
|
||||
@@ -705,6 +705,11 @@
|
||||
HAVE_NATIVE_GCORE_TARGET
|
||||
TARGET_OBS
|
||||
subdirs
|
||||
@ -345,7 +310,7 @@ Index: gdb-7.10.50.20160106/gdb/configure
|
||||
GDB_DATADIR
|
||||
DEBUGDIR
|
||||
MAKEINFO_EXTRA_FLAGS
|
||||
@@ -813,6 +818,7 @@ with_gdb_datadir
|
||||
@@ -814,6 +819,7 @@
|
||||
with_relocated_sources
|
||||
with_auto_load_dir
|
||||
with_auto_load_safe_path
|
||||
@ -353,7 +318,7 @@ Index: gdb-7.10.50.20160106/gdb/configure
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbcli
|
||||
@@ -869,6 +875,11 @@ CCC
|
||||
@@ -870,6 +876,11 @@
|
||||
CPP
|
||||
MAKEINFO
|
||||
MAKEINFOFLAGS
|
||||
@ -365,7 +330,7 @@ Index: gdb-7.10.50.20160106/gdb/configure
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1540,6 +1551,8 @@ Optional Packages:
|
||||
@@ -1541,6 +1552,8 @@
|
||||
[--with-auto-load-dir]
|
||||
--without-auto-load-safe-path
|
||||
do not restrict auto-loaded files locations
|
||||
@ -374,7 +339,7 @@ Index: gdb-7.10.50.20160106/gdb/configure
|
||||
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1595,6 +1608,13 @@ Some influential environment variables:
|
||||
@@ -1595,6 +1608,13 @@
|
||||
MAKEINFO Parent configure detects if it is of sufficient version.
|
||||
MAKEINFOFLAGS
|
||||
Parameters for MAKEINFO.
|
||||
@ -388,7 +353,7 @@ Index: gdb-7.10.50.20160106/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.
|
||||
@@ -5655,6 +5675,494 @@ _ACEOF
|
||||
@@ -5613,6 +5633,494 @@
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
||||
$as_echo "$with_auto_load_safe_path" >&6; }
|
||||
|
||||
@ -883,11 +848,11 @@ Index: gdb-7.10.50.20160106/gdb/configure
|
||||
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
Index: gdb-7.10.50.20160106/gdb/configure.ac
|
||||
Index: gdb-7.11.50.20160630/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/configure.ac
|
||||
+++ gdb-7.10.50.20160106/gdb/configure.ac
|
||||
@@ -177,6 +177,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
|
||||
--- gdb-7.11.50.20160630.orig/gdb/configure.ac 2016-07-02 23:43:24.085214144 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/configure.ac 2016-07-03 14:37:12.582130819 +0200
|
||||
@@ -177,6 +177,199 @@
|
||||
[Directories safe to hold auto-loaded files.])
|
||||
AC_MSG_RESULT([$with_auto_load_safe_path])
|
||||
|
||||
@ -1087,11 +1052,11 @@ Index: gdb-7.10.50.20160106/gdb/configure.ac
|
||||
AC_CONFIG_SUBDIRS(testsuite)
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
Index: gdb-7.10.50.20160106/gdb/corelow.c
|
||||
Index: gdb-7.11.50.20160630/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/corelow.c
|
||||
+++ gdb-7.10.50.20160106/gdb/corelow.c
|
||||
@@ -310,7 +310,7 @@ build_id_locate_exec (int from_tty)
|
||||
--- gdb-7.11.50.20160630.orig/gdb/corelow.c 2016-07-03 14:34:32.022753582 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/corelow.c 2016-07-03 14:37:12.582130819 +0200
|
||||
@@ -310,7 +310,7 @@
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
else
|
||||
@ -1100,10 +1065,10 @@ Index: gdb-7.10.50.20160106/gdb/corelow.c
|
||||
|
||||
do_cleanups (back_to);
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
Index: gdb-7.11.50.20160630/gdb/build-id.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/build-id.c
|
||||
+++ gdb-7.10.50.20160106/gdb/build-id.c
|
||||
--- gdb-7.11.50.20160630.orig/gdb/build-id.c 2016-07-03 14:36:50.124938187 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/build-id.c 2016-07-03 14:42:25.171812134 +0200
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "elf/common.h"
|
||||
#include "elf-bfd.h"
|
||||
@ -1112,7 +1077,7 @@ Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
|
||||
#define BUILD_ID_VERBOSE_NONE 0
|
||||
#define BUILD_ID_VERBOSE_FILENAMES 1
|
||||
@@ -665,8 +666,366 @@ build_id_to_filename (const struct bfd_b
|
||||
@@ -665,8 +666,366 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1221,13 +1186,13 @@ Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (!((headerFormat_p = dlsym (h, "headerFormat"))
|
||||
+ && (rpmReadConfigFiles_p = dlsym (h, "rpmReadConfigFiles"))
|
||||
+ && (rpmdbFreeIterator_p = dlsym (h, "rpmdbFreeIterator"))
|
||||
+ && (rpmdbNextIterator_p = dlsym (h, "rpmdbNextIterator"))
|
||||
+ && (rpmtsCreate_p = dlsym (h, "rpmtsCreate"))
|
||||
+ && (rpmtsFree_p = dlsym (h, "rpmtsFree"))
|
||||
+ && (rpmtsInitIterator_p = dlsym (h, "rpmtsInitIterator"))))
|
||||
+ if (!((headerFormat_p = (char *(*) (Header h, const char * fmt, errmsg_t *errmsg)) dlsym (h, "headerFormat"))
|
||||
+ && (rpmReadConfigFiles_p = (int (*) (const char * file, const char * target)) dlsym (h, "rpmReadConfigFiles"))
|
||||
+ && (rpmdbFreeIterator_p = (rpmdbMatchIterator (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbFreeIterator"))
|
||||
+ && (rpmdbNextIterator_p = (Header (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbNextIterator"))
|
||||
+ && (rpmtsCreate_p = (rpmts (*) (void)) dlsym (h, "rpmtsCreate"))
|
||||
+ && (rpmtsFree_p = (rpmts (*) (rpmts ts)) dlsym (h, "rpmtsFree"))
|
||||
+ && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator"))))
|
||||
+ {
|
||||
+ warning (_("Opened library \"%s\" is incompatible (%s), "
|
||||
+ "missing debuginfos notifications will not be displayed"),
|
||||
@ -1283,12 +1248,12 @@ Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
+ if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0)
|
||||
+ {
|
||||
+ /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */
|
||||
+ s2 = memrchr (debuginfo, '-', s - debuginfo);
|
||||
+ s2 = (char *) memrchr (debuginfo, '-', s - debuginfo);
|
||||
+ }
|
||||
+ if (s2)
|
||||
+ {
|
||||
+ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
|
||||
+ s2 = memrchr (debuginfo, '-', s2 - debuginfo);
|
||||
+ s2 = (char *) memrchr (debuginfo, '-', s2 - debuginfo);
|
||||
+ }
|
||||
+ if (!s2)
|
||||
+ {
|
||||
@ -1311,7 +1276,7 @@ Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
+
|
||||
+ /* RPMDBI_PACKAGES requires keylen == sizeof (int). */
|
||||
+ /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */
|
||||
+ mi_debuginfo = rpmtsInitIterator_p (ts, RPMDBI_LABEL, debuginfo, 0);
|
||||
+ mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0);
|
||||
+ xfree (debuginfo);
|
||||
+ if (mi_debuginfo)
|
||||
+ {
|
||||
@ -1362,7 +1327,7 @@ Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
+
|
||||
+ *slot = debuginfo;
|
||||
+
|
||||
+ missing_rpm = xmalloc (sizeof (*missing_rpm) + strlen (debuginfo));
|
||||
+ missing_rpm = (struct missing_rpm *) xmalloc (sizeof (*missing_rpm) + strlen (debuginfo));
|
||||
+ strcpy (missing_rpm->rpm, debuginfo);
|
||||
+ missing_rpm->next = missing_rpm_list;
|
||||
+ missing_rpm_list = missing_rpm;
|
||||
@ -1400,7 +1365,7 @@ Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
+ if (missing_rpm_list_entries == 0)
|
||||
+ return;
|
||||
+
|
||||
+ array = xmalloc (sizeof (*array) * missing_rpm_list_entries);
|
||||
+ array = (char **) xmalloc (sizeof (*array) * missing_rpm_list_entries);
|
||||
+ cleanups = make_cleanup (xfree, array);
|
||||
+
|
||||
+ array_iter = array;
|
||||
@ -1480,7 +1445,7 @@ Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -720,11 +1079,17 @@ missing_filepair_change (void)
|
||||
@@ -720,11 +1079,17 @@
|
||||
/* All their memory came just from missing_filepair_OBSTACK. */
|
||||
missing_filepair_hash = NULL;
|
||||
}
|
||||
@ -1498,7 +1463,7 @@ Index: gdb-7.10.50.20160106/gdb/build-id.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -791,14 +1156,39 @@ debug_print_missing (const char *binary,
|
||||
@@ -791,14 +1156,39 @@
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/corelow.c
|
||||
Index: gdb-7.11.50.20160630/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/corelow.c 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/corelow.c 2016-02-15 23:26:46.516096395 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/corelow.c 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/corelow.c 2016-07-03 14:34:32.022753582 +0200
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "completer.h"
|
||||
@ -94,11 +94,11 @@ Index: gdb-7.10.90.20160211/gdb/corelow.c
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-7.10.90.20160211/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.11.50.20160630/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/doc/gdb.texinfo 2016-02-15 23:25:36.455598958 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/doc/gdb.texinfo 2016-02-15 23:26:06.362811302 +0100
|
||||
@@ -18684,6 +18684,27 @@
|
||||
--- gdb-7.11.50.20160630.orig/gdb/doc/gdb.texinfo 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/doc/gdb.texinfo 2016-07-03 14:34:32.030753651 +0200
|
||||
@@ -18916,6 +18916,27 @@
|
||||
|
||||
@end table
|
||||
|
||||
@ -126,10 +126,10 @@ Index: gdb-7.10.90.20160211/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.10.90.20160211/gdb/solib-svr4.c
|
||||
Index: gdb-7.11.50.20160630/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/solib-svr4.c 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/solib-svr4.c 2016-02-15 23:26:46.613097083 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/solib-svr4.c 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/solib-svr4.c 2016-07-03 14:34:32.031753659 +0200
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "auxv.h"
|
||||
#include "gdb_bfd.h"
|
||||
@ -194,10 +194,10 @@ Index: gdb-7.10.90.20160211/gdb/solib-svr4.c
|
||||
xfree (buffer);
|
||||
|
||||
/* If this entry has no name, or its name matches the name
|
||||
Index: gdb-7.10.90.20160211/gdb/elfread.c
|
||||
Index: gdb-7.11.50.20160630/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/elfread.c 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/elfread.c 2016-02-15 23:26:06.364811316 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/elfread.c 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/elfread.c 2016-07-03 14:34:32.031753659 +0200
|
||||
@@ -1259,9 +1259,10 @@
|
||||
&& objfile->separate_debug_objfile == NULL
|
||||
&& objfile->separate_debug_objfile_backlink == NULL)
|
||||
@ -224,11 +224,11 @@ Index: gdb-7.10.90.20160211/gdb/elfread.c
|
||||
}
|
||||
}
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/symfile.h
|
||||
Index: gdb-7.11.50.20160630/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/symfile.h 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/symfile.h 2016-02-15 23:26:46.516096395 +0100
|
||||
@@ -584,6 +584,10 @@
|
||||
--- gdb-7.11.50.20160630.orig/gdb/symfile.h 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/symfile.h 2016-07-03 14:34:32.032753668 +0200
|
||||
@@ -589,6 +589,10 @@
|
||||
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
|
||||
int need_fullname);
|
||||
|
||||
@ -239,11 +239,11 @@ Index: gdb-7.10.90.20160211/gdb/symfile.h
|
||||
/* From dwarf2read.c */
|
||||
|
||||
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/lib/gdb.exp 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp 2016-02-15 23:26:46.516096395 +0100
|
||||
@@ -1640,6 +1640,16 @@
|
||||
--- gdb-7.11.50.20160630.orig/gdb/testsuite/lib/gdb.exp 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/lib/gdb.exp 2016-07-03 14:34:32.033753676 +0200
|
||||
@@ -1641,6 +1641,16 @@
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -260,11 +260,11 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp
|
||||
return 0
|
||||
}
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/lib/mi-support.exp 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/lib/mi-support.exp 2016-02-15 23:26:46.516096395 +0100
|
||||
@@ -204,6 +204,16 @@
|
||||
--- gdb-7.11.50.20160630.orig/gdb/testsuite/lib/mi-support.exp 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/lib/mi-support.exp 2016-07-03 14:34:32.033753676 +0200
|
||||
@@ -309,6 +309,16 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -279,12 +279,12 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/lib/mi-support.exp
|
||||
+ }
|
||||
+ }
|
||||
|
||||
# Create the new PTY for the inferior process.
|
||||
if { $separate_inferior_pty } {
|
||||
Index: gdb-7.10.90.20160211/gdb/objfiles.h
|
||||
mi_create_inferior_pty
|
||||
Index: gdb-7.11.50.20160630/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/objfiles.h 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/objfiles.h 2016-02-15 23:26:06.366811330 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/objfiles.h 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/objfiles.h 2016-07-03 14:34:32.034753685 +0200
|
||||
@@ -489,6 +489,10 @@
|
||||
|
||||
#define OBJF_NOT_FILENAME (1 << 6)
|
||||
@ -296,10 +296,10 @@ Index: gdb-7.10.90.20160211/gdb/objfiles.h
|
||||
/* Declarations for functions defined in objfiles.c */
|
||||
|
||||
extern struct objfile *allocate_objfile (bfd *, const char *name, int);
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/corefile.exp
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.base/corefile.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/corefile.exp 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/corefile.exp 2016-02-15 23:26:55.178157896 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/testsuite/gdb.base/corefile.exp 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.base/corefile.exp 2016-07-03 14:34:32.034753685 +0200
|
||||
@@ -293,3 +293,33 @@
|
||||
pass $test
|
||||
}
|
||||
@ -334,10 +334,10 @@ Index: gdb-7.10.90.20160211/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.10.90.20160211/gdb/build-id.c
|
||||
Index: gdb-7.11.50.20160630/gdb/build-id.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/build-id.c 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/build-id.c 2016-02-15 23:26:46.516096395 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/build-id.c 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/build-id.c 2016-07-03 14:36:50.124938187 +0200
|
||||
@@ -26,11 +26,67 @@
|
||||
#include "objfiles.h"
|
||||
#include "filenames.h"
|
||||
@ -385,10 +385,10 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c
|
||||
+ && memcmp (xnp->name, "GNU", sizeof "GNU") == 0)
|
||||
+ {
|
||||
+ size_t size = descsz;
|
||||
+ gdb_byte *data = (void *) descdata;
|
||||
+ gdb_byte *data = (gdb_byte *) descdata;
|
||||
+ struct bfd_build_id *retval;
|
||||
+
|
||||
+ retval = xmalloc (sizeof *retval - 1 + size);
|
||||
+ retval = (struct bfd_build_id *) xmalloc (sizeof *retval - 1 + size);
|
||||
+ retval->size = size;
|
||||
+ memcpy (retval->data, data, size);
|
||||
+
|
||||
@ -429,7 +429,7 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c
|
||||
+ gdb_byte *buf;
|
||||
+ int err;
|
||||
+
|
||||
+ buf = xmalloc (hdr->p_filesz);
|
||||
+ buf = (gdb_byte *) xmalloc (hdr->p_filesz);
|
||||
+ err = target_read_memory (loadbase + i_phdr[i].p_vaddr, buf,
|
||||
+ hdr->p_filesz);
|
||||
+ if (err == 0)
|
||||
@ -633,8 +633,8 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c
|
||||
+ x_phdrs_size = (bfd_get_arch_size (templ) == 64 ? sizeof (Elf64_External_Phdr)
|
||||
+ : sizeof (Elf32_External_Phdr));
|
||||
+
|
||||
+ i_phdrs = xmalloc (i_ehdr.e_phnum * (sizeof *i_phdrs + x_phdrs_size));
|
||||
+ x_phdrs_ptr = (void *) &i_phdrs[i_ehdr.e_phnum];
|
||||
+ i_phdrs = (Elf_Internal_Phdr *) xmalloc (i_ehdr.e_phnum * (sizeof *i_phdrs + x_phdrs_size));
|
||||
+ x_phdrs_ptr = (gdb_byte *) &i_phdrs[i_ehdr.e_phnum];
|
||||
+ err = target_read_memory (ehdr_vma + i_ehdr.e_phoff, (bfd_byte *) x_phdrs_ptr,
|
||||
+ i_ehdr.e_phnum * x_phdrs_size);
|
||||
+ if (err)
|
||||
@ -700,7 +700,7 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c
|
||||
+ {
|
||||
+ struct build_id_addr_sect *candidate;
|
||||
+
|
||||
+ candidate = xmalloc (sizeof *candidate);
|
||||
+ candidate = (struct build_id_addr_sect *) xmalloc (sizeof *candidate);
|
||||
+ candidate->next = build_id_addr_sect;
|
||||
+ build_id_addr_sect = candidate;
|
||||
+ candidate->sect = sect;
|
||||
@ -825,7 +825,7 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c
|
||||
- + (sizeof "/.build-id/" - 1) + 1
|
||||
- + 2 * build_id_len + (sizeof ".debug" - 1) + 1);
|
||||
- link = (char *) alloca (alloc_len);
|
||||
+ link = xmalloc (strlen (debug_file_directory) + 2 * build_id_len + 50);
|
||||
+ link = (char *) xmalloc (strlen (debug_file_directory) + 2 * build_id_len + 50);
|
||||
|
||||
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
|
||||
cause "/.build-id/..." lookups. */
|
||||
@ -937,8 +937,8 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c
|
||||
+ {
|
||||
+ size_t len_orig = strlen (link_all);
|
||||
+
|
||||
+ link_all = xrealloc (link_all,
|
||||
+ len_orig + 1 + strlen (link0_resolved) + 1);
|
||||
+ link_all = (char *) xrealloc (link_all,
|
||||
+ len_orig + 1 + strlen (link0_resolved) + 1);
|
||||
+
|
||||
+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with
|
||||
+ its possible use as an argument for installation command. */
|
||||
@ -1095,9 +1095,9 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c
|
||||
+ if (*slot != NULL)
|
||||
+ return;
|
||||
+
|
||||
+ missing_filepair = obstack_alloc (&missing_filepair_obstack,
|
||||
+ sizeof (*missing_filepair) - 1
|
||||
+ + binary_len0 + debug_len0);
|
||||
+ missing_filepair = (struct missing_filepair *) obstack_alloc (&missing_filepair_obstack,
|
||||
+ sizeof (*missing_filepair) - 1
|
||||
+ + binary_len0 + debug_len0);
|
||||
+ missing_filepair->binary = missing_filepair->data;
|
||||
+ memcpy (missing_filepair->binary, binary, binary_len0);
|
||||
+ if (debug != NULL)
|
||||
@ -1166,10 +1166,10 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/build-id.h
|
||||
Index: gdb-7.11.50.20160630/gdb/build-id.h
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/build-id.h 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/build-id.h 2016-02-15 23:26:06.368811345 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/build-id.h 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/build-id.h 2016-07-03 14:34:32.035753694 +0200
|
||||
@@ -20,9 +20,10 @@
|
||||
#ifndef BUILD_ID_H
|
||||
#define BUILD_ID_H
|
||||
@ -1204,11 +1204,11 @@ Index: gdb-7.10.90.20160211/gdb/build-id.h
|
||||
+ char **build_id_filename_return);
|
||||
|
||||
#endif /* BUILD_ID_H */
|
||||
Index: gdb-7.10.90.20160211/gdb/dwarf2read.c
|
||||
Index: gdb-7.11.50.20160630/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/dwarf2read.c 2016-02-15 23:25:36.461599001 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/dwarf2read.c 2016-02-15 23:26:06.373811380 +0100
|
||||
@@ -2516,7 +2516,7 @@
|
||||
--- gdb-7.11.50.20160630.orig/gdb/dwarf2read.c 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/dwarf2read.c 2016-07-03 14:34:32.040753736 +0200
|
||||
@@ -2535,7 +2535,7 @@
|
||||
}
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
@ -1217,11 +1217,11 @@ Index: gdb-7.10.90.20160211/gdb/dwarf2read.c
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
error (_("could not find '.gnu_debugaltlink' file for %s"),
|
||||
Index: gdb-7.10.90.20160211/gdb/python/py-objfile.c
|
||||
Index: gdb-7.11.50.20160630/gdb/python/py-objfile.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/python/py-objfile.c 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/python/py-objfile.c 2016-02-15 23:26:06.373811380 +0100
|
||||
@@ -139,7 +139,7 @@
|
||||
--- gdb-7.11.50.20160630.orig/gdb/python/py-objfile.c 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/python/py-objfile.c 2016-07-03 14:34:32.040753736 +0200
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
TRY
|
||||
{
|
||||
@ -1230,7 +1230,7 @@ Index: gdb-7.10.90.20160211/gdb/python/py-objfile.c
|
||||
}
|
||||
CATCH (except, RETURN_MASK_ALL)
|
||||
{
|
||||
@@ -548,7 +548,7 @@
|
||||
@@ -547,7 +547,7 @@
|
||||
/* Don't return separate debug files. */
|
||||
if (objfile->separate_debug_objfile_backlink != NULL)
|
||||
continue;
|
||||
@ -1239,11 +1239,11 @@ Index: gdb-7.10.90.20160211/gdb/python/py-objfile.c
|
||||
if (obfd_build_id == NULL)
|
||||
continue;
|
||||
if (objfpy_build_id_matches (obfd_build_id, build_id))
|
||||
Index: gdb-7.10.90.20160211/gdb/coffread.c
|
||||
Index: gdb-7.11.50.20160630/gdb/coffread.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/coffread.c 2016-02-15 23:25:00.859346221 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/coffread.c 2016-02-15 23:26:06.374811387 +0100
|
||||
@@ -739,7 +739,7 @@
|
||||
--- gdb-7.11.50.20160630.orig/gdb/coffread.c 2016-07-03 14:33:28.130205528 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/coffread.c 2016-07-03 14:34:32.041753745 +0200
|
||||
@@ -737,7 +737,7 @@
|
||||
{
|
||||
char *debugfile;
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/infrun.c gdb-7.10.50.20160106/gdb/infrun.c
|
||||
--- gdb-7.10.50.20160106-orig/gdb/infrun.c 2016-01-09 15:05:06.127481758 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/infrun.c 2016-01-09 15:05:24.054593048 +0100
|
||||
@@ -626,6 +626,13 @@ holding the child stopped. Try \"set de
|
||||
Index: gdb-7.11.50.20160716/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160716.orig/gdb/infrun.c 2016-07-16 14:37:09.317178150 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/infrun.c 2016-07-16 14:37:10.636188765 +0200
|
||||
@@ -620,6 +620,13 @@
|
||||
target_pid_to_str (process_ptid));
|
||||
}
|
||||
|
||||
@ -15,10 +16,11 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/infrun.c gdb-7.10.50.20160106/gdb/i
|
||||
target_detach (NULL, 0);
|
||||
}
|
||||
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/linux-nat.c gdb-7.10.50.20160106/gdb/linux-nat.c
|
||||
--- gdb-7.10.50.20160106-orig/gdb/linux-nat.c 2016-01-09 15:05:06.225482366 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/linux-nat.c 2016-01-09 15:05:24.050593023 +0100
|
||||
@@ -194,6 +194,11 @@ enum tribool have_ptrace_getregset = TRI
|
||||
Index: gdb-7.11.50.20160716/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160716.orig/gdb/linux-nat.c 2016-07-16 14:37:09.320178174 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/linux-nat.c 2016-07-16 14:38:09.574663094 +0200
|
||||
@@ -194,6 +194,11 @@
|
||||
static struct target_ops *linux_ops;
|
||||
static struct target_ops linux_ops_saved;
|
||||
|
||||
@ -30,7 +32,7 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/linux-nat.c gdb-7.10.50.20160106/gd
|
||||
/* The method to call, if any, when a new thread is attached. */
|
||||
static void (*linux_nat_new_thread) (struct lwp_info *);
|
||||
|
||||
@@ -961,6 +966,9 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
@@ -1047,6 +1052,9 @@
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNPAW: Attaching to a stopped process\n");
|
||||
@ -40,8 +42,8 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/linux-nat.c gdb-7.10.50.20160106/gd
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1303,6 +1311,25 @@ get_pending_status (struct lwp_info *lp,
|
||||
gdb_signal_to_string (signo));
|
||||
@@ -1404,6 +1412,25 @@
|
||||
return gdb_signal_to_host (signo);
|
||||
}
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
@ -66,18 +68,18 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/linux-nat.c gdb-7.10.50.20160106/gd
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1416,6 +1443,10 @@ linux_nat_detach (struct target_ops *ops
|
||||
}
|
||||
else
|
||||
linux_ops->to_detach (ops, args, from_tty);
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
+#endif
|
||||
}
|
||||
@@ -1562,6 +1589,10 @@
|
||||
detach_one_lwp (main_lwp, &signo);
|
||||
|
||||
/* Resume execution of the inferior process. If STEP is nonzero,
|
||||
@@ -1674,6 +1705,16 @@ linux_nat_resume (struct target_ops *ops
|
||||
inf_ptrace_detach_success (ops);
|
||||
+
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ pid_was_stopped = 0;
|
||||
+#endif
|
||||
}
|
||||
delete_lwp (main_lwp->ptid);
|
||||
}
|
||||
@@ -1823,6 +1854,16 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@ -94,7 +96,7 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/linux-nat.c gdb-7.10.50.20160106/gd
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
|
||||
|
||||
@@ -3618,6 +3659,10 @@ linux_nat_mourn_inferior (struct target_
|
||||
@@ -3819,6 +3860,10 @@
|
||||
|
||||
/* Let the arch-specific native code know this process is gone. */
|
||||
linux_nat_forget_process (pid);
|
||||
@ -105,10 +107,11 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/linux-nat.c gdb-7.10.50.20160106/gd
|
||||
}
|
||||
|
||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/testsuite/gdb.threads/attach-stopped.exp gdb-7.10.50.20160106/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
--- gdb-7.10.50.20160106-orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2016-01-06 02:48:38.000000000 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.threads/attach-stopped.exp 2016-01-09 15:05:48.917747101 +0100
|
||||
@@ -56,7 +56,65 @@ proc corefunc { threadtype } {
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160716.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2016-07-16 14:37:09.321178182 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.threads/attach-stopped.exp 2016-07-16 14:37:10.640188797 +0200
|
||||
@@ -56,7 +56,65 @@
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
|
@ -5,38 +5,42 @@ Some of the threads may not be properly PTRACE_DETACHed which hurts if they
|
||||
should have been detached with SIGSTOP (as they are accidentally left running
|
||||
on the debugger termination).
|
||||
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/defs.h gdb-7.10.50.20160106/gdb/defs.h
|
||||
--- gdb-7.10.50.20160106-orig/gdb/defs.h 2016-01-09 15:06:57.658172875 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/defs.h 2016-01-09 15:07:12.431264378 +0100
|
||||
@@ -145,6 +145,9 @@ extern void set_quit_flag (void);
|
||||
Index: gdb-7.11.50.20160630/gdb/defs.h
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/defs.h 2016-07-03 16:40:43.423078926 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/defs.h 2016-07-03 16:41:08.568271741 +0200
|
||||
@@ -175,6 +175,10 @@
|
||||
/* Flag that function quit should call quit_force. */
|
||||
extern volatile int sync_quit_force_run;
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+extern int quit_flag_cleanup;
|
||||
+#endif
|
||||
extern int immediate_quit;
|
||||
|
||||
+
|
||||
extern void quit (void);
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/extension.c gdb-7.10.50.20160106/gdb/extension.c
|
||||
--- gdb-7.10.50.20160106-orig/gdb/extension.c 2016-01-06 02:48:37.000000000 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/extension.c 2016-01-09 15:07:12.434264396 +0100
|
||||
@@ -833,6 +833,11 @@ check_quit_flag (void)
|
||||
|
||||
/* Helper for the QUIT macro. */
|
||||
Index: gdb-7.11.50.20160630/gdb/extension.c
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/extension.c 2016-07-03 16:40:41.723065890 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/extension.c 2016-07-03 16:41:44.896550309 +0200
|
||||
@@ -830,6 +830,11 @@
|
||||
int i, result = 0;
|
||||
const struct extension_language_defn *extlang;
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ if (quit_flag_cleanup)
|
||||
+ return 0;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
|
||||
{
|
||||
if (extlang->ops->check_quit_flag != NULL)
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/top.c gdb-7.10.50.20160106/gdb/top.c
|
||||
--- gdb-7.10.50.20160106-orig/gdb/top.c 2016-01-06 02:48:38.000000000 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/top.c 2016-01-09 15:07:12.432264384 +0100
|
||||
@@ -1557,7 +1557,13 @@ quit_force (char *args, int from_tty)
|
||||
Index: gdb-7.11.50.20160630/gdb/top.c
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/top.c 2016-07-03 16:40:41.724065898 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/top.c 2016-07-03 16:40:43.424078934 +0200
|
||||
@@ -1617,7 +1617,13 @@
|
||||
qt.args = args;
|
||||
qt.from_tty = from_tty;
|
||||
|
||||
@ -50,20 +54,21 @@ diff -dup -rup gdb-7.10.50.20160106-orig/gdb/top.c gdb-7.10.50.20160106/gdb/top.
|
||||
|
||||
/* Get out of tfind mode, and kill or detach all inferiors. */
|
||||
TRY
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/utils.c gdb-7.10.50.20160106/gdb/utils.c
|
||||
--- gdb-7.10.50.20160106-orig/gdb/utils.c 2016-01-09 15:06:57.654172850 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/utils.c 2016-01-09 15:07:12.433264390 +0100
|
||||
@@ -122,6 +122,13 @@ int job_control;
|
||||
Index: gdb-7.11.50.20160630/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/utils.c 2016-07-03 16:40:41.725065905 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/utils.c 2016-07-03 16:41:38.961504799 +0200
|
||||
@@ -109,6 +109,13 @@
|
||||
|
||||
int immediate_quit;
|
||||
int job_control;
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+/* Nonzero means we are already processing the quitting cleanups and we should
|
||||
+ no longer get aborted. */
|
||||
+
|
||||
+int quit_flag_cleanup;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
/* Nonzero means that strings with character values >0x7F should be printed
|
||||
as octal escapes. Zero means just print the value (e.g. it's an
|
||||
international character, and the terminal or window can cope.) */
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.ada/packed_array.exp 2016-02-15 23:33:29.830959972 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.ada/packed_array.exp 2016-02-15 23:35:56.289999846 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/testsuite/gdb.ada/packed_array.exp 2016-07-16 03:48:59.000000000 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.ada/packed_array.exp 2016-07-16 16:53:33.736172889 +0200
|
||||
@@ -56,5 +56,11 @@
|
||||
# are. Observed with (FSF GNU Ada 4.5.3 20110124).
|
||||
xfail $test
|
||||
@ -14,10 +14,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
+ }
|
||||
}
|
||||
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S 2016-02-15 23:35:56.290999853 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,455 @@
|
||||
+ .file "x86_64-vla-typedef.c"
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
@ -474,10 +474,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
+ .string "GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)"
|
||||
+ .ident "GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c 2016-02-15 23:35:56.290999853 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,45 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -524,10 +524,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp 2016-02-15 23:35:56.290999853 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,64 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -593,10 +593,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
+gdb_test "whatis array" "type = array_t" "second: whatis array"
|
||||
+
|
||||
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/arrayidx.c
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/arrayidx.c 2016-02-15 23:33:29.830959972 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.c 2016-02-15 23:35:56.290999853 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/testsuite/gdb.base/arrayidx.c 2016-07-16 03:48:59.000000000 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/arrayidx.c 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -17,6 +17,13 @@
|
||||
|
||||
int array[] = {1, 2, 3, 4};
|
||||
@ -611,10 +611,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.c
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/arrayidx.exp 2016-02-15 23:33:29.830959972 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.exp 2016-02-15 23:35:56.291999860 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/testsuite/gdb.base/arrayidx.exp 2016-07-16 03:48:59.000000000 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/arrayidx.exp 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -49,4 +49,12 @@
|
||||
"\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
|
||||
"Print array with array-indexes on"
|
||||
@ -629,10 +629,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
+ unsupported "$test (no GCC)"
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.c 2016-02-15 23:35:56.291999860 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/internal-var-field-address.c 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -654,10 +654,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
+struct {
|
||||
+ int field;
|
||||
+} staticstruct = { 1 };
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.exp 2016-02-15 23:35:56.291999860 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/internal-var-field-address.exp 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,26 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -685,10 +685,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.ex
|
||||
+
|
||||
+gdb_test {set $varstruct = staticstruct}
|
||||
+gdb_test {p $varstruct.field} " = 1"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla-frame.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.c 2016-02-15 23:35:56.291999860 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla-frame.c 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,31 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -721,10 +721,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.c
|
||||
+ f (s);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.exp 2016-02-15 23:35:56.291999860 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla-frame.exp 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,38 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -764,10 +764,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
+}
|
||||
+
|
||||
+gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.c 2016-02-15 23:35:56.291999860 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla-overflow.c 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -799,10 +799,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.exp 2016-02-15 23:35:56.292999867 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla-overflow.exp 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,109 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -913,10 +913,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
+gdb_test "bt" "in \[^ \]*abort \\(.* in main \\(.*" "Backtrace after abort()"
|
||||
+
|
||||
+verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.c 2016-02-15 23:35:56.292999867 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla.c 2016-07-16 16:53:33.737172897 +0200
|
||||
@@ -0,0 +1,55 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -973,10 +973,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.c
|
||||
+ foo (78);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.exp 2016-02-15 23:35:56.292999867 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.base/vla.exp 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,62 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1040,10 +1040,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.exp
|
||||
+gdb_test "p temp1" " = '1' <repeats 78 times>" "second: print temp1"
|
||||
+gdb_test "p temp2" " = '2' <repeats 78 times>" "second: print temp2"
|
||||
+gdb_test "p temp3" " = '3' <repeats 48 times>" "second: print temp3"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S 2016-02-15 23:35:56.292999867 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,246 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1291,10 +1291,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
+ .string "char"
|
||||
+.Luint_str:
|
||||
+ .string "unsigned int"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp 2016-02-15 23:35:56.292999867 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,66 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1362,10 +1362,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
+
|
||||
+# The register contains unpredictable value - the array size.
|
||||
+gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.c 2016-02-15 23:35:56.293999874 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-stripped.c 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,42 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1409,10 +1409,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
+ func1 (1, 2);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp 2016-02-15 23:35:56.293999874 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,79 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1493,10 +1493,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
+gdb_test "step" \
|
||||
+ "func.* \\(.*\\) at .*" \
|
||||
+ "step"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S 2016-02-15 23:35:56.293999874 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,83 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1581,10 +1581,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-loca
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp 2016-02-15 23:35:56.293999874 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1623,10 +1623,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-loca
|
||||
+clean_restart $binfile
|
||||
+
|
||||
+gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S 2016-02-15 23:35:56.293999874 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,121 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -1749,10 +1749,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp 2016-02-15 23:35:56.293999874 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp 2016-07-16 16:53:33.738172906 +0200
|
||||
@@ -0,0 +1,39 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1793,10 +1793,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
+
|
||||
+gdb_test "ptype notype_string" {type = char \[129\]}
|
||||
+gdb_test "p notype_string" " = 'x' <repeats 129 times>"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2016-02-15 23:35:56.294999881 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,42 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1840,10 +1840,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
+gdb_continue_to_breakpoint "break-here" ".*break-here.*"
|
||||
+gdb_test "p c40pt(1)" " = '0-hello.*"
|
||||
+gdb_test "p c40pt(2)" " = '1-hello.*"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.f90 2016-02-15 23:35:56.294999881 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/dwarf-stride.f90 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,40 @@
|
||||
+! Copyright 2009 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -1885,10 +1885,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
+ print *, c40pt ! break-here
|
||||
+
|
||||
+end program repro
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp 2016-02-15 23:36:39.358305635 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/dynamic.exp 2016-07-16 17:19:24.255202013 +0200
|
||||
@@ -0,0 +1,151 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -1935,7 +1935,7 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
+gdb_breakpoint [gdb_get_line_number "varx-init"]
|
||||
+gdb_continue_to_breakpoint "varx-init"
|
||||
+gdb_test "p varx" "\\$\[0-9\]* = <not allocated>" "p varx unallocated"
|
||||
+gdb_test "ptype varx" "type = <not allocated>" "ptype varx unallocated"
|
||||
+gdb_test "ptype varx" {type = real\(kind=4\) \(:,:,:\)} "ptype varx unallocated"
|
||||
+gdb_test "p varx(1,5,17)" {no such vector element \(vector not allocated\)} "p varx(1,5,17) unallocated"
|
||||
+gdb_test "p varx(1,5,17)=1" {no such vector element \(vector not allocated\)} "p varx(1,5,17)=1 unallocated"
|
||||
+gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) unallocated"
|
||||
@ -1954,7 +1954,7 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
+gdb_test "p varx(2, 6, 18)" "\\$\[0-9\]* = 8"
|
||||
+gdb_test "p varx(6, 15, 28)" "\\$\[0-9\]* = 9"
|
||||
+gdb_test "p varv" "\\$\[0-9\]* = <not associated>" "p varv unassociated"
|
||||
+gdb_test "ptype varv" "type = <not associated>" "ptype varv unassociated"
|
||||
+gdb_test "ptype varv" {type = real\(kind=4\) \(:,:,:\)} "ptype varv unassociated"
|
||||
+
|
||||
+set test "output varx"
|
||||
+gdb_test_multiple $test $test {
|
||||
@ -1982,7 +1982,7 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
+gdb_continue_to_breakpoint "varv-deassociated"
|
||||
+# The latter one is for the Intel Fortran Compiler 10.1.008 pointer type.
|
||||
+gdb_test "p varv" "\\$\[0-9\]* = (<not associated>|.*(Cannot access it|Unable to access the object) because the object is not associated.)" "p varv deassociated"
|
||||
+gdb_test "ptype varv" "type = (<not associated>|.*(Cannot access it|Unable to access the object) because the object is not associated.)" "ptype varv deassociated"
|
||||
+gdb_test "ptype varv" {type = real\(kind=4\) \(:,:,:\)} "ptype varv deassociated"
|
||||
+gdb_test "p l" "\\$\[0-9\]* = \\.FALSE\\." "p l if varv deassociated"
|
||||
+gdb_test "p varv(1,5,17)" {no such vector element \(vector not associated\)}
|
||||
+gdb_test "ptype varv(1,5,17)" {no such vector element \(vector not associated\)}
|
||||
@ -1990,7 +1990,7 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
+gdb_breakpoint [gdb_get_line_number "varx-deallocated"]
|
||||
+gdb_continue_to_breakpoint "varx-deallocated"
|
||||
+gdb_test "p varx" "\\$\[0-9\]* = <not allocated>" "p varx deallocated"
|
||||
+gdb_test "ptype varx" "type = <not allocated>" "ptype varx deallocated"
|
||||
+gdb_test "ptype varx" {type = real\(kind=4\) \(:,:,:\)} "ptype varx deallocated"
|
||||
+gdb_test "p l" "\\$\[0-9\]* = \\.FALSE\\." "p l if varx deallocated"
|
||||
+gdb_test "p varx(1,5,17)" {no such vector element \(vector not allocated\)} "p varx(1,5,17) deallocated"
|
||||
+gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) deallocated"
|
||||
@ -2041,10 +2041,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
+gdb_test "p vart(3,8)" "\\$\[0-9\]* = 9"
|
||||
+# maps to foo::vary(1,3)
|
||||
+gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.f90 2016-02-15 23:35:56.294999881 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/dynamic.f90 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,98 @@
|
||||
+! Copyright 2007 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -2144,10 +2144,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
+ if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort
|
||||
+ if (x (3, 1) .ne. 10) call abort
|
||||
+end
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/string.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.exp 2016-02-15 23:36:39.359305642 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/string.exp 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,59 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2208,10 +2208,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.exp
|
||||
+gdb_continue_to_breakpoint "var-finish"
|
||||
+gdb_test "p e" "\\$\[0-9\]* = 'e '" "p e re-set"
|
||||
+gdb_test "p f" "\\$\[0-9\]* = \\(\\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f2 ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\)" "p *f re-set"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.f90
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/string.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.f90 2016-02-15 23:35:56.295999888 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/string.f90 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,37 @@
|
||||
+! Copyright 2008 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -2250,10 +2250,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.f90
|
||||
+ h = 'h'
|
||||
+ call foo (g, h)
|
||||
+end
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.exp 2016-02-15 23:35:56.295999888 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/subrange.exp 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,72 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2327,10 +2327,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
+gdb_unload
|
||||
+setup_kfail "*-*-*" "vlaregression/9999"
|
||||
+gdb_test {p $a (3, 2:2)} { = \(23\)}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.f90 2016-02-15 23:35:56.295999888 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.fortran/subrange.f90 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+! Copyright 2011 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -2360,10 +2360,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
+ ptr => a
|
||||
+ write (*,*) a ! break-static
|
||||
+end
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.c 2016-02-15 23:35:56.295999888 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.mi/mi2-var-stale-type.c 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -2391,10 +2391,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp 2016-02-15 23:35:56.295999888 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,57 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -2453,10 +2453,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
+mi_create_varobj "vla" "vla" "create local variable vla"
|
||||
+
|
||||
+mi_gdb_test "-var-update *" "\\^done,changelist=.*" "-var-update *"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register-func.c 2016-02-15 23:35:56.295999888 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.opt/array-from-register-func.c 2016-07-16 16:53:33.739172914 +0200
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This file is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -2480,10 +2480,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
+{
|
||||
+ return arr[0];
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.c 2016-02-15 23:35:56.296999895 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.opt/array-from-register.c 2016-07-16 16:53:33.740172922 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This file is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -2513,10 +2513,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.exp 2016-02-15 23:35:56.296999895 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.opt/array-from-register.exp 2016-07-16 16:53:33.740172922 +0200
|
||||
@@ -0,0 +1,33 @@
|
||||
+# Copyright 2009 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -2551,10 +2551,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
+# Seen regression:
|
||||
+# Address requested for identifier "arr" which is in register $rdi
|
||||
+gdb_test "p arr\[0\]" "\\$\[0-9\]+ = 42"
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.exp 2016-02-15 23:36:39.359305642 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.pascal/arrays.exp 2016-07-16 16:53:33.740172922 +0200
|
||||
@@ -0,0 +1,104 @@
|
||||
+# Copyright 2008, 2009 Free Software Foundation, Inc.
|
||||
+#
|
||||
@ -2660,10 +2660,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
+}
|
||||
+gdb_test "print DynArrChar" ".* = 'abcdefghijklm'" "Print dynamic array of char"
|
||||
+
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.pas 2016-02-15 23:35:56.296999895 +0100
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/gdb.pascal/arrays.pas 2016-07-16 16:53:33.740172922 +0200
|
||||
@@ -0,0 +1,82 @@
|
||||
+{
|
||||
+ Copyright 2008, 2009 Free Software Foundation, Inc.
|
||||
@ -2747,10 +2747,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
+ s := 'test'#0'string';
|
||||
+ writeln(s); { set breakpoint 2 here }
|
||||
+end.
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/lib/gdb.exp 2016-02-15 23:35:55.326993008 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp 2016-02-15 23:35:56.297999903 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/testsuite/lib/gdb.exp 2016-07-16 16:53:33.063167315 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/lib/gdb.exp 2016-07-16 16:53:33.741172930 +0200
|
||||
@@ -173,6 +173,11 @@
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
@ -2763,10 +2763,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp
|
||||
-re "Discard symbol table from .*y or n.*$" {
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/lib/pascal.exp
|
||||
Index: gdb-7.11.50.20160716/gdb/testsuite/lib/pascal.exp
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/testsuite/lib/pascal.exp 2016-02-15 23:33:29.830959972 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/lib/pascal.exp 2016-02-15 23:35:56.298999910 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/testsuite/lib/pascal.exp 2016-07-16 03:48:59.000000000 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/testsuite/lib/pascal.exp 2016-07-16 16:53:33.741172930 +0200
|
||||
@@ -37,6 +37,9 @@
|
||||
global pascal_compiler_is_fpc
|
||||
global gpc_compiler
|
||||
|
@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
http://sourceware.org/gdb/wiki/ArcherBranchManagement
|
||||
|
||||
GIT snapshot:
|
||||
commit f0ee78c5ccefe388a64273353ecd5c99dae62558
|
||||
commit 5e8c6e345d63e61d3c31e67a55db25a6824787b2
|
||||
|
||||
tromey/python
|
||||
|
||||
@ -16,10 +16,10 @@ index 0000000..173b8ea
|
||||
+This branch originally held the Python code for gdb. It still exists
|
||||
+because a small amount of code here has not yet been merged upstream.
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
index 95104ef..a9b198a 100644
|
||||
index 16d5f27..7346d46 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1534,6 +1534,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
@@ -1553,6 +1553,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
CONFIG_LINKS= \
|
||||
$(SHELL) config.status
|
||||
|
||||
@ -33,10 +33,10 @@ index 95104ef..a9b198a 100644
|
||||
$(SHELL) config.status --recheck
|
||||
|
||||
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||
index 30cfd17..e977b30 100644
|
||||
index 0beca55..f499b53 100644
|
||||
--- a/gdb/data-directory/Makefile.in
|
||||
+++ b/gdb/data-directory/Makefile.in
|
||||
@@ -65,7 +65,10 @@ PYTHON_FILE_LIST = \
|
||||
@@ -66,7 +66,10 @@ PYTHON_FILE_LIST = \
|
||||
gdb/unwinder.py \
|
||||
gdb/prompt.py \
|
||||
gdb/xmethod.py \
|
||||
@ -47,8 +47,8 @@ index 30cfd17..e977b30 100644
|
||||
gdb/command/xmethods.py \
|
||||
gdb/command/frame_filters.py \
|
||||
gdb/command/unwinders.py \
|
||||
@@ -76,6 +79,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/function/__init__.py \
|
||||
@@ -78,6 +81,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/function/as_string.py \
|
||||
gdb/function/caller_is.py \
|
||||
gdb/function/strfns.py \
|
||||
+ gdb/function/caller_is.py \
|
||||
@ -57,7 +57,7 @@ index 30cfd17..e977b30 100644
|
||||
gdb/printer/bound_registers.py
|
||||
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index 1665372..c4caffc 100644
|
||||
index a068622..64abaa7 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -1225,6 +1225,16 @@ for remote debugging.
|
||||
@ -78,7 +78,7 @@ index 1665372..c4caffc 100644
|
||||
@item -tui
|
||||
@cindex @code{--tui}
|
||||
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
|
||||
index 57ec22e..13beb05 100644
|
||||
index 6623d8e..a71f5e1 100644
|
||||
--- a/gdb/doc/python.texi
|
||||
+++ b/gdb/doc/python.texi
|
||||
@@ -88,8 +88,6 @@ containing @code{end}. For example:
|
||||
@ -111,7 +111,7 @@ index 05a38b2..9801fdf 100644
|
||||
set variable $gdb_init_done = 1
|
||||
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index aecd60a..d0f7834 100644
|
||||
index 5477379..b7e413f 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -33,6 +33,7 @@
|
||||
@ -122,7 +122,7 @@ index aecd60a..d0f7834 100644
|
||||
#include "source.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "objfiles.h"
|
||||
@@ -453,6 +454,8 @@ captured_main (void *data)
|
||||
@@ -459,6 +460,8 @@ captured_main (void *data)
|
||||
char *cdarg = NULL;
|
||||
char *ttyarg = NULL;
|
||||
|
||||
@ -190,7 +190,7 @@ index aecd60a..d0f7834 100644
|
||||
{
|
||||
/* The remaining options are the command-line options for the
|
||||
inferior. The first one is the sym/exec file, and the rest
|
||||
@@ -1137,7 +1171,8 @@ captured_main (void *data)
|
||||
@@ -1127,7 +1161,8 @@ captured_main (void *data)
|
||||
|
||||
/* Read in the old history after all the command files have been
|
||||
read. */
|
||||
@ -200,7 +200,7 @@ index aecd60a..d0f7834 100644
|
||||
|
||||
if (batch_flag)
|
||||
{
|
||||
@@ -1148,13 +1183,25 @@ captured_main (void *data)
|
||||
@@ -1138,13 +1173,25 @@ captured_main (void *data)
|
||||
/* Show time and/or space usage. */
|
||||
do_cleanups (pre_stat_chain);
|
||||
|
||||
@ -232,7 +232,7 @@ index aecd60a..d0f7834 100644
|
||||
}
|
||||
/* No exit -- exit is through quit_command. */
|
||||
}
|
||||
@@ -1188,6 +1235,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
@@ -1187,6 +1234,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
fputs_unfiltered (_("\
|
||||
This is the GNU debugger. Usage:\n\n\
|
||||
gdb [options] [executable-file [core-file or process-id]]\n\
|
||||
@ -245,7 +245,7 @@ index aecd60a..d0f7834 100644
|
||||
gdb [options] --args executable-file [inferior-arguments ...]\n\n\
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
@@ -1232,6 +1285,13 @@ Output and user interface control:\n\n\
|
||||
@@ -1231,6 +1284,13 @@ Output and user interface control:\n\n\
|
||||
#endif
|
||||
fputs_unfiltered (_("\
|
||||
--dbx DBX compatibility mode.\n\
|
||||
@ -443,10 +443,10 @@ index 0000000..8742680
|
||||
+
|
||||
+InScope ()
|
||||
diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
index 4f88b0e..870a1ba 100644
|
||||
index 3a272a9..e7e61cf 100644
|
||||
--- a/gdb/python/python.c
|
||||
+++ b/gdb/python/python.c
|
||||
@@ -93,6 +93,8 @@ const struct extension_language_defn extension_language_python =
|
||||
@@ -95,6 +95,8 @@ const struct extension_language_defn extension_language_python =
|
||||
#include "linespec.h"
|
||||
#include "source.h"
|
||||
#include "version.h"
|
||||
@ -455,7 +455,7 @@ index 4f88b0e..870a1ba 100644
|
||||
#include "target.h"
|
||||
#include "gdbthread.h"
|
||||
#include "interps.h"
|
||||
@@ -1262,6 +1264,83 @@ gdbpy_print_stack (void)
|
||||
@@ -1254,6 +1256,90 @@ gdbpy_print_stack (void)
|
||||
|
||||
/* Return the current Progspace.
|
||||
There always is one. */
|
||||
@ -477,7 +477,14 @@ index 4f88b0e..870a1ba 100644
|
||||
+ return PyErr_Format (PyExc_RuntimeError, _("Cannot invoke CLI from MI."));
|
||||
+
|
||||
+ in_cli = 1;
|
||||
+ current_interp_command_loop ();
|
||||
+ /* See captured_command_loop. */
|
||||
+
|
||||
+ /* Give the interpreter a chance to print a prompt. */
|
||||
+ interp_pre_command_loop (top_level_interpreter ());
|
||||
+
|
||||
+ /* Now it's time to start the event loop. */
|
||||
+ start_event_loop ();
|
||||
+
|
||||
+ in_cli = 0;
|
||||
+
|
||||
+ Py_RETURN_NONE;
|
||||
@ -500,7 +507,7 @@ index 4f88b0e..870a1ba 100644
|
||||
+ PySys_SetArgv (argc - 1, argv + 1);
|
||||
+#else
|
||||
+ {
|
||||
+ wchar_t **wargv = alloca (sizeof (*wargv) * (argc + 1));
|
||||
+ wchar_t **wargv = (wchar_t **) alloca (sizeof (*wargv) * (argc + 1));
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 1; i < argc; i++)
|
||||
@ -514,7 +521,7 @@ index 4f88b0e..870a1ba 100644
|
||||
+ i, argv[i]);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ wargv[i] = alloca (sizeof (**wargv) * (len + 1));
|
||||
+ wargv[i] = (wchar_t *) alloca (sizeof (**wargv) * (len + 1));
|
||||
+ len2 = mbstowcs (wargv[i], argv[i], len + 1);
|
||||
+ assert (len2 == len);
|
||||
+ }
|
||||
@ -539,7 +546,7 @@ index 4f88b0e..870a1ba 100644
|
||||
|
||||
static PyObject *
|
||||
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
|
||||
@@ -1982,6 +2061,8 @@ PyMethodDef python_GdbMethods[] =
|
||||
@@ -1972,6 +2058,8 @@ PyMethodDef python_GdbMethods[] =
|
||||
Evaluate command, a string, as a gdb CLI command. Optionally returns\n\
|
||||
a Python String containing the output of the command if to_string is\n\
|
||||
set to True." },
|
||||
@ -549,7 +556,7 @@ index 4f88b0e..870a1ba 100644
|
||||
"Return a gdb parameter's value" },
|
||||
|
||||
diff --git a/gdb/python/python.h b/gdb/python/python.h
|
||||
index e6bfcca..688daa3 100644
|
||||
index b810187..a3620ab 100644
|
||||
--- a/gdb/python/python.h
|
||||
+++ b/gdb/python/python.h
|
||||
@@ -25,4 +25,6 @@
|
||||
@ -560,7 +567,7 @@ index e6bfcca..688daa3 100644
|
||||
+
|
||||
#endif /* GDB_PYTHON_H */
|
||||
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
index 9f25a48..88b0842 100644
|
||||
index af0026c..6c9bbb2 100644
|
||||
--- a/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
@@ -92,6 +92,10 @@ proc do_steps_and_nexts {} {
|
||||
@ -575,7 +582,7 @@ index 9f25a48..88b0842 100644
|
||||
set description "next over make_command_stats_cleanup and everything it calls"
|
||||
set command "next"
|
||||
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
index 33fdbe5..264d00f 100644
|
||||
index b5a4682..d5451a6 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-frame.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
@@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r
|
||||
@ -588,10 +595,10 @@ index 33fdbe5..264d00f 100644
|
||||
gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \
|
||||
" = True" \
|
||||
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
|
||||
index baa17b7..45ad67e 100644
|
||||
index 57a9ba1..d90d85a 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-value.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-value.exp
|
||||
@@ -388,6 +388,15 @@ proc test_value_after_death {} {
|
||||
@@ -397,6 +397,15 @@ proc test_value_after_death {} {
|
||||
"print value's type"
|
||||
}
|
||||
|
||||
@ -607,7 +614,7 @@ index baa17b7..45ad67e 100644
|
||||
# Regression test for invalid subscript operations. The bug was that
|
||||
# the type of the value was not being checked before allowing a
|
||||
# subscript operation to proceed.
|
||||
@@ -517,6 +526,7 @@ test_value_in_inferior
|
||||
@@ -526,6 +535,7 @@ test_value_in_inferior
|
||||
test_inferior_function_call
|
||||
test_lazy_strings
|
||||
test_value_after_death
|
||||
|
@ -1,235 +0,0 @@
|
||||
From 3a2b436ae9958a1029545c03201b7223ff33c150 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Mon, 30 May 2016 14:11:43 +0200
|
||||
Subject: [PATCH 1/2] Code cleanup: dwarf2_get_pc_bounds: -1/0/+1 -> enum
|
||||
|
||||
Make the code (maybe) more readable + primarily prepare it for [patch 2/2]
|
||||
enum extension.
|
||||
|
||||
This change should have no code change impact.
|
||||
|
||||
gdb/ChangeLog
|
||||
2016-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Code cleanup: dwarf2_get_pc_bounds: -1/0/+1 -> enum
|
||||
* dwarf2read.c (enum pc_bounds_kind) New.
|
||||
(dwarf2_get_pc_bounds): Use it in the declaration.
|
||||
(process_psymtab_comp_unit_reader): Adjust caller. Rename has_pc_info
|
||||
to cu_bounds_kind.
|
||||
(read_func_scope, read_lexical_block_scope, read_call_site_scope):
|
||||
Adjust callers.
|
||||
(dwarf2_get_pc_bounds): Use enum pc_bounds_kind in the definition.
|
||||
(dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds): Adjust callers.
|
||||
---
|
||||
gdb/ChangeLog | 12 ++++++++++
|
||||
gdb/dwarf2read.c | 71 ++++++++++++++++++++++++++++++++++++--------------------
|
||||
2 files changed, 58 insertions(+), 25 deletions(-)
|
||||
|
||||
### a/gdb/ChangeLog
|
||||
### b/gdb/ChangeLog
|
||||
## -1,3 +1,15 @@
|
||||
+2016-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
+
|
||||
+ Code cleanup: dwarf2_get_pc_bounds: -1/0/+1 -> enum
|
||||
+ * dwarf2read.c (enum pc_bounds_kind) New.
|
||||
+ (dwarf2_get_pc_bounds): Use it in the declaration.
|
||||
+ (process_psymtab_comp_unit_reader): Adjust caller. Rename has_pc_info
|
||||
+ to cu_bounds_kind.
|
||||
+ (read_func_scope, read_lexical_block_scope, read_call_site_scope):
|
||||
+ Adjust callers.
|
||||
+ (dwarf2_get_pc_bounds): Use enum pc_bounds_kind in the definition.
|
||||
+ (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds): Adjust callers.
|
||||
+
|
||||
2016-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* NEWS (QCatchSyscalls): Remove the parameter. Include ...
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -1606,9 +1606,25 @@ static void read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu);
|
||||
static int dwarf2_ranges_read (unsigned, CORE_ADDR *, CORE_ADDR *,
|
||||
struct dwarf2_cu *, struct partial_symtab *);
|
||||
|
||||
-static int dwarf2_get_pc_bounds (struct die_info *,
|
||||
- CORE_ADDR *, CORE_ADDR *, struct dwarf2_cu *,
|
||||
- struct partial_symtab *);
|
||||
+/* How dwarf2_get_pc_bounds constructed its *LOWPC and *HIGHPC return
|
||||
+ values. */
|
||||
+enum pc_bounds_kind
|
||||
+{
|
||||
+ /* No valid combination of DW_AT_low_pc, DW_AT_high_pc or DW_AT_ranges
|
||||
+ was found. */
|
||||
+ PC_BOUNDS_NOT_PRESENT,
|
||||
+
|
||||
+ /* Discontiguous range was found - that is DW_AT_ranges was found. */
|
||||
+ PC_BOUNDS_RANGES,
|
||||
+
|
||||
+ /* Contiguous range was found - DW_AT_low_pc and DW_AT_high_pc were found. */
|
||||
+ PC_BOUNDS_HIGH_LOW,
|
||||
+};
|
||||
+
|
||||
+static enum pc_bounds_kind dwarf2_get_pc_bounds (struct die_info *,
|
||||
+ CORE_ADDR *, CORE_ADDR *,
|
||||
+ struct dwarf2_cu *,
|
||||
+ struct partial_symtab *);
|
||||
|
||||
static void get_scope_pc_bounds (struct die_info *,
|
||||
CORE_ADDR *, CORE_ADDR *,
|
||||
@@ -5947,7 +5963,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
||||
CORE_ADDR baseaddr;
|
||||
CORE_ADDR best_lowpc = 0, best_highpc = 0;
|
||||
struct partial_symtab *pst;
|
||||
- int has_pc_info;
|
||||
+ enum pc_bounds_kind cu_bounds_kind;
|
||||
const char *filename;
|
||||
struct process_psymtab_comp_unit_data *info
|
||||
= (struct process_psymtab_comp_unit_data *) data;
|
||||
@@ -5977,9 +5993,9 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
||||
|
||||
/* Possibly set the default values of LOWPC and HIGHPC from
|
||||
`DW_AT_ranges'. */
|
||||
- has_pc_info = dwarf2_get_pc_bounds (comp_unit_die, &best_lowpc,
|
||||
- &best_highpc, cu, pst);
|
||||
- if (has_pc_info == 1 && best_lowpc < best_highpc)
|
||||
+ cu_bounds_kind = dwarf2_get_pc_bounds (comp_unit_die, &best_lowpc,
|
||||
+ &best_highpc, cu, pst);
|
||||
+ if (cu_bounds_kind == PC_BOUNDS_HIGH_LOW && best_lowpc < best_highpc)
|
||||
/* Store the contiguous range if it is not empty; it can be empty for
|
||||
CUs with no code. */
|
||||
addrmap_set_empty (objfile->psymtabs_addrmap,
|
||||
@@ -6003,7 +6019,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
||||
first_die = load_partial_dies (reader, info_ptr, 1);
|
||||
|
||||
scan_partial_symbols (first_die, &lowpc, &highpc,
|
||||
- ! has_pc_info, cu);
|
||||
+ cu_bounds_kind == PC_BOUNDS_NOT_PRESENT, cu);
|
||||
|
||||
/* If we didn't find a lowpc, set it to highpc to avoid
|
||||
complaints from `maint check'. */
|
||||
@@ -6012,7 +6028,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
||||
|
||||
/* If the compilation unit didn't have an explicit address range,
|
||||
then use the information extracted from its child dies. */
|
||||
- if (! has_pc_info)
|
||||
+ if (cu_bounds_kind == PC_BOUNDS_NOT_PRESENT)
|
||||
{
|
||||
best_lowpc = lowpc;
|
||||
best_highpc = highpc;
|
||||
@@ -11373,7 +11389,8 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
}
|
||||
|
||||
/* Ignore functions with missing or invalid low and high pc attributes. */
|
||||
- if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL))
|
||||
+ if (dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL)
|
||||
+ == PC_BOUNDS_NOT_PRESENT)
|
||||
{
|
||||
attr = dwarf2_attr (die, DW_AT_external, cu);
|
||||
if (!attr || !DW_UNSND (attr))
|
||||
@@ -11535,7 +11552,8 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
as multiple lexical blocks? Handling children in a sane way would
|
||||
be nasty. Might be easier to properly extend generic blocks to
|
||||
describe ranges. */
|
||||
- if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL))
|
||||
+ if (dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL)
|
||||
+ == PC_BOUNDS_NOT_PRESENT)
|
||||
return;
|
||||
lowpc = gdbarch_adjust_dwarf2_addr (gdbarch, lowpc + baseaddr);
|
||||
highpc = gdbarch_adjust_dwarf2_addr (gdbarch, highpc + baseaddr);
|
||||
@@ -11745,7 +11763,8 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
CORE_ADDR lowpc;
|
||||
|
||||
/* DW_AT_entry_pc should be preferred. */
|
||||
- if (!dwarf2_get_pc_bounds (target_die, &lowpc, NULL, target_cu, NULL))
|
||||
+ if (dwarf2_get_pc_bounds (target_die, &lowpc, NULL, target_cu, NULL)
|
||||
+ == PC_BOUNDS_NOT_PRESENT)
|
||||
complaint (&symfile_complaints,
|
||||
_("DW_AT_GNU_call_site_target target DIE has invalid "
|
||||
"low pc, for referencing DIE 0x%x [in module %s]"),
|
||||
@@ -12020,11 +12039,11 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
|
||||
return 1;
|
||||
}
|
||||
|
||||
-/* Get low and high pc attributes from a die. Return 1 if the attributes
|
||||
- are present and valid, otherwise, return 0. Return -1 if the range is
|
||||
- discontinuous, i.e. derived from DW_AT_ranges information. */
|
||||
+/* Get low and high pc attributes from a die. See enum pc_bounds_kind
|
||||
+ definition for the return value. *LOWPC and *HIGHPC are set iff
|
||||
+ PC_BOUNDS_NOT_PRESENT is not returned. */
|
||||
|
||||
-static int
|
||||
+static enum pc_bounds_kind
|
||||
dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
CORE_ADDR *highpc, struct dwarf2_cu *cu,
|
||||
struct partial_symtab *pst)
|
||||
@@ -12033,7 +12052,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
struct attribute *attr_high;
|
||||
CORE_ADDR low = 0;
|
||||
CORE_ADDR high = 0;
|
||||
- int ret = 0;
|
||||
+ enum pc_bounds_kind ret = PC_BOUNDS_NOT_PRESENT;
|
||||
|
||||
attr_high = dwarf2_attr (die, DW_AT_high_pc, cu);
|
||||
if (attr_high)
|
||||
@@ -12048,10 +12067,10 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
}
|
||||
else
|
||||
/* Found high w/o low attribute. */
|
||||
- return 0;
|
||||
+ return PC_BOUNDS_NOT_PRESENT;
|
||||
|
||||
/* Found consecutive range of addresses. */
|
||||
- ret = 1;
|
||||
+ ret = PC_BOUNDS_HIGH_LOW;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -12070,15 +12089,15 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
/* Value of the DW_AT_ranges attribute is the offset in the
|
||||
.debug_ranges section. */
|
||||
if (!dwarf2_ranges_read (ranges_offset, &low, &high, cu, pst))
|
||||
- return 0;
|
||||
+ return PC_BOUNDS_NOT_PRESENT;
|
||||
/* Found discontinuous range of addresses. */
|
||||
- ret = -1;
|
||||
+ ret = PC_BOUNDS_RANGES;
|
||||
}
|
||||
}
|
||||
|
||||
/* read_partial_die has also the strict LOW < HIGH requirement. */
|
||||
if (high <= low)
|
||||
- return 0;
|
||||
+ return PC_BOUNDS_NOT_PRESENT;
|
||||
|
||||
/* When using the GNU linker, .gnu.linkonce. sections are used to
|
||||
eliminate duplicate copies of functions and vtables and such.
|
||||
@@ -12089,7 +12108,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
If this is a discarded function, mark the pc bounds as invalid,
|
||||
so that GDB will ignore it. */
|
||||
if (low == 0 && !dwarf2_per_objfile->has_section_at_zero)
|
||||
- return 0;
|
||||
+ return PC_BOUNDS_NOT_PRESENT;
|
||||
|
||||
*lowpc = low;
|
||||
if (highpc)
|
||||
@@ -12110,7 +12129,8 @@ dwarf2_get_subprogram_pc_bounds (struct die_info *die,
|
||||
CORE_ADDR low, high;
|
||||
struct die_info *child = die->child;
|
||||
|
||||
- if (dwarf2_get_pc_bounds (die, &low, &high, cu, NULL))
|
||||
+ if (dwarf2_get_pc_bounds (die, &low, &high, cu, NULL)
|
||||
+ != PC_BOUNDS_NOT_PRESENT)
|
||||
{
|
||||
*lowpc = min (*lowpc, low);
|
||||
*highpc = max (*highpc, high);
|
||||
@@ -12147,7 +12167,8 @@ get_scope_pc_bounds (struct die_info *die,
|
||||
CORE_ADDR best_high = (CORE_ADDR) 0;
|
||||
CORE_ADDR current_low, current_high;
|
||||
|
||||
- if (dwarf2_get_pc_bounds (die, ¤t_low, ¤t_high, cu, NULL))
|
||||
+ if (dwarf2_get_pc_bounds (die, ¤t_low, ¤t_high, cu, NULL)
|
||||
+ != PC_BOUNDS_NOT_PRESENT)
|
||||
{
|
||||
best_low = current_low;
|
||||
best_high = current_high;
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,343 +0,0 @@
|
||||
From e385593eef98ac92be57159e141f4b805dadbbb3 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Mon, 30 May 2016 14:14:43 +0200
|
||||
Subject: [PATCH 2/2] PR 15231: import bare DW_TAG_lexical_block
|
||||
|
||||
Local variables in lambdas are not accessible
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=15231
|
||||
|
||||
GDB: read_lexical_block_scope
|
||||
/* Ignore blocks with missing or invalid low and high pc attributes. */
|
||||
[...]
|
||||
if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL))
|
||||
return;
|
||||
|
||||
But sometimes there is:
|
||||
|
||||
FAIL: gcc-5.3.1-6.fc23.x86_64
|
||||
<2><92>: Abbrev Number: 11 (DW_TAG_lexical_block)
|
||||
<3><9c>: Abbrev Number: 13 (DW_TAG_structure_type)
|
||||
<9d> DW_AT_name : (indirect string, offset: 0x3c): <lambda()>
|
||||
[...]
|
||||
|
||||
Where DW_TAG_lexical_block has no attributes. Such whole subtree is currently
|
||||
dropped by GDB while I think it should just import all its children DIEs.
|
||||
|
||||
It even XFAIL->XPASSes gdb.ada/out_of_line_in_inlined.exp:
|
||||
commit 0fa7fe506c242b459c4c05d331e7c7d66fb52390
|
||||
Author: Joel Brobecker <brobecker@adacore.com>
|
||||
out of line functions nested inside inline functions.
|
||||
So I have removed that xfail.
|
||||
|
||||
gdb/ChangeLog
|
||||
2016-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR c++/15231
|
||||
* dwarf2read.c (enum pc_bounds_kind): Add PC_BOUNDS_INVALID.
|
||||
(process_psymtab_comp_unit_reader, read_func_scope): Adjust callers.
|
||||
(read_lexical_block_scope): Import DIEs from bare DW_TAG_lexical_block.
|
||||
(read_call_site_scope): Adjust callers.
|
||||
(dwarf2_get_pc_bounds): Implement pc_bounds_invalid.
|
||||
(dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds): Adjust callers.
|
||||
|
||||
gdb/testsuite/ChangeLog
|
||||
2016-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR c++/15231
|
||||
* gdb.ada/out_of_line_in_inlined.exp: Remove xfails.
|
||||
* gdb.dwarf2/dw2-lexical-block-bare.exp: New file.
|
||||
---
|
||||
gdb/ChangeLog | 10 ++++
|
||||
gdb/dwarf2read.c | 53 ++++++++++------
|
||||
gdb/testsuite/ChangeLog | 6 ++
|
||||
gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp | 6 --
|
||||
.../gdb.dwarf2/dw2-lexical-block-bare.exp | 70 ++++++++++++++++++++++
|
||||
5 files changed, 120 insertions(+), 25 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
|
||||
|
||||
### a/gdb/ChangeLog
|
||||
### b/gdb/ChangeLog
|
||||
## -1,5 +1,15 @@
|
||||
2016-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
+ PR c++/15231
|
||||
+ * dwarf2read.c (enum pc_bounds_kind): Add PC_BOUNDS_INVALID.
|
||||
+ (process_psymtab_comp_unit_reader, read_func_scope): Adjust callers.
|
||||
+ (read_lexical_block_scope): Import DIEs from bare DW_TAG_lexical_block.
|
||||
+ (read_call_site_scope): Adjust callers.
|
||||
+ (dwarf2_get_pc_bounds): Implement pc_bounds_invalid.
|
||||
+ (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds): Adjust callers.
|
||||
+
|
||||
+2016-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
+
|
||||
Code cleanup: dwarf2_get_pc_bounds: -1/0/+1 -> enum
|
||||
* dwarf2read.c (enum pc_bounds_kind) New.
|
||||
(dwarf2_get_pc_bounds): Use it in the declaration.
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -1607,13 +1607,16 @@ static int dwarf2_ranges_read (unsigned, CORE_ADDR *, CORE_ADDR *,
|
||||
struct dwarf2_cu *, struct partial_symtab *);
|
||||
|
||||
/* How dwarf2_get_pc_bounds constructed its *LOWPC and *HIGHPC return
|
||||
- values. */
|
||||
+ values. Keep the items ordered with increasing constraints compliance. */
|
||||
enum pc_bounds_kind
|
||||
{
|
||||
- /* No valid combination of DW_AT_low_pc, DW_AT_high_pc or DW_AT_ranges
|
||||
- was found. */
|
||||
+ /* No attribute DW_AT_low_pc, DW_AT_high_pc or DW_AT_ranges was found. */
|
||||
PC_BOUNDS_NOT_PRESENT,
|
||||
|
||||
+ /* Some of the attributes DW_AT_low_pc, DW_AT_high_pc or DW_AT_ranges
|
||||
+ were present but they do not form a valid range of PC addresses. */
|
||||
+ PC_BOUNDS_INVALID,
|
||||
+
|
||||
/* Discontiguous range was found - that is DW_AT_ranges was found. */
|
||||
PC_BOUNDS_RANGES,
|
||||
|
||||
@@ -6019,7 +6022,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
||||
first_die = load_partial_dies (reader, info_ptr, 1);
|
||||
|
||||
scan_partial_symbols (first_die, &lowpc, &highpc,
|
||||
- cu_bounds_kind == PC_BOUNDS_NOT_PRESENT, cu);
|
||||
+ cu_bounds_kind <= PC_BOUNDS_INVALID, cu);
|
||||
|
||||
/* If we didn't find a lowpc, set it to highpc to avoid
|
||||
complaints from `maint check'. */
|
||||
@@ -6028,7 +6031,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
||||
|
||||
/* If the compilation unit didn't have an explicit address range,
|
||||
then use the information extracted from its child dies. */
|
||||
- if (cu_bounds_kind == PC_BOUNDS_NOT_PRESENT)
|
||||
+ if (cu_bounds_kind <= PC_BOUNDS_INVALID)
|
||||
{
|
||||
best_lowpc = lowpc;
|
||||
best_highpc = highpc;
|
||||
@@ -11390,7 +11393,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
/* Ignore functions with missing or invalid low and high pc attributes. */
|
||||
if (dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL)
|
||||
- == PC_BOUNDS_NOT_PRESENT)
|
||||
+ <= PC_BOUNDS_INVALID)
|
||||
{
|
||||
attr = dwarf2_attr (die, DW_AT_external, cu);
|
||||
if (!attr || !DW_UNSND (attr))
|
||||
@@ -11552,9 +11555,20 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
as multiple lexical blocks? Handling children in a sane way would
|
||||
be nasty. Might be easier to properly extend generic blocks to
|
||||
describe ranges. */
|
||||
- if (dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL)
|
||||
- == PC_BOUNDS_NOT_PRESENT)
|
||||
- return;
|
||||
+ switch (dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu, NULL))
|
||||
+ {
|
||||
+ case PC_BOUNDS_NOT_PRESENT:
|
||||
+ /* DW_TAG_lexical_block has no attributes, process its children as if
|
||||
+ there was no wrapping by that DW_TAG_lexical_block.
|
||||
+ GCC does no longer produces such DWARF since GCC r224161. */
|
||||
+ for (child_die = die->child;
|
||||
+ child_die != NULL && child_die->tag;
|
||||
+ child_die = sibling_die (child_die))
|
||||
+ process_die (child_die, cu);
|
||||
+ return;
|
||||
+ case PC_BOUNDS_INVALID:
|
||||
+ return;
|
||||
+ }
|
||||
lowpc = gdbarch_adjust_dwarf2_addr (gdbarch, lowpc + baseaddr);
|
||||
highpc = gdbarch_adjust_dwarf2_addr (gdbarch, highpc + baseaddr);
|
||||
|
||||
@@ -11764,7 +11778,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
/* DW_AT_entry_pc should be preferred. */
|
||||
if (dwarf2_get_pc_bounds (target_die, &lowpc, NULL, target_cu, NULL)
|
||||
- == PC_BOUNDS_NOT_PRESENT)
|
||||
+ <= PC_BOUNDS_INVALID)
|
||||
complaint (&symfile_complaints,
|
||||
_("DW_AT_GNU_call_site_target target DIE has invalid "
|
||||
"low pc, for referencing DIE 0x%x [in module %s]"),
|
||||
@@ -12041,7 +12055,7 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
|
||||
|
||||
/* Get low and high pc attributes from a die. See enum pc_bounds_kind
|
||||
definition for the return value. *LOWPC and *HIGHPC are set iff
|
||||
- PC_BOUNDS_NOT_PRESENT is not returned. */
|
||||
+ neither PC_BOUNDS_NOT_PRESENT nor PC_BOUNDS_INVALID are returned. */
|
||||
|
||||
static enum pc_bounds_kind
|
||||
dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
@@ -12052,7 +12066,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
struct attribute *attr_high;
|
||||
CORE_ADDR low = 0;
|
||||
CORE_ADDR high = 0;
|
||||
- enum pc_bounds_kind ret = PC_BOUNDS_NOT_PRESENT;
|
||||
+ enum pc_bounds_kind ret;
|
||||
|
||||
attr_high = dwarf2_attr (die, DW_AT_high_pc, cu);
|
||||
if (attr_high)
|
||||
@@ -12067,7 +12081,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
}
|
||||
else
|
||||
/* Found high w/o low attribute. */
|
||||
- return PC_BOUNDS_NOT_PRESENT;
|
||||
+ return PC_BOUNDS_INVALID;
|
||||
|
||||
/* Found consecutive range of addresses. */
|
||||
ret = PC_BOUNDS_HIGH_LOW;
|
||||
@@ -12089,15 +12103,17 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
/* Value of the DW_AT_ranges attribute is the offset in the
|
||||
.debug_ranges section. */
|
||||
if (!dwarf2_ranges_read (ranges_offset, &low, &high, cu, pst))
|
||||
- return PC_BOUNDS_NOT_PRESENT;
|
||||
+ return PC_BOUNDS_INVALID;
|
||||
/* Found discontinuous range of addresses. */
|
||||
ret = PC_BOUNDS_RANGES;
|
||||
}
|
||||
+ else
|
||||
+ return PC_BOUNDS_NOT_PRESENT;
|
||||
}
|
||||
|
||||
/* read_partial_die has also the strict LOW < HIGH requirement. */
|
||||
if (high <= low)
|
||||
- return PC_BOUNDS_NOT_PRESENT;
|
||||
+ return PC_BOUNDS_INVALID;
|
||||
|
||||
/* When using the GNU linker, .gnu.linkonce. sections are used to
|
||||
eliminate duplicate copies of functions and vtables and such.
|
||||
@@ -12108,7 +12124,7 @@ dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc,
|
||||
If this is a discarded function, mark the pc bounds as invalid,
|
||||
so that GDB will ignore it. */
|
||||
if (low == 0 && !dwarf2_per_objfile->has_section_at_zero)
|
||||
- return PC_BOUNDS_NOT_PRESENT;
|
||||
+ return PC_BOUNDS_INVALID;
|
||||
|
||||
*lowpc = low;
|
||||
if (highpc)
|
||||
@@ -12129,8 +12145,7 @@ dwarf2_get_subprogram_pc_bounds (struct die_info *die,
|
||||
CORE_ADDR low, high;
|
||||
struct die_info *child = die->child;
|
||||
|
||||
- if (dwarf2_get_pc_bounds (die, &low, &high, cu, NULL)
|
||||
- != PC_BOUNDS_NOT_PRESENT)
|
||||
+ if (dwarf2_get_pc_bounds (die, &low, &high, cu, NULL) >= PC_BOUNDS_RANGES)
|
||||
{
|
||||
*lowpc = min (*lowpc, low);
|
||||
*highpc = max (*highpc, high);
|
||||
@@ -12168,7 +12183,7 @@ get_scope_pc_bounds (struct die_info *die,
|
||||
CORE_ADDR current_low, current_high;
|
||||
|
||||
if (dwarf2_get_pc_bounds (die, ¤t_low, ¤t_high, cu, NULL)
|
||||
- != PC_BOUNDS_NOT_PRESENT)
|
||||
+ >= PC_BOUNDS_RANGES)
|
||||
{
|
||||
best_low = current_low;
|
||||
best_high = current_high;
|
||||
### a/gdb/testsuite/ChangeLog
|
||||
### b/gdb/testsuite/ChangeLog
|
||||
## -1,3 +1,9 @@
|
||||
+2016-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
+
|
||||
+ PR c++/15231
|
||||
+ * gdb.ada/out_of_line_in_inlined.exp: Remove xfails.
|
||||
+ * gdb.dwarf2/dw2-lexical-block-bare.exp: New file.
|
||||
+
|
||||
2016-05-27 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* gdb.threads/attach-many-short-lived-threads.exp (bad_dejagnu):
|
||||
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
|
||||
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
|
||||
@@ -23,20 +23,14 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug optimize=-O2}]
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
-# GCC currently is missing a DW_AT_origin attribute in one of the
|
||||
-# lexical blocks, preventing GDB from creating a symbol for the
|
||||
-# subprogram we want to break on.
|
||||
-setup_xfail "*-*-*"
|
||||
gdb_test "break foo_o224_021.child1.child2" \
|
||||
"Breakpoint \[0-9\]+ at.*: file .*foo_o224_021.adb, line \[0-9\]+."
|
||||
|
||||
gdb_run_cmd
|
||||
-setup_xfail "*-*-*"
|
||||
gdb_test "" \
|
||||
"Breakpoint $decimal, foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*"
|
||||
|
||||
set opt_addr_in "($hex in)?"
|
||||
-setup_xfail "*-*-*"
|
||||
gdb_test "bt" \
|
||||
[multi_line "#0 +$opt_addr_in +foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
|
||||
"#1 +$opt_addr_in +foo_o224_021\\.child1 \\(\\).*" \
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
|
||||
@@ -0,0 +1,70 @@
|
||||
+# Copyright 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+load_lib dwarf.exp
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+if {![dwarf2_support]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+standard_testfile .S main.c
|
||||
+
|
||||
+# Make some DWARF for the test.
|
||||
+set asm_file [standard_output_file $srcfile]
|
||||
+Dwarf::assemble $asm_file {
|
||||
+ cu {} {
|
||||
+ compile_unit {
|
||||
+ {low_pc [gdb_target_symbol main] DW_FORM_addr}
|
||||
+ {high_pc [gdb_target_symbol main]+0x10000 DW_FORM_addr}
|
||||
+ } {
|
||||
+ declare_labels integer_label
|
||||
+
|
||||
+ integer_label: DW_TAG_base_type {
|
||||
+ {DW_AT_byte_size 4 DW_FORM_sdata}
|
||||
+ {DW_AT_encoding @DW_ATE_signed}
|
||||
+ {DW_AT_name integer}
|
||||
+ }
|
||||
+
|
||||
+ DW_TAG_subprogram {
|
||||
+ {name main}
|
||||
+ {DW_AT_external 1 flag}
|
||||
+ {low_pc [gdb_target_symbol main] DW_FORM_addr}
|
||||
+ {high_pc [gdb_target_symbol main]+0x10000 DW_FORM_addr}
|
||||
+ } {
|
||||
+ DW_TAG_lexical_block {
|
||||
+ } {
|
||||
+ DW_TAG_variable {
|
||||
+ {DW_AT_name testvar}
|
||||
+ {DW_AT_type :$integer_label}
|
||||
+ {DW_AT_external 1 flag}
|
||||
+ {DW_AT_location {
|
||||
+ DW_OP_addr [gdb_target_symbol main]
|
||||
+ } SPECIAL_expr}
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
+ [list $srcfile2 $asm_file] {nodebug}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+runto_main
|
||||
+
|
||||
+# FAILing GDB did print: No symbol "testvar" in current context.
|
||||
+gdb_test "p testvar" { = -?[0-9]+}
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.10.90.20160211/gdb/config/i386/linux64.mh
|
||||
Index: gdb-7.11.50.20160630/gdb/config/i386/linux64.mh
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/config/i386/linux64.mh 2016-02-11 20:56:32.470674877 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/config/i386/linux64.mh 2016-02-11 20:56:51.158797712 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/config/i386/linux64.mh 2016-07-02 22:59:18.213248752 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/config/i386/linux64.mh 2016-07-02 22:59:25.716313911 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
linux-procfs.o linux-ptrace.o linux-btrace.o \
|
||||
linux-waitpid.o linux-personality.o x86-linux.o \
|
||||
@ -11,10 +11,10 @@ Index: gdb-7.10.90.20160211/gdb/config/i386/linux64.mh
|
||||
NAT_CDEPS = $(srcdir)/proc-service.list
|
||||
|
||||
# The dynamically loaded libthread_db needs access to symbols in the
|
||||
Index: gdb-7.10.90.20160211/gdb/config/i386/linux.mh
|
||||
Index: gdb-7.11.50.20160630/gdb/config/i386/linux.mh
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/config/i386/linux.mh 2016-02-11 20:56:26.925638430 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/config/i386/linux.mh 2016-02-11 20:56:32.471674884 +0100
|
||||
--- gdb-7.11.50.20160630.orig/gdb/config/i386/linux.mh 2016-07-02 22:59:18.213248752 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/config/i386/linux.mh 2016-07-02 22:59:25.716313911 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
|
||||
@ -23,10 +23,10 @@ Index: gdb-7.10.90.20160211/gdb/config/i386/linux.mh
|
||||
NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \
|
||||
proc-service.o linux-thread-db.o \
|
||||
Index: gdb-7.10.90.20160211/gdb/config/i386/nm-linux.h
|
||||
Index: gdb-7.11.50.20160630/gdb/config/i386/nm-linux.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/config/i386/nm-linux.h 2016-02-11 20:56:32.471674884 +0100
|
||||
+++ gdb-7.11.50.20160630/gdb/config/i386/nm-linux.h 2016-07-02 22:59:25.716313911 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux i386.
|
||||
+
|
||||
@ -56,10 +56,10 @@ Index: gdb-7.10.90.20160211/gdb/config/i386/nm-linux.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.10.90.20160211/gdb/config/i386/nm-linux64.h
|
||||
Index: gdb-7.11.50.20160630/gdb/config/i386/nm-linux64.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/config/i386/nm-linux64.h 2016-02-11 20:56:32.471674884 +0100
|
||||
+++ gdb-7.11.50.20160630/gdb/config/i386/nm-linux64.h 2016-07-02 22:59:25.716313911 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux amd64.
|
||||
+
|
||||
@ -89,13 +89,13 @@ Index: gdb-7.10.90.20160211/gdb/config/i386/nm-linux64.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.10.90.20160211/gdb/target.h
|
||||
Index: gdb-7.11.50.20160630/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-7.10.90.20160211.orig/gdb/target.h 2016-02-11 20:56:26.926638437 +0100
|
||||
+++ gdb-7.10.90.20160211/gdb/target.h 2016-02-11 20:56:32.472674890 +0100
|
||||
@@ -1924,9 +1924,11 @@
|
||||
CNT is the number of such watchpoints used so far, including this
|
||||
one. OTHERTYPE is who knows what... */
|
||||
--- gdb-7.11.50.20160630.orig/gdb/target.h 2016-07-02 22:59:18.214248761 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/target.h 2016-07-02 22:59:25.717313919 +0200
|
||||
@@ -1928,9 +1928,11 @@
|
||||
one. OTHERTYPE is the number of watchpoints of other types than
|
||||
this one used so far. */
|
||||
|
||||
+#ifndef target_can_use_hardware_watchpoint
|
||||
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
|
||||
@ -105,10 +105,10 @@ Index: gdb-7.10.90.20160211/gdb/target.h
|
||||
|
||||
/* Returns the number of debug registers needed to watch the given
|
||||
memory region, or zero if not supported. */
|
||||
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2016-02-11 20:56:32.472674890 +0100
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2016-07-02 22:59:25.717313919 +0200
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2009, 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -1,10 +1,10 @@
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1020004
|
||||
|
||||
Index: gdb-7.9.50.20150520/gdb/data-directory/Makefile.in
|
||||
Index: gdb-7.11.50.20160630/gdb/data-directory/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/data-directory/Makefile.in 2015-05-31 18:05:43.046746351 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/data-directory/Makefile.in 2015-05-31 18:05:58.483841655 +0200
|
||||
@@ -60,6 +60,8 @@ PYTHON_FILE_LIST = \
|
||||
--- gdb-7.11.50.20160630.orig/gdb/data-directory/Makefile.in 2016-07-03 16:32:13.788164041 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/data-directory/Makefile.in 2016-07-03 16:32:17.868198850 +0200
|
||||
@@ -61,6 +61,8 @@
|
||||
gdb/frames.py \
|
||||
gdb/FrameIterator.py \
|
||||
gdb/FrameDecorator.py \
|
||||
@ -13,18 +13,18 @@ Index: gdb-7.9.50.20150520/gdb/data-directory/Makefile.in
|
||||
gdb/types.py \
|
||||
gdb/printing.py \
|
||||
gdb/unwinder.py \
|
||||
@@ -76,6 +78,7 @@ PYTHON_FILE_LIST = \
|
||||
@@ -77,6 +79,7 @@
|
||||
gdb/command/pretty_printers.py \
|
||||
gdb/command/prompt.py \
|
||||
gdb/command/explore.py \
|
||||
+ gdb/command/backtrace.py \
|
||||
gdb/function/__init__.py \
|
||||
gdb/function/as_string.py \
|
||||
gdb/function/caller_is.py \
|
||||
gdb/function/strfns.py \
|
||||
Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/FrameWrapper.py
|
||||
Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/FrameWrapper.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.9.50.20150520/gdb/python/lib/gdb/FrameWrapper.py 2015-05-31 18:05:58.484841661 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/python/lib/gdb/FrameWrapper.py 2016-07-03 16:32:17.869198859 +0200
|
||||
@@ -0,0 +1,122 @@
|
||||
+# Wrapper API for frames.
|
||||
+
|
||||
@ -148,10 +148,10 @@ Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/FrameWrapper.py
|
||||
+
|
||||
+ def __getattr__ (self, name):
|
||||
+ return getattr (self.frame, name)
|
||||
Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/backtrace.py
|
||||
Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/backtrace.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.9.50.20150520/gdb/python/lib/gdb/backtrace.py 2015-05-31 18:05:58.484841661 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/python/lib/gdb/backtrace.py 2016-07-03 16:32:17.869198859 +0200
|
||||
@@ -0,0 +1,42 @@
|
||||
+# Filtering backtrace.
|
||||
+
|
||||
@ -195,10 +195,10 @@ Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/backtrace.py
|
||||
+ return iter
|
||||
+ return old_frame_filter (iter)
|
||||
+
|
||||
Index: gdb-7.9.50.20150520/gdb/python/lib/gdb/command/backtrace.py
|
||||
Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/command/backtrace.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.9.50.20150520/gdb/python/lib/gdb/command/backtrace.py 2015-05-31 18:05:58.484841661 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/python/lib/gdb/command/backtrace.py 2016-07-03 16:32:17.869198859 +0200
|
||||
@@ -0,0 +1,106 @@
|
||||
+# New backtrace command.
|
||||
+
|
||||
|
@ -1,7 +1,10 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-02/msg00843.html
|
||||
Subject: [PATCH v2 1/6] fortran: allow multi-dimensional subarrays
|
||||
RE: [ping] [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides
|
||||
https://sourceware.org/ml/gdb-patches/2016-07/msg00009.html
|
||||
|
||||
From 993834469f1e64e5461e1e1bef917fd388fe428e Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
Date: Thu, 12 Nov 2015 15:45:52 +0100
|
||||
Subject: [PATCH 1/6] fortran: allow multi-dimensional subarrays
|
||||
|
||||
Add an argument count for subrange expressions in Fortran.
|
||||
Based on the counted value calculate a new array with the
|
||||
@ -36,17 +39,17 @@ new> $3 = ( ( 21, 31, 41) ( 22, 32, 42) ( 23, 33, 43) )
|
||||
|
||||
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
---
|
||||
gdb/eval.c | 309 ++++++++++++++++++++++++++++++++++++++++++++++-------------
|
||||
gdb/eval.c | 314 ++++++++++++++++++++++++++++++++++++++++++++++-------------
|
||||
gdb/f-exp.y | 2 +
|
||||
gdb/valops.c | 157 ++++++++++++++++++++++++------
|
||||
gdb/valops.c | 159 ++++++++++++++++++++++++------
|
||||
gdb/value.h | 2 +
|
||||
4 files changed, 375 insertions(+), 95 deletions(-)
|
||||
4 files changed, 380 insertions(+), 97 deletions(-)
|
||||
|
||||
diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
index 78ad946..c9f325f 100644
|
||||
index de1c663..35815a4 100644
|
||||
--- a/gdb/eval.c
|
||||
+++ b/gdb/eval.c
|
||||
@@ -399,29 +399,253 @@ init_array_element (struct value *array, struct value *element,
|
||||
@@ -399,29 +399,254 @@ init_array_element (struct value *array, struct value *element,
|
||||
return index;
|
||||
}
|
||||
|
||||
@ -66,41 +69,49 @@ index 78ad946..c9f325f 100644
|
||||
- int pc = (*pos) + 1;
|
||||
+ int i, dim_count = 0;
|
||||
LONGEST low_bound, high_bound;
|
||||
struct type *range = check_typedef (TYPE_INDEX_TYPE (value_type (array)));
|
||||
- enum f90_range_type range_type
|
||||
- = (enum f90_range_type) longest_to_int (exp->elts[pc].longconst);
|
||||
- struct type *range = check_typedef (TYPE_INDEX_TYPE (value_type (array)));
|
||||
- enum range_type range_type
|
||||
- = (enum range_type) longest_to_int (exp->elts[pc].longconst);
|
||||
-
|
||||
- *pos += 3;
|
||||
-
|
||||
- if (range_type == LOW_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT)
|
||||
- low_bound = TYPE_LOW_BOUND (range);
|
||||
- else
|
||||
- low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
|
||||
+ struct value *new_array = array;
|
||||
+ struct type *array_type = check_typedef (value_type (new_array));
|
||||
+ struct type *temp_type;
|
||||
+ struct type *elt_type;
|
||||
+
|
||||
+ typedef struct subscript_range
|
||||
+ {
|
||||
+ enum range_type f90_range_type;
|
||||
+ LONGEST low, high;
|
||||
+ } subscript_range;
|
||||
+
|
||||
+ typedef enum subscript_kind
|
||||
+ {
|
||||
+ SUBSCRIPT_RANGE, /* e.g. "(lowbound:highbound)" */
|
||||
+ SUBSCRIPT_INDEX /* e.g. "(literal)" */
|
||||
+ } kind;
|
||||
+
|
||||
+ /* Local struct to hold user data for Fortran subarray dimensions. */
|
||||
+ struct subscript_store
|
||||
+ {
|
||||
+ /* For every dimension, we are either working on a range or an index
|
||||
+ expression, so we store this info separately for later. */
|
||||
+ enum
|
||||
+ {
|
||||
+ SUBSCRIPT_RANGE, /* e.g. "(lowbound:highbound)" */
|
||||
+ SUBSCRIPT_INDEX /* e.g. "(literal)" */
|
||||
+ } kind;
|
||||
+ enum subscript_kind kind;
|
||||
+
|
||||
+ /* We also store either the lower and upper bound info, or the index
|
||||
+ number. Before evaluation of the input values, we do not know if we are
|
||||
+ actually working on a range of ranges, or an index in a range. So as a
|
||||
+ first step we store all input in a union. The array calculation itself
|
||||
+ deals with this later on. */
|
||||
+ union
|
||||
+ union element_range
|
||||
+ {
|
||||
+ struct subscript_range
|
||||
+ {
|
||||
+ enum f90_range_type f90_range_type;
|
||||
+ LONGEST low, high;
|
||||
+ }
|
||||
+ range;
|
||||
+ subscript_range range;
|
||||
+ LONGEST number;
|
||||
+ };
|
||||
+ } U;
|
||||
+ } *subscript_array;
|
||||
+
|
||||
+ /* Check if the number of arguments provided by the user matches
|
||||
@ -109,7 +120,7 @@ index 78ad946..c9f325f 100644
|
||||
+ if (nargs != calc_f77_array_dims (value_type (new_array)))
|
||||
+ error (_("Wrong number of subscripts"));
|
||||
+
|
||||
+ subscript_array = alloca (sizeof (*subscript_array) * nargs);
|
||||
+ subscript_array = (struct subscript_store*) alloca (sizeof (*subscript_array) * nargs);
|
||||
+
|
||||
+ /* Parse the user input into the SUBSCRIPT_ARRAY to store it. We need
|
||||
+ to evaluate it first, as the input is from left-to-right. The
|
||||
@ -122,22 +133,22 @@ index 78ad946..c9f325f 100644
|
||||
+ {
|
||||
+ struct subscript_store *index = &subscript_array[i];
|
||||
|
||||
- if (range_type == LOW_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT)
|
||||
- low_bound = TYPE_LOW_BOUND (range);
|
||||
- if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT)
|
||||
- high_bound = TYPE_HIGH_BOUND (range);
|
||||
- else
|
||||
- low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
|
||||
- high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
|
||||
+ /* The user input is a range, with or without lower and upper bound.
|
||||
+ E.g.: "p arry(2:5)", "p arry( :5)", "p arry( : )", etc. */
|
||||
+ if (exp->elts[*pos].opcode == OP_F90_RANGE)
|
||||
+ if (exp->elts[*pos].opcode == OP_RANGE)
|
||||
+ {
|
||||
+ int pc = (*pos) + 1;
|
||||
+ struct subscript_range *range;
|
||||
+ subscript_range *range;
|
||||
+
|
||||
+ index->kind = SUBSCRIPT_RANGE;
|
||||
+ range = &index->range;
|
||||
+ range = &index->U.range;
|
||||
+
|
||||
+ *pos += 3;
|
||||
+ range->f90_range_type = longest_to_int (exp->elts[pc].longconst);
|
||||
+ range->f90_range_type = (enum range_type) longest_to_int (exp->elts[pc].longconst);
|
||||
+
|
||||
+ /* If a lower bound was provided by the user, the bit has been
|
||||
+ set and we can assign the value from the elt stack. Same for
|
||||
@ -155,17 +166,13 @@ index 78ad946..c9f325f 100644
|
||||
+ else
|
||||
+ {
|
||||
+ struct value *val;
|
||||
|
||||
- if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT)
|
||||
- high_bound = TYPE_HIGH_BOUND (range);
|
||||
- else
|
||||
- high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
|
||||
+
|
||||
+ index->kind = SUBSCRIPT_INDEX;
|
||||
+
|
||||
+ /* Evaluate each subscript; it must be a legal integer in F77. This
|
||||
+ ensures the validity of the provided index. */
|
||||
+ val = evaluate_subexp_with_coercion (exp, pos, noside);
|
||||
+ index->number = value_as_long (val);
|
||||
+ index->U.number = value_as_long (val);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
@ -188,7 +195,7 @@ index 78ad946..c9f325f 100644
|
||||
+ treat any subsequent user entry as a range. We simply
|
||||
+ increment DIM_COUNT which tells us how many times we are
|
||||
+ calling VALUE_SLICE_1. */
|
||||
+ struct subscript_range *range = &index->range;
|
||||
+ subscript_range *range = &index->U.range;
|
||||
+
|
||||
+ /* If no lower bound was provided by the user, we take the
|
||||
+ default boundary. Same for the high bound. */
|
||||
@ -232,19 +239,19 @@ index 78ad946..c9f325f 100644
|
||||
+ to get the value offset right. */
|
||||
+ if (dim_count == 0)
|
||||
+ new_array
|
||||
+ = value_subscripted_rvalue (new_array, index->number,
|
||||
+ = value_subscripted_rvalue (new_array, index->U.number,
|
||||
+ f77_get_lowerbound (value_type
|
||||
+ (new_array)));
|
||||
+ else
|
||||
+ {
|
||||
+ /* Check for valid index input. */
|
||||
+ if (index->number < TYPE_LOW_BOUND (index_type)
|
||||
+ || index->number > TYPE_HIGH_BOUND (index_type))
|
||||
+ if (index->U.number < TYPE_LOW_BOUND (index_type)
|
||||
+ || index->U.number > TYPE_HIGH_BOUND (index_type))
|
||||
+ error (_("error no such vector element"));
|
||||
+
|
||||
+ dim_count++;
|
||||
+ new_array = value_slice_1 (new_array,
|
||||
+ longest_to_int (index->number),
|
||||
+ longest_to_int (index->U.number),
|
||||
+ 1, /* length is '1' element */
|
||||
+ dim_count);
|
||||
+ }
|
||||
@ -270,10 +277,10 @@ index 78ad946..c9f325f 100644
|
||||
+ if (dim_count > 1)
|
||||
+ {
|
||||
+ struct value *v = NULL;
|
||||
+
|
||||
+ elt_type = TYPE_TARGET_TYPE (value_type (new_array));
|
||||
|
||||
- return value_slice (array, low_bound, high_bound - low_bound + 1);
|
||||
+ temp_type = TYPE_TARGET_TYPE (value_type (new_array));
|
||||
+
|
||||
+ /* Every SUBSCRIPT_RANGE in the user input signifies an actual range in
|
||||
+ the output array. So we traverse the SUBSCRIPT_ARRAY again, looking
|
||||
+ for a range entry. When we find one, we use the range info to create
|
||||
@ -289,26 +296,25 @@ index 78ad946..c9f325f 100644
|
||||
+
|
||||
+ range_type
|
||||
+ = create_static_range_type (NULL,
|
||||
+ temp_type,
|
||||
+ 1,
|
||||
+ index->range.high - index->range.low + 1);
|
||||
+ elt_type,
|
||||
+ 1,
|
||||
+ index->U.range.high
|
||||
+ - index->U.range.low + 1);
|
||||
+
|
||||
+ interim_array_type = create_array_type (NULL,
|
||||
+ temp_type,
|
||||
+ elt_type,
|
||||
+ range_type);
|
||||
+
|
||||
+ /* For some reason the type code of the contents is missing, so
|
||||
+ reset it from the original array. */
|
||||
+ TYPE_CODE (interim_array_type)
|
||||
+ = TYPE_CODE (value_type (new_array));
|
||||
+
|
||||
+ v = allocate_value (interim_array_type);
|
||||
+
|
||||
+ temp_type = value_type (v);
|
||||
+ elt_type = value_type (v);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ value_contents_copy (v, 0, new_array, 0, TYPE_LENGTH (temp_type));
|
||||
+ value_contents_copy (v, 0, new_array, 0, TYPE_LENGTH (elt_type));
|
||||
+ return v;
|
||||
+ }
|
||||
+
|
||||
@ -316,24 +322,24 @@ index 78ad946..c9f325f 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -1810,14 +2034,11 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -1810,14 +2035,11 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
switch (code)
|
||||
{
|
||||
case TYPE_CODE_ARRAY:
|
||||
- if (exp->elts[*pos].opcode == OP_F90_RANGE)
|
||||
- if (exp->elts[*pos].opcode == OP_RANGE)
|
||||
- return value_f90_subarray (arg1, exp, pos, noside);
|
||||
- else
|
||||
- goto multi_f77_subscript;
|
||||
+ return value_f90_subarray (arg1, exp, pos, nargs, noside);
|
||||
|
||||
case TYPE_CODE_STRING:
|
||||
if (exp->elts[*pos].opcode == OP_F90_RANGE)
|
||||
if (exp->elts[*pos].opcode == OP_RANGE)
|
||||
- return value_f90_subarray (arg1, exp, pos, noside);
|
||||
+ return value_f90_subarray (arg1, exp, pos, 1, noside);
|
||||
else
|
||||
{
|
||||
arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
|
||||
@@ -2222,49 +2443,6 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -2222,49 +2444,6 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
}
|
||||
return (arg1);
|
||||
|
||||
@ -383,7 +389,7 @@ index 78ad946..c9f325f 100644
|
||||
case BINOP_LOGICAL_AND:
|
||||
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||
if (noside == EVAL_SKIP)
|
||||
@@ -3121,6 +3299,9 @@ calc_f77_array_dims (struct type *array_type)
|
||||
@@ -3122,6 +3301,9 @@ calc_f77_array_dims (struct type *array_type)
|
||||
int ndimen = 1;
|
||||
struct type *tmp_type;
|
||||
|
||||
@ -394,10 +400,10 @@ index 78ad946..c9f325f 100644
|
||||
error (_("Can't get dimensions for a non-array type"));
|
||||
|
||||
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
|
||||
index 4faac32..9343abb 100644
|
||||
index e3148a3..dc131c1 100644
|
||||
--- a/gdb/f-exp.y
|
||||
+++ b/gdb/f-exp.y
|
||||
@@ -308,6 +308,8 @@ arglist : subrange
|
||||
@@ -253,6 +253,8 @@ arglist : subrange
|
||||
|
||||
arglist : arglist ',' exp %prec ABOVE_COMMA
|
||||
{ arglist_len++; }
|
||||
@ -407,10 +413,10 @@ index 4faac32..9343abb 100644
|
||||
|
||||
/* There are four sorts of subrange types in F90. */
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
index 5a244a9..09ea877 100644
|
||||
index 71fb1b3..817a4cf 100644
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -3759,56 +3759,151 @@ value_of_this_silent (const struct language_defn *lang)
|
||||
@@ -3766,56 +3766,153 @@ value_of_this_silent (const struct language_defn *lang)
|
||||
struct value *
|
||||
value_slice (struct value *array, int lowbound, int length)
|
||||
{
|
||||
@ -420,7 +426,9 @@ index 5a244a9..09ea877 100644
|
||||
+ return value_slice_1 (array, lowbound, length, 1);
|
||||
+}
|
||||
+
|
||||
+/* CALL_COUNT is used to determine if we are calling the function once, e.g.
|
||||
+/* VALUE_SLICE_1 is called for each array dimension to calculate the number
|
||||
+ of elements as defined by the subscript expression.
|
||||
+ CALL_COUNT is used to determine if we are calling the function once, e.g.
|
||||
+ we are working on the current dimension of ARRAY, or if we are calling
|
||||
+ the function repeatedly. In the later case we need to take elements
|
||||
+ from the TARGET_TYPE of ARRAY.
|
||||
@ -515,7 +523,7 @@ index 5a244a9..09ea877 100644
|
||||
+ done with it. */
|
||||
|
||||
+ slice_range_type = create_static_range_type (NULL, TYPE_TARGET_TYPE (range_type),
|
||||
+ ary_low_bound, slice_range_size);
|
||||
+ ary_low_bound, slice_range_size);
|
||||
{
|
||||
- struct type *element_type = TYPE_TARGET_TYPE (array_type);
|
||||
- LONGEST offset
|
||||
@ -594,7 +602,7 @@ index 5a244a9..09ea877 100644
|
||||
|
||||
/* Create a value for a FORTRAN complex number. Currently most of the
|
||||
diff --git a/gdb/value.h b/gdb/value.h
|
||||
index 2eac5ef..3400460 100644
|
||||
index f8ec854..95588af 100644
|
||||
--- a/gdb/value.h
|
||||
+++ b/gdb/value.h
|
||||
@@ -1056,6 +1056,8 @@ extern struct value *varying_to_slice (struct value *);
|
||||
@ -607,5 +615,5 @@ index 2eac5ef..3400460 100644
|
||||
struct type *);
|
||||
|
||||
--
|
||||
2.5.0
|
||||
2.5.5
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-02/msg00841.html
|
||||
Subject: [PATCH v2 2/6] fortran: combine subarray and string computation
|
||||
RE: [ping] [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides
|
||||
https://sourceware.org/ml/gdb-patches/2016-07/msg00009.html
|
||||
|
||||
From 733b3b60be5c8d23fa7e47498d35e4701528f3ae Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
Date: Fri, 13 Nov 2015 09:00:33 +0100
|
||||
Subject: [PATCH 2/6] fortran: combine subarray and string computation
|
||||
|
||||
Strings only have one dimension, but the element computation is
|
||||
identical to the subarray computation for ranges and indices.
|
||||
Strings types are handled like array types with only one dimension.
|
||||
Therefore the same algorithm to calculate subsets is used.
|
||||
|
||||
2013-11-26 Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
|
||||
@ -19,27 +22,27 @@ Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
1 file changed, 1 insertion(+), 9 deletions(-)
|
||||
|
||||
diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
index c9f325f..164d7ab 100644
|
||||
index 35815a4..5c20fee 100644
|
||||
--- a/gdb/eval.c
|
||||
+++ b/gdb/eval.c
|
||||
@@ -2034,16 +2034,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -2035,16 +2035,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
switch (code)
|
||||
{
|
||||
case TYPE_CODE_ARRAY:
|
||||
- return value_f90_subarray (arg1, exp, pos, nargs, noside);
|
||||
-
|
||||
case TYPE_CODE_STRING:
|
||||
- if (exp->elts[*pos].opcode == OP_F90_RANGE)
|
||||
- if (exp->elts[*pos].opcode == OP_RANGE)
|
||||
- return value_f90_subarray (arg1, exp, pos, 1, noside);
|
||||
- else
|
||||
- {
|
||||
- arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
|
||||
- return value_subscript (arg1, value_as_long (arg2));
|
||||
- }
|
||||
+ return value_f90_subarray (arg1, exp, pos, nargs, noside);
|
||||
+ return value_f90_subarray (arg1, exp, pos, nargs, noside);
|
||||
|
||||
case TYPE_CODE_PTR:
|
||||
case TYPE_CODE_FUNC:
|
||||
--
|
||||
2.5.0
|
||||
2.5.5
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-02/msg00845.html
|
||||
Subject: [PATCH v2 3/6] fortran: change subrange enum to bit field
|
||||
RE: [ping] [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides
|
||||
https://sourceware.org/ml/gdb-patches/2016-07/msg00009.html
|
||||
|
||||
From 058ed9e55db72244fe1c5346a11fa67eff61d318 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
Date: Mon, 23 Nov 2015 10:31:44 +0100
|
||||
Subject: [PATCH 3/6] fortran: change subrange enum to bit field
|
||||
|
||||
Change Fortran subrange enum for subrange expressions to
|
||||
represent a bitfield for easier manipulation. Consequently
|
||||
@ -12,31 +15,41 @@ behaviour of GDB is unchanged.
|
||||
|
||||
* eval.c (value_f90_subarray): Change evaluation of the
|
||||
subarray boundaries. Set boundaries to be either user
|
||||
provided (bit in f90_range_type was set) or take the
|
||||
default value if the boundary was not provided by the user.
|
||||
provided (bit in range_type was set), or take the default
|
||||
value if the boundary was not provided by the user.
|
||||
* expprint.c (print_subexp_standard): Alter boundary com-
|
||||
putations to use updated range_type enum.
|
||||
* expprint.h (dump_subexp_body_standard): Dito.
|
||||
* expression.h (range_type): Change the enum to use bit
|
||||
values for each boundary, if set by the user.
|
||||
* f-exp.y (subrange): Change rules for subrange expressions
|
||||
to write the relevant bit sequence onto the elt stack.
|
||||
* f-lang.h (f90_range_type): Change the enum to use bit
|
||||
values for each boundary, if set by the user.
|
||||
* parse.c (operator_length_standard): In case of
|
||||
OP_F90_RANGE change the calculation of the number of
|
||||
arguments on the elt stack, depending on the number of
|
||||
boundaries provided by the user.
|
||||
* parse.c (operator_length_standard): In case of OP_RANGE
|
||||
change the calculation of the number of arguments on the
|
||||
elt stack, depending on the number of boundaries provided
|
||||
by the user.
|
||||
* rust-exp.y (convert_ast_to_expression): Modify calcula-
|
||||
tion of subscript elements to use altered range_type.
|
||||
* rust-lang.c (rust_range): Dito.
|
||||
* rust-lang.c (rust_subscript): Dito.
|
||||
|
||||
|
||||
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
---
|
||||
gdb/eval.c | 14 ++++++--------
|
||||
gdb/f-exp.y | 11 ++++++-----
|
||||
gdb/f-lang.h | 6 ++----
|
||||
gdb/parse.c | 21 ++++++++-------------
|
||||
4 files changed, 22 insertions(+), 30 deletions(-)
|
||||
gdb/eval.c | 14 ++++++--------
|
||||
gdb/expprint.c | 20 ++++++++------------
|
||||
gdb/expression.h | 15 ++++++---------
|
||||
gdb/f-exp.y | 11 ++++++-----
|
||||
gdb/parse.c | 21 ++++++++-------------
|
||||
gdb/rust-exp.y | 12 +++---------
|
||||
gdb/rust-lang.c | 17 ++++++++---------
|
||||
7 files changed, 45 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
index 164d7ab..9b8b051 100644
|
||||
index 5c20fee..44e8600 100644
|
||||
--- a/gdb/eval.c
|
||||
+++ b/gdb/eval.c
|
||||
@@ -480,12 +480,12 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
@@ -482,12 +482,12 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
/* If a lower bound was provided by the user, the bit has been
|
||||
set and we can assign the value from the elt stack. Same for
|
||||
upper bound. */
|
||||
@ -53,7 +66,7 @@ index 164d7ab..9b8b051 100644
|
||||
range->high = value_as_long (evaluate_subexp (NULL_TYPE, exp,
|
||||
pos, noside));
|
||||
}
|
||||
@@ -526,12 +526,10 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
@@ -528,12 +528,10 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
|
||||
/* If no lower bound was provided by the user, we take the
|
||||
default boundary. Same for the high bound. */
|
||||
@ -68,70 +81,135 @@ index 164d7ab..9b8b051 100644
|
||||
range->high = TYPE_HIGH_BOUND (index_type);
|
||||
|
||||
/* Both user provided low and high bound have to be inside the
|
||||
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
|
||||
index 9343abb..b1206de 100644
|
||||
--- a/gdb/f-exp.y
|
||||
+++ b/gdb/f-exp.y
|
||||
@@ -315,26 +315,27 @@ arglist : arglist ',' exp %prec ABOVE_COMMA
|
||||
/* There are four sorts of subrange types in F90. */
|
||||
diff --git a/gdb/expprint.c b/gdb/expprint.c
|
||||
index c37ecb0..214d58e 100644
|
||||
--- a/gdb/expprint.c
|
||||
+++ b/gdb/expprint.c
|
||||
@@ -568,12 +568,10 @@ print_subexp_standard (struct expression *exp, int *pos,
|
||||
*pos += 2;
|
||||
|
||||
subrange: exp ':' exp %prec ABOVE_COMMA
|
||||
- { write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
- write_exp_elt_longcst (pstate, NONE_BOUND_DEFAULT);
|
||||
+ { write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
+ write_exp_elt_longcst (pstate,
|
||||
+ SUBARRAY_LOW_BOUND | SUBARRAY_HIGH_BOUND);
|
||||
write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
;
|
||||
fputs_filtered ("RANGE(", stream);
|
||||
- if (range_type == HIGH_BOUND_DEFAULT
|
||||
- || range_type == NONE_BOUND_DEFAULT)
|
||||
+ if ((range_type & SUBARRAY_LOW_BOUND) == SUBARRAY_LOW_BOUND)
|
||||
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
|
||||
fputs_filtered ("..", stream);
|
||||
- if (range_type == LOW_BOUND_DEFAULT
|
||||
- || range_type == NONE_BOUND_DEFAULT)
|
||||
+ if ((range_type & SUBARRAY_HIGH_BOUND) == SUBARRAY_HIGH_BOUND)
|
||||
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
|
||||
fputs_filtered (")", stream);
|
||||
return;
|
||||
@@ -1055,16 +1053,16 @@ dump_subexp_body_standard (struct expression *exp,
|
||||
|
||||
subrange: exp ':' %prec ABOVE_COMMA
|
||||
{ write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
- write_exp_elt_longcst (pstate, HIGH_BOUND_DEFAULT);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND);
|
||||
write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
;
|
||||
switch (range_type)
|
||||
{
|
||||
- case BOTH_BOUND_DEFAULT:
|
||||
+ case SUBARRAY_NONE_BOUND:
|
||||
fputs_filtered ("Range '..'", stream);
|
||||
break;
|
||||
- case LOW_BOUND_DEFAULT:
|
||||
+ case SUBARRAY_HIGH_BOUND:
|
||||
fputs_filtered ("Range '..EXP'", stream);
|
||||
break;
|
||||
- case HIGH_BOUND_DEFAULT:
|
||||
+ case SUBARRAY_LOW_BOUND:
|
||||
fputs_filtered ("Range 'EXP..'", stream);
|
||||
break;
|
||||
- case NONE_BOUND_DEFAULT:
|
||||
+ case (SUBARRAY_LOW_BOUND | SUBARRAY_HIGH_BOUND):
|
||||
fputs_filtered ("Range 'EXP..EXP'", stream);
|
||||
break;
|
||||
default:
|
||||
@@ -1072,11 +1070,9 @@ dump_subexp_body_standard (struct expression *exp,
|
||||
break;
|
||||
}
|
||||
|
||||
subrange: ':' exp %prec ABOVE_COMMA
|
||||
{ write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
- write_exp_elt_longcst (pstate, LOW_BOUND_DEFAULT);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_HIGH_BOUND);
|
||||
write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
;
|
||||
- if (range_type == HIGH_BOUND_DEFAULT
|
||||
- || range_type == NONE_BOUND_DEFAULT)
|
||||
+ if ((range_type & SUBARRAY_LOW_BOUND) == SUBARRAY_LOW_BOUND)
|
||||
elt = dump_subexp (exp, stream, elt);
|
||||
- if (range_type == LOW_BOUND_DEFAULT
|
||||
- || range_type == NONE_BOUND_DEFAULT)
|
||||
+ if ((range_type & SUBARRAY_HIGH_BOUND) == SUBARRAY_HIGH_BOUND)
|
||||
elt = dump_subexp (exp, stream, elt);
|
||||
}
|
||||
break;
|
||||
diff --git a/gdb/expression.h b/gdb/expression.h
|
||||
index 4952d84..5a6b720 100644
|
||||
--- a/gdb/expression.h
|
||||
+++ b/gdb/expression.h
|
||||
@@ -152,17 +152,14 @@ extern void dump_raw_expression (struct expression *,
|
||||
struct ui_file *, char *);
|
||||
extern void dump_prefix_expression (struct expression *, struct ui_file *);
|
||||
|
||||
subrange: ':' %prec ABOVE_COMMA
|
||||
{ write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
- write_exp_elt_longcst (pstate, BOTH_BOUND_DEFAULT);
|
||||
+ write_exp_elt_longcst (pstate, 0);
|
||||
write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
;
|
||||
|
||||
diff --git a/gdb/f-lang.h b/gdb/f-lang.h
|
||||
index eeca107..4d56bf7 100644
|
||||
--- a/gdb/f-lang.h
|
||||
+++ b/gdb/f-lang.h
|
||||
@@ -44,10 +44,8 @@ extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
|
||||
|
||||
enum f90_range_type
|
||||
-/* In an OP_RANGE expression, either bound could be empty, indicating
|
||||
- that its value is by default that of the corresponding bound of the
|
||||
- array or string. So we have four sorts of subrange. This
|
||||
- enumeration type is to identify this. */
|
||||
-
|
||||
+/* In an OP_RANGE expression, either bound can be provided by the user, or not.
|
||||
+ This enumeration type is to identify this. */
|
||||
+
|
||||
enum range_type
|
||||
{
|
||||
- BOTH_BOUND_DEFAULT, /* "(:)" */
|
||||
- LOW_BOUND_DEFAULT, /* "(:high)" */
|
||||
- HIGH_BOUND_DEFAULT, /* "(low:)" */
|
||||
- NONE_BOUND_DEFAULT /* "(low:high)" */
|
||||
+ SUBARRAY_NONE_BOUND = 0x0, /* "( : )" */
|
||||
+ SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */
|
||||
+ SUBARRAY_HIGH_BOUND = 0x2 /* "(:high)" */
|
||||
};
|
||||
|
||||
/* A common block. */
|
||||
#endif /* !defined (EXPRESSION_H) */
|
||||
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
|
||||
index dc131c1..e2c54b6 100644
|
||||
--- a/gdb/f-exp.y
|
||||
+++ b/gdb/f-exp.y
|
||||
@@ -260,26 +260,27 @@ arglist : arglist ',' exp %prec ABOVE_COMMA
|
||||
/* There are four sorts of subrange types in F90. */
|
||||
|
||||
subrange: exp ':' exp %prec ABOVE_COMMA
|
||||
- { write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
- write_exp_elt_longcst (pstate, NONE_BOUND_DEFAULT);
|
||||
+ { write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
+ write_exp_elt_longcst (pstate,
|
||||
+ SUBARRAY_LOW_BOUND | SUBARRAY_HIGH_BOUND);
|
||||
write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
;
|
||||
|
||||
subrange: exp ':' %prec ABOVE_COMMA
|
||||
{ write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
- write_exp_elt_longcst (pstate, HIGH_BOUND_DEFAULT);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND);
|
||||
write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
;
|
||||
|
||||
subrange: ':' exp %prec ABOVE_COMMA
|
||||
{ write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
- write_exp_elt_longcst (pstate, LOW_BOUND_DEFAULT);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_HIGH_BOUND);
|
||||
write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
;
|
||||
|
||||
subrange: ':' %prec ABOVE_COMMA
|
||||
{ write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
- write_exp_elt_longcst (pstate, BOTH_BOUND_DEFAULT);
|
||||
+ write_exp_elt_longcst (pstate, 0);
|
||||
write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
;
|
||||
|
||||
diff --git a/gdb/parse.c b/gdb/parse.c
|
||||
index 4191fc6..d500279 100644
|
||||
index 2b00708..6d54a77 100644
|
||||
--- a/gdb/parse.c
|
||||
+++ b/gdb/parse.c
|
||||
@@ -1006,22 +1006,17 @@ operator_length_standard (const struct expression *expr, int endpos,
|
||||
|
||||
case OP_F90_RANGE:
|
||||
case OP_RANGE:
|
||||
oplen = 3;
|
||||
+ args = 0;
|
||||
range_type = (enum f90_range_type)
|
||||
range_type = (enum range_type)
|
||||
longest_to_int (expr->elts[endpos - 2].longconst);
|
||||
|
||||
- switch (range_type)
|
||||
@ -157,6 +235,107 @@ index 4191fc6..d500279 100644
|
||||
|
||||
break;
|
||||
|
||||
diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y
|
||||
index c1a863c..760929b5 100644
|
||||
--- a/gdb/rust-exp.y
|
||||
+++ b/gdb/rust-exp.y
|
||||
@@ -2418,23 +2418,17 @@ convert_ast_to_expression (struct parser_state *state,
|
||||
|
||||
case OP_RANGE:
|
||||
{
|
||||
- enum range_type kind = BOTH_BOUND_DEFAULT;
|
||||
+ enum range_type kind = SUBARRAY_NONE_BOUND;
|
||||
|
||||
if (operation->left.op != NULL)
|
||||
{
|
||||
convert_ast_to_expression (state, operation->left.op, top);
|
||||
- kind = HIGH_BOUND_DEFAULT;
|
||||
+ kind = SUBARRAY_LOW_BOUND;
|
||||
}
|
||||
if (operation->right.op != NULL)
|
||||
{
|
||||
convert_ast_to_expression (state, operation->right.op, top);
|
||||
- if (kind == BOTH_BOUND_DEFAULT)
|
||||
- kind = LOW_BOUND_DEFAULT;
|
||||
- else
|
||||
- {
|
||||
- gdb_assert (kind == HIGH_BOUND_DEFAULT);
|
||||
- kind = NONE_BOUND_DEFAULT;
|
||||
- }
|
||||
+ kind = (range_type) (kind | SUBARRAY_HIGH_BOUND);
|
||||
}
|
||||
write_exp_elt_opcode (state, OP_RANGE);
|
||||
write_exp_elt_longcst (state, kind);
|
||||
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
|
||||
index 5df99ce..8d53e31 100644
|
||||
--- a/gdb/rust-lang.c
|
||||
+++ b/gdb/rust-lang.c
|
||||
@@ -1188,9 +1188,9 @@ rust_range (struct expression *exp, int *pos, enum noside noside)
|
||||
kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst);
|
||||
*pos += 3;
|
||||
|
||||
- if (kind == HIGH_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT)
|
||||
+ if ((kind & SUBARRAY_LOW_BOUND) == SUBARRAY_LOW_BOUND)
|
||||
low = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||
- if (kind == LOW_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT)
|
||||
+ if ((kind & SUBARRAY_HIGH_BOUND) == SUBARRAY_HIGH_BOUND)
|
||||
high = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||
|
||||
if (noside == EVAL_SKIP)
|
||||
@@ -1279,7 +1279,7 @@ rust_compute_range (struct type *type, struct value *range,
|
||||
|
||||
*low = 0;
|
||||
*high = 0;
|
||||
- *kind = BOTH_BOUND_DEFAULT;
|
||||
+ *kind = SUBARRAY_NONE_BOUND;
|
||||
|
||||
if (TYPE_NFIELDS (type) == 0)
|
||||
return;
|
||||
@@ -1287,15 +1287,14 @@ rust_compute_range (struct type *type, struct value *range,
|
||||
i = 0;
|
||||
if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0)
|
||||
{
|
||||
- *kind = HIGH_BOUND_DEFAULT;
|
||||
+ *kind = SUBARRAY_LOW_BOUND;
|
||||
*low = value_as_long (value_field (range, 0));
|
||||
++i;
|
||||
}
|
||||
if (TYPE_NFIELDS (type) > i
|
||||
&& strcmp (TYPE_FIELD_NAME (type, i), "end") == 0)
|
||||
{
|
||||
- *kind = (*kind == BOTH_BOUND_DEFAULT
|
||||
- ? LOW_BOUND_DEFAULT : NONE_BOUND_DEFAULT);
|
||||
+ *kind = (range_type) (*kind | SUBARRAY_HIGH_BOUND);
|
||||
*high = value_as_long (value_field (range, i));
|
||||
}
|
||||
}
|
||||
@@ -1310,7 +1309,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
struct type *rhstype;
|
||||
LONGEST low, high_bound;
|
||||
/* Initialized to appease the compiler. */
|
||||
- enum range_type kind = BOTH_BOUND_DEFAULT;
|
||||
+ enum range_type kind = SUBARRAY_NONE_BOUND;
|
||||
LONGEST high = 0;
|
||||
int want_slice = 0;
|
||||
|
||||
@@ -1366,7 +1365,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
error (_("Cannot subscript non-array type"));
|
||||
|
||||
if (want_slice
|
||||
- && (kind == BOTH_BOUND_DEFAULT || kind == LOW_BOUND_DEFAULT))
|
||||
+ && ((kind & SUBARRAY_LOW_BOUND) != SUBARRAY_LOW_BOUND))
|
||||
low = low_bound;
|
||||
if (low < 0)
|
||||
error (_("Index less than zero"));
|
||||
@@ -1384,7 +1383,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
CORE_ADDR addr;
|
||||
struct value *addrval, *tem;
|
||||
|
||||
- if (kind == BOTH_BOUND_DEFAULT || kind == HIGH_BOUND_DEFAULT)
|
||||
+ if ((kind & SUBARRAY_HIGH_BOUND) != SUBARRAY_HIGH_BOUND)
|
||||
high = high_bound;
|
||||
if (high < 0)
|
||||
error (_("High index less than zero"));
|
||||
--
|
||||
2.5.0
|
||||
2.5.5
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-02/msg00842.html
|
||||
Subject: [PATCH v2 4/6] fortran: enable parsing of stride parameter for subranges
|
||||
RE: [ping] [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides
|
||||
https://sourceware.org/ml/gdb-patches/2016-07/msg00009.html
|
||||
|
||||
From 338e4c860ad205896b4a95c79f54470c79eeb348 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
Date: Wed, 1 Jun 2016 15:11:24 +0200
|
||||
Subject: [PATCH 4/6] fortran: enable parsing of stride parameter for subranges
|
||||
|
||||
Allow the user to provide a stride parameter for Fortran
|
||||
subarrays. The stride parameter can be any integer except
|
||||
@ -11,10 +14,10 @@ subarrays. The stride parameter can be any integer except
|
||||
|
||||
* eval.c (value_f90_subarray): Add expression evaluation
|
||||
for a stride parameter in a Fortran range expression.
|
||||
* expression.h (range_type): Add field to enum to show when
|
||||
a stride value was provided by the user.
|
||||
* f-exp.y: Add yacc rules for writing info on the elt stack
|
||||
when the user provided a stride argument.
|
||||
* f-lang.h (F90_RANGE): Add field to enum to show when a
|
||||
stride was provided by the user.
|
||||
* parse.c (operator_length_standard): Check if a stride
|
||||
value was provided, and increment argument counter
|
||||
accordingly.
|
||||
@ -22,26 +25,27 @@ subarrays. The stride parameter can be any integer except
|
||||
|
||||
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
---
|
||||
gdb/eval.c | 10 +++++++++-
|
||||
gdb/f-exp.y | 33 +++++++++++++++++++++++++++++++--
|
||||
gdb/f-lang.h | 5 +++--
|
||||
gdb/parse.c | 3 +++
|
||||
4 files changed, 46 insertions(+), 5 deletions(-)
|
||||
gdb/eval.c | 11 ++++++++++-
|
||||
gdb/expression.h | 7 +++++--
|
||||
gdb/f-exp.y | 31 ++++++++++++++++++++++++++++++-
|
||||
gdb/parse.c | 3 +++
|
||||
gdb/valops.c | 4 ++--
|
||||
5 files changed, 50 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
index 9b8b051..308ada3 100644
|
||||
index 44e8600..b5aaf1c 100644
|
||||
--- a/gdb/eval.c
|
||||
+++ b/gdb/eval.c
|
||||
@@ -438,7 +438,7 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
struct subscript_range
|
||||
{
|
||||
enum f90_range_type f90_range_type;
|
||||
- LONGEST low, high;
|
||||
+ LONGEST low, high, stride;
|
||||
}
|
||||
range;
|
||||
LONGEST number;
|
||||
@@ -488,6 +488,14 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
@@ -419,7 +419,7 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
typedef struct subscript_range
|
||||
{
|
||||
enum range_type f90_range_type;
|
||||
- LONGEST low, high;
|
||||
+ LONGEST low, high, stride;
|
||||
} subscript_range;
|
||||
|
||||
typedef enum subscript_kind
|
||||
@@ -490,6 +490,15 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
== SUBARRAY_HIGH_BOUND)
|
||||
range->high = value_as_long (evaluate_subexp (NULL_TYPE, exp,
|
||||
pos, noside));
|
||||
@ -49,82 +53,81 @@ index 9b8b051..308ada3 100644
|
||||
+ /* Assign the user's stride value if provided. */
|
||||
+ if ((range->f90_range_type & SUBARRAY_STRIDE) == SUBARRAY_STRIDE)
|
||||
+ range->stride = value_as_long (evaluate_subexp (NULL_TYPE, exp,
|
||||
+ pos, noside));
|
||||
+ pos, noside));
|
||||
+
|
||||
+ /* Assign the default stride value '1'. */
|
||||
+ else
|
||||
+ range->stride = 1;
|
||||
}
|
||||
/* User input is an index. E.g.: "p arry(5)". */
|
||||
else
|
||||
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
|
||||
index b1206de..5151fee 100644
|
||||
--- a/gdb/f-exp.y
|
||||
+++ b/gdb/f-exp.y
|
||||
@@ -316,8 +316,8 @@ arglist : arglist ',' exp %prec ABOVE_COMMA
|
||||
diff --git a/gdb/expression.h b/gdb/expression.h
|
||||
index 5a6b720..34ca54b 100644
|
||||
--- a/gdb/expression.h
|
||||
+++ b/gdb/expression.h
|
||||
@@ -153,13 +153,16 @@ extern void dump_raw_expression (struct expression *,
|
||||
extern void dump_prefix_expression (struct expression *, struct ui_file *);
|
||||
|
||||
subrange: exp ':' exp %prec ABOVE_COMMA
|
||||
{ write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
- write_exp_elt_longcst (pstate,
|
||||
- SUBARRAY_LOW_BOUND | SUBARRAY_HIGH_BOUND);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND
|
||||
+ | SUBARRAY_HIGH_BOUND);
|
||||
write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
;
|
||||
/* In an OP_RANGE expression, either bound can be provided by the user, or not.
|
||||
- This enumeration type is to identify this. */
|
||||
+ In addition to this, the user can also specify a stride value to indicated
|
||||
+ only certain elements of the array. This enumeration type is to identify
|
||||
+ this. */
|
||||
|
||||
@@ -339,6 +339,35 @@ subrange: ':' %prec ABOVE_COMMA
|
||||
write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
;
|
||||
|
||||
+/* Each subrange type can have a stride argument. */
|
||||
+subrange: exp ':' exp ':' exp %prec ABOVE_COMMA
|
||||
+ { write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND
|
||||
+ | SUBARRAY_HIGH_BOUND
|
||||
+ | SUBARRAY_STRIDE);
|
||||
+ write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
+ ;
|
||||
+
|
||||
+subrange: exp ':' ':' exp %prec ABOVE_COMMA
|
||||
+ { write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND
|
||||
+ | SUBARRAY_STRIDE);
|
||||
+ write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
+ ;
|
||||
+
|
||||
+subrange: ':' exp ':' exp %prec ABOVE_COMMA
|
||||
+ { write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_HIGH_BOUND
|
||||
+ | SUBARRAY_STRIDE);
|
||||
+ write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
+ ;
|
||||
+
|
||||
+subrange: ':' ':' exp %prec ABOVE_COMMA
|
||||
+ { write_exp_elt_opcode (pstate, OP_F90_RANGE);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_STRIDE);
|
||||
+ write_exp_elt_opcode (pstate, OP_F90_RANGE); }
|
||||
+ ;
|
||||
+
|
||||
complexnum: exp ',' exp
|
||||
{ }
|
||||
;
|
||||
diff --git a/gdb/f-lang.h b/gdb/f-lang.h
|
||||
index 4d56bf7..0ad57af 100644
|
||||
--- a/gdb/f-lang.h
|
||||
+++ b/gdb/f-lang.h
|
||||
@@ -44,8 +44,9 @@ extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
|
||||
|
||||
enum f90_range_type
|
||||
enum range_type
|
||||
{
|
||||
- SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */
|
||||
SUBARRAY_NONE_BOUND = 0x0, /* "( : )" */
|
||||
SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */
|
||||
- SUBARRAY_HIGH_BOUND = 0x2 /* "(:high)" */
|
||||
+ SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" or "(low::)" */
|
||||
+ SUBARRAY_HIGH_BOUND = 0x2, /* "(:high)" or "(:high:)" */
|
||||
+ SUBARRAY_HIGH_BOUND = 0x2, /* "(:high)" */
|
||||
+ SUBARRAY_STRIDE = 0x4 /* "(::stride)" */
|
||||
};
|
||||
|
||||
/* A common block. */
|
||||
#endif /* !defined (EXPRESSION_H) */
|
||||
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
|
||||
index e2c54b6..71f1823 100644
|
||||
--- a/gdb/f-exp.y
|
||||
+++ b/gdb/f-exp.y
|
||||
@@ -280,7 +280,36 @@ subrange: ':' exp %prec ABOVE_COMMA
|
||||
|
||||
subrange: ':' %prec ABOVE_COMMA
|
||||
{ write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
- write_exp_elt_longcst (pstate, 0);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_NONE_BOUND);
|
||||
+ write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
+ ;
|
||||
+
|
||||
+/* Each subrange type can have a stride argument. */
|
||||
+subrange: exp ':' exp ':' exp %prec ABOVE_COMMA
|
||||
+ { write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND
|
||||
+ | SUBARRAY_HIGH_BOUND
|
||||
+ | SUBARRAY_STRIDE);
|
||||
+ write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
+ ;
|
||||
+
|
||||
+subrange: exp ':' ':' exp %prec ABOVE_COMMA
|
||||
+ { write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND
|
||||
+ | SUBARRAY_STRIDE);
|
||||
+ write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
+ ;
|
||||
+
|
||||
+subrange: ':' exp ':' exp %prec ABOVE_COMMA
|
||||
+ { write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_HIGH_BOUND
|
||||
+ | SUBARRAY_STRIDE);
|
||||
+ write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
+ ;
|
||||
+
|
||||
+subrange: ':' ':' exp %prec ABOVE_COMMA
|
||||
+ { write_exp_elt_opcode (pstate, OP_RANGE);
|
||||
+ write_exp_elt_longcst (pstate, SUBARRAY_STRIDE);
|
||||
write_exp_elt_opcode (pstate, OP_RANGE); }
|
||||
;
|
||||
|
||||
diff --git a/gdb/parse.c b/gdb/parse.c
|
||||
index d500279..07248c3 100644
|
||||
index 6d54a77..992af87 100644
|
||||
--- a/gdb/parse.c
|
||||
+++ b/gdb/parse.c
|
||||
@@ -1018,6 +1018,9 @@ operator_length_standard (const struct expression *expr, int endpos,
|
||||
@ -137,6 +140,28 @@ index d500279..07248c3 100644
|
||||
break;
|
||||
|
||||
default:
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
index 817a4cf..fbc7dcb 100644
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -3834,7 +3834,7 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
if (call_count == 1)
|
||||
{
|
||||
range_type = TYPE_INDEX_TYPE (array_type);
|
||||
- slice_range_size = elem_count;
|
||||
+ slice_range_size = ary_low_bound + elem_count - 1;
|
||||
|
||||
/* Check if the array bounds are valid. */
|
||||
if (get_discrete_bounds (range_type, &ary_low_bound, &ary_high_bound) < 0)
|
||||
@@ -3846,7 +3846,7 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
else
|
||||
{
|
||||
range_type = TYPE_INDEX_TYPE (TYPE_TARGET_TYPE (array_type));
|
||||
- slice_range_size = (ary_low_bound + row_count - 1) * (elem_count);
|
||||
+ slice_range_size = ary_low_bound + (row_count * elem_count) - 1;
|
||||
ary_low_bound = TYPE_LOW_BOUND (range_type);
|
||||
}
|
||||
|
||||
--
|
||||
2.5.0
|
||||
2.5.5
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-02/msg00844.html
|
||||
Subject: [PATCH v2 5/6] fortran: calculate subarray with stride values.
|
||||
RE: [ping] [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides
|
||||
https://sourceware.org/ml/gdb-patches/2016-07/msg00009.html
|
||||
|
||||
From 1189098c3cacc2ee69021de1a83ad3328821d755 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
Date: Wed, 1 Jun 2016 15:04:01 +0200
|
||||
Subject: [PATCH 5/6] fortran: calculate elements of a subarray using a
|
||||
provided stride value
|
||||
|
||||
Calculate elements of a subarray using a provided stride value
|
||||
The stride value can be a positive or negative integer, but may
|
||||
not be zero. If no stride is provided, use the default value
|
||||
1 to print all elements inside the range.
|
||||
@ -32,44 +35,25 @@ $3 = (1, 3, 5, 7, 9)
|
||||
|
||||
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
---
|
||||
gdb/eval.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++-------------
|
||||
gdb/valops.c | 87 +++++++++++++++++++++++++++++++++-------------
|
||||
gdb/eval.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
|
||||
gdb/valops.c | 83 +++++++++++++++++++++++++++++++++++-------------
|
||||
gdb/value.h | 2 +-
|
||||
3 files changed, 152 insertions(+), 48 deletions(-)
|
||||
3 files changed, 145 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
index 308ada3..d01b579 100644
|
||||
index b5aaf1c..1f27b6f 100644
|
||||
--- a/gdb/eval.c
|
||||
+++ b/gdb/eval.c
|
||||
@@ -437,8 +437,8 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
{
|
||||
struct subscript_range
|
||||
{
|
||||
- enum f90_range_type f90_range_type;
|
||||
- LONGEST low, high, stride;
|
||||
+ enum f90_range_type f90_range_type;
|
||||
+ LONGEST low, high, stride;
|
||||
}
|
||||
range;
|
||||
LONGEST number;
|
||||
@@ -475,7 +475,7 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
range = &index->range;
|
||||
@@ -477,7 +477,7 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
range = &index->U.range;
|
||||
|
||||
*pos += 3;
|
||||
- range->f90_range_type = longest_to_int (exp->elts[pc].longconst);
|
||||
+ range->f90_range_type = exp->elts[pc].longconst;
|
||||
- range->f90_range_type = (enum range_type) longest_to_int (exp->elts[pc].longconst);
|
||||
+ range->f90_range_type = (enum range_type) exp->elts[pc].longconst;
|
||||
|
||||
/* If a lower bound was provided by the user, the bit has been
|
||||
set and we can assign the value from the elt stack. Same for
|
||||
@@ -484,6 +484,7 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
== SUBARRAY_LOW_BOUND)
|
||||
range->low = value_as_long (evaluate_subexp (NULL_TYPE, exp,
|
||||
pos, noside));
|
||||
+
|
||||
if ((range->f90_range_type & SUBARRAY_HIGH_BOUND)
|
||||
== SUBARRAY_HIGH_BOUND)
|
||||
range->high = value_as_long (evaluate_subexp (NULL_TYPE, exp,
|
||||
@@ -496,6 +497,10 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
@@ -499,6 +499,10 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
/* Assign the default stride value '1'. */
|
||||
else
|
||||
range->stride = 1;
|
||||
@ -80,7 +64,7 @@ index 308ada3..d01b579 100644
|
||||
}
|
||||
/* User input is an index. E.g.: "p arry(5)". */
|
||||
else
|
||||
@@ -512,10 +517,8 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
@@ -515,10 +519,8 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
|
||||
}
|
||||
|
||||
@ -93,7 +77,7 @@ index 308ada3..d01b579 100644
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
{
|
||||
struct subscript_store *index = &subscript_array[i];
|
||||
@@ -548,6 +551,48 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
@@ -551,6 +553,48 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
|| range->high > TYPE_HIGH_BOUND (index_type))
|
||||
error (_("provided bound(s) outside array bound(s)"));
|
||||
|
||||
@ -113,7 +97,7 @@ index 308ada3..d01b579 100644
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ array_type = TYPE_TARGET_TYPE (array_type);
|
||||
+ array_type = TYPE_TARGET_TYPE (array_type);
|
||||
+ }
|
||||
+
|
||||
+ /* Reset ARRAY_TYPE before slicing.*/
|
||||
@ -137,12 +121,12 @@ index 308ada3..d01b579 100644
|
||||
+ treat any subsequent user entry as a range. We simply
|
||||
+ increment DIM_COUNT which tells us how many times we are
|
||||
+ calling VALUE_SLICE_1. */
|
||||
+ struct subscript_range *range = &index->range;
|
||||
+ subscript_range *range = &index->U.range;
|
||||
+
|
||||
/* DIM_COUNT counts every user argument that is treated as a range.
|
||||
This is necessary for expressions like 'print array(7, 8:9).
|
||||
Here the first argument is a literal, but must be treated as a
|
||||
@@ -555,10 +600,9 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
@@ -558,10 +602,9 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
dim_count++;
|
||||
|
||||
new_array
|
||||
@ -156,13 +140,7 @@ index 308ada3..d01b579 100644
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -572,27 +616,38 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
to get the value offset right. */
|
||||
if (dim_count == 0)
|
||||
new_array
|
||||
- = value_subscripted_rvalue (new_array, index->number,
|
||||
+ = value_subscripted_rvalue (new_array, index->number,
|
||||
f77_get_lowerbound (value_type
|
||||
@@ -580,21 +623,32 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
(new_array)));
|
||||
else
|
||||
{
|
||||
@ -174,21 +152,21 @@ index 308ada3..d01b579 100644
|
||||
+ cannot do the range checks for us. So we have to make sure
|
||||
+ ourselves that the user provided index is inside the
|
||||
+ array bounds. Throw an error if not. */
|
||||
if (index->number < TYPE_LOW_BOUND (index_type)
|
||||
- || index->number > TYPE_HIGH_BOUND (index_type))
|
||||
if (index->U.number < TYPE_LOW_BOUND (index_type)
|
||||
- || index->U.number > TYPE_HIGH_BOUND (index_type))
|
||||
- error (_("error no such vector element"));
|
||||
+ && index->number < TYPE_HIGH_BOUND (index_type))
|
||||
+ && index->U.number > TYPE_HIGH_BOUND (index_type))
|
||||
+ error (_("provided bound(s) outside array bound(s)"));
|
||||
+
|
||||
+ if (index->number > TYPE_LOW_BOUND (index_type)
|
||||
+ && index->number > TYPE_HIGH_BOUND (index_type))
|
||||
+ if (index->U.number > TYPE_LOW_BOUND (index_type)
|
||||
+ && index->U.number > TYPE_HIGH_BOUND (index_type))
|
||||
+ error (_("provided bound(s) outside array bound(s)"));
|
||||
|
||||
- dim_count++;
|
||||
new_array = value_slice_1 (new_array,
|
||||
- longest_to_int (index->number),
|
||||
- longest_to_int (index->U.number),
|
||||
- 1, /* length is '1' element */
|
||||
+ index->number,
|
||||
+ index->U.number,
|
||||
+ 1, /* COUNT is '1' element */
|
||||
+ 1, /* STRIDE set to '1' */
|
||||
dim_count);
|
||||
@ -197,13 +175,11 @@ index 308ada3..d01b579 100644
|
||||
}
|
||||
break;
|
||||
}
|
||||
- }
|
||||
+ array_type = TYPE_TARGET_TYPE (array_type);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* With DIM_COUNT > 1 we currently have a one dimensional array, but expect
|
||||
an array of arrays, depending on how many ranges have been provided by
|
||||
@@ -617,7 +672,9 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
@@ -620,7 +674,9 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
the output array. So we traverse the SUBSCRIPT_ARRAY again, looking
|
||||
for a range entry. When we find one, we use the range info to create
|
||||
an additional range_type to set the correct bounds and dimensions for
|
||||
@ -214,35 +190,35 @@ index 308ada3..d01b579 100644
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
struct subscript_store *index = &subscript_array[i];
|
||||
@@ -625,12 +682,20 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
if (index->kind == SUBSCRIPT_RANGE)
|
||||
@@ -629,12 +685,20 @@ value_f90_subarray (struct value *array, struct expression *exp,
|
||||
{
|
||||
struct type *range_type, *interim_array_type;
|
||||
|
||||
+ int new_length;
|
||||
+
|
||||
+ /* The length of a sub-dimension with all elements between the
|
||||
+ bounds plus the start element itself. It may be modified by
|
||||
+ a user provided stride value. */
|
||||
+ new_length = index->range.high - index->range.low;
|
||||
+ new_length = index->U.range.high - index->U.range.low;
|
||||
+
|
||||
+ new_length /= index->U.range.stride;
|
||||
+
|
||||
+ new_length /= index->range.stride;
|
||||
|
||||
range_type
|
||||
= create_static_range_type (NULL,
|
||||
- temp_type,
|
||||
- 1,
|
||||
- index->range.high - index->range.low + 1);
|
||||
+ temp_type,
|
||||
+ index->range.low,
|
||||
+ index->range.low + new_length);
|
||||
elt_type,
|
||||
- 1,
|
||||
- index->U.range.high
|
||||
- - index->U.range.low + 1);
|
||||
+ index->U.range.low,
|
||||
+ index->U.range.low + new_length);
|
||||
|
||||
interim_array_type = create_array_type (NULL,
|
||||
temp_type,
|
||||
elt_type,
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
index 09ea877..83c8462 100644
|
||||
index fbc7dcb..ded8efc 100644
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -3759,10 +3759,13 @@ value_of_this_silent (const struct language_defn *lang)
|
||||
@@ -3766,10 +3766,13 @@ value_of_this_silent (const struct language_defn *lang)
|
||||
struct value *
|
||||
value_slice (struct value *array, int lowbound, int length)
|
||||
{
|
||||
@ -259,8 +235,8 @@ index 09ea877..83c8462 100644
|
||||
+ return value_slice_1 (array, lowbound, length, 1, 1);
|
||||
}
|
||||
|
||||
/* CALL_COUNT is used to determine if we are calling the function once, e.g.
|
||||
@@ -3776,7 +3779,8 @@ value_slice (struct value *array, int lowbound, int length)
|
||||
/* VALUE_SLICE_1 is called for each array dimension to calculate the number
|
||||
@@ -3785,7 +3788,8 @@ value_slice (struct value *array, int lowbound, int length)
|
||||
ranges in the calling function. */
|
||||
|
||||
struct value *
|
||||
@ -270,7 +246,7 @@ index 09ea877..83c8462 100644
|
||||
{
|
||||
struct type *slice_range_type, *slice_type, *range_type;
|
||||
struct type *array_type = check_typedef (value_type (array));
|
||||
@@ -3799,14 +3803,24 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
@@ -3808,14 +3812,24 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
attributes of the underlying type. */
|
||||
if (call_count > 1)
|
||||
{
|
||||
@ -297,25 +273,7 @@ index 09ea877..83c8462 100644
|
||||
elt_stride = TYPE_LENGTH (TYPE_INDEX_TYPE (array_type));
|
||||
|
||||
elt_offs *= elt_size;
|
||||
@@ -3825,7 +3839,7 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
if (call_count == 1)
|
||||
{
|
||||
range_type = TYPE_INDEX_TYPE (array_type);
|
||||
- slice_range_size = elem_count;
|
||||
+ slice_range_size = ary_low_bound + elem_count - 1;
|
||||
|
||||
/* Check if the array bounds are valid. */
|
||||
if (get_discrete_bounds (range_type, &ary_low_bound, &ary_high_bound) < 0)
|
||||
@@ -3837,7 +3851,7 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
else
|
||||
{
|
||||
range_type = TYPE_INDEX_TYPE (TYPE_TARGET_TYPE (array_type));
|
||||
- slice_range_size = (ary_low_bound + row_count - 1) * (elem_count);
|
||||
+ slice_range_size = ary_low_bound + (row_count * elem_count) - 1;
|
||||
ary_low_bound = TYPE_LOW_BOUND (range_type);
|
||||
}
|
||||
|
||||
@@ -3849,8 +3863,9 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
@@ -3858,8 +3872,9 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
{
|
||||
struct type *element_type;
|
||||
|
||||
@ -327,7 +285,7 @@ index 09ea877..83c8462 100644
|
||||
{
|
||||
element_type = TYPE_TARGET_TYPE (array_type);
|
||||
|
||||
@@ -3871,29 +3886,53 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
@@ -3880,29 +3895,53 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count)
|
||||
}
|
||||
|
||||
}
|
||||
@ -359,8 +317,8 @@ index 09ea877..83c8462 100644
|
||||
slice_type = create_array_type (NULL, element_type, slice_range_type);
|
||||
|
||||
- TYPE_CODE (slice_type) = TYPE_CODE (TYPE_TARGET_TYPE (array_type));
|
||||
+ /* If we have a one dimensional array, we copy its TYPE_CODE. For a
|
||||
+ multi dimensional array we copy the embedded type's TYPE_CODE. */
|
||||
+ /* If we have a one dimensional array, we copy its TYPE_CODE. For a
|
||||
+ multi dimensional array we copy the embedded type's TYPE_CODE. */
|
||||
+ if (call_count == 1)
|
||||
+ TYPE_CODE (slice_type) = TYPE_CODE (array_type);
|
||||
+ else
|
||||
@ -395,7 +353,7 @@ index 09ea877..83c8462 100644
|
||||
}
|
||||
|
||||
diff --git a/gdb/value.h b/gdb/value.h
|
||||
index 3400460..c18ef2e 100644
|
||||
index 95588af..e417639 100644
|
||||
--- a/gdb/value.h
|
||||
+++ b/gdb/value.h
|
||||
@@ -1056,7 +1056,7 @@ extern struct value *varying_to_slice (struct value *);
|
||||
@ -408,5 +366,5 @@ index 3400460..c18ef2e 100644
|
||||
extern struct value *value_literal_complex (struct value *, struct value *,
|
||||
struct type *);
|
||||
--
|
||||
2.5.0
|
||||
2.5.5
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
--- gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/subrange.exp-orig 2016-01-08 22:45:44.956842553 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/subrange.exp 2016-01-08 23:26:05.078554629 +0100
|
||||
@@ -39,27 +39,16 @@ foreach var {a alloc ptr} {
|
||||
set old_prefix $pf_prefix
|
||||
lappend pf_prefix "$var:"
|
||||
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (2, 2:3)" { = \(22, 32\)}
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (2:3, 3)" { = \(32, 33\)}
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (1, 2:)" { = \(21, 31\)}
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (2, :2)" { = \(12, 22\)}
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (3, 2:2)" { = \(23\)}
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "ptype $var (3, 2:2)" " = $int4 \\(2:2\\)"
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (4, :)" { = \(14, 24, 34\)}
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (:, :)" { = \(\( *11, 12, 13, 14\) \( *21, 22, 23, 24\) \( *31, 32, 33, 34\) *\)}
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "ptype $var (:, :)" " = $int4 \\(4,3\\)"
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (:)" "Wrong number of subscripts"
|
||||
- setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test "p $var (:, :, :)" "Wrong number of subscripts"
|
||||
|
||||
set pf_prefix $old_prefix
|
||||
@@ -68,5 +57,4 @@ foreach var {a alloc ptr} {
|
||||
gdb_test_no_output {set $a=a}
|
||||
delete_breakpoints
|
||||
gdb_unload
|
||||
-setup_kfail "*-*-*" "vlaregression/9999"
|
||||
gdb_test {p $a (3, 2:2)} { = \(23\)}
|
@ -1,7 +1,10 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-02/msg00847.html
|
||||
Subject: [PATCH v2 6/6] fortran: test cases for subarray strides and slices
|
||||
RE: [ping] [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides
|
||||
https://sourceware.org/ml/gdb-patches/2016-07/msg00009.html
|
||||
|
||||
From 982d582ee738cbcf252ba8eab59a9514edda75b9 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
|
||||
Date: Wed, 4 Dec 2013 11:47:15 +0000
|
||||
Subject: [PATCH 6/6] fortran: test cases for subarray strides and slices
|
||||
|
||||
Add test cases for subarray creation with range, literal and
|
||||
stride value permutations for one, two, and three dimensional
|
||||
@ -511,5 +514,5 @@ index 0000000..f22fcbe
|
||||
+ call sub
|
||||
+end
|
||||
--
|
||||
2.5.0
|
||||
2.5.5
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.9.50.20150520/gdb/doc/python.texi
|
||||
Index: gdb-7.11.50.20160630/gdb/doc/python.texi
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/doc/python.texi 2015-05-31 17:57:12.431593983 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/doc/python.texi 2015-05-31 17:57:14.654607708 +0200
|
||||
@@ -229,6 +229,14 @@ returned as a string. The default is @c
|
||||
--- gdb-7.11.50.20160630.orig/gdb/doc/python.texi 2016-07-03 16:30:37.009338358 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/doc/python.texi 2016-07-03 16:30:42.812387867 +0200
|
||||
@@ -229,6 +229,14 @@
|
||||
return value is @code{None}. If @var{to_string} is @code{True}, the
|
||||
@value{GDBN} virtual terminal will be temporarily set to unlimited width
|
||||
and height, and its pagination will be disabled; @pxref{Screen Size}.
|
||||
@ -17,11 +17,11 @@ Index: gdb-7.9.50.20150520/gdb/doc/python.texi
|
||||
@end defun
|
||||
|
||||
@findex gdb.breakpoints
|
||||
Index: gdb-7.9.50.20150520/gdb/python/python-internal.h
|
||||
Index: gdb-7.11.50.20160630/gdb/python/python-internal.h
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/python/python-internal.h 2015-05-31 17:57:12.432593989 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/python/python-internal.h 2015-05-31 17:57:14.654607708 +0200
|
||||
@@ -142,6 +142,8 @@ typedef int Py_ssize_t;
|
||||
--- gdb-7.11.50.20160630.orig/gdb/python/python-internal.h 2016-07-03 16:30:37.010338366 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/python/python-internal.h 2016-07-03 16:30:42.812387867 +0200
|
||||
@@ -140,6 +140,8 @@
|
||||
#define PyGILState_Release(ARG) ((void)(ARG))
|
||||
#define PyEval_InitThreads()
|
||||
#define PyThreadState_Swap(ARG) ((void)(ARG))
|
||||
@ -30,11 +30,11 @@ Index: gdb-7.9.50.20150520/gdb/python/python-internal.h
|
||||
#define PyEval_ReleaseLock()
|
||||
#endif
|
||||
|
||||
Index: gdb-7.9.50.20150520/gdb/python/python.c
|
||||
Index: gdb-7.11.50.20160630/gdb/python/python.c
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/python/python.c 2015-05-31 17:57:14.656607720 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/python/python.c 2015-05-31 18:02:08.891424227 +0200
|
||||
@@ -627,13 +627,18 @@ execute_gdb_command (PyObject *self, PyO
|
||||
--- gdb-7.11.50.20160630.orig/gdb/python/python.c 2016-07-03 16:30:37.011338375 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/python/python.c 2016-07-03 16:31:16.324673783 +0200
|
||||
@@ -619,13 +619,18 @@
|
||||
{
|
||||
const char *arg;
|
||||
PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
|
||||
@ -57,7 +57,7 @@ Index: gdb-7.9.50.20150520/gdb/python/python.c
|
||||
return NULL;
|
||||
|
||||
from_tty = 0;
|
||||
@@ -654,12 +659,28 @@ execute_gdb_command (PyObject *self, PyO
|
||||
@@ -646,6 +651,15 @@
|
||||
to_string = cmp;
|
||||
}
|
||||
|
||||
@ -73,8 +73,9 @@ Index: gdb-7.9.50.20150520/gdb/python/python.c
|
||||
TRY
|
||||
{
|
||||
/* Copy the argument text in case the command modifies it. */
|
||||
char *copy = xstrdup (arg);
|
||||
@@ -653,6 +667,13 @@
|
||||
struct cleanup *cleanup = make_cleanup (xfree, copy);
|
||||
struct interp *interp;
|
||||
|
||||
+ /* In the case of long running GDB commands, allow the user to
|
||||
+ release the Python GIL acquired by Python. Restore the GIL
|
||||
@ -83,10 +84,10 @@ Index: gdb-7.9.50.20150520/gdb/python/python.c
|
||||
+ if (release_gil)
|
||||
+ state = PyEval_SaveThread();
|
||||
+
|
||||
make_cleanup_restore_integer (&interpreter_async);
|
||||
interpreter_async = 0;
|
||||
make_cleanup_restore_integer (¤t_ui->async);
|
||||
current_ui->async = 0;
|
||||
|
||||
@@ -672,11 +693,23 @@ execute_gdb_command (PyObject *self, PyO
|
||||
@@ -671,11 +692,23 @@
|
||||
execute_command (copy, from_tty);
|
||||
}
|
||||
|
||||
@ -111,10 +112,10 @@ Index: gdb-7.9.50.20150520/gdb/python/python.c
|
||||
}
|
||||
END_CATCH
|
||||
|
||||
Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.c 2015-05-31 17:57:14.656607720 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.python/py-gil-mthread.c 2016-07-03 16:30:42.813387876 +0200
|
||||
@@ -0,0 +1,12 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
@ -128,10 +129,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
+ printf ("Sleeping %d\n", i);
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.exp 2015-05-31 17:57:14.657607726 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.python/py-gil-mthread.exp 2016-07-03 16:30:42.813387876 +0200
|
||||
@@ -0,0 +1,69 @@
|
||||
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -202,10 +203,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.python/py-gil-mthread.py 2015-05-31 17:57:14.657607726 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.python/py-gil-mthread.py 2016-07-03 16:30:42.814387884 +0200
|
||||
@@ -0,0 +1,22 @@
|
||||
+import thread
|
||||
+import time
|
||||
|
@ -1,17 +1,18 @@
|
||||
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/event-top.c gdb-7.10.50.20160106/gdb/event-top.c
|
||||
--- gdb-7.10.50.20160106-orig/gdb/event-top.c 2016-01-09 14:51:02.324243506 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/event-top.c 2016-01-09 14:51:33.029434121 +0100
|
||||
@@ -1033,6 +1033,13 @@ set_async_editing_command (char *args, i
|
||||
void
|
||||
gdb_setup_readline (void)
|
||||
Index: gdb-7.11.50.20160630/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/event-top.c 2016-07-03 16:32:36.108342159 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/event-top.c 2016-07-03 16:32:59.787523733 +0200
|
||||
@@ -1252,6 +1252,13 @@
|
||||
{
|
||||
struct ui *ui = current_ui;
|
||||
|
||||
+#ifdef NEED_RL_STATE_FEDORA_GDB
|
||||
+ /* 6.2 regression: no longed asks for --more--
|
||||
+ gdb.base/readline-ask.exp
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=701131 */
|
||||
+ RL_SETSTATE (RL_STATE_FEDORA_GDB);
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
/* This function is a noop for the sync case. The assumption is
|
||||
that the sync setup is ALL done in gdb_init, and we would only
|
||||
mess it up here. The sync stuff should really go away over
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -137,10 +137,10 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=bitpos-tdep.patch
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/alpha-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/alpha-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/alpha-tdep.c 2016-01-08 19:16:16.592813990 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/alpha-tdep.c 2016-01-08 19:16:20.308834717 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/alpha-tdep.c 2016-07-16 14:35:45.390502718 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/alpha-tdep.c 2016-07-16 14:35:47.511519788 +0200
|
||||
@@ -299,17 +299,17 @@
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -183,11 +183,11 @@ Index: gdb-7.10.50.20160106/gdb/alpha-tdep.c
|
||||
memcpy (arg_reg_buffer + offset, contents, tlen);
|
||||
offset += tlen;
|
||||
contents += tlen;
|
||||
Index: gdb-7.10.50.20160106/gdb/amd64-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/amd64-tdep.c 2016-01-08 19:16:16.594814001 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/amd64-tdep.c 2016-01-08 19:16:20.309834723 +0100
|
||||
@@ -699,7 +699,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/amd64-tdep.c 2016-07-16 14:35:45.391502726 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/amd64-tdep.c 2016-07-16 14:35:47.512519796 +0200
|
||||
@@ -729,7 +729,7 @@
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
enum amd64_reg_class theclass[2];
|
||||
@ -196,7 +196,7 @@ Index: gdb-7.10.50.20160106/gdb/amd64-tdep.c
|
||||
static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM };
|
||||
static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM };
|
||||
int integer_reg = 0;
|
||||
@@ -850,8 +850,8 @@
|
||||
@@ -880,8 +880,8 @@
|
||||
};
|
||||
struct value **stack_args = XALLOCAVEC (struct value *, nargs);
|
||||
int num_stack_args = 0;
|
||||
@ -207,7 +207,7 @@ Index: gdb-7.10.50.20160106/gdb/amd64-tdep.c
|
||||
int integer_reg = 0;
|
||||
int sse_reg = 0;
|
||||
int i;
|
||||
@@ -863,7 +863,7 @@
|
||||
@@ -893,7 +893,7 @@
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
struct type *type = value_type (args[i]);
|
||||
@ -216,10 +216,10 @@ Index: gdb-7.10.50.20160106/gdb/amd64-tdep.c
|
||||
enum amd64_reg_class theclass[2];
|
||||
int needed_integer_regs = 0;
|
||||
int needed_sse_regs = 0;
|
||||
Index: gdb-7.10.50.20160106/gdb/amd64-windows-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/amd64-windows-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/amd64-windows-tdep.c 2016-01-08 19:16:16.595814006 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/amd64-windows-tdep.c 2016-01-08 19:16:20.310834728 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/amd64-windows-tdep.c 2016-07-16 14:35:45.393502742 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/amd64-windows-tdep.c 2016-07-16 14:35:47.512519796 +0200
|
||||
@@ -288,7 +288,7 @@
|
||||
struct type *type, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
@ -229,11 +229,11 @@ Index: gdb-7.10.50.20160106/gdb/amd64-windows-tdep.c
|
||||
int regnum = -1;
|
||||
|
||||
/* See if our value is returned through a register. If it is, then
|
||||
Index: gdb-7.10.50.20160106/gdb/arm-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/arm-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/arm-tdep.c 2016-01-08 19:16:16.603814051 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/arm-tdep.c 2016-01-08 19:17:05.737088107 +0100
|
||||
@@ -3340,7 +3340,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/arm-tdep.c 2016-07-16 14:35:45.400502798 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/arm-tdep.c 2016-07-16 14:36:30.328864376 +0200
|
||||
@@ -3443,7 +3443,7 @@
|
||||
array). Vector types are not currently supported, matching the
|
||||
generic AAPCS support. */
|
||||
|
||||
@ -242,7 +242,7 @@ Index: gdb-7.10.50.20160106/gdb/arm-tdep.c
|
||||
arm_vfp_cprc_sub_candidate (struct type *t,
|
||||
enum arm_vfp_cprc_base_type *base_type)
|
||||
{
|
||||
@@ -3423,7 +3423,7 @@
|
||||
@@ -3526,7 +3526,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -251,7 +251,7 @@ Index: gdb-7.10.50.20160106/gdb/arm-tdep.c
|
||||
unsigned unitlen;
|
||||
|
||||
count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t),
|
||||
@@ -3446,13 +3446,15 @@
|
||||
@@ -3549,12 +3549,12 @@
|
||||
|
||||
case TYPE_CODE_STRUCT:
|
||||
{
|
||||
@ -261,16 +261,12 @@ Index: gdb-7.10.50.20160106/gdb/arm-tdep.c
|
||||
int i;
|
||||
for (i = 0; i < TYPE_NFIELDS (t); i++)
|
||||
{
|
||||
- int sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
|
||||
- base_type);
|
||||
+ LONGEST sub_count;
|
||||
+
|
||||
+ sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
|
||||
+ base_type);
|
||||
if (sub_count == -1)
|
||||
return -1;
|
||||
count += sub_count;
|
||||
@@ -3472,13 +3474,15 @@
|
||||
- int sub_count = 0;
|
||||
+ LONGEST sub_count = 0;
|
||||
|
||||
if (!field_is_static (&TYPE_FIELD (t, i)))
|
||||
sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
|
||||
@@ -3578,13 +3578,15 @@
|
||||
|
||||
case TYPE_CODE_UNION:
|
||||
{
|
||||
@ -289,7 +285,7 @@ Index: gdb-7.10.50.20160106/gdb/arm-tdep.c
|
||||
if (sub_count == -1)
|
||||
return -1;
|
||||
count = (count > sub_count ? count : sub_count);
|
||||
@@ -3514,7 +3518,7 @@
|
||||
@@ -3620,7 +3622,7 @@
|
||||
int *count)
|
||||
{
|
||||
enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN;
|
||||
@ -298,7 +294,7 @@ Index: gdb-7.10.50.20160106/gdb/arm-tdep.c
|
||||
if (c <= 0 || c > 4)
|
||||
return 0;
|
||||
*base_type = b;
|
||||
@@ -3595,7 +3599,7 @@
|
||||
@@ -3701,7 +3703,7 @@
|
||||
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
@ -307,11 +303,11 @@ Index: gdb-7.10.50.20160106/gdb/arm-tdep.c
|
||||
struct type *arg_type;
|
||||
struct type *target_type;
|
||||
enum type_code typecode;
|
||||
Index: gdb-7.10.50.20160106/gdb/avr-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/avr-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/avr-tdep.c 2016-01-08 19:16:16.604814057 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/avr-tdep.c 2016-01-08 19:16:20.314834750 +0100
|
||||
@@ -1196,13 +1196,13 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/avr-tdep.c 2016-07-16 14:35:45.401502806 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/avr-tdep.c 2016-07-16 14:35:47.516519828 +0200
|
||||
@@ -1195,13 +1195,13 @@
|
||||
|
||||
struct stack_item
|
||||
{
|
||||
@ -327,7 +323,7 @@ Index: gdb-7.10.50.20160106/gdb/avr-tdep.c
|
||||
{
|
||||
struct stack_item *si;
|
||||
si = XNEW (struct stack_item);
|
||||
@@ -1291,12 +1291,12 @@
|
||||
@@ -1289,12 +1289,12 @@
|
||||
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
@ -341,22 +337,22 @@ Index: gdb-7.10.50.20160106/gdb/avr-tdep.c
|
||||
- int len = TYPE_LENGTH (type);
|
||||
+ ssize_t len = TYPE_LENGTH (type);
|
||||
|
||||
/* Calculate the potential last register needed. */
|
||||
last_regnum = regnum - (len + (len & 1));
|
||||
Index: gdb-7.10.50.20160106/gdb/bfin-tdep.c
|
||||
/* Calculate the potential last register needed.
|
||||
E.g. For length 2, registers regnum and regnum-1 (say 25 and 24)
|
||||
Index: gdb-7.11.50.20160716/gdb/bfin-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/bfin-tdep.c 2016-01-08 19:16:16.605814062 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/bfin-tdep.c 2016-01-08 19:16:20.315834756 +0100
|
||||
@@ -504,7 +504,7 @@
|
||||
gdb_byte buf[4];
|
||||
--- gdb-7.11.50.20160716.orig/gdb/bfin-tdep.c 2016-07-16 14:35:45.401502806 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/bfin-tdep.c 2016-07-16 14:35:47.516519828 +0200
|
||||
@@ -502,7 +502,7 @@
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int i;
|
||||
long reg_r0, reg_r1, reg_r2;
|
||||
- int total_len = 0;
|
||||
+ ssize_t total_len = 0;
|
||||
enum bfin_abi abi = bfin_abi (gdbarch);
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
|
||||
@@ -528,7 +528,7 @@
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
{
|
||||
@@ -524,7 +524,7 @@
|
||||
{
|
||||
struct type *value_type = value_enclosing_type (args[i]);
|
||||
struct type *arg_type = check_typedef (value_type);
|
||||
@ -365,10 +361,10 @@ Index: gdb-7.10.50.20160106/gdb/bfin-tdep.c
|
||||
|
||||
sp -= container_len;
|
||||
write_memory (sp, value_contents (args[i]), container_len);
|
||||
Index: gdb-7.10.50.20160106/gdb/cris-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/cris-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/cris-tdep.c 2016-01-08 19:16:16.606814068 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/cris-tdep.c 2016-01-08 19:16:20.316834762 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/cris-tdep.c 2016-07-16 14:35:45.403502823 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/cris-tdep.c 2016-07-16 14:35:47.517519836 +0200
|
||||
@@ -663,13 +663,13 @@
|
||||
|
||||
struct stack_item
|
||||
@ -385,7 +381,7 @@ Index: gdb-7.10.50.20160106/gdb/cris-tdep.c
|
||||
{
|
||||
struct stack_item *si = XNEW (struct stack_item);
|
||||
si->data = (gdb_byte *) xmalloc (len);
|
||||
@@ -841,13 +841,13 @@
|
||||
@@ -833,13 +833,13 @@
|
||||
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
@ -403,11 +399,11 @@ Index: gdb-7.10.50.20160106/gdb/cris-tdep.c
|
||||
|
||||
/* How may registers worth of storage do we need for this argument? */
|
||||
reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0);
|
||||
Index: gdb-7.10.50.20160106/gdb/h8300-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/h8300-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/h8300-tdep.c 2016-01-08 19:16:16.607814073 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/h8300-tdep.c 2016-01-08 19:16:20.316834762 +0100
|
||||
@@ -639,7 +639,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/h8300-tdep.c 2016-07-16 14:35:45.403502823 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/h8300-tdep.c 2016-07-16 14:35:47.517519836 +0200
|
||||
@@ -637,7 +637,7 @@
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -416,7 +412,7 @@ Index: gdb-7.10.50.20160106/gdb/h8300-tdep.c
|
||||
int wordsize = BINWORD (gdbarch);
|
||||
int reg = E_ARG0_REGNUM;
|
||||
int argument;
|
||||
@@ -666,11 +666,11 @@
|
||||
@@ -664,11 +664,11 @@
|
||||
{
|
||||
struct cleanup *back_to;
|
||||
struct type *type = value_type (args[argument]);
|
||||
@ -430,7 +426,7 @@ Index: gdb-7.10.50.20160106/gdb/h8300-tdep.c
|
||||
gdb_byte *padded = (gdb_byte *) xmalloc (padded_len);
|
||||
back_to = make_cleanup (xfree, padded);
|
||||
|
||||
@@ -699,7 +699,7 @@
|
||||
@@ -697,7 +697,7 @@
|
||||
/* Heavens to Betsy --- it's really going in registers!
|
||||
Note that on the h8/300s, there are gaps between the
|
||||
registers in the register file. */
|
||||
@ -439,11 +435,11 @@ Index: gdb-7.10.50.20160106/gdb/h8300-tdep.c
|
||||
|
||||
for (offset = 0; offset < padded_len; offset += wordsize)
|
||||
{
|
||||
Index: gdb-7.10.50.20160106/gdb/hppa-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/hppa-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/hppa-tdep.c 2016-01-08 19:16:16.609814085 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/hppa-tdep.c 2016-01-08 19:16:20.317834767 +0100
|
||||
@@ -995,7 +995,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/hppa-tdep.c 2016-07-16 14:35:45.405502839 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/hppa-tdep.c 2016-07-16 14:35:47.518519844 +0200
|
||||
@@ -991,7 +991,7 @@
|
||||
{
|
||||
struct value *arg = args[i];
|
||||
struct type *type = value_type (arg);
|
||||
@ -452,7 +448,7 @@ Index: gdb-7.10.50.20160106/gdb/hppa-tdep.c
|
||||
const bfd_byte *valbuf;
|
||||
bfd_byte fptrbuf[8];
|
||||
int regnum;
|
||||
@@ -1190,7 +1190,7 @@
|
||||
@@ -1186,7 +1186,7 @@
|
||||
struct type *type, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
@ -461,10 +457,10 @@ Index: gdb-7.10.50.20160106/gdb/hppa-tdep.c
|
||||
int regnum, offset;
|
||||
|
||||
if (len > 16)
|
||||
Index: gdb-7.10.50.20160106/gdb/i386-darwin-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/i386-darwin-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/i386-darwin-tdep.c 2016-01-08 19:16:16.609814085 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/i386-darwin-tdep.c 2016-01-08 19:16:20.317834767 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/i386-darwin-tdep.c 2016-07-16 14:35:45.405502839 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/i386-darwin-tdep.c 2016-07-16 14:35:47.518519844 +0200
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
for (write_pass = 0; write_pass < 2; write_pass++)
|
||||
@ -474,11 +470,11 @@ Index: gdb-7.10.50.20160106/gdb/i386-darwin-tdep.c
|
||||
int num_m128 = 0;
|
||||
|
||||
if (struct_return)
|
||||
Index: gdb-7.10.50.20160106/gdb/i386-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/i386-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/i386-tdep.c 2016-01-08 19:16:16.615814118 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/i386-tdep.c 2016-01-08 19:16:20.319834778 +0100
|
||||
@@ -2663,7 +2663,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/i386-tdep.c 2016-07-16 14:35:45.410502879 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/i386-tdep.c 2016-07-16 14:35:47.520519860 +0200
|
||||
@@ -2664,7 +2664,7 @@
|
||||
gdb_byte buf[4];
|
||||
int i;
|
||||
int write_pass;
|
||||
@ -487,7 +483,7 @@ Index: gdb-7.10.50.20160106/gdb/i386-tdep.c
|
||||
|
||||
/* Determine the total space required for arguments and struct
|
||||
return address in a first pass (allowing for 16-byte-aligned
|
||||
@@ -2671,7 +2671,7 @@
|
||||
@@ -2672,7 +2672,7 @@
|
||||
|
||||
for (write_pass = 0; write_pass < 2; write_pass++)
|
||||
{
|
||||
@ -496,7 +492,7 @@ Index: gdb-7.10.50.20160106/gdb/i386-tdep.c
|
||||
|
||||
if (struct_return)
|
||||
{
|
||||
@@ -2688,7 +2688,7 @@
|
||||
@@ -2689,7 +2689,7 @@
|
||||
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
@ -505,7 +501,7 @@ Index: gdb-7.10.50.20160106/gdb/i386-tdep.c
|
||||
|
||||
if (write_pass)
|
||||
{
|
||||
@@ -2895,7 +2895,7 @@
|
||||
@@ -2896,7 +2896,7 @@
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum type_code code = TYPE_CODE (type);
|
||||
@ -514,7 +510,7 @@ Index: gdb-7.10.50.20160106/gdb/i386-tdep.c
|
||||
|
||||
gdb_assert (code == TYPE_CODE_STRUCT
|
||||
|| code == TYPE_CODE_UNION
|
||||
@@ -3641,7 +3641,7 @@
|
||||
@@ -3718,7 +3718,7 @@
|
||||
i386_convert_register_p (struct gdbarch *gdbarch,
|
||||
int regnum, struct type *type)
|
||||
{
|
||||
@ -523,7 +519,7 @@ Index: gdb-7.10.50.20160106/gdb/i386-tdep.c
|
||||
|
||||
/* Values may be spread across multiple registers. Most debugging
|
||||
formats aren't expressive enough to specify the locations, so
|
||||
@@ -3674,7 +3674,7 @@
|
||||
@@ -3751,7 +3751,7 @@
|
||||
int *optimizedp, int *unavailablep)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
@ -532,7 +528,7 @@ Index: gdb-7.10.50.20160106/gdb/i386-tdep.c
|
||||
|
||||
if (i386_fp_regnum_p (gdbarch, regnum))
|
||||
return i387_register_to_value (frame, regnum, type, to,
|
||||
@@ -3710,7 +3710,7 @@
|
||||
@@ -3787,7 +3787,7 @@
|
||||
i386_value_to_register (struct frame_info *frame, int regnum,
|
||||
struct type *type, const gdb_byte *from)
|
||||
{
|
||||
@ -541,11 +537,11 @@ Index: gdb-7.10.50.20160106/gdb/i386-tdep.c
|
||||
|
||||
if (i386_fp_regnum_p (get_frame_arch (frame), regnum))
|
||||
{
|
||||
Index: gdb-7.10.50.20160106/gdb/iq2000-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/iq2000-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/iq2000-tdep.c 2016-01-08 19:16:16.616814124 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/iq2000-tdep.c 2016-01-08 19:16:20.320834784 +0100
|
||||
@@ -651,8 +651,9 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/iq2000-tdep.c 2016-07-16 14:35:45.411502887 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/iq2000-tdep.c 2016-07-16 14:35:47.520519860 +0200
|
||||
@@ -646,8 +646,9 @@
|
||||
const bfd_byte *val;
|
||||
bfd_byte buf[4];
|
||||
struct type *type;
|
||||
@ -557,11 +553,11 @@ Index: gdb-7.10.50.20160106/gdb/iq2000-tdep.c
|
||||
/* Used to copy struct arguments into the stack. */
|
||||
CORE_ADDR struct_ptr;
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/m32r-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/m32r-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/m32r-tdep.c 2016-01-08 19:16:16.616814124 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/m32r-tdep.c 2016-01-08 19:16:20.320834784 +0100
|
||||
@@ -687,7 +687,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/m32r-tdep.c 2016-07-16 14:35:45.411502887 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/m32r-tdep.c 2016-07-16 14:35:47.520519860 +0200
|
||||
@@ -685,7 +685,7 @@
|
||||
CORE_ADDR regval;
|
||||
gdb_byte *val;
|
||||
gdb_byte valbuf[MAX_REGISTER_SIZE];
|
||||
@ -570,10 +566,10 @@ Index: gdb-7.10.50.20160106/gdb/m32r-tdep.c
|
||||
|
||||
/* First force sp to a 4-byte alignment. */
|
||||
sp = sp & ~3;
|
||||
Index: gdb-7.10.50.20160106/gdb/m68k-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/m68k-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/m68k-tdep.c 2016-01-08 19:16:16.617814129 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/m68k-tdep.c 2016-01-08 19:16:20.320834784 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/m68k-tdep.c 2016-07-16 14:35:45.412502895 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/m68k-tdep.c 2016-07-16 14:35:47.520519860 +0200
|
||||
@@ -382,7 +382,7 @@
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
@ -596,10 +592,10 @@ Index: gdb-7.10.50.20160106/gdb/m68k-tdep.c
|
||||
|
||||
/* Non-scalars bigger than 4 bytes are left aligned, others are
|
||||
right aligned. */
|
||||
Index: gdb-7.10.50.20160106/gdb/m88k-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/m88k-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/m88k-tdep.c 2016-01-08 19:16:16.617814129 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/m88k-tdep.c 2016-01-08 19:16:20.321834790 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/m88k-tdep.c 2016-07-16 14:35:45.412502895 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/m88k-tdep.c 2016-07-16 14:35:47.521519868 +0200
|
||||
@@ -257,13 +257,13 @@
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
@ -627,10 +623,10 @@ Index: gdb-7.10.50.20160106/gdb/m88k-tdep.c
|
||||
|
||||
if (m88k_in_register_p (type))
|
||||
{
|
||||
Index: gdb-7.10.50.20160106/gdb/mep-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/mep-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/mep-tdep.c 2016-01-08 19:16:16.618814135 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/mep-tdep.c 2016-01-08 19:16:20.321834790 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/mep-tdep.c 2016-07-16 14:35:45.413502903 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/mep-tdep.c 2016-07-16 14:35:47.521519868 +0200
|
||||
@@ -2272,7 +2272,7 @@
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
@ -640,10 +636,10 @@ Index: gdb-7.10.50.20160106/gdb/mep-tdep.c
|
||||
|
||||
if (arg_len > MEP_GPR_SIZE)
|
||||
{
|
||||
Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/mips-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/mips-tdep.c 2016-01-08 19:16:16.626814179 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/mips-tdep.c 2016-01-08 19:16:20.324834806 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/mips-tdep.c 2016-07-16 14:35:45.421502967 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/mips-tdep.c 2016-07-16 14:35:47.523519884 +0200
|
||||
@@ -455,7 +455,7 @@
|
||||
mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
int reg_num, int length,
|
||||
@ -664,7 +660,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
if (mips_debug && out != NULL)
|
||||
{
|
||||
int i;
|
||||
@@ -4554,13 +4554,13 @@
|
||||
@@ -4529,13 +4529,13 @@
|
||||
gdb_byte valbuf[MAX_REGISTER_SIZE];
|
||||
struct value *arg = args[argnum];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
@ -681,7 +677,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
|
||||
/* The EABI passes structures that do not fit in a register by
|
||||
reference. */
|
||||
@@ -4829,7 +4829,7 @@
|
||||
@@ -4804,7 +4804,7 @@
|
||||
|
||||
static int
|
||||
mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type,
|
||||
@ -690,7 +686,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -4844,7 +4844,7 @@
|
||||
@@ -4819,7 +4819,7 @@
|
||||
|
||||
for (i = 0; i < TYPE_NFIELDS (arg_type); i++)
|
||||
{
|
||||
@ -699,7 +695,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
struct type *field_type;
|
||||
|
||||
/* We're only looking at normal fields. */
|
||||
@@ -4886,7 +4886,7 @@
|
||||
@@ -4861,7 +4861,7 @@
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
int argnum;
|
||||
@ -708,7 +704,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
int stack_offset = 0;
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
@@ -5237,11 +5237,11 @@
|
||||
@@ -5212,11 +5212,11 @@
|
||||
: MIPS_V0_REGNUM);
|
||||
field < TYPE_NFIELDS (type); field++, regnum += 2)
|
||||
{
|
||||
@ -724,7 +720,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16)
|
||||
{
|
||||
/* A 16-byte long double field goes in two consecutive
|
||||
@@ -5283,8 +5283,8 @@
|
||||
@@ -5258,8 +5258,8 @@
|
||||
if (offset + xfer > TYPE_LENGTH (type))
|
||||
xfer = TYPE_LENGTH (type) - offset;
|
||||
if (mips_debug)
|
||||
@ -735,7 +731,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
mips_xfer_register (gdbarch, regcache,
|
||||
gdbarch_num_regs (gdbarch) + regnum,
|
||||
xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf,
|
||||
@@ -5342,7 +5342,7 @@
|
||||
@@ -5317,7 +5317,7 @@
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
int argnum;
|
||||
@ -744,7 +740,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
int stack_offset = 0;
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
@@ -5406,13 +5406,13 @@
|
||||
@@ -5381,13 +5381,13 @@
|
||||
const gdb_byte *val;
|
||||
struct value *arg = args[argnum];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
@ -761,7 +757,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
|
||||
val = value_contents (arg);
|
||||
|
||||
@@ -5870,8 +5870,8 @@
|
||||
@@ -5842,8 +5842,8 @@
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
int argnum;
|
||||
@ -772,7 +768,7 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
|
||||
@@ -5931,13 +5931,13 @@
|
||||
@@ -5903,13 +5903,13 @@
|
||||
const gdb_byte *val;
|
||||
struct value *arg = args[argnum];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
@ -789,11 +785,11 @@ Index: gdb-7.10.50.20160106/gdb/mips-tdep.c
|
||||
|
||||
val = value_contents (arg);
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/mn10300-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/mn10300-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/mn10300-tdep.c 2016-01-08 19:16:16.627814185 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/mn10300-tdep.c 2016-01-08 19:16:20.324834806 +0100
|
||||
@@ -1227,7 +1227,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/mn10300-tdep.c 2016-07-16 14:35:45.422502976 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/mn10300-tdep.c 2016-07-16 14:35:47.524519892 +0200
|
||||
@@ -1225,7 +1225,7 @@
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
const int push_size = register_size (gdbarch, E_PC_REGNUM);
|
||||
int regs_used;
|
||||
@ -802,11 +798,11 @@ Index: gdb-7.10.50.20160106/gdb/mn10300-tdep.c
|
||||
int stack_offset = 0;
|
||||
int argnum;
|
||||
const gdb_byte *val;
|
||||
Index: gdb-7.10.50.20160106/gdb/mt-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/mt-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/mt-tdep.c 2016-01-08 19:16:16.628814190 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/mt-tdep.c 2016-01-08 19:16:20.324834806 +0100
|
||||
@@ -781,9 +781,9 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/mt-tdep.c 2016-07-16 14:35:45.423502984 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/mt-tdep.c 2016-07-16 14:35:47.524519892 +0200
|
||||
@@ -780,9 +780,9 @@
|
||||
gdb_byte buf[MT_MAX_STRUCT_SIZE];
|
||||
int argreg = MT_1ST_ARGREG;
|
||||
int split_param_len = 0;
|
||||
@ -818,10 +814,10 @@ Index: gdb-7.10.50.20160106/gdb/mt-tdep.c
|
||||
int i, j;
|
||||
|
||||
/* First handle however many args we can fit into MT_1ST_ARGREG thru
|
||||
Index: gdb-7.10.50.20160106/gdb/ppc-sysv-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/ppc-sysv-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/ppc-sysv-tdep.c 2016-01-08 19:16:16.629814196 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/ppc-sysv-tdep.c 2016-01-08 19:16:20.325834812 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/ppc-sysv-tdep.c 2016-07-16 14:35:45.424502992 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/ppc-sysv-tdep.c 2016-07-16 14:35:47.524519892 +0200
|
||||
@@ -66,7 +66,7 @@
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
|
||||
@ -866,10 +862,10 @@ Index: gdb-7.10.50.20160106/gdb/ppc-sysv-tdep.c
|
||||
|
||||
/* Enforce alignment of stack location, if requested. */
|
||||
if (align > tdep->wordsize)
|
||||
Index: gdb-7.10.50.20160106/gdb/rl78-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/rl78-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/rl78-tdep.c 2016-01-08 19:16:16.629814196 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/rl78-tdep.c 2016-01-08 19:16:20.325834812 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/rl78-tdep.c 2016-07-16 14:35:45.424502992 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/rl78-tdep.c 2016-07-16 14:35:47.525519900 +0200
|
||||
@@ -1336,8 +1336,8 @@
|
||||
for (i = nargs - 1; i >= 0; i--)
|
||||
{
|
||||
@ -881,10 +877,10 @@ Index: gdb-7.10.50.20160106/gdb/rl78-tdep.c
|
||||
|
||||
sp -= container_len;
|
||||
write_memory (rl78_make_data_address (sp),
|
||||
Index: gdb-7.10.50.20160106/gdb/rs6000-aix-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/rs6000-aix-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/rs6000-aix-tdep.c 2016-01-08 19:16:16.630814202 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/rs6000-aix-tdep.c 2016-01-08 19:16:20.326834817 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/rs6000-aix-tdep.c 2016-07-16 14:35:45.425503000 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/rs6000-aix-tdep.c 2016-07-16 14:35:47.525519900 +0200
|
||||
@@ -186,9 +186,9 @@
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -897,7 +893,7 @@ Index: gdb-7.10.50.20160106/gdb/rs6000-aix-tdep.c
|
||||
gdb_byte tmp_buffer[50];
|
||||
int f_argno = 0; /* current floating point argno */
|
||||
int wordsize = gdbarch_tdep (gdbarch)->wordsize;
|
||||
@@ -321,7 +321,7 @@
|
||||
@@ -319,7 +319,7 @@
|
||||
|
||||
if ((argno < nargs) || argbytes)
|
||||
{
|
||||
@ -906,11 +902,11 @@ Index: gdb-7.10.50.20160106/gdb/rs6000-aix-tdep.c
|
||||
|
||||
if (argbytes)
|
||||
{
|
||||
Index: gdb-7.10.50.20160106/gdb/s390-linux-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/s390-linux-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/s390-linux-tdep.c 2016-01-08 19:16:16.632814213 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/s390-linux-tdep.c 2016-01-08 19:16:20.328834829 +0100
|
||||
@@ -2981,7 +2981,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/s390-linux-tdep.c 2016-07-16 14:35:45.427503016 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/s390-linux-tdep.c 2016-07-16 14:35:47.526519908 +0200
|
||||
@@ -3125,7 +3125,7 @@
|
||||
/* Determine whether N is a power of two. */
|
||||
|
||||
static int
|
||||
@ -919,7 +915,7 @@ Index: gdb-7.10.50.20160106/gdb/s390-linux-tdep.c
|
||||
{
|
||||
return n && ((n & (n - 1)) == 0);
|
||||
}
|
||||
@@ -3038,7 +3038,7 @@
|
||||
@@ -3182,7 +3182,7 @@
|
||||
enum bfd_endian byte_order, int is_unnamed)
|
||||
{
|
||||
struct type *type = check_typedef (value_type (arg));
|
||||
@ -928,10 +924,10 @@ Index: gdb-7.10.50.20160106/gdb/s390-linux-tdep.c
|
||||
int write_mode = as->regcache != NULL;
|
||||
|
||||
if (s390_function_arg_float (type))
|
||||
Index: gdb-7.10.50.20160106/gdb/score-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/score-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/score-tdep.c 2016-01-08 19:16:16.633814218 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/score-tdep.c 2016-01-08 19:16:20.328834829 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/score-tdep.c 2016-07-16 14:35:45.428503024 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/score-tdep.c 2016-07-16 14:35:47.527519916 +0200
|
||||
@@ -514,7 +514,7 @@
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argnum;
|
||||
@ -941,10 +937,10 @@ Index: gdb-7.10.50.20160106/gdb/score-tdep.c
|
||||
CORE_ADDR stack_offset = 0;
|
||||
CORE_ADDR addr = 0;
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/sh-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/sh-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/sh-tdep.c 2016-01-08 19:16:16.635814230 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/sh-tdep.c 2016-01-08 19:16:20.329834834 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/sh-tdep.c 2016-07-16 14:35:45.429503032 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/sh-tdep.c 2016-07-16 14:35:47.527519916 +0200
|
||||
@@ -805,7 +805,7 @@
|
||||
static int
|
||||
sh_use_struct_convention (int renesas_abi, struct type *type)
|
||||
@ -983,20 +979,20 @@ Index: gdb-7.10.50.20160106/gdb/sh-tdep.c
|
||||
int pass_on_stack = 0;
|
||||
int last_reg_arg = INT_MAX;
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/sh64-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/sh64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/sh64-tdep.c 2016-01-08 19:16:16.635814230 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/sh64-tdep.c 2016-01-08 19:16:20.329834834 +0100
|
||||
@@ -1056,7 +1056,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/sh64-tdep.c 2016-07-16 14:35:45.430503040 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/sh64-tdep.c 2016-07-16 14:35:47.528519925 +0200
|
||||
@@ -1060,7 +1060,7 @@
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
- int stack_offset, stack_alloc;
|
||||
+ LONGEST stack_offset, stack_alloc;
|
||||
int int_argreg;
|
||||
int float_argreg;
|
||||
int double_argreg;
|
||||
@@ -1067,7 +1067,7 @@
|
||||
int float_arg_index = 0;
|
||||
int double_arg_index = 0;
|
||||
@@ -1069,7 +1069,7 @@
|
||||
CORE_ADDR regval;
|
||||
const gdb_byte *val;
|
||||
gdb_byte valbuf[8];
|
||||
@ -1005,10 +1001,10 @@ Index: gdb-7.10.50.20160106/gdb/sh64-tdep.c
|
||||
int argreg_size;
|
||||
int fp_args[12];
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/sparc-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/sparc-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/sparc-tdep.c 2016-01-08 19:16:16.636814235 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/sparc-tdep.c 2016-01-08 19:16:20.330834840 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/sparc-tdep.c 2016-07-16 14:35:45.431503048 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/sparc-tdep.c 2016-07-16 14:35:47.528519925 +0200
|
||||
@@ -525,7 +525,7 @@
|
||||
for (i = 0; i < nargs; i++)
|
||||
{
|
||||
@ -1018,10 +1014,10 @@ Index: gdb-7.10.50.20160106/gdb/sparc-tdep.c
|
||||
|
||||
if (sparc_structure_or_union_p (type)
|
||||
|| (sparc_floating_p (type) && len == 16)
|
||||
Index: gdb-7.10.50.20160106/gdb/sparc64-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/sparc64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/sparc64-tdep.c 2016-01-08 19:16:16.637814241 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/sparc64-tdep.c 2016-01-08 19:16:20.330834840 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/sparc64-tdep.c 2016-07-16 14:35:45.432503056 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/sparc64-tdep.c 2016-07-16 14:35:47.528519925 +0200
|
||||
@@ -636,7 +636,8 @@
|
||||
|
||||
static void
|
||||
@ -1077,10 +1073,10 @@ Index: gdb-7.10.50.20160106/gdb/sparc64-tdep.c
|
||||
int regnum = -1;
|
||||
gdb_byte buf[16];
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/spu-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/spu-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/spu-tdep.c 2016-01-08 19:16:16.638814246 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/spu-tdep.c 2016-01-08 19:16:20.331834845 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/spu-tdep.c 2016-07-16 14:35:45.433503064 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/spu-tdep.c 2016-07-16 14:35:47.529519932 +0200
|
||||
@@ -1429,7 +1429,7 @@
|
||||
struct value *arg = args[i];
|
||||
struct type *type = check_typedef (value_type (arg));
|
||||
@ -1099,11 +1095,11 @@ Index: gdb-7.10.50.20160106/gdb/spu-tdep.c
|
||||
int preferred_slot;
|
||||
|
||||
if (spu_scalar_value_p (type))
|
||||
Index: gdb-7.10.50.20160106/gdb/tic6x-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/tic6x-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/tic6x-tdep.c 2016-01-08 19:16:16.639814252 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/tic6x-tdep.c 2016-01-08 19:16:20.332834851 +0100
|
||||
@@ -895,7 +895,7 @@
|
||||
--- gdb-7.11.50.20160716.orig/gdb/tic6x-tdep.c 2016-07-16 14:35:45.433503064 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/tic6x-tdep.c 2016-07-16 14:35:47.529519932 +0200
|
||||
@@ -892,7 +892,7 @@
|
||||
int argreg = 0;
|
||||
int argnum;
|
||||
int stack_offset = 4;
|
||||
@ -1112,7 +1108,7 @@ Index: gdb-7.10.50.20160106/gdb/tic6x-tdep.c
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct type *func_type = value_type (function);
|
||||
@@ -929,7 +929,7 @@
|
||||
@@ -926,7 +926,7 @@
|
||||
/* Now make space on the stack for the args. */
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
@ -1121,7 +1117,7 @@ Index: gdb-7.10.50.20160106/gdb/tic6x-tdep.c
|
||||
if (argnum >= 10 - argreg)
|
||||
references_offset += len;
|
||||
stack_offset += len;
|
||||
@@ -948,7 +948,7 @@
|
||||
@@ -945,7 +945,7 @@
|
||||
const gdb_byte *val;
|
||||
struct value *arg = args[argnum];
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
@ -1130,7 +1126,7 @@ Index: gdb-7.10.50.20160106/gdb/tic6x-tdep.c
|
||||
enum type_code typecode = TYPE_CODE (arg_type);
|
||||
|
||||
val = value_contents (arg);
|
||||
@@ -1108,7 +1108,8 @@
|
||||
@@ -1105,7 +1105,8 @@
|
||||
}
|
||||
else
|
||||
internal_error (__FILE__, __LINE__,
|
||||
@ -1140,23 +1136,23 @@ Index: gdb-7.10.50.20160106/gdb/tic6x-tdep.c
|
||||
|
||||
addr = sp + stack_offset;
|
||||
write_memory (addr, val, len);
|
||||
Index: gdb-7.10.50.20160106/gdb/tilegx-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/tilegx-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/tilegx-tdep.c 2016-01-08 19:16:16.640814257 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/tilegx-tdep.c 2016-01-08 19:16:20.332834851 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/tilegx-tdep.c 2016-07-16 14:35:45.434503072 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/tilegx-tdep.c 2016-07-16 14:35:47.530519941 +0200
|
||||
@@ -288,7 +288,7 @@
|
||||
CORE_ADDR stack_dest = sp;
|
||||
int argreg = TILEGX_R0_REGNUM;
|
||||
int i, j;
|
||||
- int typelen, slacklen, alignlen;
|
||||
+ LONGEST typelen, slacklen, alignlen;
|
||||
- int typelen, slacklen;
|
||||
+ LONGEST typelen, slacklen;
|
||||
static const gdb_byte four_zero_words[16] = { 0 };
|
||||
|
||||
/* If struct_return is 1, then the struct return address will
|
||||
Index: gdb-7.10.50.20160106/gdb/v850-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/v850-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/v850-tdep.c 2016-01-08 19:16:16.640814257 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/v850-tdep.c 2016-01-08 19:16:20.332834851 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/v850-tdep.c 2016-07-16 14:35:45.434503072 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/v850-tdep.c 2016-07-16 14:35:47.530519941 +0200
|
||||
@@ -1019,7 +1019,7 @@
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argreg;
|
||||
@ -1175,10 +1171,10 @@ Index: gdb-7.10.50.20160106/gdb/v850-tdep.c
|
||||
gdb_byte *val;
|
||||
gdb_byte valbuf[v850_reg_size];
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/vax-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/vax-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/vax-tdep.c 2016-01-08 19:16:16.641814263 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/vax-tdep.c 2016-01-08 19:16:20.333834856 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/vax-tdep.c 2016-07-16 14:35:45.435503080 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/vax-tdep.c 2016-07-16 14:35:47.530519941 +0200
|
||||
@@ -111,7 +111,7 @@
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -1197,10 +1193,10 @@ Index: gdb-7.10.50.20160106/gdb/vax-tdep.c
|
||||
|
||||
sp -= (len + 3) & ~3;
|
||||
count += (len + 3) / 4;
|
||||
Index: gdb-7.10.50.20160106/gdb/xstormy16-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/xstormy16-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/xstormy16-tdep.c 2016-01-08 19:16:16.641814263 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/xstormy16-tdep.c 2016-01-08 19:16:20.333834856 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/xstormy16-tdep.c 2016-07-16 14:35:45.435503080 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/xstormy16-tdep.c 2016-07-16 14:35:47.530519941 +0200
|
||||
@@ -233,8 +233,9 @@
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR stack_dest = sp;
|
||||
@ -1213,10 +1209,10 @@ Index: gdb-7.10.50.20160106/gdb/xstormy16-tdep.c
|
||||
const gdb_byte *val;
|
||||
gdb_byte buf[xstormy16_pc_size];
|
||||
|
||||
Index: gdb-7.10.50.20160106/gdb/xtensa-tdep.c
|
||||
Index: gdb-7.11.50.20160716/gdb/xtensa-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20160106.orig/gdb/xtensa-tdep.c 2016-01-08 19:16:16.643814274 +0100
|
||||
+++ gdb-7.10.50.20160106/gdb/xtensa-tdep.c 2016-01-08 19:16:20.334834862 +0100
|
||||
--- gdb-7.11.50.20160716.orig/gdb/xtensa-tdep.c 2016-07-16 14:35:45.437503096 +0200
|
||||
+++ gdb-7.11.50.20160716/gdb/xtensa-tdep.c 2016-07-16 14:35:47.531519949 +0200
|
||||
@@ -1638,8 +1638,7 @@
|
||||
|
||||
if (len > (callsize > 8 ? 8 : 16))
|
||||
|
@ -47,11 +47,11 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=f77-bounds.patch
|
||||
|
||||
Index: gdb-7.10.50.20151027/gdb/f-lang.h
|
||||
Index: gdb-7.11.50.20160630/gdb/f-lang.h
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20151027.orig/gdb/f-lang.h 2015-11-02 21:25:14.233161097 +0100
|
||||
+++ gdb-7.10.50.20151027/gdb/f-lang.h 2015-11-02 21:25:22.404214860 +0100
|
||||
@@ -62,9 +62,9 @@ struct common_block
|
||||
--- gdb-7.11.50.20160630.orig/gdb/f-lang.h 2016-07-16 10:56:11.682762722 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/f-lang.h 2016-07-16 10:56:15.554793704 +0200
|
||||
@@ -49,9 +49,9 @@
|
||||
struct symbol *contents[1];
|
||||
};
|
||||
|
||||
@ -63,38 +63,38 @@ Index: gdb-7.10.50.20151027/gdb/f-lang.h
|
||||
|
||||
extern void f77_get_dynamic_array_length (struct type *);
|
||||
|
||||
Index: gdb-7.10.50.20151027/gdb/f-typeprint.c
|
||||
Index: gdb-7.11.50.20160630/gdb/f-typeprint.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20151027.orig/gdb/f-typeprint.c 2015-11-02 21:25:14.234161104 +0100
|
||||
+++ gdb-7.10.50.20151027/gdb/f-typeprint.c 2015-11-02 21:25:22.404214860 +0100
|
||||
@@ -171,7 +171,7 @@ f_type_print_varspec_suffix (struct type
|
||||
--- gdb-7.11.50.20160630.orig/gdb/f-typeprint.c 2016-07-16 10:56:11.682762722 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/f-typeprint.c 2016-07-16 10:56:43.795019660 +0200
|
||||
@@ -147,7 +147,7 @@
|
||||
int show, int passed_a_ptr, int demangled_args,
|
||||
int arrayprint_recurse_level)
|
||||
int arrayprint_recurse_level, int print_rank_only)
|
||||
{
|
||||
- int upper_bound, lower_bound;
|
||||
+ LONGEST upper_bound, lower_bound;
|
||||
|
||||
/* No static variables are permitted as an error call may occur during
|
||||
execution of this function. */
|
||||
@@ -204,7 +204,7 @@ f_type_print_varspec_suffix (struct type
|
||||
@@ -194,7 +194,7 @@
|
||||
{
|
||||
lower_bound = f77_get_lowerbound (type);
|
||||
if (lower_bound != 1) /* Not the default. */
|
||||
- fprintf_filtered (stream, "%d:", lower_bound);
|
||||
+ fprintf_filtered (stream, "%s:", plongest (lower_bound));
|
||||
|
||||
lower_bound = f77_get_lowerbound (type);
|
||||
if (lower_bound != 1) /* Not the default. */
|
||||
- fprintf_filtered (stream, "%d:", lower_bound);
|
||||
+ fprintf_filtered (stream, "%s:", plongest (lower_bound));
|
||||
/* Make sure that, if we have an assumed size array, we
|
||||
print out a warning and print the upperbound as '*'. */
|
||||
@@ -204,7 +204,7 @@
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
- fprintf_filtered (stream, "%d", upper_bound);
|
||||
+ fprintf_filtered (stream, "%s", plongest (upper_bound));
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure that, if we have an assumed size array, we
|
||||
print out a warning and print the upperbound as '*'. */
|
||||
@@ -214,7 +214,7 @@ f_type_print_varspec_suffix (struct type
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
- fprintf_filtered (stream, "%d", upper_bound);
|
||||
+ fprintf_filtered (stream, "%s", plongest (upper_bound));
|
||||
}
|
||||
|
||||
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
@@ -283,7 +283,7 @@ void
|
||||
@@ -276,7 +276,7 @@
|
||||
f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
int level)
|
||||
{
|
||||
@ -103,7 +103,7 @@ Index: gdb-7.10.50.20151027/gdb/f-typeprint.c
|
||||
int index;
|
||||
|
||||
QUIT;
|
||||
@@ -365,7 +365,7 @@ f_type_print_base (struct type *type, st
|
||||
@@ -358,7 +358,7 @@
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
@ -112,11 +112,11 @@ Index: gdb-7.10.50.20151027/gdb/f-typeprint.c
|
||||
}
|
||||
break;
|
||||
|
||||
Index: gdb-7.10.50.20151027/gdb/f-valprint.c
|
||||
Index: gdb-7.11.50.20160630/gdb/f-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20151027.orig/gdb/f-valprint.c 2015-11-02 21:25:14.234161104 +0100
|
||||
+++ gdb-7.10.50.20151027/gdb/f-valprint.c 2015-11-02 21:25:22.405214867 +0100
|
||||
@@ -43,7 +43,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN
|
||||
--- gdb-7.11.50.20160630.orig/gdb/f-valprint.c 2016-07-16 10:56:11.682762722 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/f-valprint.c 2016-07-16 10:56:15.554793704 +0200
|
||||
@@ -43,7 +43,7 @@
|
||||
/* 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. */
|
||||
|
||||
@ -125,7 +125,7 @@ Index: gdb-7.10.50.20151027/gdb/f-valprint.c
|
||||
f77_get_lowerbound (struct type *type)
|
||||
{
|
||||
if (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED (type))
|
||||
@@ -52,7 +52,7 @@ f77_get_lowerbound (struct type *type)
|
||||
@@ -52,7 +52,7 @@
|
||||
return TYPE_ARRAY_LOWER_BOUND_VALUE (type);
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,7 @@
|
||||
Index: gdb-7.10.50.20151022/gdb/value.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20151022.orig/gdb/value.c 2015-10-24 23:17:04.042143628 +0200
|
||||
+++ gdb-7.10.50.20151022/gdb/value.c 2015-10-24 23:17:27.687300689 +0200
|
||||
@@ -934,7 +934,6 @@ allocate_value_lazy (struct type *type)
|
||||
description correctly. */
|
||||
check_typedef (type);
|
||||
|
||||
- ulongest_fits_host_or_error (TYPE_LENGTH (type));
|
||||
val = XCNEW (struct value);
|
||||
val->contents = NULL;
|
||||
val->next = all_values;
|
||||
Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.exp
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.base/longest-types-64bit.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.exp 2015-10-24 23:17:04.042143628 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.base/longest-types-64bit.exp 2016-07-03 15:00:57.617347850 +0200
|
||||
@@ -0,0 +1,59 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -45,8 +33,8 @@ Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.exp
|
||||
+
|
||||
+# Test 64-bit file first as it is not compiled so its compilation never fails.
|
||||
+
|
||||
+set file64bitbz2uu ${srcdir}/${subdir}/${testfile}-64bit.bz2.uu
|
||||
+set file64bit ${objdir}/${subdir}/${testfile}-64bit
|
||||
+set file64bitbz2uu ${srcdir}/${subdir}/${testfile}.bz2.uu
|
||||
+set file64bit ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+if {[catch "system \"uudecode -o - ${file64bitbz2uu} | bzip2 -dc >${file64bit}\""] != 0} {
|
||||
+ untested "failed uudecode or bzip2"
|
||||
@ -60,7 +48,7 @@ Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.exp
|
||||
+
|
||||
+clean_restart ${file64bit}
|
||||
+
|
||||
+#if { [prepare_for_testing ${testfile}.exp ${testfile}-64bit $srcfile2 {nodebug}] } {
|
||||
+#if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile2 {nodebug}] } {
|
||||
+# return -1
|
||||
+#}
|
||||
+
|
||||
@ -74,10 +62,10 @@ Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.exp
|
||||
+}
|
||||
+
|
||||
+test "native"
|
||||
Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.c
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.base/longest-types-64bit.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.c 2015-10-24 23:17:04.042143628 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.base/longest-types-64bit.c 2016-07-03 15:00:57.618347859 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -107,10 +95,10 @@ Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.c
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.S
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.base/longest-types-64bit.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.S 2015-10-24 23:17:04.042143628 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.base/longest-types-64bit.S 2016-07-03 15:00:57.618347859 +0200
|
||||
@@ -0,0 +1,249 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -361,10 +349,10 @@ Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.S
|
||||
+ .string "char"
|
||||
+ .ident "GCC: (GNU) 4.7.3 20121109 (prerelease)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu 2015-10-24 23:17:04.042143628 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu 2016-07-03 15:00:57.618347859 +0200
|
||||
@@ -0,0 +1,67 @@
|
||||
+begin 755 gdb.base/longest-types-64bit.bz2
|
||||
+M0EIH.3%!62936<'N#OH`"G/________^______?_Y______//]7SQD5'^/_%
|
||||
|
54
gdb-testsuite-py-unwind-m32.patch
Normal file
54
gdb-testsuite-py-unwind-m32.patch
Normal file
@ -0,0 +1,54 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-07/msg00180.html
|
||||
Subject: [testsuite patch] Skip py-unwind.exp on x86_64 -m32
|
||||
|
||||
|
||||
--vkogqOf2sHV7VnPd
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
(gdb) source /home/jkratoch/redhat/gdb-clean/gdb/testsuite/outputs/gdb.python/py-unwind/py-unwind.py^M
|
||||
Python script imported^M
|
||||
Python Exception <type 'exceptions.ValueError'> Bad register: ^M
|
||||
(gdb) FAIL: gdb.python/py-unwind.exp: import python scripts
|
||||
|
||||
class TestUnwinder(Unwinder):
|
||||
AMD64_RBP = 6
|
||||
AMD64_RSP = 7
|
||||
AMD64_RIP = 16
|
||||
|
||||
This was already discussed here:
|
||||
Re: [testsuite patch] Fix gdb.btrace/tailcall-only.exp errors on x86_64-m32
|
||||
https://sourceware.org/ml/gdb-patches/2016-04/msg00222.html
|
||||
Message-ID: <20160411195537.GA22299@host1.jankratochvil.net>
|
||||
but no GDB maintainer gave an answer how to run testsuite in cross-arch mode.
|
||||
|
||||
|
||||
Jan
|
||||
|
||||
--vkogqOf2sHV7VnPd
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename=1
|
||||
|
||||
gdb/testsuite/ChangeLog
|
||||
2016-07-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.python/py-unwind.exp: Test also ![is_lp64_target].
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp
|
||||
index 5172a03..e31a472 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-unwind.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-unwind.exp
|
||||
@@ -28,7 +28,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
||||
if { [skip_python_tests] } { continue }
|
||||
|
||||
# This test runs on a specific platform.
|
||||
-if { ! [istarget x86_64-*]} { continue }
|
||||
+if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue }
|
||||
|
||||
# The following tests require execution.
|
||||
|
||||
|
||||
--vkogqOf2sHV7VnPd--
|
||||
|
66
gdb-testsuite-selftest-cxx.patch
Normal file
66
gdb-testsuite-selftest-cxx.patch
Normal file
@ -0,0 +1,66 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-07/msg00179.html
|
||||
Subject: [testsuite patch] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB
|
||||
|
||||
|
||||
--ZGiS0Q5IWpPtfppv
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
tested on Fedora 24 x86_64 after:
|
||||
./configure; make
|
||||
That is: CFLAGS='-g -O2' CXXFLAGS='-g -O2'
|
||||
|
||||
OK for check-in?
|
||||
|
||||
|
||||
Jan
|
||||
|
||||
--ZGiS0Q5IWpPtfppv
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename=1
|
||||
|
||||
gdb/testsuite/ChangeLog
|
||||
2016-07-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.gdb/selftest.exp (do_steps_and_nexts): Add "next over TRY" and
|
||||
"step into captured_main (args)".
|
||||
(test_with_self): Add "captured_main (args);" case.
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
index af0026c..2cdd5c1 100644
|
||||
--- a/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
@@ -116,6 +116,14 @@ proc do_steps_and_nexts {} {
|
||||
set description "next over lim_at_start initialization"
|
||||
set command "next"
|
||||
}
|
||||
+ -re ".*TRY.*$gdb_prompt $" {
|
||||
+ set description "next over TRY"
|
||||
+ set command "next"
|
||||
+ }
|
||||
+ -re ".*captured_main \\(args\\);.*$gdb_prompt $" {
|
||||
+ set description "step into captured_main (args)"
|
||||
+ set command "step"
|
||||
+ }
|
||||
-re ".*count . 0x3.*$gdb_prompt $" {
|
||||
set description "next over conditional stack alignment code 1"
|
||||
set command "next"
|
||||
@@ -330,6 +338,13 @@ proc test_with_self { executable } {
|
||||
-re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.*$gdb_prompt $" {
|
||||
xfail "$description (line numbers scrambled?)"
|
||||
}
|
||||
+ -re "captured_main \\(args\\);\r\n$gdb_prompt $" {
|
||||
+ gdb_test_multiple "step" "$description" {
|
||||
+ -re "captured_main .data.* at .*main.c:.*$gdb_prompt $" {
|
||||
+ pass "$description"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
-re "vfork: No more processes.*$gdb_prompt $" {
|
||||
fail "$description (out of virtual memory)"
|
||||
set timeout $oldtimeout
|
||||
|
||||
--ZGiS0Q5IWpPtfppv--
|
||||
|
@ -1,42 +0,0 @@
|
||||
Re: [PATCH 04/23] vla: make dynamic fortran arrays functional.
|
||||
https://sourceware.org/ml/gdb-patches/2014-06/msg00570.html
|
||||
|
||||
Index: gdb-7.10.50.20151027/gdb/valarith.c
|
||||
===================================================================
|
||||
--- gdb-7.10.50.20151027.orig/gdb/valarith.c 2015-11-03 20:41:48.543504999 +0100
|
||||
+++ gdb-7.10.50.20151027/gdb/valarith.c 2015-11-03 20:46:36.995238888 +0100
|
||||
@@ -193,10 +193,17 @@ 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_units (elt_type);
|
||||
- unsigned int elt_offs = longest_to_int (index - lowerbound);
|
||||
+ unsigned int elt_offs;
|
||||
LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type));
|
||||
struct value *v;
|
||||
|
||||
+ if (TYPE_NOT_ASSOCIATED (array_type))
|
||||
+ error (_("no such vector element (vector not associated)"));
|
||||
+ if (TYPE_NOT_ALLOCATED (array_type))
|
||||
+ error (_("no such vector element (vector not allocated)"));
|
||||
+
|
||||
+ elt_offs = longest_to_int (index - lowerbound);
|
||||
+
|
||||
if (elt_stride > 0)
|
||||
elt_offs *= elt_stride;
|
||||
else if (elt_stride < 0)
|
||||
@@ -210,14 +217,7 @@ value_subscripted_rvalue (struct value *
|
||||
|
||||
if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
|
||||
&& elt_offs >= type_length_units (array_type)))
|
||||
- {
|
||||
- if (type_not_associated (array_type))
|
||||
- error (_("no such vector element (vector not associated)"));
|
||||
- else if (type_not_allocated (array_type))
|
||||
- error (_("no such vector element (vector not allocated)"));
|
||||
- else
|
||||
- error (_("no such vector element"));
|
||||
- }
|
||||
+ error (_("no such vector element"));
|
||||
|
||||
if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
|
||||
v = allocate_value_lazy (elt_type);
|
180
gdb-vla-intel-1of7.patch
Normal file
180
gdb-vla-intel-1of7.patch
Normal file
@ -0,0 +1,180 @@
|
||||
From 26e156d62211ca8458faa326f21940e9fa18c8fe Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
Date: Tue, 12 Jul 2016 08:19:34 +0200
|
||||
Subject: [PATCH 1/7] Fortran: Testsuite, fix differences in type naming.
|
||||
|
||||
Continued on 0c13f7e559afe5f973a59311b0e401296c48d96c
|
||||
(fortran: Testsuite, fix different type naming across compilers).
|
||||
|
||||
2016-06-08 Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
|
||||
gdb/Testsuite/Changelog:
|
||||
* gdb.fortran/vla-value.exp: Use type names defined in libfortran.
|
||||
* gdb.mi/mi-var-child-f.exp: Likewise.
|
||||
* gdb.mi/mi-vla-fortran.exp: Likewise.
|
||||
|
||||
Change-Id: I7ee94587a992add27fec77c7726f9a69c8fdf373
|
||||
---
|
||||
gdb/testsuite/gdb.fortran/vla-value.exp | 12 ++++++++----
|
||||
gdb/testsuite/gdb.mi/mi-var-child-f.exp | 7 +++----
|
||||
gdb/testsuite/gdb.mi/mi-vla-fortran.exp | 18 +++++++++++-------
|
||||
3 files changed, 22 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp
|
||||
index 0945181..275f738 100644
|
||||
--- a/gdb/testsuite/gdb.fortran/vla-value.exp
|
||||
+++ b/gdb/testsuite/gdb.fortran/vla-value.exp
|
||||
@@ -14,6 +14,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
standard_testfile "vla.f90"
|
||||
+load_lib "fortran.exp"
|
||||
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
|
||||
{debug f90 quiet}] } {
|
||||
@@ -25,12 +26,15 @@ if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
|
||||
+# Depending on the compiler being used, the type names can be printed differently.
|
||||
+set real [fortran_real4]
|
||||
+
|
||||
# Try to access values in non allocated VLA
|
||||
gdb_breakpoint [gdb_get_line_number "vla1-init"]
|
||||
gdb_continue_to_breakpoint "vla1-init"
|
||||
gdb_test "print vla1" " = <not allocated>" "print non-allocated vla1"
|
||||
gdb_test "print &vla1" \
|
||||
- " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(<not allocated>\\\)\\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(<not allocated>\\\)\\\)\\\) $hex" \
|
||||
"print non-allocated &vla1"
|
||||
gdb_test "print vla1(1,1,1)" "no such vector element \\\(vector not allocated\\\)" \
|
||||
"print member in non-allocated vla1 (1)"
|
||||
@@ -51,7 +55,7 @@ with_timeout_factor 15 {
|
||||
"step over value assignment of vla1"
|
||||
}
|
||||
gdb_test "print &vla1" \
|
||||
- " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\)\\\)\\\) $hex" \
|
||||
"print allocated &vla1"
|
||||
gdb_test "print vla1(3, 6, 9)" " = 1311" "print allocated vla1(3,6,9)"
|
||||
gdb_test "print vla1(1, 3, 8)" " = 1311" "print allocated vla1(1,3,8)"
|
||||
@@ -71,7 +75,7 @@ gdb_test "print vla1(9, 9, 9)" " = 999" \
|
||||
# Try to access values in undefined pointer to VLA (dangling)
|
||||
gdb_test "print pvla" " = <not associated>" "print undefined pvla"
|
||||
gdb_test "print &pvla" \
|
||||
- " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(<not associated>\\\)\\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(<not associated>\\\)\\\)\\\) $hex" \
|
||||
"print non-associated &pvla"
|
||||
gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated\\\)" \
|
||||
"print undefined pvla(1,3,8)"
|
||||
@@ -80,7 +84,7 @@ gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated
|
||||
gdb_breakpoint [gdb_get_line_number "pvla-associated"]
|
||||
gdb_continue_to_breakpoint "pvla-associated"
|
||||
gdb_test "print &pvla" \
|
||||
- " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\)\\\)\\\) $hex" \
|
||||
"print associated &pvla"
|
||||
gdb_test "print pvla(3, 6, 9)" " = 42" "print associated pvla(3,6,9)"
|
||||
gdb_test "print pvla(1, 3, 8)" " = 1001" "print associated pvla(1,3,8)"
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-var-child-f.exp b/gdb/testsuite/gdb.mi/mi-var-child-f.exp
|
||||
index f3ed7c2..bc44c6b 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-var-child-f.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-var-child-f.exp
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
+load_lib "fortran.exp"
|
||||
|
||||
if { [skip_fortran_tests] } { return -1 }
|
||||
|
||||
@@ -40,10 +41,8 @@ mi_runto MAIN__
|
||||
mi_create_varobj "array" "array" "create local variable array"
|
||||
|
||||
|
||||
-# Depending on the compiler version being used, the name of the 4-byte integer
|
||||
-# and real types can be printed differently. For instance, gfortran-4.1 uses
|
||||
-# "int4" whereas gfortran-4.3 uses "integer(kind=4)".
|
||||
-set int4 "(int4|integer\\(kind=4\\))"
|
||||
+# Depending on the compiler being used, the type names can be printed differently.
|
||||
+set int4 [fortran_int4]
|
||||
|
||||
set children [list [list "array.-1" "-1" 2 "$int4 \\(2\\)"] \
|
||||
[list "array.0" "0" 2 "$int4 \\(2\\)"] \
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
|
||||
index 333b71a..1779ec0 100644
|
||||
--- a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
+load_lib "fortran.exp"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
@@ -32,6 +33,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
|
||||
return -1
|
||||
}
|
||||
|
||||
+# Depending on the compiler being used, the type names can be printed differently.
|
||||
+set real [fortran_real4]
|
||||
+
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
@@ -58,7 +62,7 @@ mi_gdb_test "503-var-evaluate-expression vla1_not_allocated" \
|
||||
"503\\^done,value=\"\\\[0\\\]\"" \
|
||||
"eval variable vla1_not_allocated"
|
||||
mi_list_array_varobj_children_with_index "vla1_not_allocated" "0" "1" \
|
||||
- "real\\\(kind=4\\\)" "get children of vla1_not_allocated"
|
||||
+ "$real" "get children of vla1_not_allocated"
|
||||
|
||||
|
||||
|
||||
@@ -71,10 +75,10 @@ mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
|
||||
mi_gdb_test "510-data-evaluate-expression vla1" \
|
||||
"510\\^done,value=\"\\(.*\\)\"" "evaluate allocated vla"
|
||||
|
||||
-mi_create_varobj_checked vla1_allocated vla1 "real\\\(kind=4\\\) \\\(5\\\)" \
|
||||
+mi_create_varobj_checked vla1_allocated vla1 "$real \\\(5\\\)" \
|
||||
"create local variable vla1_allocated"
|
||||
mi_gdb_test "511-var-info-type vla1_allocated" \
|
||||
- "511\\^done,type=\"real\\\(kind=4\\\) \\\(5\\\)\"" \
|
||||
+ "511\\^done,type=\"$real \\\(5\\\)\"" \
|
||||
"info type variable vla1_allocated"
|
||||
mi_gdb_test "512-var-show-format vla1_allocated" \
|
||||
"512\\^done,format=\"natural\"" \
|
||||
@@ -83,7 +87,7 @@ mi_gdb_test "513-var-evaluate-expression vla1_allocated" \
|
||||
"513\\^done,value=\"\\\[5\\\]\"" \
|
||||
"eval variable vla1_allocated"
|
||||
mi_list_array_varobj_children_with_index "vla1_allocated" "5" "1" \
|
||||
- "real\\\(kind=4\\\)" "get children of vla1_allocated"
|
||||
+ "$real" "get children of vla1_allocated"
|
||||
|
||||
|
||||
set bp_lineno [gdb_get_line_number "vla1-filled"]
|
||||
@@ -148,7 +152,7 @@ gdb_expect {
|
||||
"583\\^done,value=\"\\\[0\\\]\"" \
|
||||
"eval variable pvla2_not_associated"
|
||||
mi_list_array_varobj_children_with_index "pvla2_not_associated" "0" "1" \
|
||||
- "real\\\(kind=4\\\)" "get children of pvla2_not_associated"
|
||||
+ "$real" "get children of pvla2_not_associated"
|
||||
}
|
||||
-re "580\\^error,msg=\"value contents too large \\(\[0-9\]+ bytes\\).*${mi_gdb_prompt}$" {
|
||||
# Undefined behaviour in gfortran.
|
||||
@@ -173,9 +177,9 @@ mi_gdb_test "590-data-evaluate-expression pvla2" \
|
||||
"evaluate associated vla"
|
||||
|
||||
mi_create_varobj_checked pvla2_associated pvla2 \
|
||||
- "real\\\(kind=4\\\) \\\(5,2\\\)" "create local variable pvla2_associated"
|
||||
+ "$real \\\(5,2\\\)" "create local variable pvla2_associated"
|
||||
mi_gdb_test "591-var-info-type pvla2_associated" \
|
||||
- "591\\^done,type=\"real\\\(kind=4\\\) \\\(5,2\\\)\"" \
|
||||
+ "591\\^done,type=\"$real \\\(5,2\\\)\"" \
|
||||
"info type variable pvla2_associated"
|
||||
mi_gdb_test "592-var-show-format pvla2_associated" \
|
||||
"592\\^done,format=\"natural\"" \
|
||||
--
|
||||
2.7.4
|
||||
|
75
gdb-vla-intel-2of7.patch
Normal file
75
gdb-vla-intel-2of7.patch
Normal file
@ -0,0 +1,75 @@
|
||||
From a879b2501e61ee3d3efadbdb6b33212b57d3a2e1 Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
Date: Tue, 12 Jul 2016 08:19:34 +0200
|
||||
Subject: [PATCH 2/7] Fortran: Resolve dynamic properties of pointer types.
|
||||
|
||||
In Fortran a pointer may have a dynamic associated property.
|
||||
|
||||
2016-07-08 Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
|
||||
gdb/Changelog:
|
||||
* gdbtypes.c (resolve_dynamic_types_internal): Resolve pointer types.
|
||||
(resolve_dynamic_pointer): New.
|
||||
|
||||
Change-Id: Ie4b9d6397cfa089ee2e0db02beb18415a751c1c0
|
||||
---
|
||||
gdb/gdbtypes.c | 29 ++++++++++++++++++++++++++++-
|
||||
1 file changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
||||
index ec5c17a..b53e649 100644
|
||||
--- a/gdb/gdbtypes.c
|
||||
+++ b/gdb/gdbtypes.c
|
||||
@@ -1806,7 +1806,8 @@ is_dynamic_type_internal (struct type *type, int top_level)
|
||||
type = check_typedef (type);
|
||||
|
||||
/* We only want to recognize references at the outermost level. */
|
||||
- if (top_level && TYPE_CODE (type) == TYPE_CODE_REF)
|
||||
+ if (top_level &&
|
||||
+ (TYPE_CODE (type) == TYPE_CODE_REF || TYPE_CODE (type) == TYPE_CODE_PTR))
|
||||
type = check_typedef (TYPE_TARGET_TYPE (type));
|
||||
|
||||
/* Types that have a dynamic TYPE_DATA_LOCATION are considered
|
||||
@@ -2105,6 +2106,28 @@ resolve_dynamic_struct (struct type *type,
|
||||
return resolved_type;
|
||||
}
|
||||
|
||||
+/* Worker for pointer types. */
|
||||
+
|
||||
+static struct type *
|
||||
+resolve_dynamic_pointer (struct type *type,
|
||||
+ struct property_addr_info *addr_stack)
|
||||
+{
|
||||
+ struct dynamic_prop *prop;
|
||||
+ CORE_ADDR value;
|
||||
+
|
||||
+ type = copy_type (type);
|
||||
+
|
||||
+ /* Resolve associated property. */
|
||||
+ prop = TYPE_ASSOCIATED_PROP (type);
|
||||
+ if (prop != NULL && dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
|
||||
+ {
|
||||
+ TYPE_DYN_PROP_ADDR (prop) = value;
|
||||
+ TYPE_DYN_PROP_KIND (prop) = PROP_CONST;
|
||||
+ }
|
||||
+
|
||||
+ return type;
|
||||
+}
|
||||
+
|
||||
/* Worker for resolved_dynamic_type. */
|
||||
|
||||
static struct type *
|
||||
@@ -2153,6 +2176,10 @@ resolve_dynamic_type_internal (struct type *type,
|
||||
break;
|
||||
}
|
||||
|
||||
+ case TYPE_CODE_PTR:
|
||||
+ resolved_type = resolve_dynamic_pointer (type, addr_stack);
|
||||
+ break;
|
||||
+
|
||||
case TYPE_CODE_ARRAY:
|
||||
resolved_type = resolve_dynamic_array (type, addr_stack);
|
||||
break;
|
||||
--
|
||||
2.7.4
|
||||
|
113
gdb-vla-intel-3of7.patch
Normal file
113
gdb-vla-intel-3of7.patch
Normal file
@ -0,0 +1,113 @@
|
||||
From d2fd5fea2c06052c53d99bfa25fdaed9cf5dd217 Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
Date: Tue, 12 Jul 2016 08:19:34 +0200
|
||||
Subject: [PATCH 3/7] Typeprint: Resolve any dynamic target type of a pointer.
|
||||
|
||||
Before continuing with language specific type printing
|
||||
we have to resolve the target type of a pointer
|
||||
as we might wanna print more details of the target
|
||||
like the dimension of an array. We have to resolve it here
|
||||
as we don't have any address information later on.
|
||||
|
||||
2016-07-08 Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
|
||||
gdb/Changelog:
|
||||
* typeprint.c (whatis_exp): Resolve dynamic target type
|
||||
of pointers.
|
||||
|
||||
gdb/Testsuite/Changelog:
|
||||
* gdb.cp/vla-cxx.cc: Added pointer to dynamic type.
|
||||
* gdb.cp/vla-cxx.exp: Test pointer to dynamic type.
|
||||
|
||||
Change-Id: Idff0d6dd0eab3125b45d470a12b5e66b392e42c3
|
||||
---
|
||||
gdb/testsuite/gdb.cp/vla-cxx.cc | 9 +++++++++
|
||||
gdb/testsuite/gdb.cp/vla-cxx.exp | 5 +++++
|
||||
gdb/typeprint.c | 19 +++++++++++++++++++
|
||||
3 files changed, 33 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/vla-cxx.cc b/gdb/testsuite/gdb.cp/vla-cxx.cc
|
||||
index a1fd510..5f8f8ab 100644
|
||||
--- a/gdb/testsuite/gdb.cp/vla-cxx.cc
|
||||
+++ b/gdb/testsuite/gdb.cp/vla-cxx.cc
|
||||
@@ -15,6 +15,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
+extern "C" {
|
||||
+#include <stddef.h>
|
||||
+}
|
||||
+
|
||||
struct container;
|
||||
|
||||
struct element
|
||||
@@ -40,11 +44,16 @@ int main(int argc, char **argv)
|
||||
typedef typeof (vla) &vlareftypedef;
|
||||
vlareftypedef vlaref2 (vla);
|
||||
container c;
|
||||
+ typeof (vla) *ptr = NULL;
|
||||
+
|
||||
+ // Before pointer assignment
|
||||
+ ptr = &vla;
|
||||
|
||||
for (int i = 0; i < z; ++i)
|
||||
vla[i] = 5 + 2 * i;
|
||||
|
||||
// vlas_filled
|
||||
vla[0] = 2 * vla[0];
|
||||
+
|
||||
return vla[2];
|
||||
}
|
||||
diff --git a/gdb/testsuite/gdb.cp/vla-cxx.exp b/gdb/testsuite/gdb.cp/vla-cxx.exp
|
||||
index f6224dc..babdfb7 100644
|
||||
--- a/gdb/testsuite/gdb.cp/vla-cxx.exp
|
||||
+++ b/gdb/testsuite/gdb.cp/vla-cxx.exp
|
||||
@@ -23,6 +23,10 @@ if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
|
||||
+gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
|
||||
+gdb_continue_to_breakpoint "Before pointer assignment"
|
||||
+gdb_test "ptype ptr" "int \\(\\*\\)\\\[variable length\\\]" "ptype ptr, Before pointer assignment"
|
||||
+
|
||||
gdb_breakpoint [gdb_get_line_number "vlas_filled"]
|
||||
gdb_continue_to_breakpoint "vlas_filled"
|
||||
|
||||
@@ -33,3 +37,4 @@ gdb_test "print vlaref" " = \\(int \\(&\\)\\\[3\\\]\\) @$hex: \\{5, 7, 9\\}"
|
||||
# bug being tested, it's better not to depend on the exact spelling.
|
||||
gdb_test "print vlaref2" " = \\(.*\\) @$hex: \\{5, 7, 9\\}"
|
||||
gdb_test "print c" " = \\{e = \\{c = @$hex\\}\\}"
|
||||
+gdb_test "ptype ptr" "int \\(\\*\\)\\\[3\\\]"
|
||||
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
|
||||
index e77513e..e3d84c7 100644
|
||||
--- a/gdb/typeprint.c
|
||||
+++ b/gdb/typeprint.c
|
||||
@@ -485,6 +485,25 @@ whatis_exp (char *exp, int show)
|
||||
printf_filtered (" */\n");
|
||||
}
|
||||
|
||||
+ /* Resolve any dynamic target type, as we might print
|
||||
+ additional information about the target.
|
||||
+ For example, in Fortran and C we are printing the dimension of the
|
||||
+ dynamic array the pointer is pointing to. */
|
||||
+ if (TYPE_CODE (type) == TYPE_CODE_PTR
|
||||
+ && is_dynamic_type (type) == 1)
|
||||
+ {
|
||||
+ CORE_ADDR addr;
|
||||
+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE(type)))
|
||||
+ addr = value_address (val);
|
||||
+ else
|
||||
+ addr = value_as_address (val);
|
||||
+
|
||||
+ if (addr != 0
|
||||
+ && type_not_associated (type) == 0)
|
||||
+ TYPE_TARGET_TYPE (type) = resolve_dynamic_type (TYPE_TARGET_TYPE (type),
|
||||
+ NULL, addr);
|
||||
+ }
|
||||
+
|
||||
LA_PRINT_TYPE (type, "", gdb_stdout, show, 0, &flags);
|
||||
printf_filtered ("\n");
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
508
gdb-vla-intel-4of7.patch
Normal file
508
gdb-vla-intel-4of7.patch
Normal file
@ -0,0 +1,508 @@
|
||||
From f63782d25ebd593c4c4669d4c394a2706f15e660 Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
Date: Tue, 12 Jul 2016 08:19:34 +0200
|
||||
Subject: [PATCH 4/7] Fortran: Typeprint, fix dangling types.
|
||||
|
||||
Show the type of not-allocated and/or not-associated types
|
||||
as this is known. For array types and pointer to array types
|
||||
we are going to print the number of ranks.
|
||||
|
||||
2016-06-30 Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
|
||||
gdb/ChangeLog:
|
||||
* f-typeprint.c (f_print_type): Don't bypass dangling types.
|
||||
(f_type_print_varspec_suffix): Add print_rank parameter.
|
||||
(f_type_print_varspec_suffix): Print ranks of array types
|
||||
in case they dangling.
|
||||
(f_type_print_base): Add print_rank parameter.
|
||||
|
||||
gdb/Testsuite/ChangeLog:
|
||||
* gdb.fortran/pointers.f90: New.
|
||||
* gdb.fortran/print_type.exp: New.
|
||||
* gdb.fortran/vla-ptype.exp: Adapt expected results.
|
||||
* gdb.fortran/vla-type.exp: Likewise.
|
||||
* gdb.fortran/vla-value.exp: Likewise.
|
||||
* gdb.mi/mi-vla-fortran.exp: Likewise.
|
||||
|
||||
Change-Id: Ib55f28b4092cf88e34918449a2ebb6e5daafe512
|
||||
---
|
||||
gdb/f-typeprint.c | 95 +++++++++++++++--------------
|
||||
gdb/testsuite/gdb.fortran/pointers.f90 | 80 +++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/print_type.exp | 100 +++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/vla-ptype.exp | 12 ++--
|
||||
gdb/testsuite/gdb.fortran/vla-type.exp | 7 ++-
|
||||
gdb/testsuite/gdb.fortran/vla-value.exp | 4 +-
|
||||
gdb/testsuite/gdb.mi/mi-vla-fortran.exp | 9 +--
|
||||
7 files changed, 248 insertions(+), 59 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/pointers.f90
|
||||
create mode 100755 gdb/testsuite/gdb.fortran/print_type.exp
|
||||
|
||||
Index: gdb-7.11.50.20160630/gdb/f-typeprint.c
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/f-typeprint.c 2016-07-16 10:54:48.749099150 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/f-typeprint.c 2016-07-16 10:55:59.763667355 +0200
|
||||
@@ -37,7 +37,7 @@
|
||||
#endif
|
||||
|
||||
static void f_type_print_varspec_suffix (struct type *, struct ui_file *, int,
|
||||
- int, int, int);
|
||||
+ int, int, int, int);
|
||||
|
||||
void f_type_print_varspec_prefix (struct type *, struct ui_file *,
|
||||
int, int);
|
||||
@@ -54,18 +54,6 @@
|
||||
enum type_code code;
|
||||
int demangled_args;
|
||||
|
||||
- if (type_not_associated (type))
|
||||
- {
|
||||
- val_print_not_associated (stream);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (type_not_allocated (type))
|
||||
- {
|
||||
- val_print_not_allocated (stream);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
f_type_print_base (type, stream, show, level);
|
||||
code = TYPE_CODE (type);
|
||||
if ((varstring != NULL && *varstring != '\0')
|
||||
@@ -87,7 +75,7 @@
|
||||
so don't print an additional pair of ()'s. */
|
||||
|
||||
demangled_args = varstring[strlen (varstring) - 1] == ')';
|
||||
- f_type_print_varspec_suffix (type, stream, show, 0, demangled_args, 0);
|
||||
+ f_type_print_varspec_suffix (type, stream, show, 0, demangled_args, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +145,7 @@
|
||||
static void
|
||||
f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
int show, int passed_a_ptr, int demangled_args,
|
||||
- int arrayprint_recurse_level)
|
||||
+ int arrayprint_recurse_level, int print_rank_only)
|
||||
{
|
||||
int upper_bound, lower_bound;
|
||||
|
||||
@@ -181,34 +169,50 @@
|
||||
fprintf_filtered (stream, "(");
|
||||
|
||||
if (type_not_associated (type))
|
||||
- val_print_not_associated (stream);
|
||||
+ print_rank_only = 1;
|
||||
else if (type_not_allocated (type))
|
||||
- val_print_not_allocated (stream);
|
||||
+ print_rank_only = 1;
|
||||
+ else if ((TYPE_ASSOCIATED_PROP (type)
|
||||
+ && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_ASSOCIATED_PROP (type)))
|
||||
+ || (TYPE_ALLOCATED_PROP (type)
|
||||
+ && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_ALLOCATED_PROP (type)))
|
||||
+ || (TYPE_DATA_LOCATION (type)
|
||||
+ && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_DATA_LOCATION (type))))
|
||||
+ /* This case exist when we ptype a typename which has the
|
||||
+ dynamic properties but cannot be resolved as there is
|
||||
+ no object. */
|
||||
+ print_rank_only = 1;
|
||||
+
|
||||
+ if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY)
|
||||
+ f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
+ 0, 0, arrayprint_recurse_level,
|
||||
+ print_rank_only);
|
||||
+
|
||||
+ if (print_rank_only == 1)
|
||||
+ fprintf_filtered (stream, ":");
|
||||
else
|
||||
- {
|
||||
- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY)
|
||||
- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
- 0, 0, arrayprint_recurse_level);
|
||||
-
|
||||
- lower_bound = f77_get_lowerbound (type);
|
||||
- if (lower_bound != 1) /* Not the default. */
|
||||
- fprintf_filtered (stream, "%d:", lower_bound);
|
||||
-
|
||||
- /* Make sure that, if we have an assumed size array, we
|
||||
- print out a warning and print the upperbound as '*'. */
|
||||
-
|
||||
- if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
- fprintf_filtered (stream, "*");
|
||||
- else
|
||||
- {
|
||||
- upper_bound = f77_get_upperbound (type);
|
||||
- fprintf_filtered (stream, "%d", upper_bound);
|
||||
- }
|
||||
-
|
||||
- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
- 0, 0, arrayprint_recurse_level);
|
||||
- }
|
||||
+ {
|
||||
+ lower_bound = f77_get_lowerbound (type);
|
||||
+ if (lower_bound != 1) /* Not the default. */
|
||||
+ fprintf_filtered (stream, "%d:", lower_bound);
|
||||
+
|
||||
+ /* Make sure that, if we have an assumed size array, we
|
||||
+ print out a warning and print the upperbound as '*'. */
|
||||
+
|
||||
+ if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
+ fprintf_filtered (stream, "*");
|
||||
+ else
|
||||
+ {
|
||||
+ upper_bound = f77_get_upperbound (type);
|
||||
+ fprintf_filtered (stream, "%d", upper_bound);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
+ f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
+ 0, 0, arrayprint_recurse_level,
|
||||
+ print_rank_only);
|
||||
+
|
||||
if (arrayprint_recurse_level == 1)
|
||||
fprintf_filtered (stream, ")");
|
||||
else
|
||||
@@ -219,13 +223,14 @@
|
||||
case TYPE_CODE_PTR:
|
||||
case TYPE_CODE_REF:
|
||||
f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0,
|
||||
- arrayprint_recurse_level);
|
||||
+ arrayprint_recurse_level, 0);
|
||||
fprintf_filtered (stream, ")");
|
||||
break;
|
||||
|
||||
case TYPE_CODE_FUNC:
|
||||
f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
- passed_a_ptr, 0, arrayprint_recurse_level);
|
||||
+ passed_a_ptr, 0, arrayprint_recurse_level,
|
||||
+ 0);
|
||||
if (passed_a_ptr)
|
||||
fprintf_filtered (stream, ")");
|
||||
|
||||
@@ -376,7 +381,7 @@
|
||||
fputs_filtered (" :: ", stream);
|
||||
fputs_filtered (TYPE_FIELD_NAME (type, index), stream);
|
||||
f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index),
|
||||
- stream, show - 1, 0, 0, 0);
|
||||
+ stream, show - 1, 0, 0, 0, 0);
|
||||
fputs_filtered ("\n", stream);
|
||||
}
|
||||
fprintfi_filtered (level, stream, "End Type ");
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/pointers.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/pointers.f90 2016-07-16 10:55:42.079525860 +0200
|
||||
@@ -0,0 +1,80 @@
|
||||
+! Copyright 2016 Free Software Foundation, Inc.
|
||||
+!
|
||||
+! This program is free software; you can redistribute it and/or modify
|
||||
+! it under the terms of the GNU General Public License as published by
|
||||
+! the Free Software Foundation; either version 3 of the License, or
|
||||
+! (at your option) any later version.
|
||||
+!
|
||||
+! This program is distributed in the hope that it will be useful,
|
||||
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+! GNU General Public License for more details.
|
||||
+!
|
||||
+! You should have received a copy of the GNU General Public License
|
||||
+! along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+program pointers
|
||||
+
|
||||
+ type :: two
|
||||
+ integer, allocatable :: ivla1 (:)
|
||||
+ integer, allocatable :: ivla2 (:, :)
|
||||
+ end type two
|
||||
+
|
||||
+ logical, target :: logv
|
||||
+ complex, target :: comv
|
||||
+ character, target :: charv
|
||||
+ character (len=3), target :: chara
|
||||
+ integer, target :: intv
|
||||
+ integer, target, dimension (10,2) :: inta
|
||||
+ real, target :: realv
|
||||
+ type(two), target :: twov
|
||||
+
|
||||
+ logical, pointer :: logp
|
||||
+ complex, pointer :: comp
|
||||
+ character, pointer:: charp
|
||||
+ character (len=3), pointer:: charap
|
||||
+ integer, pointer :: intp
|
||||
+ integer, pointer, dimension (:,:) :: intap
|
||||
+ real, pointer :: realp
|
||||
+ type(two), pointer :: twop
|
||||
+
|
||||
+ nullify (logp)
|
||||
+ nullify (comp)
|
||||
+ nullify (charp)
|
||||
+ nullify (charap)
|
||||
+ nullify (intp)
|
||||
+ nullify (intap)
|
||||
+ nullify (realp)
|
||||
+ nullify (twop)
|
||||
+
|
||||
+ logp => logv ! Before pointer assignment
|
||||
+ comp => comv
|
||||
+ charp => charv
|
||||
+ charap => chara
|
||||
+ intp => intv
|
||||
+ intap => inta
|
||||
+ realp => realv
|
||||
+ twop => twov
|
||||
+
|
||||
+ logv = associated(logp) ! Before value assignment
|
||||
+ comv = cmplx(1,2)
|
||||
+ charv = "a"
|
||||
+ chara = "abc"
|
||||
+ intv = 10
|
||||
+ inta(:,:) = 1
|
||||
+ inta(3,1) = 3
|
||||
+ realv = 3.14
|
||||
+
|
||||
+ allocate (twov%ivla1(3))
|
||||
+ allocate (twov%ivla2(2,2))
|
||||
+ twov%ivla1(1) = 11
|
||||
+ twov%ivla1(2) = 12
|
||||
+ twov%ivla1(3) = 13
|
||||
+ twov%ivla2(1,1) = 211
|
||||
+ twov%ivla2(2,1) = 221
|
||||
+ twov%ivla2(1,2) = 212
|
||||
+ twov%ivla2(2,2) = 222
|
||||
+
|
||||
+ intv = intv + 1 ! After value assignment
|
||||
+
|
||||
+end program pointers
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/print_type.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/print_type.exp 2016-07-16 10:55:42.079525860 +0200
|
||||
@@ -0,0 +1,100 @@
|
||||
+# Copyright 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile "pointers.f90"
|
||||
+load_lib fortran.exp
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
|
||||
+ {debug f90 quiet}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ untested "could not run to main"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Depending on the compiler being used, the type names can be printed differently.
|
||||
+set logical [fortran_logical4]
|
||||
+set real [fortran_real4]
|
||||
+set int [fortran_int4]
|
||||
+set complex [fortran_complex4]
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
|
||||
+gdb_continue_to_breakpoint "Before pointer assignment"
|
||||
+gdb_test "ptype logp" "type = PTR TO -> \\( $logical \\)" "ptype logp, not associated"
|
||||
+gdb_test "ptype comp" "type = PTR TO -> \\( $complex \\)" "ptype comp, not associated"
|
||||
+gdb_test "ptype charp" "type = PTR TO -> \\( character\\*1 \\)" "ptype charp, not associated"
|
||||
+gdb_test "ptype charap" "type = PTR TO -> \\( character\\*3 \\)" "ptype charap, not associated"
|
||||
+gdb_test "ptype intp" "type = PTR TO -> \\( $int \\)" "ptype intp, not associated"
|
||||
+set test "ptype intap, not associated"
|
||||
+gdb_test_multiple "ptype intap" $test {
|
||||
+ -re "type = PTR TO -> \\( $int \\(:,:\\)\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = $int \\(:,:\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "ptype realp" "type = PTR TO -> \\( $real \\)" "ptype realp, not associated"
|
||||
+gdb_test "ptype twop" \
|
||||
+ [multi_line "type = PTR TO -> \\( Type two" \
|
||||
+ " $int :: ivla1\\(:\\)" \
|
||||
+ " $int :: ivla2\\(:,:\\)" \
|
||||
+ "End Type two \\)"] \
|
||||
+ "ptype twop, not associated"
|
||||
+gdb_test "ptype two" \
|
||||
+ [multi_line "type = Type two" \
|
||||
+ " $int :: ivla1\\(:\\)" \
|
||||
+ " $int :: ivla2\\(:,:\\)" \
|
||||
+ "End Type two"]
|
||||
+
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "Before value assignment"]
|
||||
+gdb_continue_to_breakpoint "Before value assignment"
|
||||
+gdb_test "ptype twop" \
|
||||
+ [multi_line "type = PTR TO -> \\( Type two" \
|
||||
+ " $int :: ivla1\\(:\\)" \
|
||||
+ " $int :: ivla2\\(:,:\\)" \
|
||||
+ "End Type two \\)"]
|
||||
+
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "After value assignment"]
|
||||
+gdb_continue_to_breakpoint "After value assignment"
|
||||
+gdb_test "ptype logv" "type = $logical"
|
||||
+gdb_test "ptype comv" "type = $complex"
|
||||
+gdb_test "ptype charv" "type = character\\*1"
|
||||
+gdb_test "ptype chara" "type = character\\*3"
|
||||
+gdb_test "ptype intv" "type = $int"
|
||||
+gdb_test "ptype inta" "type = $int \\(10,2\\)"
|
||||
+gdb_test "ptype realv" "type = $real"
|
||||
+
|
||||
+
|
||||
+gdb_test "ptype logp" "type = PTR TO -> \\( $logical \\)"
|
||||
+gdb_test "ptype comp" "type = PTR TO -> \\( $complex \\)"
|
||||
+gdb_test "ptype charp" "type = PTR TO -> \\( character\\*1 \\)"
|
||||
+gdb_test "ptype charap" "type = PTR TO -> \\( character\\*3 \\)"
|
||||
+gdb_test "ptype intp" "type = PTR TO -> \\( $int \\)"
|
||||
+set test "ptype intap"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "type = $int \\(10,2\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = PTR TO -> \\( $int \\(10,2\\)\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "ptype realp" "type = PTR TO -> \\( $real \\)"
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/vla-ptype.exp
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/testsuite/gdb.fortran/vla-ptype.exp 2016-07-16 10:54:48.749099150 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/vla-ptype.exp 2016-07-16 10:55:42.079525860 +0200
|
||||
@@ -32,9 +32,9 @@
|
||||
# Check the ptype of various VLA states and pointer to VLA's.
|
||||
gdb_breakpoint [gdb_get_line_number "vla1-init"]
|
||||
gdb_continue_to_breakpoint "vla1-init"
|
||||
-gdb_test "ptype vla1" "type = <not allocated>" "ptype vla1 not initialized"
|
||||
-gdb_test "ptype vla2" "type = <not allocated>" "ptype vla2 not initialized"
|
||||
-gdb_test "ptype pvla" "type = <not associated>" "ptype pvla not initialized"
|
||||
+gdb_test "ptype vla1" "type = $real \\(:,:,:\\)" "ptype vla1 not initialized"
|
||||
+gdb_test "ptype vla2" "type = $real \\(:,:,:\\)" "ptype vla2 not initialized"
|
||||
+gdb_test "ptype pvla" "type = $real \\(:,:,:\\)" "ptype pvla not initialized"
|
||||
gdb_test "ptype vla1(3, 6, 9)" "no such vector element \\\(vector not allocated\\\)" \
|
||||
"ptype vla1(3, 6, 9) not initialized"
|
||||
gdb_test "ptype vla2(5, 45, 20)" \
|
||||
@@ -81,20 +81,20 @@
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "pvla-deassociated"]
|
||||
gdb_continue_to_breakpoint "pvla-deassociated"
|
||||
-gdb_test "ptype pvla" "type = <not associated>" "ptype pvla deassociated"
|
||||
+gdb_test "ptype pvla" "type = $real \\(:,:,:\\)" "ptype pvla deassociated"
|
||||
gdb_test "ptype pvla(5, 45, 20)" \
|
||||
"no such vector element \\\(vector not associated\\\)" \
|
||||
"ptype pvla(5, 45, 20) not associated"
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "vla1-deallocated"]
|
||||
gdb_continue_to_breakpoint "vla1-deallocated"
|
||||
-gdb_test "ptype vla1" "type = <not allocated>" "ptype vla1 not allocated"
|
||||
+gdb_test "ptype vla1" "type = $real \\(:,:,:\\)" "ptype vla1 not allocated"
|
||||
gdb_test "ptype vla1(3, 6, 9)" "no such vector element \\\(vector not allocated\\\)" \
|
||||
"ptype vla1(3, 6, 9) not allocated"
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "vla2-deallocated"]
|
||||
gdb_continue_to_breakpoint "vla2-deallocated"
|
||||
-gdb_test "ptype vla2" "type = <not allocated>" "ptype vla2 not allocated"
|
||||
+gdb_test "ptype vla2" "type = $real \\(:,:,:\\)" "ptype vla2 not allocated"
|
||||
gdb_test "ptype vla2(5, 45, 20)" \
|
||||
"no such vector element \\\(vector not allocated\\\)" \
|
||||
"ptype vla2(5, 45, 20) not allocated"
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/vla-type.exp
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/testsuite/gdb.fortran/vla-type.exp 2016-07-16 10:54:48.749099150 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/vla-type.exp 2016-07-16 10:55:42.080525868 +0200
|
||||
@@ -132,7 +132,10 @@
|
||||
"End Type one" ]
|
||||
|
||||
# Check allocation status of dynamic array and it's dynamic members
|
||||
-gdb_test "ptype fivedynarr" "type = <not allocated>"
|
||||
+gdb_test "ptype fivedynarr" \
|
||||
+ [multi_line "type = Type five" \
|
||||
+ " Type one :: tone" \
|
||||
+ "End Type five \\(:\\)" ]
|
||||
gdb_test "next" ""
|
||||
gdb_test "ptype fivedynarr(2)" \
|
||||
[multi_line "type = Type five" \
|
||||
@@ -141,7 +144,7 @@
|
||||
"ptype fivedynarr(2), tone is not allocated"
|
||||
gdb_test "ptype fivedynarr(2)%tone" \
|
||||
[multi_line "type = Type one" \
|
||||
- " $int :: ivla\\(<not allocated>\\)" \
|
||||
+ " $int :: ivla\\(:,:,:\\)" \
|
||||
"End Type one" ] \
|
||||
"ptype fivedynarr(2)%tone, not allocated"
|
||||
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/vla-value.exp
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/testsuite/gdb.fortran/vla-value.exp 2016-07-16 10:54:48.749099150 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.fortran/vla-value.exp 2016-07-16 10:55:42.080525868 +0200
|
||||
@@ -34,7 +34,7 @@
|
||||
gdb_continue_to_breakpoint "vla1-init"
|
||||
gdb_test "print vla1" " = <not allocated>" "print non-allocated vla1"
|
||||
gdb_test "print &vla1" \
|
||||
- " = \\\(PTR TO -> \\\( $real \\\(<not allocated>\\\)\\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(:,:,:\\\)\\\)\\\) $hex" \
|
||||
"print non-allocated &vla1"
|
||||
gdb_test "print vla1(1,1,1)" "no such vector element \\\(vector not allocated\\\)" \
|
||||
"print member in non-allocated vla1 (1)"
|
||||
@@ -75,7 +75,7 @@
|
||||
# Try to access values in undefined pointer to VLA (dangling)
|
||||
gdb_test "print pvla" " = <not associated>" "print undefined pvla"
|
||||
gdb_test "print &pvla" \
|
||||
- " = \\\(PTR TO -> \\\( $real \\\(<not associated>\\\)\\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(:,:,:\\\)\\\)\\\) $hex" \
|
||||
"print non-associated &pvla"
|
||||
gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated\\\)" \
|
||||
"print undefined pvla(1,3,8)"
|
||||
Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
|
||||
===================================================================
|
||||
--- gdb-7.11.50.20160630.orig/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2016-07-16 10:54:48.749099150 +0200
|
||||
+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2016-07-16 10:55:42.080525868 +0200
|
||||
@@ -17,6 +17,7 @@
|
||||
# Array (VLA).
|
||||
|
||||
load_lib mi-support.exp
|
||||
+load_lib fortran.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
load_lib "fortran.exp"
|
||||
|
||||
@@ -50,10 +51,10 @@
|
||||
mi_gdb_test "500-data-evaluate-expression vla1" \
|
||||
"500\\^done,value=\"<not allocated>\"" "evaluate not allocated vla"
|
||||
|
||||
-mi_create_varobj_checked vla1_not_allocated vla1 "<not allocated>" \
|
||||
+mi_create_varobj_checked vla1_not_allocated vla1 "$real \\(:\\)" \
|
||||
"create local variable vla1_not_allocated"
|
||||
mi_gdb_test "501-var-info-type vla1_not_allocated" \
|
||||
- "501\\^done,type=\"<not allocated>\"" \
|
||||
+ "501\\^done,type=\"$real \\(:\\)\"" \
|
||||
"info type variable vla1_not_allocated"
|
||||
mi_gdb_test "502-var-show-format vla1_not_allocated" \
|
||||
"502\\^done,format=\"natural\"" \
|
||||
@@ -140,10 +141,10 @@
|
||||
-re "580\\^done,value=\"<not associated>\".*${mi_gdb_prompt}$" {
|
||||
pass $test
|
||||
|
||||
- mi_create_varobj_checked pvla2_not_associated pvla2 "<not associated>" \
|
||||
+ mi_create_varobj_checked pvla2_not_associated pvla2 "$real \\(:,:\\)" \
|
||||
"create local variable pvla2_not_associated"
|
||||
mi_gdb_test "581-var-info-type pvla2_not_associated" \
|
||||
- "581\\^done,type=\"<not associated>\"" \
|
||||
+ "581\\^done,type=\"$real \\(:,:\\)\"" \
|
||||
"info type variable pvla2_not_associated"
|
||||
mi_gdb_test "582-var-show-format pvla2_not_associated" \
|
||||
"582\\^done,format=\"natural\"" \
|
349
gdb-vla-intel-5of7.patch
Normal file
349
gdb-vla-intel-5of7.patch
Normal file
@ -0,0 +1,349 @@
|
||||
From b6e668ccd356ea3e75d30f20314334b1203c22de Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
Date: Tue, 12 Jul 2016 08:19:34 +0200
|
||||
Subject: [PATCH 5/7] Resolve dynamic target types of pointers.
|
||||
|
||||
When dereferencing pointers to dynamic target types,
|
||||
resolve the target type.
|
||||
|
||||
2016-06-30 Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
|
||||
gdb/Changelog:
|
||||
* NEWS: Added entry.
|
||||
* c-valprint.c (c_print_val): Resolve dynamic target types.
|
||||
* valops.c (value_ind): Resolve dynamic target types.
|
||||
* valprint.c (check_printable): Don't shortcut not associated
|
||||
pointers.
|
||||
|
||||
gdb/Testsuite/Changelog:
|
||||
* pointers.f90: Added pointer to dynamic types.
|
||||
* gdb.fortran/pointers.exp: New.
|
||||
|
||||
Change-Id: I998d4da4a5ba4899b8cb2115576f44efa741e698
|
||||
---
|
||||
gdb/NEWS | 2 +
|
||||
gdb/c-valprint.c | 22 ++++++
|
||||
gdb/testsuite/gdb.cp/vla-cxx.exp | 4 ++
|
||||
gdb/testsuite/gdb.fortran/pointers.exp | 123 +++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/pointers.f90 | 17 +++++
|
||||
gdb/valops.c | 16 ++++-
|
||||
gdb/valprint.c | 6 --
|
||||
7 files changed, 182 insertions(+), 8 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/pointers.exp
|
||||
|
||||
diff --git a/gdb/NEWS b/gdb/NEWS
|
||||
index 3823f20..37e4ca7 100644
|
||||
--- a/gdb/NEWS
|
||||
+++ b/gdb/NEWS
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
*** Changes since GDB 7.11
|
||||
|
||||
+* Fortran: Support pointers to dynamic types.
|
||||
+
|
||||
* GDB now supports a negative repeat count in the 'x' command to examine
|
||||
memory backward from the given address. For example:
|
||||
|
||||
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
|
||||
index 2cb418d..120163f 100644
|
||||
--- a/gdb/c-valprint.c
|
||||
+++ b/gdb/c-valprint.c
|
||||
@@ -645,6 +645,28 @@ c_value_print (struct value *val, struct ui_file *stream,
|
||||
else
|
||||
{
|
||||
/* normal case */
|
||||
+ if (TYPE_CODE (type) == TYPE_CODE_PTR
|
||||
+ && 1 == is_dynamic_type (type))
|
||||
+ {
|
||||
+ CORE_ADDR addr;
|
||||
+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE (type)))
|
||||
+ addr = value_address (val);
|
||||
+ else
|
||||
+ addr = value_as_address (val);
|
||||
+
|
||||
+ /* We resolve the target-type only when the
|
||||
+ pointer is associated. */
|
||||
+ if ((addr != 0)
|
||||
+ && (0 == type_not_associated (type)))
|
||||
+ TYPE_TARGET_TYPE (type) =
|
||||
+ resolve_dynamic_type (TYPE_TARGET_TYPE (type),
|
||||
+ NULL, addr);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Do nothing. References are already resolved from the beginning,
|
||||
+ only pointers are resolved when we actual need the target. */
|
||||
+ }
|
||||
fprintf_filtered (stream, "(");
|
||||
type_print (value_type (val), "", stream, -1);
|
||||
fprintf_filtered (stream, ") ");
|
||||
diff --git a/gdb/testsuite/gdb.cp/vla-cxx.exp b/gdb/testsuite/gdb.cp/vla-cxx.exp
|
||||
index babdfb7..543d9eb 100644
|
||||
--- a/gdb/testsuite/gdb.cp/vla-cxx.exp
|
||||
+++ b/gdb/testsuite/gdb.cp/vla-cxx.exp
|
||||
@@ -26,6 +26,8 @@ if ![runto_main] {
|
||||
gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
|
||||
gdb_continue_to_breakpoint "Before pointer assignment"
|
||||
gdb_test "ptype ptr" "int \\(\\*\\)\\\[variable length\\\]" "ptype ptr, Before pointer assignment"
|
||||
+gdb_test "print ptr" "\\(int \\(\\*\\)\\\[variable length\\\]\\) 0x0" "print ptr, Before pointer assignment"
|
||||
+gdb_test "print *ptr" "Cannot access memory at address 0x0" "print *ptr, Before pointer assignment"
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "vlas_filled"]
|
||||
gdb_continue_to_breakpoint "vlas_filled"
|
||||
@@ -38,3 +40,5 @@ gdb_test "print vlaref" " = \\(int \\(&\\)\\\[3\\\]\\) @$hex: \\{5, 7, 9\\}"
|
||||
gdb_test "print vlaref2" " = \\(.*\\) @$hex: \\{5, 7, 9\\}"
|
||||
gdb_test "print c" " = \\{e = \\{c = @$hex\\}\\}"
|
||||
gdb_test "ptype ptr" "int \\(\\*\\)\\\[3\\\]"
|
||||
+gdb_test "print ptr" "\\(int \\(\\*\\)\\\[3\\\]\\) $hex"
|
||||
+gdb_test "print *ptr" " = \\{5, 7, 9\\}"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/pointers.exp b/gdb/testsuite/gdb.fortran/pointers.exp
|
||||
new file mode 100644
|
||||
index 0000000..c19d7e0
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/pointers.exp
|
||||
@@ -0,0 +1,123 @@
|
||||
+# Copyright 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile "pointers.f90"
|
||||
+load_lib fortran.exp
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
|
||||
+ {debug f90 quiet}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ untested "could not run to main"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Depending on the compiler being used, the type names can be printed differently.
|
||||
+set logical [fortran_logical4]
|
||||
+set real [fortran_real4]
|
||||
+set int [fortran_int4]
|
||||
+set complex [fortran_complex4]
|
||||
+
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
|
||||
+gdb_continue_to_breakpoint "Before pointer assignment"
|
||||
+gdb_test "print logp" "= \\(PTR TO -> \\( $logical \\)\\) 0x0" "print logp, not associated"
|
||||
+gdb_test "print *logp" "Cannot access memory at address 0x0" "print *logp, not associated"
|
||||
+gdb_test "print comp" "= \\(PTR TO -> \\( $complex \\)\\) 0x0" "print comp, not associated"
|
||||
+gdb_test "print *comp" "Cannot access memory at address 0x0" "print *comp, not associated"
|
||||
+gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1 \\)\\) 0x0" "print charp, not associated"
|
||||
+gdb_test "print *charp" "Cannot access memory at address 0x0" "print *charp, not associated"
|
||||
+gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3 \\)\\) 0x0" "print charap, not associated"
|
||||
+gdb_test "print *charap" "Cannot access memory at address 0x0" "print *charap, not associated"
|
||||
+gdb_test "print intp" "= \\(PTR TO -> \\( $int \\)\\) 0x0" "print intp, not associated"
|
||||
+gdb_test "print *intp" "Cannot access memory at address 0x0" "print *intp, not associated"
|
||||
+set test "print intap, not associated"
|
||||
+gdb_test_multiple "print intap" $test {
|
||||
+ -re " = \\(PTR TO -> \\( $int \\(:,:\\)\\)\\) <not associated>\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re " = <not associated>\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "print realp" "= \\(PTR TO -> \\( $real \\)\\) 0x0" "print realp, not associated"
|
||||
+gdb_test "print *realp" "Cannot access memory at address 0x0" "print *realp, not associated"
|
||||
+gdb_test "print \$my_var = intp" "= \\(PTR TO -> \\( $int \\)\\) 0x0"
|
||||
+
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "Before value assignment"]
|
||||
+gdb_continue_to_breakpoint "Before value assignment"
|
||||
+gdb_test "print *(twop)%ivla2" "= <not allocated>"
|
||||
+
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "After value assignment"]
|
||||
+gdb_continue_to_breakpoint "After value assignment"
|
||||
+gdb_test "print logp" "= \\(PTR TO -> \\( $logical \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *logp" "= \\.TRUE\\."
|
||||
+gdb_test "print comp" "= \\(PTR TO -> \\( $complex \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *comp" "= \\(1,2\\)"
|
||||
+gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1 \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *charp" "= 'a'"
|
||||
+gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3 \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *charap" "= 'abc'"
|
||||
+gdb_test "print intp" "= \\(PTR TO -> \\( $int \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *intp" "= 10"
|
||||
+set test_name "print intap, associated"
|
||||
+gdb_test_multiple "print intap" $test_name {
|
||||
+ -re "= \\(\\( 1, 1, 3(, 1){7}\\) \\( 1(, 1){9}\\) \\)\r\n$gdb_prompt $" {
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+ -re "= \\(PTR TO -> \\( $int \\(10,2\\)\\)\\) $hex\( <.*>\)?\r\n$gdb_prompt $" {
|
||||
+ gdb_test "print *intap" "= \\(\\( 1, 1, 3(, 1){7}\\) \\( 1(, 1){9}\\) \\)"
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+}
|
||||
+set test_name "print intvlap, associated"
|
||||
+gdb_test_multiple "print intvlap" $test_name {
|
||||
+ -re "= \\(2, 2, 2, 4(, 2){6}\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+ -re "= \\(PTR TO -> \\( $int \\(10\\)\\)\\) $hex\( <.*>\)?\r\n$gdb_prompt $" {
|
||||
+ gdb_test "print *intvlap" "= \\(2, 2, 2, 4(, 2){6}\\)"
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "print realp" "= \\(PTR TO -> \\( $real \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *realp" "= 3\\.14000\\d+"
|
||||
+gdb_test "print arrayOfPtr(2)%p" "= \\(PTR TO -> \\( Type two \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *(arrayOfPtr(2)%p)" "= \\( ivla1 = \\(11, 12, 13\\), ivla2 = \\(\\( 211, 221\\) \\( 212, 222\\) \\) \\)"
|
||||
+set test_name "print arrayOfPtr(3)%p"
|
||||
+gdb_test_multiple $test_name $test_name {
|
||||
+ -re "= \\(PTR TO -> \\( Type two \\)\\) <not associated>\r\n$gdb_prompt $" {
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+ -re "= \\(PTR TO -> \\( Type two \\)\\) 0x0\r\n$gdb_prompt $" {
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+}
|
||||
+set test_name "print *(arrayOfPtr(3)%p), associated"
|
||||
+gdb_test_multiple "print *(arrayOfPtr(3)%p)" $test_name {
|
||||
+ -re "Cannot access memory at address 0x0\r\n$gdb_prompt $" {
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+ -re "Attempt to take contents of a not associated pointer.\r\n$gdb_prompt $" {
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "print *((integer*) &inta + 2)" "= 3" "print temporary pointer, array"
|
||||
+gdb_test "print *((integer*) &intvla + 3)" "= 4" "print temporary pointer, allocated vla"
|
||||
+gdb_test "print \$pc" "= \\(PTR TO -> \\( void \\(\\)\\(\\)\\)\\) $hex <pointers\\+\\d+>" "Print program counter"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/pointers.f90 b/gdb/testsuite/gdb.fortran/pointers.f90
|
||||
index 9ebbaa9..000193c 100644
|
||||
--- a/gdb/testsuite/gdb.fortran/pointers.f90
|
||||
+++ b/gdb/testsuite/gdb.fortran/pointers.f90
|
||||
@@ -20,14 +20,20 @@ program pointers
|
||||
integer, allocatable :: ivla2 (:, :)
|
||||
end type two
|
||||
|
||||
+ type :: twoPtr
|
||||
+ type (two), pointer :: p
|
||||
+ end type twoPtr
|
||||
+
|
||||
logical, target :: logv
|
||||
complex, target :: comv
|
||||
character, target :: charv
|
||||
character (len=3), target :: chara
|
||||
integer, target :: intv
|
||||
integer, target, dimension (10,2) :: inta
|
||||
+ integer, target, allocatable, dimension (:) :: intvla
|
||||
real, target :: realv
|
||||
type(two), target :: twov
|
||||
+ type(twoPtr) :: arrayOfPtr (3)
|
||||
|
||||
logical, pointer :: logp
|
||||
complex, pointer :: comp
|
||||
@@ -35,6 +41,7 @@ program pointers
|
||||
character (len=3), pointer:: charap
|
||||
integer, pointer :: intp
|
||||
integer, pointer, dimension (:,:) :: intap
|
||||
+ integer, pointer, dimension (:) :: intvlap
|
||||
real, pointer :: realp
|
||||
type(two), pointer :: twop
|
||||
|
||||
@@ -44,8 +51,12 @@ program pointers
|
||||
nullify (charap)
|
||||
nullify (intp)
|
||||
nullify (intap)
|
||||
+ nullify (intvlap)
|
||||
nullify (realp)
|
||||
nullify (twop)
|
||||
+ nullify (arrayOfPtr(1)%p)
|
||||
+ nullify (arrayOfPtr(2)%p)
|
||||
+ nullify (arrayOfPtr(3)%p)
|
||||
|
||||
logp => logv ! Before pointer assignment
|
||||
comp => comv
|
||||
@@ -53,8 +64,10 @@ program pointers
|
||||
charap => chara
|
||||
intp => intv
|
||||
intap => inta
|
||||
+ intvlap => intvla
|
||||
realp => realv
|
||||
twop => twov
|
||||
+ arrayOfPtr(2)%p => twov
|
||||
|
||||
logv = associated(logp) ! Before value assignment
|
||||
comv = cmplx(1,2)
|
||||
@@ -63,6 +76,10 @@ program pointers
|
||||
intv = 10
|
||||
inta(:,:) = 1
|
||||
inta(3,1) = 3
|
||||
+ allocate (intvla(10))
|
||||
+ intvla(:) = 2
|
||||
+ intvla(4) = 4
|
||||
+ intvlap => intvla
|
||||
realv = 3.14
|
||||
|
||||
allocate (twov%ivla1(3))
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
index 40392e8..6f38560 100644
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -1562,6 +1562,19 @@ value_ind (struct value *arg1)
|
||||
if (TYPE_CODE (base_type) == TYPE_CODE_PTR)
|
||||
{
|
||||
struct type *enc_type;
|
||||
+ CORE_ADDR addr;
|
||||
+
|
||||
+ if (type_not_associated (base_type))
|
||||
+ error (_("Attempt to take contents of a not associated pointer."));
|
||||
+
|
||||
+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE (base_type)))
|
||||
+ addr = value_address (arg1);
|
||||
+ else
|
||||
+ addr = value_as_address (arg1);
|
||||
+
|
||||
+ if (addr != 0)
|
||||
+ TYPE_TARGET_TYPE (base_type) =
|
||||
+ resolve_dynamic_type (TYPE_TARGET_TYPE (base_type), NULL, addr);
|
||||
|
||||
/* We may be pointing to something embedded in a larger object.
|
||||
Get the real type of the enclosing object. */
|
||||
@@ -1577,8 +1590,7 @@ value_ind (struct value *arg1)
|
||||
else
|
||||
/* Retrieve the enclosing object pointed to. */
|
||||
arg2 = value_at_lazy (enc_type,
|
||||
- (value_as_address (arg1)
|
||||
- - value_pointed_to_offset (arg1)));
|
||||
+ (addr - value_pointed_to_offset (arg1)));
|
||||
|
||||
enc_type = value_type (arg2);
|
||||
return readjust_indirect_value_type (arg2, enc_type, base_type, arg1);
|
||||
diff --git a/gdb/valprint.c b/gdb/valprint.c
|
||||
index 6896da2..f592278 100644
|
||||
--- a/gdb/valprint.c
|
||||
+++ b/gdb/valprint.c
|
||||
@@ -1141,12 +1141,6 @@ value_check_printable (struct value *val, struct ui_file *stream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (type_not_associated (value_type (val)))
|
||||
- {
|
||||
- val_print_not_associated (stream);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
if (type_not_allocated (value_type (val)))
|
||||
{
|
||||
val_print_not_allocated (stream);
|
||||
--
|
||||
2.7.4
|
||||
|
102
gdb-vla-intel-6of7.patch
Normal file
102
gdb-vla-intel-6of7.patch
Normal file
@ -0,0 +1,102 @@
|
||||
From 8665344c14b9ae8b2e0c37ba06d6881a546d1a37 Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
Date: Tue, 12 Jul 2016 08:19:34 +0200
|
||||
Subject: [PATCH 6/7] Fortran: Testsuite, add cyclic pointers.
|
||||
|
||||
2016-05-25 Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
|
||||
gdb/testsuite/Changelog:
|
||||
* pointers.f90: Add cylic pointers.
|
||||
* pointers.exp: Add print of cyclic pointers.
|
||||
|
||||
Change-Id: Ic3b6187c5980fd6c37e2e94787f8321e5b7f2d75
|
||||
---
|
||||
gdb/testsuite/gdb.fortran/pointers.exp | 20 ++++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/pointers.f90 | 12 ++++++++++++
|
||||
2 files changed, 32 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/pointers.exp b/gdb/testsuite/gdb.fortran/pointers.exp
|
||||
index c19d7e0..67cf999 100644
|
||||
--- a/gdb/testsuite/gdb.fortran/pointers.exp
|
||||
+++ b/gdb/testsuite/gdb.fortran/pointers.exp
|
||||
@@ -57,6 +57,24 @@ gdb_test_multiple "print intap" $test {
|
||||
gdb_test "print realp" "= \\(PTR TO -> \\( $real \\)\\) 0x0" "print realp, not associated"
|
||||
gdb_test "print *realp" "Cannot access memory at address 0x0" "print *realp, not associated"
|
||||
gdb_test "print \$my_var = intp" "= \\(PTR TO -> \\( $int \\)\\) 0x0"
|
||||
+set test "print cyclicp1, not associated"
|
||||
+gdb_test_multiple "print cyclicp1" $test {
|
||||
+ -re "= \\( i = -?\\d+, p = 0x0 \\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "= \\( i = -?\\d+, p = <not associated> \\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+set test "print cyclicp1%p, not associated"
|
||||
+gdb_test_multiple "print cyclicp1%p" $test {
|
||||
+ -re "= \\(PTR TO -> \\( Type typewithpointer \\)\\) 0x0\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "= \\(PTR TO -> \\( Type typewithpointer \\)\\) <not associated>\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "Before value assignment"]
|
||||
@@ -118,6 +136,8 @@ gdb_test_multiple "print *(arrayOfPtr(3)%p)" $test_name {
|
||||
pass $test_name
|
||||
}
|
||||
}
|
||||
+gdb_test "print cyclicp1" "= \\( i = 1, p = $hex\( <.*>\)? \\)"
|
||||
+gdb_test "print cyclicp1%p" "= \\(PTR TO -> \\( Type typewithpointer \\)\\) $hex\( <.*>\)?"
|
||||
gdb_test "print *((integer*) &inta + 2)" "= 3" "print temporary pointer, array"
|
||||
gdb_test "print *((integer*) &intvla + 3)" "= 4" "print temporary pointer, allocated vla"
|
||||
gdb_test "print \$pc" "= \\(PTR TO -> \\( void \\(\\)\\(\\)\\)\\) $hex <pointers\\+\\d+>" "Print program counter"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/pointers.f90 b/gdb/testsuite/gdb.fortran/pointers.f90
|
||||
index 000193c..6240c87 100644
|
||||
--- a/gdb/testsuite/gdb.fortran/pointers.f90
|
||||
+++ b/gdb/testsuite/gdb.fortran/pointers.f90
|
||||
@@ -20,6 +20,11 @@ program pointers
|
||||
integer, allocatable :: ivla2 (:, :)
|
||||
end type two
|
||||
|
||||
+ type :: typeWithPointer
|
||||
+ integer i
|
||||
+ type(typeWithPointer), pointer:: p
|
||||
+ end type typeWithPointer
|
||||
+
|
||||
type :: twoPtr
|
||||
type (two), pointer :: p
|
||||
end type twoPtr
|
||||
@@ -34,6 +39,7 @@ program pointers
|
||||
real, target :: realv
|
||||
type(two), target :: twov
|
||||
type(twoPtr) :: arrayOfPtr (3)
|
||||
+ type(typeWithPointer), target:: cyclicp1,cyclicp2
|
||||
|
||||
logical, pointer :: logp
|
||||
complex, pointer :: comp
|
||||
@@ -57,6 +63,8 @@ program pointers
|
||||
nullify (arrayOfPtr(1)%p)
|
||||
nullify (arrayOfPtr(2)%p)
|
||||
nullify (arrayOfPtr(3)%p)
|
||||
+ nullify (cyclicp1%p)
|
||||
+ nullify (cyclicp2%p)
|
||||
|
||||
logp => logv ! Before pointer assignment
|
||||
comp => comv
|
||||
@@ -68,6 +76,10 @@ program pointers
|
||||
realp => realv
|
||||
twop => twov
|
||||
arrayOfPtr(2)%p => twov
|
||||
+ cyclicp1%i = 1
|
||||
+ cyclicp1%p => cyclicp2
|
||||
+ cyclicp2%i = 2
|
||||
+ cyclicp2%p => cyclicp1
|
||||
|
||||
logv = associated(logp) ! Before value assignment
|
||||
comv = cmplx(1,2)
|
||||
--
|
||||
2.7.4
|
||||
|
518
gdb-vla-intel-7of7.patch
Normal file
518
gdb-vla-intel-7of7.patch
Normal file
@ -0,0 +1,518 @@
|
||||
From 1e5bd9aec9ee02c2f771e4dc997570c82d74b3b8 Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Heckel <bernhard.heckel@intel.com>
|
||||
Date: Tue, 12 Jul 2016 08:19:34 +0200
|
||||
Subject: [PATCH 7/7] fort_dyn_array: Fortran dynamic string support
|
||||
|
||||
This patch changes the semantic of the Dwarf string length
|
||||
attribute to reflect the standard as well as enables
|
||||
correct string length calculation of dynamic strings. Add
|
||||
tests for varous dynamic string evaluations.
|
||||
|
||||
Old:
|
||||
(gdb) p my_dyn_string
|
||||
Cannot access memory at address 0x605fc0
|
||||
|
||||
New:
|
||||
(gdb) p *my_dyn_string
|
||||
$1 = 'foo'
|
||||
|
||||
gdb/Changlog:
|
||||
* dwarf2read.c (read_tag_string_type): changed
|
||||
semantic of DW_AT_string_length to be able to
|
||||
handle Dwarf blocks as well. Support for
|
||||
DW_AT_byte_length added to get correct length
|
||||
if specified in combination with
|
||||
DW_AT_string_length.
|
||||
(attr_to_dynamic_prop): added
|
||||
functionality to add Dwarf operators to baton
|
||||
data attribute. Added post values to baton
|
||||
as required by the string evaluation case.
|
||||
(read_subrange_type): Adapt caller.
|
||||
(set_die_type): Adapt caller.
|
||||
(add_post_values_to_baton): New function.
|
||||
* gdbtypes.c (resolve_dynamic_type): Add
|
||||
conditions to support string types.
|
||||
(resolve_dynamic_array): Add conditions for dynamic
|
||||
strings and create a new string type.
|
||||
(is_dynamic_type): Follow pointer if a string type
|
||||
was detected, as Fortran strings are represented
|
||||
as pointers to strings internally.
|
||||
|
||||
gdb/testsuite/Changelog:
|
||||
* vla-strings.f90: New file.
|
||||
* vla-strings.exp: New file.
|
||||
|
||||
Change-Id: I7d7f47c7a4900a7fdb51102032455b53d60e60d7
|
||||
---
|
||||
gdb/dwarf2read.c | 158 +++++++++++++++++++++++++-----
|
||||
gdb/gdbtypes.c | 15 ++-
|
||||
gdb/testsuite/gdb.fortran/vla-strings.exp | 103 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/vla-strings.f90 | 39 ++++++++
|
||||
4 files changed, 285 insertions(+), 30 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/vla-strings.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/vla-strings.f90
|
||||
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 6658a38..678da8f 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -1764,7 +1764,8 @@ static void read_signatured_type (struct signatured_type *);
|
||||
|
||||
static int attr_to_dynamic_prop (const struct attribute *attr,
|
||||
struct die_info *die, struct dwarf2_cu *cu,
|
||||
- struct dynamic_prop *prop);
|
||||
+ struct dynamic_prop *prop, const gdb_byte *additional_data,
|
||||
+ int additional_data_size);
|
||||
|
||||
/* memory allocation interface */
|
||||
|
||||
@@ -11437,7 +11438,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
newobj->static_link
|
||||
= XOBNEW (&objfile->objfile_obstack, struct dynamic_prop);
|
||||
- attr_to_dynamic_prop (attr, die, cu, newobj->static_link);
|
||||
+ attr_to_dynamic_prop (attr, die, cu, newobj->static_link, NULL, 0);
|
||||
}
|
||||
|
||||
cu->list_in_scope = &local_symbols;
|
||||
@@ -14495,29 +14496,94 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
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 in memory. */
|
||||
attr = dwarf2_attr (die, DW_AT_string_length, cu);
|
||||
if (attr)
|
||||
{
|
||||
- length = DW_UNSND (attr);
|
||||
+ if (attr_form_is_block (attr))
|
||||
+ {
|
||||
+ struct attribute *byte_size, *bit_size;
|
||||
+ struct dynamic_prop high;
|
||||
+
|
||||
+ byte_size = dwarf2_attr (die, DW_AT_byte_size, cu);
|
||||
+ bit_size = dwarf2_attr (die, DW_AT_bit_size, cu);
|
||||
+
|
||||
+ /* DW_AT_byte_size should never occur in combination with
|
||||
+ DW_AT_bit_size. */
|
||||
+ if (byte_size != NULL && bit_size != NULL)
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("DW_AT_byte_size AND "
|
||||
+ "DW_AT_bit_size found together at the same time."));
|
||||
+
|
||||
+ /* If DW_AT_string_length AND DW_AT_byte_size exist together,
|
||||
+ DW_AT_byte_size describes the number of bytes that should be read
|
||||
+ from the length memory location. */
|
||||
+ if (byte_size != NULL)
|
||||
+ {
|
||||
+ /* Build new dwarf2_locexpr_baton structure with additions to the
|
||||
+ data attribute, to reflect DWARF specialities to get address
|
||||
+ sizes. */
|
||||
+ const gdb_byte append_ops[] =
|
||||
+ {
|
||||
+ /* DW_OP_deref_size: size of an address on the target machine
|
||||
+ (bytes), where the size will be specified by the next
|
||||
+ operand. */
|
||||
+ DW_OP_deref_size,
|
||||
+ /* Operand for DW_OP_deref_size. */
|
||||
+ DW_UNSND(byte_size) };
|
||||
+
|
||||
+ if (!attr_to_dynamic_prop (attr, die, cu, &high, append_ops,
|
||||
+ ARRAY_SIZE(append_ops)))
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("Could not parse DW_AT_byte_size"));
|
||||
+ }
|
||||
+ else if (bit_size != NULL)
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("DW_AT_string_length AND "
|
||||
+ "DW_AT_bit_size found but not supported yet."));
|
||||
+ /* If DW_AT_string_length WITHOUT DW_AT_byte_size exist, the default
|
||||
+ is the address size of the target machine. */
|
||||
+ else
|
||||
+ {
|
||||
+ const gdb_byte append_ops[] =
|
||||
+ { DW_OP_deref };
|
||||
+
|
||||
+ if (!attr_to_dynamic_prop (attr, die, cu, &high, append_ops,
|
||||
+ ARRAY_SIZE(append_ops)))
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("Could not parse DW_AT_string_length"));
|
||||
+ }
|
||||
+
|
||||
+ TYPE_RANGE_DATA (range_type)->high = high;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TYPE_HIGH_BOUND (range_type) = DW_UNSND(attr);
|
||||
+ TYPE_HIGH_BOUND_KIND (range_type) = PROP_CONST;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
- /* Check for the DW_AT_byte_size attribute. */
|
||||
+ /* Check for the DW_AT_byte_size attribute, which represents the length
|
||||
+ in this case. */
|
||||
attr = dwarf2_attr (die, DW_AT_byte_size, cu);
|
||||
if (attr)
|
||||
- {
|
||||
- length = DW_UNSND (attr);
|
||||
- }
|
||||
+ {
|
||||
+ TYPE_HIGH_BOUND (range_type) = DW_UNSND(attr);
|
||||
+ TYPE_HIGH_BOUND_KIND (range_type) = PROP_CONST;
|
||||
+ }
|
||||
else
|
||||
- {
|
||||
- length = 1;
|
||||
- }
|
||||
+ {
|
||||
+ TYPE_HIGH_BOUND (range_type) = 1;
|
||||
+ TYPE_HIGH_BOUND_KIND (range_type) = PROP_CONST;
|
||||
+ }
|
||||
}
|
||||
|
||||
- index_type = objfile_type (objfile)->builtin_int;
|
||||
- range_type = create_static_range_type (NULL, index_type, 1, length);
|
||||
char_type = language_string_char_type (cu->language_defn, gdbarch);
|
||||
type = create_string_type (NULL, char_type, range_type);
|
||||
|
||||
@@ -14847,7 +14913,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
static int
|
||||
attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||
- struct dwarf2_cu *cu, struct dynamic_prop *prop)
|
||||
+ struct dwarf2_cu *cu, struct dynamic_prop *prop,
|
||||
+ const gdb_byte *additional_data, int additional_data_size)
|
||||
{
|
||||
struct dwarf2_property_baton *baton;
|
||||
struct obstack *obstack = &cu->objfile->objfile_obstack;
|
||||
@@ -14857,14 +14924,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
- baton = XOBNEW (obstack, struct dwarf2_property_baton);
|
||||
+ baton = XOBNEW(obstack, struct dwarf2_property_baton);
|
||||
baton->referenced_type = NULL;
|
||||
baton->locexpr.per_cu = cu->per_cu;
|
||||
- baton->locexpr.size = DW_BLOCK (attr)->size;
|
||||
- baton->locexpr.data = DW_BLOCK (attr)->data;
|
||||
+
|
||||
+ if (additional_data != NULL && additional_data_size > 0)
|
||||
+ {
|
||||
+ gdb_byte *data;
|
||||
+
|
||||
+ data = (gdb_byte *) obstack_alloc(
|
||||
+ &cu->objfile->objfile_obstack,
|
||||
+ DW_BLOCK (attr)->size + additional_data_size);
|
||||
+ memcpy (data, DW_BLOCK (attr)->data, DW_BLOCK (attr)->size);
|
||||
+ memcpy (data + DW_BLOCK (attr)->size, additional_data,
|
||||
+ additional_data_size);
|
||||
+
|
||||
+ baton->locexpr.data = data;
|
||||
+ baton->locexpr.size = DW_BLOCK (attr)->size + additional_data_size;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ baton->locexpr.data = DW_BLOCK (attr)->data;
|
||||
+ baton->locexpr.size = DW_BLOCK (attr)->size;
|
||||
+ }
|
||||
+
|
||||
prop->data.baton = baton;
|
||||
prop->kind = PROP_LOCEXPR;
|
||||
- gdb_assert (prop->data.baton != NULL);
|
||||
+ gdb_assert(prop->data.baton != NULL);
|
||||
}
|
||||
else if (attr_form_is_ref (attr))
|
||||
{
|
||||
@@ -14897,8 +14983,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||
baton = XOBNEW (obstack, struct dwarf2_property_baton);
|
||||
baton->referenced_type = die_type (target_die, target_cu);
|
||||
baton->locexpr.per_cu = cu->per_cu;
|
||||
- baton->locexpr.size = DW_BLOCK (target_attr)->size;
|
||||
- baton->locexpr.data = DW_BLOCK (target_attr)->data;
|
||||
+
|
||||
+ if (additional_data != NULL && additional_data_size > 0)
|
||||
+ {
|
||||
+ gdb_byte *data;
|
||||
+
|
||||
+ data = (gdb_byte *) obstack_alloc (&cu->objfile->objfile_obstack,
|
||||
+ DW_BLOCK (target_attr)->size + additional_data_size);
|
||||
+ memcpy (data, DW_BLOCK (target_attr)->data,
|
||||
+ DW_BLOCK (target_attr)->size);
|
||||
+ memcpy (data + DW_BLOCK (target_attr)->size,
|
||||
+ additional_data, additional_data_size);
|
||||
+
|
||||
+ baton->locexpr.data = data;
|
||||
+ baton->locexpr.size = (DW_BLOCK (target_attr)->size
|
||||
+ + additional_data_size);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ baton->locexpr.data = DW_BLOCK (target_attr)->data;
|
||||
+ baton->locexpr.size = DW_BLOCK (target_attr)->size;
|
||||
+ }
|
||||
+
|
||||
prop->data.baton = baton;
|
||||
prop->kind = PROP_LOCEXPR;
|
||||
gdb_assert (prop->data.baton != NULL);
|
||||
@@ -15008,17 +15114,17 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
|
||||
if (attr)
|
||||
- attr_to_dynamic_prop (attr, die, cu, &low);
|
||||
+ attr_to_dynamic_prop (attr, die, cu, &low, NULL, 0);
|
||||
else if (!low_default_is_valid)
|
||||
complaint (&symfile_complaints, _("Missing DW_AT_lower_bound "
|
||||
"- DIE at 0x%x [in module %s]"),
|
||||
die->offset.sect_off, objfile_name (cu->objfile));
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_upper_bound, cu);
|
||||
- if (!attr_to_dynamic_prop (attr, die, cu, &high))
|
||||
+ if (!attr_to_dynamic_prop (attr, die, cu, &high, NULL, 0))
|
||||
{
|
||||
attr = dwarf2_attr (die, DW_AT_count, cu);
|
||||
- if (attr_to_dynamic_prop (attr, die, cu, &high))
|
||||
+ if (attr_to_dynamic_prop (attr, die, cu, &high, NULL, 0))
|
||||
{
|
||||
/* If bounds are constant do the final calculation here. */
|
||||
if (low.kind == PROP_CONST && high.kind == PROP_CONST)
|
||||
@@ -22389,7 +22495,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
attr = dwarf2_attr (die, DW_AT_allocated, cu);
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
- if (attr_to_dynamic_prop (attr, die, cu, &prop))
|
||||
+ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0))
|
||||
add_dyn_prop (DYN_PROP_ALLOCATED, prop, type, objfile);
|
||||
}
|
||||
else if (attr != NULL)
|
||||
@@ -22404,7 +22510,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
attr = dwarf2_attr (die, DW_AT_associated, cu);
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
- if (attr_to_dynamic_prop (attr, die, cu, &prop))
|
||||
+ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0))
|
||||
add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type, objfile);
|
||||
}
|
||||
else if (attr != NULL)
|
||||
@@ -22417,7 +22523,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
|
||||
/* 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))
|
||||
add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type, objfile);
|
||||
|
||||
if (dwarf2_per_objfile->die_type_hash == NULL)
|
||||
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
||||
index b53e649..0aa9113 100644
|
||||
--- a/gdb/gdbtypes.c
|
||||
+++ b/gdb/gdbtypes.c
|
||||
@@ -1841,6 +1841,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
|
||||
}
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
+ case TYPE_CODE_STRING:
|
||||
{
|
||||
gdb_assert (TYPE_NFIELDS (type) == 1);
|
||||
|
||||
@@ -1945,7 +1946,8 @@ resolve_dynamic_array (struct type *type,
|
||||
struct type *ary_dim;
|
||||
struct dynamic_prop *prop;
|
||||
|
||||
- gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY);
|
||||
+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY
|
||||
+ || TYPE_CODE (type) == TYPE_CODE_STRING);
|
||||
|
||||
type = copy_type (type);
|
||||
|
||||
@@ -1970,13 +1972,17 @@ resolve_dynamic_array (struct type *type,
|
||||
|
||||
ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type));
|
||||
|
||||
- if (ary_dim != NULL && TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY)
|
||||
+ if (ary_dim != NULL && (TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY
|
||||
+ || TYPE_CODE (ary_dim) == TYPE_CODE_STRING))
|
||||
elt_type = resolve_dynamic_array (ary_dim, addr_stack);
|
||||
else
|
||||
elt_type = TYPE_TARGET_TYPE (type);
|
||||
|
||||
- return create_array_type_with_stride (type, elt_type, range_type,
|
||||
- TYPE_FIELD_BITSIZE (type, 0));
|
||||
+ if (TYPE_CODE (type) == TYPE_CODE_STRING)
|
||||
+ return create_string_type (type, elt_type, range_type);
|
||||
+ else
|
||||
+ return create_array_type_with_stride (type, elt_type, range_type,
|
||||
+ TYPE_FIELD_BITSIZE (type, 0));
|
||||
}
|
||||
|
||||
/* Resolve dynamic bounds of members of the union TYPE to static
|
||||
@@ -2181,6 +2187,7 @@ resolve_dynamic_type_internal (struct type *type,
|
||||
break;
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
+ case TYPE_CODE_STRING:
|
||||
resolved_type = resolve_dynamic_array (type, addr_stack);
|
||||
break;
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-strings.exp b/gdb/testsuite/gdb.fortran/vla-strings.exp
|
||||
new file mode 100644
|
||||
index 0000000..484fdcb
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/vla-strings.exp
|
||||
@@ -0,0 +1,103 @@
|
||||
+# Copyright 2016 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile ".f90"
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
|
||||
+ {debug f90 quiet}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# check that all fortran standard datatypes will be
|
||||
+# handled correctly when using as VLA's
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ untested "could not run to main"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-allocated-1"]
|
||||
+gdb_continue_to_breakpoint "var_char-allocated-1"
|
||||
+set test "whatis var_char first time"
|
||||
+gdb_test_multiple "whatis var_char" $test {
|
||||
+ -re "type = PTR TO -> \\( character\\*10 \\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = character\\*10\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+set test "ptype var_char first time"
|
||||
+gdb_test_multiple "ptype var_char" $test {
|
||||
+ -re "type = PTR TO -> \\( character\\*10 \\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = character\\*10\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
+gdb_test "next" "\\d+.*var_char = 'foo'.*" \
|
||||
+ "next to allocation status of var_char"
|
||||
+gdb_test "print l" " = \\.TRUE\\." "print allocation status first time"
|
||||
+
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-filled-1"]
|
||||
+gdb_continue_to_breakpoint "var_char-filled-1"
|
||||
+set test "print var_char, var_char-filled-1"
|
||||
+gdb_test_multiple "print var_char" $test {
|
||||
+ -re "= \\(PTR TO -> \\( character\\*3 \\)\\) $hex\r\n$gdb_prompt $" {
|
||||
+ gdb_test "print *var_char" "= 'foo'" "print *var_char, var_char-filled-1"
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "= 'foo'\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+set test "ptype var_char, var_char-filled-1"
|
||||
+gdb_test_multiple "ptype var_char" $test {
|
||||
+ -re "type = PTR TO -> \\( character\\*3 \\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = character\\*3\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "print var_char(1)" " = 102 'f'" "print var_char(1)"
|
||||
+gdb_test "print var_char(3)" " = 111 'o'" "print var_char(3)"
|
||||
+
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-filled-2"]
|
||||
+gdb_continue_to_breakpoint "var_char-filled-2"
|
||||
+set test "print var_char, var_char-filled-2"
|
||||
+gdb_test_multiple "print var_char" $test {
|
||||
+ -re "= \\(PTR TO -> \\( character\\*6 \\)\\) $hex\r\n$gdb_prompt $" {
|
||||
+ gdb_test "print *var_char" "= 'foobar'" "print *var_char, var_char-filled-2"
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "= 'foobar'\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+set test "ptype var_char, var_char-filled-2"
|
||||
+gdb_test_multiple "ptype var_char" $test {
|
||||
+ -re "type = PTR TO -> \\( character\\*6 \\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = character\\*6\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-strings.f90 b/gdb/testsuite/gdb.fortran/vla-strings.f90
|
||||
new file mode 100644
|
||||
index 0000000..3c22735
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/vla-strings.f90
|
||||
@@ -0,0 +1,39 @@
|
||||
+! Copyright 2016 Free Software Foundation, Inc.
|
||||
+!
|
||||
+! This program is free software; you can redistribute it and/or modify
|
||||
+! it under the terms of the GNU General Public License as published by
|
||||
+! the Free Software Foundation; either version 3 of the License, or
|
||||
+! (at your option) any later version.
|
||||
+!
|
||||
+! This program is distributed in the hope that it will be useful,
|
||||
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+! GNU General Public License for more details.
|
||||
+!
|
||||
+! You should have received a copy of the GNU General Public License
|
||||
+! along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+program vla_strings
|
||||
+ character(len=:), target, allocatable :: var_char
|
||||
+ character(len=:), pointer :: var_char_p
|
||||
+ logical :: l
|
||||
+
|
||||
+ allocate(character(len=10) :: var_char)
|
||||
+ l = allocated(var_char) ! var_char-allocated-1
|
||||
+ var_char = 'foo'
|
||||
+ deallocate(var_char) ! var_char-filled-1
|
||||
+ l = allocated(var_char) ! var_char-deallocated
|
||||
+ allocate(character(len=42) :: var_char)
|
||||
+ l = allocated(var_char)
|
||||
+ var_char = 'foobar'
|
||||
+ var_char = '' ! var_char-filled-2
|
||||
+ var_char = 'bar' ! var_char-empty
|
||||
+ deallocate(var_char)
|
||||
+ allocate(character(len=21) :: var_char)
|
||||
+ l = allocated(var_char) ! var_char-allocated-3
|
||||
+ var_char = 'johndoe'
|
||||
+ var_char_p => var_char
|
||||
+ l = associated(var_char_p) ! var_char_p-associated
|
||||
+ var_char_p => null()
|
||||
+ l = associated(var_char_p) ! var_char_p-not-associated
|
||||
+end program vla_strings
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- ./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));
|
||||
}
|
@ -31,26 +31,6 @@ Jan
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename="vlastringonly.patch"
|
||||
|
||||
Index: gdb-7.9.50.20150520/gdb/gdbtypes.c
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/gdbtypes.c 2015-05-31 16:14:04.164533833 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/gdbtypes.c 2015-05-31 16:14:05.844545344 +0200
|
||||
@@ -1851,6 +1851,7 @@ is_dynamic_type_internal (struct type *t
|
||||
}
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
+ case TYPE_CODE_STRING:
|
||||
{
|
||||
gdb_assert (TYPE_NFIELDS (type) == 1);
|
||||
|
||||
@@ -2192,6 +2193,7 @@ resolve_dynamic_type_internal (struct ty
|
||||
}
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
+ case TYPE_CODE_STRING:
|
||||
resolved_type = resolve_dynamic_array (type, addr_stack);
|
||||
break;
|
||||
|
||||
Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
|
377
gdb-vla-intel-tests.patch
Normal file
377
gdb-vla-intel-tests.patch
Normal file
@ -0,0 +1,377 @@
|
||||
Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.exp 2016-01-08 19:15:44.983637680 +0100
|
||||
@@ -0,0 +1,61 @@
|
||||
+# Copyright 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile ".f90"
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
|
||||
+ {debug f90 quiet}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto MAIN__] then {
|
||||
+ perror "couldn't run to breakpoint MAIN__"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+# Check VLA passed to first Fortran function.
|
||||
+gdb_breakpoint [gdb_get_line_number "func1-vla-passed"]
|
||||
+gdb_continue_to_breakpoint "func1-vla-passed"
|
||||
+gdb_test "print vla" " = \\( *\\( *22, *22, *22,\[()22, .\]*\\)" \
|
||||
+ "print vla (func1)"
|
||||
+gdb_test "ptype vla" "type = integer\\\(kind=4\\\) \\\(10,10\\\)" \
|
||||
+ "ptype vla (func1)"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "func1-vla-modified"]
|
||||
+gdb_continue_to_breakpoint "func1-vla-modified"
|
||||
+gdb_test "print vla(5,5)" " = 55" "print vla(5,5) (func1)"
|
||||
+gdb_test "print vla(7,7)" " = 77" "print vla(5,5) (func1)"
|
||||
+
|
||||
+# Check if the values are correct after returning from func1
|
||||
+gdb_breakpoint [gdb_get_line_number "func1-returned"]
|
||||
+gdb_continue_to_breakpoint "func1-returned"
|
||||
+gdb_test "print ret" " = .TRUE." "print ret after func1 returned"
|
||||
+
|
||||
+# Check VLA passed to second Fortran function
|
||||
+gdb_breakpoint [gdb_get_line_number "func2-vla-passed"]
|
||||
+gdb_continue_to_breakpoint "func2-vla-passed"
|
||||
+gdb_test "print vla" \
|
||||
+ " = \\\(44, 44, 44, 44, 44, 44, 44, 44, 44, 44\\\)" \
|
||||
+ "print vla (func2)"
|
||||
+gdb_test "ptype vla" "type = integer\\\(kind=4\\\) \\\(10\\\)" \
|
||||
+ "ptype vla (func2)"
|
||||
+
|
||||
+# Check if the returned VLA has the correct values and ptype.
|
||||
+gdb_breakpoint [gdb_get_line_number "func2-returned"]
|
||||
+gdb_continue_to_breakpoint "func2-returned"
|
||||
+gdb_test "print vla3" " = \\\(1, 2, 44, 4, 44, 44, 44, 8, 44, 44\\\)" \
|
||||
+ "print vla3 (after func2)"
|
||||
+gdb_test "ptype vla3" "type = integer\\\(kind=4\\\) \\\(10\\\)" \
|
||||
+ "ptype vla3 (after func2)"
|
||||
Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.f90 2016-01-08 19:15:44.983637680 +0100
|
||||
@@ -0,0 +1,71 @@
|
||||
+! Copyright 2014 Free Software Foundation, Inc.
|
||||
+!
|
||||
+! This program is free software; you can redistribute it and/or modify
|
||||
+! it under the terms of the GNU General Public License as published by
|
||||
+! the Free Software Foundation; either version 2 of the License, or
|
||||
+! (at your option) any later version.
|
||||
+!
|
||||
+! This program is distributed in the hope that it will be useful,
|
||||
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+! GNU General Public License for more details.
|
||||
+!
|
||||
+! You should have received a copy of the GNU General Public License
|
||||
+! along with this program; if not, write to the Free Software
|
||||
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+logical function func1 (vla)
|
||||
+ implicit none
|
||||
+ integer, allocatable :: vla (:, :)
|
||||
+ func1 = allocated(vla)
|
||||
+ vla(5,5) = 55 ! func1-vla-passed
|
||||
+ vla(7,7) = 77
|
||||
+ return ! func1-vla-modified
|
||||
+end function func1
|
||||
+
|
||||
+function func2(vla)
|
||||
+ implicit none
|
||||
+ integer :: vla (:)
|
||||
+ integer :: func2(size(vla))
|
||||
+ integer :: k
|
||||
+
|
||||
+ vla(1) = 1 ! func2-vla-passed
|
||||
+ vla(2) = 2
|
||||
+ vla(4) = 4
|
||||
+ vla(8) = 8
|
||||
+
|
||||
+ func2 = vla
|
||||
+end function func2
|
||||
+
|
||||
+program vla_func
|
||||
+ implicit none
|
||||
+ interface
|
||||
+ logical function func1 (vla)
|
||||
+ integer :: vla (:, :)
|
||||
+ end function
|
||||
+ end interface
|
||||
+ interface
|
||||
+ function func2 (vla)
|
||||
+ integer :: vla (:)
|
||||
+ integer func2(size(vla))
|
||||
+ end function
|
||||
+ end interface
|
||||
+
|
||||
+ logical :: ret
|
||||
+ integer, allocatable :: vla1 (:, :)
|
||||
+ integer, allocatable :: vla2 (:)
|
||||
+ integer, allocatable :: vla3 (:)
|
||||
+
|
||||
+ ret = .FALSE.
|
||||
+
|
||||
+ allocate (vla1 (10,10))
|
||||
+ vla1(:,:) = 22
|
||||
+
|
||||
+ allocate (vla2 (10))
|
||||
+ vla2(:) = 44
|
||||
+
|
||||
+ ret = func1(vla1)
|
||||
+ vla3 = func2(vla2) ! func1-returned
|
||||
+
|
||||
+ ret = .TRUE. ! func2-returned
|
||||
+end program vla_func
|
||||
Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.exp 2016-01-08 19:15:44.984637686 +0100
|
||||
@@ -0,0 +1,44 @@
|
||||
+# Copyright 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile ".f90"
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
|
||||
+ {debug f90 quiet}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto MAIN__] then {
|
||||
+ perror "couldn't run to breakpoint MAIN__"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "re-reverse-elements"]
|
||||
+gdb_continue_to_breakpoint "re-reverse-elements"
|
||||
+gdb_test "print pvla" " = \\\(1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\\)" \
|
||||
+ "print re-reverse-elements"
|
||||
+gdb_test "print pvla(1)" " = 1" "print first re-reverse-element"
|
||||
+gdb_test "print pvla(10)" " = 10" "print last re-reverse-element"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "odd-elements"]
|
||||
+gdb_continue_to_breakpoint "odd-elements"
|
||||
+gdb_test "print pvla" " = \\\(1, 3, 5, 7, 9\\\)" "print odd-elements"
|
||||
+gdb_test "print pvla(1)" " = 1" "print first odd-element"
|
||||
+gdb_test "print pvla(5)" " = 9" "print last odd-element"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "single-element"]
|
||||
+gdb_continue_to_breakpoint "single-element"
|
||||
+gdb_test "print pvla" " = \\\(5\\\)" "print single-element"
|
||||
+gdb_test "print pvla(1)" " = 5" "print one single-element"
|
||||
Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.f90 2016-01-08 19:15:44.984637686 +0100
|
||||
@@ -0,0 +1,30 @@
|
||||
+! Copyright 2014 Free Software Foundation, Inc.
|
||||
+!
|
||||
+! This program is free software; you can redistribute it and/or modify
|
||||
+! it under the terms of the GNU General Public License as published by
|
||||
+! the Free Software Foundation; either version 2 of the License, or
|
||||
+! (at your option) any later version.
|
||||
+!
|
||||
+! This program is distributed in the hope that it will be useful,
|
||||
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+! GNU General Public License for more details.
|
||||
+!
|
||||
+! You should have received a copy of the GNU General Public License
|
||||
+! along with this program; if not, write to the Free Software
|
||||
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+program vla_stride
|
||||
+ integer, target, allocatable :: vla (:)
|
||||
+ integer, pointer :: pvla (:)
|
||||
+
|
||||
+ allocate(vla(10))
|
||||
+ vla = (/ (I, I = 1,10) /)
|
||||
+
|
||||
+ pvla => vla(10:1:-1)
|
||||
+ pvla => pvla(10:1:-1)
|
||||
+ pvla => vla(1:10:2) ! re-reverse-elements
|
||||
+ pvla => vla(5:4:-2) ! odd-elements
|
||||
+
|
||||
+ pvla => null() ! single-element
|
||||
+end program vla_stride
|
||||
Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stringsold.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stringsold.exp 2016-01-08 19:15:44.984637686 +0100
|
||||
@@ -0,0 +1,101 @@
|
||||
+# Copyright 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile ".f90"
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
|
||||
+ {debug f90 quiet}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# check that all fortran standard datatypes will be
|
||||
+# handled correctly when using as VLA's
|
||||
+
|
||||
+if ![runto MAIN__] then {
|
||||
+ perror "couldn't run to breakpoint MAIN__"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-allocated-1"]
|
||||
+gdb_continue_to_breakpoint "var_char-allocated-1"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*10 \\)\\) ${hex}" \
|
||||
+ "print var_char after allocated first time"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10 \\)" \
|
||||
+ "whatis var_char first time"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10 \\)" \
|
||||
+ "ptype var_char first time"
|
||||
+gdb_test "next" "\\d+.*var_char = 'foo'.*" \
|
||||
+ "next to allocation status of var_char"
|
||||
+gdb_test "print l" " = .TRUE." "print allocation status first time"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-filled-1"]
|
||||
+gdb_continue_to_breakpoint "var_char-filled-1"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*3 \\)\\) ${hex}" \
|
||||
+ "print var_char after filled first time"
|
||||
+gdb_test "print *var_char" " = 'foo'" \
|
||||
+ "print *var_char after filled first time"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*3 \\)" \
|
||||
+ "whatis var_char after filled first time"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*3 \\)" \
|
||||
+ "ptype var_char after filled first time"
|
||||
+gdb_test "print var_char(1)" " = 102 'f'" "print var_char(1)"
|
||||
+gdb_test "print var_char(3)" " = 111 'o'" "print var_char(3)"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-filled-2"]
|
||||
+gdb_continue_to_breakpoint "var_char-filled-2"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*6 \\)\\) ${hex}" \
|
||||
+ "print var_char after allocated second time"
|
||||
+gdb_test "print *var_char" " = 'foobar'" \
|
||||
+ "print *var_char after allocated second time"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*6 \\)" \
|
||||
+ "whatis var_char second time"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*6 \\)" \
|
||||
+ "ptype var_char second time"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-empty"]
|
||||
+gdb_continue_to_breakpoint "var_char-empty"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*0 \\)\\) ${hex}" \
|
||||
+ "print var_char after set empty"
|
||||
+gdb_test "print *var_char" " = \"\"" "print *var_char after set empty"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*0 \\)" \
|
||||
+ "whatis var_char after set empty"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*0 \\)" \
|
||||
+ "ptype var_char after set empty"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-allocated-3"]
|
||||
+gdb_continue_to_breakpoint "var_char-allocated-3"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*21 \\)\\) ${hex}" \
|
||||
+ "print var_char after allocated third time"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*21 \\)" \
|
||||
+ "whatis var_char after allocated third time"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*21 \\)" \
|
||||
+ "ptype var_char after allocated third time"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char_p-associated"]
|
||||
+gdb_continue_to_breakpoint "var_char_p-associated"
|
||||
+gdb_test "print var_char_p" \
|
||||
+ " = \\(PTR TO -> \\( character\\*7 \\)\\) ${hex}" \
|
||||
+ "print var_char_p after associated"
|
||||
+gdb_test "print *var_char_p" " = 'johndoe'" \
|
||||
+ "print *var_char_ after associated"
|
||||
+gdb_test "whatis var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \
|
||||
+ "whatis var_char_p after associated"
|
||||
+gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \
|
||||
+ "ptype var_char_p after associated"
|
||||
Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stringsold.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stringsold.f90 2016-01-08 19:15:44.984637686 +0100
|
||||
@@ -0,0 +1,40 @@
|
||||
+! Copyright 2014 Free Software Foundation, Inc.
|
||||
+!
|
||||
+! This program is free software; you can redistribute it and/or modify
|
||||
+! it under the terms of the GNU General Public License as published by
|
||||
+! the Free Software Foundation; either version 2 of the License, or
|
||||
+! (at your option) any later version.
|
||||
+!
|
||||
+! This program is distributed in the hope that it will be useful,
|
||||
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+! GNU General Public License for more details.
|
||||
+!
|
||||
+! You should have received a copy of the GNU General Public License
|
||||
+! along with this program; if not, write to the Free Software
|
||||
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+program vla_strings
|
||||
+ character(len=:), target, allocatable :: var_char
|
||||
+ character(len=:), pointer :: var_char_p
|
||||
+ logical :: l
|
||||
+
|
||||
+ allocate(character(len=10) :: var_char)
|
||||
+ l = allocated(var_char) ! var_char-allocated-1
|
||||
+ var_char = 'foo'
|
||||
+ deallocate(var_char) ! var_char-filled-1
|
||||
+ l = allocated(var_char) ! var_char-deallocated
|
||||
+ allocate(character(len=42) :: var_char)
|
||||
+ l = allocated(var_char)
|
||||
+ var_char = 'foobar'
|
||||
+ var_char = '' ! var_char-filled-2
|
||||
+ var_char = 'bar' ! var_char-empty
|
||||
+ deallocate(var_char)
|
||||
+ allocate(character(len=21) :: var_char)
|
||||
+ l = allocated(var_char) ! var_char-allocated-3
|
||||
+ var_char = 'johndoe'
|
||||
+ var_char_p => var_char
|
||||
+ l = associated(var_char_p) ! var_char_p-associated
|
||||
+ var_char_p => null()
|
||||
+ l = associated(var_char_p) ! var_char_p-not-associated
|
||||
+end program vla_strings
|
1480
gdb-vla-intel.patch
1480
gdb-vla-intel.patch
File diff suppressed because it is too large
Load Diff
48
gdb.spec
48
gdb.spec
@ -19,15 +19,15 @@ Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages
|
||||
Name: %{?scl_prefix}gdb
|
||||
|
||||
# Freeze it when GDB gets branched
|
||||
%global snapsrc 20160210
|
||||
%global snapsrc 20160716
|
||||
# See timestamp of source gnulib installed into gdb/gnulib/ .
|
||||
%global snapgnulib 20150822
|
||||
%global tarname gdb-%{version}
|
||||
Version: 7.11.1
|
||||
Version: 7.11.50.%{snapsrc}
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 76%{?dist}
|
||||
Release: 1%{?dist}
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
|
||||
Group: Development/Debuggers
|
||||
@ -519,12 +519,16 @@ Patch1060: gdb-fortran-stride-intel-3of6.patch
|
||||
Patch1061: gdb-fortran-stride-intel-4of6.patch
|
||||
Patch1062: gdb-fortran-stride-intel-5of6.patch
|
||||
Patch1063: gdb-fortran-stride-intel-6of6.patch
|
||||
Patch888: gdb-vla-intel.patch
|
||||
Patch983: gdb-vla-intel-logical-not.patch
|
||||
Patch1132: gdb-vla-intel-1of7.patch
|
||||
Patch1133: gdb-vla-intel-2of7.patch
|
||||
Patch1134: gdb-vla-intel-3of7.patch
|
||||
Patch1135: gdb-vla-intel-4of7.patch
|
||||
Patch1136: gdb-vla-intel-5of7.patch
|
||||
Patch1137: gdb-vla-intel-6of7.patch
|
||||
Patch1138: gdb-vla-intel-7of7.patch
|
||||
Patch889: gdb-vla-intel-stringbt-fix.patch
|
||||
Patch912: gdb-vla-intel-04of23-fix.patch
|
||||
Patch887: gdb-archer-vla-tests.patch
|
||||
Patch1069: gdb-fortran-stride-intel-6of6-nokfail.patch
|
||||
Patch888: gdb-vla-intel-tests.patch
|
||||
|
||||
# Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
||||
Patch918: gdb-btrobust.patch
|
||||
@ -570,9 +574,11 @@ Patch1120: gdb-testsuite-dw2-undefined-ret-addr.patch
|
||||
# New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
|
||||
Patch1123: gdb-rhbz1325795-framefilters-test.patch
|
||||
|
||||
# Import bare DW_TAG_lexical_block (RH BZ 1325396).
|
||||
Patch1128: gdb-bare-DW_TAG_lexical_block-1of2.patch
|
||||
Patch1129: gdb-bare-DW_TAG_lexical_block-2of2.patch
|
||||
# [testsuite] Fix gdb.gdb/selftest.exp for C++-O2-g-built GDB.
|
||||
Patch1139: gdb-testsuite-selftest-cxx.patch
|
||||
|
||||
# [testsuite] Skip py-unwind.exp on x86_64 -m32.
|
||||
Patch1140: gdb-testsuite-py-unwind-m32.patch
|
||||
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
# RL_STATE_FEDORA_GDB would not be found for:
|
||||
@ -771,10 +777,14 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch1061 -p1
|
||||
%patch1062 -p1
|
||||
%patch1063 -p1
|
||||
%patch888 -p1
|
||||
%patch983 -p1
|
||||
%patch1132 -p1
|
||||
%patch1133 -p1
|
||||
%patch1134 -p1
|
||||
%patch1135 -p1
|
||||
%patch1136 -p1
|
||||
%patch1137 -p1
|
||||
%patch1138 -p1
|
||||
%patch889 -p1
|
||||
%patch912 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%patch105 -p1
|
||||
@ -868,7 +878,7 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch852 -p1
|
||||
%patch863 -p1
|
||||
%patch887 -p1
|
||||
%patch1069 -p1
|
||||
%patch888 -p1
|
||||
%patch918 -p1
|
||||
%patch925 -p1
|
||||
%patch927 -p1
|
||||
@ -886,8 +896,8 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch1118 -p1
|
||||
%patch1120 -p1
|
||||
%patch1123 -p1
|
||||
%patch1128 -p1
|
||||
%patch1129 -p1
|
||||
%patch1139 -p1
|
||||
%patch1140 -p1
|
||||
|
||||
%patch1075 -p1
|
||||
%if 0%{?rhel:1} && 0%{?rhel} <= 7
|
||||
@ -965,6 +975,8 @@ CFLAGS="$CFLAGS -DNEED_RL_STATE_FEDORA_GDB"
|
||||
CFLAGS="$CFLAGS -DNEED_DETACH_SIGSTOP"
|
||||
%endif
|
||||
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
# --htmldir and --pdfdir are not used as they are used from %{gdb_build}.
|
||||
../configure \
|
||||
--prefix=%{_prefix} \
|
||||
@ -975,6 +987,7 @@ CFLAGS="$CFLAGS -DNEED_DETACH_SIGSTOP"
|
||||
--with-system-gdbinit=%{_sysconfdir}/gdbinit \
|
||||
--with-gdb-datadir=%{_datadir}/gdb \
|
||||
--enable-gdb-build-warnings=,-Wno-unused \
|
||||
--enable-build-with-cxx \
|
||||
%ifnarch %{ix86} alpha ppc s390 s390x x86_64 ppc64 ppc64le sparc sparcv9 sparc64 %{arm} aarch64
|
||||
--disable-werror \
|
||||
%else
|
||||
@ -1407,6 +1420,9 @@ then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Sun Jul 17 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.50.20160716-1.fc25
|
||||
- Rebase to FSF GDB 7.11.50.20160716 (pre-7.12 trunk snapshot).
|
||||
|
||||
* Mon Jun 27 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-76.fc24
|
||||
- Test 'info type-printers' Python error (RH BZ 1350436).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user