Accepting request 245040 from devel:gcc

- Enable running the testsuite and store results in a gdb-testresults
  package.
- Add gdb-rpmlintrc to filter errors about the buildroot mentioned
  in testresult logs.

- Use patchlist.pl to merge with gdb-7.8-16.fc22, a rebase to FSF GDB 4.8.
  The GDB 4.8 features are:
  * Guile scripting support.
  * Python scripting enhancements.
  * New commands:
      ** guile
      ** guile-repl
      ** info auto-load guile-scripts [REGEXP]
  * New options:
      ** maint ada set ignore-descriptive-types (on|off)
      ** maint set target-async (on|off)
      ** set|show auto-load guile-scripts (on|off)
      ** set|show auto-connect-native-target
      ** set|show guile print-stack (none|message|full)
      ** set|show mi-async (on|off)
      ** set|show print symbol-loading (off|brief|full)
      ** set|show record btrace replay-memory-access (read-only|read-write)
  * Remote Protocol:
      ** The qXfer:btrace:read packet supports a new annex 'delta'.
  * GDB/MI:
      ** A new option "-gdb-set mi-async" replaces "-gdb-set target-async".
  * New target configurations:
      ** PowerPC64 GNU/Linux little-endian
  * btrace enhancements:
      ** The btrace record target now supports the 'record goto' command.

OBS-URL: https://build.opensuse.org/request/show/245040
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=100
This commit is contained in:
Ludwig Nussel 2014-08-20 15:51:37 +00:00 committed by Git OBS Bridge
commit 43fee6e038
48 changed files with 9740 additions and 11439 deletions

View File

@ -1,29 +1,29 @@
Index: gdb-7.6.90.20140127/gdb/testsuite/configure.ac
Index: gdb-7.7.50.20140609/gdb/testsuite/configure.ac
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/configure.ac 2014-01-27 22:41:19.281501688 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/configure.ac 2014-01-27 22:41:39.736517360 +0100
@@ -96,6 +96,6 @@ AC_OUTPUT([Makefile \
--- gdb-7.7.50.20140609.orig/gdb/testsuite/configure.ac 2014-06-13 20:05:33.058506817 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/configure.ac 2014-06-13 20:05:59.991532595 +0200
@@ -97,6 +97,6 @@ AC_OUTPUT([Makefile \
gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile \
gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile \
gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
- gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
+ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
Index: gdb-7.6.90.20140127/gdb/testsuite/configure
Index: gdb-7.7.50.20140609/gdb/testsuite/configure
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/configure 2014-01-27 22:41:19.283501689 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/configure 2014-01-27 22:41:49.933525172 +0100
--- gdb-7.7.50.20140609.orig/gdb/testsuite/configure 2014-06-13 20:05:29.956503899 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/configure 2014-06-13 20:06:24.492555709 +0200
@@ -3448,7 +3448,7 @@ done
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -4176,6 +4176,7 @@ do
@@ -4179,6 +4179,7 @@ do
"gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
"gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
"gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
@ -31,10 +31,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/configure
"gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;;
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.c
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.c 2014-01-27 22:41:19.284501690 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.c 2014-06-13 20:05:33.060506819 +0200
@@ -0,0 +1,20 @@
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. Thus, it simply spins in a loop. The loop
@ -56,10 +56,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.c
+ }
+ return 0;
+}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach2.c
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach2.c 2014-01-27 22:41:19.284501690 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach2.c 2014-06-13 20:05:33.060506819 +0200
@@ -0,0 +1,24 @@
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. Thus, it simply spins in a loop. The loop
@ -85,10 +85,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach2.c
+ }
+ return (0);
+}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.c
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.c 2014-01-27 22:41:19.284501690 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.c 2014-06-13 20:05:33.061506820 +0200
@@ -0,0 +1,146 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@ -236,10 +236,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.c
+ }
+ return 0;
+}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break1.c
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break1.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break1.c 2014-01-27 22:41:19.284501690 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break1.c 2014-06-13 20:05:33.061506820 +0200
@@ -0,0 +1,44 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@ -285,10 +285,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break1.c
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
+void marker4 (d) long d; {} /* set breakpoint 13 here */
+#endif
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/coremaker.c
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/coremaker.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/coremaker.c 2014-01-27 22:41:19.284501690 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/coremaker.c 2014-06-13 20:05:33.061506820 +0200
@@ -0,0 +1,142 @@
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
+ Free Software Foundation, Inc.
@ -432,10 +432,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/coremaker.c
+ return 0;
+}
+
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.exp 2014-01-27 22:41:19.285501691 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.exp 2014-06-13 20:05:33.061506820 +0200
@@ -0,0 +1,417 @@
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
+
@ -854,10 +854,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/attach.exp
+do_call_attach_tests
+
+return 0
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.exp 2014-01-27 22:41:19.286501691 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.exp 2014-06-13 20:05:33.062506821 +0200
@@ -0,0 +1,962 @@
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2002, 2003, 2004
@ -1821,10 +1821,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/break.exp
+ send_gdb "set args main\n"
+ gdb_expect -re ".*$gdb_prompt $" {}
+}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/corefile.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/corefile.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/corefile.exp 2014-01-27 22:41:19.286501691 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/corefile.exp 2014-06-13 20:05:33.063506822 +0200
@@ -0,0 +1,233 @@
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
@ -2059,10 +2059,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/corefile.exp
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
+
+gdb_test "core" "No core file now."
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/Makefile.in
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/Makefile.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.pie/Makefile.in 2014-01-27 22:41:19.286501691 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/Makefile.in 2014-06-13 20:05:33.063506822 +0200
@@ -0,0 +1,19 @@
+VPATH = @srcdir@
+srcdir = @srcdir@

View File

@ -1,11 +1,11 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
Index: gdb-7.6.50.20130731-cvs/gdb/symtab.c
Index: gdb-7.7.90.20140613/gdb/symtab.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/symtab.c 2013-08-02 17:06:19.854663801 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/symtab.c 2013-08-02 17:07:04.317721471 +0200
@@ -2327,6 +2327,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
--- gdb-7.7.90.20140613.orig/gdb/symtab.c 2014-06-13 21:52:06.219338401 +0200
+++ gdb-7.7.90.20140613/gdb/symtab.c 2014-06-13 21:55:02.753531885 +0200
@@ -2394,6 +2394,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
SYMBOL_LINKAGE_NAME (msymbol)); */
;
/* fall through */
@ -13,9 +13,9 @@ Index: gdb-7.6.50.20130731-cvs/gdb/symtab.c
+ but this text symbol may be the address we were looking for.
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
+ Red Hat Bug 218379. */
+ else if (SYMBOL_VALUE (mfunsym) == pc)
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol.minsym), paddress (target_gdbarch (), pc));
+ else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", MSYMBOL_LINKAGE_NAME (msymbol.minsym), paddress (target_gdbarch (), pc));
+ /* fall through */
else
return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
return find_pc_line (BMSYMBOL_VALUE_ADDRESS (mfunsym), 0);
}

View File

@ -1,119 +0,0 @@
2007-09-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New variables
X_SHDR_SHSTRTAB and I_SHDR_SHSTRTAB. Fixed the CONTENTS_SIZE trimming
check for its aligned size between the last segment and still before
the section header end. Added variables check to cover also the
section header string table.
--- gdb-7.4.50.20120120-orig/bfd/elfcode.h 2012-02-29 09:17:08.000000000 +0100
+++ gdb-7.4.50.20120120/bfd/elfcode.h 2012-02-29 10:23:03.000000000 +0100
@@ -1621,6 +1621,8 @@ NAME(_bfd_elf,bfd_from_remote_memory)
Elf_Internal_Ehdr i_ehdr; /* Elf file header, internal form */
Elf_External_Phdr *x_phdrs;
Elf_Internal_Phdr *i_phdrs, *last_phdr;
+ Elf_External_Shdr *x_shdrs;
+ Elf_Internal_Shdr *i_shdrs;
bfd *nbfd;
struct bfd_in_memory *bim;
int contents_size;
@@ -1740,24 +1742,46 @@ NAME(_bfd_elf,bfd_from_remote_memory)
/* Trim the last segment so we don't bother with zeros in the last page
that are off the end of the file. However, if the extra bit in that
- page includes the section headers, keep them. */
- if ((bfd_vma) contents_size > last_phdr->p_offset + last_phdr->p_filesz
- && (bfd_vma) contents_size >= (i_ehdr.e_shoff
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
+ page includes the section headers os the section header string table,
+ keep them. */
+ if ((bfd_vma) contents_size > last_phdr->p_offset + last_phdr->p_filesz)
+ contents_size = last_phdr->p_offset + last_phdr->p_filesz;
+
+ if ((bfd_vma) contents_size < i_ehdr.e_shoff
+ + i_ehdr.e_shnum * i_ehdr.e_shentsize)
+ contents_size = i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize;
+
+ /* Verify also all the sections fit into CONTENTS_SIZE. */
+
+ x_shdrs = bfd_malloc (i_ehdr.e_shnum * (sizeof *x_shdrs + sizeof *i_shdrs));
+ if (x_shdrs == NULL)
{
- contents_size = last_phdr->p_offset + last_phdr->p_filesz;
- if ((bfd_vma) contents_size < (i_ehdr.e_shoff
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
- contents_size = i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize;
+ free (x_phdrs);
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
}
+ err = target_read_memory (ehdr_vma + i_ehdr.e_shoff, (bfd_byte *) x_shdrs,
+ i_ehdr.e_shnum * sizeof *x_shdrs);
+ if (err)
+ i_shdrs = NULL;
else
- contents_size = last_phdr->p_offset + last_phdr->p_filesz;
+ {
+ i_shdrs = (Elf_Internal_Shdr *) &x_shdrs[i_ehdr.e_shnum];
+ for (i = 0; i < i_ehdr.e_shnum; ++i)
+ {
+ elf_swap_shdr_in (templ, &x_shdrs[i], &i_shdrs[i]);
+
+ if ((bfd_vma) contents_size < i_shdrs[i].sh_offset + i_shdrs[i].sh_size)
+ contents_size = i_shdrs[i].sh_offset + i_shdrs[i].sh_size;
+ }
+ }
/* Now we know the size of the whole image we want read in. */
contents = (bfd_byte *) bfd_zmalloc (contents_size);
if (contents == NULL)
{
free (x_phdrs);
+ free (x_shdrs);
bfd_set_error (bfd_error_no_memory);
return NULL;
}
@@ -1776,6 +1800,7 @@ NAME(_bfd_elf,bfd_from_remote_memory)
if (err)
{
free (x_phdrs);
+ free (x_shdrs);
free (contents);
bfd_set_error (bfd_error_system_call);
errno = err;
@@ -1784,10 +1809,32 @@ NAME(_bfd_elf,bfd_from_remote_memory)
}
free (x_phdrs);
- /* If the segments visible in memory didn't include the section headers,
+ if (i_shdrs)
+ {
+ memcpy (contents + i_ehdr.e_shoff, x_shdrs,
+ i_ehdr.e_shnum * sizeof *x_shdrs);
+
+ for (i = 0; i < i_ehdr.e_shnum; ++i)
+ {
+ bfd_vma start = i_shdrs[i].sh_offset;
+ bfd_vma end = i_shdrs[i].sh_offset + i_shdrs[i].sh_size;
+
+ if (end > (bfd_vma) contents_size)
+ end = contents_size;
+ err = target_read_memory (ehdr_vma + start, contents + start,
+ end - start);
+ if (err)
+ {
+ i_shdrs = NULL;
+ break;
+ }
+ }
+ }
+ free (x_shdrs);
+
+ /* If the segments readable in memory didn't include the section headers,
then clear them from the file header. */
- if ((bfd_vma) contents_size < (i_ehdr.e_shoff
- + i_ehdr.e_shnum * i_ehdr.e_shentsize))
+ if (i_shdrs == NULL)
{
memset (&x_ehdr.e_shoff, 0, sizeof x_ehdr.e_shoff);
memset (&x_ehdr.e_shnum, 0, sizeof x_ehdr.e_shnum);

View File

@ -58,13 +58,13 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
* exec.c (exec_file_attach): Print a more useful error message if the
user did "gdb core".
Index: gdb-7.6.90.20140127/gdb/exceptions.h
Index: gdb-7.7.50.20140609/gdb/exceptions.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/exceptions.h 2014-02-06 17:31:00.148529736 +0100
+++ gdb-7.6.90.20140127/gdb/exceptions.h 2014-02-06 17:31:17.560548525 +0100
@@ -97,6 +97,9 @@ enum errors {
/* An undefined command was executed. */
UNDEFINED_COMMAND_ERROR,
--- gdb-7.7.50.20140609.orig/gdb/exceptions.h 2014-06-13 20:26:46.988804553 +0200
+++ gdb-7.7.50.20140609/gdb/exceptions.h 2014-06-13 20:27:01.930820057 +0200
@@ -100,6 +100,9 @@ enum errors {
/* Requested feature, method, mechanism, etc. is not supported. */
NOT_SUPPORTED_ERROR,
+ /* Attempt to load a core file as executable. */
+ IS_CORE_ERROR,
@ -72,19 +72,19 @@ Index: gdb-7.6.90.20140127/gdb/exceptions.h
/* Add more errors here. */
NR_ERRORS
};
Index: gdb-7.6.90.20140127/gdb/exec.c
Index: gdb-7.7.50.20140609/gdb/exec.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/exec.c 2014-02-06 17:30:58.266527708 +0100
+++ gdb-7.6.90.20140127/gdb/exec.c 2014-02-06 17:31:00.149529737 +0100
@@ -34,6 +34,7 @@
#include "gdbthread.h"
--- gdb-7.7.50.20140609.orig/gdb/exec.c 2014-06-13 20:26:44.831802315 +0200
+++ gdb-7.7.50.20140609/gdb/exec.c 2014-06-13 20:27:17.282836454 +0200
@@ -35,6 +35,7 @@
#include "progspace.h"
#include "gdb_bfd.h"
#include "gcore.h"
+#include "exceptions.h"
#include <fcntl.h>
#include "readline/readline.h"
@@ -228,12 +229,27 @@ exec_file_attach (char *filename, int fr
@@ -231,12 +232,27 @@ exec_file_attach (char *filename, int fr
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{
@ -115,11 +115,11 @@ Index: gdb-7.6.90.20140127/gdb/exec.c
}
if (build_section_table (exec_bfd, &sections, &sections_end))
Index: gdb-7.6.90.20140127/gdb/main.c
Index: gdb-7.7.50.20140609/gdb/main.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/main.c 2014-02-06 17:30:58.267527709 +0100
+++ gdb-7.6.90.20140127/gdb/main.c 2014-02-06 17:32:32.232629052 +0100
@@ -307,6 +307,36 @@ typedef struct cmdarg {
--- gdb-7.7.50.20140609.orig/gdb/main.c 2014-06-13 20:26:44.831802315 +0200
+++ gdb-7.7.50.20140609/gdb/main.c 2014-06-13 20:26:46.990804555 +0200
@@ -341,6 +341,36 @@ typedef struct cmdarg {
/* Define type VEC (cmdarg_s). */
DEF_VEC_O (cmdarg_s);
@ -156,7 +156,7 @@ Index: gdb-7.6.90.20140127/gdb/main.c
static int
captured_main (void *data)
{
@@ -824,6 +854,8 @@ captured_main (void *data)
@@ -854,6 +884,8 @@ captured_main (void *data)
{
symarg = argv[optind];
execarg = argv[optind];
@ -165,7 +165,7 @@ Index: gdb-7.6.90.20140127/gdb/main.c
optind++;
}
@@ -987,11 +1019,25 @@ captured_main (void *data)
@@ -1017,11 +1049,25 @@ captured_main (void *data)
&& symarg != NULL
&& strcmp (execarg, symarg) == 0)
{

View File

@ -0,0 +1,131 @@
Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
This is the fix for RH BZ #981154
It is mainly a testcase addition, but a minor fix in the gdb/build-id.c
file was also needed.
gdb/build-id.c was added by:
commit dc294be54c96414035eed7d53dafdea0a6f31a72
Author: Tom Tromey <tromey@redhat.com>
Date: Tue Oct 8 19:56:15 2013 +0000
and had a little thinko there. The variable 'filename' needs to be set to
NULL after it is free'd, otherwise the code below thinks that it is still
valid and doesn't print the necessary warning ("Try: yum install ...").
Index: gdb-7.7/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
===================================================================
--- /dev/null
+++ gdb-7.7/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
@@ -0,0 +1,97 @@
+# Copyright (C) 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 "normal.c"
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+ return -1
+}
+
+# Get the build-id of the file
+set build_id_debug_file [build_id_debug_filename_get $binfile]
+regsub -all ".debug$" $build_id_debug_file "" build_id_without_debug
+
+# Run to main
+if { ![runto_main] } {
+ return -1
+}
+
+# We first need to generate a corefile
+set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
+set core_supported 0
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
+ "save a corefile" \
+{
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "save a corefile"
+ global core_supported
+ set core_supported 1
+ }
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
+ unsupported "save a corefile"
+ global core_supported
+ set core_supported 0
+ }
+}
+
+if {!$core_supported} {
+ return -1
+}
+
+# Move the binfile to a temporary name
+remote_exec build "mv $binfile ${binfile}.old"
+
+# Reinitialize GDB and see if we get a yum warning
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+with_test_prefix "first run:" {
+ gdb_test "set build-id-verbose 1" "" \
+ "set build-id-verbose"
+
+ gdb_test "set debug-file-directory ${objdir}/${subdir}" "" \
+ "set debug-file-directory"
+
+ gdb_test "core-file ${objdir}/${subdir}/gcore.test" \
+ "Missing separate debuginfo for the main executable file\r\nTry: yum --enablerepo='\\*debug\\*' install $objdir/$subdir/$build_id_without_debug\r\n.*" \
+ "test first yum warning"
+}
+
+# Now we define and create our .build-id
+file mkdir [file dirname ${objdir}/${subdir}/${build_id_without_debug}]
+# Cannot use "file link" (from TCL) because it requires the target file to
+# exist.
+remote_exec build "ln -s $binfile ${objdir}/${subdir}/${build_id_without_debug}"
+
+# Reinitialize GDB to get the second yum warning
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+with_test_prefix "second run:" {
+ gdb_test "set build-id-verbose 1" "" \
+ "set build-id-verbose"
+
+ gdb_test "set debug-file-directory ${objdir}/${subdir}" "" \
+ "set debug-file-directory"
+
+ gdb_test "core-file ${objdir}/${subdir}/gcore.test" \
+ "Missing separate debuginfo for the main executable file\r\nTry: yum --enablerepo='\\*debug\\*' install $binfile\r\n.*" \
+ "test second yum warning"
+}
+
+# Leaving the link there will cause breakage in the next run.
+remote_exec build "rm -f ${objdir}/${subdir}/${build_id_without_debug}"
Index: gdb-7.7/gdb/build-id.c
===================================================================
--- gdb-7.7.orig/gdb/build-id.c
+++ gdb-7.7/gdb/build-id.c
@@ -588,6 +588,7 @@ build_id_to_debug_bfd (size_t build_id_l
if (abfd == NULL)
{
xfree (filename);
+ filename = NULL;
continue;
}

View File

@ -1,8 +1,8 @@
Index: gdb-7.6.90.20140127/gdb/event-top.c
Index: gdb-7.7.50.20140609/gdb/event-top.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/event-top.c 2014-02-06 17:18:26.965717210 +0100
+++ gdb-7.6.90.20140127/gdb/event-top.c 2014-02-06 16:59:23.174474404 +0100
@@ -37,6 +37,7 @@
--- gdb-7.7.50.20140609.orig/gdb/event-top.c 2014-06-13 20:10:19.632787642 +0200
+++ gdb-7.7.50.20140609/gdb/event-top.c 2014-06-13 20:11:49.605878557 +0200
@@ -38,6 +38,7 @@
#include "gdbcmd.h" /* for dont_repeat() */
#include "annotate.h"
#include "maint.h"
@ -10,7 +10,7 @@ Index: gdb-7.6.90.20140127/gdb/event-top.c
/* readline include files. */
#include "readline/readline.h"
@@ -173,6 +174,8 @@ rl_callback_read_char_wrapper (gdb_clien
@@ -176,6 +177,8 @@ rl_callback_read_char_wrapper (gdb_clien
void
cli_command_loop (void *data)
{
@ -19,20 +19,20 @@ Index: gdb-7.6.90.20140127/gdb/event-top.c
display_gdb_prompt (0);
/* Now it's time to start the event loop. */
@@ -240,6 +243,8 @@ display_gdb_prompt (char *new_prompt)
@@ -243,6 +246,8 @@ display_gdb_prompt (char *new_prompt)
/* Reset the nesting depth used when trace-commands is set. */
reset_command_nest_depth ();
+ debug_flush_missing ();
+
/* Each interpreter has its own rules on displaying the command
prompt. */
if (!current_interp_display_prompt_p ())
Index: gdb-7.6.90.20140127/gdb/symfile.h
old_chain = make_cleanup (free_current_contents, &actual_gdb_prompt);
/* Do not call the python hook on an explicit prompt change as
Index: gdb-7.7.50.20140609/gdb/symfile.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/symfile.h 2014-02-06 17:18:33.865724666 +0100
+++ gdb-7.6.90.20140127/gdb/symfile.h 2014-02-06 17:08:56.282099150 +0100
@@ -557,6 +557,8 @@ extern struct cleanup *increment_reading
--- gdb-7.7.50.20140609.orig/gdb/symfile.h 2014-06-13 20:10:19.633787643 +0200
+++ gdb-7.7.50.20140609/gdb/symfile.h 2014-06-13 20:10:31.066799158 +0200
@@ -573,6 +573,8 @@ void map_symbol_filenames (symbol_filena
/* build-id support. */
extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr);
extern void debug_print_missing (const char *binary, const char *debug);
@ -41,11 +41,11 @@ Index: gdb-7.6.90.20140127/gdb/symfile.h
/* From dwarf2read.c */
Index: gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/gdb.exp 2014-02-06 17:18:26.969717214 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp 2014-02-06 17:18:33.866724667 +0100
@@ -1504,7 +1504,7 @@ proc default_gdb_start { } {
--- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/gdb.exp 2014-06-13 20:10:19.634787644 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp 2014-06-13 20:10:31.067799159 +0200
@@ -1492,7 +1492,7 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@ -54,10 +54,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp
send_gdb "set build-id-verbose 0\n"
gdb_expect 10 {
-re "$gdb_prompt $" {
Index: gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/mi-support.exp 2014-02-06 17:18:26.970717215 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp 2014-02-06 17:18:33.867724668 +0100
--- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:10:19.635787645 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:10:31.068799160 +0200
@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0."
}
@ -67,22 +67,22 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp
send_gdb "190-gdb-set build-id-verbose 0\n"
gdb_expect 10 {
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
Index: gdb-7.6.90.20140127/gdb/tui/tui-interp.c
Index: gdb-7.7.50.20140609/gdb/tui/tui-interp.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/tui/tui-interp.c 2014-02-06 17:18:26.970717215 +0100
+++ gdb-7.6.90.20140127/gdb/tui/tui-interp.c 2014-02-06 17:18:33.867724668 +0100
@@ -30,6 +30,7 @@
#include "tui/tui.h"
#include "tui/tui-io.h"
--- gdb-7.7.50.20140609.orig/gdb/tui/tui-interp.c 2014-06-13 20:10:31.068799160 +0200
+++ gdb-7.7.50.20140609/gdb/tui/tui-interp.c 2014-06-13 20:10:47.806816542 +0200
@@ -32,6 +32,7 @@
#include "exceptions.h"
#include "infrun.h"
#include "observer.h"
+#include "symfile.h"
/* Set to 1 when the TUI mode must be activated when we first start
gdb. */
Index: gdb-7.6.90.20140127/gdb/aclocal.m4
static struct ui_out *tui_ui_out (struct interp *self);
Index: gdb-7.7.50.20140609/gdb/aclocal.m4
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/aclocal.m4 2014-02-06 17:18:33.868724669 +0100
+++ gdb-7.6.90.20140127/gdb/aclocal.m4 2014-02-06 17:09:49.877157405 +0100
--- gdb-7.7.50.20140609.orig/gdb/aclocal.m4 2014-06-13 20:10:19.636787646 +0200
+++ gdb-7.7.50.20140609/gdb/aclocal.m4 2014-06-13 20:10:31.069799161 +0200
@@ -11,6 +11,221 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@ -305,10 +305,10 @@ Index: gdb-7.6.90.20140127/gdb/aclocal.m4
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
Index: gdb-7.6.90.20140127/gdb/config.in
Index: gdb-7.7.50.20140609/gdb/config.in
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/config.in 2014-02-06 17:18:26.971717216 +0100
+++ gdb-7.6.90.20140127/gdb/config.in 2014-02-06 17:18:33.868724669 +0100
--- gdb-7.7.50.20140609.orig/gdb/config.in 2014-06-13 20:10:19.637787647 +0200
+++ gdb-7.7.50.20140609/gdb/config.in 2014-06-13 20:10:31.069799161 +0200
@@ -33,6 +33,9 @@
/* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC
@ -319,7 +319,7 @@ Index: gdb-7.6.90.20140127/gdb/config.in
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
@@ -207,6 +210,9 @@
@@ -210,6 +213,9 @@
/* Define if Python 2.7 is being used. */
#undef HAVE_LIBPYTHON2_7
@ -329,11 +329,11 @@ Index: gdb-7.6.90.20140127/gdb/config.in
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H
Index: gdb-7.6.90.20140127/gdb/configure
Index: gdb-7.7.50.20140609/gdb/configure
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/configure 2014-02-06 17:18:26.976717221 +0100
+++ gdb-7.6.90.20140127/gdb/configure 2014-02-06 17:18:33.872724673 +0100
@@ -689,6 +689,11 @@ PKGVERSION
--- gdb-7.7.50.20140609.orig/gdb/configure 2014-06-13 20:10:19.642787652 +0200
+++ gdb-7.7.50.20140609/gdb/configure 2014-06-13 20:10:31.073799165 +0200
@@ -692,6 +692,11 @@ PKGVERSION
HAVE_NATIVE_GCORE_TARGET
TARGET_OBS
subdirs
@ -345,7 +345,7 @@ Index: gdb-7.6.90.20140127/gdb/configure
GDB_DATADIR
DEBUGDIR
MAKEINFO_EXTRA_FLAGS
@@ -792,6 +797,7 @@ with_gdb_datadir
@@ -795,6 +800,7 @@ with_gdb_datadir
with_relocated_sources
with_auto_load_dir
with_auto_load_safe_path
@ -353,7 +353,7 @@ Index: gdb-7.6.90.20140127/gdb/configure
enable_targets
enable_64_bit_bfd
enable_gdbcli
@@ -842,6 +848,11 @@ CPPFLAGS
@@ -846,6 +852,11 @@ CPPFLAGS
CPP
MAKEINFO
MAKEINFOFLAGS
@ -365,7 +365,7 @@ Index: gdb-7.6.90.20140127/gdb/configure
YACC
YFLAGS
XMKMF'
@@ -1512,6 +1523,8 @@ Optional Packages:
@@ -1516,6 +1527,8 @@ Optional Packages:
[--with-auto-load-dir]
--without-auto-load-safe-path
do not restrict auto-loaded files locations
@ -374,7 +374,7 @@ Index: gdb-7.6.90.20140127/gdb/configure
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap
library
@@ -1559,6 +1572,13 @@ Some influential environment variables:
@@ -1565,6 +1578,13 @@ Some influential environment variables:
MAKEINFO Parent configure detects if it is of sufficient version.
MAKEINFOFLAGS
Parameters for MAKEINFO.
@ -388,7 +388,7 @@ Index: gdb-7.6.90.20140127/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.
@@ -5154,6 +5174,491 @@ _ACEOF
@@ -5160,6 +5180,491 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; }
@ -880,10 +880,10 @@ Index: gdb-7.6.90.20140127/gdb/configure
subdirs="$subdirs testsuite"
Index: gdb-7.6.90.20140127/gdb/configure.ac
Index: gdb-7.7.50.20140609/gdb/configure.ac
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/configure.ac 2014-02-06 17:18:26.977717223 +0100
+++ gdb-7.6.90.20140127/gdb/configure.ac 2014-02-06 17:18:33.873724674 +0100
--- gdb-7.7.50.20140609.orig/gdb/configure.ac 2014-06-13 20:10:19.643787653 +0200
+++ gdb-7.7.50.20140609/gdb/configure.ac 2014-06-13 20:10:31.074799166 +0200
@@ -165,6 +165,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
[Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path])
@ -1084,11 +1084,11 @@ Index: gdb-7.6.90.20140127/gdb/configure.ac
AC_CONFIG_SUBDIRS(testsuite)
# Check whether to support alternative target configurations
Index: gdb-7.6.90.20140127/gdb/corelow.c
Index: gdb-7.7.50.20140609/gdb/corelow.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/corelow.c 2014-02-06 17:18:26.978717224 +0100
+++ gdb-7.6.90.20140127/gdb/corelow.c 2014-02-06 17:18:33.873724674 +0100
@@ -315,7 +315,7 @@ build_id_locate_exec (int from_tty)
--- gdb-7.7.50.20140609.orig/gdb/corelow.c 2014-06-13 20:10:19.644787654 +0200
+++ gdb-7.7.50.20140609/gdb/corelow.c 2014-06-13 20:10:31.074799166 +0200
@@ -316,7 +316,7 @@ build_id_locate_exec (int from_tty)
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
}
else
@ -1097,10 +1097,10 @@ Index: gdb-7.6.90.20140127/gdb/corelow.c
do_cleanups (back_to);
Index: gdb-7.6.90.20140127/gdb/build-id.c
Index: gdb-7.7.50.20140609/gdb/build-id.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-02-06 17:18:26.842717077 +0100
+++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 17:08:18.341060295 +0100
--- gdb-7.7.50.20140609.orig/gdb/build-id.c 2014-06-13 20:10:19.644787654 +0200
+++ gdb-7.7.50.20140609/gdb/build-id.c 2014-06-13 20:10:31.075799167 +0200
@@ -32,6 +32,7 @@
#include "gdbcmd.h"
#include "observer.h"

View File

@ -1,8 +1,8 @@
Index: gdb-7.6.90.20140127/gdb/corelow.c
Index: gdb-7.7.50.20140609/gdb/corelow.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/corelow.c 2014-01-27 02:57:53.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/corelow.c 2014-02-06 16:46:52.261646499 +0100
@@ -48,6 +48,10 @@
--- gdb-7.7.50.20140609.orig/gdb/corelow.c 2014-06-13 20:09:37.369745221 +0200
+++ gdb-7.7.50.20140609/gdb/corelow.c 2014-06-13 20:09:42.407750265 +0200
@@ -49,6 +49,10 @@
#include "gdb_bfd.h"
#include "completer.h"
#include "filestuff.h"
@ -13,7 +13,7 @@ Index: gdb-7.6.90.20140127/gdb/corelow.c
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
@@ -271,6 +275,53 @@ add_to_thread_list (bfd *abfd, asection
@@ -272,6 +276,53 @@ add_to_thread_list (bfd *abfd, asection
inferior_ptid = ptid; /* Yes, make it current. */
}
@ -67,7 +67,7 @@ Index: gdb-7.6.90.20140127/gdb/corelow.c
/* This routine opens and sets up the core file bfd. */
static void
@@ -409,6 +460,14 @@ core_open (char *filename, int from_tty)
@@ -410,6 +461,14 @@ core_open (char *filename, int from_tty)
switch_to_thread (thread->ptid);
}
@ -82,7 +82,7 @@ Index: gdb-7.6.90.20140127/gdb/corelow.c
post_create_inferior (&core_ops, from_tty);
/* Now go through the target stack looking for threads since there
@@ -980,4 +1039,11 @@ _initialize_corelow (void)
@@ -1029,4 +1088,11 @@ _initialize_corelow (void)
init_core_ops ();
add_target_with_completer (&core_ops, filename_completer);
@ -94,11 +94,11 @@ Index: gdb-7.6.90.20140127/gdb/corelow.c
+ NULL, NULL, NULL,
+ &setlist, &showlist);
}
Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo
Index: gdb-7.7.50.20140609/gdb/doc/gdb.texinfo
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-02-06 16:46:51.804645989 +0100
+++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-02-06 16:46:52.110646331 +0100
@@ -17413,6 +17413,27 @@ information files.
--- gdb-7.7.50.20140609.orig/gdb/doc/gdb.texinfo 2014-06-13 20:09:37.380745232 +0200
+++ gdb-7.7.50.20140609/gdb/doc/gdb.texinfo 2014-06-13 20:09:42.417750275 +0200
@@ -17547,6 +17547,27 @@ information files.
@end table
@ -126,11 +126,11 @@ Index: gdb-7.6.90.20140127/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.6.90.20140127/gdb/solib-svr4.c
Index: gdb-7.7.50.20140609/gdb/solib-svr4.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/solib-svr4.c 2014-01-27 02:57:53.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/solib-svr4.c 2014-02-06 16:49:27.508819174 +0100
@@ -47,6 +47,7 @@
--- gdb-7.7.50.20140609.orig/gdb/solib-svr4.c 2014-06-13 20:09:37.382745234 +0200
+++ gdb-7.7.50.20140609/gdb/solib-svr4.c 2014-06-13 20:09:42.418750276 +0200
@@ -48,6 +48,7 @@
#include "exceptions.h"
#include "gdb_bfd.h"
#include "probe.h"
@ -194,11 +194,11 @@ Index: gdb-7.6.90.20140127/gdb/solib-svr4.c
xfree (buffer);
/* If this entry has no name, or its name matches the name
Index: gdb-7.6.90.20140127/gdb/elfread.c
Index: gdb-7.7.50.20140609/gdb/elfread.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/elfread.c 2014-01-27 02:57:53.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/elfread.c 2014-02-06 16:46:52.249646486 +0100
@@ -1316,9 +1316,10 @@ elf_symfile_read (struct objfile *objfil
--- gdb-7.7.50.20140609.orig/gdb/elfread.c 2014-06-13 20:09:37.383745235 +0200
+++ gdb-7.7.50.20140609/gdb/elfread.c 2014-06-13 20:09:42.418750276 +0200
@@ -1335,9 +1335,10 @@ elf_symfile_read (struct objfile *objfil
&& objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL)
{
@ -211,7 +211,7 @@ Index: gdb-7.6.90.20140127/gdb/elfread.c
if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile);
@@ -1332,6 +1333,12 @@ elf_symfile_read (struct objfile *objfil
@@ -1351,6 +1352,12 @@ elf_symfile_read (struct objfile *objfil
symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
do_cleanups (cleanup);
}
@ -224,13 +224,13 @@ Index: gdb-7.6.90.20140127/gdb/elfread.c
}
}
Index: gdb-7.6.90.20140127/gdb/symfile.h
Index: gdb-7.7.50.20140609/gdb/symfile.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/symfile.h 2014-01-27 02:57:53.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/symfile.h 2014-02-06 16:46:52.250646487 +0100
@@ -554,6 +554,10 @@ void free_symfile_segment_data (struct s
extern struct cleanup *increment_reading_symtab (void);
--- gdb-7.7.50.20140609.orig/gdb/symfile.h 2014-06-13 20:09:42.419750277 +0200
+++ gdb-7.7.50.20140609/gdb/symfile.h 2014-06-13 20:10:04.478772510 +0200
@@ -570,6 +570,10 @@ void expand_symtabs_matching (expand_sym
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
int need_fullname);
+/* build-id support. */
+extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr);
@ -239,11 +239,11 @@ Index: gdb-7.6.90.20140127/gdb/symfile.h
/* From dwarf2read.c */
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
Index: gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/gdb.exp 2014-02-06 16:46:51.643645810 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp 2014-02-06 16:46:52.251646488 +0100
@@ -1504,6 +1504,16 @@ proc default_gdb_start { } {
--- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/gdb.exp 2014-06-13 20:09:37.384745236 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp 2014-06-13 20:09:42.420750278 +0200
@@ -1492,6 +1492,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
}
@ -260,10 +260,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/lib/gdb.exp
return 0
}
Index: gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/mi-support.exp 2014-01-27 02:57:54.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp 2014-02-06 16:46:52.252646489 +0100
--- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:09:37.385745237 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:09:42.421750279 +0200
@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0."
}
@ -281,11 +281,11 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/lib/mi-support.exp
# If allowing the inferior to have its own PTY then assign the inferior
# its own terminal device here.
if { $separate_inferior_pty } {
Index: gdb-7.6.90.20140127/gdb/objfiles.h
Index: gdb-7.7.50.20140609/gdb/objfiles.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/objfiles.h 2014-01-27 02:57:53.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/objfiles.h 2014-02-06 16:46:52.113646334 +0100
@@ -436,6 +436,10 @@ struct objfile
--- gdb-7.7.50.20140609.orig/gdb/objfiles.h 2014-06-13 20:09:37.385745237 +0200
+++ gdb-7.7.50.20140609/gdb/objfiles.h 2014-06-13 20:09:42.421750279 +0200
@@ -464,6 +464,10 @@ struct objfile
#define OBJF_NOT_FILENAME (1 << 6)
@ -296,11 +296,11 @@ Index: gdb-7.6.90.20140127/gdb/objfiles.h
/* Declarations for functions defined in objfiles.c */
extern struct objfile *allocate_objfile (bfd *, const char *name, int);
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/corefile.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.base/corefile.exp 2014-01-27 02:57:54.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/corefile.exp 2014-02-06 16:46:52.113646334 +0100
@@ -281,3 +281,33 @@ gdb_test_multiple "core-file $corefile"
--- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.base/corefile.exp 2014-06-13 20:09:37.385745237 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp 2014-06-13 20:09:42.421750279 +0200
@@ -293,3 +293,33 @@ gdb_test_multiple "core-file $corefile"
pass $test
}
}
@ -334,10 +334,10 @@ Index: gdb-7.6.90.20140127/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.6.90.20140127/gdb/build-id.c
Index: gdb-7.7.50.20140609/gdb/build-id.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-01-27 02:57:53.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 16:46:52.113646334 +0100
--- gdb-7.7.50.20140609.orig/gdb/build-id.c 2014-06-13 20:09:37.386745238 +0200
+++ gdb-7.7.50.20140609/gdb/build-id.c 2014-06-13 20:09:42.422750280 +0200
@@ -27,11 +27,65 @@
#include "symfile.h"
#include "objfiles.h"
@ -1160,10 +1160,10 @@ Index: gdb-7.6.90.20140127/gdb/build-id.c
+
+ observer_attach_executable_changed (debug_print_executable_changed);
+}
Index: gdb-7.6.90.20140127/gdb/build-id.h
Index: gdb-7.7.50.20140609/gdb/build-id.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/build-id.h 2014-01-27 02:57:53.000000000 +0100
+++ gdb-7.6.90.20140127/gdb/build-id.h 2014-02-06 16:46:52.114646335 +0100
--- gdb-7.7.50.20140609.orig/gdb/build-id.h 2014-06-13 20:09:37.386745238 +0200
+++ gdb-7.7.50.20140609/gdb/build-id.h 2014-06-13 20:09:42.422750280 +0200
@@ -32,13 +32,18 @@ extern int build_id_verify (bfd *abfd,
the caller. */
@ -1185,11 +1185,11 @@ Index: gdb-7.6.90.20140127/gdb/build-id.h
+ char **build_id_filename_return);
#endif /* BUILD_ID_H */
Index: gdb-7.6.90.20140127/gdb/dwarf2read.c
Index: gdb-7.7.50.20140609/gdb/dwarf2read.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-02-06 16:46:51.809645995 +0100
+++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-02-06 16:49:55.679850414 +0100
@@ -2429,7 +2429,7 @@ dwarf2_get_dwz_file (void)
--- gdb-7.7.50.20140609.orig/gdb/dwarf2read.c 2014-06-13 20:09:37.389745241 +0200
+++ gdb-7.7.50.20140609/gdb/dwarf2read.c 2014-06-13 20:09:42.425750283 +0200
@@ -2446,7 +2446,7 @@ dwarf2_get_dwz_file (void)
}
if (dwz_bfd == NULL)

View File

@ -1,8 +1,8 @@
Index: gdb-7.6.90.20140127/gdb/infrun.c
Index: gdb-7.7.50.20140609/gdb/infrun.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/infrun.c 2014-02-04 23:48:27.262092869 +0100
+++ gdb-7.6.90.20140127/gdb/infrun.c 2014-02-04 23:48:31.674096613 +0100
@@ -1618,7 +1618,7 @@ static const char *const scheduler_enums
--- gdb-7.7.50.20140609.orig/gdb/infrun.c 2014-06-13 20:08:51.225699203 +0200
+++ gdb-7.7.50.20140609/gdb/infrun.c 2014-06-13 20:08:55.515703466 +0200
@@ -1661,7 +1661,7 @@ static const char *const scheduler_enums
schedlock_step,
NULL
};
@ -11,11 +11,11 @@ Index: gdb-7.6.90.20140127/gdb/infrun.c
static void
show_scheduler_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-cli.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-cli.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2014-02-04 23:48:27.263092871 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-cli.exp 2014-02-04 23:48:31.674096613 +0100
@@ -163,7 +163,7 @@ mi_execute_to "exec-continue" "breakpoin
--- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2014-06-13 20:08:55.515703466 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-cli.exp 2014-06-13 20:09:24.862732832 +0200
@@ -181,7 +181,7 @@ mi_expect_stop "breakpoint-hit" "main" "
# Test that the token is output even for CLI commands
# Also test that *stopped includes frame information.
mi_gdb_test "34 next" \
@ -23,11 +23,11 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-cli.exp
+ ".*34\\\^running.*\\*running,thread-id=\"1\"" \
"34 next: run"
if {!$async} {
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-logging.exp
# Test that the new current source line is output to the console
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-logging.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2014-02-04 23:48:27.263092871 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-logging.exp 2014-02-04 23:48:31.674096613 +0100
--- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2014-06-13 20:08:51.227699205 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-logging.exp 2014-06-13 20:08:55.516703467 +0200
@@ -53,7 +53,7 @@ close $chan
set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
@ -46,10 +46,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-logging.exp
pass "Redirect log file contents"
} else {
fail "Redirect log file contents"
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-console.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-console.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.mi/mi-console.exp 2014-02-04 23:48:31.675096666 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.mi/mi-console.exp 2014-02-04 23:48:55.981127963 +0100
--- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.mi/mi-console.exp 2014-06-13 20:08:51.227699205 +0200
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-console.exp 2014-06-13 20:08:55.516703467 +0200
@@ -60,6 +60,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main

View File

@ -21,41 +21,20 @@
Port to GDB-6.8pre.
Index: gdb-7.6.90.20140127/gdb/inferior.h
Index: gdb-7.7.90.20140613/gdb/infrun.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/inferior.h 2014-01-27 22:05:28.801895347 +0100
+++ gdb-7.6.90.20140127/gdb/inferior.h 2014-01-27 22:33:45.230157813 +0100
@@ -155,7 +155,15 @@ extern void reopen_exec_file (void);
/* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */
-extern void resume (int, enum gdb_signal);
+enum resume_step
+ {
+ /* currently_stepping () should return non-zero for non-continue. */
+ RESUME_STEP_CONTINUE = 0,
+ RESUME_STEP_USER, /* Stepping is intentional by the user. */
+ RESUME_STEP_NEEDED /* Stepping only for software watchpoints. */
+ };
+
+extern void resume (enum resume_step, enum gdb_signal);
extern ptid_t user_visible_resume_ptid (int step);
Index: gdb-7.6.90.20140127/gdb/infrun.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/infrun.c 2014-01-27 22:05:28.804895349 +0100
+++ gdb-7.6.90.20140127/gdb/infrun.c 2014-01-27 22:35:12.781224279 +0100
@@ -83,7 +83,7 @@ static int follow_fork (void);
--- gdb-7.7.90.20140613.orig/gdb/infrun.c 2014-06-13 03:59:36.000000000 +0200
+++ gdb-7.7.90.20140613/gdb/infrun.c 2014-06-13 21:36:43.637294782 +0200
@@ -84,7 +84,7 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
-static int currently_stepping (struct thread_info *tp);
+static enum resume_step currently_stepping (struct thread_info *tp);
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
void *data);
@@ -1699,7 +1699,8 @@ user_visible_resume_ptid (int step)
static void xdb_handle_command (char *args, int from_tty);
@@ -1742,7 +1742,8 @@ user_visible_resume_ptid (int step)
}
else if ((scheduler_mode == schedlock_on)
|| (scheduler_mode == schedlock_step
@ -65,16 +44,16 @@ Index: gdb-7.6.90.20140127/gdb/infrun.c
{
/* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
@@ -1717,7 +1718,7 @@ user_visible_resume_ptid (int step)
@@ -1760,7 +1761,7 @@ user_visible_resume_ptid (int step)
STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */
void
-resume (int step, enum gdb_signal sig)
+resume (enum resume_step step, enum gdb_signal sig)
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
@@ -1750,9 +1751,13 @@ resume (int step, enum gdb_signal sig)
struct regcache *regcache = get_current_regcache ();
@@ -1800,9 +1801,13 @@ resume (int step, enum gdb_signal sig)
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
@ -90,64 +69,59 @@ Index: gdb-7.6.90.20140127/gdb/infrun.c
tp->control.trap_expected,
target_pid_to_str (inferior_ptid),
paddress (gdbarch, pc));
@@ -2147,7 +2152,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
@@ -2188,6 +2193,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
struct thread_info *tp;
CORE_ADDR pc;
struct address_space *aspace;
/* GDB may force the inferior to step due to various reasons. */
- int force_step = 0;
+ enum resume_step resume_step = RESUME_STEP_CONTINUE;
/* If we're stopped at a fork/vfork, follow the branch set by the
"set follow-fork-mode" command; otherwise, we'll just proceed
@@ -2187,13 +2192,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
@@ -2230,13 +2236,19 @@ proceed (CORE_ADDR addr, enum gdb_signal
Note, we don't do this in reverse, because we won't
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
- force_step = 1;
+ {
tp->stepping_over_breakpoint = 1;
+ resume_step = RESUME_STEP_USER;
+ }
else if (gdbarch_single_step_through_delay_p (gdbarch)
&& gdbarch_single_step_through_delay (gdbarch,
get_current_frame ()))
/* We stepped onto an instruction that needs to be stepped
again before re-inserting the breakpoint, do so. */
- force_step = 1;
+ {
tp->stepping_over_breakpoint = 1;
+ resume_step = RESUME_STEP_USER;
+ }
}
else
{
@@ -2225,13 +2230,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
is required it returns TRUE and sets the current thread to
the old thread. */
if (prepare_to_proceed (step))
- force_step = 1;
+ resume_step = RESUME_STEP_USER;
@@ -2288,6 +2300,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
tp->prev_pc = regcache_read_pc (get_current_regcache ());
switch_to_thread (step_over->ptid);
tp = step_over;
+ resume_step = RESUME_STEP_USER;
}
}
/* prepare_to_proceed may change the current thread. */
tp = inferior_thread ();
- if (force_step)
+ if (resume_step == RESUME_STEP_USER)
{
tp->control.trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
@@ -2318,9 +2323,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
@@ -2375,9 +2388,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
/* Reset to normal state. */
init_infwait_state ();
+ if (step)
+ if (tp->control.trap_expected || step)
+ resume_step = RESUME_STEP_USER;
+ if (resume_step == RESUME_STEP_CONTINUE && bpstat_should_step ())
+ resume_step = RESUME_STEP_NEEDED;
+
/* Resume inferior. */
- resume (force_step || step || bpstat_should_step (),
- resume (tp->control.trap_expected || step || bpstat_should_step (),
- tp->suspend.stop_signal);
+ resume (resume_step, tp->suspend.stop_signal);
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
@@ -5332,13 +5341,18 @@ switch_back_to_stepped_thread (struct ex
@@ -5359,13 +5376,16 @@ switch_back_to_stepped_thread (struct ex
/* Is thread TP in the middle of single-stepping? */
@ -156,26 +130,23 @@ Index: gdb-7.6.90.20140127/gdb/infrun.c
currently_stepping (struct thread_info *tp)
{
- return ((tp->control.step_range_end
- && tp->control.step_resume_breakpoint == NULL)
+ if ((tp->control.step_range_end
&& tp->control.step_resume_breakpoint == NULL)
- || tp->control.trap_expected
- || bpstat_should_step ());
+ if ((tp->control.step_range_end
+ && tp->control.step_resume_breakpoint == NULL)
+ || tp->control.trap_expected)
+ || tp->control.trap_expected)
+ return RESUME_STEP_USER;
+
+ if (bpstat_should_step ())
+ if (bpstat_should_step ())
+ return RESUME_STEP_NEEDED;
+
+ return RESUME_STEP_CONTINUE;
}
/* Returns true if any thread *but* the one passed in "data" is in the
Index: gdb-7.6.90.20140127/gdb/linux-nat.c
/* Inferior has stepped into a subroutine call with source code that
Index: gdb-7.7.90.20140613/gdb/linux-nat.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/linux-nat.c 2014-01-27 22:05:28.806895350 +0100
+++ gdb-7.6.90.20140127/gdb/linux-nat.c 2014-01-27 22:33:45.330157889 +0100
@@ -2697,7 +2697,11 @@ static int
--- gdb-7.7.90.20140613.orig/gdb/linux-nat.c 2014-06-13 03:59:37.000000000 +0200
+++ gdb-7.7.90.20140613/gdb/linux-nat.c 2014-06-13 21:31:19.449949814 +0200
@@ -2709,7 +2709,11 @@ static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{
if (lp->last_resume_kind == resume_step
@ -188,11 +159,19 @@ Index: gdb-7.6.90.20140127/gdb/linux-nat.c
return 1;
else
return 0;
Index: gdb-7.6.90.20140127/gdb/linux-nat.h
Index: gdb-7.7.90.20140613/gdb/linux-nat.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/linux-nat.h 2014-01-27 22:05:28.807895351 +0100
+++ gdb-7.6.90.20140127/gdb/linux-nat.h 2014-01-27 22:33:45.334157892 +0100
@@ -59,8 +59,8 @@ struct lwp_info
--- gdb-7.7.90.20140613.orig/gdb/linux-nat.h 2014-06-13 03:59:37.000000000 +0200
+++ gdb-7.7.90.20140613/gdb/linux-nat.h 2014-06-13 21:31:19.449949814 +0200
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "target.h"
+#include "infrun.h"
#include <signal.h>
@@ -59,8 +60,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */
int status;
@ -203,3 +182,36 @@ Index: gdb-7.6.90.20140127/gdb/linux-nat.h
/* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
watchpoint trap. */
Index: gdb-7.7.90.20140613/gdb/infrun.h
===================================================================
--- gdb-7.7.90.20140613.orig/gdb/infrun.h 2014-06-13 03:59:36.000000000 +0200
+++ gdb-7.7.90.20140613/gdb/infrun.h 2014-06-13 21:31:19.449949814 +0200
@@ -89,7 +89,14 @@ extern void proceed (CORE_ADDR, enum gdb
/* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */
-extern void resume (int, enum gdb_signal);
+enum resume_step
+ {
+ /* currently_stepping () should return non-zero for non-continue. */
+ RESUME_STEP_CONTINUE = 0,
+ RESUME_STEP_USER, /* Stepping is intentional by the user. */
+ RESUME_STEP_NEEDED /* Stepping only for software watchpoints. */
+ };
+extern void resume (enum resume_step, enum gdb_signal);
extern ptid_t user_visible_resume_ptid (int step);
diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
index 2a30604..ee1fd11 100644
--- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
@@ -97,7 +97,7 @@ gdb_test "set debug infrun 1"
gdb_test \
"step" \
- ".*need to step-over.*resume \\(step=1.*signal arrived while stepping over breakpoint.*switching back to stepped thread.*stepped to a different line.*callme.*" \
+ ".*need to step-over.*resume \\(step=RESUME_STEP_USER.*signal arrived while stepping over breakpoint.*switching back to stepped thread.*stepped to a different line.*callme.*" \
"step"
set cnt_after [get_value "args\[$my_number\]" "get count after step"]

View File

@ -1,8 +1,8 @@
Index: gdb-7.7/gdb/linux-nat.c
Index: gdb-7.7.90.20140613/gdb/linux-nat.c
===================================================================
--- gdb-7.7.orig/gdb/linux-nat.c 2014-02-09 19:13:32.998214571 +0100
+++ gdb-7.7/gdb/linux-nat.c 2014-02-09 19:17:37.561499606 +0100
@@ -176,6 +176,9 @@ blocked. */
--- gdb-7.7.90.20140613.orig/gdb/linux-nat.c 2014-06-13 23:03:34.364177614 +0200
+++ gdb-7.7.90.20140613/gdb/linux-nat.c 2014-06-13 23:05:07.749279122 +0200
@@ -178,6 +178,9 @@ blocked. */
static struct target_ops *linux_ops;
static struct target_ops linux_ops_saved;
@ -12,7 +12,7 @@ Index: gdb-7.7/gdb/linux-nat.c
/* The method to call, if any, when a new thread is attached. */
static void (*linux_nat_new_thread) (struct lwp_info *);
@@ -652,7 +655,14 @@ holding the child stopped. Try \"set de
@@ -683,7 +686,14 @@ holding the child stopped. Try \"set de
parent_inf->waiting_for_vfork_done = 0;
}
else if (detach_fork)
@ -28,7 +28,7 @@ Index: gdb-7.7/gdb/linux-nat.c
/* Note that the detach above makes PARENT_INF dangling. */
@@ -1099,6 +1109,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
@@ -1107,6 +1117,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LNPAW: Attaching to a stopped process\n");
@ -36,7 +36,7 @@ Index: gdb-7.7/gdb/linux-nat.c
/* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED /
@@ -1518,6 +1529,9 @@ get_pending_status (struct lwp_info *lp,
@@ -1529,6 +1540,9 @@ get_pending_status (struct lwp_info *lp,
gdb_signal_to_string (signo));
}
@ -46,7 +46,7 @@ Index: gdb-7.7/gdb/linux-nat.c
return 0;
}
@@ -1631,6 +1645,8 @@ linux_nat_detach (struct target_ops *ops
@@ -1642,6 +1656,8 @@ linux_nat_detach (struct target_ops *ops
}
else
linux_ops->to_detach (ops, args, from_tty);
@ -55,9 +55,9 @@ Index: gdb-7.7/gdb/linux-nat.c
}
/* Resume LP. */
@@ -1813,6 +1829,14 @@ linux_nat_resume (struct target_ops *ops
linux_nat_resume_callback. */
lp->stopped = 0;
@@ -1824,6 +1840,14 @@ linux_nat_resume (struct target_ops *ops
return;
}
+ /* At this point, we are going to resume the inferior and if we
+ have attached to a stopped process, we no longer should leave
@ -68,9 +68,9 @@ Index: gdb-7.7/gdb/linux-nat.c
+ pid_was_stopped = 0;
+
if (resume_many)
iterate_over_lwps (ptid, linux_nat_resume_callback, NULL);
iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
@@ -3864,6 +3888,8 @@ linux_nat_mourn_inferior (struct target_
@@ -3870,6 +3894,8 @@ linux_nat_mourn_inferior (struct target_
/* Let the arch-specific native code know this process is gone. */
linux_nat_forget_process (pid);
@ -79,10 +79,10 @@ Index: gdb-7.7/gdb/linux-nat.c
}
/* Convert a native/host siginfo object, into/from the siginfo in the
Index: gdb-7.7/gdb/testsuite/gdb.threads/attach-stopped.exp
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.threads/attach-stopped.exp
===================================================================
--- gdb-7.7.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2014-01-08 10:23:36.000000000 +0100
+++ gdb-7.7/gdb/testsuite/gdb.threads/attach-stopped.exp 2014-02-09 19:13:33.321214945 +0100
--- gdb-7.7.90.20140613.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2014-06-13 23:03:34.365177615 +0200
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.threads/attach-stopped.exp 2014-06-13 23:03:37.162180660 +0200
@@ -61,7 +61,65 @@ proc corefunc { threadtype } {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}

View File

@ -5,23 +5,23 @@ 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).
Index: gdb-7.6.50.20130731-cvs/gdb/defs.h
Index: gdb-7.7.90.20140613/gdb/defs.h
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/defs.h 2013-08-02 16:58:31.453016573 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/defs.h 2013-08-02 16:58:41.221030412 +0200
@@ -177,6 +177,7 @@ extern int check_quit_flag (void);
/* Set the quit flag. */
extern void set_quit_flag (void);
--- gdb-7.7.90.20140613.orig/gdb/defs.h 2014-06-13 23:10:18.876623018 +0200
+++ gdb-7.7.90.20140613/gdb/defs.h 2014-06-13 23:10:52.450660505 +0200
@@ -174,6 +174,7 @@ extern void set_quit_flag (void);
/* Flag that function quit should call quit_force. */
extern volatile int sync_quit_force_run;
+extern int quit_flag_cleanup;
extern int immediate_quit;
extern void quit (void);
Index: gdb-7.6.50.20130731-cvs/gdb/top.c
Index: gdb-7.7.90.20140613/gdb/top.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/top.c 2013-08-02 16:58:41.222030414 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/top.c 2013-08-02 16:59:06.321066228 +0200
@@ -1415,7 +1415,9 @@ quit_force (char *args, int from_tty)
--- gdb-7.7.90.20140613.orig/gdb/top.c 2014-06-13 23:10:15.910619715 +0200
+++ gdb-7.7.90.20140613/gdb/top.c 2014-06-13 23:10:18.877623020 +0200
@@ -1378,7 +1378,9 @@ quit_force (char *args, int from_tty)
if (ex.reason < 0) \
exception_print (gdb_stderr, ex)
@ -32,11 +32,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/top.c
/* Get out of tfind mode, and kill or detach all inferiors. */
DO_TRY
Index: gdb-7.6.50.20130731-cvs/gdb/utils.c
Index: gdb-7.7.90.20140613/gdb/utils.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/utils.c 2013-08-02 16:58:31.455016575 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/utils.c 2013-08-02 16:58:41.223030415 +0200
@@ -136,6 +136,11 @@ int quit_flag;
--- gdb-7.7.90.20140613.orig/gdb/utils.c 2014-06-13 23:10:18.878623021 +0200
+++ gdb-7.7.90.20140613/gdb/utils.c 2014-06-13 23:10:38.307644652 +0200
@@ -125,6 +125,11 @@ int job_control;
int immediate_quit;
@ -45,30 +45,20 @@ Index: gdb-7.6.50.20130731-cvs/gdb/utils.c
+
+int quit_flag_cleanup;
+
#ifndef HAVE_PYTHON
/* Clear the quit flag. */
@@ -159,6 +164,9 @@ set_quit_flag (void)
int
check_quit_flag (void)
{
+ if (quit_flag_cleanup)
+ return 0;
+
/* This is written in a particular way to avoid races. */
if (quit_flag)
{
Index: gdb-7.6.50.20130731-cvs/gdb/python/python.c
/* 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.) */
Index: gdb-7.7.90.20140613/gdb/extension.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/python/python.c 2013-08-02 16:58:31.456016577 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/python/python.c 2013-08-02 16:58:41.224030416 +0200
@@ -191,6 +191,9 @@ set_quit_flag (void)
int
check_quit_flag (void)
{
--- gdb-7.7.90.20140613.orig/gdb/extension.c 2014-06-13 03:59:36.000000000 +0200
+++ gdb-7.7.90.20140613/gdb/extension.c 2014-06-13 23:11:32.434704853 +0200
@@ -817,6 +817,9 @@ check_quit_flag (void)
int i, result = 0;
const struct extension_language_defn *extlang;
+ if (quit_flag_cleanup)
+ return 0;
+
return PyOS_InterruptOccurred ();
}
ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
{
if (extlang->ops->check_quit_flag != NULL)

View File

@ -1,26 +0,0 @@
This fixes a bug that leads to various failures when debugging a
31-bit inferior with a 64-bit gdb on s390x.
gdb/
* s390-linux-nat.c (fill_gregset): Remove erroneous offset 4 in
call to regcache_raw_collect.
---
gdb/s390-linux-nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
index 5c38952..45db7c9 100644
--- a/gdb/s390-linux-nat.c
+++ b/gdb/s390-linux-nat.c
@@ -164,7 +164,7 @@ fill_gregset (const struct regcache *regcache, gregset_t *regp, int regno)
memset (p, 0, 4);
p += 4;
}
- regcache_raw_collect (regcache, reg, p + 4);
+ regcache_raw_collect (regcache, reg, p);
}
}
--
1.8.4.2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0404d1c6ee6b3ddd811722b5197944758d37b4591c216030effbac204f5a6c23
size 24846320

3
gdb-7.8.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1cb8f2a7a79546381e9cb1dfae254f68a7935f513690d98efbba9c4f692daf41
size 25469193

View File

@ -1,8 +1,8 @@
Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.c
Index: gdb-7.7.50.20140609/gdb/breakpoint.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.c 2013-08-02 16:29:16.065402116 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.c 2013-08-02 16:29:17.073403456 +0200
@@ -15963,6 +15963,50 @@ initialize_breakpoint_ops (void)
--- gdb-7.7.50.20140609.orig/gdb/breakpoint.c 2014-06-13 20:24:34.564667225 +0200
+++ gdb-7.7.50.20140609/gdb/breakpoint.c 2014-06-13 20:24:35.650668351 +0200
@@ -16364,6 +16364,50 @@ initialize_breakpoint_ops (void)
static struct cmd_list_element *enablebreaklist = NULL;
void
@ -53,11 +53,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.c
_initialize_breakpoint (void)
{
struct cmd_list_element *c;
Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.h
Index: gdb-7.7.50.20140609/gdb/breakpoint.h
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/breakpoint.h 2013-08-02 16:29:17.074403457 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/breakpoint.h 2013-08-02 16:29:30.221420896 +0200
@@ -1555,4 +1555,7 @@ extern void breakpoint_free_objfile (str
--- gdb-7.7.50.20140609.orig/gdb/breakpoint.h 2014-06-13 20:24:34.566667227 +0200
+++ gdb-7.7.50.20140609/gdb/breakpoint.h 2014-06-13 20:24:35.651668352 +0200
@@ -1553,4 +1553,7 @@ extern void breakpoint_free_objfile (str
extern char *ep_parse_optional_if_clause (char **arg);
@ -65,13 +65,13 @@ Index: gdb-7.6.50.20130731-cvs/gdb/breakpoint.h
+ struct section_offsets *delta);
+
#endif /* !defined (BREAKPOINT_H) */
Index: gdb-7.6.50.20130731-cvs/gdb/objfiles.c
Index: gdb-7.7.50.20140609/gdb/objfiles.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/objfiles.c 2013-08-02 16:29:16.068402120 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/objfiles.c 2013-08-02 16:29:17.075403458 +0200
@@ -851,6 +851,11 @@ objfile_relocate1 (struct objfile *objfi
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
new_offsets, delta);
--- gdb-7.7.50.20140609.orig/gdb/objfiles.c 2014-06-13 20:24:35.652668353 +0200
+++ gdb-7.7.50.20140609/gdb/objfiles.c 2014-06-13 20:25:10.867704891 +0200
@@ -820,6 +820,11 @@ objfile_relocate1 (struct objfile *objfi
obj_section_addr (s));
}
+ /* Final call of breakpoint_re_set can keep breakpoint locations disabled if
+ their addresses match. */

View File

@ -1,24 +1,24 @@
Index: gdb-7.5.50.20130118/gdb/gdbtypes.h
Index: gdb-7.7.50.20140609/gdb/gdbtypes.h
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/gdbtypes.h 2013-01-18 23:07:03.488358315 +0100
+++ gdb-7.5.50.20130118/gdb/gdbtypes.h 2013-01-18 23:08:10.286451570 +0100
@@ -420,6 +420,7 @@ enum field_loc_kind
--- gdb-7.7.50.20140609.orig/gdb/gdbtypes.h 2014-06-13 20:23:55.210626427 +0200
+++ gdb-7.7.50.20140609/gdb/gdbtypes.h 2014-06-13 20:24:26.156658622 +0200
@@ -440,6 +440,7 @@ enum field_loc_kind
{
FIELD_LOC_KIND_BITPOS, /* bitpos */
FIELD_LOC_KIND_ENUMVAL, /* enumval */
FIELD_LOC_KIND_BITPOS, /**< bitpos */
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
+ /* This address is unrelocated by the objfile's ANOFFSET. */
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
FIELD_LOC_KIND_PHYSNAME, /* physname */
FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */
@@ -614,6 +615,7 @@ struct main_type
is the location (in the target) of the static field.
Otherwise, physname is the mangled label of the static field. */
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
FIELD_LOC_KIND_PHYSNAME, /**< physname */
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
@@ -617,6 +618,7 @@ struct main_type
field. Otherwise, physname is the mangled label of the
static field. */
+ /* This address is unrelocated by the objfile's ANOFFSET. */
CORE_ADDR physaddr;
const char *physname;
@@ -1237,6 +1239,7 @@ extern void allocate_gnat_aux_type (stru
@@ -1262,6 +1264,7 @@ extern void allocate_gnat_aux_type (stru
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
@ -26,7 +26,7 @@ Index: gdb-7.5.50.20130118/gdb/gdbtypes.h
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \
@@ -1248,6 +1251,7 @@ extern void allocate_gnat_aux_type (stru
@@ -1273,6 +1276,7 @@ extern void allocate_gnat_aux_type (stru
#define SET_FIELD_PHYSNAME(thisfld, name) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
FIELD_STATIC_PHYSNAME (thisfld) = (name))
@ -34,7 +34,7 @@ Index: gdb-7.5.50.20130118/gdb/gdbtypes.h
#define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
@@ -1264,6 +1268,7 @@ extern void allocate_gnat_aux_type (stru
@@ -1289,6 +1293,7 @@ extern void allocate_gnat_aux_type (stru
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
@ -42,11 +42,11 @@ Index: gdb-7.5.50.20130118/gdb/gdbtypes.h
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
Index: gdb-7.5.50.20130118/gdb/jv-lang.c
Index: gdb-7.7.50.20140609/gdb/jv-lang.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/jv-lang.c 2013-01-18 23:07:03.488358315 +0100
+++ gdb-7.5.50.20130118/gdb/jv-lang.c 2013-01-18 23:08:10.286451570 +0100
@@ -430,7 +430,8 @@ java_link_class_type (struct gdbarch *gd
--- gdb-7.7.50.20140609.orig/gdb/jv-lang.c 2014-06-13 20:23:55.211626428 +0200
+++ gdb-7.7.50.20140609/gdb/jv-lang.c 2014-06-13 20:23:56.278627534 +0200
@@ -427,7 +427,8 @@ java_link_class_type (struct gdbarch *gd
fields = NULL;
nfields--; /* First set up dummy "class" field. */
@ -56,7 +56,7 @@ Index: gdb-7.5.50.20130118/gdb/jv-lang.c
TYPE_FIELD_NAME (type, nfields) = "class";
TYPE_FIELD_TYPE (type, nfields) = value_type (clas);
SET_TYPE_FIELD_PRIVATE (type, nfields);
@@ -478,7 +479,8 @@ java_link_class_type (struct gdbarch *gd
@@ -475,7 +476,8 @@ java_link_class_type (struct gdbarch *gd
SET_TYPE_FIELD_PROTECTED (type, i);
}
if (accflags & 0x0008) /* ACC_STATIC */
@ -66,11 +66,11 @@ Index: gdb-7.5.50.20130118/gdb/jv-lang.c
else
SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset);
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
Index: gdb-7.5.50.20130118/gdb/value.c
Index: gdb-7.7.50.20140609/gdb/value.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/value.c 2013-01-18 23:07:03.490358319 +0100
+++ gdb-7.5.50.20130118/gdb/value.c 2013-01-18 23:08:10.287451543 +0100
@@ -2624,7 +2624,8 @@ value_static_field (struct type *type, i
--- gdb-7.7.50.20140609.orig/gdb/value.c 2014-06-13 20:23:55.212626429 +0200
+++ gdb-7.7.50.20140609/gdb/value.c 2014-06-13 20:23:56.279627535 +0200
@@ -2783,7 +2783,8 @@ value_static_field (struct type *type, i
{
case FIELD_LOC_KIND_PHYSADDR:
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),

2795
gdb-archer-vla-tests.patch Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -37,10 +37,10 @@ gdb/gdbserver/
(linux_create_inferior, linux_tracefork_child): Call it instead of
direct ptrace.
Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.c
Index: gdb-7.8/gdb/common/linux-ptrace.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/common/linux-ptrace.c 2014-02-06 17:40:32.530145960 +0100
+++ gdb-7.6.90.20140127/gdb/common/linux-ptrace.c 2014-02-06 17:48:16.329644534 +0100
--- gdb-7.8.orig/gdb/common/linux-ptrace.c 2014-07-29 19:31:01.893149317 +0200
+++ gdb-7.8/gdb/common/linux-ptrace.c 2014-07-29 19:31:05.806154887 +0200
@@ -32,6 +32,10 @@
#include <stdint.h>
@ -52,16 +52,16 @@ Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.c
/* Stores the currently supported ptrace options. A value of
-1 means we did not check for features yet. A value of 0 means
there are no supported features. */
@@ -56,6 +60,8 @@ linux_ptrace_attach_warnings (pid_t pid,
buffer_xml_printf (buffer, _("warning: process %d is a zombie "
"- the process has already terminated\n"),
@@ -56,6 +60,8 @@ linux_ptrace_attach_fail_reason (pid_t p
buffer_xml_printf (buffer, _("process %d is a zombie "
"- the process has already terminated"),
(int) pid);
+
+ linux_ptrace_create_warnings (buffer);
}
#if defined __i386__ || defined __x86_64__
@@ -542,3 +548,19 @@ linux_ptrace_init_warnings (void)
@@ -551,3 +557,19 @@ linux_ptrace_init_warnings (void)
linux_ptrace_test_ret_to_nx ();
}
@ -81,23 +81,23 @@ Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.c
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
+#endif /* HAVE_LIBSELINUX */
+}
Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.h
Index: gdb-7.8/gdb/common/linux-ptrace.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/common/linux-ptrace.h 2014-02-06 17:40:35.506149162 +0100
+++ gdb-7.6.90.20140127/gdb/common/linux-ptrace.h 2014-02-06 17:48:00.601627995 +0100
--- gdb-7.8.orig/gdb/common/linux-ptrace.h 2014-07-29 19:31:01.893149317 +0200
+++ gdb-7.8/gdb/common/linux-ptrace.h 2014-07-29 19:31:05.807154887 +0200
@@ -85,6 +85,7 @@ struct buffer;
extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer);
extern void linux_ptrace_init_warnings (void);
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
extern void linux_enable_event_reporting (pid_t pid);
extern void linux_disable_event_reporting (pid_t pid);
extern int linux_supports_tracefork (void);
extern int linux_supports_traceclone (void);
Index: gdb-7.6.90.20140127/gdb/configure.ac
Index: gdb-7.8/gdb/configure.ac
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/configure.ac 2014-02-06 17:40:32.532145962 +0100
+++ gdb-7.6.90.20140127/gdb/configure.ac 2014-02-06 17:40:35.507149163 +0100
@@ -1975,6 +1975,10 @@ case $host_os in
--- gdb-7.8.orig/gdb/configure.ac 2014-07-29 19:31:01.894149319 +0200
+++ gdb-7.8/gdb/configure.ac 2014-07-29 19:31:05.807154887 +0200
@@ -2158,6 +2158,10 @@ case $host_os in
esac
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
@ -108,10 +108,10 @@ Index: gdb-7.6.90.20140127/gdb/configure.ac
dnl Handle optional features that can be enabled.
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
Index: gdb-7.6.90.20140127/gdb/gdbserver/configure.ac
Index: gdb-7.8/gdb/gdbserver/configure.ac
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdbserver/configure.ac 2014-02-06 17:40:32.532145962 +0100
+++ gdb-7.6.90.20140127/gdb/gdbserver/configure.ac 2014-02-06 17:40:35.507149163 +0100
--- gdb-7.8.orig/gdb/gdbserver/configure.ac 2014-07-29 19:31:01.895149320 +0200
+++ gdb-7.8/gdb/gdbserver/configure.ac 2014-07-29 19:31:05.808154887 +0200
@@ -454,6 +454,10 @@ if $want_ipa ; then
fi
fi
@ -123,11 +123,11 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/configure.ac
AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS)
AC_SUBST(srv_xmlbuiltin)
Index: gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c
Index: gdb-7.8/gdb/gdbserver/linux-low.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdbserver/linux-low.c 2014-02-06 17:40:32.534145964 +0100
+++ gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c 2014-02-06 17:49:32.385726514 +0100
@@ -543,6 +543,29 @@ add_lwp (ptid_t ptid)
--- gdb-7.8.orig/gdb/gdbserver/linux-low.c 2014-07-29 19:31:01.897149323 +0200
+++ gdb-7.8/gdb/gdbserver/linux-low.c 2014-07-29 19:31:05.809154889 +0200
@@ -541,6 +541,29 @@ add_lwp (ptid_t ptid)
return lwp;
}
@ -157,7 +157,7 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c
/* Start an inferior process and returns its pid.
ALLARGS is a vector of program-name and args. */
@@ -584,7 +607,7 @@ linux_create_inferior (char *program, ch
@@ -582,7 +605,7 @@ linux_create_inferior (char *program, ch
if (pid == 0)
{
close_most_fds ();
@ -166,10 +166,10 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
signal (__SIGRTMIN + 1, SIG_DFL);
Index: gdb-7.6.90.20140127/gdb/inf-ptrace.c
Index: gdb-7.8/gdb/inf-ptrace.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/inf-ptrace.c 2014-02-06 17:40:32.535145965 +0100
+++ gdb-7.6.90.20140127/gdb/inf-ptrace.c 2014-02-06 17:40:35.510149167 +0100
--- gdb-7.8.orig/gdb/inf-ptrace.c 2014-07-29 19:31:01.898149324 +0200
+++ gdb-7.8/gdb/inf-ptrace.c 2014-07-29 19:31:05.809154889 +0200
@@ -105,7 +105,15 @@ static void
inf_ptrace_me (void)
{
@ -186,11 +186,11 @@ Index: gdb-7.6.90.20140127/gdb/inf-ptrace.c
}
/* Start a new inferior Unix child process. EXEC_FILE is the file to
Index: gdb-7.6.90.20140127/gdb/linux-nat.c
Index: gdb-7.8/gdb/linux-nat.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/linux-nat.c 2014-02-06 17:40:32.537145968 +0100
+++ gdb-7.6.90.20140127/gdb/linux-nat.c 2014-02-06 17:40:35.511149168 +0100
@@ -1283,6 +1283,7 @@ linux_nat_create_inferior (struct target
--- gdb-7.8.orig/gdb/linux-nat.c 2014-07-29 19:31:01.899149326 +0200
+++ gdb-7.8/gdb/linux-nat.c 2014-07-29 19:31:05.811154893 +0200
@@ -1291,6 +1291,7 @@ linux_nat_create_inferior (struct target
#ifdef HAVE_PERSONALITY
int personality_orig = 0, personality_set = 0;
#endif /* HAVE_PERSONALITY */
@ -198,9 +198,9 @@ Index: gdb-7.6.90.20140127/gdb/linux-nat.c
/* The fork_child mechanism is synchronous and calls target_wait, so
we have to mask the async mode. */
@@ -1307,7 +1308,10 @@ linux_nat_create_inferior (struct target
@@ -1315,7 +1316,10 @@ linux_nat_create_inferior (struct target
/* Make sure we report all signals during startup. */
linux_nat_pass_signals (0, NULL);
linux_nat_pass_signals (ops, 0, NULL);
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ TRY_CATCH (ex, RETURN_MASK_ERROR)
@ -210,7 +210,7 @@ Index: gdb-7.6.90.20140127/gdb/linux-nat.c
#ifdef HAVE_PERSONALITY
if (personality_set)
@@ -1319,6 +1323,24 @@ linux_nat_create_inferior (struct target
@@ -1327,6 +1331,24 @@ linux_nat_create_inferior (struct target
safe_strerror (errno));
}
#endif /* HAVE_PERSONALITY */
@ -235,11 +235,11 @@ Index: gdb-7.6.90.20140127/gdb/linux-nat.c
}
static void
Index: gdb-7.6.90.20140127/gdb/config.in
Index: gdb-7.8/gdb/config.in
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/config.in 2014-02-06 17:40:32.538145969 +0100
+++ gdb-7.6.90.20140127/gdb/config.in 2014-02-06 17:40:35.511149168 +0100
@@ -213,6 +213,9 @@
--- gdb-7.8.orig/gdb/config.in 2014-07-29 19:31:01.900149327 +0200
+++ gdb-7.8/gdb/config.in 2014-07-29 19:31:44.600210090 +0200
@@ -219,6 +219,9 @@
/* Define if librpm library is being used. */
#undef HAVE_LIBRPM
@ -249,21 +249,21 @@ Index: gdb-7.6.90.20140127/gdb/config.in
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H
@@ -345,6 +348,9 @@
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
@@ -354,6 +357,9 @@
/* Define to 1 if you have the `scm_new_smob' function. */
#undef HAVE_SCM_NEW_SMOB
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
+#undef HAVE_SELINUX_SELINUX_H
+
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
Index: gdb-7.6.90.20140127/gdb/configure
Index: gdb-7.8/gdb/configure
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/configure 2014-02-06 17:40:32.541145972 +0100
+++ gdb-7.6.90.20140127/gdb/configure 2014-02-06 17:40:35.515149172 +0100
@@ -12861,6 +12861,64 @@ cat >>confdefs.h <<_ACEOF
--- gdb-7.8.orig/gdb/configure 2014-07-29 19:31:01.903149331 +0200
+++ gdb-7.8/gdb/configure 2014-07-29 19:31:05.815154898 +0200
@@ -13392,6 +13392,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
@ -328,11 +328,11 @@ Index: gdb-7.6.90.20140127/gdb/configure
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional.
Index: gdb-7.6.90.20140127/gdb/gdbserver/config.in
Index: gdb-7.8/gdb/gdbserver/config.in
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdbserver/config.in 2014-02-06 17:40:32.542145973 +0100
+++ gdb-7.6.90.20140127/gdb/gdbserver/config.in 2014-02-06 17:54:06.923021799 +0100
@@ -78,6 +78,9 @@
--- gdb-7.8.orig/gdb/gdbserver/config.in 2014-07-29 19:31:01.904149333 +0200
+++ gdb-7.8/gdb/gdbserver/config.in 2014-07-29 19:31:05.815154898 +0200
@@ -81,6 +81,9 @@
/* Define to 1 if you have the `mcheck' library (-lmcheck). */
#undef HAVE_LIBMCHECK
@ -342,7 +342,7 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/config.in
/* Define if the target supports branch tracing. */
#undef HAVE_LINUX_BTRACE
@@ -151,6 +154,9 @@
@@ -154,6 +157,9 @@
/* Define to 1 if you have the `readlink' function. */
#undef HAVE_READLINK
@ -352,10 +352,10 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/config.in
/* Define to 1 if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
Index: gdb-7.6.90.20140127/gdb/gdbserver/configure
Index: gdb-7.8/gdb/gdbserver/configure
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdbserver/configure 2014-02-06 17:40:32.543145974 +0100
+++ gdb-7.6.90.20140127/gdb/gdbserver/configure 2014-02-06 17:40:35.516149173 +0100
--- gdb-7.8.orig/gdb/gdbserver/configure 2014-07-29 19:31:01.905149334 +0200
+++ gdb-7.8/gdb/gdbserver/configure 2014-07-29 19:31:05.817154901 +0200
@@ -6170,6 +6170,64 @@ if $want_ipa ; then
fi
fi

View File

@ -0,0 +1,85 @@
http://sourceware.org/ml/gdb-patches/2014-08/msg00045.html
Subject: [patch] Fix --with-babeltrace with gcc-4.9.1
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
when I tried to use --with-babeltrace on Fedora Rawhide x86_64
using gcc-4.9.1-3.fc22.x86_64 I got:
checking for libbabeltrace... no
configure: error: babeltrace is missing or unusable
Makefile:7973: recipe for target 'configure-gdb' failed
configure:15890: checking for libbabeltrace
configure:15918: gcc -o conftest -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Werror -static-libstdc++ -static-libgcc -Wl,-z,relro conftest.c -lselinux -lncurses -lz -lm -ldl /usr/lib64/libbabeltrace.so /usr/lib64/libbabeltrace-ctf.so >&5
conftest.c: In function 'main':
conftest.c:198:21: error: unused variable 'pos' [-Werror=unused-variable]
struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
^
cc1: all warnings being treated as errors
configure:15918: $? = 1
configure: failed program was:
The patch below fixes it for me.
In configure.ac there is above this check:
# Append -Werror to CFLAGS so that configure can catch the warning
# "assignment from incompatible pointer type", which is related to
# the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
# in GDB, while babeltrace 1.0.3 is broken.
# AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
# safe to save and restore CFLAGS here.
saved_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror"
Maybe it would be easier to use there:
CFLAGS="$CFLAGS -Werror -Wno-unused-variable"
But maybe -Werror is cross-compiler compatible while -Wno-unused-variable is
not, I have no idea.
Jan
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="gdb-babeltrace-configure.patch"
gdb/
2014-08-04 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure.ac (--with-babeltrace): Use 'pos'.
* configure: Regenerate.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 70d0964..07d2f00 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2437,6 +2437,7 @@ else
struct bt_ctf_event *event = NULL;
const struct bt_definition *scope;
+ (void) pos; /* Prevent -Werror=unused-variable. */
scope = bt_ctf_get_top_level_scope (event,
BT_STREAM_EVENT_HEADER);
bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
diff --git a/gdb/configure b/gdb/configure
index 809326a..b983d16 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -15344,6 +15344,7 @@ struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
struct bt_ctf_event *event = NULL;
const struct bt_definition *scope;
+ (void) pos; /* Prevent -Werror=unused-variable. */
scope = bt_ctf_get_top_level_scope (event,
BT_STREAM_EVENT_HEADER);
bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
--qMm9M+Fa2AknHoGS--

82
gdb-btrobust.patch Normal file
View File

@ -0,0 +1,82 @@
This should fix the error with glib. An error message will still be
printed, but a default backtrace will occur in this case.
--
--- gdb-7.7.90.20140613/gdb/python/py-framefilter.c-orig 2014-06-13 03:59:37.000000000 +0200
+++ gdb-7.7.90.20140613/gdb/python/py-framefilter.c 2014-06-27 17:20:00.945271945 +0200
@@ -1475,6 +1475,7 @@ gdbpy_apply_frame_filter (const struct e
volatile struct gdb_exception except;
PyObject *item;
htab_t levels_printed;
+ int count_printed = 0;
if (!gdb_python_initialized)
return EXT_LANG_BT_NO_FILTERS;
@@ -1494,24 +1495,7 @@ gdbpy_apply_frame_filter (const struct e
iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high);
if (iterable == NULL)
- {
- /* Normally if there is an error GDB prints the exception,
- abandons the backtrace and exits. The user can then call "bt
- no-filters", and get a default backtrace (it would be
- confusing to automatically start a standard backtrace halfway
- through a Python filtered backtrace). However in the case
- where GDB cannot initialize the frame filters (most likely
- due to incorrect auto-load paths), GDB has printed nothing.
- In this case it is OK to print the default backtrace after
- printing the error message. GDB returns EXT_LANG_BT_NO_FILTERS
- here to signify there are no filters after printing the
- initialization error. This return code will trigger a
- default backtrace. */
-
- gdbpy_print_stack ();
- do_cleanups (cleanups);
- return EXT_LANG_BT_NO_FILTERS;
- }
+ goto error_nothing_printed;
/* If iterable is None, then there are no frame filters registered.
If this is the case, defer to default GDB printing routines in MI
@@ -1540,15 +1524,39 @@ gdbpy_apply_frame_filter (const struct e
gdbpy_print_stack ();
Py_DECREF (item);
+ count_printed++;
}
if (item == NULL && PyErr_Occurred ())
- goto error;
+ {
+ if (count_printed > 0)
+ goto error;
+ else
+ goto error_nothing_printed;
+ }
done:
do_cleanups (cleanups);
return success;
+ /* Normally if there is an error GDB prints the exception,
+ abandons the backtrace and exits. The user can then call "bt
+ no-filters", and get a default backtrace (it would be
+ confusing to automatically start a standard backtrace halfway
+ through a Python filtered backtrace). However in the case
+ where GDB cannot initialize the frame filters (most likely
+ due to incorrect auto-load paths), GDB has printed nothing.
+ In this case it is OK to print the default backtrace after
+ printing the error message. GDB returns EXT_LANG_BT_NO_FILTERS
+ here to signify there are no filters after printing the
+ initialization error. This return code will trigger a
+ default backtrace. */
+
+ error_nothing_printed:
+ gdbpy_print_stack ();
+ do_cleanups (cleanups);
+ return EXT_LANG_BT_NO_FILTERS;
+
/* Exit and abandon backtrace on error, printing the exception that
is set. */
error:

View File

@ -21,11 +21,11 @@ debugging problem of GOMP outside of the scope of this Bug.
Index: gdb-7.6.50.20130731-cvs/gdb/infrun.c
Index: gdb-7.7.90.20140613/gdb/infrun.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/infrun.c 2013-08-02 17:10:08.446962958 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/infrun.c 2013-08-02 17:10:49.109016685 +0200
@@ -4930,6 +4930,16 @@ process_event_stop_test:
--- gdb-7.7.90.20140613.orig/gdb/infrun.c 2014-06-13 21:59:10.835805512 +0200
+++ gdb-7.7.90.20140613/gdb/infrun.c 2014-06-13 21:59:31.064829121 +0200
@@ -4820,6 +4820,16 @@ process_event_stop_test (struct executio
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
{
@ -36,13 +36,13 @@ Index: gdb-7.6.50.20130731-cvs/gdb/infrun.c
+ || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL)
+ /* gcc-4.7.2-9.fc19.x86_64 uses a new format. */
+ && (stopf == NULL
+ || strstr (SYMBOL_LINKAGE_NAME (stopf), "._omp_fn.") == NULL))
+ || strstr (MSYMBOL_LINKAGE_NAME (stopf), "._omp_fn.") == NULL))
+{ /* ".omp_fn." */
+
/* We're doing a "next".
Normal (forward) execution: set a breakpoint at the
@@ -4965,6 +4975,7 @@ process_event_stop_test:
@@ -4855,6 +4865,7 @@ process_event_stop_test (struct executio
keep_going (ecs);
return;
@ -50,10 +50,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/infrun.c
}
/* If we are in a function call trampoline (a stub between the
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.exp
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.exp 2013-08-02 17:10:37.063000571 +0200
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp 2014-06-13 21:59:22.801819481 +0200
@@ -0,0 +1,31 @@
+# Copyright 2009 Free Software Foundation, Inc.
+
@ -86,10 +86,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.exp
+
+gdb_breakpoint [gdb_get_line_number "success"]
+gdb_continue_to_breakpoint "success" ".*success.*"
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.f90
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.fortran/omp-step.f90 2013-08-02 17:10:37.063000571 +0200
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90 2014-06-13 21:59:22.801819481 +0200
@@ -0,0 +1,32 @@
+! Copyright 2009 Free Software Foundation, Inc.
+

View File

@ -1,7 +1,7 @@
Index: gdb-7.6.90.20140127/gdb/config/i386/linux64.mh
Index: gdb-7.7.50.20140609/gdb/config/i386/linux64.mh
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/config/i386/linux64.mh 2014-02-06 17:30:23.021489736 +0100
+++ gdb-7.6.90.20140127/gdb/config/i386/linux64.mh 2014-02-06 17:30:44.984513403 +0100
--- gdb-7.7.50.20140609.orig/gdb/config/i386/linux64.mh 2014-06-13 20:25:37.356732335 +0200
+++ gdb-7.7.50.20140609/gdb/config/i386/linux64.mh 2014-06-13 20:26:07.984764098 +0200
@@ -5,7 +5,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
proc-service.o linux-thread-db.o linux-fork.o \
linux-procfs.o linux-ptrace.o linux-btrace.o \
@ -11,10 +11,10 @@ Index: gdb-7.6.90.20140127/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.6.90.20140127/gdb/config/i386/linux.mh
Index: gdb-7.7.50.20140609/gdb/config/i386/linux.mh
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/config/i386/linux.mh 2014-02-06 17:30:15.893482056 +0100
+++ gdb-7.6.90.20140127/gdb/config/i386/linux.mh 2014-02-06 17:30:23.021489736 +0100
--- gdb-7.7.50.20140609.orig/gdb/config/i386/linux.mh 2014-06-13 20:25:37.356732335 +0200
+++ gdb-7.7.50.20140609/gdb/config/i386/linux.mh 2014-06-13 20:26:07.984764098 +0200
@@ -1,6 +1,6 @@
# Host: Intel 386 running GNU/Linux.
@ -23,10 +23,10 @@ Index: gdb-7.6.90.20140127/gdb/config/i386/linux.mh
NATDEPFILES= inf-ptrace.o fork-child.o \
i386-nat.o i386-linux-nat.o \
proc-service.o linux-thread-db.o \
Index: gdb-7.6.90.20140127/gdb/config/i386/nm-linux.h
Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/config/i386/nm-linux.h 2014-02-06 17:30:23.021489736 +0100
+++ gdb-7.7.50.20140609/gdb/config/i386/nm-linux.h 2014-06-13 20:26:07.984764098 +0200
@@ -0,0 +1,28 @@
+/* Native support for GNU/Linux i386.
+
@ -56,10 +56,10 @@ Index: gdb-7.6.90.20140127/gdb/config/i386/nm-linux.h
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
+
+#endif /* NM_LINUX64_H */
Index: gdb-7.6.90.20140127/gdb/config/i386/nm-linux64.h
Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux64.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/config/i386/nm-linux64.h 2014-02-06 17:30:23.021489736 +0100
+++ gdb-7.7.50.20140609/gdb/config/i386/nm-linux64.h 2014-06-13 20:26:07.984764098 +0200
@@ -0,0 +1,28 @@
+/* Native support for GNU/Linux amd64.
+
@ -89,25 +89,26 @@ Index: gdb-7.6.90.20140127/gdb/config/i386/nm-linux64.h
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
+
+#endif /* NM_LINUX64_H */
Index: gdb-7.6.90.20140127/gdb/target.h
Index: gdb-7.7.50.20140609/gdb/target.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/target.h 2014-02-06 17:30:15.894482057 +0100
+++ gdb-7.6.90.20140127/gdb/target.h 2014-02-06 17:30:23.022489737 +0100
@@ -1521,8 +1521,10 @@ extern char *target_thread_name (struct
--- gdb-7.7.50.20140609.orig/gdb/target.h 2014-06-13 20:26:07.985764099 +0200
+++ gdb-7.7.50.20140609/gdb/target.h 2014-06-13 20:26:34.915792095 +0200
@@ -1728,9 +1728,11 @@ extern char *target_thread_name (struct
bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
(including this one?). OTHERTYPE is who knows what... */
+#ifndef target_can_use_hardware_watchpoint
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
(*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
(*current_target.to_can_use_hw_breakpoint) (&current_target, \
TYPE, CNT, OTHERTYPE);
+#endif
/* Returns the number of debug registers needed to watch the given
memory region, or zero if not supported. */
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2014-02-06 17:30:23.022489737 +0100
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2014-06-13 20:26:07.986764101 +0200
@@ -0,0 +1,40 @@
+# Copyright 2009, 2010 Free Software Foundation, Inc.
+

View File

@ -0,0 +1,308 @@
https://bugzilla.redhat.com/show_bug.cgi?id=1020004
Index: gdb-7.7.90.20140613/gdb/data-directory/Makefile.in
===================================================================
--- gdb-7.7.90.20140613.orig/gdb/data-directory/Makefile.in 2014-06-13 23:02:37.597115787 +0200
+++ gdb-7.7.90.20140613/gdb/data-directory/Makefile.in 2014-06-13 23:03:21.285163909 +0200
@@ -60,6 +60,8 @@ PYTHON_FILES = \
gdb/frames.py \
gdb/FrameIterator.py \
gdb/FrameDecorator.py \
+ gdb/FrameWrapper.py \
+ gdb/backtrace.py \
gdb/types.py \
gdb/printing.py \
gdb/prompt.py \
@@ -74,6 +76,7 @@ PYTHON_FILES = \
gdb/command/pretty_printers.py \
gdb/command/prompt.py \
gdb/command/explore.py \
+ gdb/command/backtrace.py \
gdb/function/__init__.py \
gdb/function/strfns.py \
gdb/function/caller_is.py \
Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/FrameWrapper.py
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/FrameWrapper.py 2014-06-13 23:02:37.598115788 +0200
@@ -0,0 +1,122 @@
+# Wrapper API for frames.
+
+# Copyright (C) 2008, 2009 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/>.
+
+import gdb
+
+# FIXME: arguably all this should be on Frame somehow.
+class FrameWrapper:
+ def __init__ (self, frame):
+ self.frame = frame;
+
+ def write_symbol (self, stream, sym, block):
+ if len (sym.linkage_name):
+ nsym, is_field_of_this = gdb.lookup_symbol (sym.linkage_name, block)
+ if nsym.addr_class != gdb.SYMBOL_LOC_REGISTER:
+ sym = nsym
+
+ stream.write (sym.print_name + "=")
+ try:
+ val = self.read_var (sym)
+ if val != None:
+ val = str (val)
+ # FIXME: would be nice to have a more precise exception here.
+ except RuntimeError, text:
+ val = text
+ if val == None:
+ stream.write ("???")
+ else:
+ stream.write (str (val))
+
+ def print_frame_locals (self, stream, func):
+
+ try:
+ block = self.frame.block()
+ except RuntimeError:
+ block = None
+
+ while block != None:
+ if block.is_global or block.is_static:
+ break
+
+ for sym in block:
+ if sym.is_argument:
+ continue;
+
+ self.write_symbol (stream, sym, block)
+ stream.write ('\n')
+
+ def print_frame_args (self, stream, func):
+
+ try:
+ block = self.frame.block()
+ except RuntimeError:
+ block = None
+
+ while block != None:
+ if block.function != None:
+ break
+ block = block.superblock
+
+ first = True
+ for sym in block:
+ if not sym.is_argument:
+ continue;
+
+ if not first:
+ stream.write (", ")
+
+ self.write_symbol (stream, sym, block)
+ first = False
+
+ # FIXME: this should probably just be a method on gdb.Frame.
+ # But then we need stream wrappers.
+ def describe (self, stream, full):
+ if self.type () == gdb.DUMMY_FRAME:
+ stream.write (" <function called from gdb>\n")
+ elif self.type () == gdb.SIGTRAMP_FRAME:
+ stream.write (" <signal handler called>\n")
+ else:
+ sal = self.find_sal ()
+ pc = self.pc ()
+ name = self.name ()
+ if not name:
+ name = "??"
+ if pc != sal.pc or not sal.symtab:
+ stream.write (" 0x%08x in" % pc)
+ stream.write (" " + name + " (")
+
+ func = self.function ()
+ self.print_frame_args (stream, func)
+
+ stream.write (")")
+
+ if sal.symtab and sal.symtab.filename:
+ stream.write (" at " + sal.symtab.filename)
+ stream.write (":" + str (sal.line))
+
+ if not self.name () or (not sal.symtab or not sal.symtab.filename):
+ lib = gdb.solib_name (pc)
+ if lib:
+ stream.write (" from " + lib)
+
+ stream.write ("\n")
+
+ if full:
+ self.print_frame_locals (stream, func)
+
+ def __getattr__ (self, name):
+ return getattr (self.frame, name)
Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/backtrace.py
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/backtrace.py 2014-06-13 23:02:37.598115788 +0200
@@ -0,0 +1,42 @@
+# Filtering backtrace.
+
+# Copyright (C) 2008, 2011 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/>.
+
+import gdb
+import itertools
+
+# Our only exports.
+__all__ = ['push_frame_filter', 'create_frame_filter']
+
+old_frame_filter = None
+
+def push_frame_filter (constructor):
+ """Register a new backtrace filter class with the 'backtrace' command.
+The filter will be passed an iterator as an argument. The iterator
+will return gdb.Frame-like objects. The filter should in turn act as
+an iterator returning such objects."""
+ global old_frame_filter
+ if old_frame_filter == None:
+ old_frame_filter = constructor
+ else:
+ old_frame_filter = lambda iterator, filter = frame_filter: constructor (filter(iterator))
+
+def create_frame_filter (iter):
+ global old_frame_filter
+ if old_frame_filter is None:
+ return iter
+ return old_frame_filter (iter)
+
Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/command/backtrace.py
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/command/backtrace.py 2014-06-13 23:02:37.598115788 +0200
@@ -0,0 +1,106 @@
+# New backtrace command.
+
+# Copyright (C) 2008, 2009, 2011 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/>.
+
+import gdb
+import gdb.backtrace
+import itertools
+from gdb.FrameIterator import FrameIterator
+from gdb.FrameWrapper import FrameWrapper
+import sys
+
+class ReverseBacktraceParameter (gdb.Parameter):
+ """The new-backtrace command can show backtraces in 'reverse' order.
+This means that the innermost frame will be printed last.
+Note that reverse backtraces are more expensive to compute."""
+
+ set_doc = "Enable or disable reverse backtraces."
+ show_doc = "Show whether backtraces will be printed in reverse order."
+
+ def __init__(self):
+ gdb.Parameter.__init__ (self, "reverse-backtrace",
+ gdb.COMMAND_STACK, gdb.PARAM_BOOLEAN)
+ # Default to compatibility with gdb.
+ self.value = False
+
+class FilteringBacktrace (gdb.Command):
+ """Print backtrace of all stack frames, or innermost COUNT frames.
+With a negative argument, print outermost -COUNT frames.
+Use of the 'full' qualifier also prints the values of the local variables.
+Use of the 'raw' qualifier avoids any filtering by loadable modules.
+"""
+
+ def __init__ (self):
+ # FIXME: this is not working quite well enough to replace
+ # "backtrace" yet.
+ gdb.Command.__init__ (self, "new-backtrace", gdb.COMMAND_STACK)
+ self.reverse = ReverseBacktraceParameter()
+
+ def reverse_iter (self, iter):
+ result = []
+ for item in iter:
+ result.append (item)
+ result.reverse()
+ return result
+
+ def final_n (self, iter, x):
+ result = []
+ for item in iter:
+ result.append (item)
+ return result[x:]
+
+ def invoke (self, arg, from_tty):
+ i = 0
+ count = 0
+ filter = True
+ full = False
+
+ for word in arg.split (" "):
+ if word == '':
+ continue
+ elif word == 'raw':
+ filter = False
+ elif word == 'full':
+ full = True
+ else:
+ count = int (word)
+
+ # FIXME: provide option to start at selected frame
+ # However, should still number as if starting from newest
+ newest_frame = gdb.newest_frame()
+ iter = itertools.imap (FrameWrapper,
+ FrameIterator (newest_frame))
+ if filter:
+ iter = gdb.backtrace.create_frame_filter (iter)
+
+ # Now wrap in an iterator that numbers the frames.
+ iter = itertools.izip (itertools.count (0), iter)
+
+ # Reverse if the user wanted that.
+ if self.reverse.value:
+ iter = self.reverse_iter (iter)
+
+ # Extract sub-range user wants.
+ if count < 0:
+ iter = self.final_n (iter, count)
+ elif count > 0:
+ iter = itertools.islice (iter, 0, count)
+
+ for pair in iter:
+ sys.stdout.write ("#%-2d" % pair[0])
+ pair[1].describe (sys.stdout, full)
+
+FilteringBacktrace()

View File

@ -1,13 +0,0 @@
Index: gdb-7.7/gdb/s390-linux-nat.c
===================================================================
--- gdb-7.7.orig/gdb/s390-linux-nat.c 2014-02-12 16:10:55.000000000 +0100
+++ gdb-7.7/gdb/s390-linux-nat.c 2014-02-12 16:40:33.000000000 +0100
@@ -563,7 +563,7 @@ s390_can_use_hw_breakpoint (int type, in
}
static int
-s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt)
+s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST cnt)
{
return 1;
}

View File

@ -0,0 +1,104 @@
http://sourceware.org/ml/gdb-patches/2014-07/msg00709.html
Subject: [patch] Display Fortran strings in backtraces
Hi,
for Fortran it fixes displaying normal strings also in frames/backtraces:
(gdb) frame
#0 f (s=..., _s=3) at ./gdb.fortran/fortran-frame-string.f90:24
->
#0 f (s='foo', _s=3) at ./gdb.fortran/fortran-frame-string.f90:24
The patch is simple and I do not see why it should not be this way.
For C/C++ TYPE_CODE_STRING is not used. I am not aware of Pascal but that
language is currently not really much supported in GDB anyway.
This was a part of my archer/jankratochvil/vla branch but it is not a part of
the Intel VLA patchset as it in fact is completely unrelated to "VLA".
No regressions on {x86_64,x86_64-m32,i686}-fedora22pre-linux-gnu.
Thanks,
Jan
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
new file mode 100644
index 0000000..4b78266
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
@@ -0,0 +1,36 @@
+# 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.
+
+standard_testfile .f90
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
+ return -1
+}
+
+if ![runto MAIN__] then {
+ perror "couldn't run to breakpoint MAIN__"
+ continue
+}
+
+gdb_breakpoint [gdb_get_line_number "s = s"]
+gdb_continue_to_breakpoint "s = s"
+
+gdb_test "ptype s" {type = character\*3}
+gdb_test "p s" " = 'foo'"
+
+# Fix rejected upstream:
+# https://sourceware.org/ml/gdb-patches/2014-07/msg00768.html
+setup_kfail "rejected" *-*-*
+gdb_test "frame" { \(s='foo', .*}
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
new file mode 100644
index 0000000..3d1576f
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
@@ -0,0 +1,28 @@
+! 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.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+ subroutine f(s)
+ character*3 s
+ s = s
+ end
+
+ program main
+ call f ('foo')
+ end

View File

@ -1,8 +1,8 @@
Index: gdb-7.6.90.20140127/gdb/dwarf2read.c
Index: gdb-7.7.90.20140613/gdb/dwarf2read.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-02-06 18:18:09.676572271 +0100
+++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-02-06 18:18:42.664607823 +0100
@@ -17646,6 +17646,25 @@ new_symbol_full (struct die_info *die, s
--- gdb-7.7.90.20140613.orig/gdb/dwarf2read.c 2014-06-13 21:56:54.744653443 +0200
+++ gdb-7.7.90.20140613/gdb/dwarf2read.c 2014-06-13 22:01:51.529990684 +0200
@@ -17695,6 +17695,26 @@ new_symbol_full (struct die_info *die, s
/* Cache this symbol's name and the name's demangled form (if any). */
SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack);
linkagename = dwarf2_physname (name, die, cu);
@ -14,24 +14,25 @@ Index: gdb-7.6.90.20140127/gdb/dwarf2read.c
+ && strstr (objfile_name (objfile), "/libc") != NULL)
+ {
+ struct objfile *objfile_msym;
+ struct minimal_symbol *msym;
+ struct bound_minimal_symbol bmsym;
+
+ if (objfile->separate_debug_objfile_backlink)
+ objfile_msym = objfile->separate_debug_objfile_backlink;
+ else
+ objfile_msym = objfile;
+ msym = lookup_minimal_symbol ("strstr", NULL, objfile_msym);
+ if (msym && MSYMBOL_TYPE (msym) == mst_text_gnu_ifunc)
+ bmsym = lookup_minimal_symbol ("strstr", NULL, objfile_msym);
+ if (bmsym.minsym != NULL
+ && MSYMBOL_TYPE (bmsym.minsym) == mst_text_gnu_ifunc)
+ linkagename = "__strstr";
+ }
+
SYMBOL_SET_NAMES (sym, linkagename, strlen (linkagename), 0, objfile);
/* Fortran does not have mangling standard and the mangling does differ
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2014-02-06 18:18:16.294579381 +0100
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2014-06-13 21:59:41.174840871 +0200
@@ -0,0 +1,108 @@
+# Copyright (C) 2012 Free Software Foundation, Inc.
+

View File

@ -0,0 +1,58 @@
http://sourceware.org/ml/gdb-patches/2014-02/msg00731.html
Subject: [patch] gdb_assert -> complaint for weird DWARF
--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
PR 16581:
GDB crash on inherit_abstract_dies infinite recursion
https://sourceware.org/bugzilla/show_bug.cgi?id=16581
fixed crash from an infinite recursion. But in rare cases the new code can
now gdb_assert() due to weird DWARF file.
I do not yet fully understand why the DWARF is as it is but just GDB should
never crash due to invalid DWARF anyway. The "invalid" DWARF I see only in
Fedora GCC build, not in FSF GCC build, more info at:
https://bugzilla.redhat.com/show_bug.cgi?id=1069382
http://people.redhat.com/jkratoch/gcc-debuginfo-4.8.2-7.fc20.x86_64-gnatbind.debug
Thanks,
Jan
--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="complaint.patch"
gdb/
2014-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2read.c (process_die): Change gdb_assert to complaint.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 3eaa0b1..71f5d34 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8029,7 +8029,13 @@ process_die (struct die_info *die, struct dwarf2_cu *cu)
struct cleanup *in_process;
/* We should only be processing those not already in process. */
- gdb_assert (!die->in_process);
+ if (die->in_process)
+ {
+ complaint (&symfile_complaints,
+ _("DIE at 0x%x attempted to be processed twice"),
+ die->offset.sect_off);
+ return;
+ }
die->in_process = 1;
in_process = make_cleanup (reset_die_in_process,die);
--6TrnltStXW4iwmi0--

View File

@ -1,39 +0,0 @@
Index: gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/ia64-tdep.c 2013-08-07 15:16:31.000000000 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/ia64-tdep.c 2013-08-07 15:16:34.000000000 +0200
@@ -2181,7 +2181,7 @@ static const struct frame_unwind ia64_fr
avoid the additional bogus frame
#7 0x0000000000000000 in ?? () */
-static char linux_clone2_code[] =
+static unsigned char linux_clone2_code[] =
{
/* libc/sysdeps/unix/sysv/linux/ia64/clone2.S */
0x09, 0x00, 0x20, 0x12, 0x90, 0x11, 0x00, 0x40,
@@ -2220,7 +2220,7 @@ static int
ia64_linux_clone2_running (struct frame_info *this_frame)
{
CORE_ADDR pc = get_frame_pc (this_frame);
- char buf[LINUX_CLONE_LEN];
+ unsigned char buf[LINUX_CLONE_LEN];
struct minimal_symbol *minsym;
long long instr;
@@ -2256,7 +2256,7 @@ static int
ia64_outermost_frame (struct frame_info *this_frame)
{
CORE_ADDR pc = get_frame_pc (this_frame);
- char *name;
+ const char *name;
find_pc_partial_function (pc, &name, NULL, NULL);
@@ -2302,6 +2302,7 @@ ia64_clone2_frame_sniffer (const struct
static const struct frame_unwind ia64_clone2_frame_unwind =
{
NORMAL_FRAME,
+ default_frame_unwind_stop_reason,
&ia64_clone2_frame_this_id,
&ia64_clone2_frame_prev_register,
NULL,

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,747 @@
http://sourceware.org/ml/gdb-patches/2014-07/msg00002.html
Subject: Re: [PATCH] PR python/16699: GDB Python command completion with overriden complete vs. completer class
https://bugzilla.redhat.com/show_bug.cgi?id=1075199
On Wednesday, May 21 2014, Doug Evans wrote:
> Sergio Durigan Junior <sergiodj@redhat.com> writes:
>> [...]
>> Thanks. WDYT of the following patch?
>
> Hi.
>
> fwiw it's too bad the ability to plug in different completers isn't more,
> I dunno, parameterized (couldn't pick a better term, apologies -
> I thought of "object oriented" but that carries its own baggage).
> Performing completion obviously involves specifying more than a just
> single function (witness the comparison of the completer with specific
> functions).
Thanks for the reply, and sorry for the long delay in answering.
> Plus it's more than specifying brkchars.
> Witness code like this:
>
> /* Many commands which want to complete on
> file names accept several file names, as
> in "run foo bar >>baz". So we don't want
> to complete the entire text after the
> command, just the last word. To this
> end, we need to find the beginning of the
> file name by starting at `word' and going
> backwards. */
> for (p = word;
> p > tmp_command
> && strchr (gdb_completer_file_name_break_characters, p[-1]) == NULL;
> p--)
> ;
>
> IWBN if a "completer" object described how to do all these three things.
> Then the special case code for filename_completer (and location_completer)
> in completer.c could disappear. But maybe that's a patch for another day.
While I agree with you that the completion mechanism could be better (I
myself had a lot of trouble with it), I unfortunately don't have enough
time to tackle this problem now. So yeah, I think it will be a patch
for another day...
> Regarding the hack of using a static local to pass data from
> handle_brkchars to handle_completion, I know it's a hacky pragmatic
> choice. To get the reference counting right the code assumes that
> if the handle_brkchars phase is done then the handle_completion
> phase will be done too, right?
Yeah. This is true for the current code (well, except maybe for the
case you describe below...).
> I wonder if a SIGINT could sneak in
> there between the two passes (either today or tomorrow).
> Maybe the code in cmdpy_completer_helper for handle_brkchars_p could
> first check whether resultobj is already non-NULL, and decrement its
> reference count before setting it to NULL?
Yes, done (I think). Thanks for raising this issue.
> And cmdpy_completer_helper
> could be defined to return a borrowed reference to resultobj?
> Dunno, just thinking out loud.
Done, I guess.
> Something puzzles me though: If it's ok to cache the completion result from the
> handle_brkchars pass to the handle_completion pass, why have two passes?
> It feels like there must be a case where this caching of the result
> in a static local from one pass to the next won't work.
I'm not sure I follow.
It's OK to cache the result because handle_brkchars and
handle_completion work on the same set of data. In fact, we wouldn't
need to have two passes here; my previous patch didn't have two passes,
and worked fine. I just implemented it this way because Tom (correctly)
raised the point that the completion itself might be time-consuming, and
thus we could reuse its result in the two phases.
> Another question:
> I noticed complete_command doesn't do this two-phase dance
> of handle_brkchars followed by handle_completions. Should it?
> It just goes straight to handle_completions.
I don't think it should, because for complete_command (and
complete_filename et al) the handle_brkchars is already defined
internally by GDB. See:
...
/* Choose the default set of word break characters to break
completions. If we later find out that we are doing completions
on command strings (as opposed to strings supplied by the
individual command completer functions, which can be any string)
then we will switch to the special word break set for command
strings, which leaves out the '-' character used in some
commands. */
rl_completer_word_break_characters =
current_language->la_word_break_characters();
...
/* It is a normal command; what comes after it is
completed by the command's completer function. */
if (c->completer == filename_completer)
{
/* Many commands which want to complete on
file names accept several file names, as
in "run foo bar >>baz". So we don't want
to complete the entire text after the
command, just the last word. To this
end, we need to find the beginning of the
file name by starting at `word' and going
backwards. */
for (p = word;
p > tmp_command
&& strchr (gdb_completer_file_name_break_characters, p[-1]) == NULL;
p--)
;
rl_completer_word_break_characters =
gdb_completer_file_name_break_characters;
}
else if (c->completer == location_completer)
{
/* Commands which complete on locations want to
see the entire argument. */
for (p = word;
p > tmp_command
&& p[-1] != ' ' && p[-1] != '\t';
p--)
;
}
if (reason == handle_brkchars
&& c->completer_handle_brkchars != NULL)
(*c->completer_handle_brkchars) (c, p, word);
if (reason != handle_brkchars && c->completer != NULL)
list = (*c->completer) (c, p, word);
The complete_command function will only be called by the last "if"
clause, when reason != handle_brkchars. Otherwise,
complete_line_internal will just deal with handle_brkchars. And for
complete_command, the right value for rl_completer_word_break_characters
is what is attributed at the beginning of the function.
My patch implements this "two-phase" dance for Python because in this
specific case (i.e., a completion method defined in the Python script)
there is no way to know the value of handle_brkchars before we actually
do the completion itself.
In fact, my patch could probably be "simplified" and be made to call
cmdpy_completer directly (without any cmdpy_completer_handle_brkchars),
assuming that this function took care of filling handle_brkchars
correctly. What I mean is: when dealing with the handle_brkchars case,
the completer command can do anything it wants.
> [Maybe that explains the difference from using TAB. Dunno off hand.]
> It seems like complete_command is trying to hand-code its own
> handle_brkchars handling:
>
> static void
> complete_command (char *arg, int from_tty)
> {
> int argpoint;
> char *point, *arg_prefix;
> VEC (char_ptr) *completions;
>
> dont_repeat ();
>
> if (arg == NULL)
> arg = "";
> argpoint = strlen (arg);
>
> /* complete_line assumes that its first argument is somewhere
> within, and except for filenames at the beginning of, the word to
> be completed. The following crude imitation of readline's
> word-breaking tries to accomodate this. */
> point = arg + argpoint;
> while (point > arg)
> {
> if (strchr (rl_completer_word_break_characters, point[-1]) != 0)
> break;
> point--;
> }
>
> arg_prefix = alloca (point - arg + 1);
> memcpy (arg_prefix, arg, point - arg);
> arg_prefix[point - arg] = 0;
>
> completions = complete_line (point, arg, argpoint);
>
> ...
> }
Yes, it seems so, but I did not check further.
> TAB and the complete command should work identically of course,
> but for your testcase, maybe you should test both just to verify
> both work reasonably well (even if not identically).
> Given that complete_command doesn't do the two phase dance,
> does it work with your patch?
> Maybe it does, but IWBN to confirm that.
The 'complete' command does not work as it should with my patch:
(gdb) complete completefileinit /hom
completefileinit /home
(gdb) complete completefilemethod /hom
completefilemethod /home
But then, it also does not work without my patch either:
(gdb) complete file /hom
file /home
So I am not extending the testcase for now, because this bug needs to be
fixed first (and it is unrelated to the patch I am proposing).
WDYT of this version?
Thanks,
--
Sergio
GPG key ID: 65FC5E36
Please send encrypted e-mail if possible
http://blog.sergiodj.net/
gdb/
2014-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
PR python/16699
* cli/cli-decode.c (set_cmd_completer_handle_brkchars): New
function.
(add_cmd): Set "completer_handle_brkchars" to NULL.
* cli/cli-decode.h (struct cmd_list_element)
<completer_handle_brkchars>: New field.
* command.h (completer_ftype_void): New typedef.
(set_cmd_completer_handle_brkchars): New prototype.
* completer.c (set_gdb_completion_word_break_characters): New
function.
(complete_line_internal): Call "completer_handle_brkchars"
callback from command.
* completer.h: Include "command.h".
(set_gdb_completion_word_break_characters): New prototype.
* python/py-cmd.c (cmdpy_completer_helper): New function.
(cmdpy_completer_handle_brkchars): New function.
(cmdpy_completer): Adjust to use cmdpy_completer_helper.
(cmdpy_init): Set completer_handle_brkchars to
cmdpy_completer_handle_brkchars.
gdb/testsuite/
2014-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
PR python/16699
* gdb.python/py-completion.exp: New file.
* gdb.python/py-completion.py: Likewise.
Index: gdb-7.7.90.20140627/gdb/cli/cli-decode.c
===================================================================
--- gdb-7.7.90.20140627.orig/gdb/cli/cli-decode.c 2014-07-07 20:53:52.635106914 +0200
+++ gdb-7.7.90.20140627/gdb/cli/cli-decode.c 2014-07-07 20:53:55.429110207 +0200
@@ -164,6 +164,15 @@ set_cmd_completer (struct cmd_list_eleme
cmd->completer = completer; /* Ok. */
}
+/* See definition in commands.h. */
+
+void
+set_cmd_completer_handle_brkchars (struct cmd_list_element *cmd,
+ completer_ftype_void *completer_handle_brkchars)
+{
+ cmd->completer_handle_brkchars = completer_handle_brkchars;
+}
+
/* Add element named NAME.
Space for NAME and DOC must be allocated by the caller.
CLASS is the top level category into which commands are broken down
@@ -239,6 +248,7 @@ add_cmd (const char *name, enum command_
c->prefix = NULL;
c->abbrev_flag = 0;
set_cmd_completer (c, make_symbol_completion_list_fn);
+ c->completer_handle_brkchars = NULL;
c->destroyer = NULL;
c->type = not_set_cmd;
c->var = NULL;
Index: gdb-7.7.90.20140627/gdb/cli/cli-decode.h
===================================================================
--- gdb-7.7.90.20140627.orig/gdb/cli/cli-decode.h 2014-07-07 20:53:52.636106915 +0200
+++ gdb-7.7.90.20140627/gdb/cli/cli-decode.h 2014-07-07 20:53:55.429110207 +0200
@@ -176,6 +176,15 @@ struct cmd_list_element
"baz/foo", return "baz/foobar". */
completer_ftype *completer;
+ /* Handle the word break characters for this completer. Usually
+ this function need not be defined, but for some types of
+ completers (e.g., Python completers declared as methods inside
+ a class) the word break chars may need to be redefined
+ depending on the completer type (e.g., for filename
+ completers). */
+
+ completer_ftype_void *completer_handle_brkchars;
+
/* Destruction routine for this command. If non-NULL, this is
called when this command instance is destroyed. This may be
used to finalize the CONTEXT field, if needed. */
Index: gdb-7.7.90.20140627/gdb/command.h
===================================================================
--- gdb-7.7.90.20140627.orig/gdb/command.h 2014-07-07 20:53:52.636106915 +0200
+++ gdb-7.7.90.20140627/gdb/command.h 2014-07-07 20:53:55.430110208 +0200
@@ -158,8 +158,16 @@ extern void set_cmd_sfunc (struct cmd_li
typedef VEC (char_ptr) *completer_ftype (struct cmd_list_element *,
const char *, const char *);
+typedef void completer_ftype_void (struct cmd_list_element *,
+ const char *, const char *);
+
extern void set_cmd_completer (struct cmd_list_element *, completer_ftype *);
+/* Set the completer_handle_brkchars callback. */
+
+extern void set_cmd_completer_handle_brkchars (struct cmd_list_element *,
+ completer_ftype_void *);
+
/* HACK: cagney/2002-02-23: Code, mostly in tracepoints.c, grubs
around in cmd objects to test the value of the commands sfunc(). */
extern int cmd_cfunc_eq (struct cmd_list_element *cmd,
Index: gdb-7.7.90.20140627/gdb/completer.c
===================================================================
--- gdb-7.7.90.20140627.orig/gdb/completer.c 2014-07-07 20:53:52.637106916 +0200
+++ gdb-7.7.90.20140627/gdb/completer.c 2014-07-07 20:53:55.430110208 +0200
@@ -450,6 +450,21 @@ expression_completer (struct cmd_list_el
return location_completer (ignore, p, word);
}
+/* See definition in completer.h. */
+
+void
+set_gdb_completion_word_break_characters (completer_ftype *fn)
+{
+ /* So far we are only interested in differentiating filename
+ completers from everything else. */
+ if (fn == filename_completer)
+ rl_completer_word_break_characters
+ = gdb_completer_file_name_break_characters;
+ else
+ rl_completer_word_break_characters
+ = gdb_completer_command_word_break_characters;
+}
+
/* Here are some useful test cases for completion. FIXME: These
should be put in the test suite. They should be tested with both
M-? and TAB.
@@ -678,6 +693,9 @@ complete_line_internal (const char *text
p--)
;
}
+ if (reason == handle_brkchars
+ && c->completer_handle_brkchars != NULL)
+ (*c->completer_handle_brkchars) (c, p, word);
if (reason != handle_brkchars && c->completer != NULL)
list = (*c->completer) (c, p, word);
}
@@ -751,6 +769,9 @@ complete_line_internal (const char *text
p--)
;
}
+ if (reason == handle_brkchars
+ && c->completer_handle_brkchars != NULL)
+ (*c->completer_handle_brkchars) (c, p, word);
if (reason != handle_brkchars && c->completer != NULL)
list = (*c->completer) (c, p, word);
}
Index: gdb-7.7.90.20140627/gdb/completer.h
===================================================================
--- gdb-7.7.90.20140627.orig/gdb/completer.h 2014-07-07 20:53:52.637106916 +0200
+++ gdb-7.7.90.20140627/gdb/completer.h 2014-07-07 20:54:13.297131831 +0200
@@ -18,6 +18,7 @@
#define COMPLETER_H 1
#include "gdb_vecs.h"
+#include "command.h"
extern VEC (char_ptr) *complete_line (const char *text,
char *line_buffer,
@@ -48,6 +49,13 @@ extern char *get_gdb_completer_quote_cha
extern char *gdb_completion_word_break_characters (void);
+/* Set the word break characters array to the corresponding set of
+ chars, based on FN. This function is useful for cases when the
+ completer doesn't know the type of the completion until some
+ calculation is done (e.g., for Python functions). */
+
+extern void set_gdb_completion_word_break_characters (completer_ftype *fn);
+
/* Exported to linespec.c */
extern const char *skip_quoted_chars (const char *, const char *,
Index: gdb-7.7.90.20140627/gdb/python/py-cmd.c
===================================================================
--- gdb-7.7.90.20140627.orig/gdb/python/py-cmd.c 2014-07-07 20:53:52.637106916 +0200
+++ gdb-7.7.90.20140627/gdb/python/py-cmd.c 2014-07-07 20:53:55.431110209 +0200
@@ -208,45 +208,155 @@ cmdpy_function (struct cmd_list_element
do_cleanups (cleanup);
}
+/* Helper function for the Python command completers (both "pure"
+ completer and brkchar handler). This function takes COMMAND, TEXT
+ and WORD and tries to call the Python method for completion with
+ these arguments. It also takes HANDLE_BRKCHARS_P, an argument to
+ identify whether it is being called from the brkchar handler or
+ from the "pure" completer. In the first case, it effectively calls
+ the Python method for completion, and records the PyObject in a
+ static variable (used as a "cache"). In the second case, it just
+ returns that variable, without actually calling the Python method
+ again. This saves us one Python method call.
+
+ It is important to mention that this function is built on the
+ assumption that the calls to cmdpy_completer_handle_brkchars and
+ cmdpy_completer will be subsequent with nothing intervening. This
+ is true for our completer mechanism.
+
+ This function returns the PyObject representing the Python method
+ call. */
+
+static PyObject *
+cmdpy_completer_helper (struct cmd_list_element *command,
+ const char *text, const char *word,
+ int handle_brkchars_p)
+{
+ cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command);
+ PyObject *textobj, *wordobj;
+ /* This static variable will server as a "cache" for us, in order to
+ store the PyObject that results from calling the Python
+ function. */
+ static PyObject *resultobj = NULL;
+
+ if (handle_brkchars_p)
+ {
+ /* If we were called to handle brkchars, it means this is the
+ first function call of two that will happen in a row.
+ Therefore, we need to call the completer ourselves, and cache
+ the return value in the static variable RESULTOBJ. Then, in
+ the second call, we can just use the value of RESULTOBJ to do
+ our job. */
+ if (resultobj != NULL)
+ Py_DECREF (resultobj);
+
+ resultobj = NULL;
+ if (!obj)
+ error (_("Invalid invocation of Python command object."));
+ if (!PyObject_HasAttr ((PyObject *) obj, complete_cst))
+ {
+ /* If there is no complete method, don't error. */
+ return NULL;
+ }
+
+ textobj = PyUnicode_Decode (text, strlen (text), host_charset (), NULL);
+ if (!textobj)
+ error (_("Could not convert argument to Python string."));
+ wordobj = PyUnicode_Decode (word, sizeof (word), host_charset (), NULL);
+ if (!wordobj)
+ {
+ Py_DECREF (textobj);
+ error (_("Could not convert argument to Python string."));
+ }
+
+ resultobj = PyObject_CallMethodObjArgs ((PyObject *) obj, complete_cst,
+ textobj, wordobj, NULL);
+ Py_DECREF (textobj);
+ Py_DECREF (wordobj);
+ if (!resultobj)
+ {
+ /* Just swallow errors here. */
+ PyErr_Clear ();
+ }
+
+ Py_XINCREF (resultobj);
+ }
+
+ return resultobj;
+}
+
+/* Python function called to determine the break characters of a
+ certain completer. We are only interested in knowing if the
+ completer registered by the user will return one of the integer
+ codes (see COMPLETER_* symbols). */
+
+static void
+cmdpy_completer_handle_brkchars (struct cmd_list_element *command,
+ const char *text, const char *word)
+{
+ PyObject *resultobj = NULL;
+ struct cleanup *cleanup;
+
+ cleanup = ensure_python_env (get_current_arch (), current_language);
+
+ /* Calling our helper to obtain the PyObject of the Python
+ function. */
+ resultobj = cmdpy_completer_helper (command, text, word, 1);
+
+ /* Check if there was an error. */
+ if (resultobj == NULL)
+ goto done;
+
+ if (PyInt_Check (resultobj))
+ {
+ /* User code may also return one of the completion constants,
+ thus requesting that sort of completion. We are only
+ interested in this kind of return. */
+ long value;
+
+ if (!gdb_py_int_as_long (resultobj, &value))
+ {
+ /* Ignore. */
+ PyErr_Clear ();
+ }
+ else if (value >= 0 && value < (long) N_COMPLETERS)
+ {
+ /* This is the core of this function. Depending on which
+ completer type the Python function returns, we have to
+ adjust the break characters accordingly. */
+ set_gdb_completion_word_break_characters
+ (completers[value].completer);
+ }
+ }
+
+ done:
+
+ /* We do not call Py_XDECREF here because RESULTOBJ will be used in
+ the subsequent call to cmdpy_completer function. */
+ do_cleanups (cleanup);
+}
+
/* Called by gdb for command completion. */
static VEC (char_ptr) *
cmdpy_completer (struct cmd_list_element *command,
const char *text, const char *word)
{
- cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command);
- PyObject *textobj, *wordobj, *resultobj = NULL;
+ PyObject *resultobj = NULL;
VEC (char_ptr) *result = NULL;
struct cleanup *cleanup;
cleanup = ensure_python_env (get_current_arch (), current_language);
- if (! obj)
- error (_("Invalid invocation of Python command object."));
- if (! PyObject_HasAttr ((PyObject *) obj, complete_cst))
- {
- /* If there is no complete method, don't error -- instead, just
- say that there are no completions. */
- goto done;
- }
-
- textobj = PyUnicode_Decode (text, strlen (text), host_charset (), NULL);
- if (! textobj)
- error (_("Could not convert argument to Python string."));
- wordobj = PyUnicode_Decode (word, strlen (word), host_charset (), NULL);
- if (! wordobj)
- error (_("Could not convert argument to Python string."));
-
- resultobj = PyObject_CallMethodObjArgs ((PyObject *) obj, complete_cst,
- textobj, wordobj, NULL);
- Py_DECREF (textobj);
- Py_DECREF (wordobj);
- if (! resultobj)
- {
- /* Just swallow errors here. */
- PyErr_Clear ();
- goto done;
- }
+ /* Calling our helper to obtain the PyObject of the Python
+ function. */
+ resultobj = cmdpy_completer_helper (command, text, word, 0);
+
+ /* If the result object of calling the Python function is NULL, it
+ means that there was an error. In this case, just give up and
+ return NULL. */
+ if (resultobj == NULL)
+ goto done;
result = NULL;
if (PyInt_Check (resultobj))
@@ -302,7 +412,6 @@ cmdpy_completer (struct cmd_list_element
done:
- Py_XDECREF (resultobj);
do_cleanups (cleanup);
return result;
@@ -548,6 +657,9 @@ cmdpy_init (PyObject *self, PyObject *ar
set_cmd_context (cmd, self);
set_cmd_completer (cmd, ((completetype == -1) ? cmdpy_completer
: completers[completetype].completer));
+ if (completetype == -1)
+ set_cmd_completer_handle_brkchars (cmd,
+ cmdpy_completer_handle_brkchars);
}
if (except.reason < 0)
{
Index: gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.exp 2014-07-07 20:53:55.431110209 +0200
@@ -0,0 +1,70 @@
+# Copyright (C) 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/>.
+
+set testfile "py-completion"
+
+load_lib gdb-python.exp
+
+gdb_exit
+gdb_start
+
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
+gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py"
+
+# Create a temporary directory
+set testdir "${objdir}/${subdir}/py-completion-testdir/"
+set testdir_regex [string_to_regexp $testdir]
+set testdir_complete "${objdir}/${subdir}/py-completion-test"
+file mkdir $testdir
+
+# This one should always pass.
+send_gdb "completefileinit ${testdir_complete}\t"
+gdb_test_multiple "" "completefileinit completion" {
+ -re "^completefileinit ${testdir_regex}$" {
+ pass "completefileinit completion"
+ }
+}
+
+# Just discarding whatever we typed.
+send_gdb "\n"
+gdb_test "print" ".*"
+
+# This is the problematic one.
+send_gdb "completefilemethod ${testdir_complete}\t"
+gdb_test_multiple "" "completefilemethod completion" {
+ -re "^completefilemethod ${testdir_regex} $" {
+ fail "completefilemethod completion (completed filename as wrong command arg)"
+ }
+ -re "^completefilemethod ${testdir_regex}$" {
+ pass "completefilemethod completion"
+ }
+}
+
+# Discarding again
+send_gdb "\n"
+gdb_test "print" ".*"
+
+# Another problematic
+send_gdb "completefilecommandcond ${objdir}/${subdir}/py-completion-t\t"
+gdb_test_multiple "" "completefilecommandcond completion" {
+ -re "^completefilecommandcond ${testdir}$" {
+ fail "completefilecommandcond completion (completed filename instead of command)"
+ }
+ -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" {
+ pass "completefilecommandcond completion"
+ }
+}
Index: gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.py
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.py 2014-07-07 20:53:55.431110209 +0200
@@ -0,0 +1,58 @@
+# Copyright (C) 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/>.
+
+# This testcase tests PR python/16699
+
+import gdb
+
+class CompleteFileInit(gdb.Command):
+ def __init__(self):
+ gdb.Command.__init__(self,'completefileinit',gdb.COMMAND_USER,gdb.COMPLETE_FILENAME)
+
+ def invoke(self,argument,from_tty):
+ raise gdb.GdbError('not implemented')
+
+class CompleteFileMethod(gdb.Command):
+ def __init__(self):
+ gdb.Command.__init__(self,'completefilemethod',gdb.COMMAND_USER)
+
+ def invoke(self,argument,from_tty):
+ raise gdb.GdbError('not implemented')
+
+ def complete(self,text,word):
+ return gdb.COMPLETE_FILENAME
+
+class CompleteFileCommandCond(gdb.Command):
+ def __init__(self):
+ gdb.Command.__init__(self,'completefilecommandcond',gdb.COMMAND_USER)
+
+ def invoke(self,argument,from_tty):
+ raise gdb.GdbError('not implemented')
+
+ def complete(self,text,word):
+ # This is a test made to know if the command
+ # completion still works fine. When the user asks to
+ # complete something like "completefilecommandcond
+ # /path/to/py-completion-t", it should not complete to
+ # "/path/to/py-completion-test/", but instead just
+ # wait for input.
+ if "py-completion-t" in text:
+ return gdb.COMPLETE_COMMAND
+ else:
+ return gdb.COMPLETE_FILENAME
+
+CompleteFileInit()
+CompleteFileMethod()
+CompleteFileCommandCond()

View File

@ -0,0 +1,72 @@
http://sourceware.org/ml/gdb-patches/2014-07/msg00154.html
Subject: Re: [PATCH] PR python/16699: GDB Python command completion with overriden complete vs. completer class
--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, 08 Jul 2014 17:32:21 +0200, Jan Kratochvil wrote:
> - -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" {
> + -re "^completefilecommandcond ${completion_regex}$" {
There was a racy bug here - and even in the former test - here should be:
+ -re "^completefilecommandcond ${completion_regex}\007$" {
Updated fix attached.
Jan
--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="py-completion-race2.patch"
--- ./gdb/testsuite/gdb.python/py-completion.exp-orig 2014-07-07 21:32:17.891045058 +0200
+++ ./gdb/testsuite/gdb.python/py-completion.exp 2014-07-08 20:14:57.189791928 +0200
@@ -26,9 +26,9 @@ if { [skip_python_tests] } { continue }
gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py"
# Create a temporary directory
-set testdir "${objdir}/${subdir}/py-completion-testdir/"
+set testdir "[standard_output_file "py-completion-testdir"]/"
set testdir_regex [string_to_regexp $testdir]
-set testdir_complete "${objdir}/${subdir}/py-completion-test"
+set testdir_complete [standard_output_file "py-completion-test"]
file mkdir $testdir
# This one should always pass.
@@ -40,8 +40,7 @@ gdb_test_multiple "" "completefileinit c
}
# Just discarding whatever we typed.
-send_gdb "\n"
-gdb_test "print" ".*"
+gdb_test " " ".*" "discard #1"
# This is the problematic one.
send_gdb "completefilemethod ${testdir_complete}\t"
@@ -55,16 +54,16 @@ gdb_test_multiple "" "completefilemethod
}
# Discarding again
-send_gdb "\n"
-gdb_test "print" ".*"
+gdb_test " " ".*" "discard #2"
# Another problematic
-send_gdb "completefilecommandcond ${objdir}/${subdir}/py-completion-t\t"
+set completion_regex "[string_to_regexp [standard_output_file "py-completion-t"]]"
+send_gdb "completefilecommandcond [standard_output_file "py-completion-t\t"]"
gdb_test_multiple "" "completefilecommandcond completion" {
-re "^completefilecommandcond ${testdir}$" {
fail "completefilecommandcond completion (completed filename instead of command)"
}
- -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" {
+ -re "^completefilecommandcond ${completion_regex}\007$" {
pass "completefilecommandcond completion"
}
}
--pWyiEgJYm5f9v55/--

View File

@ -1,65 +0,0 @@
http://sourceware.org/ml/gdb-patches/2014-02/msg00216.html
Subject: [patch] [python] Re: GDB crashing on gdb.python/py-linetable.exp
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Fri, 07 Feb 2014 11:45:04 +0100, Phil Muldoon wrote:
> I've tried most of the morning to reproduce this on Fedora 19, with
> -lmcheck and after several thousand test runs I can't reproduce.
Due to the requirement of specific stack layout I found it is reproducible for
me on Fedora 20 x86_64 with (it sure could be reduced):
CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" LDFLAGS="-static-libstdc++ -static-libgcc -Wl,-z,relro" ./configure --with-system-readline;make
(ulimit -c unlimited;/usr/bin/runtest gdb.python/py-linetable.exp)
The fix is obvious, I will check it in.
- int py_line;
+ gdb_py_longest py_line;
[...]
Regards,
Jan
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
gdb/
2014-02-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix Python stack corruption.
* python/py-linetable.c (ltpy_get_pcs_for_line, ltpy_has_line): Use
gdb_py_longest.
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index e83d46d..8b5362b 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -168,7 +168,7 @@ static PyObject *
ltpy_get_pcs_for_line (PyObject *self, PyObject *args)
{
struct symtab *symtab;
- int py_line;
+ gdb_py_longest py_line;
struct linetable_entry *best_entry = NULL;
linetable_entry_object *result;
VEC (CORE_ADDR) *pcs = NULL;
@@ -200,7 +200,7 @@ static PyObject *
ltpy_has_line (PyObject *self, PyObject *args)
{
struct symtab *symtab;
- int py_line;
+ gdb_py_longest py_line;
int index;
LTPY_REQUIRE_VALID (self, symtab);
--7AUc2qLy4jB3hD7Z--

90
gdb-readline-6.3.5.patch Normal file
View File

@ -0,0 +1,90 @@
http://sourceware.org/ml/gdb-patches/2014-06/msg00737.html
Subject: [patch] Fix --with-system-readline with readline-6.3 patch 5
--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
I have filed now:
--with-system-readline uses bundled readline include files
https://sourceware.org/bugzilla/show_bug.cgi?id=17077
To see any effect of the patch below you have to do:
rm -rf readline
Otherwise readline include files get used the bundled ones from GDB which are
currently 6.2 while system readline may be 6.3 already.
You also have to use system readline-6.3 including its upstream patch:
[Bug-readline] Readline-6.3 Official Patch 5
http://lists.gnu.org/archive/html/bug-readline/2014-04/msg00018.html
Message-ID: <140415125618.AA57598.SM@caleb.ins.cwru.edu>
In short it happens on Fedora Rawhide since:
readline-6.3-1.fc21
https://koji.fedoraproject.org/koji/buildinfo?buildID=538941
The error is:
https://kojipkgs.fedoraproject.org//work/tasks/9890/7059890/build.log
../../gdb/tui/tui-io.c:132:1: error: 'Function' is deprecated [-Werror=deprecated-declarations]
static Function *tui_old_rl_getc_function;
^
../../gdb/tui/tui-io.c:133:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
static VFunction *tui_old_rl_redisplay_function;
^
../../gdb/tui/tui-io.c:134:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
static VFunction *tui_old_rl_prep_terminal;
^
../../gdb/tui/tui-io.c:135:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
static VFunction *tui_old_rl_deprep_terminal;
^
It is since bash change:
lib/readline/rltypedefs.h
- remove old Function/VFunction/CPFunction/CPPFunction typedefs as
suggested by Tom Tromey <tromey@redhat.com>
The new typedefs used below are present in readline/rltypedefs.h since:
git://git.savannah.gnu.org/bash.git
commit 28ef6c316f1aff914bb95ac09787a3c83c1815fd
Date: Fri Apr 6 19:14:31 2001 +0000
Jan
--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="tuireadline.patch"
gdb/
2014-06-20 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix --with-system-readline with readline-6.3 patch 5.
* tui/tui-io.c (tui_old_rl_getc_function, tui_old_rl_redisplay_function)
(tui_old_rl_prep_terminal, tui_old_rl_deprep_terminal): Use rl_*_t
types.
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index 761d203..dcccb08 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -129,10 +129,10 @@ static struct ui_file *tui_old_stderr;
struct ui_out *tui_old_uiout;
/* Readline previous hooks. */
-static Function *tui_old_rl_getc_function;
-static VFunction *tui_old_rl_redisplay_function;
-static VFunction *tui_old_rl_prep_terminal;
-static VFunction *tui_old_rl_deprep_terminal;
+static rl_getc_func_t *tui_old_rl_getc_function;
+static rl_voidfunc_t *tui_old_rl_redisplay_function;
+static rl_vintfunc_t *tui_old_rl_prep_terminal;
+static rl_voidfunc_t *tui_old_rl_deprep_terminal;
static int tui_old_rl_echoing_p;
/* Readline output stream.
--BXVAT5kNtrzKuDFl--

File diff suppressed because it is too large Load Diff

View File

@ -52,10 +52,10 @@ Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch
Index: gdb-7.6.90.20140127/gdb/alpha-tdep.c
Index: gdb-7.7.90.20140613/gdb/alpha-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/alpha-tdep.c 2014-02-06 18:18:51.005616676 +0100
+++ gdb-7.6.90.20140127/gdb/alpha-tdep.c 2014-02-06 18:18:53.671621349 +0100
--- gdb-7.7.90.20140613.orig/gdb/alpha-tdep.c 2014-06-13 22:14:49.725846383 +0200
+++ gdb-7.7.90.20140613/gdb/alpha-tdep.c 2014-06-13 22:14:53.163850081 +0200
@@ -414,6 +414,13 @@ alpha_push_dummy_call (struct gdbarch *g
accumulate_size = 0;
else
@ -70,11 +70,11 @@ Index: gdb-7.6.90.20140127/gdb/alpha-tdep.c
sp -= accumulate_size;
/* Keep sp aligned to a multiple of 16 as the ABI requires. */
Index: gdb-7.6.90.20140127/gdb/cp-valprint.c
Index: gdb-7.7.90.20140613/gdb/cp-valprint.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/cp-valprint.c 2014-02-06 18:18:51.006616677 +0100
+++ gdb-7.6.90.20140127/gdb/cp-valprint.c 2014-02-06 18:18:53.671621349 +0100
@@ -537,6 +537,8 @@ cp_print_value (struct type *type, struc
--- gdb-7.7.90.20140613.orig/gdb/cp-valprint.c 2014-06-13 22:14:49.725846383 +0200
+++ gdb-7.7.90.20140613/gdb/cp-valprint.c 2014-06-13 22:14:53.164850081 +0200
@@ -538,6 +538,8 @@ cp_print_value (struct type *type, struc
gdb_byte *buf;
struct cleanup *back_to;
@ -83,11 +83,11 @@ Index: gdb-7.6.90.20140127/gdb/cp-valprint.c
buf = xmalloc (TYPE_LENGTH (baseclass));
back_to = make_cleanup (xfree, buf);
Index: gdb-7.6.90.20140127/gdb/dwarf2loc.c
Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/dwarf2loc.c 2014-02-06 18:18:51.007616678 +0100
+++ gdb-7.6.90.20140127/gdb/dwarf2loc.c 2014-02-06 18:18:53.672621293 +0100
@@ -1821,6 +1821,8 @@ read_pieced_value (struct value *v)
--- gdb-7.7.90.20140613.orig/gdb/dwarf2loc.c 2014-06-13 22:14:49.726846384 +0200
+++ gdb-7.7.90.20140613/gdb/dwarf2loc.c 2014-06-13 22:14:53.166850084 +0200
@@ -1666,6 +1666,8 @@ read_pieced_value (struct value *v)
this_size = (this_size_bits + source_offset_bits % 8 + 7) / 8;
source_offset = source_offset_bits / 8;
@ -96,7 +96,7 @@ Index: gdb-7.6.90.20140127/gdb/dwarf2loc.c
if (buffer_size < this_size)
{
buffer_size = this_size;
@@ -2012,6 +2014,7 @@ write_pieced_value (struct value *to, st
@@ -1857,6 +1859,7 @@ write_pieced_value (struct value *to, st
}
else
{
@ -104,10 +104,10 @@ Index: gdb-7.6.90.20140127/gdb/dwarf2loc.c
if (buffer_size < this_size)
{
buffer_size = this_size;
Index: gdb-7.6.90.20140127/gdb/findcmd.c
Index: gdb-7.7.90.20140613/gdb/findcmd.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/findcmd.c 2014-02-06 18:18:51.008616679 +0100
+++ gdb-7.6.90.20140127/gdb/findcmd.c 2014-02-06 18:18:53.673621239 +0100
--- gdb-7.7.90.20140613.orig/gdb/findcmd.c 2014-06-13 22:14:49.726846384 +0200
+++ gdb-7.7.90.20140613/gdb/findcmd.c 2014-06-13 22:14:53.166850084 +0200
@@ -185,6 +185,7 @@ parse_find_args (char *args, ULONGEST *m
size_t current_offset = pattern_buf_end - pattern_buf;
@ -116,11 +116,11 @@ Index: gdb-7.6.90.20140127/gdb/findcmd.c
pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
pattern_buf_end = pattern_buf + current_offset;
}
Index: gdb-7.6.90.20140127/gdb/p-valprint.c
Index: gdb-7.7.90.20140613/gdb/p-valprint.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/p-valprint.c 2014-02-06 18:18:51.008616679 +0100
+++ gdb-7.6.90.20140127/gdb/p-valprint.c 2014-02-06 18:18:53.673621239 +0100
@@ -798,6 +798,7 @@ pascal_object_print_value (struct type *
--- gdb-7.7.90.20140613.orig/gdb/p-valprint.c 2014-06-13 22:14:49.728846387 +0200
+++ gdb-7.7.90.20140613/gdb/p-valprint.c 2014-06-13 22:14:53.166850084 +0200
@@ -772,6 +772,7 @@ pascal_object_print_value (struct type *
gdb_byte *buf;
struct cleanup *back_to;
@ -128,12 +128,12 @@ Index: gdb-7.6.90.20140127/gdb/p-valprint.c
buf = xmalloc (TYPE_LENGTH (baseclass));
back_to = make_cleanup (xfree, buf);
Index: gdb-7.6.90.20140127/gdb/utils.c
Index: gdb-7.7.90.20140613/gdb/utils.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/utils.c 2014-02-06 18:18:51.008616679 +0100
+++ gdb-7.6.90.20140127/gdb/utils.c 2014-02-06 18:18:53.674621186 +0100
@@ -3169,6 +3169,18 @@ host_address_to_string (const void *addr
return str;
--- gdb-7.7.90.20140613.orig/gdb/utils.c 2014-06-13 22:14:53.166850084 +0200
+++ gdb-7.7.90.20140613/gdb/utils.c 2014-06-13 22:15:16.839875341 +0200
@@ -2838,6 +2838,18 @@ string_to_core_addr (const char *my_stri
return addr;
}
+/* Ensure that the input NUM is not larger than the maximum capacity of the
@ -151,11 +151,11 @@ Index: gdb-7.6.90.20140127/gdb/utils.c
char *
gdb_realpath (const char *filename)
{
Index: gdb-7.6.90.20140127/gdb/valops.c
Index: gdb-7.7.90.20140613/gdb/valops.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/valops.c 2014-02-06 18:18:51.009616680 +0100
+++ gdb-7.6.90.20140127/gdb/valops.c 2014-02-06 18:18:53.675621135 +0100
@@ -2184,6 +2184,7 @@ search_struct_method (const char *name,
--- gdb-7.7.90.20140613.orig/gdb/valops.c 2014-06-13 22:14:49.730846389 +0200
+++ gdb-7.7.90.20140613/gdb/valops.c 2014-06-13 22:14:53.169850088 +0200
@@ -2074,6 +2074,7 @@ search_struct_method (const char *name,
struct cleanup *back_to;
CORE_ADDR address;
@ -163,11 +163,11 @@ Index: gdb-7.6.90.20140127/gdb/valops.c
tmp = xmalloc (TYPE_LENGTH (baseclass));
back_to = make_cleanup (xfree, tmp);
address = value_address (*arg1p);
Index: gdb-7.6.90.20140127/gdb/value.c
Index: gdb-7.7.90.20140613/gdb/value.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/value.c 2014-02-06 18:18:51.010616681 +0100
+++ gdb-7.6.90.20140127/gdb/value.c 2014-02-06 18:19:10.261637398 +0100
@@ -822,6 +822,7 @@ allocate_value_lazy (struct type *type)
--- gdb-7.7.90.20140613.orig/gdb/value.c 2014-06-13 22:14:49.732846391 +0200
+++ gdb-7.7.90.20140613/gdb/value.c 2014-06-13 22:14:53.169850088 +0200
@@ -824,6 +824,7 @@ allocate_value_lazy (struct type *type)
description correctly. */
check_typedef (type);
@ -175,7 +175,7 @@ Index: gdb-7.6.90.20140127/gdb/value.c
val = (struct value *) xzalloc (sizeof (struct value));
val->contents = NULL;
val->next = all_values;
@@ -853,6 +854,8 @@ allocate_value_lazy (struct type *type)
@@ -855,6 +856,8 @@ allocate_value_lazy (struct type *type)
static void
allocate_value_contents (struct value *val)
{
@ -184,7 +184,7 @@ Index: gdb-7.6.90.20140127/gdb/value.c
if (!val->contents)
val->contents = (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type));
}
@@ -2854,8 +2857,12 @@ void
@@ -2831,8 +2834,12 @@ void
set_value_enclosing_type (struct value *val, struct type *new_encl_type)
{
if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val)))
@ -199,10 +199,10 @@ Index: gdb-7.6.90.20140127/gdb/value.c
val->enclosing_type = new_encl_type;
}
Index: gdb-7.6.90.20140127/gdb/vax-tdep.c
Index: gdb-7.7.90.20140613/gdb/vax-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/vax-tdep.c 2014-02-06 18:18:51.370617068 +0100
+++ gdb-7.6.90.20140127/gdb/vax-tdep.c 2014-02-06 18:18:53.676621086 +0100
--- gdb-7.7.90.20140613.orig/gdb/vax-tdep.c 2014-06-13 22:14:49.732846391 +0200
+++ gdb-7.7.90.20140613/gdb/vax-tdep.c 2014-06-13 22:14:53.169850088 +0200
@@ -223,6 +223,7 @@ vax_return_value (struct gdbarch *gdbarc
ULONGEST addr;
@ -211,11 +211,11 @@ Index: gdb-7.6.90.20140127/gdb/vax-tdep.c
read_memory (addr, readbuf, len);
}
Index: gdb-7.6.90.20140127/gdb/defs.h
Index: gdb-7.7.90.20140613/gdb/defs.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/defs.h 2014-02-06 18:18:51.370617068 +0100
+++ gdb-7.6.90.20140127/gdb/defs.h 2014-02-06 18:18:53.677621038 +0100
@@ -768,4 +768,6 @@ enum block_enum
--- gdb-7.7.90.20140613.orig/gdb/defs.h 2014-06-13 22:14:49.732846391 +0200
+++ gdb-7.7.90.20140613/gdb/defs.h 2014-06-13 22:14:53.169850088 +0200
@@ -756,4 +756,6 @@ enum block_enum
#include "utils.h"

View File

@ -96,29 +96,11 @@ Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bitpos-wp.patch
Index: gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c
Index: gdb-7.8/gdb/arm-linux-nat.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/arm-linux-nat.c 2013-08-02 16:42:29.565632895 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c 2013-08-02 16:42:34.094639104 +0200
@@ -1105,7 +1105,7 @@ arm_linux_region_ok_for_hw_watchpoint (C
/* Insert a Hardware breakpoint. */
static int
-arm_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+arm_linux_insert_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
struct expression *cond)
{
struct lwp_info *lp;
@@ -1123,7 +1123,7 @@ arm_linux_insert_watchpoint (CORE_ADDR a
/* Remove a hardware breakpoint. */
static int
-arm_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
+arm_linux_remove_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
struct expression *cond)
{
struct lwp_info *lp;
@@ -1180,7 +1180,7 @@ arm_linux_stopped_by_watchpoint (void)
--- gdb-7.8.orig/gdb/arm-linux-nat.c 2014-08-01 23:27:30.183773676 +0200
+++ gdb-7.8/gdb/arm-linux-nat.c 2014-08-01 23:27:30.241773754 +0200
@@ -1296,7 +1296,7 @@ arm_linux_stopped_by_watchpoint (struct
static int
arm_linux_watchpoint_addr_within_range (struct target_ops *target,
CORE_ADDR addr,
@ -127,151 +109,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/arm-linux-nat.c
{
return start <= addr && start + length - 1 >= addr;
}
Index: gdb-7.6.50.20130731-cvs/gdb/i386-nat.c
Index: gdb-7.8/gdb/ppc-linux-nat.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/i386-nat.c 2013-08-02 16:42:29.566632896 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/i386-nat.c 2013-08-02 16:42:34.095639105 +0200
@@ -589,7 +589,7 @@ i386_update_inferior_debug_regs (struct
of the type TYPE. Return 0 on success, -1 on failure. */
static int
-i386_insert_watchpoint (CORE_ADDR addr, int len, int type,
+i386_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
struct i386_debug_reg_state *state
@@ -627,7 +627,7 @@ i386_insert_watchpoint (CORE_ADDR addr,
address ADDR, whose length is LEN bytes, and for accesses of the
type TYPE. Return 0 on success, -1 on failure. */
static int
-i386_remove_watchpoint (CORE_ADDR addr, int len, int type,
+i386_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
struct i386_debug_reg_state *state
Index: gdb-7.6.50.20130731-cvs/gdb/ia64-linux-nat.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/ia64-linux-nat.c 2013-08-02 16:42:29.566632896 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/ia64-linux-nat.c 2013-08-02 16:42:34.095639105 +0200
@@ -542,7 +542,7 @@ is_power_of_2 (int val)
}
static int
-ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+ia64_linux_insert_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
struct expression *cond)
{
struct lwp_info *lp;
@@ -596,7 +596,7 @@ ia64_linux_insert_watchpoint (CORE_ADDR
}
static int
-ia64_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
+ia64_linux_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
int idx;
Index: gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/inf-ttrace.c 2013-08-02 16:42:29.567632898 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/inf-ttrace.c 2013-08-02 16:42:34.095639105 +0200
@@ -314,14 +314,14 @@ inf_ttrace_disable_page_protections (pid
type TYPE. */
static int
-inf_ttrace_insert_watchpoint (CORE_ADDR addr, int len, int type,
+inf_ttrace_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
const int pagesize = inf_ttrace_page_dict.pagesize;
pid_t pid = ptid_get_pid (inferior_ptid);
CORE_ADDR page_addr;
- int num_pages;
- int page;
+ LONGEST num_pages;
+ LONGEST page;
gdb_assert (type == hw_write);
@@ -338,14 +338,14 @@ inf_ttrace_insert_watchpoint (CORE_ADDR
type TYPE. */
static int
-inf_ttrace_remove_watchpoint (CORE_ADDR addr, int len, int type,
+inf_ttrace_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
const int pagesize = inf_ttrace_page_dict.pagesize;
pid_t pid = ptid_get_pid (inferior_ptid);
CORE_ADDR page_addr;
- int num_pages;
- int page;
+ LONGEST num_pages;
+ LONGEST page;
gdb_assert (type == hw_write);
Index: gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/mips-linux-nat.c 2013-08-02 16:42:29.568632899 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/mips-linux-nat.c 2013-08-02 16:42:34.096639106 +0200
@@ -644,7 +644,7 @@ mips_linux_new_thread (struct lwp_info *
watch. Return zero on success. */
static int
-mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
+mips_linux_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
struct pt_watch_regs regs;
@@ -697,7 +697,7 @@ mips_linux_insert_watchpoint (CORE_ADDR
Return zero on success. */
static int
-mips_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
+mips_linux_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
int retval;
Index: gdb-7.6.50.20130731-cvs/gdb/nto-procfs.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/nto-procfs.c 2013-08-02 16:42:29.568632899 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/nto-procfs.c 2013-08-02 16:42:34.096639106 +0200
@@ -69,10 +69,10 @@ static ptid_t do_attach (ptid_t ptid);
static int procfs_can_use_hw_breakpoint (int, int, int);
-static int procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
+static int procfs_insert_hw_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond);
-static int procfs_remove_hw_watchpoint (CORE_ADDR addr, int len, int type,
+static int procfs_remove_hw_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond);
static int procfs_stopped_by_watchpoint (void);
@@ -1493,14 +1493,14 @@ procfs_can_use_hw_breakpoint (int type,
}
static int
-procfs_remove_hw_watchpoint (CORE_ADDR addr, int len, int type,
+procfs_remove_hw_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
return procfs_hw_watchpoint (addr, -1, type);
}
static int
-procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
+procfs_insert_hw_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
return procfs_hw_watchpoint (addr, len, type);
Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/ppc-linux-nat.c 2013-08-02 16:42:29.570632902 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c 2013-08-02 16:42:34.097639108 +0200
@@ -1853,11 +1853,11 @@ can_use_watchpoint_cond_accel (void)
--- gdb-7.8.orig/gdb/ppc-linux-nat.c 2014-08-01 23:27:30.202773701 +0200
+++ gdb-7.8/gdb/ppc-linux-nat.c 2014-08-01 23:29:38.311944925 +0200
@@ -1862,11 +1862,11 @@ can_use_watchpoint_cond_accel (void)
CONDITION_VALUE will hold the value which should be put in the
DVC register. */
static void
@ -286,7 +128,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c
CORE_ADDR addr_end_data, addr_end_dvc;
/* The DVC register compares bytes within fixed-length windows which
@@ -1944,7 +1944,7 @@ num_memory_accesses (struct value *v)
@@ -1953,7 +1953,7 @@ num_memory_accesses (struct value *v)
of the constant. */
static int
check_condition (CORE_ADDR watch_addr, struct expression *cond,
@ -295,16 +137,16 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c
{
int pc = 1, num_accesses_left, num_accesses_right;
struct value *left_val, *right_val, *left_chain, *right_chain;
@@ -2011,7 +2011,7 @@ check_condition (CORE_ADDR watch_addr, s
the condition expression, thus only triggering the watchpoint when it is
@@ -2021,7 +2021,7 @@ check_condition (CORE_ADDR watch_addr, s
true. */
static int
-ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
+ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, LONGEST len, int rw,
ppc_linux_can_accel_watchpoint_condition (struct target_ops *self,
- CORE_ADDR addr, int len, int rw,
+ CORE_ADDR addr, LONGEST len, int rw,
struct expression *cond)
{
CORE_ADDR data_value;
@@ -2028,7 +2028,7 @@ ppc_linux_can_accel_watchpoint_condition
@@ -2038,7 +2038,7 @@ ppc_linux_can_accel_watchpoint_condition
static void
create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
@ -313,25 +155,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c
int insert)
{
if (len == 1
@@ -2073,7 +2073,7 @@ create_watchpoint_request (struct ppc_hw
}
static int
-ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+ppc_linux_insert_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
struct expression *cond)
{
struct lwp_info *lp;
@@ -2141,7 +2141,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR a
}
static int
-ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
+ppc_linux_remove_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
struct expression *cond)
{
struct lwp_info *lp;
@@ -2292,7 +2292,7 @@ ppc_linux_stopped_by_watchpoint (void)
@@ -2304,7 +2304,7 @@ ppc_linux_stopped_by_watchpoint (struct
static int
ppc_linux_watchpoint_addr_within_range (struct target_ops *target,
CORE_ADDR addr,
@ -340,11 +164,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/ppc-linux-nat.c
{
int mask;
Index: gdb-7.6.50.20130731-cvs/gdb/procfs.c
Index: gdb-7.8/gdb/procfs.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/procfs.c 2013-08-02 16:42:29.572632904 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/procfs.c 2013-08-02 16:42:34.098639109 +0200
@@ -2433,7 +2433,7 @@ procfs_address_to_host_pointer (CORE_ADD
--- gdb-7.8.orig/gdb/procfs.c 2014-08-01 23:27:30.203773703 +0200
+++ gdb-7.8/gdb/procfs.c 2014-08-01 23:27:30.243773756 +0200
@@ -2429,7 +2429,7 @@ procfs_address_to_host_pointer (CORE_ADD
#endif
static int
@ -353,7 +177,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/procfs.c
{
#if !defined (PCWATCH) && !defined (PIOCSWATCH)
/* If neither or these is defined, we can't support watchpoints.
@@ -4777,7 +4777,7 @@ procfs_pid_to_str (struct target_ops *op
@@ -4762,7 +4762,7 @@ procfs_pid_to_str (struct target_ops *op
/* Insert a watchpoint. */
static int
@ -362,102 +186,11 @@ Index: gdb-7.6.50.20130731-cvs/gdb/procfs.c
int after)
{
#ifndef AIX5
@@ -4897,7 +4897,7 @@ procfs_stopped_data_address (struct targ
}
static int
-procfs_insert_watchpoint (CORE_ADDR addr, int len, int type,
+procfs_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
if (!target_have_steppable_watchpoint
@@ -4919,7 +4919,7 @@ procfs_insert_watchpoint (CORE_ADDR addr
}
static int
-procfs_remove_watchpoint (CORE_ADDR addr, int len, int type,
+procfs_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0);
Index: gdb-7.6.50.20130731-cvs/gdb/remote-m32r-sdi.c
Index: gdb-7.8/gdb/remote.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/remote-m32r-sdi.c 2013-08-02 16:42:29.573632906 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/remote-m32r-sdi.c 2013-08-02 16:42:34.099639111 +0200
@@ -1416,14 +1416,15 @@ m32r_can_use_hw_watchpoint (int type, in
watchpoint. */
static int
-m32r_insert_watchpoint (CORE_ADDR addr, int len, int type,
+m32r_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
int i;
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%d,%d)\n",
- paddress (target_gdbarch (), addr), len, type);
+ fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%s,%d)\n",
+ paddress (target_gdbarch (), addr), plongest (len),
+ type);
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
{
@@ -1441,14 +1442,15 @@ m32r_insert_watchpoint (CORE_ADDR addr,
}
static int
-m32r_remove_watchpoint (CORE_ADDR addr, int len, int type,
+m32r_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
int i;
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%d,%d)\n",
- paddress (target_gdbarch (), addr), len, type);
+ fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%s,%d)\n",
+ paddress (target_gdbarch (), addr), plongest (len),
+ type);
for (i = 0; i < MAX_ACCESS_BREAKS; i++)
{
Index: gdb-7.6.50.20130731-cvs/gdb/remote-mips.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/remote-mips.c 2013-08-02 16:42:29.574632907 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/remote-mips.c 2013-08-02 16:42:34.100639112 +0200
@@ -2426,7 +2426,7 @@ calculate_mask (CORE_ADDR addr, int len)
watchpoint. */
static int
-mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
+mips_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
if (mips_set_breakpoint (addr, len, type))
@@ -2438,7 +2438,7 @@ mips_insert_watchpoint (CORE_ADDR addr,
/* Remove a watchpoint. */
static int
-mips_remove_watchpoint (CORE_ADDR addr, int len, int type,
+mips_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
if (mips_clear_breakpoint (addr, len, type))
Index: gdb-7.6.50.20130731-cvs/gdb/remote.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/remote.c 2013-08-02 16:42:29.577632911 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/remote.c 2013-08-02 16:42:34.103639116 +0200
@@ -8277,7 +8277,7 @@ watchpoint_to_Z_packet (int type)
}
static int
-remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
+remote_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
struct remote_state *rs = get_remote_state ();
@@ -8297,7 +8297,7 @@ remote_insert_watchpoint (CORE_ADDR addr
--- gdb-7.8.orig/gdb/remote.c 2014-08-01 23:27:30.205773705 +0200
+++ gdb-7.8/gdb/remote.c 2014-08-01 23:27:30.246773760 +0200
@@ -8206,7 +8206,7 @@ remote_insert_watchpoint (struct target_
p = strchr (rs->buf, '\0');
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
@ -466,7 +199,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/remote.c
putpkt (rs->buf);
getpkt (&rs->buf, &rs->buf_size, 0);
@@ -8317,7 +8317,7 @@ remote_insert_watchpoint (CORE_ADDR addr
@@ -8226,7 +8226,7 @@ remote_insert_watchpoint (struct target_
static int
remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
@ -475,16 +208,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/remote.c
{
CORE_ADDR diff = remote_address_masked (addr - start);
@@ -8326,7 +8326,7 @@ remote_watchpoint_addr_within_range (str
static int
-remote_remove_watchpoint (CORE_ADDR addr, int len, int type,
+remote_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
struct remote_state *rs = get_remote_state ();
@@ -8346,7 +8346,7 @@ remote_remove_watchpoint (CORE_ADDR addr
@@ -8256,7 +8256,7 @@ remote_remove_watchpoint (struct target_
p = strchr (rs->buf, '\0');
addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr);
@ -493,92 +217,36 @@ Index: gdb-7.6.50.20130731-cvs/gdb/remote.c
putpkt (rs->buf);
getpkt (&rs->buf, &rs->buf_size, 0);
Index: gdb-7.6.50.20130731-cvs/gdb/s390-linux-nat.c
Index: gdb-7.8/gdb/target.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/s390-linux-nat.c 2013-08-02 16:42:29.578632913 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/s390-linux-nat.c 2013-08-02 16:42:34.103639116 +0200
@@ -516,7 +516,7 @@ s390_fix_watch_points (struct lwp_info *
}
static int
-s390_insert_watchpoint (CORE_ADDR addr, int len, int type,
+s390_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
struct lwp_info *lp;
@@ -537,7 +537,7 @@ s390_insert_watchpoint (CORE_ADDR addr,
}
static int
-s390_remove_watchpoint (CORE_ADDR addr, int len, int type,
+s390_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
struct lwp_info *lp;
Index: gdb-7.6.50.20130731-cvs/gdb/target.c
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/target.c 2013-08-02 16:42:29.580632915 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/target.c 2013-08-02 16:42:52.160663787 +0200
@@ -49,7 +49,7 @@ static void target_info (char *, int);
static void default_terminal_info (const char *, int);
--- gdb-7.8.orig/gdb/target.c 2014-08-01 23:27:30.206773707 +0200
+++ gdb-7.8/gdb/target.c 2014-08-01 23:29:38.314944857 +0200
@@ -52,7 +52,7 @@ static void target_info (char *, int);
static void default_terminal_info (struct target_ops *, const char *, int);
static int default_watchpoint_addr_within_range (struct target_ops *,
- CORE_ADDR, CORE_ADDR, int);
+ CORE_ADDR, CORE_ADDR, LONGEST);
static int default_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
@@ -114,10 +114,10 @@ static int debug_to_insert_hw_breakpoint
static int debug_to_remove_hw_breakpoint (struct gdbarch *,
struct bp_target_info *);
-static int debug_to_insert_watchpoint (CORE_ADDR, int, int,
+static int debug_to_insert_watchpoint (CORE_ADDR, LONGEST, int,
struct expression *);
-static int debug_to_remove_watchpoint (CORE_ADDR, int, int,
+static int debug_to_remove_watchpoint (CORE_ADDR, LONGEST, int,
struct expression *);
static int debug_to_stopped_by_watchpoint (void);
@@ -125,11 +125,12 @@ static int debug_to_stopped_by_watchpoin
static int default_region_ok_for_hw_watchpoint (struct target_ops *,
CORE_ADDR, LONGEST);
@@ -150,13 +150,13 @@ static int debug_to_remove_watchpoint (s
static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
static int debug_to_watchpoint_addr_within_range (struct target_ops *,
- CORE_ADDR, CORE_ADDR, int);
+ CORE_ADDR, CORE_ADDR,
+ LONGEST);
+ CORE_ADDR, CORE_ADDR, LONGEST);
static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
static int debug_to_region_ok_for_hw_watchpoint (struct target_ops *self,
CORE_ADDR, LONGEST);
-static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, int, int,
+static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, LONGEST, int,
static int debug_to_can_accel_watchpoint_condition (struct target_ops *self,
- CORE_ADDR, int, int,
+ CORE_ADDR, LONGEST, int,
struct expression *);
static void debug_to_terminal_init (void);
@@ -790,10 +791,10 @@ update_current_target (void)
(int (*) (struct gdbarch *, struct bp_target_info *))
return_minus_one);
de_fault (to_insert_watchpoint,
- (int (*) (CORE_ADDR, int, int, struct expression *))
+ (int (*) (CORE_ADDR, LONGEST, int, struct expression *))
return_minus_one);
de_fault (to_remove_watchpoint,
- (int (*) (CORE_ADDR, int, int, struct expression *))
+ (int (*) (CORE_ADDR, LONGEST, int, struct expression *))
return_minus_one);
de_fault (to_stopped_by_watchpoint,
(int (*) (void))
@@ -806,7 +807,7 @@ update_current_target (void)
de_fault (to_region_ok_for_hw_watchpoint,
default_region_ok_for_hw_watchpoint);
de_fault (to_can_accel_watchpoint_condition,
- (int (*) (CORE_ADDR, int, int, struct expression *))
+ (int (*) (CORE_ADDR, LONGEST, int, struct expression *))
return_zero);
de_fault (to_terminal_init,
(void (*) (void))
@@ -3594,7 +3595,7 @@ default_region_ok_for_hw_watchpoint (COR
static void debug_to_terminal_init (struct target_ops *self);
@@ -2960,7 +2960,7 @@ default_region_ok_for_hw_watchpoint (str
static int
default_watchpoint_addr_within_range (struct target_ops *target,
CORE_ADDR addr,
@ -587,16 +255,16 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.c
{
return addr >= start && addr < start + length;
}
@@ -4555,7 +4556,7 @@ debug_to_region_ok_for_hw_watchpoint (CO
}
@@ -3681,7 +3681,7 @@ debug_to_region_ok_for_hw_watchpoint (st
static int
-debug_to_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
+debug_to_can_accel_watchpoint_condition (CORE_ADDR addr, LONGEST len, int rw,
debug_to_can_accel_watchpoint_condition (struct target_ops *self,
- CORE_ADDR addr, int len, int rw,
+ CORE_ADDR addr, LONGEST len, int rw,
struct expression *cond)
{
int retval;
@@ -4565,8 +4566,8 @@ debug_to_can_accel_watchpoint_condition
@@ -3692,8 +3692,8 @@ debug_to_can_accel_watchpoint_condition
fprintf_unfiltered (gdb_stdlog,
"target_can_accel_watchpoint_condition "
@ -607,7 +275,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.c
host_address_to_string (cond), (unsigned long) retval);
return retval;
}
@@ -4601,7 +4602,7 @@ debug_to_stopped_data_address (struct ta
@@ -3728,7 +3728,7 @@ debug_to_stopped_data_address (struct ta
static int
debug_to_watchpoint_addr_within_range (struct target_ops *target,
CORE_ADDR addr,
@ -616,7 +284,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.c
{
int retval;
@@ -4609,9 +4610,9 @@ debug_to_watchpoint_addr_within_range (s
@@ -3736,9 +3736,9 @@ debug_to_watchpoint_addr_within_range (s
start, length);
fprintf_filtered (gdb_stdlog,
@ -628,72 +296,137 @@ Index: gdb-7.6.50.20130731-cvs/gdb/target.c
return retval;
}
@@ -4646,7 +4647,7 @@ debug_to_remove_hw_breakpoint (struct gd
}
static int
-debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type,
+debug_to_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
int retval;
@@ -4654,14 +4655,14 @@ debug_to_insert_watchpoint (CORE_ADDR ad
retval = debug_target.to_insert_watchpoint (addr, len, type, cond);
fprintf_unfiltered (gdb_stdlog,
- "target_insert_watchpoint (%s, %d, %d, %s) = %ld\n",
- core_addr_to_string (addr), len, type,
+ "target_insert_watchpoint (%s, %s, %d, %s) = %ld\n",
+ core_addr_to_string (addr), plongest (len), type,
host_address_to_string (cond), (unsigned long) retval);
return retval;
}
static int
-debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type,
+debug_to_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
struct expression *cond)
{
int retval;
@@ -4669,8 +4670,8 @@ debug_to_remove_watchpoint (CORE_ADDR ad
retval = debug_target.to_remove_watchpoint (addr, len, type, cond);
fprintf_unfiltered (gdb_stdlog,
- "target_remove_watchpoint (%s, %d, %d, %s) = %ld\n",
- core_addr_to_string (addr), len, type,
+ "target_remove_watchpoint (%s, %s, %d, %s) = %ld\n",
+ core_addr_to_string (addr), plongest (len), type,
host_address_to_string (cond), (unsigned long) retval);
return retval;
}
Index: gdb-7.6.50.20130731-cvs/gdb/target.h
Index: gdb-7.8/gdb/target.h
===================================================================
--- gdb-7.6.50.20130731-cvs.orig/gdb/target.h 2013-08-02 16:42:29.580632915 +0200
+++ gdb-7.6.50.20130731-cvs/gdb/target.h 2013-08-02 16:42:34.105639119 +0200
@@ -373,8 +373,8 @@ struct target_ops
/* Documentation of what the two routines below are expected to do is
provided with the corresponding target_* macros. */
- int (*to_remove_watchpoint) (CORE_ADDR, int, int, struct expression *);
- int (*to_insert_watchpoint) (CORE_ADDR, int, int, struct expression *);
+ int (*to_remove_watchpoint) (CORE_ADDR, LONGEST, int, struct expression *);
+ int (*to_insert_watchpoint) (CORE_ADDR, LONGEST, int, struct expression *);
int (*to_insert_mask_watchpoint) (struct target_ops *,
CORE_ADDR, CORE_ADDR, int);
@@ -385,13 +385,13 @@ struct target_ops
int to_have_continuable_watchpoint;
int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
--- gdb-7.8.orig/gdb/target.h 2014-08-01 23:27:30.207773708 +0200
+++ gdb-7.8/gdb/target.h 2014-08-01 23:29:38.315944839 +0200
@@ -469,7 +469,7 @@ struct target_ops
int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *)
TARGET_DEFAULT_RETURN (0);
int (*to_watchpoint_addr_within_range) (struct target_ops *,
- CORE_ADDR, CORE_ADDR, int);
+ CORE_ADDR, CORE_ADDR, LONGEST);
- CORE_ADDR, CORE_ADDR, int)
+ CORE_ADDR, CORE_ADDR, LONGEST)
TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range);
/* Documentation of this routine is provided with the corresponding
target_* macro. */
int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, LONGEST);
@@ -479,7 +479,7 @@ struct target_ops
TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint);
- int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int,
+ int (*to_can_accel_watchpoint_condition) (CORE_ADDR, LONGEST, int,
struct expression *);
int (*to_can_accel_watchpoint_condition) (struct target_ops *,
- CORE_ADDR, int, int,
+ CORE_ADDR, LONGEST, int,
struct expression *)
TARGET_DEFAULT_RETURN (0);
int (*to_masked_watch_num_registers) (struct target_ops *,
CORE_ADDR, CORE_ADDR);
Index: gdb-7.8/gdb/aarch64-linux-nat.c
===================================================================
--- gdb-7.8.orig/gdb/aarch64-linux-nat.c 2014-08-01 23:27:30.212773715 +0200
+++ gdb-7.8/gdb/aarch64-linux-nat.c 2014-08-01 23:27:30.248773763 +0200
@@ -428,14 +428,14 @@ aarch64_notify_debug_reg_change (const s
static void
aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
const char *func, CORE_ADDR addr,
- int len, int type)
+ LONGEST len, int type)
{
int i;
fprintf_unfiltered (gdb_stdlog, "%s", func);
if (addr || len)
- fprintf_unfiltered (gdb_stdlog, " (addr=0x%08lx, len=%d, type=%s)",
- (unsigned long) addr, len,
+ fprintf_unfiltered (gdb_stdlog, " (addr=0x%08lx, len=%s, type=%s)",
+ (unsigned long) addr, plongest (len),
type == hw_write ? "hw-write-watchpoint"
: (type == hw_read ? "hw-read-watchpoint"
: (type == hw_access ? "hw-access-watchpoint"
@@ -869,9 +869,10 @@ aarch64_linux_read_description (struct t
gdbserver/linux-aarch64-low.c for more information. */
static void
-aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p,
+aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len,
+ CORE_ADDR *aligned_addr_p,
int *aligned_len_p, CORE_ADDR *next_addr_p,
- int *next_len_p)
+ LONGEST *next_len_p)
{
int aligned_len;
unsigned int offset;
@@ -1038,7 +1039,7 @@ aarch64_point_encode_ctrl_reg (int type,
Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise. */
static int
-aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
+aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, LONGEST len)
{
unsigned int alignment = is_watchpoint ? AARCH64_HWP_ALIGNMENT
: AARCH64_HBP_ALIGNMENT;
@@ -1290,7 +1291,7 @@ aarch64_handle_aligned_watchpoint (int t
Return 0 if succeed. */
static int
-aarch64_handle_unaligned_watchpoint (int type, CORE_ADDR addr, int len,
+aarch64_handle_unaligned_watchpoint (int type, CORE_ADDR addr, LONGEST len,
int is_insert)
{
struct aarch64_debug_reg_state *state
@@ -1315,8 +1316,8 @@ aarch64_handle_unaligned_watchpoint (int
fprintf_unfiltered (gdb_stdlog,
"handle_unaligned_watchpoint: is_insert: %d\n"
" aligned_addr: 0x%08lx, aligned_len: %d\n"
-" next_addr: 0x%08lx, next_len: %d\n",
- is_insert, aligned_addr, aligned_len, addr, len);
+" next_addr: 0x%08lx, next_len: %s\n",
+ is_insert, aligned_addr, aligned_len, addr, plongest (len));
if (ret != 0)
return ret;
@@ -1328,7 +1329,7 @@ aarch64_handle_unaligned_watchpoint (int
/* Implements insertion and removal of a single watchpoint. */
static int
-aarch64_handle_watchpoint (int type, CORE_ADDR addr, int len, int is_insert)
+aarch64_handle_watchpoint (int type, CORE_ADDR addr, LONGEST len, int is_insert)
{
if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len))
return aarch64_handle_aligned_watchpoint (type, addr, len, is_insert);
@@ -1497,7 +1498,7 @@ aarch64_linux_stopped_by_watchpoint (str
static int
aarch64_linux_watchpoint_addr_within_range (struct target_ops *target,
CORE_ADDR addr,
- CORE_ADDR start, int length)
+ CORE_ADDR start, LONGEST length)
{
return start <= addr && start + length - 1 >= addr;
}
Index: gdb-7.8/gdb/target-delegates.c
===================================================================
--- gdb-7.8.orig/gdb/target-delegates.c 2014-08-01 23:27:30.212773715 +0200
+++ gdb-7.8/gdb/target-delegates.c 2014-08-01 23:29:38.313944877 +0200
@@ -261,7 +261,7 @@ tdefault_stopped_data_address (struct ta
}
static int
-delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
+delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3)
{
self = self->beneath;
return self->to_watchpoint_addr_within_range (self, arg1, arg2, arg3);
@@ -275,14 +275,14 @@ delegate_region_ok_for_hw_watchpoint (st
}
static int
-delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
+delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4)
{
self = self->beneath;
return self->to_can_accel_watchpoint_condition (self, arg1, arg2, arg3, arg4);
}
static int
-tdefault_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
+tdefault_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4)
{
return 0;
}

View File

@ -137,10 +137,10 @@ Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bitpos-tdep.patch
Index: gdb-7.6.90.20140127/gdb/alpha-tdep.c
Index: gdb-7.7.1/gdb/alpha-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/alpha-tdep.c 2014-02-06 18:20:52.970747716 +0100
+++ gdb-7.6.90.20140127/gdb/alpha-tdep.c 2014-02-06 18:20:57.294752362 +0100
--- gdb-7.7.1.orig/gdb/alpha-tdep.c 2014-05-09 19:24:18.677252769 +0200
+++ gdb-7.7.1/gdb/alpha-tdep.c 2014-05-09 20:02:09.620703767 +0200
@@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *g
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@ -184,10 +184,10 @@ Index: gdb-7.6.90.20140127/gdb/alpha-tdep.c
memcpy (arg_reg_buffer + offset, contents, tlen);
offset += tlen;
contents += tlen;
Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c
Index: gdb-7.7.1/gdb/amd64-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/amd64-tdep.c 2014-02-06 18:20:52.972747718 +0100
+++ gdb-7.6.90.20140127/gdb/amd64-tdep.c 2014-02-06 18:21:51.106810814 +0100
--- gdb-7.7.1.orig/gdb/amd64-tdep.c 2014-05-09 19:24:18.678252770 +0200
+++ gdb-7.7.1/gdb/amd64-tdep.c 2014-05-09 20:02:09.620703767 +0200
@@ -633,7 +633,7 @@ amd64_return_value (struct gdbarch *gdba
gdb_byte *readbuf, const gdb_byte *writebuf)
{
@ -217,10 +217,10 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c
enum amd64_reg_class class[2];
int needed_integer_regs = 0;
int needed_sse_regs = 0;
Index: gdb-7.6.90.20140127/gdb/amd64-windows-tdep.c
Index: gdb-7.7.1/gdb/amd64-windows-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/amd64-windows-tdep.c 2014-02-06 18:20:52.973747720 +0100
+++ gdb-7.6.90.20140127/gdb/amd64-windows-tdep.c 2014-02-06 18:20:57.296752364 +0100
--- gdb-7.7.1.orig/gdb/amd64-windows-tdep.c 2014-05-09 19:24:18.679252770 +0200
+++ gdb-7.7.1/gdb/amd64-windows-tdep.c 2014-05-09 20:02:09.620703767 +0200
@@ -288,7 +288,7 @@ amd64_windows_return_value (struct gdbar
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
@ -230,10 +230,10 @@ Index: gdb-7.6.90.20140127/gdb/amd64-windows-tdep.c
int regnum = -1;
/* See if our value is returned through a register. If it is, then
Index: gdb-7.6.90.20140127/gdb/arm-tdep.c
Index: gdb-7.7.1/gdb/arm-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/arm-tdep.c 2014-02-06 18:20:52.978747725 +0100
+++ gdb-7.6.90.20140127/gdb/arm-tdep.c 2014-02-06 18:20:57.299752367 +0100
--- gdb-7.7.1.orig/gdb/arm-tdep.c 2014-05-09 19:24:18.684252770 +0200
+++ gdb-7.7.1/gdb/arm-tdep.c 2014-05-09 20:02:09.622703768 +0200
@@ -3498,7 +3498,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc
array). Vectors and complex types are not currently supported,
matching the generic AAPCS support. */
@ -308,10 +308,10 @@ Index: gdb-7.6.90.20140127/gdb/arm-tdep.c
struct type *arg_type;
struct type *target_type;
enum type_code typecode;
Index: gdb-7.6.90.20140127/gdb/avr-tdep.c
Index: gdb-7.7.1/gdb/avr-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/avr-tdep.c 2014-02-06 18:20:52.980747727 +0100
+++ gdb-7.6.90.20140127/gdb/avr-tdep.c 2014-02-06 18:20:57.299752367 +0100
--- gdb-7.7.1.orig/gdb/avr-tdep.c 2014-05-09 19:24:18.686252771 +0200
+++ gdb-7.7.1/gdb/avr-tdep.c 2014-05-09 20:02:09.623703768 +0200
@@ -1167,13 +1167,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s
struct stack_item
@ -345,10 +345,10 @@ Index: gdb-7.6.90.20140127/gdb/avr-tdep.c
/* Calculate the potential last register needed. */
last_regnum = regnum - (len + (len & 1));
Index: gdb-7.6.90.20140127/gdb/bfin-tdep.c
Index: gdb-7.7.1/gdb/bfin-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/bfin-tdep.c 2014-02-06 18:20:52.980747727 +0100
+++ gdb-7.6.90.20140127/gdb/bfin-tdep.c 2014-02-06 18:20:57.300752368 +0100
--- gdb-7.7.1.orig/gdb/bfin-tdep.c 2014-05-09 19:24:18.686252771 +0200
+++ gdb-7.7.1/gdb/bfin-tdep.c 2014-05-09 20:02:09.623703768 +0200
@@ -506,7 +506,7 @@ bfin_push_dummy_call (struct gdbarch *gd
gdb_byte buf[4];
int i;
@ -367,10 +367,10 @@ Index: gdb-7.6.90.20140127/gdb/bfin-tdep.c
sp -= container_len;
write_memory (sp, value_contents_writeable (args[i]), container_len);
Index: gdb-7.6.90.20140127/gdb/cris-tdep.c
Index: gdb-7.7.1/gdb/cris-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/cris-tdep.c 2014-02-06 18:20:52.981747728 +0100
+++ gdb-7.6.90.20140127/gdb/cris-tdep.c 2014-02-06 18:20:57.301752369 +0100
--- gdb-7.7.1.orig/gdb/cris-tdep.c 2014-05-09 19:24:18.687252771 +0200
+++ gdb-7.7.1/gdb/cris-tdep.c 2014-05-09 20:02:09.623703768 +0200
@@ -665,13 +665,13 @@ static CORE_ADDR cris_unwind_sp (struct
struct stack_item
@ -405,10 +405,10 @@ Index: gdb-7.6.90.20140127/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.6.90.20140127/gdb/h8300-tdep.c
Index: gdb-7.7.1/gdb/h8300-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/h8300-tdep.c 2014-02-06 18:20:52.981747728 +0100
+++ gdb-7.6.90.20140127/gdb/h8300-tdep.c 2014-02-06 18:20:57.301752369 +0100
--- gdb-7.7.1.orig/gdb/h8300-tdep.c 2014-05-09 19:24:18.688252771 +0200
+++ gdb-7.7.1/gdb/h8300-tdep.c 2014-05-09 20:02:09.624703768 +0200
@@ -640,7 +640,7 @@ h8300_push_dummy_call (struct gdbarch *g
int struct_return, CORE_ADDR struct_addr)
{
@ -441,10 +441,10 @@ Index: gdb-7.6.90.20140127/gdb/h8300-tdep.c
for (offset = 0; offset < padded_len; offset += wordsize)
{
Index: gdb-7.6.90.20140127/gdb/hppa-tdep.c
Index: gdb-7.7.1/gdb/hppa-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/hppa-tdep.c 2014-02-06 18:20:52.982747729 +0100
+++ gdb-7.6.90.20140127/gdb/hppa-tdep.c 2014-02-06 18:20:57.302752371 +0100
--- gdb-7.7.1.orig/gdb/hppa-tdep.c 2014-05-09 19:24:18.690252771 +0200
+++ gdb-7.7.1/gdb/hppa-tdep.c 2014-05-09 20:02:09.624703768 +0200
@@ -961,7 +961,7 @@ hppa64_push_dummy_call (struct gdbarch *
{
struct value *arg = args[i];
@ -463,10 +463,10 @@ Index: gdb-7.6.90.20140127/gdb/hppa-tdep.c
int regnum, offset;
if (len > 16)
Index: gdb-7.6.90.20140127/gdb/i386-darwin-tdep.c
Index: gdb-7.7.1/gdb/i386-darwin-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/i386-darwin-tdep.c 2014-02-06 18:20:52.982747729 +0100
+++ gdb-7.6.90.20140127/gdb/i386-darwin-tdep.c 2014-02-06 18:20:57.302752371 +0100
--- gdb-7.7.1.orig/gdb/i386-darwin-tdep.c 2014-05-09 19:24:18.690252771 +0200
+++ gdb-7.7.1/gdb/i386-darwin-tdep.c 2014-05-09 20:02:09.624703768 +0200
@@ -164,7 +164,7 @@ i386_darwin_push_dummy_call (struct gdba
for (write_pass = 0; write_pass < 2; write_pass++)
@ -476,10 +476,10 @@ Index: gdb-7.6.90.20140127/gdb/i386-darwin-tdep.c
int num_m128 = 0;
if (struct_return)
Index: gdb-7.6.90.20140127/gdb/i386-tdep.c
Index: gdb-7.7.1/gdb/i386-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/i386-tdep.c 2014-02-06 18:20:52.985747732 +0100
+++ gdb-7.6.90.20140127/gdb/i386-tdep.c 2014-02-06 18:20:57.303752372 +0100
--- gdb-7.7.1.orig/gdb/i386-tdep.c 2014-05-09 19:24:18.692252771 +0200
+++ gdb-7.7.1/gdb/i386-tdep.c 2014-05-09 20:02:09.625703769 +0200
@@ -2473,7 +2473,7 @@ i386_push_dummy_call (struct gdbarch *gd
gdb_byte buf[4];
int i;
@ -543,10 +543,10 @@ Index: gdb-7.6.90.20140127/gdb/i386-tdep.c
if (i386_fp_regnum_p (get_frame_arch (frame), regnum))
{
Index: gdb-7.6.90.20140127/gdb/ia64-tdep.c
Index: gdb-7.7.1/gdb/ia64-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/ia64-tdep.c 2014-02-06 18:20:52.986747733 +0100
+++ gdb-7.6.90.20140127/gdb/ia64-tdep.c 2014-02-06 18:20:57.304752373 +0100
--- gdb-7.7.1.orig/gdb/ia64-tdep.c 2014-05-09 19:24:18.693252771 +0200
+++ gdb-7.7.1/gdb/ia64-tdep.c 2014-05-09 20:02:09.626703769 +0200
@@ -3851,8 +3851,10 @@ ia64_push_dummy_call (struct gdbarch *gd
int argno;
struct value *arg;
@ -560,10 +560,10 @@ Index: gdb-7.6.90.20140127/gdb/ia64-tdep.c
int floatreg;
ULONGEST bsp;
CORE_ADDR funcdescaddr, pc, global_pointer;
Index: gdb-7.6.90.20140127/gdb/iq2000-tdep.c
Index: gdb-7.7.1/gdb/iq2000-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/iq2000-tdep.c 2014-02-06 18:20:52.986747733 +0100
+++ gdb-7.6.90.20140127/gdb/iq2000-tdep.c 2014-02-06 18:20:57.304752373 +0100
--- gdb-7.7.1.orig/gdb/iq2000-tdep.c 2014-05-09 19:24:18.693252771 +0200
+++ gdb-7.7.1/gdb/iq2000-tdep.c 2014-05-09 20:02:09.626703769 +0200
@@ -654,8 +654,9 @@ iq2000_push_dummy_call (struct gdbarch *
const bfd_byte *val;
bfd_byte buf[4];
@ -576,10 +576,10 @@ Index: gdb-7.6.90.20140127/gdb/iq2000-tdep.c
/* Used to copy struct arguments into the stack. */
CORE_ADDR struct_ptr;
Index: gdb-7.6.90.20140127/gdb/m32r-tdep.c
Index: gdb-7.7.1/gdb/m32r-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/m32r-tdep.c 2014-02-06 18:20:52.986747733 +0100
+++ gdb-7.6.90.20140127/gdb/m32r-tdep.c 2014-02-06 18:20:57.304752373 +0100
--- gdb-7.7.1.orig/gdb/m32r-tdep.c 2014-05-09 19:24:18.693252771 +0200
+++ gdb-7.7.1/gdb/m32r-tdep.c 2014-05-09 20:02:09.626703769 +0200
@@ -689,7 +689,7 @@ m32r_push_dummy_call (struct gdbarch *gd
CORE_ADDR regval;
gdb_byte *val;
@ -589,10 +589,10 @@ Index: gdb-7.6.90.20140127/gdb/m32r-tdep.c
/* First force sp to a 4-byte alignment. */
sp = sp & ~3;
Index: gdb-7.6.90.20140127/gdb/m68k-tdep.c
Index: gdb-7.7.1/gdb/m68k-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/m68k-tdep.c 2014-02-06 18:20:52.987747735 +0100
+++ gdb-7.6.90.20140127/gdb/m68k-tdep.c 2014-02-06 18:20:57.305752374 +0100
--- gdb-7.7.1.orig/gdb/m68k-tdep.c 2014-05-09 19:24:18.694252771 +0200
+++ gdb-7.7.1/gdb/m68k-tdep.c 2014-05-09 20:02:09.627703769 +0200
@@ -384,7 +384,7 @@ m68k_reg_struct_return_p (struct gdbarch
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@ -615,10 +615,10 @@ Index: gdb-7.6.90.20140127/gdb/m68k-tdep.c
/* Non-scalars bigger than 4 bytes are left aligned, others are
right aligned. */
Index: gdb-7.6.90.20140127/gdb/m88k-tdep.c
Index: gdb-7.7.1/gdb/m88k-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/m88k-tdep.c 2014-02-06 18:20:52.987747735 +0100
+++ gdb-7.6.90.20140127/gdb/m88k-tdep.c 2014-02-06 18:20:57.305752374 +0100
--- gdb-7.7.1.orig/gdb/m88k-tdep.c 2014-05-09 19:24:18.694252771 +0200
+++ gdb-7.7.1/gdb/m88k-tdep.c 2014-05-09 20:02:09.627703769 +0200
@@ -260,13 +260,13 @@ m88k_store_arguments (struct regcache *r
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
@ -646,10 +646,10 @@ Index: gdb-7.6.90.20140127/gdb/m88k-tdep.c
if (m88k_in_register_p (type))
{
Index: gdb-7.6.90.20140127/gdb/mep-tdep.c
Index: gdb-7.7.1/gdb/mep-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/mep-tdep.c 2014-02-06 18:20:52.987747735 +0100
+++ gdb-7.6.90.20140127/gdb/mep-tdep.c 2014-02-06 18:20:57.306752375 +0100
--- gdb-7.7.1.orig/gdb/mep-tdep.c 2014-05-09 19:24:18.695252772 +0200
+++ gdb-7.7.1/gdb/mep-tdep.c 2014-05-09 20:02:09.627703769 +0200
@@ -2272,7 +2272,7 @@ push_large_arguments (CORE_ADDR sp, int
for (i = 0; i < argc; i++)
@ -659,10 +659,10 @@ Index: gdb-7.6.90.20140127/gdb/mep-tdep.c
if (arg_len > MEP_GPR_SIZE)
{
Index: gdb-7.6.90.20140127/gdb/mips-tdep.c
Index: gdb-7.7.1/gdb/mips-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/mips-tdep.c 2014-02-06 18:20:52.990747738 +0100
+++ gdb-7.6.90.20140127/gdb/mips-tdep.c 2014-02-06 18:20:57.307752376 +0100
--- gdb-7.7.1.orig/gdb/mips-tdep.c 2014-05-09 19:24:18.698252772 +0200
+++ gdb-7.7.1/gdb/mips-tdep.c 2014-05-09 20:02:09.628703769 +0200
@@ -402,7 +402,7 @@ static void
mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_num, int length,
@ -808,10 +808,10 @@ Index: gdb-7.6.90.20140127/gdb/mips-tdep.c
val = value_contents (arg);
Index: gdb-7.6.90.20140127/gdb/mn10300-tdep.c
Index: gdb-7.7.1/gdb/mn10300-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/mn10300-tdep.c 2014-02-06 18:20:52.991747739 +0100
+++ gdb-7.6.90.20140127/gdb/mn10300-tdep.c 2014-02-06 18:20:57.308752377 +0100
--- gdb-7.7.1.orig/gdb/mn10300-tdep.c 2014-05-09 19:24:18.698252772 +0200
+++ gdb-7.7.1/gdb/mn10300-tdep.c 2014-05-09 20:02:09.629703770 +0200
@@ -1227,7 +1227,7 @@ mn10300_push_dummy_call (struct gdbarch
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const int push_size = register_size (gdbarch, E_PC_REGNUM);
@ -821,10 +821,10 @@ Index: gdb-7.6.90.20140127/gdb/mn10300-tdep.c
int stack_offset = 0;
int argnum;
const gdb_byte *val;
Index: gdb-7.6.90.20140127/gdb/mt-tdep.c
Index: gdb-7.7.1/gdb/mt-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/mt-tdep.c 2014-02-06 18:20:52.991747739 +0100
+++ gdb-7.6.90.20140127/gdb/mt-tdep.c 2014-02-06 18:20:57.308752377 +0100
--- gdb-7.7.1.orig/gdb/mt-tdep.c 2014-05-09 19:24:18.699252772 +0200
+++ gdb-7.7.1/gdb/mt-tdep.c 2014-05-09 20:02:09.629703770 +0200
@@ -783,9 +783,9 @@ mt_push_dummy_call (struct gdbarch *gdba
gdb_byte buf[MT_MAX_STRUCT_SIZE];
int argreg = MT_1ST_ARGREG;
@ -837,10 +837,10 @@ Index: gdb-7.6.90.20140127/gdb/mt-tdep.c
int i, j;
/* First handle however many args we can fit into MT_1ST_ARGREG thru
Index: gdb-7.6.90.20140127/gdb/ppc-sysv-tdep.c
Index: gdb-7.7.1/gdb/ppc-sysv-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/ppc-sysv-tdep.c 2014-02-06 18:20:52.992747740 +0100
+++ gdb-7.6.90.20140127/gdb/ppc-sysv-tdep.c 2014-02-06 18:20:57.308752377 +0100
--- gdb-7.7.1.orig/gdb/ppc-sysv-tdep.c 2014-05-09 19:24:18.699252772 +0200
+++ gdb-7.7.1/gdb/ppc-sysv-tdep.c 2014-05-09 20:10:13.994807709 +0200
@@ -68,7 +68,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
@ -871,36 +871,24 @@ Index: gdb-7.6.90.20140127/gdb/ppc-sysv-tdep.c
const bfd_byte *val = value_contents (arg);
if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8
@@ -1613,14 +1613,14 @@ ppc64_sysv_abi_push_dummy_call (struct g
}
else
{
- int byte;
+ ssize_t byte;
for (byte = 0; byte < TYPE_LENGTH (type);
byte += tdep->wordsize)
{
if (write_pass && greg <= 10)
{
gdb_byte regval[MAX_REGISTER_SIZE];
- int len = TYPE_LENGTH (type) - byte;
+ ssize_t len = TYPE_LENGTH (type) - byte;
if (len > tdep->wordsize)
len = tdep->wordsize;
memset (regval, 0, sizeof regval);
@@ -1648,7 +1648,7 @@ ppc64_sysv_abi_push_dummy_call (struct g
register. Work around this by always writing the
value to memory. Fortunately, doing this
simplifies the code. */
- int len = TYPE_LENGTH (type);
+ ssize_t len = TYPE_LENGTH (type);
if (len < tdep->wordsize)
write_memory (gparam + tdep->wordsize - len, val, len);
else
Index: gdb-7.6.90.20140127/gdb/rl78-tdep.c
@@ -1285,11 +1285,11 @@ struct ppc64_sysv_argpos
static void
ppc64_sysv_abi_push_val (struct gdbarch *gdbarch,
- const bfd_byte *val, int len, int align,
+ const bfd_byte *val, ssize_t len, int align,
struct ppc64_sysv_argpos *argpos)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- int offset = 0;
+ ssize_t offset = 0;
/* Enforce alignment of stack location, if requested. */
if (align > tdep->wordsize)
Index: gdb-7.7.1/gdb/rl78-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/rl78-tdep.c 2014-02-06 18:20:52.992747740 +0100
+++ gdb-7.6.90.20140127/gdb/rl78-tdep.c 2014-02-06 18:20:57.309752378 +0100
--- gdb-7.7.1.orig/gdb/rl78-tdep.c 2014-05-09 19:24:18.700252772 +0200
+++ gdb-7.7.1/gdb/rl78-tdep.c 2014-05-09 20:02:09.630703770 +0200
@@ -1052,8 +1052,8 @@ rl78_push_dummy_call (struct gdbarch *gd
for (i = nargs - 1; i >= 0; i--)
{
@ -912,10 +900,10 @@ Index: gdb-7.6.90.20140127/gdb/rl78-tdep.c
sp -= container_len;
write_memory (rl78_make_data_address (sp),
Index: gdb-7.6.90.20140127/gdb/rs6000-aix-tdep.c
Index: gdb-7.7.1/gdb/rs6000-aix-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/rs6000-aix-tdep.c 2014-02-06 18:20:52.993747741 +0100
+++ gdb-7.6.90.20140127/gdb/rs6000-aix-tdep.c 2014-02-06 18:20:57.309752378 +0100
--- gdb-7.7.1.orig/gdb/rs6000-aix-tdep.c 2014-05-09 19:24:18.700252772 +0200
+++ gdb-7.7.1/gdb/rs6000-aix-tdep.c 2014-05-09 20:02:09.630703770 +0200
@@ -196,9 +196,9 @@ rs6000_push_dummy_call (struct gdbarch *
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@ -937,10 +925,10 @@ Index: gdb-7.6.90.20140127/gdb/rs6000-aix-tdep.c
if (argbytes)
{
Index: gdb-7.6.90.20140127/gdb/s390-linux-tdep.c
Index: gdb-7.7.1/gdb/s390-linux-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/s390-linux-tdep.c 2014-02-06 18:20:52.993747741 +0100
+++ gdb-7.6.90.20140127/gdb/s390-linux-tdep.c 2014-02-06 18:22:17.330838389 +0100
--- gdb-7.7.1.orig/gdb/s390-linux-tdep.c 2014-05-09 19:24:18.701252772 +0200
+++ gdb-7.7.1/gdb/s390-linux-tdep.c 2014-05-09 20:02:09.631703770 +0200
@@ -2526,7 +2526,7 @@ is_float_like (struct type *type)
@ -959,10 +947,10 @@ Index: gdb-7.6.90.20140127/gdb/s390-linux-tdep.c
if (s390_function_arg_pass_by_reference (type))
{
Index: gdb-7.6.90.20140127/gdb/score-tdep.c
Index: gdb-7.7.1/gdb/score-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/score-tdep.c 2014-02-06 18:20:52.994747742 +0100
+++ gdb-7.6.90.20140127/gdb/score-tdep.c 2014-02-06 18:20:57.310752379 +0100
--- gdb-7.7.1.orig/gdb/score-tdep.c 2014-05-09 19:24:18.701252772 +0200
+++ gdb-7.7.1/gdb/score-tdep.c 2014-05-09 20:02:09.631703770 +0200
@@ -515,7 +515,7 @@ score_push_dummy_call (struct gdbarch *g
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int argnum;
@ -972,10 +960,10 @@ Index: gdb-7.6.90.20140127/gdb/score-tdep.c
CORE_ADDR stack_offset = 0;
CORE_ADDR addr = 0;
Index: gdb-7.6.90.20140127/gdb/sh-tdep.c
Index: gdb-7.7.1/gdb/sh-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/sh-tdep.c 2014-02-06 18:20:52.995747743 +0100
+++ gdb-7.6.90.20140127/gdb/sh-tdep.c 2014-02-06 18:20:57.310752379 +0100
--- gdb-7.7.1.orig/gdb/sh-tdep.c 2014-05-09 19:24:18.702252772 +0200
+++ gdb-7.7.1/gdb/sh-tdep.c 2014-05-09 20:02:09.631703770 +0200
@@ -807,7 +807,7 @@ sh_skip_prologue (struct gdbarch *gdbarc
static int
sh_use_struct_convention (int renesas_abi, struct type *type)
@ -1014,10 +1002,10 @@ Index: gdb-7.6.90.20140127/gdb/sh-tdep.c
int pass_on_stack = 0;
int last_reg_arg = INT_MAX;
Index: gdb-7.6.90.20140127/gdb/sh64-tdep.c
Index: gdb-7.7.1/gdb/sh64-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/sh64-tdep.c 2014-02-06 18:20:52.995747743 +0100
+++ gdb-7.6.90.20140127/gdb/sh64-tdep.c 2014-02-06 18:20:57.311752380 +0100
--- gdb-7.7.1.orig/gdb/sh64-tdep.c 2014-05-09 19:24:18.702252772 +0200
+++ gdb-7.7.1/gdb/sh64-tdep.c 2014-05-09 20:02:09.632703771 +0200
@@ -1058,7 +1058,7 @@ sh64_push_dummy_call (struct gdbarch *gd
CORE_ADDR struct_addr)
{
@ -1036,10 +1024,10 @@ Index: gdb-7.6.90.20140127/gdb/sh64-tdep.c
int argreg_size;
int fp_args[12];
Index: gdb-7.6.90.20140127/gdb/sparc-tdep.c
Index: gdb-7.7.1/gdb/sparc-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/sparc-tdep.c 2014-02-06 18:20:52.996747744 +0100
+++ gdb-7.6.90.20140127/gdb/sparc-tdep.c 2014-02-06 18:20:57.311752380 +0100
--- gdb-7.7.1.orig/gdb/sparc-tdep.c 2014-05-09 19:24:18.703252772 +0200
+++ gdb-7.7.1/gdb/sparc-tdep.c 2014-05-09 20:02:09.632703771 +0200
@@ -502,7 +502,7 @@ sparc32_store_arguments (struct regcache
for (i = 0; i < nargs; i++)
{
@ -1049,10 +1037,10 @@ Index: gdb-7.6.90.20140127/gdb/sparc-tdep.c
if (sparc_structure_or_union_p (type)
|| (sparc_floating_p (type) && len == 16)
Index: gdb-7.6.90.20140127/gdb/sparc64-tdep.c
Index: gdb-7.7.1/gdb/sparc64-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/sparc64-tdep.c 2014-02-06 18:20:52.996747744 +0100
+++ gdb-7.6.90.20140127/gdb/sparc64-tdep.c 2014-02-06 18:20:57.311752380 +0100
--- gdb-7.7.1.orig/gdb/sparc64-tdep.c 2014-05-09 19:24:18.704252773 +0200
+++ gdb-7.7.1/gdb/sparc64-tdep.c 2014-05-09 20:02:09.632703771 +0200
@@ -639,7 +639,8 @@ sparc64_16_byte_align_p (struct type *ty
static void
@ -1108,10 +1096,10 @@ Index: gdb-7.6.90.20140127/gdb/sparc64-tdep.c
int regnum = -1;
gdb_byte buf[16];
Index: gdb-7.6.90.20140127/gdb/spu-tdep.c
Index: gdb-7.7.1/gdb/spu-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/spu-tdep.c 2014-02-06 18:20:52.997747745 +0100
+++ gdb-7.6.90.20140127/gdb/spu-tdep.c 2014-02-06 18:20:57.312752381 +0100
--- gdb-7.7.1.orig/gdb/spu-tdep.c 2014-05-09 19:24:18.704252773 +0200
+++ gdb-7.7.1/gdb/spu-tdep.c 2014-05-09 20:02:09.633703771 +0200
@@ -1376,7 +1376,7 @@ spu_push_dummy_call (struct gdbarch *gdb
struct value *arg = args[i];
struct type *type = check_typedef (value_type (arg));
@ -1130,10 +1118,10 @@ Index: gdb-7.6.90.20140127/gdb/spu-tdep.c
int preferred_slot;
if (spu_scalar_value_p (type))
Index: gdb-7.6.90.20140127/gdb/tic6x-tdep.c
Index: gdb-7.7.1/gdb/tic6x-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/tic6x-tdep.c 2014-02-06 18:20:52.997747745 +0100
+++ gdb-7.6.90.20140127/gdb/tic6x-tdep.c 2014-02-06 18:20:57.312752381 +0100
--- gdb-7.7.1.orig/gdb/tic6x-tdep.c 2014-05-09 19:24:18.705252773 +0200
+++ gdb-7.7.1/gdb/tic6x-tdep.c 2014-05-09 20:02:09.633703771 +0200
@@ -896,7 +896,7 @@ tic6x_push_dummy_call (struct gdbarch *g
int argreg = 0;
int argnum;
@ -1171,10 +1159,10 @@ Index: gdb-7.6.90.20140127/gdb/tic6x-tdep.c
addr = sp + stack_offset;
write_memory (addr, val, len);
Index: gdb-7.6.90.20140127/gdb/tilegx-tdep.c
Index: gdb-7.7.1/gdb/tilegx-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/tilegx-tdep.c 2014-02-06 18:20:52.998747746 +0100
+++ gdb-7.6.90.20140127/gdb/tilegx-tdep.c 2014-02-06 18:20:57.312752381 +0100
--- gdb-7.7.1.orig/gdb/tilegx-tdep.c 2014-05-09 19:24:18.705252773 +0200
+++ gdb-7.7.1/gdb/tilegx-tdep.c 2014-05-09 20:02:09.633703771 +0200
@@ -290,7 +290,7 @@ tilegx_push_dummy_call (struct gdbarch *
CORE_ADDR stack_dest = sp;
int argreg = TILEGX_R0_REGNUM;
@ -1184,10 +1172,10 @@ Index: gdb-7.6.90.20140127/gdb/tilegx-tdep.c
static const gdb_byte four_zero_words[16] = { 0 };
/* If struct_return is 1, then the struct return address will
Index: gdb-7.6.90.20140127/gdb/v850-tdep.c
Index: gdb-7.7.1/gdb/v850-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/v850-tdep.c 2014-02-06 18:20:52.998747746 +0100
+++ gdb-7.6.90.20140127/gdb/v850-tdep.c 2014-02-06 18:20:57.313752383 +0100
--- gdb-7.7.1.orig/gdb/v850-tdep.c 2014-05-09 19:24:18.705252773 +0200
+++ gdb-7.7.1/gdb/v850-tdep.c 2014-05-09 20:02:09.634703771 +0200
@@ -1021,7 +1021,7 @@ v850_push_dummy_call (struct gdbarch *gd
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int argreg;
@ -1206,10 +1194,10 @@ Index: gdb-7.6.90.20140127/gdb/v850-tdep.c
gdb_byte *val;
gdb_byte valbuf[v850_reg_size];
Index: gdb-7.6.90.20140127/gdb/vax-tdep.c
Index: gdb-7.7.1/gdb/vax-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/vax-tdep.c 2014-02-06 18:20:52.998747746 +0100
+++ gdb-7.6.90.20140127/gdb/vax-tdep.c 2014-02-06 18:20:57.313752383 +0100
--- gdb-7.7.1.orig/gdb/vax-tdep.c 2014-05-09 19:24:18.706252773 +0200
+++ gdb-7.7.1/gdb/vax-tdep.c 2014-05-09 20:02:09.634703771 +0200
@@ -115,7 +115,7 @@ vax_store_arguments (struct regcache *re
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@ -1228,10 +1216,10 @@ Index: gdb-7.6.90.20140127/gdb/vax-tdep.c
sp -= (len + 3) & ~3;
count += (len + 3) / 4;
Index: gdb-7.6.90.20140127/gdb/xstormy16-tdep.c
Index: gdb-7.7.1/gdb/xstormy16-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/xstormy16-tdep.c 2014-02-06 18:20:52.999747748 +0100
+++ gdb-7.6.90.20140127/gdb/xstormy16-tdep.c 2014-02-06 18:20:57.313752383 +0100
--- gdb-7.7.1.orig/gdb/xstormy16-tdep.c 2014-05-09 19:24:18.706252773 +0200
+++ gdb-7.7.1/gdb/xstormy16-tdep.c 2014-05-09 20:02:09.634703771 +0200
@@ -235,8 +235,9 @@ xstormy16_push_dummy_call (struct gdbarc
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR stack_dest = sp;
@ -1244,10 +1232,10 @@ Index: gdb-7.6.90.20140127/gdb/xstormy16-tdep.c
const gdb_byte *val;
gdb_byte buf[xstormy16_pc_size];
Index: gdb-7.6.90.20140127/gdb/xtensa-tdep.c
Index: gdb-7.7.1/gdb/xtensa-tdep.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/xtensa-tdep.c 2014-02-06 18:20:53.000747749 +0100
+++ gdb-7.6.90.20140127/gdb/xtensa-tdep.c 2014-02-06 18:20:57.314752384 +0100
--- gdb-7.7.1.orig/gdb/xtensa-tdep.c 2014-05-09 19:24:18.707252773 +0200
+++ gdb-7.7.1/gdb/xtensa-tdep.c 2014-05-09 20:02:09.634703771 +0200
@@ -1652,8 +1652,7 @@ xtensa_store_return_value (struct type *
if (len > (callsize > 8 ? 8 : 16))

View File

@ -47,11 +47,11 @@ Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=f77-bounds.patch
Index: gdb-7.5.50.20130118/gdb/f-lang.h
Index: gdb-7.7.90.20140613/gdb/f-lang.h
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/f-lang.h 2013-01-18 23:39:40.209500968 +0100
+++ gdb-7.5.50.20130118/gdb/f-lang.h 2013-01-18 23:40:04.010531177 +0100
@@ -65,9 +65,9 @@ struct common_block
--- gdb-7.7.90.20140613.orig/gdb/f-lang.h 2014-06-16 22:45:00.404470944 +0200
+++ gdb-7.7.90.20140613/gdb/f-lang.h 2014-06-16 22:45:10.352477761 +0200
@@ -62,9 +62,9 @@ struct common_block
struct symbol *contents[1];
};
@ -63,11 +63,11 @@ Index: gdb-7.5.50.20130118/gdb/f-lang.h
extern void f77_get_dynamic_array_length (struct type *);
Index: gdb-7.5.50.20130118/gdb/f-typeprint.c
Index: gdb-7.7.90.20140613/gdb/f-typeprint.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/f-typeprint.c 2013-01-18 23:39:37.564497620 +0100
+++ gdb-7.5.50.20130118/gdb/f-typeprint.c 2013-01-18 23:39:40.210500970 +0100
@@ -180,7 +180,7 @@ f_type_print_varspec_suffix (struct type
--- gdb-7.7.90.20140613.orig/gdb/f-typeprint.c 2014-06-16 22:45:00.404470944 +0200
+++ gdb-7.7.90.20140613/gdb/f-typeprint.c 2014-06-16 22:45:10.353477761 +0200
@@ -161,7 +161,7 @@ f_type_print_varspec_suffix (struct type
int show, int passed_a_ptr, int demangled_args,
int arrayprint_recurse_level)
{
@ -76,25 +76,25 @@ Index: gdb-7.5.50.20130118/gdb/f-typeprint.c
/* No static variables are permitted as an error call may occur during
execution of this function. */
@@ -210,7 +210,7 @@ f_type_print_varspec_suffix (struct type
@@ -195,7 +195,7 @@ f_type_print_varspec_suffix (struct type
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 '*'. */
@@ -220,7 +220,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));
}
/* Make sure that, if we have an assumed size array, we
print out a warning and print the upperbound as '*'. */
@@ -205,7 +205,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)
@@ -288,7 +288,7 @@ void
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
@@ -274,7 +274,7 @@ void
f_type_print_base (struct type *type, struct ui_file *stream, int show,
int level)
{
@ -103,7 +103,7 @@ Index: gdb-7.5.50.20130118/gdb/f-typeprint.c
int index;
QUIT;
@@ -370,7 +370,7 @@ f_type_print_base (struct type *type, st
@@ -356,7 +356,7 @@ f_type_print_base (struct type *type, st
else
{
upper_bound = f77_get_upperbound (type);
@ -112,20 +112,20 @@ Index: gdb-7.5.50.20130118/gdb/f-typeprint.c
}
break;
Index: gdb-7.5.50.20130118/gdb/f-valprint.c
Index: gdb-7.7.90.20140613/gdb/f-valprint.c
===================================================================
--- gdb-7.5.50.20130118.orig/gdb/f-valprint.c 2013-01-18 23:39:37.564497620 +0100
+++ gdb-7.5.50.20130118/gdb/f-valprint.c 2013-01-18 23:39:40.210500970 +0100
@@ -57,7 +57,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN
#define F77_DIM_BYTE_STRIDE(n) (f77_array_offset_tbl[n][0])
--- gdb-7.7.90.20140613.orig/gdb/f-valprint.c 2014-06-16 22:45:34.901495069 +0200
+++ gdb-7.7.90.20140613/gdb/f-valprint.c 2014-06-16 22:45:44.933502067 +0200
@@ -46,7 +46,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN
/* 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. */
-int
+LONGEST
f77_get_lowerbound (struct type *type)
{
f_object_address_data_valid_or_error (type);
@@ -68,7 +68,7 @@ f77_get_lowerbound (struct type *type)
if (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED (type))
@@ -55,7 +55,7 @@ f77_get_lowerbound (struct type *type)
return TYPE_ARRAY_LOWER_BOUND_VALUE (type);
}
@ -133,24 +133,4 @@ Index: gdb-7.5.50.20130118/gdb/f-valprint.c
+LONGEST
f77_get_upperbound (struct type *type)
{
f_object_address_data_valid_or_error (type);
@@ -92,8 +92,8 @@ f77_get_upperbound (struct type *type)
static void
f77_get_dynamic_length_of_aggregate (struct type *type)
{
- int upper_bound = -1;
- int lower_bound = 1;
+ LONGEST upper_bound = -1;
+ LONGEST lower_bound = 1;
/* Recursively go all the way down into a possibly multi-dimensional
F77 array and get the bounds. For simple arrays, this is pretty
@@ -128,7 +128,7 @@ f77_create_arrayprint_offset_tbl (struct
struct type *tmp_type;
LONGEST eltlen;
int ndimen = 1;
- int upper, lower;
+ LONGEST upper, lower;
tmp_type = type;
if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))

View File

@ -1,431 +0,0 @@
Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
the default gcc and gfortran binaries are from gcc-4.1.
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/vla.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.base/vla.exp 2014-02-06 18:26:05.115083077 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/vla.exp 2014-02-06 18:26:06.689084765 +0100
@@ -16,7 +16,25 @@
set testfile vla
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+# Temporarily provide compiler=gcc44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists compiler] {
+ set old_compiler [board_info $board compiler]
+ unset_board_info compiler
+} elseif [info exists old_compiler] {
+ unset old_compiler
+}
+set_board_info compiler gcc44
+
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug quiet}]
+
+unset_board_info compiler
+if [info exists old_compiler] {
+ set_board_info compiler $old_compiler
+}
+
+if { $err != "" } {
untested "Couldn't compile test program"
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/break-interp.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.base/break-interp.exp 2014-02-06 18:26:05.116083078 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/break-interp.exp 2014-02-06 18:26:06.689084765 +0100
@@ -34,9 +34,29 @@ if [get_compiler_info] {
return -1
}
+# Temporarily provide compiler=gcc44 saving the original value around.
+# RHEL-5 workaround of its:
+# gcc: -soname: linker input file unused because linking not done
+
+set board [target_info name]
+if [board_info $board exists compiler] {
+ set old_compiler [board_info $board compiler]
+ unset_board_info compiler
+} elseif [info exists old_compiler] {
+ unset old_compiler
+}
+set_board_info compiler gcc44
+
# Use -soname so that the new library gets copied by build_executable_own_libs.
-if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]] != ""} {
+set err [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]]
+
+unset_board_info compiler
+if [info exists old_compiler] {
+ set_board_info compiler $old_compiler
+}
+
+if { $err != "" } {
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/common-block.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/common-block.exp 2014-02-06 18:26:05.116083078 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/common-block.exp 2014-02-06 18:26:06.690084760 +0100
@@ -22,8 +22,25 @@ if {[skip_fortran_tests]} {
standard_testfile .f90
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
- $srcfile {debug f90 quiet}]} {
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
+}
+set_board_info f90compiler gfortran44
+
+set err [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug f90 quiet}]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if {$err} {
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/dwarf-stride.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2014-02-06 18:26:05.117083079 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2014-02-06 18:26:06.690084760 +0100
@@ -27,7 +27,25 @@
set testfile dwarf-stride
set srcfile ${testfile}.f90
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
+}
+set_board_info f90compiler gfortran44
+
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if $err {
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/dynamic.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2014-02-06 18:26:05.117083079 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/dynamic.exp 2014-02-06 18:26:06.690084760 +0100
@@ -25,7 +25,25 @@ set testfile "dynamic"
set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
+}
+set_board_info f90compiler gfortran44
+
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if { $err != "" } {
untested "Couldn't compile ${srcfile}"
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/library-module.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/library-module.exp 2014-02-06 18:26:05.117083079 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/library-module.exp 2014-02-06 18:26:06.690084760 +0100
@@ -23,16 +23,34 @@ if [get_compiler_info] {
return -1
}
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}] != "" } {
- untested "Couldn't compile ${srclibfile}"
- return -1
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
}
+set_board_info f90compiler gfortran44
# prepare_for_testing cannot be used as linking with $libfile cannot be passed
# just for the linking phase (and not the source compilation phase). And any
# warnings on ignored $libfile abort the process.
-if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug f90 shlib=$libfile]] != "" } {
+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}]
+set err2 [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug f90 shlib=$libfile]]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if { $err1 != "" } {
+ untested "Couldn't compile ${srclibfile}"
+ return -1
+}
+if { $err2 != "" } {
untested "Couldn't compile ${srcfile}"
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/module.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/module.exp 2014-02-06 18:26:05.118083080 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/module.exp 2014-02-06 18:26:06.690084760 +0100
@@ -15,7 +15,25 @@
standard_testfile .f90
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } {
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
+}
+set_board_info f90compiler gfortran44
+
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if $err {
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/string.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/string.exp 2014-02-06 18:26:05.118083080 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/string.exp 2014-02-06 18:26:06.691084763 +0100
@@ -23,7 +23,25 @@ set testfile "string"
set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
+}
+set_board_info f90compiler gfortran44
+
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if { $err != "" } {
untested "Couldn't compile ${srcfile}"
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/omp-step.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2014-02-06 18:26:05.118083080 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/omp-step.exp 2014-02-06 18:26:06.691084763 +0100
@@ -15,7 +15,26 @@
set testfile "omp-step"
set srcfile ${testfile}.f90
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
+
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
+}
+set_board_info f90compiler gfortran44
+
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90 additional_flags=-fopenmp}]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if $err {
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/derived-type.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2014-02-06 18:26:05.119083082 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/derived-type.exp 2014-02-06 18:26:06.691084763 +0100
@@ -22,7 +22,25 @@ if { [skip_fortran_tests] } { return -1
standard_testfile .f90
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
+}
+set_board_info f90compiler gfortran44
+
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if $err {
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/subarray.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.fortran/subarray.exp 2014-02-06 18:26:05.119083082 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.fortran/subarray.exp 2014-02-06 18:26:06.691084763 +0100
@@ -22,7 +22,25 @@ if { [skip_fortran_tests] } { return -1
standard_testfile .f
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists f90compiler] {
+ set old_f90compiler [board_info $board f90compiler]
+ unset_board_info f90compiler
+} elseif [info exists old_f90compiler] {
+ unset old_f90compiler
+}
+set_board_info f90compiler gfortran44
+
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
+
+unset_board_info f90compiler
+if [info exists old_f90compiler] {
+ set_board_info f90compiler $old_f90compiler
+}
+
+if $err {
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/tls-sepdebug.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2014-02-06 18:26:05.119083082 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2014-02-06 18:26:06.691084763 +0100
@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
# FIXME: gcc dependency (-Wl,-soname).
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
+# Temporarily provide compiler=gcc44 saving the original value around.
+
+set board [target_info name]
+if [board_info $board exists compiler] {
+ set old_compiler [board_info $board compiler]
+ unset_board_info compiler
+} elseif [info exists old_compiler] {
+ unset old_compiler
+}
+set_board_info compiler gcc44
+
+set err [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]]
+
+unset_board_info compiler
+if [info exists old_compiler] {
+ set_board_info compiler $old_compiler
+}
+
+if { $err != "" } {
untested "Couldn't compile test library"
return -1
}
Index: gdb-7.6.90.20140127/gdb/testsuite/lib/prelink-support.exp
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/prelink-support.exp 2014-02-06 18:26:06.692084767 +0100
+++ gdb-7.6.90.20140127/gdb/testsuite/lib/prelink-support.exp 2014-02-06 18:27:44.960190192 +0100
@@ -118,9 +118,31 @@ proc file_copy {src dest} {
proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} {
global subdir
- if {[build_executable $testname $executable $sources $options] == -1} {
- return ""
+ # Temporarily provide compiler=gcc44 saving the original value around.
+ # RHEL-5 workaround of its:
+ # gcc: -rpath: linker input file unused because linking not done
+ # gcc: --dynamic-linker: linker input file unused because linking not done
+
+ set board [target_info name]
+ if [board_info $board exists compiler] {
+ set old_compiler [board_info $board compiler]
+ unset_board_info compiler
+ } elseif [info exists old_compiler] {
+ unset old_compiler
+ }
+ set_board_info compiler gcc44
+
+ set err [build_executable $testname $executable $sources $options]
+
+ unset_board_info compiler
+ if [info exists old_compiler] {
+ set_board_info compiler $old_compiler
}
+
+ if { $err == -1 } {
+ return ""
+ }
+
set binfile [standard_output_file ${executable}]
set ldd [gdb_find_ldd]

6
gdb-rpmlintrc Normal file
View File

@ -0,0 +1,6 @@
# This line is mandatory to access the configuration functions
from Config import *
# The testresult logs contain part of the build log and thus
# necessarily mention the buildroot
addFilter ("gdb-testresults.*file-contains-buildroot")

View File

@ -1,50 +0,0 @@
http://sourceware.org/ml/gdb-patches/2014-02/msg00158.html
Subject: [patch] testsuite: Fix "ERROR: no fileid for"
--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
a35cfb4007cee8cb84106412cd17f4e12f13345b is the first bad commit
commit a35cfb4007cee8cb84106412cd17f4e12f13345b
Author: Maciej W. Rozycki <macro@codesourcery.com>
Date: Thu Oct 24 23:32:30 2013 +0100
$ runtest gdb.base/solib-disc.exp
Running ./gdb.base/solib-disc.exp ...
ERROR: no fileid for host1
[...]
Jan
--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="gdbfinish.patch"
gdb/testsuite/
2014-02-06 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix "ERROR: no fileid for" in the testsuite.
* lib/gdb.exp (gdb_finish): Check gdb_spawn_id.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 533b81b..5c53cdf 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3708,7 +3708,8 @@ proc gdb_finish { } {
global cleanfiles
# Give persistent gdbserver a chance to terminate before GDB is killed.
- if {[info exists gdbserver_reconnect_p] && $gdbserver_reconnect_p} {
+ if {[info exists gdbserver_reconnect_p] && $gdbserver_reconnect_p
+ && [info exists gdb_spawn_id]} {
send_gdb "kill\n";
gdb_expect 10 {
-re "y or n" {
--azLHFNyN32YCQGCU--

View File

@ -1,66 +1,67 @@
http://sourceware.org/ml/gdb-patches/2014-02/msg00179.html
Subject: [obv] testsuite: Fix i386-sse-stack-align.exp regression since GDB_PARALLEL
http://sourceware.org/ml/gdb-patches/2014-07/msg00274.html
Subject: [obv] Fix false argv0-symlink.exp FAIL running under a very long directory name
Hi,
--u3/rZRmxL6MmkK24
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
checked in as obvious:
Hi Tom,
$ make check//unix/-m32 RUNTESTFLAGS="gdb.arch/i386-sse-stack-align.exp GDB_PARALLEL=1"
Starting program: /home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink ^M
[...]
Running /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp ...
ERROR: (/home/jkratoch/redhat/gdb-clean/gdb/testsuite.unix.-m32/outputs/gdb.arch/i386-sse-stack-align/i386-sse-stack-align) No such file or directory
(gdb) print argv[0]^M
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-", 'f' <repeats 169 times>...^M
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name
after "set print repeats 10000":
Checked in.
print argv[0]^M
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"...^M
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name
after "set print elements 10000":
Jan
print argv[0]^M
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink"^M
(gdb) PASS: gdb.base/argv0-symlink.exp: kept file symbolic link name
--u3/rZRmxL6MmkK24
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
commit 3c77faf33dc4c7bb693f05f44077ed687e9f8217
commit 218c2655603748b844dcaf103e34fd14d8ee8aef
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Feb 6 23:14:20 2014 +0100
Fix i386-sse-stack-align.exp regression since GDB_PARALLEL.
gdb/testsuite/
2014-02-06 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix i386-sse-stack-align.exp regression since GDB_PARALLEL.
* gdb.arch/i386-sse-stack-align.exp: Use standard_output_file.
Date: Fri Jul 11 17:26:42 2014 +0200
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8c846b8..13ccaf3 100644
index 74f7bce..253eeeb 100644
### a/gdb/testsuite/ChangeLog
### b/gdb/testsuite/ChangeLog
## -1,3 +1,8 @@
+2014-02-06 Jan Kratochvil <jan.kratochvil@redhat.com>
## -1,3 +1,9 @@
+2014-07-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix i386-sse-stack-align.exp regression since GDB_PARALLEL.
+ * gdb.arch/i386-sse-stack-align.exp: Use standard_output_file.
+ Fix false FAIL running under a very long directory name.
+ * gdb.base/argv0-symlink.exp: Add "set print repeats 10000"
+ and "set print elements 10000". Twice.
+
2014-02-06 Doug Evans <xdje42@gmail.com>
2014-07-11 Yao Qi <yao@codesourcery.com>
* gdb.python/py-breakpoint.exp (test_bkpt_eval_funcs): Update expected
diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
index b5a7e1e..462df1f 100644
--- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
+++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
@@ -22,7 +22,7 @@ set testfile "i386-sse-stack-align"
set srcfile ${testfile}.S
set csrcfile ${testfile}.c
set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
+set binfile [standard_output_file ${executable}]
set opts {}
* gdb.base/exprs.exp: "set print symbol off".
diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp
index 0e0202d..d849b4c 100644
--- a/gdb/testsuite/gdb.base/argv0-symlink.exp
+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp
@@ -36,6 +36,9 @@ if ![runto_main] {
return -1
}
if [info exists COMPILE] {
--u3/rZRmxL6MmkK24--
+gdb_test_no_output "set print repeats 10000"
+gdb_test_no_output "set print elements 10000"
+
gdb_test {print argv[0]} "/$filelink\"" $test
# For a link named /PATH/TO/DIR/LINK, we want to check the output
@@ -67,6 +70,9 @@ if ![runto_main] {
return -1
}
+gdb_test_no_output "set print repeats 10000"
+gdb_test_no_output "set print elements 10000"
+
# gdbserver does not have this issue.
if ![is_remote target] {
setup_kfail "*-*-*" gdb/15934

View File

@ -0,0 +1,42 @@
Re: [PATCH 04/23] vla: make dynamic fortran arrays functional.
https://sourceware.org/ml/gdb-patches/2014-06/msg00570.html
Index: gdb-7.7.90.20140627/gdb/valarith.c
===================================================================
--- gdb-7.7.90.20140627.orig/gdb/valarith.c 2014-07-07 20:44:03.136394525 +0200
+++ gdb-7.7.90.20140627/gdb/valarith.c 2014-07-07 20:45:41.588536459 +0200
@@ -195,10 +195,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 (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 because not associated"));
+ if (TYPE_NOT_ALLOCATED (array_type))
+ error (_("no such vector element because not allocated"));
+
+ elt_offs = longest_to_int (index - lowerbound);
+
if (elt_stride > 0)
elt_offs *= elt_stride;
else if (elt_stride < 0)
@@ -212,14 +219,7 @@ value_subscripted_rvalue (struct value *
if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
&& elt_offs >= TYPE_LENGTH (array_type)))
- {
- if (TYPE_NOT_ASSOCIATED (array_type))
- error (_("no such vector element because not associated"));
- else if (TYPE_NOT_ALLOCATED (array_type))
- error (_("no such vector element because 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);

View File

@ -0,0 +1,165 @@
http://sourceware.org/ml/gdb-patches/2014-08/msg00025.html
Subject: [patch 1/2] Re: Crash regression(?) printing Fortran strings in bt [Re: [V2 00/23] Fortran dynamic array support]
--FCuugMFkClbJLl1L
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Fri, 01 Aug 2014 09:20:19 +0200, Keven Boell wrote:
> I just tried it on Fedora 20 i686. Applied the patch, you mentioned, on top of
> the Fortran VLA series and executed your dynamic-other-frame test. Everything
> is working fine here, I cannot reproduce the crash.
I have it reproducible on Fedora 20 i686 with plain
CFLAGS=-g ./configure;make;cd gdb/testsuite;make site.exp;runtest gdb.fortran/dynamic-other-frame.exp
Besides that I have updated the testcase with
gdb_test_no_output "set print frame-arguments all"
so that there is no longer needed the patch:
[patch] Display Fortran strings in backtraces
https://sourceware.org/ml/gdb-patches/2014-07/msg00709.html
The fix below has no regressions for me. Unfortunately I do not see why you
cannot reproduce it.
Thanks,
Jan
--FCuugMFkClbJLl1L
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="vlastringonly.patch"
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 53cae2c..cf7ac26 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1659,6 +1659,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
return !has_static_range (TYPE_RANGE_DATA (type));
case TYPE_CODE_ARRAY:
+ case TYPE_CODE_STRING:
{
gdb_assert (TYPE_NFIELDS (type) == 1);
diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
new file mode 100644
index 0000000..261ce17
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
@@ -0,0 +1,24 @@
+! Copyright 2010 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.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+subroutine bar
+ real :: dummy
+ dummy = 1
+end subroutine bar
diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
new file mode 100644
index 0000000..570a28c
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
@@ -0,0 +1,39 @@
+# Copyright 2010 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.
+
+set testfile "dynamic-other-frame"
+set srcfile1 ${testfile}.f90
+set srcfile2 ${testfile}-stub.f90
+set objfile2 [standard_output_file ${testfile}-stub.o]
+set executable ${testfile}
+set binfile [standard_output_file ${executable}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${objfile2}" object {f90}] != ""
+ || [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${objfile2}" "${binfile}" executable {debug f90}] != "" } {
+ untested "Couldn't compile ${srcfile1} or ${srcfile2}"
+ return -1
+}
+
+clean_restart ${executable}
+
+gdb_test_no_output "set print frame-arguments all"
+
+if ![runto bar_] then {
+ perror "couldn't run to bar_"
+ continue
+}
+
+gdb_test "bt" {foo \(string='hello'.*}
diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
new file mode 100644
index 0000000..2bc637d
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
@@ -0,0 +1,36 @@
+! Copyright 2010 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.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+subroutine foo (string)
+ interface
+ subroutine bar
+ end subroutine
+ end interface
+ character string*(*)
+ call bar ! stop-here
+end subroutine foo
+program test
+ interface
+ subroutine foo (string)
+ character string*(*)
+ end subroutine
+ end interface
+ call foo ('hello')
+end
--FCuugMFkClbJLl1L--

3235
gdb-vla-intel.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,80 @@
-------------------------------------------------------------------
Wed Aug 13 07:54:35 UTC 2014 - rguenther@suse.com
- Enable running the testsuite and store results in a gdb-testresults
package.
- Add gdb-rpmlintrc to filter errors about the buildroot mentioned
in testresult logs.
-------------------------------------------------------------------
Fri Aug 8 12:22:24 UTC 2014 - rguenther@suse.com
- Use patchlist.pl to merge with gdb-7.8-16.fc22, a rebase to FSF GDB 4.8.
The GDB 4.8 features are:
* Guile scripting support.
* Python scripting enhancements.
* New commands:
** guile
** guile-repl
** info auto-load guile-scripts [REGEXP]
* New options:
** maint ada set ignore-descriptive-types (on|off)
** maint set target-async (on|off)
** set|show auto-load guile-scripts (on|off)
** set|show auto-connect-native-target
** set|show guile print-stack (none|message|full)
** set|show mi-async (on|off)
** set|show print symbol-loading (off|brief|full)
** set|show record btrace replay-memory-access (read-only|read-write)
* Remote Protocol:
** The qXfer:btrace:read packet supports a new annex 'delta'.
* GDB/MI:
** A new option "-gdb-set mi-async" replaces "-gdb-set target-async".
* New target configurations:
** PowerPC64 GNU/Linux little-endian
* btrace enhancements:
** The btrace record target now supports the 'record goto' command.
** The btrace record target supports limited reverse execution and
replay.
* ISO C99 variable length automatic arrays support.
* It is no longer required to "set target-async on" in order to use
background execution commands (e.g., "c&", "s&", etc.).
* "catch syscall" now implemented on s390*-linux* targets.
* The "compare-sections" command now works on all targets.
* The "target native" command now connects to the native target, and
can be used to launch native programs, even if "set
auto-connect-native-target" is set to off.
* More robust backtraces. [bnc#891040]
- Obsoletes patch gdb-7.7-bnc877566.patch
- Obsoletes patch gdb-fix-s390-build.patch
- Obsoletes patch gdb-ppc64le.patch
- Drop gdb-ia64-tdep.patch, disable building the IA64 target
- Modifies gdb-6.3-test-pie-20050107.patch,
gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch,
gdb-6.6-buildid-locate-core-as-arg.patch,
gdb-6.6-buildid-locate-rpm.patch, gdb-6.6-buildid-locate.patch,
gdb-6.6-scheduler_locking-step-is-default.patch,
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch,
gdb-6.8-attach-signalled-detach-stopped.patch,
gdb-6.8-quit-never-aborts.patch,
gdb-archer-pie-addons-keep-disabled.patch, gdb-archer-pie-addons.patch,
gdb-archer.patch, gdb-attach-fail-reasons-5of5.patch,
gdb-glibc-strstr-workaround.patch, gdb-rhbz795424-bitpos-20of25.patch,
gdb-rhbz795424-bitpos-21of25.patch, gdb-rhbz795424-bitpos-22of25.patch,
gdb-rhbz795424-bitpos-23of25.patch, gdb-rhbz795424-bitpos-25of25.patch,
gdb-upstream.patch
- Adds gdb-archer-vla-tests.patch, gdb-bz533176-fortran-omp-step.patch,
gdb-bz541866-rwatch-before-run.patch
gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch,
gdb-babeltrace-configure.patch, gdb-btrobust.patch,
gdb-dts-rhel6-python-compat.patch, gdb-fortran-frame-string.patch,
gdb-gnat-dwarf-crash-3of3.patch, gdb-python-completer-1of2.patch,
gdb-python-completer-2of2.patch, gdb-readline-6.3.5.patch,
gdb-vla-intel-04of23-fix.patch, gdb-vla-intel-stringbt-fix.patch,
gdb-vla-intel.patch
- Removes gdb-rhel5-gcc44.patch, gdb-6.6-bfd-vdso8k.patch,
gdb-testsuite-nohostid.patch, gdb-python-stacksmash.patch
-------------------------------------------------------------------
Thu Jun 26 14:00:26 UTC 2014 - rguenther@suse.com

286
gdb.spec
View File

@ -17,6 +17,8 @@
#
%define _with_testsuite 1
Summary: A GNU source-level debugger for C, C++, Fortran and other languages
License: GPL-3.0+ and GPL-3.0-with-GCC-exception and LGPL-2.1+ and LGPL-3.0+
Group: Development/Tools/Debuggers
@ -25,7 +27,7 @@ Name: gdb
%global snap 20130731
# See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20121213
Version: 7.7
Version: 7.8
Release: 0
# The release always contains a leading reserved number, start it at 1.
@ -86,122 +88,128 @@ Source6: gdbtui
Source10: patchlist.pl
Source11: patchname_get.sh
Source12: baselibs.conf
Source13: gdb-rpmlintrc
#Fedora Packages begin
Patch1: gdb-6.3-rh-testversion-20041202.patch
Patch2: gdb-archer.patch
Patch3: gdb-upstream.patch
Patch4: gdb-6.3-rh-dummykfail-20041202.patch
Patch5: gdb-6.3-ppc64syscall-20040622.patch
Patch6: gdb-6.3-ppc64displaysymbol-20041124.patch
Patch7: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
Patch8: gdb-6.3-gstack-20050411.patch
Patch9: gdb-6.3-test-pie-20050107.patch
Patch10: gdb-6.3-test-self-20050110.patch
Patch11: gdb-6.3-test-dtorfix-20050121.patch
Patch12: gdb-6.3-test-movedir-20050125.patch
Patch13: gdb-6.3-threaded-watchpoints2-20050225.patch
Patch14: gdb-6.3-inferior-notification-20050721.patch
Patch15: gdb-6.3-inheritancetest-20050726.patch
Patch16: gdb-6.3-readnever-20050907.patch
Patch17: gdb-6.5-bz203661-emit-relocs.patch
Patch18: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
Patch19: gdb-6.5-sharedlibrary-path.patch
Patch20: gdb-6.5-bz190810-gdbserver-arch-advice.patch
Patch21: gdb-6.5-BEA-testsuite.patch
Patch22: gdb-6.5-last-address-space-byte-test.patch
Patch23: gdb-6.5-readline-long-line-crash-test.patch
Patch24: gdb-6.5-bz216711-clone-is-outermost.patch
Patch25: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
Patch26: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
Patch27: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
Patch28: gdb-6.3-bz140532-ppc-unwinding-test.patch
Patch29: gdb-6.3-bz202689-exec-from-pthread-test.patch
Patch30: gdb-6.6-bz230000-power6-disassembly-test.patch
Patch31: gdb-6.3-bz231832-obstack-2gb.patch
Patch32: gdb-6.6-bz229517-gcore-without-terminal.patch
Patch33: gdb-6.6-bz235197-fork-detach-info.patch
Patch34: gdb-6.6-testsuite-timeouts.patch
Patch35: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
Patch36: gdb-6.6-scheduler_locking-step-is-default.patch
Patch37: gdb-6.3-attach-see-vdso-test.patch
Patch38: gdb-6.5-bz243845-stale-testing-zombie-test.patch
Patch39: gdb-6.6-buildid-locate.patch
Patch40: gdb-6.6-buildid-locate-solib-missing-ids.patch
Patch41: gdb-6.6-buildid-locate-rpm.patch
Patch42: gdb-6.6-bfd-vdso8k.patch
Patch43: gdb-6.7-charsign-test.patch
Patch44: gdb-6.7-ppc-clobbered-registers-O2-test.patch
Patch45: gdb-6.5-ia64-libunwind-leak-test.patch
Patch46: gdb-6.5-missed-trap-on-step-test.patch
Patch47: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
Patch48: gdb-6.5-gcore-buffer-limit-test.patch
Patch49: gdb-6.6-threads-static-test.patch
Patch50: gdb-6.3-mapping-zero-inode-test.patch
Patch51: gdb-6.3-focus-cmd-prev-test.patch
Patch52: gdb-6.8-bz442765-threaded-exec-test.patch
Patch53: gdb-6.8-sparc64-silence-memcpy-check.patch
Patch54: gdb-6.5-section-num-fixup-test.patch
Patch55: gdb-6.8-bz436037-reg-no-longer-active.patch
Patch56: gdb-6.8-watchpoint-conditionals-test.patch
Patch57: gdb-6.8-bz466901-backtrace-full-prelinked.patch
Patch58: gdb-6.8-bz457187-largefile-test.patch
Patch59: gdb-simultaneous-step-resume-breakpoint-test.patch
Patch60: gdb-core-open-vdso-warning.patch
Patch61: gdb-x86_64-i386-syscall-restart.patch
Patch62: gdb-bz533176-fortran-omp-step.patch
Patch63: gdb-follow-child-stale-parent.patch
Patch64: gdb-ccache-workaround.patch
Patch65: gdb-archer-pie-addons.patch
Patch66: gdb-archer-pie-addons-keep-disabled.patch
Patch67: gdb-lineno-makeup-test.patch
Patch68: gdb-ppc-power7-test.patch
Patch69: gdb-bz541866-rwatch-before-run.patch
Patch70: gdb-moribund-utrace-workaround.patch
Patch71: gdb-archer-next-over-throw-cxx-exec.patch
Patch72: gdb-bz601887-dwarf4-rh-test.patch
Patch73: gdb-6.6-buildid-locate-core-as-arg.patch
Patch74: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
Patch75: gdb-test-bt-cfi-without-die.patch
Patch76: gdb-gdb-add-index-script.patch
Patch77: gdb-bz568248-oom-is-error.patch
Patch78: gdb-bz634108-solib_address.patch
Patch79: gdb-test-pid0-core.patch
Patch80: gdb-test-dw2-aranges.patch
Patch81: gdb-test-expr-cumulative-archer.patch
Patch82: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
Patch83: gdb-glibc-vdso-workaround.patch
Patch84: gdb-runtest-pie-override.patch
Patch85: gdb-attach-fail-reasons-5of5.patch
Patch86: gdb-stale-frame_info.patch
Patch87: gdb-glibc-strstr-workaround.patch
Patch88: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
Patch89: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
Patch90: gdb-rhbz795424-bitpos-20of25.patch
Patch91: gdb-rhbz795424-bitpos-21of25.patch
Patch92: gdb-rhbz795424-bitpos-22of25.patch
Patch93: gdb-rhbz795424-bitpos-23of25.patch
Patch94: gdb-rhbz795424-bitpos-25of25.patch
Patch95: gdb-rhbz795424-bitpos-25of25-test.patch
Patch96: gdb-rhbz795424-bitpos-lazyvalue.patch
Patch97: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
Patch98: gdb-enable-count-crash.patch
Patch99: gdb-testsuite-nohostid.patch
Patch100: gdb-python-stacksmash.patch
Patch101: gdb-rhel5-gcc44.patch
Patch102: gdb-6.6-buildid-locate-rpm-scl.patch
Patch103: gdb-readline62-ask-more-rh.patch
Patch104: gdb-6.8-attach-signalled-detach-stopped.patch
Patch105: gdb-6.8-quit-never-aborts.patch
Patch106: gdb-rhel5-compat.patch
Patch4: gdb-vla-intel.patch
Patch5: gdb-vla-intel-04of23-fix.patch
Patch6: gdb-vla-intel-stringbt-fix.patch
Patch7: gdb-6.3-rh-dummykfail-20041202.patch
Patch8: gdb-6.3-ppc64syscall-20040622.patch
Patch9: gdb-6.3-ppc64displaysymbol-20041124.patch
Patch10: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
Patch11: gdb-6.3-gstack-20050411.patch
Patch12: gdb-6.3-test-pie-20050107.patch
Patch13: gdb-6.3-test-self-20050110.patch
Patch14: gdb-6.3-test-dtorfix-20050121.patch
Patch15: gdb-6.3-test-movedir-20050125.patch
Patch16: gdb-6.3-threaded-watchpoints2-20050225.patch
Patch17: gdb-6.3-inferior-notification-20050721.patch
Patch18: gdb-6.3-inheritancetest-20050726.patch
Patch19: gdb-6.3-readnever-20050907.patch
Patch20: gdb-6.5-bz203661-emit-relocs.patch
Patch21: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
Patch22: gdb-6.5-sharedlibrary-path.patch
Patch23: gdb-6.5-bz190810-gdbserver-arch-advice.patch
Patch24: gdb-6.5-BEA-testsuite.patch
Patch25: gdb-6.5-last-address-space-byte-test.patch
Patch26: gdb-6.5-readline-long-line-crash-test.patch
Patch27: gdb-6.5-bz216711-clone-is-outermost.patch
Patch28: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
Patch29: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
Patch30: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
Patch31: gdb-6.3-bz140532-ppc-unwinding-test.patch
Patch32: gdb-6.3-bz202689-exec-from-pthread-test.patch
Patch33: gdb-6.6-bz230000-power6-disassembly-test.patch
Patch34: gdb-6.3-bz231832-obstack-2gb.patch
Patch35: gdb-6.6-bz229517-gcore-without-terminal.patch
Patch36: gdb-6.6-bz235197-fork-detach-info.patch
Patch37: gdb-6.6-testsuite-timeouts.patch
Patch38: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
Patch39: gdb-6.6-scheduler_locking-step-is-default.patch
Patch40: gdb-6.3-attach-see-vdso-test.patch
Patch41: gdb-6.5-bz243845-stale-testing-zombie-test.patch
Patch42: gdb-6.6-buildid-locate.patch
Patch43: gdb-6.6-buildid-locate-solib-missing-ids.patch
Patch44: gdb-6.6-buildid-locate-rpm.patch
Patch45: gdb-6.7-charsign-test.patch
Patch46: gdb-6.7-ppc-clobbered-registers-O2-test.patch
Patch47: gdb-6.5-ia64-libunwind-leak-test.patch
Patch48: gdb-6.5-missed-trap-on-step-test.patch
Patch49: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
Patch50: gdb-6.5-gcore-buffer-limit-test.patch
Patch51: gdb-6.6-threads-static-test.patch
Patch52: gdb-6.3-mapping-zero-inode-test.patch
Patch53: gdb-6.3-focus-cmd-prev-test.patch
Patch54: gdb-6.8-bz442765-threaded-exec-test.patch
Patch55: gdb-6.8-sparc64-silence-memcpy-check.patch
Patch56: gdb-6.5-section-num-fixup-test.patch
Patch57: gdb-6.8-bz436037-reg-no-longer-active.patch
Patch58: gdb-6.8-watchpoint-conditionals-test.patch
Patch59: gdb-6.8-bz466901-backtrace-full-prelinked.patch
Patch60: gdb-6.8-bz457187-largefile-test.patch
Patch61: gdb-simultaneous-step-resume-breakpoint-test.patch
Patch62: gdb-core-open-vdso-warning.patch
Patch63: gdb-x86_64-i386-syscall-restart.patch
Patch64: gdb-bz533176-fortran-omp-step.patch
Patch65: gdb-follow-child-stale-parent.patch
Patch66: gdb-ccache-workaround.patch
Patch67: gdb-archer-pie-addons.patch
Patch68: gdb-archer-pie-addons-keep-disabled.patch
Patch69: gdb-lineno-makeup-test.patch
Patch70: gdb-ppc-power7-test.patch
Patch71: gdb-bz541866-rwatch-before-run.patch
Patch72: gdb-moribund-utrace-workaround.patch
Patch73: gdb-archer-next-over-throw-cxx-exec.patch
Patch74: gdb-bz601887-dwarf4-rh-test.patch
Patch75: gdb-6.6-buildid-locate-core-as-arg.patch
Patch76: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
Patch77: gdb-test-bt-cfi-without-die.patch
Patch78: gdb-gdb-add-index-script.patch
Patch79: gdb-bz568248-oom-is-error.patch
Patch80: gdb-bz634108-solib_address.patch
Patch81: gdb-test-pid0-core.patch
Patch82: gdb-test-dw2-aranges.patch
Patch83: gdb-test-expr-cumulative-archer.patch
Patch84: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
Patch85: gdb-glibc-vdso-workaround.patch
Patch86: gdb-runtest-pie-override.patch
Patch87: gdb-attach-fail-reasons-5of5.patch
Patch88: gdb-stale-frame_info.patch
Patch89: gdb-glibc-strstr-workaround.patch
Patch90: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
Patch91: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
Patch92: gdb-rhbz795424-bitpos-20of25.patch
Patch93: gdb-rhbz795424-bitpos-21of25.patch
Patch94: gdb-rhbz795424-bitpos-22of25.patch
Patch95: gdb-rhbz795424-bitpos-23of25.patch
Patch96: gdb-rhbz795424-bitpos-25of25.patch
Patch97: gdb-rhbz795424-bitpos-25of25-test.patch
Patch98: gdb-rhbz795424-bitpos-lazyvalue.patch
Patch99: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
Patch100: gdb-enable-count-crash.patch
Patch101: gdb-gnat-dwarf-crash-3of3.patch
Patch102: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
Patch103: gdb-archer-vla-tests.patch
Patch104: gdb-readline-6.3.5.patch
Patch105: gdb-btrobust.patch
Patch106: gdb-python-completer-1of2.patch
Patch107: gdb-python-completer-2of2.patch
Patch108: gdb-fortran-frame-string.patch
Patch109: gdb-babeltrace-configure.patch
Patch110: gdb-dts-rhel6-python-compat.patch
Patch111: gdb-6.6-buildid-locate-rpm-scl.patch
Patch112: gdb-readline62-ask-more-rh.patch
Patch113: gdb-6.8-attach-signalled-detach-stopped.patch
Patch114: gdb-6.8-quit-never-aborts.patch
Patch115: gdb-rhel5-compat.patch
#Fedora Packages end
# Upstream patch to fix gcc -Werror
Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch
Patch1004: gdb-ia64-tdep.patch
Patch1006: gdb-ppc64le.patch
Patch1007: gdb-fix-s390-build.patch
Patch1008: gdb-7.7-bnc877566.patch
BuildRequires: bison
BuildRequires: flex
@ -261,12 +269,10 @@ BuildRequires: gcc-objc
%ifarch %{ix86} x86_64 ia64 ppc alpha
BuildRequires: gcc-ada
%endif
BuildRequires: glibc-devel-32bit
%if 0%{suse_version} > 1120
%ifarch x86_64 ppc64 s390x
BuildRequires: gcc-c++-32bit
%endif
%if 0%{!?rhel:1} || 0%{?rhel} > 6
BuildRequires: xz
%endif
%endif # 0%{?_with_testsuite:1}
@ -313,6 +319,13 @@ and printing their data.
This package provides INFO, HTML and PDF user manual for GDB.
%package testresults
Summary: GDB testsuite results
License: SUSE-Public-Domain
Group: Development/Languages/C and C++
%description testresults
Results from running the GDB testsuite.
%prep
%setup -q -n %{gdb_src}
@ -431,25 +444,30 @@ find -name "*.info*"|xargs rm -f
%patch98 -p1
%patch99 -p1
%patch100 -p1
#%%patch101 -p1
#%%patch101 -p1 -R
#%%patch102 -p1
#%%patch102 -p1 -R
#%%patch103 -p1
#%%patch103 -p1 -R
#%%patch104 -p1
#%%patch104 -p1 -R
#%%patch105 -p1
#%%patch105 -p1 -R
#%%patch106 -p1
#%%patch106 -p1 -R
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch110 -p1 -R
%patch111 -p1
%patch111 -p1 -R
%patch112 -p1
%patch112 -p1 -R
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch115 -p1 -R
%patch114 -p1 -R
%patch113 -p1 -R
#Fedora patching end
%patch1002 -p1
%patch1004 -p1
%patch1006 -p1
%patch1007 -p1
%patch1008 -p1
find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.
@ -492,7 +510,8 @@ fi
%else
%define build_multitarget 0
%endif
%define target_list i686 ia64 powerpc powerpc64 powerpc64le s390 s390x x86_64 arm aarch64 m68k
# For now disable ia64 until ia64-tdep.c is fixed
%define target_list i686 powerpc powerpc64 powerpc64le s390 s390x x86_64 arm aarch64 m68k
%define DIST %(echo '%distribution' | sed 's, /.*,,')
%if %build_multitarget
EXTRA_TARGETS="%(printf ,%%s-suse-linux %target_list)"
@ -710,8 +729,8 @@ do
done
done
# `tar | bzip2 | uuencode' may have some piping problems in Brew.
tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}*.{sum,log}
uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2
#tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}*.{sum,log}
#uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2
cd ../..
echo ====================TESTING END=====================
%endif
@ -889,6 +908,13 @@ fi
%endif
%endif
%if 0%{?_with_testsuite:1}
%files testresults
%defattr(-,root,root)
%doc %{gdb_build}/gdb/gdb-*.sum
%doc %{gdb_build}/gdb/gdb-*.log
%endif
# don't include the files in include, they are part of binutils
%if %{suse_version} > 1010