diff -Nru gdb-7.7/bfd/bfd.c gdb-7.7.1/bfd/bfd.c --- gdb-7.7/bfd/bfd.c 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/bfd/bfd.c 2014-05-05 21:51:24.000000000 +0000 @@ -311,6 +311,14 @@ . unsigned int selective_search : 1; .}; . +.{* See note beside bfd_set_section_userdata. *} +.static inline bfd_boolean +.bfd_set_cacheable (bfd * abfd, bfd_boolean val) +.{ +. abfd->cacheable = val; +. return TRUE; +.} +. */ #include "sysdep.h" diff -Nru gdb-7.7/bfd/bfd-in2.h gdb-7.7.1/bfd/bfd-in2.h --- gdb-7.7/bfd/bfd-in2.h 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/bfd/bfd-in2.h 2014-05-05 21:51:24.000000000 +0000 @@ -299,9 +299,6 @@ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) /* Find the address one past the end of SEC. */ #define bfd_get_section_limit(bfd, sec) \ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ @@ -524,8 +521,6 @@ #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) - extern bfd_boolean bfd_cache_close (bfd *abfd); /* NB: This declaration should match the autogenerated one in libbfd.h. */ @@ -1029,7 +1024,7 @@ bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char *, const char *, void *); +bfd *bfd_openstreamr (const char * filename, const char * target, void * stream); bfd *bfd_openr_iovec (const char *filename, const char *target, void *(*open_func) (struct bfd *nbfd, @@ -1596,6 +1591,32 @@ int size; }; +/* Note: the following are provided as inline functions rather than macros + because not all callers use the return value. A macro implementation + would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some + compilers will complain about comma expressions that have no effect. */ +static inline bfd_boolean +bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) +{ + ptr->userdata = val; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) +{ + ptr->vma = ptr->lma = val; + ptr->user_set_vma = TRUE; + return TRUE; +} + +static inline bfd_boolean +bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) +{ + ptr->alignment_power = val; + return TRUE; +} + /* These sections are global, and are managed by BFD. The application and target back end are not permitted to change the values in these sections. */ @@ -6415,6 +6436,14 @@ unsigned int selective_search : 1; }; +/* See note beside bfd_set_section_userdata. */ +static inline bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +{ + abfd->cacheable = val; + return TRUE; +} + typedef enum bfd_error { bfd_error_no_error = 0, diff -Nru gdb-7.7/bfd/bfd-in.h gdb-7.7.1/bfd/bfd-in.h --- gdb-7.7/bfd/bfd-in.h 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/bfd/bfd-in.h 2014-05-05 21:51:24.000000000 +0000 @@ -292,9 +292,6 @@ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) -#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) -#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) /* Find the address one past the end of SEC. */ #define bfd_get_section_limit(bfd, sec) \ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ @@ -517,8 +514,6 @@ #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) - extern bfd_boolean bfd_cache_close (bfd *abfd); /* NB: This declaration should match the autogenerated one in libbfd.h. */ diff -Nru gdb-7.7/bfd/cache.c gdb-7.7.1/bfd/cache.c --- gdb-7.7/bfd/cache.c 2013-12-08 04:55:47.000000000 +0000 +++ gdb-7.7.1/bfd/cache.c 2014-05-05 21:51:24.000000000 +0000 @@ -82,7 +82,7 @@ #ifdef HAVE_GETRLIMIT struct rlimit rlim; if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 - && rlim.rlim_cur != RLIM_INFINITY) + && rlim.rlim_cur != (rlim_t) RLIM_INFINITY) max = rlim.rlim_cur / 8; else #endif /* HAVE_GETRLIMIT */ diff -Nru gdb-7.7/bfd/ChangeLog gdb-7.7.1/bfd/ChangeLog --- gdb-7.7/bfd/ChangeLog 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/bfd/ChangeLog 2014-05-05 21:51:24.000000000 +0000 @@ -1,3 +1,28 @@ +2014-04-24 Nick Clifton + + 2014-01-29 Nick Clifton + PR build/16873 + * bfd-in.h (bfd_set_section_vma): Delete. + (bfd_set_section_alignment): Delete. + (bfd_set_section_userdata): Delete. + (bfd_set_cacheable): Delete. + * bfd.c (bfd_set_cacheable): New static inline function. + * section.c (bfd_set_section_userdata): Likewise. + (bfd_set_section_vma): Likewise. + (bfd_set_section_alignment): Likewise. + * bfd-in2.h: Regenerate. + +2014-03-12 Pedro Alves + + PR gdb/16696 + * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma + through ptr_to_uint instead of through long. + +2014-02-17 Rainer Orth + + PR build/16550 + * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t. + 2014-01-07 Tom Tromey * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility diff -Nru gdb-7.7/bfd/doc/bfd.info gdb-7.7.1/bfd/doc/bfd.info --- gdb-7.7/bfd/doc/bfd.info 2014-02-06 02:41:28.000000000 +0000 +++ gdb-7.7.1/bfd/doc/bfd.info 2014-05-05 21:55:14.000000000 +0000 @@ -605,6 +605,14 @@ unsigned int selective_search : 1; }; + /* See note beside bfd_set_section_userdata. */ + static inline bfd_boolean + bfd_set_cacheable (bfd * abfd, bfd_boolean val) + { + abfd->cacheable = val; + return TRUE; + } +  File: bfd.info, Node: Error reporting, Next: Miscellaneous, Prev: typedef bfd, Up: BFD front end @@ -1771,6 +1779,32 @@ int size; }; + /* Note: the following are provided as inline functions rather than macros + because not all callers use the return value. A macro implementation + would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some + compilers will complain about comma expressions that have no effect. */ + static inline bfd_boolean + bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) + { + ptr->userdata = val; + return TRUE; + } + + static inline bfd_boolean + bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) + { + ptr->vma = ptr->lma = val; + ptr->user_set_vma = TRUE; + return TRUE; + } + + static inline bfd_boolean + bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) + { + ptr->alignment_power = val; + return TRUE; + } + /* These sections are global, and are managed by BFD. The application and target back end are not permitted to change the values in these sections. */ @@ -12934,61 +12968,61 @@ Node: Canonical format8790 Node: BFD front end13167 Node: typedef bfd13591 -Node: Error reporting24309 -Node: Miscellaneous29168 -Node: Memory Usage46298 -Node: Initialization47529 -Node: Sections47988 -Node: Section Input48471 -Node: Section Output49840 -Node: typedef asection52327 -Node: section prototypes77541 -Node: Symbols87809 -Node: Reading Symbols89412 -Node: Writing Symbols90520 -Node: Mini Symbols92264 -Node: typedef asymbol93238 -Node: symbol handling functions99279 -Node: Archives104610 -Node: Formats108638 -Node: Relocations111589 -Node: typedef arelent112316 -Node: howto manager127967 -Node: Core Files239707 -Node: Targets241745 -Node: bfd_target243720 -Node: Architectures266934 -Node: Opening and Closing294041 -Node: Internal308356 -Node: File Caching314703 -Node: Linker Functions316621 -Node: Creating a Linker Hash Table318295 -Node: Adding Symbols to the Hash Table320034 -Node: Differing file formats320934 -Node: Adding symbols from an object file322659 -Node: Adding symbols from an archive324809 -Node: Performing the Final Link327738 -Node: Information provided by the linker328979 -Node: Relocating the section contents330133 -Node: Writing the symbol table331885 -Node: Hash Tables336268 -Node: Creating and Freeing a Hash Table337466 -Node: Looking Up or Entering a String338716 -Node: Traversing a Hash Table339969 -Node: Deriving a New Hash Table Type340758 -Node: Define the Derived Structures341824 -Node: Write the Derived Creation Routine342905 -Node: Write Other Derived Routines345529 -Node: BFD back ends346844 -Node: What to Put Where347114 -Node: aout347294 -Node: coff353617 -Node: elf382091 -Node: mmo382492 -Node: File layout383417 -Node: Symbol-table389055 -Node: mmo section mapping392822 -Node: GNU Free Documentation License396476 -Node: BFD Index421539 +Node: Error reporting24512 +Node: Miscellaneous29371 +Node: Memory Usage46501 +Node: Initialization47732 +Node: Sections48191 +Node: Section Input48674 +Node: Section Output50043 +Node: typedef asection52530 +Node: section prototypes78656 +Node: Symbols88924 +Node: Reading Symbols90527 +Node: Writing Symbols91635 +Node: Mini Symbols93379 +Node: typedef asymbol94353 +Node: symbol handling functions100394 +Node: Archives105725 +Node: Formats109753 +Node: Relocations112704 +Node: typedef arelent113431 +Node: howto manager129082 +Node: Core Files240822 +Node: Targets242860 +Node: bfd_target244835 +Node: Architectures268049 +Node: Opening and Closing295156 +Node: Internal309471 +Node: File Caching315818 +Node: Linker Functions317736 +Node: Creating a Linker Hash Table319410 +Node: Adding Symbols to the Hash Table321149 +Node: Differing file formats322049 +Node: Adding symbols from an object file323774 +Node: Adding symbols from an archive325924 +Node: Performing the Final Link328853 +Node: Information provided by the linker330094 +Node: Relocating the section contents331248 +Node: Writing the symbol table333000 +Node: Hash Tables337383 +Node: Creating and Freeing a Hash Table338581 +Node: Looking Up or Entering a String339831 +Node: Traversing a Hash Table341084 +Node: Deriving a New Hash Table Type341873 +Node: Define the Derived Structures342939 +Node: Write the Derived Creation Routine344020 +Node: Write Other Derived Routines346644 +Node: BFD back ends347959 +Node: What to Put Where348229 +Node: aout348409 +Node: coff354732 +Node: elf383206 +Node: mmo383607 +Node: File layout384532 +Node: Symbol-table390170 +Node: mmo section mapping393937 +Node: GNU Free Documentation License397591 +Node: BFD Index422654  End Tag Table diff -Nru gdb-7.7/bfd/doc/bfdt.texi gdb-7.7.1/bfd/doc/bfdt.texi --- gdb-7.7/bfd/doc/bfdt.texi 2014-02-06 02:41:15.000000000 +0000 +++ gdb-7.7.1/bfd/doc/bfdt.texi 2014-05-05 21:55:00.000000000 +0000 @@ -286,6 +286,14 @@ unsigned int selective_search : 1; @}; +/* See note beside bfd_set_section_userdata. */ +static inline bfd_boolean +bfd_set_cacheable (bfd * abfd, bfd_boolean val) +@{ + abfd->cacheable = val; + return TRUE; +@} + @end example @node Error reporting, Miscellaneous, typedef bfd, BFD front end @section Error reporting diff -Nru gdb-7.7/bfd/doc/bfdver.texi gdb-7.7.1/bfd/doc/bfdver.texi --- gdb-7.7/bfd/doc/bfdver.texi 2014-02-06 02:41:15.000000000 +0000 +++ gdb-7.7.1/bfd/doc/bfdver.texi 2014-05-05 21:55:01.000000000 +0000 @@ -1,4 +1,4 @@ @set VERSION 2.24.51 @set VERSION_PACKAGE (GNU Binutils) -@set UPDATED February 2014 +@set UPDATED May 2014 @set BUGURL @uref{http://www.sourceware.org/bugzilla/} diff -Nru gdb-7.7/bfd/doc/section.texi gdb-7.7.1/bfd/doc/section.texi --- gdb-7.7/bfd/doc/section.texi 2014-02-06 02:41:15.000000000 +0000 +++ gdb-7.7.1/bfd/doc/section.texi 2014-05-05 21:55:01.000000000 +0000 @@ -498,6 +498,32 @@ int size; @}; +/* Note: the following are provided as inline functions rather than macros + because not all callers use the return value. A macro implementation + would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some + compilers will complain about comma expressions that have no effect. */ +static inline bfd_boolean +bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) +@{ + ptr->userdata = val; + return TRUE; +@} + +static inline bfd_boolean +bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) +@{ + ptr->vma = ptr->lma = val; + ptr->user_set_vma = TRUE; + return TRUE; +@} + +static inline bfd_boolean +bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) +@{ + ptr->alignment_power = val; + return TRUE; +@} + /* These sections are global, and are managed by BFD. The application and target back end are not permitted to change the values in these sections. */ diff -Nru gdb-7.7/bfd/rs6000-core.c gdb-7.7.1/bfd/rs6000-core.c --- gdb-7.7/bfd/rs6000-core.c 2013-12-08 04:11:50.000000000 +0000 +++ gdb-7.7.1/bfd/rs6000-core.c 2014-05-05 21:51:24.000000000 +0000 @@ -585,7 +585,7 @@ { ldi_core = ldinfo.l32.ldinfo_core; ldi_datasize = ldinfo.l32.ldinfo_datasize; - ldi_dataorg = (bfd_vma) (long) ldinfo.l32.ldinfo_dataorg; + ldi_dataorg = (bfd_vma) (ptr_to_uint) ldinfo.l32.ldinfo_dataorg; ldi_next = ldinfo.l32.ldinfo_next; } @@ -627,7 +627,7 @@ } else { - vminfo_addr = (bfd_vma) (long) vminfo.old.vminfo_addr; + vminfo_addr = (bfd_vma) (ptr_to_uint) vminfo.old.vminfo_addr; vminfo_size = vminfo.old.vminfo_size; vminfo_offset = vminfo.old.vminfo_offset; } diff -Nru gdb-7.7/bfd/section.c gdb-7.7.1/bfd/section.c --- gdb-7.7/bfd/section.c 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/bfd/section.c 2014-05-05 21:51:24.000000000 +0000 @@ -542,6 +542,32 @@ . int size; .}; . +.{* Note: the following are provided as inline functions rather than macros +. because not all callers use the return value. A macro implementation +. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some +. compilers will complain about comma expressions that have no effect. *} +.static inline bfd_boolean +.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) +.{ +. ptr->userdata = val; +. return TRUE; +.} +. +.static inline bfd_boolean +.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) +.{ +. ptr->vma = ptr->lma = val; +. ptr->user_set_vma = TRUE; +. return TRUE; +.} +. +.static inline bfd_boolean +.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) +.{ +. ptr->alignment_power = val; +. return TRUE; +.} +. .{* These sections are global, and are managed by BFD. The application . and target back end are not permitted to change the values in . these sections. *} diff -Nru gdb-7.7/bfd/version.h gdb-7.7.1/bfd/version.h --- gdb-7.7/bfd/version.h 2014-02-06 02:21:28.000000000 +0000 +++ gdb-7.7.1/bfd/version.h 2014-05-05 21:50:23.000000000 +0000 @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20140206 +#define BFD_VERSION_DATE 20140505 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff -Nru gdb-7.7/debian/changelog gdb-7.7.1/debian/changelog --- gdb-7.7/debian/changelog 2014-02-19 10:41:40.000000000 +0000 +++ gdb-7.7.1/debian/changelog 2017-06-09 18:30:54.000000000 +0000 @@ -1,3 +1,105 @@ +gdb (7.7.1-0ubuntu5~14.04.3) trusty-security; urgency=medium + + * SECURITY UPDATE: DoS via invalid value in NumberOfRvaAndSizes field + - debian/patches/CVE-2014-8501.patch: add check to bfd/peXXigen.c. + - CVE-2014-8501 + * SECURITY UPDATE: stack overflow when printing bad bytes + - debian/patches/CVE-2014-9939.patch: fix escape sequences in + bfd/ihex.c, bfd/srec.c. + - CVE-2014-9939 + * SECURITY UPDATE: integer overflow in string_appends + - debian/patches/CVE-2016-2226.patch: check for overflow in + libiberty/cplus-dem.c, added xmalloc_failed to + gdb/common/common-utils.c. + - CVE-2016-2226 + * SECURITY UPDATE: use-after-free vulberabilities + - debian/patches/CVE-2016-4487_4488.patch: set bsize and ksize in + libiberty/cplus-dem.c, added test to + libiberty/testsuite/demangle-expected. + - CVE-2016-4487 + - CVE-2016-4488 + * SECURITY UPDATE: integer overflow in gnu_special + - debian/patches/CVE-2016-4489.patch: handle case where consume_count + returns -1 in libiberty/cplus-dem.c. + - CVE-2016-4489 + * SECURITY UPDATE: integer overflow after sanity checks + - debian/patches/CVE-2016-4490.patch: parse numbers as integer instead + of long in libiberty/cp-demangle.c, added test to + libiberty/testsuite/demangle-expected. + - CVE-2016-4490 + * SECURITY UPDATE: denial of service via infinite recursion + - debian/patches/CVE-2016-4491-1.patch: limit recursion in + include/demangle.h, libiberty/cp-demangle.c, libiberty/cp-demint.c, + added test to libiberty/testsuite/demangle-expected. + - debian/patches/CVE-2016-4491-2.patch: limit more recursion in + libiberty/cp-demangle.c. + - debian/patches/CVE-2016-4491-3.patch: initialize d_printing in + gdb/cp-name-parser.y, libiberty/cp-demangle.c. + - CVE-2016-4491 + * SECURITY UPDATE: buffer overflow in do_type + - debian/patches/CVE-2016-4492_4493.patch: properly handle large values + and overflow in libiberty/cplus-dem.c, added test to + libiberty/testsuite/demangle-expected. + - CVE-2016-4492 + - CVE-2016-4493 + * SECURITY UPDATE: denial of service via infinite recursion + - debian/patches/CVE-2016-6131.patch: prevent infinite recursion in + libiberty/cplus-dem.c, added test to + libiberty/testsuite/demangle-expected. + - CVE-2016-6131 + + -- Marc Deslauriers Fri, 09 Jun 2017 10:42:55 -0400 + +gdb (7.7.1-0ubuntu5~14.04.2) trusty-proposed; urgency=medium + + * SRU: Update for trusty. LP: #1351646. + * Build the gdb-doc package from the gdb sources. + + -- Matthias Klose Wed, 08 Oct 2014 20:48:14 +0200 + +gdb (7.7.1-0ubuntu5) utopic; urgency=medium + + * Fix regression introduced in previous upload, again supporting + powerpc64le in the multilib build. LP: #1233185. + + -- Matthias Klose Wed, 23 Jul 2014 15:19:13 +0200 + +gdb (7.7.1-0ubuntu4) utopic; urgency=medium + + [ Martin Pitt ] + * debian/rules: Revert configuring with "MULTIARCH_TARGET=all" and go back + to static list of targets. "all" is broken and does not work at least on + ARM. (LP: #1233185) + + -- Brian Murray Mon, 30 Jun 2014 15:28:20 -0700 + +gdb (7.7.1-0ubuntu3) utopic; urgency=medium + + * Fix PR 14963, infinite recursion in the demangler. LP: #1315590. + + -- Matthias Klose Thu, 12 Jun 2014 21:14:58 +0200 + +gdb (7.7.1-0ubuntu2) utopic; urgency=medium + + * Add the ARM change from the gdb-linaro 7.7-2014.05 release. + * Build-depend on systemtap-sdt-test (test dependency). + + -- Matthias Klose Tue, 27 May 2014 16:53:09 +0200 + +gdb (7.7.1-0ubuntu1) utopic; urgency=medium + + * GDB 7.7.1 release. + + -- Matthias Klose Tue, 13 May 2014 02:23:53 +0200 + +gdb (7.7-0ubuntu4) utopic; urgency=medium + + * re-enable patch that got disabled at some point (LP: #1317136) + - ptrace-error-verbosity.patch: Try to make the PTRACE scope sysctl + more discoverable via a verbose error message when failures happen. + + -- Marc Deslauriers Wed, 07 May 2014 15:46:53 -0400 + gdb (7.7-0ubuntu3) trusty; urgency=medium * Rebuild with Python 3.4. diff -Nru gdb-7.7/debian/control gdb-7.7.1/debian/control --- gdb-7.7/debian/control 2013-12-14 11:37:32.000000000 +0000 +++ gdb-7.7.1/debian/control 2014-10-08 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ Source: gdb -Maintainer: Ubuntu Core developers +Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Héctor Orón Martínez Uploaders: Luca Bruno , Samuel Bronson Section: devel @@ -36,6 +36,10 @@ libpython3-dev, libkvm-dev [kfreebsd-any], libunwind7-dev [ia64], +# Test deps + systemtap-sdt-dev [!arm64 !ppc64el], +# gdb-doc + texlive-latex-base, texlive-fonts-recommended, Vcs-Git: git://anonscm.debian.org/crosstoolchain/gdb.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=crosstoolchain/gdb.git Homepage: http://www.gnu.org/s/gdb/ @@ -48,6 +52,7 @@ libpython3-stdlib Recommends: libc-dbg, python3 Suggests: gdb-doc, gdbserver [amd64 armel armhf arm64 i386 ia64 m32r m68k mips mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x x32] +Replaces: gdb, gdb-doc (<< 7.7.1-0ubuntu5~14.04.2) Description: GNU Debugger GDB is a source-level debugger, capable of breaking programs at any specific line, displaying variable values, and determining @@ -122,3 +127,18 @@ . This package contains the sources and patches which are needed to build GDB. + +Package: gdb-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Breaks: gdb (<< 7.7.1), gdbserver (<< 7.7.1) +Replaces: gdb (<< 7.7.1-0ubuntu5~14.04.2), gdbserver (<< 7.7.1-0ubuntu5~14.04.2) +Description: The GNU Debugger Documentation + GDB is a source-level debugger, capable of breaking programs at + any specific line, displaying variable values, and determining + where errors occurred. Currently, it works for C, C++, Fortran, + Modula 2 and Java programs. A must-have for any serious + programmer. + . + This package contains the GDB manual. diff -Nru gdb-7.7/debian/control.in gdb-7.7.1/debian/control.in --- gdb-7.7/debian/control.in 2013-12-14 11:37:13.000000000 +0000 +++ gdb-7.7.1/debian/control.in 2014-10-08 19:15:27.000000000 +0000 @@ -1,5 +1,5 @@ Source: gdb -Maintainer: Ubuntu Core developers +Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Héctor Orón Martínez Uploaders: Luca Bruno , Samuel Bronson Section: devel @@ -36,6 +36,10 @@ libpython3-dev, libkvm-dev [kfreebsd-any], libunwind7-dev [ia64], +# Test deps + systemtap-sdt-dev [!arm64 !ppc64el], +# gdb-doc + texlive-latex-base, texlive-fonts-recommended, Vcs-Git: git://anonscm.debian.org/crosstoolchain/gdb.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=crosstoolchain/gdb.git Homepage: http://www.gnu.org/s/gdb/ @@ -48,6 +52,7 @@ libpython3-stdlib Recommends: libc-dbg, python3 Suggests: gdb-doc, gdbserver [amd64 armel armhf arm64 i386 ia64 m32r m68k mips mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x x32] +Replaces: gdb, gdb-doc (<< 7.7.1-0ubuntu5~14.04.2) Description: GNU Debugger GDB is a source-level debugger, capable of breaking programs at any specific line, displaying variable values, and determining @@ -122,3 +127,18 @@ . This package contains the sources and patches which are needed to build GDB. + +Package: gdb-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Breaks: gdb (<< 7.7.1), gdbserver (<< 7.7.1) +Replaces: gdb (<< 7.7.1-0ubuntu5~14.04.2), gdbserver (<< 7.7.1-0ubuntu5~14.04.2) +Description: The GNU Debugger Documentation + GDB is a source-level debugger, capable of breaking programs at + any specific line, displaying variable values, and determining + where errors occurred. Currently, it works for C, C++, Fortran, + Modula 2 and Java programs. A must-have for any serious + programmer. + . + This package contains the GDB manual. diff -Nru gdb-7.7/debian/gdb.install gdb-7.7.1/debian/gdb.install --- gdb-7.7/debian/gdb.install 2013-07-06 10:21:52.000000000 +0000 +++ gdb-7.7.1/debian/gdb.install 2014-10-08 18:44:13.000000000 +0000 @@ -1,3 +1,2 @@ usr/bin/gdb usr/share/gdb -usr/share/man/man1/gdb.1 diff -Nru gdb-7.7/debian/patches/CVE-2014-8501.patch gdb-7.7.1/debian/patches/CVE-2014-8501.patch --- gdb-7.7/debian/patches/CVE-2014-8501.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2014-8501.patch 2017-06-08 11:57:13.000000000 +0000 @@ -0,0 +1,52 @@ +From 7e1e19887abd24aeb15066b141cdff5541e0ec8e Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Mon, 27 Oct 2014 14:45:06 +0000 +Subject: [PATCH] Fix a seg-fault in strings and other binutuils when parsing a + corrupt PE executable with an invalid value in the NumberOfRvaAndSizes field + of the AOUT header. + + PR binutils/17512 + * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries + with an invalid value for NumberOfRvaAndSizes. +--- + bfd/ChangeLog | 4 ++++ + bfd/peXXigen.c | 12 ++++++++++++ + 2 files changed, 16 insertions(+) + +#diff --git a/bfd/ChangeLog b/bfd/ChangeLog +#index 7ba4431..e1d9379 100644 +#--- a/bfd/ChangeLog +#+++ b/bfd/ChangeLog +#@@ -1,5 +1,9 @@ +# 2014-10-27 Nick Clifton +# +#+ PR binutils/17512 +#+ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries +#+ with an invalid value for NumberOfRvaAndSizes. +#+ +# PR binutils/17510 +# * elf.c (setup_group): Improve handling of corrupt group +# sections. +Index: gdb-7.7.1/bfd/peXXigen.c +=================================================================== +--- gdb-7.7.1.orig/bfd/peXXigen.c 2017-06-08 07:57:10.856366679 -0400 ++++ gdb-7.7.1/bfd/peXXigen.c 2017-06-08 07:57:10.836366437 -0400 +@@ -468,6 +468,18 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd, + { + int idx; + ++ /* PR 17512: Corrupt PE binaries can cause seg-faults. */ ++ if (a->NumberOfRvaAndSizes > 16) ++ { ++ (*_bfd_error_handler) ++ (_("%B: aout header specifies an invalid number of data-directory entries: %d"), ++ abfd, a->NumberOfRvaAndSizes); ++ /* Paranoia: If the number is corrupt, then assume that the ++ actual entries themselves might be corrupt as well. */ ++ a->NumberOfRvaAndSizes = 0; ++ } ++ ++ + for (idx = 0; idx < a->NumberOfRvaAndSizes; idx++) + { + /* If data directory is empty, rva also should be 0. */ diff -Nru gdb-7.7/debian/patches/CVE-2014-9939.patch gdb-7.7.1/debian/patches/CVE-2014-9939.patch --- gdb-7.7/debian/patches/CVE-2014-9939.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2014-9939.patch 2017-06-08 11:57:24.000000000 +0000 @@ -0,0 +1,88 @@ +From 7e27a9d5f22f9f7ead11738b1546d0b5c737266b Mon Sep 17 00:00:00 2001 +From: "Yuriy M. Kaminskiy" +Date: Tue, 4 Aug 2015 16:51:53 +0100 +Subject: [PATCH] Fix stack buffer overflows when parsing corrupt ihex files. + + PR binutils/18750 + * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message + and stack overflow when char is signed and \200-\376 was in place of hex + digit; also fixes \377 was handled as EOF instead of "incorrect character". + (ihex_read_section): Changed for consistency. + (ihex_bad_byte): Prevent (now impossible to trigger) stack + overflow and incorrect escape sequence handling. + * srec.c (srec_bad_byte): Likewise. + + * readelf.c (process_mips_specific): Fix incorrect escape + sequence handling. +--- + bfd/ChangeLog | 12 ++++++++++++ + bfd/ihex.c | 6 +++--- + bfd/srec.c | 2 +- + binutils/ChangeLog | 11 +++++++++++ + binutils/readelf.c | 2 +- + 5 files changed, 28 insertions(+), 5 deletions(-) + +#diff --git a/bfd/ChangeLog b/bfd/ChangeLog +#index 986299d..a8b3646 100644 +#--- a/bfd/ChangeLog +#+++ b/bfd/ChangeLog +#@@ -1,3 +1,15 @@ +#+2015-08-04 Yuriy M. Kaminskiy" +#+ Tyler Hicks +#+ +#+ PR binutils/18750 +#+ * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message +#+ and stack overflow when char is signed and \200-\376 was in place of hex +#+ digit; also fixes \377 was handled as EOF instead of "incorrect character". +#+ (ihex_read_section): Changed for consistency. +#+ (ihex_bad_byte): Prevent (now impossible to trigger) stack +#+ overflow and incorrect escape sequence handling. +#+ * srec.c (srec_bad_byte): Likewise. +#+ +# 2015-08-03 Hans-Peter Nilsson +# +# * elf32-cris.c (cris_elf_relocate_section) +Index: gdb-7.7.1/bfd/ihex.c +=================================================================== +--- gdb-7.7.1.orig/bfd/ihex.c 2017-06-08 07:57:20.356481702 -0400 ++++ gdb-7.7.1/bfd/ihex.c 2017-06-08 07:57:18.144454936 -0400 +@@ -220,7 +220,7 @@ ihex_bad_byte (bfd *abfd, unsigned int l + char buf[10]; + + if (! ISPRINT (c)) +- sprintf (buf, "\\%03o", (unsigned int) c); ++ sprintf (buf, "\\%03o", (unsigned int) c & 0xff); + else + { + buf[0] = c; +@@ -277,7 +277,7 @@ ihex_scan (bfd *abfd) + else + { + file_ptr pos; +- char hdr[8]; ++ unsigned char hdr[8]; + unsigned int i; + unsigned int len; + bfd_vma addr; +@@ -554,7 +554,7 @@ ihex_read_section (bfd *abfd, asection * + error = FALSE; + while ((c = ihex_get_byte (abfd, &error)) != EOF) + { +- char hdr[8]; ++ unsigned char hdr[8]; + unsigned int len; + unsigned int type; + unsigned int i; +Index: gdb-7.7.1/bfd/srec.c +=================================================================== +--- gdb-7.7.1.orig/bfd/srec.c 2017-06-08 07:57:20.356481702 -0400 ++++ gdb-7.7.1/bfd/srec.c 2017-06-08 07:57:19.244468248 -0400 +@@ -251,7 +251,7 @@ srec_bad_byte (bfd *abfd, + char buf[10]; + + if (! ISPRINT (c)) +- sprintf (buf, "\\%03o", (unsigned int) c); ++ sprintf (buf, "\\%03o", (unsigned int) c & 0xff); + else + { + buf[0] = c; diff -Nru gdb-7.7/debian/patches/CVE-2016-2226.patch gdb-7.7.1/debian/patches/CVE-2016-2226.patch --- gdb-7.7/debian/patches/CVE-2016-2226.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-2226.patch 2017-06-08 16:54:16.000000000 +0000 @@ -0,0 +1,114 @@ +Backport of: + +From b8106f544a7fd485b6959ebd197bdd99a8884416 Mon Sep 17 00:00:00 2001 +From: bernds +Date: Fri, 8 Apr 2016 12:10:21 +0000 +Subject: [PATCH] =?utf8?q?Fix=20memory=20allocation=20size=20overflows=20(?= + =?utf8?q?PR69687,=20patch=20by=20Marcel=20B=C3=B6hme)?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + + PR c++/69687 + * cplus-dem.c: Include if available. + (INT_MAX): Define if necessary. + (remember_type, remember_Ktype, register_Btype, string_need): + Abort if we detect cases where we the size of the allocation would + overflow. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234829 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libiberty/ChangeLog | 7 +++++++ + libiberty/cplus-dem.c | 15 +++++++++++++++ + 2 files changed, 22 insertions(+) + +#diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog +#index 8e82a5f..2a34356 100644 +#--- a/libiberty/ChangeLog +#+++ b/libiberty/ChangeLog +#@@ -1,5 +1,12 @@ +# 2016-04-08 Marcel Böhme +# +#+ PR c++/69687 +#+ * cplus-dem.c: Include if available. +#+ (INT_MAX): Define if necessary. +#+ (remember_type, remember_Ktype, register_Btype, string_need): +#+ Abort if we detect cases where we the size of the allocation would +#+ overflow. +#+ +# PR c++/70498 +# * cplus-dem.c (gnu_special): Handle case where consume_count returns +# -1. +Index: gdb-7.7.1/libiberty/cplus-dem.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cplus-dem.c 2017-06-08 07:57:35.660666625 -0400 ++++ gdb-7.7.1/libiberty/cplus-dem.c 2017-06-08 07:57:35.608665998 -0400 +@@ -56,6 +56,13 @@ void * malloc (); + void * realloc (); + #endif + ++#ifdef HAVE_LIMITS_H ++#include ++#endif ++#ifndef INT_MAX ++# define INT_MAX (int)(((unsigned int) ~0) >> 1) /* 0x7FFFFFFF */ ++#endif ++ + #include + #undef CURRENT_DEMANGLING_STYLE + #define CURRENT_DEMANGLING_STYLE work->options +@@ -4231,6 +4238,8 @@ remember_type (struct work_stuff *work, + } + else + { ++ if (work -> typevec_size > INT_MAX / 2) ++ xmalloc_failed (INT_MAX); + work -> typevec_size *= 2; + work -> typevec + = XRESIZEVEC (char *, work->typevec, work->typevec_size); +@@ -4258,6 +4267,8 @@ remember_Ktype (struct work_stuff *work, + } + else + { ++ if (work -> ksize > INT_MAX / 2) ++ xmalloc_failed (INT_MAX); + work -> ksize *= 2; + work -> ktypevec + = XRESIZEVEC (char *, work->ktypevec, work->ksize); +@@ -4287,6 +4298,8 @@ register_Btype (struct work_stuff *work) + } + else + { ++ if (work -> bsize > INT_MAX / 2) ++ xmalloc_failed (INT_MAX); + work -> bsize *= 2; + work -> btypevec + = XRESIZEVEC (char *, work->btypevec, work->bsize); +@@ -4741,6 +4754,8 @@ string_need (string *s, int n) + else if (s->e - s->p < n) + { + tem = s->p - s->b; ++ if (n > INT_MAX / 2 - tem) ++ xmalloc_failed (INT_MAX); + n += tem; + n *= 2; + s->b = XRESIZEVEC (char, s->b, n); +Index: gdb-7.11.1/gdb/common/common-utils.c +=================================================================== +--- gdb-7.11.1.orig/gdb/common/common-utils.c 2016-02-09 22:19:39.000000000 -0500 ++++ gdb-7.11.1/gdb/common/common-utils.c 2017-06-08 12:48:46.779145822 -0400 +@@ -100,6 +100,12 @@ xfree (void *ptr) + free (ptr); /* ARI: free */ + } + ++void ++xmalloc_failed (size_t size) ++{ ++ malloc_failure (size); ++} ++ + /* Like asprintf/vasprintf but get an internal_error if the call + fails. */ + diff -Nru gdb-7.7/debian/patches/CVE-2016-4487_4488.patch gdb-7.7.1/debian/patches/CVE-2016-4487_4488.patch --- gdb-7.7/debian/patches/CVE-2016-4487_4488.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-4487_4488.patch 2017-06-08 12:00:49.000000000 +0000 @@ -0,0 +1,68 @@ +Backport of: + +From be3004dc350a820a5b0320b34bd05673ba534058 Mon Sep 17 00:00:00 2001 +From: law +Date: Thu, 31 Mar 2016 17:20:53 +0000 +Subject: [PATCH] * cplus-dem.c (squangle_mop_up): Zero bsize/ksize + after freeing btypevec/ktypevec. * testsuite/demangle-expected: Add + coverage tests. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234645 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libiberty/ChangeLog | 7 +++++++ + libiberty/cplus-dem.c | 2 ++ + libiberty/testsuite/demangle-expected | 10 ++++++++++ + 3 files changed, 19 insertions(+) + +#diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog +#index d11f4ce..b4054bd 100644 +#--- a/libiberty/ChangeLog +#+++ b/libiberty/ChangeLog +#@@ -1,3 +1,10 @@ +#+2016-03-31 Mikhail Maltsev +#+ Marcel Bohme boehme.marcel@gmail.com +#+ +#+ * cplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing +#+ btypevec/ktypevec. +#+ * testsuite/demangle-expected: Add coverage tests. +#+ +# 2016-01-27 Iain Buclaw +# +# * d-demangle.c (dlang_call_convention): Handle extern Objective-C +Index: gdb-7.7.1/libiberty/cplus-dem.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cplus-dem.c 2017-06-08 07:57:49.508833570 -0400 ++++ gdb-7.7.1/libiberty/cplus-dem.c 2017-06-08 07:58:32.025343934 -0400 +@@ -1225,10 +1225,14 @@ squangle_mop_up (struct work_stuff *work + if (work -> btypevec != NULL) + { + free ((char *) work -> btypevec); ++ work->btypevec = NULL; ++ work->bsize = 0; + } + if (work -> ktypevec != NULL) + { + free ((char *) work -> ktypevec); ++ work->ktypevec = NULL; ++ work->ksize = 0; + } + } + +Index: gdb-7.7.1/libiberty/testsuite/demangle-expected +=================================================================== +--- gdb-7.7.1.orig/libiberty/testsuite/demangle-expected 2017-06-08 07:57:49.508833570 -0400 ++++ gdb-7.7.1/libiberty/testsuite/demangle-expected 2017-06-08 07:58:50.909569610 -0400 +@@ -4343,3 +4343,13 @@ cereal::detail::InputBindingMap >(std::function&&)::{lambda()#1}*& std::_Any_data::_M_access >(void post >(std::function&&)::{lambda()#1}*&&)::{lambda()#1}*>() ++# ++# Tests a use-after-free problem ++ ++_Q.__0 ++::Q.(void) ++# ++# Tests a use-after-free problem ++ ++_Q10-__9cafebabe. ++cafebabe.::-(void) diff -Nru gdb-7.7/debian/patches/CVE-2016-4489.patch gdb-7.7.1/debian/patches/CVE-2016-4489.patch --- gdb-7.7/debian/patches/CVE-2016-4489.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-4489.patch 2017-06-08 11:59:16.000000000 +0000 @@ -0,0 +1,51 @@ +From 053ec2207203a194d2ae82e2f164009aad3f14d2 Mon Sep 17 00:00:00 2001 +From: bernds +Date: Fri, 8 Apr 2016 12:06:59 +0000 +Subject: [PATCH] =?utf8?q?Handle=20an=20overflow=20case=20(PR70498,=20patc?= + =?utf8?q?h=20by=20Marcel=20B=C3=B6hme).?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + + PR c++/70498 + * cplus-dem.c (gnu_special): Handle case where consume_count returns + -1. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234828 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libiberty/ChangeLog | 6 ++++++ + libiberty/cplus-dem.c | 5 +++++ + 2 files changed, 11 insertions(+) + +#diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog +#index 1e59c53..8e82a5f 100644 +#--- a/libiberty/ChangeLog +#+++ b/libiberty/ChangeLog +#@@ -1,3 +1,9 @@ +#+2016-04-08 Marcel Böhme +#+ +#+ PR c++/70498 +#+ * cplus-dem.c (gnu_special): Handle case where consume_count returns +#+ -1. +#+ +# 2016-03-31 Mikhail Maltsev +# Marcel Bohme boehme.marcel@gmail.com +# +Index: gdb-7.7.1/libiberty/cplus-dem.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cplus-dem.c 2017-06-08 07:59:14.137846396 -0400 ++++ gdb-7.7.1/libiberty/cplus-dem.c 2017-06-08 07:59:14.129846300 -0400 +@@ -2990,6 +2990,11 @@ gnu_special (struct work_stuff *work, co + success = 1; + break; + } ++ else if (n == -1) ++ { ++ success = 0; ++ break; ++ } + } + else + { diff -Nru gdb-7.7/debian/patches/CVE-2016-4490.patch gdb-7.7.1/debian/patches/CVE-2016-4490.patch --- gdb-7.7/debian/patches/CVE-2016-4490.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-4490.patch 2017-06-08 12:00:29.000000000 +0000 @@ -0,0 +1,264 @@ +Backport of: + +From 7d235b1b5ea35352c54957ef5530d9a02c46962f Mon Sep 17 00:00:00 2001 +From: bernds +Date: Mon, 2 May 2016 17:06:40 +0000 +Subject: [PATCH] =?utf8?q?Demangler=20integer=20overflow=20fixes=20from=20?= + =?utf8?q?Marcel=20B=C3=B6hme.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + + PR c++/70498 + * cp-demangle.c: Parse numbers as integer instead of long to avoid + overflow after sanity checks. Include if available. + (INT_MAX): Define if necessary. + (d_make_template_param): Takes integer argument instead of long. + (d_make_function_param): Likewise. + (d_append_num): Likewise. + (d_identifier): Likewise. + (d_number): Parse as and return integer. + (d_compact_number): Handle overflow. + (d_source_name): Change variable type to integer for parsed number. + (d_java_resource): Likewise. + (d_special_name): Likewise. + (d_discriminator): Likewise. + (d_unnamed_type): Likewise. + * testsuite/demangle-expected: Add regression test cases. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235767 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libiberty/ChangeLog | 19 +++++++++++++ + libiberty/cp-demangle.c | 52 ++++++++++++++++++++--------------- + libiberty/testsuite/demangle-expected | 14 ++++++++-- + 3 files changed, 61 insertions(+), 24 deletions(-) + +#diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog +#index 7497392..1407cd3 100644 +#--- a/libiberty/ChangeLog +#+++ b/libiberty/ChangeLog +#@@ -1,3 +1,22 @@ +#+2016-05-02 Marcel Böhme +#+ +#+ PR c++/70498 +#+ * cp-demangle.c: Parse numbers as integer instead of long to avoid +#+ overflow after sanity checks. Include if available. +#+ (INT_MAX): Define if necessary. +#+ (d_make_template_param): Takes integer argument instead of long. +#+ (d_make_function_param): Likewise. +#+ (d_append_num): Likewise. +#+ (d_identifier): Likewise. +#+ (d_number): Parse as and return integer. +#+ (d_compact_number): Handle overflow. +#+ (d_source_name): Change variable type to integer for parsed number. +#+ (d_java_resource): Likewise. +#+ (d_special_name): Likewise. +#+ (d_discriminator): Likewise. +#+ (d_unnamed_type): Likewise. +#+ * testsuite/demangle-expected: Add regression test cases. +#+ +# 2016-04-30 Oleg Endo +# +# * configure: Remove SH5 support. +Index: gdb-7.7.1/libiberty/cp-demangle.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cp-demangle.c 2017-06-08 07:59:31.318050563 -0400 ++++ gdb-7.7.1/libiberty/cp-demangle.c 2017-06-08 08:00:09.254499826 -0400 +@@ -124,6 +124,13 @@ extern char *alloca (); + # endif /* alloca */ + #endif /* HAVE_ALLOCA_H */ + ++#ifdef HAVE_LIMITS_H ++#include ++#endif ++#ifndef INT_MAX ++# define INT_MAX (int)(((unsigned int) ~0) >> 1) /* 0x7FFFFFFF */ ++#endif ++ + #include "ansidecl.h" + #include "libiberty.h" + #include "demangle.h" +@@ -394,7 +401,7 @@ d_make_dtor (struct d_info *, enum gnu_v + struct demangle_component *); + + static struct demangle_component * +-d_make_template_param (struct d_info *, long); ++d_make_template_param (struct d_info *, int); + + static struct demangle_component * + d_make_sub (struct d_info *, const char *, int); +@@ -417,7 +424,7 @@ static struct demangle_component *d_unqu + + static struct demangle_component *d_source_name (struct d_info *); + +-static long d_number (struct d_info *); ++static int d_number (struct d_info *); + + static struct demangle_component *d_identifier (struct d_info *, int); + +@@ -1097,7 +1104,7 @@ d_make_dtor (struct d_info *di, enum gnu + /* Add a new template parameter. */ + + static struct demangle_component * +-d_make_template_param (struct d_info *di, long i) ++d_make_template_param (struct d_info *di, int i) + { + struct demangle_component *p; + +@@ -1113,7 +1120,7 @@ d_make_template_param (struct d_info *di + /* Add a new function parameter. */ + + static struct demangle_component * +-d_make_function_param (struct d_info *di, long i) ++d_make_function_param (struct d_info *di, int i) + { + struct demangle_component *p; + +@@ -1587,7 +1594,7 @@ d_unqualified_name (struct d_info *di) + static struct demangle_component * + d_source_name (struct d_info *di) + { +- long len; ++ int len; + struct demangle_component *ret; + + len = d_number (di); +@@ -1600,12 +1607,12 @@ d_source_name (struct d_info *di) + + /* number ::= [n] <(non-negative decimal integer)> */ + +-static long ++static int + d_number (struct d_info *di) + { + int negative; + char peek; +- long ret; ++ int ret; + + negative = 0; + peek = d_peek_char (di); +@@ -1832,7 +1839,7 @@ d_java_resource (struct d_info *di) + { + struct demangle_component *p = NULL; + struct demangle_component *next = NULL; +- long len, i; ++ int len, i; + char c; + const char *str; + +@@ -1974,7 +1981,7 @@ d_special_name (struct d_info *di) + case 'C': + { + struct demangle_component *derived_type; +- long offset; ++ int offset; + struct demangle_component *base_type; + + derived_type = cplus_demangle_type (di); +@@ -2897,10 +2904,10 @@ d_pointer_to_member_type (struct d_info + + /* _ */ + +-static long ++static int + d_compact_number (struct d_info *di) + { +- long num; ++ int num; + if (d_peek_char (di) == '_') + num = 0; + else if (d_peek_char (di) == 'n') +@@ -2908,7 +2915,7 @@ d_compact_number (struct d_info *di) + else + num = d_number (di) + 1; + +- if (! d_check_char (di, '_')) ++ if (num < 0 || ! d_check_char (di, '_')) + return -1; + return num; + } +@@ -2920,7 +2927,7 @@ d_compact_number (struct d_info *di) + static struct demangle_component * + d_template_param (struct d_info *di) + { +- long param; ++ int param; + + if (! d_check_char (di, 'T')) + return NULL; +@@ -3122,9 +3129,10 @@ d_expression_1 (struct d_info *di) + } + else + { +- index = d_compact_number (di) + 1; +- if (index == 0) ++ index = d_compact_number (di); ++ if (index == INT_MAX || index == -1) + return NULL; ++ index ++; + } + return d_make_function_param (di, index); + } +@@ -3447,7 +3455,7 @@ d_local_name (struct d_info *di) + static int + d_discriminator (struct d_info *di) + { +- long discrim; ++ int discrim; + + if (d_peek_char (di) != '_') + return 1; +@@ -3503,7 +3511,7 @@ static struct demangle_component * + d_unnamed_type (struct d_info *di) + { + struct demangle_component *ret; +- long num; ++ int num; + + if (! d_check_char (di, 'U')) + return NULL; +@@ -4016,10 +4024,10 @@ d_append_string (struct d_print_info *dp + } + + static inline void +-d_append_num (struct d_print_info *dpi, long l) ++d_append_num (struct d_print_info *dpi, int l) + { + char buf[25]; +- sprintf (buf,"%ld", l); ++ sprintf (buf,"%d", l); + d_append_string (dpi, buf); + } + +Index: gdb-7.7.1/libiberty/testsuite/demangle-expected +=================================================================== +--- gdb-7.7.1.orig/libiberty/testsuite/demangle-expected 2017-06-08 07:59:31.318050563 -0400 ++++ gdb-7.7.1/libiberty/testsuite/demangle-expected 2017-06-08 07:59:31.278050089 -0400 +@@ -4344,12 +4344,22 @@ cereal::detail::InputBindingMap >(std::function&&)::{lambda()#1}*& std::_Any_data::_M_access >(void post >(std::function&&)::{lambda()#1}*&&)::{lambda()#1}*>() + # +-# Tests a use-after-free problem ++# Tests a use-after-free problem PR70481 + + _Q.__0 + ::Q.(void) + # +-# Tests a use-after-free problem ++# Tests a use-after-free problem PR70481 + + _Q10-__9cafebabe. + cafebabe.::-(void) ++# ++# Tests integer overflow problem PR70492 ++ ++__vt_90000000000cafebabe ++__vt_90000000000cafebabe ++# ++# Tests write access violation PR70498 ++ ++_Z80800000000000000000000 ++_Z80800000000000000000000 diff -Nru gdb-7.7/debian/patches/CVE-2016-4491-1.patch gdb-7.7.1/debian/patches/CVE-2016-4491-1.patch --- gdb-7.7/debian/patches/CVE-2016-4491-1.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-4491-1.patch 2017-06-08 12:03:11.000000000 +0000 @@ -0,0 +1,349 @@ +Backport of: + +From a664c62cf916d036dba3d25973e5bb92c523536e Mon Sep 17 00:00:00 2001 +From: trippels +Date: Wed, 8 Mar 2017 14:28:38 +0000 +Subject: [PATCH] Fix PR demangler/70909 and 67264 (endless demangler + recursion) + +ChangeLog: + + PR demangler/70909 + PR demangler/67264 + * include/demangle.h: Add d_printing to struct demangle_component + and pass struct demangle_component as non const. + +libiberty/ChangeLog: + + PR demangler/70909 + PR demangler/67264 + * cp-demangle.c: Fix endless recursion. Pass + struct demangle_component as non const. + (d_make_empty): Initialize variable. + (d_print_comp_inner): Limit recursion. + (d_print_comp): Decrement variable. + * cp-demint.c (cplus_demangle_fill_component): Initialize + variable. + (cplus_demangle_fill_builtin_type): Likewise. + (cplus_demangle_fill_operator): Likewise. + * testsuite/demangle-expected: Add tests. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245978 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + ChangeLog | 7 +++++ + include/demangle.h | 9 ++++-- + libiberty/ChangeLog | 15 +++++++++ + libiberty/cp-demangle.c | 59 ++++++++++++++++++++--------------- + libiberty/cp-demint.c | 3 ++ + libiberty/testsuite/demangle-expected | 31 ++++++++++++++++++ + 6 files changed, 97 insertions(+), 27 deletions(-) + +#diff --git a/ChangeLog b/ChangeLog +#index bdca057..27168c8 100644 +#--- a/ChangeLog +#+++ b/ChangeLog +#@@ -1,3 +1,10 @@ +#+2017-03-08 Mark Wielaard +#+ +#+ PR demangler/70909 +#+ PR demangler/67264 +#+ * include/demangle.h: Add d_printing to struct demangle_component +#+ and pass struct demangle_component as non const. +#+ +# 2017-02-26 Gerald Pfeifer +# +# * MAINTAINERS: Remove Neil Booth as option handling maintainer. +Index: gdb-7.7.1/include/demangle.h +=================================================================== +--- gdb-7.7.1.orig/include/demangle.h 2017-06-08 08:01:33.663492341 -0400 ++++ gdb-7.7.1/include/demangle.h 2017-06-08 08:01:33.647492153 -0400 +@@ -455,6 +455,11 @@ struct demangle_component + /* The type of this component. */ + enum demangle_component_type type; + ++ /* Guard against recursive component printing. ++ Initialize to zero. Private to d_print_comp. ++ All other fields are final after initialization. */ ++ int d_printing; ++ + union + { + /* For DEMANGLE_COMPONENT_NAME. */ +@@ -649,7 +654,7 @@ cplus_demangle_v3_components (const char + + extern char * + cplus_demangle_print (int options, +- const struct demangle_component *tree, ++ struct demangle_component *tree, + int estimated_length, + size_t *p_allocated_size); + +@@ -669,7 +674,7 @@ cplus_demangle_print (int options, + + extern int + cplus_demangle_print_callback (int options, +- const struct demangle_component *tree, ++ struct demangle_component *tree, + demangle_callbackref callback, void *opaque); + + #ifdef __cplusplus +Index: gdb-7.7.1/libiberty/cp-demangle.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cp-demangle.c 2017-06-08 08:01:33.663492341 -0400 ++++ gdb-7.7.1/libiberty/cp-demangle.c 2017-06-08 08:02:53.908427929 -0400 +@@ -169,10 +169,10 @@ static struct demangle_component *d_mang + static struct demangle_component *d_type (struct d_info *); + + #define cplus_demangle_print d_print +-static char *d_print (int, const struct demangle_component *, int, size_t *); ++static char *d_print (int, struct demangle_component *, int, size_t *); + + #define cplus_demangle_print_callback d_print_callback +-static int d_print_callback (int, const struct demangle_component *, ++static int d_print_callback (int, struct demangle_component *, + demangle_callbackref, void *); + + #define cplus_demangle_init_info d_init_info +@@ -261,7 +261,7 @@ struct d_print_mod + in which they appeared in the mangled string. */ + struct d_print_mod *next; + /* The modifier. */ +- const struct demangle_component *mod; ++ struct demangle_component *mod; + /* Whether this modifier was printed. */ + int printed; + /* The list of templates which applies to this modifier. */ +@@ -521,7 +521,7 @@ static inline void d_append_string (stru + static inline char d_last_char (struct d_print_info *); + + static void +-d_print_comp (struct d_print_info *, int, const struct demangle_component *); ++d_print_comp (struct d_print_info *, int, struct demangle_component *); + + static void + d_print_java_identifier (struct d_print_info *, const char *, int); +@@ -530,23 +530,23 @@ static void + d_print_mod_list (struct d_print_info *, int, struct d_print_mod *, int); + + static void +-d_print_mod (struct d_print_info *, int, const struct demangle_component *); ++d_print_mod (struct d_print_info *, int, struct demangle_component *); + + static void + d_print_function_type (struct d_print_info *, int, +- const struct demangle_component *, ++ struct demangle_component *, + struct d_print_mod *); + + static void + d_print_array_type (struct d_print_info *, int, +- const struct demangle_component *, ++ struct demangle_component *, + struct d_print_mod *); + + static void +-d_print_expr_op (struct d_print_info *, int, const struct demangle_component *); ++d_print_expr_op (struct d_print_info *, int, struct demangle_component *); + + static void +-d_print_cast (struct d_print_info *, int, const struct demangle_component *); ++d_print_cast (struct d_print_info *, int, struct demangle_component *); + + static int d_demangle_callback (const char *, int, + demangle_callbackref, void *); +@@ -872,6 +872,7 @@ d_make_empty (struct d_info *di) + if (di->next_comp >= di->num_comps) + return NULL; + p = &di->comps[di->next_comp]; ++ p->d_printing = 0; + ++di->next_comp; + return p; + } +@@ -4049,7 +4050,7 @@ d_last_char (struct d_print_info *dpi) + CP_STATIC_IF_GLIBCPP_V3 + int + cplus_demangle_print_callback (int options, +- const struct demangle_component *dc, ++ struct demangle_component *dc, + demangle_callbackref callback, void *opaque) + { + struct d_print_info dpi; +@@ -4088,7 +4089,7 @@ cplus_demangle_print_callback (int optio + + CP_STATIC_IF_GLIBCPP_V3 + char * +-cplus_demangle_print (int options, const struct demangle_component *dc, ++cplus_demangle_print (int options, struct demangle_component *dc, + int estimate, size_t *palc) + { + struct d_growable_string dgs; +@@ -4217,7 +4218,7 @@ d_pack_length (const struct demangle_com + + static void + d_print_subexpr (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + int simple = 0; + if (dc->type == DEMANGLE_COMPONENT_NAME +@@ -4292,11 +4293,11 @@ d_get_saved_scope (struct d_print_info * + + static void + d_print_comp_inner (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + /* Magic variable to let reference smashing skip over the next modifier + without needing to modify *dc. */ +- const struct demangle_component *mod_inner = NULL; ++ struct demangle_component *mod_inner = NULL; + + /* Variable used to store the current templates while a previously + captured scope is used. */ +@@ -4677,7 +4678,7 @@ d_print_comp_inner (struct d_print_info + case DEMANGLE_COMPONENT_RVALUE_REFERENCE: + { + /* Handle reference smashing: & + && = &. */ +- const struct demangle_component *sub = d_left (dc); ++ struct demangle_component *sub = d_left (dc); + if (sub->type == DEMANGLE_COMPONENT_TEMPLATE_PARAM) + { + struct d_saved_scope *scope = d_get_saved_scope (dpi, sub); +@@ -5359,9 +5360,16 @@ d_print_comp_inner (struct d_print_info + + static void + d_print_comp (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + struct d_component_stack self; ++ if (dc == NULL || dc->d_printing > 1) ++ { ++ d_print_error (dpi); ++ return; ++ } ++ else ++ dc->d_printing++; + + self.dc = dc; + self.parent = dpi->component_stack; +@@ -5370,6 +5378,7 @@ d_print_comp (struct d_print_info *dpi, + d_print_comp_inner (dpi, options, dc); + + dpi->component_stack = self.parent; ++ dc->d_printing--; + } + + /* Print a Java dentifier. For Java we try to handle encoded extended +@@ -5520,7 +5529,7 @@ d_print_mod_list (struct d_print_info *d + + static void + d_print_mod (struct d_print_info *dpi, int options, +- const struct demangle_component *mod) ++ struct demangle_component *mod) + { + switch (mod->type) + { +@@ -5589,7 +5598,7 @@ d_print_mod (struct d_print_info *dpi, i + + static void + d_print_function_type (struct d_print_info *dpi, int options, +- const struct demangle_component *dc, ++ struct demangle_component *dc, + struct d_print_mod *mods) + { + int need_paren; +@@ -5671,7 +5680,7 @@ d_print_function_type (struct d_print_in + + static void + d_print_array_type (struct d_print_info *dpi, int options, +- const struct demangle_component *dc, ++ struct demangle_component *dc, + struct d_print_mod *mods) + { + int need_space; +@@ -5725,7 +5734,7 @@ d_print_array_type (struct d_print_info + + static void + d_print_expr_op (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + if (dc->type == DEMANGLE_COMPONENT_OPERATOR) + d_append_buffer (dpi, dc->u.s_operator.op->name, +@@ -5738,7 +5747,7 @@ d_print_expr_op (struct d_print_info *dp + + static void + d_print_cast (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++ struct demangle_component *dc) + { + struct d_print_template dpt; + +Index: gdb-7.7.1/libiberty/cp-demint.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cp-demint.c 2017-06-08 08:01:33.663492341 -0400 ++++ gdb-7.7.1/libiberty/cp-demint.c 2017-06-08 08:01:33.651492201 -0400 +@@ -122,6 +122,7 @@ cplus_demangle_fill_component (struct de + p->type = type; + p->u.s_binary.left = left; + p->u.s_binary.right = right; ++ p->d_printing = 0; + + return 1; + } +@@ -145,6 +146,7 @@ cplus_demangle_fill_builtin_type (struct + { + p->type = DEMANGLE_COMPONENT_BUILTIN_TYPE; + p->u.s_builtin.type = &cplus_demangle_builtin_types[i]; ++ p->d_printing = 0; + return 1; + } + } +@@ -171,6 +173,7 @@ cplus_demangle_fill_operator (struct dem + { + p->type = DEMANGLE_COMPONENT_OPERATOR; + p->u.s_operator.op = &cplus_demangle_operators[i]; ++ p->d_printing = 0; + return 1; + } + } +Index: gdb-7.7.1/libiberty/testsuite/demangle-expected +=================================================================== +--- gdb-7.7.1.orig/libiberty/testsuite/demangle-expected 2017-06-08 08:01:33.663492341 -0400 ++++ gdb-7.7.1/libiberty/testsuite/demangle-expected 2017-06-08 08:01:33.651492201 -0400 +@@ -4381,3 +4381,34 @@ __t2m05B500000000000000000_ + + __10%0__S4_0T0T0 + %0<>::%0(%0<>) ++ ++# ++# Test recursion PR67264 ++_Z1KIStcvT_E ++_Z1KIStcvT_E ++ ++_ZcvT_IIS0_EE ++_ZcvT_IIS0_EE ++ ++_ZcvT_IZcvT_E1fE ++_ZcvT_IZcvT_E1fE ++ ++_Z1gINcvT_EE ++_Z1gINcvT_EE ++ ++_ZcvT_ILZcvDTT_EEE ++_ZcvT_ILZcvDTT_EEE ++ ++_Z1gIJOOT_EEOT_c ++_Z1gIJOOT_EEOT_c ++ ++_Z1KMMMMMMMMMMMMMMMA_xooooooooooooooo ++_Z1KMMMMMMMMMMMMMMMA_xooooooooooooooo ++ ++_ZdvMMMMMMMMMMMMMrrrrA_DTdvfp_fp_Eededilfdfdfdfd ++_ZdvMMMMMMMMMMMMMrrrrA_DTdvfp_fp_Eededilfdfdfdfd ++# ++# Test for Infinite Recursion PR70909 ++ ++_Z1MA_aMMMMA_MMA_MMMMMMMMSt1MS_o11T0000000000t2M0oooozoooo ++_Z1MA_aMMMMA_MMA_MMMMMMMMSt1MS_o11T0000000000t2M0oooozoooo diff -Nru gdb-7.7/debian/patches/CVE-2016-4491-2.patch gdb-7.7.1/debian/patches/CVE-2016-4491-2.patch --- gdb-7.7/debian/patches/CVE-2016-4491-2.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-4491-2.patch 2017-06-08 12:03:18.000000000 +0000 @@ -0,0 +1,104 @@ +Backport of: + +From b4cd77b1236a743dd5d94bc210534856a12e6efe Mon Sep 17 00:00:00 2001 +From: mark +Date: Fri, 21 Apr 2017 09:02:03 +0000 +Subject: [PATCH] libiberty: Limit demangler maximum d_print_comp recursion + call depth. + +The fix for PR demangler/70909 and 67264 (endless demangler recursion) +catches when a demangle_component is printed in a cycle. But that doesn't +protect the call stack blowing up from non-cyclic nested types printed +recursively through d_print_comp. This can happen by a (very) long mangled +string that simply creates a very deep pointer or qualifier chain. Limit +the recursive d_print_comp call depth for a d_print_info to 1K nested +types. + +libiberty/ChangeLog: + + * cp-demangle.c (MAX_RECURSION_COUNT): New constant. + (struct d_print_info): Add recursion field. + (d_print_init): Initialize recursion. + (d_print_comp): Check and update d_print_info recursion depth. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247056 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libiberty/ChangeLog | 7 +++++++ + libiberty/cp-demangle.c | 15 ++++++++++++--- + 2 files changed, 19 insertions(+), 3 deletions(-) + +#diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog +#index 673eb26..34e585e 100644 +#--- a/libiberty/ChangeLog +#+++ b/libiberty/ChangeLog +#@@ -1,5 +1,12 @@ +# 2017-04-21 Mark Wielaard +# +#+ * cp-demangle.c (MAX_RECURSION_COUNT): New constant. +#+ (struct d_print_info): Add recursion field. +#+ (d_print_init): Initialize recursion. +#+ (d_print_comp): Check and update d_print_info recursion depth. +#+ +#+2017-04-21 Mark Wielaard +#+ +# * cp-demangle.c (d_substitution): Return NULL if d_add_substitution +# fails. +# +Index: gdb-7.7.1/libiberty/cp-demangle.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cp-demangle.c 2017-06-08 08:03:16.472689773 -0400 ++++ gdb-7.7.1/libiberty/cp-demangle.c 2017-06-08 08:03:16.460689633 -0400 +@@ -317,6 +317,9 @@ struct d_info_checkpoint + int expansion; + }; + ++/* Maximum number of times d_print_comp may be called recursively. */ ++#define MAX_RECURSION_COUNT 1024 ++ + enum { D_PRINT_BUFFER_LENGTH = 256 }; + struct d_print_info + { +@@ -339,6 +342,9 @@ struct d_print_info + struct d_print_mod *modifiers; + /* Set to 1 if we saw a demangling error. */ + int demangle_failure; ++ /* Number of times d_print_comp was recursively called. Should not ++ be bigger than MAX_RECURSION_COUNT. */ ++ int recursion; + /* The current index into any template argument packs we are using + for printing. */ + int pack_index; +@@ -3954,6 +3960,7 @@ d_print_init (struct d_print_info *dpi, + dpi->opaque = opaque; + + dpi->demangle_failure = 0; ++ dpi->recursion = 0; + + dpi->component_stack = NULL; + +@@ -5363,13 +5370,14 @@ d_print_comp (struct d_print_info *dpi, + struct demangle_component *dc) + { + struct d_component_stack self; +- if (dc == NULL || dc->d_printing > 1) ++ if (dc == NULL || dc->d_printing > 1 || dpi->recursion > MAX_RECURSION_COUNT) + { + d_print_error (dpi); + return; + } +- else +- dc->d_printing++; ++ ++ dc->d_printing++; ++ dpi->recursion++; + + self.dc = dc; + self.parent = dpi->component_stack; +@@ -5379,6 +5387,7 @@ d_print_comp (struct d_print_info *dpi, + + dpi->component_stack = self.parent; + dc->d_printing--; ++ dpi->recursion--; + } + + /* Print a Java dentifier. For Java we try to handle encoded extended diff -Nru gdb-7.7/debian/patches/CVE-2016-4491-3.patch gdb-7.7.1/debian/patches/CVE-2016-4491-3.patch --- gdb-7.7/debian/patches/CVE-2016-4491-3.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-4491-3.patch 2017-06-09 18:30:31.000000000 +0000 @@ -0,0 +1,92 @@ +From b9da89d161e3903faa335f444af2bf05e40f926e Mon Sep 17 00:00:00 2001 +From: mark +Date: Mon, 13 Mar 2017 18:26:47 +0000 +Subject: [PATCH] Merge libiberty: Initialize d_printing in all + cplus_demangle_fill_* functions. + +While integrating the d_printing recursion guard change into gdb I +noticed we forgot to initialize the demangle_component d_printing +field in cplus_demangle_fill_{name,extended_operator,ctor,dtor}. +As is done in cplus_demangle_fill_{component,builtin_type,operator}. +It happened to work because in gcc all demangle_components were +allocated through d_make_empty. But gdb has its own allocation +mechanism (as might other users). + +libiberty/ChangeLog: + + * cp-demangle.c (cplus_demangle_fill_name): Initialize + demangle_component d_printing. + (cplus_demangle_fill_extended_operator): Likewise. + (cplus_demangle_fill_ctor): Likewise. + (cplus_demangle_fill_dtor): Likewise. + +gdb/ChangeLog: + + * cp-name-parser.y (make_empty): Initialize d_printing to zero. +--- + gdb/ChangeLog | 4 ++++ + gdb/cp-name-parser.y | 1 + + libiberty/ChangeLog | 8 ++++++++ + libiberty/cp-demangle.c | 4 ++++ + 4 files changed, 17 insertions(+) + +#diff --git a/gdb/ChangeLog b/gdb/ChangeLog +#index e4c4432..7de2498 100644 +#--- a/gdb/ChangeLog +#+++ b/gdb/ChangeLog +#@@ -1,3 +1,7 @@ +#+2017-03-13 Mark Wielaard +#+ +#+ * cp-name-parser.y (make_empty): Initialize d_printing to zero. +#+ +# 2017-03-10 Keith Seitz +# +# PR c++/8218 +Index: gdb-7.7.1/gdb/cp-name-parser.y +=================================================================== +--- gdb-7.7.1.orig/gdb/cp-name-parser.y 2017-06-09 14:30:29.644900014 -0400 ++++ gdb-7.7.1/gdb/cp-name-parser.y 2017-06-09 14:30:29.624899764 -0400 +@@ -207,6 +207,7 @@ make_empty (enum demangle_component_type + { + struct demangle_component *ret = d_grab (); + ret->type = d_type; ++ ret->d_printing = 0; + return ret; + } + +Index: gdb-7.7.1/libiberty/cp-demangle.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cp-demangle.c 2017-06-09 14:30:29.644900014 -0400 ++++ gdb-7.7.1/libiberty/cp-demangle.c 2017-06-09 14:30:29.628899814 -0400 +@@ -809,6 +809,7 @@ cplus_demangle_fill_name (struct demangl + { + if (p == NULL || s == NULL || len == 0) + return 0; ++ p->d_printing = 0; + p->type = DEMANGLE_COMPONENT_NAME; + p->u.s_name.s = s; + p->u.s_name.len = len; +@@ -824,6 +825,7 @@ cplus_demangle_fill_extended_operator (s + { + if (p == NULL || args < 0 || name == NULL) + return 0; ++ p->d_printing = 0; + p->type = DEMANGLE_COMPONENT_EXTENDED_OPERATOR; + p->u.s_extended_operator.args = args; + p->u.s_extended_operator.name = name; +@@ -843,6 +845,7 @@ cplus_demangle_fill_ctor (struct demangl + || (int) kind < gnu_v3_complete_object_ctor + || (int) kind > gnu_v3_object_ctor_group) + return 0; ++ p->d_printing = 0; + p->type = DEMANGLE_COMPONENT_CTOR; + p->u.s_ctor.kind = kind; + p->u.s_ctor.name = name; +@@ -862,6 +865,7 @@ cplus_demangle_fill_dtor (struct demangl + || (int) kind < gnu_v3_deleting_dtor + || (int) kind > gnu_v3_object_dtor_group) + return 0; ++ p->d_printing = 0; + p->type = DEMANGLE_COMPONENT_DTOR; + p->u.s_dtor.kind = kind; + p->u.s_dtor.name = name; diff -Nru gdb-7.7/debian/patches/CVE-2016-4492_4493.patch gdb-7.7.1/debian/patches/CVE-2016-4492_4493.patch --- gdb-7.7/debian/patches/CVE-2016-4492_4493.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-4492_4493.patch 2017-06-08 12:01:16.000000000 +0000 @@ -0,0 +1,96 @@ +From b6616075cb48d42a28cc78ca1c66127b671b361c Mon Sep 17 00:00:00 2001 +From: law +Date: Wed, 13 Jul 2016 22:06:09 +0000 +Subject: [PATCH] PR c++/70926 * cplus-dem.c: Handle large values and + overflow when demangling length variables. + (demangle_template_value_parm): Read only until end of mangled string. + (do_hpacc_template_literal): Likewise. (do_type): Handle overflow + when demangling array indices. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238313 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libiberty/ChangeLog | 9 +++++++++ + libiberty/cplus-dem.c | 10 ++++++---- + libiberty/testsuite/demangle-expected | 13 +++++++++++++ + 3 files changed, 28 insertions(+), 4 deletions(-) + +#diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog +#index 45b312b..317bd63 100644 +#--- a/libiberty/ChangeLog +#+++ b/libiberty/ChangeLog +#@@ -1,3 +1,12 @@ +#+2016-07-13 Marcel BÃhme +#+ +#+ PR c++/70926 +#+ * cplus-dem.c: Handle large values and overflow when demangling +#+ length variables. +#+ (demangle_template_value_parm): Read only until end of mangled string. +#+ (do_hpacc_template_literal): Likewise. +#+ (do_type): Handle overflow when demangling array indices. +#+ +# 2016-06-12 Brooks Moses +# +# * cp-demangle.c (cplus_demangle_print_callback): Avoid zero-length +Index: gdb-7.7.1/libiberty/cplus-dem.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cplus-dem.c 2017-06-08 08:01:14.431267005 -0400 ++++ gdb-7.7.1/libiberty/cplus-dem.c 2017-06-08 08:01:14.399266630 -0400 +@@ -2033,7 +2033,8 @@ demangle_template_value_parm (struct wor + else + { + int symbol_len = consume_count (mangled); +- if (symbol_len == -1) ++ if (symbol_len == -1 ++ || symbol_len > (long) strlen (*mangled)) + return -1; + if (symbol_len == 0) + string_appendn (s, "0", 1); +@@ -3593,7 +3594,7 @@ do_type (struct work_stuff *work, const + /* A back reference to a previously seen type */ + case 'T': + (*mangled)++; +- if (!get_count (mangled, &n) || n >= work -> ntypes) ++ if (!get_count (mangled, &n) || n < 0 || n >= work -> ntypes) + { + success = 0; + } +@@ -3768,7 +3769,7 @@ do_type (struct work_stuff *work, const + /* A back reference to a previously seen squangled type */ + case 'B': + (*mangled)++; +- if (!get_count (mangled, &n) || n >= work -> numb) ++ if (!get_count (mangled, &n) || n < 0 || n >= work -> numb) + success = 0; + else + string_append (result, work->btypevec[n]); +@@ -4109,7 +4110,8 @@ do_hpacc_template_literal (struct work_s + + literal_len = consume_count (mangled); + +- if (literal_len <= 0) ++ if (literal_len <= 0 ++ || literal_len > (long) strlen (*mangled)) + return 0; + + /* Literal parameters are names of arrays, functions, etc. and the +Index: gdb-7.7.1/libiberty/testsuite/demangle-expected +=================================================================== +--- gdb-7.7.1.orig/libiberty/testsuite/demangle-expected 2017-06-08 08:01:14.431267005 -0400 ++++ gdb-7.7.1/libiberty/testsuite/demangle-expected 2017-06-08 08:01:14.399266630 -0400 +@@ -4363,3 +4363,16 @@ __vt_90000000000cafebabe + + _Z80800000000000000000000 + _Z80800000000000000000000 ++# ++# Tests write access violation PR70926 ++ ++0__Ot2m02R5T0000500000 ++0__Ot2m02R5T0000500000 ++# ++ ++0__GT50000000000_ ++0__GT50000000000_ ++# ++ ++__t2m05B500000000000000000_ ++__t2m05B500000000000000000_ diff -Nru gdb-7.7/debian/patches/CVE-2016-6131.patch gdb-7.7.1/debian/patches/CVE-2016-6131.patch --- gdb-7.7/debian/patches/CVE-2016-6131.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/CVE-2016-6131.patch 2017-06-08 12:01:23.000000000 +0000 @@ -0,0 +1,237 @@ +From ebcc31144416b524ea556708c32304c53b439724 Mon Sep 17 00:00:00 2001 +From: law +Date: Thu, 4 Aug 2016 16:53:18 +0000 +Subject: [PATCH] =?utf8?q?2016-08-04=20=20Marcel=20B=C3=B6hme=20=20?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + + PR c++/71696 + * cplus-dem.c: Prevent infinite recursion when there is a cycle + in the referencing of remembered mangled types. + (work_stuff): New stack to keep track of the remembered mangled + types that are currently being processed. + (push_processed_type): New method to push currently processed + remembered type onto the stack. + (pop_processed_type): New method to pop currently processed + remembered type from the stack. + (work_stuff_copy_to_from): Copy values of new variables. + (delete_non_B_K_work_stuff): Free stack memory. + (demangle_args): Push/Pop currently processed remembered type. + (do_type): Do not demangle a cyclic reference and push/pop + referenced remembered type. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239143 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libiberty/ChangeLog | 19 ++++++++- + libiberty/cplus-dem.c | 80 ++++++++++++++++++++++++++++++++--- + libiberty/testsuite/demangle-expected | 5 +++ + 3 files changed, 97 insertions(+), 7 deletions(-) + +#diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog +#index a2e49a1..e7ff8c3 100644 +#--- a/libiberty/ChangeLog +#+++ b/libiberty/ChangeLog +#@@ -1,3 +1,20 @@ +#+2016-08-04 Marcel Böhme +#+ +#+ PR c++/71696 +#+ * cplus-dem.c: Prevent infinite recursion when there is a cycle +#+ in the referencing of remembered mangled types. +#+ (work_stuff): New stack to keep track of the remembered mangled +#+ types that are currently being processed. +#+ (push_processed_type): New method to push currently processed +#+ remembered type onto the stack. +#+ (pop_processed_type): New method to pop currently processed +#+ remembered type from the stack. +#+ (work_stuff_copy_to_from): Copy values of new variables. +#+ (delete_non_B_K_work_stuff): Free stack memory. +#+ (demangle_args): Push/Pop currently processed remembered type. +#+ (do_type): Do not demangle a cyclic reference and push/pop +#+ referenced remembered type. +#+ +# 2016-07-29 Aldy Hernandez +# +# * make-relative-prefix.c (make_relative_prefix_1): Fall back to +#@@ -16,7 +33,7 @@ +# (d_template_args_1): Split out from d_template_args. +# (d_args_length): New. +# +#-2016-07-13 Marcel BÃhme +#+2016-07-13 Marcel Böhme +# +# PR c++/70926 +# * cplus-dem.c: Handle large values and overflow when demangling +Index: gdb-7.7.1/libiberty/cplus-dem.c +=================================================================== +--- gdb-7.7.1.orig/libiberty/cplus-dem.c 2017-06-08 08:01:21.631351419 -0400 ++++ gdb-7.7.1/libiberty/cplus-dem.c 2017-06-08 08:01:21.607351138 -0400 +@@ -144,6 +144,9 @@ struct work_stuff + string* previous_argument; /* The last function argument demangled. */ + int nrepeats; /* The number of times to repeat the previous + argument. */ ++ int *proctypevec; /* Indices of currently processed remembered typevecs. */ ++ int proctypevec_size; ++ int nproctypes; + }; + + #define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI) +@@ -429,6 +432,10 @@ iterate_demangle_function (struct work_s + + static void remember_type (struct work_stuff *, const char *, int); + ++static void push_processed_type (struct work_stuff *, int); ++ ++static void pop_processed_type (struct work_stuff *); ++ + static void remember_Btype (struct work_stuff *, const char *, int, int); + + static int register_Btype (struct work_stuff *); +@@ -1283,6 +1290,10 @@ work_stuff_copy_to_from (struct work_stu + memcpy (to->btypevec[i], from->btypevec[i], len); + } + ++ if (from->proctypevec) ++ to->proctypevec = ++ XDUPVEC (int, from->proctypevec, from->proctypevec_size); ++ + if (from->ntmpl_args) + to->tmpl_argvec = XNEWVEC (char *, from->ntmpl_args); + +@@ -1311,11 +1322,17 @@ delete_non_B_K_work_stuff (struct work_s + /* Discard the remembered types, if any. */ + + forget_types (work); +- if (work -> typevec != NULL) ++ if (work->typevec != NULL) + { +- free ((char *) work -> typevec); +- work -> typevec = NULL; +- work -> typevec_size = 0; ++ free ((char *) work->typevec); ++ work->typevec = NULL; ++ work->typevec_size = 0; ++ } ++ if (work->proctypevec != NULL) ++ { ++ free (work->proctypevec); ++ work->proctypevec = NULL; ++ work->proctypevec_size = 0; + } + if (work->tmpl_argvec) + { +@@ -3535,6 +3552,8 @@ static int + do_type (struct work_stuff *work, const char **mangled, string *result) + { + int n; ++ int i; ++ int is_proctypevec; + int done; + int success; + string decl; +@@ -3547,6 +3566,7 @@ do_type (struct work_stuff *work, const + + done = 0; + success = 1; ++ is_proctypevec = 0; + while (success && !done) + { + int member; +@@ -3599,8 +3619,15 @@ do_type (struct work_stuff *work, const + success = 0; + } + else +- { +- remembered_type = work -> typevec[n]; ++ for (i = 0; i < work->nproctypes; i++) ++ if (work -> proctypevec [i] == n) ++ success = 0; ++ ++ if (success) ++ { ++ is_proctypevec = 1; ++ push_processed_type (work, n); ++ remembered_type = work->typevec[n]; + mangled = &remembered_type; + } + break; +@@ -3820,6 +3847,9 @@ do_type (struct work_stuff *work, const + string_delete (result); + string_delete (&decl); + ++ if (is_proctypevec) ++ pop_processed_type (work); ++ + if (success) + /* Assume an integral type, if we're not sure. */ + return (int) ((tk == tk_none) ? tk_integral : tk); +@@ -4233,6 +4263,41 @@ do_arg (struct work_stuff *work, const c + } + + static void ++push_processed_type (struct work_stuff *work, int typevec_index) ++{ ++ if (work->nproctypes >= work->proctypevec_size) ++ { ++ if (!work->proctypevec_size) ++ { ++ work->proctypevec_size = 4; ++ work->proctypevec = XNEWVEC (int, work->proctypevec_size); ++ } ++ else ++ { ++ if (work->proctypevec_size < 16) ++ /* Double when small. */ ++ work->proctypevec_size *= 2; ++ else ++ { ++ /* Grow slower when large. */ ++ if (work->proctypevec_size > (INT_MAX / 3) * 2) ++ xmalloc_failed (INT_MAX); ++ work->proctypevec_size = (work->proctypevec_size * 3 / 2); ++ } ++ work->proctypevec ++ = XRESIZEVEC (int, work->proctypevec, work->proctypevec_size); ++ } ++ } ++ work->proctypevec [work->nproctypes++] = typevec_index; ++} ++ ++static void ++pop_processed_type (struct work_stuff *work) ++{ ++ work->nproctypes--; ++} ++ ++static void + remember_type (struct work_stuff *work, const char *start, int len) + { + char *tem; +@@ -4496,10 +4561,13 @@ demangle_args (struct work_stuff *work, + { + string_append (declp, ", "); + } ++ push_processed_type (work, t); + if (!do_arg (work, &tem, &arg)) + { ++ pop_processed_type (work); + return (0); + } ++ pop_processed_type (work); + if (PRINT_ARG_TYPES) + { + string_appends (declp, &arg); +Index: gdb-7.7.1/libiberty/testsuite/demangle-expected +=================================================================== +--- gdb-7.7.1.orig/libiberty/testsuite/demangle-expected 2017-06-08 08:01:21.631351419 -0400 ++++ gdb-7.7.1/libiberty/testsuite/demangle-expected 2017-06-08 08:01:21.623351325 -0400 +@@ -4376,3 +4376,8 @@ _Z80800000000000000000000 + + __t2m05B500000000000000000_ + __t2m05B500000000000000000_ ++# ++# Tests stack overflow PR71696 ++ ++__10%0__S4_0T0T0 ++%0<>::%0(%0<>) diff -Nru gdb-7.7/debian/patches/gdb-linaro.diff gdb-7.7.1/debian/patches/gdb-linaro.diff --- gdb-7.7/debian/patches/gdb-linaro.diff 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/gdb-linaro.diff 2014-05-27 14:52:38.000000000 +0000 @@ -0,0 +1,623 @@ +2014-02-10 Will Newton + + * elfread.c (elf_rel_plt_read): Look for a .got section if + looking up .got.plt fails. + (elf_gnu_ifunc_resolve_by_got): Call gdbarch_addr_bits_remove + on address passed to elf_gnu_ifunc_record_cache. + (elf_gnu_ifunc_resolve_addr): Likewise. + (elf_gnu_ifunc_resolver_return_stop): Likewise. + +2014-03-12 Omair Javaid + + * arm-linux-nat.c (arm_linux_get_hwbp_cap): Updated. + (MAX_BPTS): Define. + (MAX_WPTS): Define. + (struct arm_linux_thread_points): Removed. + (struct arm_linux_process_info): New. + (DEF_VEC_P (arm_linux_thread_points_p)): Removed. + (VEC(arm_linux_thread_points_p) *arm_threads): Removed. + (arm_linux_find_breakpoints_by_tid): Removed. + (struct arch_lwp_info): New. + (arm_linux_find_process_pid): New functions. + (arm_linux_add_process): New functions. + (arm_linux_process_info_get): New functions. + (arm_linux_forget_process): New function. + (arm_linux_get_debug_reg_state): New function. + (struct update_registers_data): New. + (update_registers_callback): New function. + (arm_linux_insert_hw_breakpoint1): Updated. + (arm_linux_remove_hw_breakpoint1): Updated. + (arm_linux_insert_hw_breakpoint): Updated. + (arm_linux_remove_hw_breakpoint): Updated. + (arm_linux_insert_watchpoint): Updated. + (arm_linux_remove_watchpoint): Updated. + (arm_linux_new_thread): Updated. + (arm_linux_prepare_to_resume): New function. + (arm_linux_new_fork): New function. + (_initialize_arm_linux_nat): Updated. + +diff -urN gdb-7.7.1/gdb/arm-linux-nat.c gdb-linaro-7.7-2014.05/gdb/arm-linux-nat.c +--- gdb-7.7.1/gdb/arm-linux-nat.c 2014-05-05 21:51:24.000000000 +0000 ++++ gdb-linaro-7.7-2014.05/gdb/arm-linux-nat.c 2014-04-30 15:29:31.000000000 +0000 +@@ -693,6 +693,11 @@ + gdb_byte bp_count; + }; + ++/* Since we cannot dynamically allocate subfields of arm_linux_process_info, ++ assume a maximum number of supported break-/watchpoints. */ ++#define MAX_BPTS 16 ++#define MAX_WPTS 16 ++ + /* Get hold of the Hardware Breakpoint information for the target we are + attached to. Returns NULL if the kernel doesn't support Hardware + breakpoints at all, or a pointer to the information structure. */ +@@ -721,6 +726,20 @@ + info.max_wp_length = (gdb_byte)((val >> 16) & 0xff); + info.wp_count = (gdb_byte)((val >> 8) & 0xff); + info.bp_count = (gdb_byte)(val & 0xff); ++ ++ if (info.wp_count > MAX_WPTS) ++ { ++ warning (_("arm-linux-gdb supports %d hardware watchpoints but target \ ++ supports %d"), MAX_WPTS, info.wp_count); ++ info.wp_count = MAX_WPTS; ++ } ++ ++ if (info.bp_count > MAX_BPTS) ++ { ++ warning (_("arm-linux-gdb supports %d hardware breakpoints but target \ ++ supports %d"), MAX_BPTS, info.bp_count); ++ info.bp_count = MAX_BPTS; ++ } + available = (info.arch != 0); + } + } +@@ -787,8 +806,8 @@ + arm_hwbp_control_t control; + }; + +-/* Structure containing arrays of the break and watch points which are have +- active in each thread. ++/* Structure containing arrays of per process hardware break-/watchpoints ++ for caching address and control information. + + The Linux ptrace interface to hardware break-/watch-points presents the + values in a vector centred around 0 (which is used fo generic information). +@@ -808,49 +827,114 @@ + + We treat break-/watch-points with their enable bit clear as being deleted. + */ +-typedef struct arm_linux_thread_points ++struct arm_linux_debug_reg_state + { +- /* Thread ID. */ +- int tid; +- /* Breakpoints for thread. */ +- struct arm_linux_hw_breakpoint *bpts; +- /* Watchpoint for threads. */ +- struct arm_linux_hw_breakpoint *wpts; +-} *arm_linux_thread_points_p; +-DEF_VEC_P (arm_linux_thread_points_p); +- +-/* Vector of hardware breakpoints for each thread. */ +-VEC(arm_linux_thread_points_p) *arm_threads = NULL; +- +-/* Find the list of hardware break-/watch-points for a thread with id TID. +- If no list exists for TID we return NULL if ALLOC_NEW is 0, otherwise we +- create a new list and return that. */ +-static struct arm_linux_thread_points * +-arm_linux_find_breakpoints_by_tid (int tid, int alloc_new) ++ /* Hardware breakpoints for this process. */ ++ struct arm_linux_hw_breakpoint bpts[MAX_BPTS]; ++ /* Hardware watchpoints for this process. */ ++ struct arm_linux_hw_breakpoint wpts[MAX_WPTS]; ++}; ++ ++/* Per-process arch-specific data we want to keep. */ ++struct arm_linux_process_info + { +- int i; +- struct arm_linux_thread_points *t; ++ /* Linked list. */ ++ struct arm_linux_process_info *next; ++ /* The process identifier. */ ++ pid_t pid; ++ /* Hardware break-/watchpoints state information. */ ++ struct arm_linux_debug_reg_state state; + +- for (i = 0; VEC_iterate (arm_linux_thread_points_p, arm_threads, i, t); ++i) +- { +- if (t->tid == tid) +- return t; +- } ++}; ++ ++/* Per-thread arch-specific data we want to keep. */ ++struct arch_lwp_info ++{ ++ /* Non-zero if our copy differs from what's recorded in the thread. */ ++ char bpts_changed[MAX_BPTS]; ++ char wpts_changed[MAX_WPTS]; ++}; ++ ++static struct arm_linux_process_info *arm_linux_process_list = NULL; ++ ++/* Find process data for process PID. */ ++ ++static struct arm_linux_process_info * ++arm_linux_find_process_pid (pid_t pid) ++{ ++ struct arm_linux_process_info *proc; ++ ++ for (proc = arm_linux_process_list; proc; proc = proc->next) ++ if (proc->pid == pid) ++ return proc; ++ ++ return NULL; ++} ++ ++/* Add process data for process PID. Returns newly allocated info ++ object. */ ++ ++static struct arm_linux_process_info * ++arm_linux_add_process (pid_t pid) ++{ ++ struct arm_linux_process_info *proc; + +- t = NULL; ++ proc = xcalloc (1, sizeof (*proc)); ++ proc->pid = pid; + +- if (alloc_new) ++ proc->next = arm_linux_process_list; ++ arm_linux_process_list = proc; ++ ++ return proc; ++} ++ ++/* Get data specific info for process PID, creating it if necessary. ++ Never returns NULL. */ ++ ++static struct arm_linux_process_info * ++arm_linux_process_info_get (pid_t pid) ++{ ++ struct arm_linux_process_info *proc; ++ ++ proc = arm_linux_find_process_pid (pid); ++ if (proc == NULL) ++ proc = arm_linux_add_process (pid); ++ ++ return proc; ++} ++ ++/* Called whenever GDB is no longer debugging process PID. It deletes ++ data structures that keep track of debug register state. */ ++ ++static void ++arm_linux_forget_process (pid_t pid) ++{ ++ struct arm_linux_process_info *proc, **proc_link; ++ ++ proc = arm_linux_process_list; ++ proc_link = &arm_linux_process_list; ++ ++ while (proc != NULL) ++ { ++ if (proc->pid == pid) + { +- t = xmalloc (sizeof (struct arm_linux_thread_points)); +- t->tid = tid; +- t->bpts = xzalloc (arm_linux_get_hw_breakpoint_count () +- * sizeof (struct arm_linux_hw_breakpoint)); +- t->wpts = xzalloc (arm_linux_get_hw_watchpoint_count () +- * sizeof (struct arm_linux_hw_breakpoint)); +- VEC_safe_push (arm_linux_thread_points_p, arm_threads, t); ++ *proc_link = proc->next; ++ ++ xfree (proc); ++ return; ++ } ++ ++ proc_link = &proc->next; ++ proc = *proc_link; + } ++} ++ ++/* Get hardware break-/watchpoint state for process PID. */ + +- return t; ++static struct arm_linux_debug_reg_state * ++arm_linux_get_debug_reg_state (pid_t pid) ++{ ++ return &arm_linux_process_info_get (pid)->state; + } + + /* Initialize an ARM hardware break-/watch-point control register value. +@@ -950,45 +1034,72 @@ + return p1->address == p2->address && p1->control == p2->control; + } + ++/* Callback to mark a watch-/breakpoint to be updated in all threads of ++ the current process. */ ++ ++struct update_registers_data ++{ ++ int watch; ++ int index; ++}; ++ ++static int ++update_registers_callback (struct lwp_info *lwp, void *arg) ++{ ++ struct update_registers_data *data = (struct update_registers_data *) arg; ++ ++ if (lwp->arch_private == NULL) ++ lwp->arch_private = XCNEW (struct arch_lwp_info); ++ ++ /* The actual update is done later just before resuming the lwp, ++ we just mark that the registers need updating. */ ++ if (data->watch) ++ lwp->arch_private->wpts_changed[data->index] = 1; ++ else ++ lwp->arch_private->bpts_changed[data->index] = 1; ++ ++ /* If the lwp isn't stopped, force it to momentarily pause, so ++ we can update its breakpoint registers. */ ++ if (!lwp->stopped) ++ linux_stop_lwp (lwp); ++ ++ return 0; ++} ++ + /* Insert the hardware breakpoint (WATCHPOINT = 0) or watchpoint (WATCHPOINT + =1) BPT for thread TID. */ + static void + arm_linux_insert_hw_breakpoint1 (const struct arm_linux_hw_breakpoint* bpt, +- int tid, int watchpoint) ++ int watchpoint) + { +- struct arm_linux_thread_points *t = arm_linux_find_breakpoints_by_tid (tid, 1); ++ int pid; ++ ptid_t pid_ptid; + gdb_byte count, i; + struct arm_linux_hw_breakpoint* bpts; +- int dir; ++ struct update_registers_data data; + +- gdb_assert (t != NULL); ++ pid = ptid_get_pid (inferior_ptid); ++ pid_ptid = pid_to_ptid (pid); + + if (watchpoint) + { + count = arm_linux_get_hw_watchpoint_count (); +- bpts = t->wpts; +- dir = -1; ++ bpts = arm_linux_get_debug_reg_state (pid)->wpts; + } + else + { + count = arm_linux_get_hw_breakpoint_count (); +- bpts = t->bpts; +- dir = 1; ++ bpts = arm_linux_get_debug_reg_state (pid)->bpts; + } + + for (i = 0; i < count; ++i) + if (!arm_hwbp_control_is_enabled (bpts[i].control)) + { +- errno = 0; +- if (ptrace (PTRACE_SETHBPREGS, tid, dir * ((i << 1) + 1), +- &bpt->address) < 0) +- perror_with_name (_("Unexpected error setting breakpoint address")); +- if (ptrace (PTRACE_SETHBPREGS, tid, dir * ((i << 1) + 2), +- &bpt->control) < 0) +- perror_with_name (_("Unexpected error setting breakpoint")); +- +- memcpy (bpts + i, bpt, sizeof (struct arm_linux_hw_breakpoint)); +- break; ++ data.watch = watchpoint; ++ data.index = i; ++ bpts[i] = *bpt; ++ iterate_over_lwps (pid_ptid, update_registers_callback, &data); ++ break; + } + + gdb_assert (i != count); +@@ -998,37 +1109,36 @@ + (WATCHPOINT = 1) BPT for thread TID. */ + static void + arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, +- int tid, int watchpoint) ++ int watchpoint) + { +- struct arm_linux_thread_points *t = arm_linux_find_breakpoints_by_tid (tid, 0); ++ int pid; + gdb_byte count, i; +- struct arm_linux_hw_breakpoint *bpts; +- int dir; ++ ptid_t pid_ptid; ++ struct arm_linux_hw_breakpoint* bpts; ++ struct update_registers_data data; + +- gdb_assert (t != NULL); ++ pid = ptid_get_pid (inferior_ptid); ++ pid_ptid = pid_to_ptid (pid); + + if (watchpoint) + { + count = arm_linux_get_hw_watchpoint_count (); +- bpts = t->wpts; +- dir = -1; ++ bpts = arm_linux_get_debug_reg_state (pid)->wpts; + } + else + { + count = arm_linux_get_hw_breakpoint_count (); +- bpts = t->bpts; +- dir = 1; ++ bpts = arm_linux_get_debug_reg_state (pid)->bpts; + } + + for (i = 0; i < count; ++i) + if (arm_linux_hw_breakpoint_equal (bpt, bpts + i)) + { +- errno = 0; +- bpts[i].control = arm_hwbp_control_disable (bpts[i].control); +- if (ptrace (PTRACE_SETHBPREGS, tid, dir * ((i << 1) + 2), +- &bpts[i].control) < 0) +- perror_with_name (_("Unexpected error clearing breakpoint")); +- break; ++ data.watch = watchpoint; ++ data.index = i; ++ bpts[i].control = arm_hwbp_control_disable (bpts[i].control); ++ iterate_over_lwps (pid_ptid, update_registers_callback, &data); ++ break; + } + + gdb_assert (i != count); +@@ -1046,8 +1156,8 @@ + return -1; + + arm_linux_hw_breakpoint_initialize (gdbarch, bp_tgt, &p); +- ALL_LWPS (lp) +- arm_linux_insert_hw_breakpoint1 (&p, ptid_get_lwp (lp->ptid), 0); ++ ++ arm_linux_insert_hw_breakpoint1 (&p, 0); + + return 0; + } +@@ -1064,8 +1174,8 @@ + return -1; + + arm_linux_hw_breakpoint_initialize (gdbarch, bp_tgt, &p); +- ALL_LWPS (lp) +- arm_linux_remove_hw_breakpoint1 (&p, ptid_get_lwp (lp->ptid), 0); ++ ++ arm_linux_remove_hw_breakpoint1 (&p, 0); + + return 0; + } +@@ -1115,8 +1225,8 @@ + return -1; + + arm_linux_hw_watchpoint_initialize (addr, len, rw, &p); +- ALL_LWPS (lp) +- arm_linux_insert_hw_breakpoint1 (&p, ptid_get_lwp (lp->ptid), 1); ++ ++ arm_linux_insert_hw_breakpoint1 (&p, 1); + + return 0; + } +@@ -1133,8 +1243,8 @@ + return -1; + + arm_linux_hw_watchpoint_initialize (addr, len, rw, &p); +- ALL_LWPS (lp) +- arm_linux_remove_hw_breakpoint1 (&p, ptid_get_lwp (lp->ptid), 1); ++ ++ arm_linux_remove_hw_breakpoint1 (&p, 1); + + return 0; + } +@@ -1190,63 +1300,100 @@ + static void + arm_linux_new_thread (struct lwp_info *lp) + { +- int tid = ptid_get_lwp (lp->ptid); +- const struct arm_linux_hwbp_cap *info = arm_linux_get_hwbp_cap (); +- +- if (info != NULL) +- { +- int i; +- struct arm_linux_thread_points *p; +- struct arm_linux_hw_breakpoint *bpts; +- +- if (VEC_empty (arm_linux_thread_points_p, arm_threads)) +- return; ++ int i; ++ struct arch_lwp_info *info = XCNEW (struct arch_lwp_info); + +- /* Get a list of breakpoints from any thread. */ +- p = VEC_last (arm_linux_thread_points_p, arm_threads); ++ /* Mark that all the hardware breakpoint/watchpoint register pairs ++ for this thread need to be initialized. */ + +- /* Copy that thread's breakpoints and watchpoints to the new thread. */ +- for (i = 0; i < info->bp_count; i++) +- if (arm_hwbp_control_is_enabled (p->bpts[i].control)) +- arm_linux_insert_hw_breakpoint1 (p->bpts + i, tid, 0); +- for (i = 0; i < info->wp_count; i++) +- if (arm_hwbp_control_is_enabled (p->wpts[i].control)) +- arm_linux_insert_hw_breakpoint1 (p->wpts + i, tid, 1); ++ for (i = 0; i < MAX_BPTS; i++) ++ { ++ info->bpts_changed[i] = 1; ++ info->wpts_changed[i] = 1; + } ++ ++ lp->arch_private = info; + } + +-/* Handle thread exit. Tidy up the memory that has been allocated for the +- thread. */ ++/* Called when resuming a thread. ++ The hardware debug registers are updated when there is any change. */ ++ + static void +-arm_linux_thread_exit (struct thread_info *tp, int silent) ++arm_linux_prepare_to_resume (struct lwp_info *lwp) + { +- const struct arm_linux_hwbp_cap *info = arm_linux_get_hwbp_cap (); ++ int pid, i; ++ struct arm_linux_hw_breakpoint *bpts, *wpts; ++ struct arch_lwp_info *arm_lwp_info = lwp->arch_private; ++ ++ pid = ptid_get_lwp (lwp->ptid); ++ bpts = arm_linux_get_debug_reg_state (ptid_get_pid (lwp->ptid))->bpts; ++ wpts = arm_linux_get_debug_reg_state (ptid_get_pid (lwp->ptid))->wpts; ++ ++ /* NULL means this is the main thread still going through the shell, ++ or, no watchpoint has been set yet. In that case, there's ++ nothing to do. */ ++ if (arm_lwp_info == NULL) ++ return; + +- if (info != NULL) +- { +- int i; +- int tid = ptid_get_lwp (tp->ptid); +- struct arm_linux_thread_points *t = NULL, *p; ++ for (i = 0; i < arm_linux_get_hw_breakpoint_count (); i++) ++ if (arm_lwp_info->bpts_changed[i]) ++ { ++ errno = 0; ++ if (arm_hwbp_control_is_enabled (bpts[i].control)) ++ if (ptrace (PTRACE_SETHBPREGS, pid, ++ (PTRACE_TYPE_ARG3) ((i << 1) + 1), &bpts[i].address) < 0) ++ perror_with_name (_("Unexpected error setting breakpoint")); ++ ++ if (bpts[i].control != 0) ++ if (ptrace (PTRACE_SETHBPREGS, pid, ++ (PTRACE_TYPE_ARG3) ((i << 1) + 2), &bpts[i].control) < 0) ++ perror_with_name (_("Unexpected error setting breakpoint")); + +- for (i = 0; +- VEC_iterate (arm_linux_thread_points_p, arm_threads, i, p); i++) +- { +- if (p->tid == tid) +- { +- t = p; +- break; +- } +- } ++ arm_lwp_info->bpts_changed[i] = 0; ++ } + +- if (t == NULL) +- return; ++ for (i = 0; i < arm_linux_get_hw_watchpoint_count (); i++) ++ if (arm_lwp_info->wpts_changed[i]) ++ { ++ errno = 0; ++ if (arm_hwbp_control_is_enabled (wpts[i].control)) ++ if (ptrace (PTRACE_SETHBPREGS, pid, ++ (PTRACE_TYPE_ARG3) -((i << 1) + 1), &wpts[i].address) < 0) ++ perror_with_name (_("Unexpected error setting watchpoint")); ++ ++ if (wpts[i].control != 0) ++ if (ptrace (PTRACE_SETHBPREGS, pid, ++ (PTRACE_TYPE_ARG3) -((i << 1) + 2), &wpts[i].control) < 0) ++ perror_with_name (_("Unexpected error setting watchpoint")); ++ ++ arm_lwp_info->wpts_changed[i] = 0; ++ } ++} + +- VEC_unordered_remove (arm_linux_thread_points_p, arm_threads, i); ++/* linux_nat_new_fork hook. */ + +- xfree (t->bpts); +- xfree (t->wpts); +- xfree (t); +- } ++static void ++arm_linux_new_fork (struct lwp_info *parent, pid_t child_pid) ++{ ++ pid_t parent_pid; ++ struct arm_linux_debug_reg_state *parent_state; ++ struct arm_linux_debug_reg_state *child_state; ++ ++ /* NULL means no watchpoint has ever been set in the parent. In ++ that case, there's nothing to do. */ ++ if (parent->arch_private == NULL) ++ return; ++ ++ /* GDB core assumes the child inherits the watchpoints/hw ++ breakpoints of the parent, and will remove them all from the ++ forked off process. Copy the debug registers mirrors into the ++ new process so that all breakpoints and watchpoints can be ++ removed together. */ ++ ++ parent_pid = ptid_get_pid (parent->ptid); ++ parent_state = arm_linux_get_debug_reg_state (parent_pid); ++ child_state = arm_linux_get_debug_reg_state (child_pid); ++ *child_state = *parent_state; + } + + void _initialize_arm_linux_nat (void); +@@ -1279,7 +1426,11 @@ + /* Register the target. */ + linux_nat_add_target (t); + +- /* Handle thread creation and exit */ +- observer_attach_thread_exit (arm_linux_thread_exit); ++ /* Handle thread creation and exit. */ + linux_nat_set_new_thread (t, arm_linux_new_thread); ++ linux_nat_set_prepare_to_resume (t, arm_linux_prepare_to_resume); ++ ++ /* Handle process creation and exit. */ ++ linux_nat_set_new_fork (t, arm_linux_new_fork); ++ linux_nat_set_forget_process (t, arm_linux_forget_process); + } +diff -urN gdb-7.7.1/gdb/elfread.c gdb-linaro-7.7-2014.05/gdb/elfread.c +--- gdb-7.7.1/gdb/elfread.c 2014-05-05 21:51:24.000000000 +0000 ++++ gdb-linaro-7.7-2014.05/gdb/elfread.c 2014-04-30 15:29:31.000000000 +0000 +@@ -646,7 +646,12 @@ + + got_plt = bfd_get_section_by_name (obfd, ".got.plt"); + if (got_plt == NULL) +- return; ++ { ++ /* For platforms where there is no separate .got.plt. */ ++ got_plt = bfd_get_section_by_name (obfd, ".got"); ++ if (got_plt == NULL) ++ return; ++ } + + /* This search algorithm is from _bfd_elf_canonicalize_dynamic_reloc. */ + for (relplt = obfd->sections; relplt != NULL; relplt = relplt->next) +@@ -899,6 +904,7 @@ + addr = extract_typed_address (buf, ptr_type); + addr = gdbarch_convert_from_func_ptr_addr (gdbarch, addr, + ¤t_target); ++ addr = gdbarch_addr_bits_remove (gdbarch, addr); + + if (addr_p) + *addr_p = addr; +@@ -962,6 +968,7 @@ + address = value_as_address (address_val); + address = gdbarch_convert_from_func_ptr_addr (gdbarch, address, + ¤t_target); ++ address = gdbarch_addr_bits_remove (gdbarch, address); + + if (name_at_pc) + elf_gnu_ifunc_record_cache (name_at_pc, address); +@@ -1070,6 +1077,7 @@ + resolved_pc = gdbarch_convert_from_func_ptr_addr (gdbarch, + resolved_address, + ¤t_target); ++ resolved_pc = gdbarch_addr_bits_remove (gdbarch, resolved_pc); + + gdb_assert (current_program_space == b->pspace || b->pspace == NULL); + elf_gnu_ifunc_record_cache (b->addr_string, resolved_pc); diff -Nru gdb-7.7/debian/patches/pr14963.diff gdb-7.7.1/debian/patches/pr14963.diff --- gdb-7.7/debian/patches/pr14963.diff 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/pr14963.diff 2014-06-12 19:14:25.000000000 +0000 @@ -0,0 +1,161 @@ +libiberty/ + +2014-05-08 Gary Benson + + * cp-demangle.c (struct d_component_stack): New structure. + (struct d_print_info): New field component_stack. + (d_print_init): Initialize the above. + (d_print_comp_inner): Renamed from d_print_comp. + Do not restore template stack if it would cause a loop. + (d_print_comp): New function. + * testsuite/demangle-expected: New test cases. + + +diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c +index 3d5d33e..68d8ee1 100644 +--- a/libiberty/cp-demangle.c ++++ b/libiberty/cp-demangle.c +@@ -275,6 +275,16 @@ struct d_growable_string + int allocation_failure; + }; + ++/* Stack of components, innermost first, used to avoid loops. */ ++ ++struct d_component_stack ++{ ++ /* This component. */ ++ const struct demangle_component *dc; ++ /* This component's parent. */ ++ const struct d_component_stack *parent; ++}; ++ + /* A demangle component and some scope captured when it was first + traversed. */ + +@@ -327,6 +337,8 @@ struct d_print_info + int pack_index; + /* Number of d_print_flush calls so far. */ + unsigned long int flush_count; ++ /* Stack of components, innermost first, used to avoid loops. */ ++ const struct d_component_stack *component_stack; + /* Array of saved scopes for evaluating substitutions. */ + struct d_saved_scope *saved_scopes; + /* Index of the next unused saved scope in the above array. */ +@@ -3934,6 +3946,8 @@ d_print_init (struct d_print_info *dpi, demangle_callbackref callback, + + dpi->demangle_failure = 0; + ++ dpi->component_stack = NULL; ++ + dpi->saved_scopes = NULL; + dpi->next_saved_scope = 0; + dpi->num_saved_scopes = 0; +@@ -4269,8 +4283,8 @@ d_get_saved_scope (struct d_print_info *dpi, + /* Subroutine to handle components. */ + + static void +-d_print_comp (struct d_print_info *dpi, int options, +- const struct demangle_component *dc) ++d_print_comp_inner (struct d_print_info *dpi, int options, ++ const struct demangle_component *dc) + { + /* Magic variable to let reference smashing skip over the next modifier + without needing to modify *dc. */ +@@ -4673,11 +4687,30 @@ d_print_comp (struct d_print_info *dpi, int options, + } + else + { ++ const struct d_component_stack *dcse; ++ int found_self_or_parent = 0; ++ + /* This traversal is reentering SUB as a substition. +- Restore the original templates temporarily. */ +- saved_templates = dpi->templates; +- dpi->templates = scope->templates; +- need_template_restore = 1; ++ If we are not beneath SUB or DC in the tree then we ++ need to restore SUB's template stack temporarily. */ ++ for (dcse = dpi->component_stack; dcse != NULL; ++ dcse = dcse->parent) ++ { ++ if (dcse->dc == sub ++ || (dcse->dc == dc ++ && dcse != dpi->component_stack)) ++ { ++ found_self_or_parent = 1; ++ break; ++ } ++ } ++ ++ if (!found_self_or_parent) ++ { ++ saved_templates = dpi->templates; ++ dpi->templates = scope->templates; ++ need_template_restore = 1; ++ } + } + + a = d_lookup_template_argument (dpi, sub); +@@ -5316,6 +5349,21 @@ d_print_comp (struct d_print_info *dpi, int options, + } + } + ++static void ++d_print_comp (struct d_print_info *dpi, int options, ++ const struct demangle_component *dc) ++{ ++ struct d_component_stack self; ++ ++ self.dc = dc; ++ self.parent = dpi->component_stack; ++ dpi->component_stack = &self; ++ ++ d_print_comp_inner (dpi, options, dc); ++ ++ dpi->component_stack = self.parent; ++} ++ + /* Print a Java dentifier. For Java we try to handle encoded extended + Unicode characters. The C++ ABI doesn't mention Unicode encoding, + so we don't it for C++. Characters are encoded as +diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected +index 3ff08e6..453f9a3 100644 +--- a/libiberty/testsuite/demangle-expected ++++ b/libiberty/testsuite/demangle-expected +@@ -4294,6 +4294,7 @@ void n(void (A::*)() const &) + --format=gnu-v3 + _ZL1fIiEvv + void f() ++# https://sourceware.org/bugzilla/show_bug.cgi?id=14963#c3 + --format=gnu-v3 + _ZSt7forwardIRN1x14refobjiteratorINS0_3refINS0_4mime30multipart_section_processorObjIZ15get_body_parserIZZN14mime_processor21make_section_iteratorERKNS2_INS3_10sectionObjENS0_10ptrrefBaseEEEbENKUlvE_clEvEUlSB_bE_ZZNS6_21make_section_iteratorESB_bENKSC_clEvEUlSB_E0_ENS1_INS2_INS0_20outputrefiteratorObjIiEES8_EEEERKSsSB_OT_OT0_EUlmE_NS3_32make_multipart_default_discarderISP_EEEES8_EEEEEOT_RNSt16remove_referenceISW_E4typeE + x::refobjiterator, x::ptrrefBase> > get_body_parser const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&)#2}>(std::string const&, x::ref const&, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}&&, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&)#2}&&)::{lambda(unsigned long)#1}, x::mime::make_multipart_default_discarder const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}&&> >, x::ptrrefBase> >& std::forward, x::ptrrefBase> > get_body_parser const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&)#2}>(std::string const&, x::ref const&, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}&&, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&)#2}&&)::{lambda(unsigned long)#1}, x::mime::make_multipart_default_discarder const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}&&> >, x::ptrrefBase> >&>(std::remove_reference, x::ptrrefBase> > get_body_parser const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&)#2}>(std::string const&, x::ref const&, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}&&, mime_processor::make_section_iterator(x::ref const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&)#2}&&)::{lambda(unsigned long)#1}, x::mime::make_multipart_default_discarder const&, bool)::{lambda()#1}::operator()() const::{lambda(x::ref const&, bool)#1}&&> > >::type&) +@@ -4317,3 +4318,28 @@ A::operator C* + _ZN1AcvT_IiEI1CEEv + A::operator C() + A::operator C ++# https://sourceware.org/bugzilla/show_bug.cgi?id=14963#c16 ++--format=gnu-v3 ++_ZN3mdr16in_cached_threadIRZNK4cudr6GPUSet17parallel_for_eachIZN5tns3d20shape_representation7compute7GPUImpl7executeERKNS_1AINS_7ptr_refIKjEELl3ELl3ENS_8c_strideILl1ELl0EEEEERKNS8_INS9_IjEELl4ELl1ESD_EEEUliRKNS1_7ContextERNS7_5StateEE_JSt6vectorISO_SaISO_EEEEEvOT_DpRT0_EUlSP_E_JSt17reference_wrapperISO_EEEENS_12ScopedFutureIDTclfp_spcl7forwardISW_Efp0_EEEEESV_DpOSW_ ++mdr::ScopedFuture, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}, std::vector > >(tns3d::shape_representation::compute::GPUImpl::execute(mdr::A, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}&&, std::vector >&) const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&>)({parm#2}))...))> mdr::in_cached_thread, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}, std::vector > >(void cudr::GPUSet::parallel_for_each, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}, std::vector > >(tns3d::shape_representation::compute::GPUImpl::execute(mdr::A, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}&&, std::vector >&) const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&, std::vector >&) const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&, std::reference_wrapper >(void cudr::GPUSet::parallel_for_each, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}, std::vector > >(tns3d::shape_representation::compute::GPUImpl::execute(mdr::A, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}&&, std::vector >&) const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&, (void cudr::GPUSet::parallel_for_each, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}, std::vector > >(tns3d::shape_representation::compute::GPUImpl::execute(mdr::A, 3l, 3l, mdr::c_stride<1l, 0l> > const&, mdr::A, 4l, 1l, mdr::c_stride<1l, 0l> > const&)::{lambda(int, cudr::Context const&, tns3d::shape_representation::compute::GPUImpl::State&)#1}&&, std::vector >&) const::{lambda(tns3d::shape_representation::compute::GPUImpl::State&)#1}&&&)...) ++# https://sourceware.org/bugzilla/show_bug.cgi?id=14963#c18 ++--format=gnu-v3 ++_ZNSt9_Any_data9_M_accessIPZN13ThreadManager10futureTaskISt5_BindIFSt7_Mem_fnIM6RunnerFvvEEPS5_EEEEvOT_EUlvE_EERSC_v ++void ThreadManager::futureTask (Runner*)> >(std::_Bind (Runner*)>&&)::{lambda()#1}*& std::_Any_data::_M_access (Runner*)> >(void ThreadManager::futureTask (Runner*)> >(std::_Bind (Runner*)>&&)::{lambda()#1}*&&)::{lambda()#1}*>() ++# https://sourceware.org/bugzilla/show_bug.cgi?id=14963#c24 ++# aka https://sourceware.org/bugzilla/show_bug.cgi?id=16593 ++--format=gnu-v3 ++_ZNSt9_Any_data9_M_accessIPZN3sel8Selector6SetObjI3FooJPKcMS4_FviEEEEvRT_DpT0_EUlvE_EESA_v ++void sel::Selector::SetObj(Foo&, char const*, void (Foo::*)(int))::{lambda()#1}*& std::_Any_data::_M_access(void sel::Selector::SetObj(Foo&, char const*, void (Foo::*)(int))::{lambda()#1}*&, char const*, void (Foo::*)(int))::{lambda()#1}*>() ++# https://sourceware.org/bugzilla/show_bug.cgi?id=16752#c1 ++--format=gnu-v3 ++_ZNSt9_Any_data9_M_accessIPZN13ThreadManager7newTaskIRSt5_BindIFSt7_Mem_fnIM5DiaryFivEEPS5_EEIEEESt6futureINSt9result_ofIFT_DpT0_EE4typeEEOSF_DpOSG_EUlvE_EERSF_v ++std::future (Diary*)>& ()>::type> ThreadManager::newTask (Diary*)>&>(std::_Bind (Diary*)>&)::{lambda()#1}*& std::_Any_data::_M_access (Diary*)>& ()>::type> ThreadManager::newTask (Diary*)>&>(std::future (Diary*)>& ()>::type> ThreadManager::newTask (Diary*)>&>(std::_Bind (Diary*)>&)::{lambda()#1}*&&)::{lambda()#1}*>() ++# https://sourceware.org/bugzilla/show_bug.cgi?id=16752#c6 ++--format=gnu-v3 ++_ZNSt9_Any_data9_M_accessIPZN6cereal18polymorphic_detail15getInputBindingINS1_16JSONInputArchiveEEENS1_6detail15InputBindingMapIT_E11SerializersERS7_jEUlPvRSt10unique_ptrIvNS5_12EmptyDeleterIvEEEE0_EESA_v ++cereal::detail::InputBindingMap::Serializers cereal::polymorphic_detail::getInputBinding(cereal::JSONInputArchive&, unsigned int)::{lambda(void*, std::unique_ptr >&)#2}*& std::_Any_data::_M_access::Serializers cereal::polymorphic_detail::getInputBinding(cereal::detail::InputBindingMap::Serializers cereal::polymorphic_detail::getInputBinding(cereal::JSONInputArchive&, unsigned int)::{lambda(void*, std::unique_ptr >&)#2}*&, unsigned int)::{lambda(void*, std::unique_ptr >&)#2}*>() ++# https://sourceware.org/bugzilla/show_bug.cgi?id=16845#c2 ++--format=gnu-v3 ++_ZNSt9_Any_data9_M_accessIPZ4postISt8functionIFvvEEEvOT_EUlvE_EERS5_v ++void post >(std::function&&)::{lambda()#1}*& std::_Any_data::_M_access >(void post >(std::function&&)::{lambda()#1}*&&)::{lambda()#1}*>() diff -Nru gdb-7.7/debian/patches/series gdb-7.7.1/debian/patches/series --- gdb-7.7/debian/patches/series 2014-02-08 14:29:00.000000000 +0000 +++ gdb-7.7.1/debian/patches/series 2017-06-09 14:42:50.000000000 +0000 @@ -5,7 +5,21 @@ # Ubuntu/Linaro gdb-strings.patch -#ptrace-error-verbosity.patch +ptrace-error-verbosity.patch python-config.patch #elf-auxv-diff ppc64le.diff + +gdb-linaro.diff +pr14963.diff +CVE-2014-8501.patch +CVE-2014-9939.patch +CVE-2016-2226.patch +CVE-2016-4487_4488.patch +CVE-2016-4489.patch +CVE-2016-4490.patch +CVE-2016-4492_4493.patch +CVE-2016-6131.patch +CVE-2016-4491-1.patch +CVE-2016-4491-2.patch +CVE-2016-4491-3.patch diff -Nru gdb-7.7/debian/rules gdb-7.7.1/debian/rules --- gdb-7.7/debian/rules 2014-02-08 16:11:28.000000000 +0000 +++ gdb-7.7.1/debian/rules 2014-10-08 18:46:52.000000000 +0000 @@ -142,38 +142,41 @@ # multiarch targets; this is taken from the binutils-multiarch package but # doesn't seem like a terribly nice list; see # <20110117211551.GA7216@bee.dooz.org> for discussion -- locally updated -#MULTIARCH_TARGETS := \ -# alpha-linux-gnu \ -# arm-linux-gnu \ -# arm-linux-gnueabi \ -# arm-linux-gnueabihf \ -# hppa-linux-gnu \ -# i686-linux-gnu \ -# ia64-linux-gnu \ -# m68k-linux-gnu \ -# m68k-rtems \ -# mips-linux-gnu \ -# mipsel-linux-gnu \ -# mips64-linux-gnu \ -# mips64el-linux-gnu \ -# powerpc-linux-gnu \ -# powerpcspe-linux-gnu \ -# ppc64-linux-gnu \ -# s390-linux-gnu \ -# s390x-linux-gnu \ -# sh-linux-gnu \ -# sh64-linux-gnu \ -# sparc-linux-gnu \ -# sparc64-linux-gnu \ -# x86_64-linux-gnu \ -# m32r-linux-gnu \ -# spu -# --enable-targets=`set -- $(MULTIARCH_TARGETS); IFS=,; echo "$$*"` -MULTIARCH_TARGETS := all +MULTIARCH_TARGETS := \ + alpha-linux-gnu \ + aarch64-linux-gnu \ + arm-linux-gnu \ + arm-linux-gnueabi \ + arm-linux-gnueabihf \ + hppa-linux-gnu \ + i686-linux-gnu \ + ia64-linux-gnu \ + m68k-linux-gnu \ + m68k-rtems \ + mips-linux-gnu \ + mipsel-linux-gnu \ + mips64-linux-gnu \ + mips64el-linux-gnu \ + powerpc-linux-gnu \ + powerpc64-linux-gnu \ + powerpc64le-linux-gnu \ + s390-linux-gnu \ + s390x-linux-gnu \ + sh-linux-gnu \ + sh64-linux-gnu \ + sparc-linux-gnu \ + sparc64-linux-gnu \ + x86_64-linux-gnu \ + m32r-linux-gnu \ + spu + +# broken, see https://launchpad.net/bugs/1233185 +#MULTIARCH_TARGETS := all +# --enable-targets=$(MULTIARCH_TARGETS) \ # multiarch flags DEB_CONFIGURE_FLAGS_MULTIARCH := $(DEB_CONFIGURE_EXTRA_FLAGS) \ --enable-64-bit-bfd \ - --enable-targets=$(MULTIARCH_TARGETS) \ + --enable-targets=`set -- $(MULTIARCH_TARGETS); IFS=,; echo "$$*"` \ --disable-werror \ --disable-sim @@ -198,6 +201,9 @@ $(MAKE) -C $(DEB_BUILDDIR) info $(MAKE) -C $(DEB_BUILDDIR)/gdb/doc refcard.dvi refcard.ps +build/gdb-doc:: check-stamp + $(MAKE) -C $(DEB_BUILDDIR)/gdb/doc pdf html + build/gdb64:: build64-stamp build64-stamp: mkdir -p $(BUILDDIR64) @@ -271,6 +277,26 @@ rm -f debian/gdb$(TS)/usr/bin/$(TP)gdbtui install -m 755 debian/gdbtui debian/gdb$(TS)/usr/bin/$(TP)gdbtui +binary-post-install/gdb-doc :: + install -d debian/gdb-doc/usr/share/info + install -m 644 debian/tmp/usr/share/info/gdb.info debian/gdb-doc/usr/share/info/. + install -m 644 debian/tmp/usr/share/info/stabs.info debian/gdb-doc/usr/share/info/. + + $(MAKE) -C $(DEB_BUILDDIR)/gdb/doc DESTDIR=$(CURDIR)/debian/gdb-doc \ + pdfdir=/usr/share/doc/gdb-doc/pdf \ + htmldir=/usr/share/doc/gdb-doc/html \ + install-html install-pdf + : # This manual documents a long-obsolete facility + rm -f debian/gdb-doc/usr/share/info/annota* + rm -rf debian/gdb-doc/usr/share/doc/gdb-doc/*/annota* + + rm -f debian/gdb-doc/usr/share/info/dir* + + : # Symlink stuff into gdb's doc directory + install -d debian/gdb-doc/usr/share/doc/gdb + ln -s ../gdb-doc/html debian/gdb-doc/usr/share/doc/gdb/html + ln -s ../gdb-doc/pdf debian/gdb-doc/usr/share/doc/gdb/pdf + binary-post-install/gdb64 :: install -d debian/gdb64/usr/bin install -s -m 755 $(BUILDDIR64)/gdb/gdb debian/gdb64/usr/bin/gdb64 @@ -325,11 +351,15 @@ $(DEB_BUILDDIR)/gdb/doc/refcard.ps DEB_INSTALL_CHANGELOGS_gdb$(TS) = gdb/ChangeLog ifneq ($(DEB_CROSS),yes) -DEB_INSTALL_MANPAGES_gdb$(TS) = debian/gcore.1 +DEB_INSTALL_MANPAGES_gdb$(TS) = $(DEB_BUILDDIR)/gdb/doc/gdb.1 \ + $(DEB_BUILDDIR)/gdb/doc/gcore.1 endif DEB_INSTALL_DOCS_gdbserver = gdb/gdbserver/README DEB_INSTALL_CHANGELOGS_gdbserver = gdb/gdbserver/ChangeLog +ifneq ($(DEB_CROSS),yes) +DEB_INSTALL_MANPAGES_gdbserver = $(DEB_BUILDDIR)/gdb/doc/gdbserver.1 +endif DEB_INSTALL_DOCS_gdb-minimal = $(DEB_INSTALL_DOCS_gdb$(TS)) DEB_INSTALL_CHANGELOGS_gdb-minimal = -XChangeLog diff -Nru gdb-7.7/debian/source/lintian-overrides gdb-7.7.1/debian/source/lintian-overrides --- gdb-7.7/debian/source/lintian-overrides 2013-07-06 10:21:52.000000000 +0000 +++ gdb-7.7.1/debian/source/lintian-overrides 2014-10-08 18:47:24.000000000 +0000 @@ -1,3 +1,6 @@ # We do not use the included readline. gdb source: outdated-autotools-helper-file readline/support/config.guess * gdb source: outdated-autotools-helper-file readline/support/config.sub * + +# fine for Ubuntu +gdb source: license-problem-gfdl-invariants diff -Nru gdb-7.7/djunpack.bat gdb-7.7.1/djunpack.bat --- gdb-7.7/djunpack.bat 2014-02-06 02:43:24.000000000 +0000 +++ gdb-7.7.1/djunpack.bat 2014-05-05 21:57:16.000000000 +0000 @@ -17,8 +17,8 @@ Rem The following 2 lines need to be changed with each new GDB release, to Rem be identical to the name of the top-level directory where the GDB Rem distribution unpacks itself. -set GDBVER=gdb-7.7 -if "%GDBVER%"=="gdb-7.7" GoTo EnvOk +set GDBVER=gdb-7.7.1 +if "%GDBVER%"=="gdb-7.7.1" GoTo EnvOk Rem If their environment space is too small, re-exec with a larger one command.com /e:4096 /c %0 %1 GoTo End diff -Nru gdb-7.7/gdb/auto-load.c gdb-7.7.1/gdb/auto-load.c --- gdb-7.7/gdb/auto-load.c 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/gdb/auto-load.c 2014-05-05 21:51:24.000000000 +0000 @@ -791,17 +791,17 @@ make_cleanup_fclose (input); is_safe - = file_is_auto_load_safe (filename, + = file_is_auto_load_safe (debugfile, _("auto-load: Loading %s script \"%s\"" " by extension for objfile \"%s\".\n"), - language->name, filename, + language->name, debugfile, objfile_name (objfile)); /* Add this script to the hash table too so "info auto-load ${lang}-scripts" can print it. */ pspace_info = get_auto_load_pspace_data_for_loading (current_program_space); - maybe_add_script (pspace_info, is_safe, filename, filename, language); + maybe_add_script (pspace_info, is_safe, debugfile, debugfile, language); /* To preserve existing behaviour we don't check for whether the script was already in the table, and always load it. diff -Nru gdb-7.7/gdb/avr-tdep.c gdb-7.7.1/gdb/avr-tdep.c --- gdb-7.7/gdb/avr-tdep.c 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/gdb/avr-tdep.c 2014-05-05 21:51:24.000000000 +0000 @@ -179,7 +179,7 @@ struct gdbarch_tdep { /* Number of bytes stored to the stack by call instructions. - 2 bytes for avr1-5, 3 bytes for avr6. */ + 2 bytes for avr1-5 and avrxmega1-5, 3 bytes for avr6 and avrxmega6-7. */ int call_length; /* Type for void. */ @@ -719,7 +719,7 @@ info->size += gdbarch_tdep (gdbarch)->call_length; vpc += 2; } - else if (insn == 0x920f) /* push r0 */ + else if (insn == 0x920f || insn == 0x921f) /* push r0 or push r1 */ { info->size += 1; vpc += 2; @@ -1355,14 +1355,21 @@ switch (info.bfd_arch_info->mach) { case bfd_mach_avr1: + case bfd_mach_avrxmega1: case bfd_mach_avr2: + case bfd_mach_avrxmega2: case bfd_mach_avr3: + case bfd_mach_avrxmega3: case bfd_mach_avr4: + case bfd_mach_avrxmega4: case bfd_mach_avr5: + case bfd_mach_avrxmega5: default: call_length = 2; break; case bfd_mach_avr6: + case bfd_mach_avrxmega6: + case bfd_mach_avrxmega7: call_length = 3; break; } diff -Nru gdb-7.7/gdb/ChangeLog gdb-7.7.1/gdb/ChangeLog --- gdb-7.7/gdb/ChangeLog 2014-02-06 02:28:15.000000000 +0000 +++ gdb-7.7.1/gdb/ChangeLog 2014-05-05 21:51:25.000000000 +0000 @@ -1,3 +1,80 @@ +2014-05-05 Joel Brobecker + + * version.in: Set GDB version number to 7.7.1. + +2014-04-19 Eli Zaretskii + + PR gdb/14018 + * windows-nat.c (thread_rec): Don't display a warning when + SuspendThread fails with ERROR_ACCESS_DENIED. If SuspendThread + fails for any reason, set th->suspended to -1, so that we don't + try to resume such a thread. Also, don't return NULL in these + cases, to avoid completely ruin the session due to "PC register is + not available" error. + (do_windows_fetch_inferior_registers): Check errors in + GetThreadContext call. + (windows_continue): Accept an additional argument KILLED; if not + zero, ignore errors in the SetThreadContext call, since the + inferior was killed and is shutting down. + (windows_resume, get_windows_debug_event) + (windows_create_inferior, windows_mourn_inferior) + (windows_kill_inferior): All callers of windows_continue changed + to adjust to its new calling sequence. + +2014-04-11 Pierre Langlois + + PR backtrace/16721 + PR backtrace/16832 + * avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment. + (avr_gdbarch_init): Add xmega architectures given by bfd_architecture + when setting the size of call_length. + (avr_scan_prologue): Accept push r1 instruction for small stack + allocation. + * MAINTAINERS (Write After Approval): Add "Pierre Langlois". + +2014-03-05 Pedro Alves + + PR gdb/16575 + * dcache.c (dcache_poke_byte): Constify ptr parameter. Return + void. Update comment. + (dcache_xfer_memory): Delete. + (dcache_read_memory_partial): New, based on the read bits of + dcache_xfer_memory. + (dcache_update): Add status parameter. Use ULONGEST for len, and + adjust. Discard cache lines if the reason for the update was + error. + * dcache.h (dcache_xfer_memory): Delete declaration. + (dcache_read_memory_partial): New declaration. + (dcache_update): Update prototype. + * target.c (raw_memory_xfer_partial): Update the dcache here. + (memory_xfer_partial_1): Don't handle dcache writes here. + +2014-02-26 Pedro Alves + + PR breakpoints/16292 + * infrun.c (handle_signal_stop) : Switch back to the stepping thread. + +2014-02-25 Jan Kratochvil + + PR gdb/16626 + * auto-load.c (auto_load_objfile_script_1): Change filename to + debugfile. + +2014-02-09 Jan Kratochvil + + Fix Python stack corruption. + * python/py-linetable.c (ltpy_get_pcs_for_line, ltpy_has_line): Use + gdb_py_longest. + +2014-02-06 Joel Brobecker + + * version.in: Set GDB version number to 7.7.0.DATE-cvs. + +2014-02-06 Joel Brobecker + + GDB 7.7 released. + 2014-02-06 Joel Brobecker * version.in: Set GDB version number to 7.7. diff -Nru gdb-7.7/gdb/dcache.c gdb-7.7.1/gdb/dcache.c --- gdb-7.7/gdb/dcache.c 2014-01-08 09:23:36.000000000 +0000 +++ gdb-7.7.1/gdb/dcache.c 2014-05-05 21:51:24.000000000 +0000 @@ -413,24 +413,20 @@ /* Write the byte at PTR into ADDR in the data cache. - The caller is responsible for also promptly writing the data - through to target memory. + The caller should have written the data through to target memory + already. - If addr is not in cache, this function does nothing; writing to - an area of memory which wasn't present in the cache doesn't cause - it to be loaded in. + If ADDR is not in cache, this function does nothing; writing to an + area of memory which wasn't present in the cache doesn't cause it + to be loaded in. */ - Always return 1 (meaning success) to simplify dcache_xfer_memory. */ - -static int -dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr) +static void +dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, const gdb_byte *ptr) { struct dcache_block *db = dcache_hit (dcache, addr); if (db) db->data[XFORM (dcache, addr)] = *ptr; - - return 1; } static int @@ -467,26 +463,16 @@ } -/* Read or write LEN bytes from inferior memory at MEMADDR, transferring - to or from debugger address MYADDR. Write to inferior if SHOULD_WRITE is - nonzero. - - Return the number of bytes actually transfered, or -1 if the - transfer is not supported or otherwise fails. Return of a non-negative - value less than LEN indicates that no further transfer is possible. - NOTE: This is different than the to_xfer_partial interface, in which - positive values less than LEN mean further transfers may be possible. */ +/* Read LEN bytes from dcache memory at MEMADDR, transferring to + debugger address MYADDR. If the data is presently cached, this + fills the cache. Arguments/return are like the target_xfer_partial + interface. */ int -dcache_xfer_memory (struct target_ops *ops, DCACHE *dcache, - CORE_ADDR memaddr, gdb_byte *myaddr, - int len, int should_write) +dcache_read_memory_partial (struct target_ops *ops, DCACHE *dcache, + CORE_ADDR memaddr, gdb_byte *myaddr, ULONGEST len) { - int i; - int res; - int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr); - - xfunc = should_write ? dcache_poke_byte : dcache_peek_byte; + ULONGEST i; /* If this is a different inferior from what we've recorded, flush the cache. */ @@ -497,35 +483,18 @@ dcache->ptid = inferior_ptid; } - /* Do write-through first, so that if it fails, we don't write to - the cache at all. */ - - if (should_write) - { - res = target_write (ops, TARGET_OBJECT_RAW_MEMORY, - NULL, myaddr, memaddr, len); - if (res <= 0) - return res; - /* Update LEN to what was actually written. */ - len = res; - } - for (i = 0; i < len; i++) { - if (!xfunc (dcache, memaddr + i, myaddr + i)) + if (!dcache_peek_byte (dcache, memaddr + i, myaddr + i)) { /* That failed. Discard its cache line so we don't have a partially read line. */ dcache_invalidate_line (dcache, memaddr + i); - /* If we're writing, we still wrote LEN bytes. */ - if (should_write) - return len; - else - return i; + break; } } - - return len; + + return i == 0 ? -1 : i; } /* FIXME: There would be some benefit to making the cache write-back and @@ -537,17 +506,26 @@ "logically" connected but not actually a single call to one of the memory transfer functions. */ -/* Just update any cache lines which are already present. This is called - by memory_xfer_partial in cases where the access would otherwise not go - through the cache. */ +/* Just update any cache lines which are already present. This is + called by the target_xfer_partial machinery when writing raw + memory. */ void -dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr, int len) +dcache_update (DCACHE *dcache, int status, + CORE_ADDR memaddr, const gdb_byte *myaddr, + ULONGEST len) { - int i; + ULONGEST i; for (i = 0; i < len; i++) - dcache_poke_byte (dcache, memaddr + i, myaddr + i); + if (status > 0) + dcache_poke_byte (dcache, memaddr + i, myaddr + i); + else + { + /* Discard the whole cache line so we don't have a partially + valid line. */ + dcache_invalidate_line (dcache, memaddr + i); + } } /* Print DCACHE line INDEX. */ diff -Nru gdb-7.7/gdb/dcache.h gdb-7.7.1/gdb/dcache.h --- gdb-7.7/gdb/dcache.h 2014-01-08 09:23:36.000000000 +0000 +++ gdb-7.7.1/gdb/dcache.h 2014-05-05 21:51:24.000000000 +0000 @@ -32,12 +32,12 @@ /* Free a DCACHE. */ void dcache_free (DCACHE *); -/* Simple to call from _xfer_memory. */ +int dcache_read_memory_partial (struct target_ops *ops, DCACHE *dcache, + CORE_ADDR memaddr, gdb_byte *myaddr, + ULONGEST len); -int dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem, - gdb_byte *my, int len, int should_write); - -void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr, - int len); +void dcache_update (DCACHE *dcache, int status, + CORE_ADDR memaddr, const gdb_byte *myaddr, + ULONGEST len); #endif /* DCACHE_H */ diff -Nru gdb-7.7/gdb/doc/gcore.1 gdb-7.7.1/gdb/doc/gcore.1 --- gdb-7.7/gdb/doc/gcore.1 2014-02-06 02:43:11.000000000 +0000 +++ gdb-7.7.1/gdb/doc/gcore.1 2014-05-05 21:56:58.000000000 +0000 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "GCORE 1" -.TH GCORE 1 "2014-02-06" "gdb-7.7" "GNU Development Tools" +.TH GCORE 1 "2014-05-05" "gdb-7.7.1" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -Nru gdb-7.7/gdb/doc/gdb.1 gdb-7.7.1/gdb/doc/gdb.1 --- gdb-7.7/gdb/doc/gdb.1 2014-02-06 02:43:11.000000000 +0000 +++ gdb-7.7.1/gdb/doc/gdb.1 2014-05-05 21:56:58.000000000 +0000 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "GDB 1" -.TH GDB 1 "2014-02-06" "gdb-7.7" "GNU Development Tools" +.TH GDB 1 "2014-05-05" "gdb-7.7.1" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -Nru gdb-7.7/gdb/doc/gdb.info gdb-7.7.1/gdb/doc/gdb.info --- gdb-7.7/gdb/doc/gdb.info 2014-02-06 02:43:09.000000000 +0000 +++ gdb-7.7.1/gdb/doc/gdb.info 2014-05-05 21:56:56.000000000 +0000 @@ -21,648 +21,648 @@  Indirect: gdb.info-1: 899 -gdb.info-2: 305459 -gdb.info-3: 616091 -gdb.info-4: 902010 -gdb.info-5: 1201597 -gdb.info-6: 1512256 +gdb.info-2: 305465 +gdb.info-3: 616097 +gdb.info-4: 902016 +gdb.info-5: 1201603 +gdb.info-6: 1512320  Tag Table: (Indirect) -Node: Top1700 -Node: Summary5156 -Node: Free Software7017 -Node: Free Documentation7757 -Node: Contributors12691 -Node: Sample Session20789 -Node: Invocation27625 -Node: Invoking GDB28168 -Node: File Options30480 -Node: Mode Options33537 -Ref: -nx33764 -Ref: -nh34848 -Node: Startup41151 -Ref: Home Directory Init File41702 -Ref: Option -init-eval-command41812 -Ref: Init File in the Current Directory during Startup42152 -Ref: Startup-Footnote-144348 -Node: Quitting GDB44457 -Node: Shell Commands45354 -Node: Logging Output46281 -Node: Commands47118 -Node: Command Syntax47756 -Node: Completion49922 -Ref: Completion-Footnote-155286 -Node: Help55446 -Node: Running61197 -Node: Compilation62426 -Node: Starting64510 -Node: Arguments74632 -Node: Environment75901 -Node: Working Directory79277 -Node: Input/Output80429 -Node: Attach82400 -Node: Kill Process84866 -Node: Inferiors and Programs85847 -Node: Threads93089 -Ref: set libthread-db-search-path100493 -Node: Forks102547 -Node: Checkpoint/Restart108861 -Ref: Checkpoint/Restart-Footnote-1113389 -Node: Stopping113424 -Node: Breakpoints114687 -Node: Set Breaks118226 -Node: Set Watchpoints136944 -Node: Set Catchpoints146348 -Node: Delete Breaks157218 -Node: Disabling159158 -Node: Conditions162543 -Node: Break Commands168190 -Node: Dynamic Printf171411 -Node: Save Breakpoints175670 -Node: Static Probe Points176845 -Node: Error in Breakpoints179532 -Node: Breakpoint-related Warnings180268 -Node: Continuing and Stepping182595 -Ref: range stepping191970 -Node: Skipping Over Functions and Files193050 -Node: Signals196622 -Ref: extra signal information201052 -Node: Thread Stops202556 -Node: All-Stop Mode203655 -Node: Non-Stop Mode207555 -Node: Background Execution211028 -Node: Thread-Specific Breakpoints213592 -Node: Interrupted System Calls215596 -Node: Observer Mode217110 -Node: Reverse Execution220546 -Ref: Reverse Execution-Footnote-1225171 -Ref: Reverse Execution-Footnote-2225798 -Node: Process Record and Replay225848 -Node: Stack238813 -Node: Frames240361 -Node: Backtrace243113 -Ref: backtrace-command243464 -Ref: Backtrace-Footnote-1249234 -Node: Frame Filter Management249422 -Ref: disable frame-filter all249966 -Node: Selection254266 -Node: Frame Info257144 -Node: Source259131 -Node: List260197 -Node: Specify Location262899 -Node: Edit267503 -Ref: Edit-Footnote-1268979 -Node: Search269214 -Node: Source Path270022 -Ref: set substitute-path276388 -Node: Machine Code278608 -Node: Data285509 -Node: Expressions293173 -Node: Ambiguous Expressions295264 -Node: Variables298494 -Node: Arrays305459 -Node: Output Formats307990 -Ref: Output Formats-Footnote-1311363 -Node: Memory311520 -Node: Auto Display317672 -Node: Print Settings322214 -Ref: set print entry-values330376 -Node: Pretty Printing341690 -Node: Pretty-Printer Introduction342204 -Node: Pretty-Printer Example343959 -Node: Pretty-Printer Commands344737 -Node: Value History347161 -Node: Convenience Vars349583 -Node: Convenience Funs356065 -Node: Registers358936 -Ref: Registers-Footnote-1364865 -Node: Floating Point Hardware365260 -Node: Vector Unit365792 -Node: OS Information366179 -Ref: linux info os infotypes368203 -Node: Memory Region Attributes372410 -Node: Dump/Restore Files377074 -Node: Core File Generation379379 -Node: Character Sets380603 -Node: Caching Target Data386968 -Ref: Caching Target Data-Footnote-1389696 -Node: Searching Memory389934 -Node: Optimized Code392812 -Node: Inline Functions394489 -Node: Tail Call Frames397116 -Ref: set debug entry-values399256 -Node: Macros403330 -Ref: Macros-Footnote-1410906 -Node: Tracepoints411059 -Node: Set Tracepoints413121 -Node: Create and Delete Tracepoints416059 -Node: Enable and Disable Tracepoints422460 -Node: Tracepoint Passcounts423700 -Node: Tracepoint Conditions425111 -Node: Trace State Variables426805 -Node: Tracepoint Actions428996 -Node: Listing Tracepoints435299 -Node: Listing Static Tracepoint Markers437001 -Node: Starting and Stopping Trace Experiments438849 -Ref: disconnected tracing440594 -Node: Tracepoint Restrictions445014 -Node: Analyze Collected Data448783 -Node: tfind450089 -Node: tdump454511 -Node: save tracepoints457026 -Node: Tracepoint Variables457522 -Node: Trace Files458650 -Node: Overlays461020 -Node: How Overlays Work461740 -Ref: A code overlay464295 -Node: Overlay Commands467708 -Node: Automatic Overlay Debugging471890 -Node: Overlay Sample Program474029 -Node: Languages475766 -Node: Setting476929 -Node: Filenames478630 -Node: Manually479441 -Node: Automatically480650 -Node: Show481711 -Ref: show language481999 -Node: Checks483033 -Node: Type Checking484038 -Node: Range Checking485867 -Node: Supported Languages488268 -Node: C489568 -Node: C Operators490532 -Node: C Constants494845 -Node: C Plus Plus Expressions497724 -Node: C Defaults501067 -Node: C Checks501735 -Node: Debugging C502295 -Node: Debugging C Plus Plus502779 -Node: Decimal Floating Point506253 -Node: D507523 -Node: Go507781 -Node: Objective-C508875 -Node: Method Names in Commands509338 -Node: The Print Command with Objective-C511029 -Node: OpenCL C511680 -Node: OpenCL C Datatypes511955 -Node: OpenCL C Expressions512330 -Node: OpenCL C Operators512687 -Node: Fortran512919 -Node: Fortran Operators513640 -Node: Fortran Defaults514496 -Node: Special Fortran Commands514881 -Node: Pascal515387 -Node: Modula-2515902 -Node: M2 Operators516877 -Node: Built-In Func/Proc519875 -Node: M2 Constants522735 -Node: M2 Types524336 -Node: M2 Defaults527554 -Node: Deviations528155 -Node: M2 Checks529256 -Node: M2 Scope530073 -Node: GDB/M2531097 -Node: Ada532010 -Node: Ada Mode Intro533120 -Node: Omissions from Ada535031 -Node: Additions to Ada539384 -Node: Stopping Before Main Program543311 -Node: Ada Exceptions543845 -Node: Ada Tasks545042 -Node: Ada Tasks and Core Files551446 -Node: Ravenscar Profile552364 -Node: Ada Glitches553433 -Node: Unsupported Languages556221 -Node: Symbols556911 -Node: Altering574252 -Node: Assignment575221 -Node: Jumping578327 -Node: Signaling580489 -Node: Returning581622 -Node: Calling584973 -Node: Patching588000 -Node: GDB Files589077 -Node: Files589797 -Ref: Shared Libraries603387 -Ref: Files-Footnote-1615017 -Node: Separate Debug Files616091 -Ref: debug-file-directory619195 -Node: MiniDebugInfo627840 -Node: Index Files630291 -Node: Symbol Errors632353 -Node: Data Files635969 -Node: Targets636925 -Node: Active Targets638405 -Node: Target Commands639479 -Ref: load643605 -Node: Byte Order644586 -Node: Remote Debugging645560 -Node: Connecting646822 -Node: File Transfer651757 -Node: Server652696 -Ref: Monitor Commands for gdbserver662917 -Ref: Server-Footnote-1667574 -Node: Remote Configuration667694 -Ref: set remotebreak668720 -Ref: set remote hardware-watchpoint-limit670183 -Ref: set remote hardware-breakpoint-limit670183 -Ref: set remote hardware-watchpoint-length-limit670409 -Ref: set remote exec-file670824 -Node: Remote Stub680313 -Node: Stub Contents683208 -Node: Bootstrapping685315 -Node: Debug Session689125 -Node: Configurations691166 -Node: Native691935 -Node: HP-UX692504 -Node: BSD libkvm Interface692793 -Node: SVR4 Process Information693864 -Node: DJGPP Native697668 -Node: Cygwin Native704227 -Node: Non-debug DLL Symbols708174 -Node: Hurd Native712730 -Node: Darwin717986 -Node: Embedded OS719247 -Node: VxWorks719723 -Node: VxWorks Connection721937 -Node: VxWorks Download722871 -Node: VxWorks Attach724606 -Node: Embedded Processors725003 -Node: ARM726136 -Node: M32R/D730259 -Node: M68K731961 -Node: MicroBlaze732253 -Node: MIPS Embedded733702 -Node: PowerPC Embedded738639 -Node: PA742405 -Node: Sparclet742688 -Node: Sparclet File744157 -Node: Sparclet Connection745037 -Node: Sparclet Download745515 -Node: Sparclet Execution746563 -Node: Sparclite747154 -Node: Z8000747526 -Node: AVR748908 -Node: CRIS749271 -Node: Super-H750249 -Node: Architectures751308 -Node: AArch64751745 -Node: i386752151 -Ref: i386-Footnote-1754383 -Node: Alpha754469 -Node: MIPS754602 -Node: HPPA758496 -Node: SPU759014 -Node: PowerPC761200 -Node: Nios II761935 -Node: Controlling GDB762324 -Node: Prompt763220 -Node: Editing764938 -Node: Command History765881 -Node: Screen Size769412 -Node: Numbers771346 -Node: ABI773317 -Node: Auto-loading776490 -Ref: set auto-load off777865 -Ref: show auto-load778501 -Ref: info auto-load779280 -Node: Init File in the Current Directory781949 -Ref: set auto-load local-gdbinit782524 -Ref: show auto-load local-gdbinit782706 -Ref: info auto-load local-gdbinit782870 -Node: libthread_db.so.1 file783018 -Ref: set auto-load libthread-db783957 -Ref: show auto-load libthread-db784088 -Ref: info auto-load libthread-db784225 -Node: Auto-loading safe path784409 -Ref: set auto-load safe-path785715 -Ref: show auto-load safe-path786454 -Ref: add-auto-load-safe-path786577 -Node: Auto-loading verbose mode789471 -Ref: set debug auto-load790634 -Ref: show debug auto-load790735 -Node: Messages/Warnings790857 -Ref: confirmation requests792291 -Node: Debugging Output793495 -Node: Other Misc Settings801972 -Node: Extending GDB802996 -Node: Sequences804719 -Node: Define805380 -Node: Hooks809178 -Node: Command Files811543 -Node: Output816616 -Node: Auto-loading sequences821580 -Ref: set auto-load gdb-scripts822075 -Ref: show auto-load gdb-scripts822199 -Ref: info auto-load gdb-scripts822329 -Node: Python822560 -Node: Python Commands823751 -Node: Python API826079 -Node: Basic Python828386 -Ref: prompt_hook836986 -Node: Exception Handling837584 -Node: Values From Inferior840080 -Node: Types In Python852078 -Node: Pretty Printing API861300 -Node: Selecting Pretty-Printers865196 -Node: Writing a Pretty-Printer867529 -Node: Type Printing API872851 -Node: Frame Filter API875449 -Node: Frame Decorator API882730 -Ref: frame_args886314 -Node: Writing a Frame Filter889644 -Node: Inferiors In Python902010 -Node: Events In Python904894 -Node: Threads In Python910073 -Node: Commands In Python912513 -Node: Parameters In Python921919 -Node: Functions In Python927379 -Node: Progspaces In Python929596 -Node: Objfiles In Python931280 -Node: Frames In Python933539 -Node: Blocks In Python939706 -Node: Symbols In Python944068 -Node: Symbol Tables In Python951276 -Node: Line Tables In Python954201 -Node: Breakpoints In Python957038 -Node: Finish Breakpoints in Python964952 -Node: Lazy Strings In Python967058 -Node: Architectures In Python969292 -Node: Python Auto-loading971481 -Ref: set auto-load python-scripts972110 -Ref: show auto-load python-scripts972210 -Ref: info auto-load python-scripts972316 -Node: Python modules973341 -Node: gdb.printing973727 -Node: gdb.types975141 -Node: gdb.prompt978166 -Node: Auto-loading extensions979815 -Node: objfile-gdbdotext file980993 -Ref: set auto-load scripts-directory982400 -Ref: with-auto-load-dir982776 -Ref: show auto-load scripts-directory983594 -Node: dotdebug_gdb_scripts section983924 -Node: Which flavor to choose?985716 -Node: Aliases987537 -Node: Interpreters990397 -Node: TUI992495 -Node: TUI Overview993439 -Node: TUI Keys995872 -Node: TUI Single Key Mode998176 -Node: TUI Commands999051 -Node: TUI Configuration1001435 -Node: Emacs1002741 -Node: GDB/MI1008178 -Node: GDB/MI General Design1010152 -Node: Context management1012672 -Node: Asynchronous and non-stop modes1016500 -Node: Thread groups1018491 -Node: GDB/MI Command Syntax1020769 -Node: GDB/MI Input Syntax1021012 -Node: GDB/MI Output Syntax1022562 -Node: GDB/MI Compatibility with CLI1026132 -Node: GDB/MI Development and Front Ends1026869 -Node: GDB/MI Output Records1028523 -Node: GDB/MI Result Records1028929 -Node: GDB/MI Stream Records1030279 -Node: GDB/MI Async Records1031544 -Node: GDB/MI Breakpoint Information1041159 -Node: GDB/MI Frame Information1045110 -Node: GDB/MI Thread Information1046196 -Node: GDB/MI Ada Exception Information1047176 -Node: GDB/MI Simple Examples1047599 -Node: GDB/MI Command Description Format1049807 -Node: GDB/MI Breakpoint Commands1050687 -Node: GDB/MI Catchpoint Commands1070533 -Node: Shared Library GDB/MI Catchpoint Commands1070901 -Node: Ada Exception GDB/MI Catchpoint Commands1072559 -Node: GDB/MI Program Context1074963 -Node: GDB/MI Thread Commands1079231 -Node: GDB/MI Ada Tasking Commands1083187 -Node: GDB/MI Program Execution1085440 -Node: GDB/MI Stack Manipulation1097474 -Ref: -stack-list-arguments1099373 -Ref: -stack-list-frames1103078 -Ref: -stack-list-locals1106941 -Ref: -stack-list-variables1108431 -Node: GDB/MI Variable Objects1109965 -Ref: -var-set-format1119923 -Ref: -var-list-children1121041 -Ref: -var-update1129833 -Ref: -var-set-frozen1132831 -Ref: -var-set-update-range1133628 -Ref: -var-set-visualizer1134157 -Node: GDB/MI Data Manipulation1135647 -Node: GDB/MI Tracepoint Commands1155185 -Node: GDB/MI Symbol Query1166770 -Node: GDB/MI File Commands1167459 -Node: GDB/MI Target Manipulation1170754 -Node: GDB/MI File Transfer Commands1176969 -Node: GDB/MI Ada Exceptions Commands1178292 -Node: GDB/MI Support Commands1179645 -Node: GDB/MI Miscellaneous Commands1184218 -Ref: -interpreter-exec1194242 -Node: Annotations1196582 -Node: Annotations Overview1197501 -Node: Server Prefix1199964 -Node: Prompting1201597 -Node: Errors1203114 -Node: Invalidation1204010 -Node: Annotations for Running1204489 -Node: Source Annotations1206009 -Node: JIT Interface1206934 -Node: Declarations1208733 -Node: Registering Code1210120 -Node: Unregistering Code1211092 -Node: Custom Debug Info1211719 -Node: Using JIT Debug Info Readers1213015 -Node: Writing JIT Debug Info Readers1214029 -Node: In-Process Agent1216224 -Ref: Control Agent1218167 -Node: In-Process Agent Protocol1219034 -Node: IPA Protocol Objects1219825 -Ref: agent expression object1220823 -Ref: tracepoint action object1221028 -Ref: tracepoint object1221108 -Node: IPA Protocol Commands1223684 -Node: GDB Bugs1225136 -Node: Bug Criteria1225868 -Node: Bug Reporting1226745 -Node: Command Line Editing1234574 -Node: Introduction and Notation1235226 -Node: Readline Interaction1236847 -Node: Readline Bare Essentials1238036 -Node: Readline Movement Commands1239817 -Node: Readline Killing Commands1240775 -Node: Readline Arguments1242691 -Node: Searching1243733 -Node: Readline Init File1245883 -Node: Readline Init File Syntax1247034 -Node: Conditional Init Constructs1262133 -Node: Sample Init File1264656 -Node: Bindable Readline Commands1267770 -Node: Commands For Moving1268822 -Node: Commands For History1269680 -Node: Commands For Text1273075 -Node: Commands For Killing1275798 -Node: Numeric Arguments1277938 -Node: Commands For Completion1279074 -Node: Keyboard Macros1281040 -Node: Miscellaneous Commands1281608 -Node: Readline vi Mode1285456 -Node: Using History Interactively1286366 -Node: History Interaction1286881 -Node: Event Designators1288303 -Node: Word Designators1289440 -Node: Modifiers1291075 -Node: In Memoriam1292296 -Node: Formatting Documentation1293179 -Ref: Formatting Documentation-Footnote-11296491 -Node: Installing GDB1296555 -Node: Requirements1297127 -Ref: Expat1297696 -Node: Running Configure1300263 -Node: Separate Objdir1303802 -Node: Config Names1306685 -Node: Configure Options1308130 -Node: System-wide configuration1310501 -Node: System-wide Configuration Scripts1312461 -Node: Maintenance Commands1313645 -Ref: maint info breakpoints1315300 -Node: Remote Protocol1331227 -Node: Overview1331881 -Ref: Binary Data1334426 -Node: Packets1336951 -Ref: thread-id syntax1337851 -Ref: extended mode1339296 -Ref: bc1341020 -Ref: bs1341230 -Ref: read registers packet1342835 -Ref: cycle step packet1344768 -Ref: write register packet1346645 -Ref: step with signal packet1347642 -Ref: vCont packet1349098 -Ref: X packet1354910 -Ref: insert breakpoint or watchpoint packet1355197 -Node: Stop Reply Packets1359239 -Node: General Query Packets1363983 -Ref: QNonStop1374207 -Ref: QPassSignals1374834 -Ref: QProgramSignals1376006 -Ref: qSearch memory1378486 -Ref: QStartNoAckMode1378985 -Ref: qSupported1379516 -Ref: multiprocess extensions1392214 -Ref: install tracepoint in tracing1394244 -Ref: qXfer read1397604 -Ref: qXfer auxiliary vector read1398099 -Ref: qXfer btrace read1398447 -Ref: qXfer target description read1399070 -Ref: qXfer library list read1399504 -Ref: qXfer svr4 library list read1400160 -Ref: qXfer memory map read1402013 -Ref: qXfer sdata read1402400 -Ref: qXfer siginfo read1402866 -Ref: qXfer spu read1403263 -Ref: qXfer threads read1403787 -Ref: qXfer traceframe info read1404190 -Ref: qXfer unwind info block1404608 -Ref: qXfer fdpic loadmap read1404842 -Ref: qXfer osdata read1405258 -Ref: qXfer write1406465 -Ref: qXfer siginfo write1407018 -Ref: qXfer spu write1407415 -Ref: General Query Packets-Footnote-11409948 -Node: Architecture-Specific Protocol Details1410275 -Node: ARM-Specific Protocol Details1410784 -Node: ARM Breakpoint Kinds1411032 -Node: MIPS-Specific Protocol Details1411363 -Node: MIPS Register packet Format1411646 -Node: MIPS Breakpoint Kinds1412573 -Node: Tracepoint Packets1412991 -Ref: QTEnable1421986 -Ref: QTDisable1422182 -Ref: qTfSTM1427721 -Ref: qTsSTM1427721 -Ref: qTSTMat1428760 -Ref: QTBuffer-size1429907 -Node: Host I/O Packets1431876 -Node: Interrupts1436486 -Node: Notification Packets1438389 -Node: Remote Non-Stop1443798 -Node: Packet Acknowledgment1446088 -Node: Examples1448203 -Node: File-I/O Remote Protocol Extension1448797 -Node: File-I/O Overview1449259 -Node: Protocol Basics1451458 -Node: The F Request Packet1453687 -Node: The F Reply Packet1454588 -Node: The Ctrl-C Message1455506 -Node: Console I/O1457132 -Node: List of Supported Calls1458348 -Node: open1458710 -Node: close1461218 -Node: read1461601 -Node: write1462210 -Node: lseek1462981 -Node: rename1463865 -Node: unlink1465272 -Node: stat/fstat1466219 -Node: gettimeofday1467112 -Node: isatty1467548 -Node: system1468144 -Node: Protocol-specific Representation of Datatypes1469686 -Node: Integral Datatypes1470063 -Node: Pointer Values1470870 -Node: Memory Transfer1471574 -Node: struct stat1472194 -Node: struct timeval1474396 -Node: Constants1474913 -Node: Open Flags1475362 -Node: mode_t Values1475703 -Node: Errno Values1476195 -Node: Lseek Flags1477005 -Node: Limits1477190 -Node: File-I/O Examples1477550 -Node: Library List Format1478638 -Node: Library List Format for SVR4 Targets1481420 -Node: Memory Map Format1483887 -Node: Thread List Format1486462 -Node: Traceframe Info Format1487280 -Node: Branch Trace Format1488966 -Node: Agent Expressions1490311 -Node: General Bytecode Design1493132 -Node: Bytecode Descriptions1497926 -Node: Using Agent Expressions1512256 -Node: Varying Target Capabilities1514233 -Node: Rationale1515394 -Node: Target Descriptions1522783 -Node: Retrieving Descriptions1524657 -Node: Target Description Format1525742 -Node: Predefined Target Types1534790 -Node: Standard Target Features1536174 -Node: AArch64 Features1538038 -Node: ARM Features1538461 -Node: i386 Features1539979 -Node: MIPS Features1541336 -Node: M68K Features1542521 -Node: Nios II Features1543184 -Node: PowerPC Features1543582 -Node: S/390 and System z Features1544905 -Node: TIC6x Features1546370 -Node: Operating System Information1546930 -Node: Process list1547765 -Node: Trace File Format1548828 -Node: Index Section Format1550821 -Node: Man Pages1558791 -Node: gdb man1559197 -Node: gdbserver man1565233 -Node: gcore man1572238 -Node: gdbinit man1572895 -Node: Copying1573778 -Node: GNU Free Documentation License1611338 -Node: Concept Index1636484 -Node: Command and Variable Index1759495 +Node: Top1702 +Node: Summary5160 +Node: Free Software7021 +Node: Free Documentation7761 +Node: Contributors12695 +Node: Sample Session20793 +Node: Invocation27631 +Node: Invoking GDB28174 +Node: File Options30486 +Node: Mode Options33543 +Ref: -nx33770 +Ref: -nh34854 +Node: Startup41157 +Ref: Home Directory Init File41708 +Ref: Option -init-eval-command41818 +Ref: Init File in the Current Directory during Startup42158 +Ref: Startup-Footnote-144354 +Node: Quitting GDB44463 +Node: Shell Commands45360 +Node: Logging Output46287 +Node: Commands47124 +Node: Command Syntax47762 +Node: Completion49928 +Ref: Completion-Footnote-155292 +Node: Help55452 +Node: Running61203 +Node: Compilation62432 +Node: Starting64516 +Node: Arguments74638 +Node: Environment75907 +Node: Working Directory79283 +Node: Input/Output80435 +Node: Attach82406 +Node: Kill Process84872 +Node: Inferiors and Programs85853 +Node: Threads93095 +Ref: set libthread-db-search-path100499 +Node: Forks102553 +Node: Checkpoint/Restart108867 +Ref: Checkpoint/Restart-Footnote-1113395 +Node: Stopping113430 +Node: Breakpoints114693 +Node: Set Breaks118232 +Node: Set Watchpoints136950 +Node: Set Catchpoints146354 +Node: Delete Breaks157224 +Node: Disabling159164 +Node: Conditions162549 +Node: Break Commands168196 +Node: Dynamic Printf171417 +Node: Save Breakpoints175676 +Node: Static Probe Points176851 +Node: Error in Breakpoints179538 +Node: Breakpoint-related Warnings180274 +Node: Continuing and Stepping182601 +Ref: range stepping191976 +Node: Skipping Over Functions and Files193056 +Node: Signals196628 +Ref: extra signal information201058 +Node: Thread Stops202562 +Node: All-Stop Mode203661 +Node: Non-Stop Mode207561 +Node: Background Execution211034 +Node: Thread-Specific Breakpoints213598 +Node: Interrupted System Calls215602 +Node: Observer Mode217116 +Node: Reverse Execution220552 +Ref: Reverse Execution-Footnote-1225177 +Ref: Reverse Execution-Footnote-2225804 +Node: Process Record and Replay225854 +Node: Stack238819 +Node: Frames240367 +Node: Backtrace243119 +Ref: backtrace-command243470 +Ref: Backtrace-Footnote-1249240 +Node: Frame Filter Management249428 +Ref: disable frame-filter all249972 +Node: Selection254272 +Node: Frame Info257150 +Node: Source259137 +Node: List260203 +Node: Specify Location262905 +Node: Edit267509 +Ref: Edit-Footnote-1268985 +Node: Search269220 +Node: Source Path270028 +Ref: set substitute-path276394 +Node: Machine Code278614 +Node: Data285515 +Node: Expressions293179 +Node: Ambiguous Expressions295270 +Node: Variables298500 +Node: Arrays305465 +Node: Output Formats307996 +Ref: Output Formats-Footnote-1311369 +Node: Memory311526 +Node: Auto Display317678 +Node: Print Settings322220 +Ref: set print entry-values330382 +Node: Pretty Printing341696 +Node: Pretty-Printer Introduction342210 +Node: Pretty-Printer Example343965 +Node: Pretty-Printer Commands344743 +Node: Value History347167 +Node: Convenience Vars349589 +Node: Convenience Funs356071 +Node: Registers358942 +Ref: Registers-Footnote-1364871 +Node: Floating Point Hardware365266 +Node: Vector Unit365798 +Node: OS Information366185 +Ref: linux info os infotypes368209 +Node: Memory Region Attributes372416 +Node: Dump/Restore Files377080 +Node: Core File Generation379385 +Node: Character Sets380609 +Node: Caching Target Data386974 +Ref: Caching Target Data-Footnote-1389702 +Node: Searching Memory389940 +Node: Optimized Code392818 +Node: Inline Functions394495 +Node: Tail Call Frames397122 +Ref: set debug entry-values399262 +Node: Macros403336 +Ref: Macros-Footnote-1410912 +Node: Tracepoints411065 +Node: Set Tracepoints413127 +Node: Create and Delete Tracepoints416065 +Node: Enable and Disable Tracepoints422466 +Node: Tracepoint Passcounts423706 +Node: Tracepoint Conditions425117 +Node: Trace State Variables426811 +Node: Tracepoint Actions429002 +Node: Listing Tracepoints435305 +Node: Listing Static Tracepoint Markers437007 +Node: Starting and Stopping Trace Experiments438855 +Ref: disconnected tracing440600 +Node: Tracepoint Restrictions445020 +Node: Analyze Collected Data448789 +Node: tfind450095 +Node: tdump454517 +Node: save tracepoints457032 +Node: Tracepoint Variables457528 +Node: Trace Files458656 +Node: Overlays461026 +Node: How Overlays Work461746 +Ref: A code overlay464301 +Node: Overlay Commands467714 +Node: Automatic Overlay Debugging471896 +Node: Overlay Sample Program474035 +Node: Languages475772 +Node: Setting476935 +Node: Filenames478636 +Node: Manually479447 +Node: Automatically480656 +Node: Show481717 +Ref: show language482005 +Node: Checks483039 +Node: Type Checking484044 +Node: Range Checking485873 +Node: Supported Languages488274 +Node: C489574 +Node: C Operators490538 +Node: C Constants494851 +Node: C Plus Plus Expressions497730 +Node: C Defaults501073 +Node: C Checks501741 +Node: Debugging C502301 +Node: Debugging C Plus Plus502785 +Node: Decimal Floating Point506259 +Node: D507529 +Node: Go507787 +Node: Objective-C508881 +Node: Method Names in Commands509344 +Node: The Print Command with Objective-C511035 +Node: OpenCL C511686 +Node: OpenCL C Datatypes511961 +Node: OpenCL C Expressions512336 +Node: OpenCL C Operators512693 +Node: Fortran512925 +Node: Fortran Operators513646 +Node: Fortran Defaults514502 +Node: Special Fortran Commands514887 +Node: Pascal515393 +Node: Modula-2515908 +Node: M2 Operators516883 +Node: Built-In Func/Proc519881 +Node: M2 Constants522741 +Node: M2 Types524342 +Node: M2 Defaults527560 +Node: Deviations528161 +Node: M2 Checks529262 +Node: M2 Scope530079 +Node: GDB/M2531103 +Node: Ada532016 +Node: Ada Mode Intro533126 +Node: Omissions from Ada535037 +Node: Additions to Ada539390 +Node: Stopping Before Main Program543317 +Node: Ada Exceptions543851 +Node: Ada Tasks545048 +Node: Ada Tasks and Core Files551452 +Node: Ravenscar Profile552370 +Node: Ada Glitches553439 +Node: Unsupported Languages556227 +Node: Symbols556917 +Node: Altering574258 +Node: Assignment575227 +Node: Jumping578333 +Node: Signaling580495 +Node: Returning581628 +Node: Calling584979 +Node: Patching588006 +Node: GDB Files589083 +Node: Files589803 +Ref: Shared Libraries603393 +Ref: Files-Footnote-1615023 +Node: Separate Debug Files616097 +Ref: debug-file-directory619201 +Node: MiniDebugInfo627846 +Node: Index Files630297 +Node: Symbol Errors632359 +Node: Data Files635975 +Node: Targets636931 +Node: Active Targets638411 +Node: Target Commands639485 +Ref: load643611 +Node: Byte Order644592 +Node: Remote Debugging645566 +Node: Connecting646828 +Node: File Transfer651763 +Node: Server652702 +Ref: Monitor Commands for gdbserver662923 +Ref: Server-Footnote-1667580 +Node: Remote Configuration667700 +Ref: set remotebreak668726 +Ref: set remote hardware-watchpoint-limit670189 +Ref: set remote hardware-breakpoint-limit670189 +Ref: set remote hardware-watchpoint-length-limit670415 +Ref: set remote exec-file670830 +Node: Remote Stub680319 +Node: Stub Contents683214 +Node: Bootstrapping685321 +Node: Debug Session689131 +Node: Configurations691172 +Node: Native691941 +Node: HP-UX692510 +Node: BSD libkvm Interface692799 +Node: SVR4 Process Information693870 +Node: DJGPP Native697674 +Node: Cygwin Native704233 +Node: Non-debug DLL Symbols708180 +Node: Hurd Native712736 +Node: Darwin717992 +Node: Embedded OS719253 +Node: VxWorks719729 +Node: VxWorks Connection721943 +Node: VxWorks Download722877 +Node: VxWorks Attach724612 +Node: Embedded Processors725009 +Node: ARM726142 +Node: M32R/D730265 +Node: M68K731967 +Node: MicroBlaze732259 +Node: MIPS Embedded733708 +Node: PowerPC Embedded738645 +Node: PA742411 +Node: Sparclet742694 +Node: Sparclet File744163 +Node: Sparclet Connection745043 +Node: Sparclet Download745521 +Node: Sparclet Execution746569 +Node: Sparclite747160 +Node: Z8000747532 +Node: AVR748914 +Node: CRIS749277 +Node: Super-H750255 +Node: Architectures751314 +Node: AArch64751751 +Node: i386752157 +Ref: i386-Footnote-1754389 +Node: Alpha754475 +Node: MIPS754608 +Node: HPPA758502 +Node: SPU759020 +Node: PowerPC761206 +Node: Nios II761941 +Node: Controlling GDB762330 +Node: Prompt763226 +Node: Editing764944 +Node: Command History765887 +Node: Screen Size769418 +Node: Numbers771352 +Node: ABI773323 +Node: Auto-loading776496 +Ref: set auto-load off777871 +Ref: show auto-load778507 +Ref: info auto-load779286 +Node: Init File in the Current Directory781955 +Ref: set auto-load local-gdbinit782530 +Ref: show auto-load local-gdbinit782712 +Ref: info auto-load local-gdbinit782876 +Node: libthread_db.so.1 file783024 +Ref: set auto-load libthread-db783963 +Ref: show auto-load libthread-db784094 +Ref: info auto-load libthread-db784231 +Node: Auto-loading safe path784415 +Ref: set auto-load safe-path785721 +Ref: show auto-load safe-path786460 +Ref: add-auto-load-safe-path786583 +Node: Auto-loading verbose mode789477 +Ref: set debug auto-load790640 +Ref: show debug auto-load790741 +Node: Messages/Warnings790863 +Ref: confirmation requests792297 +Node: Debugging Output793501 +Node: Other Misc Settings801978 +Node: Extending GDB803002 +Node: Sequences804725 +Node: Define805386 +Node: Hooks809184 +Node: Command Files811549 +Node: Output816622 +Node: Auto-loading sequences821586 +Ref: set auto-load gdb-scripts822081 +Ref: show auto-load gdb-scripts822205 +Ref: info auto-load gdb-scripts822335 +Node: Python822566 +Node: Python Commands823757 +Node: Python API826085 +Node: Basic Python828392 +Ref: prompt_hook836992 +Node: Exception Handling837590 +Node: Values From Inferior840086 +Node: Types In Python852084 +Node: Pretty Printing API861306 +Node: Selecting Pretty-Printers865202 +Node: Writing a Pretty-Printer867535 +Node: Type Printing API872857 +Node: Frame Filter API875455 +Node: Frame Decorator API882736 +Ref: frame_args886320 +Node: Writing a Frame Filter889650 +Node: Inferiors In Python902016 +Node: Events In Python904900 +Node: Threads In Python910079 +Node: Commands In Python912519 +Node: Parameters In Python921925 +Node: Functions In Python927385 +Node: Progspaces In Python929602 +Node: Objfiles In Python931286 +Node: Frames In Python933545 +Node: Blocks In Python939712 +Node: Symbols In Python944074 +Node: Symbol Tables In Python951282 +Node: Line Tables In Python954207 +Node: Breakpoints In Python957044 +Node: Finish Breakpoints in Python964958 +Node: Lazy Strings In Python967064 +Node: Architectures In Python969298 +Node: Python Auto-loading971487 +Ref: set auto-load python-scripts972116 +Ref: show auto-load python-scripts972216 +Ref: info auto-load python-scripts972322 +Node: Python modules973347 +Node: gdb.printing973733 +Node: gdb.types975147 +Node: gdb.prompt978172 +Node: Auto-loading extensions979821 +Node: objfile-gdbdotext file980999 +Ref: set auto-load scripts-directory982406 +Ref: with-auto-load-dir982782 +Ref: show auto-load scripts-directory983600 +Node: dotdebug_gdb_scripts section983930 +Node: Which flavor to choose?985722 +Node: Aliases987543 +Node: Interpreters990403 +Node: TUI992501 +Node: TUI Overview993445 +Node: TUI Keys995878 +Node: TUI Single Key Mode998182 +Node: TUI Commands999057 +Node: TUI Configuration1001441 +Node: Emacs1002747 +Node: GDB/MI1008184 +Node: GDB/MI General Design1010158 +Node: Context management1012678 +Node: Asynchronous and non-stop modes1016506 +Node: Thread groups1018497 +Node: GDB/MI Command Syntax1020775 +Node: GDB/MI Input Syntax1021018 +Node: GDB/MI Output Syntax1022568 +Node: GDB/MI Compatibility with CLI1026138 +Node: GDB/MI Development and Front Ends1026875 +Node: GDB/MI Output Records1028529 +Node: GDB/MI Result Records1028935 +Node: GDB/MI Stream Records1030285 +Node: GDB/MI Async Records1031550 +Node: GDB/MI Breakpoint Information1041165 +Node: GDB/MI Frame Information1045116 +Node: GDB/MI Thread Information1046202 +Node: GDB/MI Ada Exception Information1047182 +Node: GDB/MI Simple Examples1047605 +Node: GDB/MI Command Description Format1049813 +Node: GDB/MI Breakpoint Commands1050693 +Node: GDB/MI Catchpoint Commands1070539 +Node: Shared Library GDB/MI Catchpoint Commands1070907 +Node: Ada Exception GDB/MI Catchpoint Commands1072565 +Node: GDB/MI Program Context1074969 +Node: GDB/MI Thread Commands1079237 +Node: GDB/MI Ada Tasking Commands1083193 +Node: GDB/MI Program Execution1085446 +Node: GDB/MI Stack Manipulation1097480 +Ref: -stack-list-arguments1099379 +Ref: -stack-list-frames1103084 +Ref: -stack-list-locals1106947 +Ref: -stack-list-variables1108437 +Node: GDB/MI Variable Objects1109971 +Ref: -var-set-format1119929 +Ref: -var-list-children1121047 +Ref: -var-update1129839 +Ref: -var-set-frozen1132837 +Ref: -var-set-update-range1133634 +Ref: -var-set-visualizer1134163 +Node: GDB/MI Data Manipulation1135653 +Node: GDB/MI Tracepoint Commands1155191 +Node: GDB/MI Symbol Query1166776 +Node: GDB/MI File Commands1167465 +Node: GDB/MI Target Manipulation1170760 +Node: GDB/MI File Transfer Commands1176975 +Node: GDB/MI Ada Exceptions Commands1178298 +Node: GDB/MI Support Commands1179651 +Node: GDB/MI Miscellaneous Commands1184224 +Ref: -interpreter-exec1194248 +Node: Annotations1196588 +Node: Annotations Overview1197507 +Node: Server Prefix1199970 +Node: Prompting1201603 +Node: Errors1203120 +Node: Invalidation1204016 +Node: Annotations for Running1204495 +Node: Source Annotations1206015 +Node: JIT Interface1206940 +Node: Declarations1208739 +Node: Registering Code1210126 +Node: Unregistering Code1211098 +Node: Custom Debug Info1211725 +Node: Using JIT Debug Info Readers1213021 +Node: Writing JIT Debug Info Readers1214035 +Node: In-Process Agent1216230 +Ref: Control Agent1218173 +Node: In-Process Agent Protocol1219040 +Node: IPA Protocol Objects1219831 +Ref: agent expression object1220829 +Ref: tracepoint action object1221034 +Ref: tracepoint object1221114 +Node: IPA Protocol Commands1223690 +Node: GDB Bugs1225142 +Node: Bug Criteria1225874 +Node: Bug Reporting1226751 +Node: Command Line Editing1234580 +Node: Introduction and Notation1235232 +Node: Readline Interaction1236853 +Node: Readline Bare Essentials1238042 +Node: Readline Movement Commands1239823 +Node: Readline Killing Commands1240781 +Node: Readline Arguments1242697 +Node: Searching1243739 +Node: Readline Init File1245889 +Node: Readline Init File Syntax1247040 +Node: Conditional Init Constructs1262139 +Node: Sample Init File1264662 +Node: Bindable Readline Commands1267776 +Node: Commands For Moving1268828 +Node: Commands For History1269686 +Node: Commands For Text1273081 +Node: Commands For Killing1275804 +Node: Numeric Arguments1277944 +Node: Commands For Completion1279080 +Node: Keyboard Macros1281046 +Node: Miscellaneous Commands1281614 +Node: Readline vi Mode1285462 +Node: Using History Interactively1286372 +Node: History Interaction1286887 +Node: Event Designators1288309 +Node: Word Designators1289446 +Node: Modifiers1291081 +Node: In Memoriam1292302 +Node: Formatting Documentation1293185 +Ref: Formatting Documentation-Footnote-11296505 +Node: Installing GDB1296573 +Node: Requirements1297145 +Ref: Expat1297714 +Node: Running Configure1300281 +Node: Separate Objdir1303850 +Node: Config Names1306745 +Node: Configure Options1308194 +Node: System-wide configuration1310565 +Node: System-wide Configuration Scripts1312525 +Node: Maintenance Commands1313709 +Ref: maint info breakpoints1315364 +Node: Remote Protocol1331291 +Node: Overview1331945 +Ref: Binary Data1334490 +Node: Packets1337015 +Ref: thread-id syntax1337915 +Ref: extended mode1339360 +Ref: bc1341084 +Ref: bs1341294 +Ref: read registers packet1342899 +Ref: cycle step packet1344832 +Ref: write register packet1346709 +Ref: step with signal packet1347706 +Ref: vCont packet1349162 +Ref: X packet1354974 +Ref: insert breakpoint or watchpoint packet1355261 +Node: Stop Reply Packets1359303 +Node: General Query Packets1364047 +Ref: QNonStop1374271 +Ref: QPassSignals1374898 +Ref: QProgramSignals1376070 +Ref: qSearch memory1378550 +Ref: QStartNoAckMode1379049 +Ref: qSupported1379580 +Ref: multiprocess extensions1392278 +Ref: install tracepoint in tracing1394308 +Ref: qXfer read1397668 +Ref: qXfer auxiliary vector read1398163 +Ref: qXfer btrace read1398511 +Ref: qXfer target description read1399134 +Ref: qXfer library list read1399568 +Ref: qXfer svr4 library list read1400224 +Ref: qXfer memory map read1402077 +Ref: qXfer sdata read1402464 +Ref: qXfer siginfo read1402930 +Ref: qXfer spu read1403327 +Ref: qXfer threads read1403851 +Ref: qXfer traceframe info read1404254 +Ref: qXfer unwind info block1404672 +Ref: qXfer fdpic loadmap read1404906 +Ref: qXfer osdata read1405322 +Ref: qXfer write1406529 +Ref: qXfer siginfo write1407082 +Ref: qXfer spu write1407479 +Ref: General Query Packets-Footnote-11410012 +Node: Architecture-Specific Protocol Details1410339 +Node: ARM-Specific Protocol Details1410848 +Node: ARM Breakpoint Kinds1411096 +Node: MIPS-Specific Protocol Details1411427 +Node: MIPS Register packet Format1411710 +Node: MIPS Breakpoint Kinds1412637 +Node: Tracepoint Packets1413055 +Ref: QTEnable1422050 +Ref: QTDisable1422246 +Ref: qTfSTM1427785 +Ref: qTsSTM1427785 +Ref: qTSTMat1428824 +Ref: QTBuffer-size1429971 +Node: Host I/O Packets1431940 +Node: Interrupts1436550 +Node: Notification Packets1438453 +Node: Remote Non-Stop1443862 +Node: Packet Acknowledgment1446152 +Node: Examples1448267 +Node: File-I/O Remote Protocol Extension1448861 +Node: File-I/O Overview1449323 +Node: Protocol Basics1451522 +Node: The F Request Packet1453751 +Node: The F Reply Packet1454652 +Node: The Ctrl-C Message1455570 +Node: Console I/O1457196 +Node: List of Supported Calls1458412 +Node: open1458774 +Node: close1461282 +Node: read1461665 +Node: write1462274 +Node: lseek1463045 +Node: rename1463929 +Node: unlink1465336 +Node: stat/fstat1466283 +Node: gettimeofday1467176 +Node: isatty1467612 +Node: system1468208 +Node: Protocol-specific Representation of Datatypes1469750 +Node: Integral Datatypes1470127 +Node: Pointer Values1470934 +Node: Memory Transfer1471638 +Node: struct stat1472258 +Node: struct timeval1474460 +Node: Constants1474977 +Node: Open Flags1475426 +Node: mode_t Values1475767 +Node: Errno Values1476259 +Node: Lseek Flags1477069 +Node: Limits1477254 +Node: File-I/O Examples1477614 +Node: Library List Format1478702 +Node: Library List Format for SVR4 Targets1481484 +Node: Memory Map Format1483951 +Node: Thread List Format1486526 +Node: Traceframe Info Format1487344 +Node: Branch Trace Format1489030 +Node: Agent Expressions1490375 +Node: General Bytecode Design1493196 +Node: Bytecode Descriptions1497990 +Node: Using Agent Expressions1512320 +Node: Varying Target Capabilities1514297 +Node: Rationale1515458 +Node: Target Descriptions1522847 +Node: Retrieving Descriptions1524721 +Node: Target Description Format1525806 +Node: Predefined Target Types1534854 +Node: Standard Target Features1536238 +Node: AArch64 Features1538102 +Node: ARM Features1538525 +Node: i386 Features1540043 +Node: MIPS Features1541400 +Node: M68K Features1542585 +Node: Nios II Features1543248 +Node: PowerPC Features1543646 +Node: S/390 and System z Features1544969 +Node: TIC6x Features1546434 +Node: Operating System Information1546994 +Node: Process list1547829 +Node: Trace File Format1548892 +Node: Index Section Format1550885 +Node: Man Pages1558855 +Node: gdb man1559261 +Node: gdbserver man1565297 +Node: gcore man1572302 +Node: gdbinit man1572959 +Node: Copying1573842 +Node: GNU Free Documentation License1611402 +Node: Concept Index1636548 +Node: Command and Variable Index1759559  End Tag Table diff -Nru gdb-7.7/gdb/doc/gdb.info-1 gdb-7.7.1/gdb/doc/gdb.info-1 --- gdb-7.7/gdb/doc/gdb.info-1 2014-02-06 02:43:03.000000000 +0000 +++ gdb-7.7.1/gdb/doc/gdb.info-1 2014-05-05 21:56:50.000000000 +0000 @@ -21,7 +21,7 @@ This file documents the GNU debugger GDB. This is the Tenth Edition, of 'Debugging with GDB: the GNU -Source-Level Debugger' for GDB (GDB) Version 7.7. +Source-Level Debugger' for GDB (GDB) Version 7.7.1. Copyright (C) 1988-2014 Free Software Foundation, Inc. @@ -44,7 +44,7 @@ This file describes GDB, the GNU symbolic debugger. - This is the Tenth Edition, for GDB (GDB) Version 7.7. + This is the Tenth Edition, for GDB (GDB) Version 7.7.1. Copyright (C) 1988-2014 Free Software Foundation, Inc. @@ -491,7 +491,7 @@ There is absolutely no warranty for GDB; type "show warranty" for details. - GDB 7.7, Copyright 1999 Free Software Foundation, Inc... + GDB 7.7.1, Copyright 1999 Free Software Foundation, Inc... (gdb) GDB reads only enough symbol data to know where to find the rest when diff -Nru gdb-7.7/gdb/doc/gdb.info-5 gdb-7.7.1/gdb/doc/gdb.info-5 --- gdb-7.7/gdb/doc/gdb.info-5 2014-02-06 02:43:08.000000000 +0000 +++ gdb-7.7.1/gdb/doc/gdb.info-5 2014-05-05 21:56:55.000000000 +0000 @@ -2373,7 +2373,7 @@ GDB includes an already formatted copy of the on-line Info version of this manual in the 'gdb' subdirectory. The main Info file is -'gdb-7.7/gdb/gdb.info', and it refers to subordinate files matching +'gdb-7.7.1/gdb/gdb.info', and it refers to subordinate files matching 'gdb.info*' in the same directory. If necessary, you can print out these files, or read them with any editor; but they are easier to read using the 'info' subsystem in GNU Emacs or the standalone 'info' @@ -2383,8 +2383,8 @@ Info formatting programs, such as 'texinfo-format-buffer' or 'makeinfo'. If you have 'makeinfo' installed, and are in the top level GDB source -directory ('gdb-7.7', in the case of version 7.7), you can make the Info -file by typing: +directory ('gdb-7.7.1', in the case of version 7.7.1), you can make the +Info file by typing: cd gdb make gdb.info @@ -2409,7 +2409,7 @@ If you have TeX and a DVI printer program installed, you can typeset and print this manual. First switch to the 'gdb' subdirectory of the -main source directory (for example, to 'gdb-7.7/gdb') and type: +main source directory (for example, to 'gdb-7.7.1/gdb') and type: make gdb.dvi @@ -2417,7 +2417,7 @@ ---------- Footnotes ---------- - (1) In 'gdb-7.7/gdb/refcard.ps' of the version 7.7 release. + (1) In 'gdb-7.7.1/gdb/refcard.ps' of the version 7.7.1 release.  File: gdb.info, Node: Installing GDB, Next: Maintenance Commands, Prev: Formatting Documentation, Up: Top @@ -2520,39 +2520,39 @@ a single directory, whose name is usually composed by appending the version number to 'gdb'. - For example, the GDB version 7.7 distribution is in the 'gdb-7.7' + For example, the GDB version 7.7.1 distribution is in the 'gdb-7.7.1' directory. That directory contains: -'gdb-7.7/configure (and supporting files)' +'gdb-7.7.1/configure (and supporting files)' script for configuring GDB and all its supporting libraries -'gdb-7.7/gdb' +'gdb-7.7.1/gdb' the source specific to GDB itself -'gdb-7.7/bfd' +'gdb-7.7.1/bfd' source for the Binary File Descriptor library -'gdb-7.7/include' +'gdb-7.7.1/include' GNU include files -'gdb-7.7/libiberty' +'gdb-7.7.1/libiberty' source for the '-liberty' free software library -'gdb-7.7/opcodes' +'gdb-7.7.1/opcodes' source for the library of opcode tables and disassemblers -'gdb-7.7/readline' +'gdb-7.7.1/readline' source for the GNU command-line interface -'gdb-7.7/glob' +'gdb-7.7.1/glob' source for the GNU filename pattern-matching subroutine -'gdb-7.7/mmalloc' +'gdb-7.7.1/mmalloc' source for the GNU memory-mapped malloc package The simplest way to configure and build GDB is to run 'configure' from the 'gdb-VERSION-NUMBER' source directory, which in this example is -the 'gdb-7.7' directory. +the 'gdb-7.7.1' directory. First switch to the 'gdb-VERSION-NUMBER' source directory if you are not already in it; then run 'configure'. Pass the identifier for the @@ -2560,7 +2560,7 @@ For example: - cd gdb-7.7 + cd gdb-7.7.1 ./configure HOST make @@ -2581,8 +2581,8 @@ sh configure HOST If you run 'configure' from a directory that contains source -directories for multiple libraries or programs, such as the 'gdb-7.7' -source directory for version 7.7, 'configure' creates configuration +directories for multiple libraries or programs, such as the 'gdb-7.7.1' +source directory for version 7.7.1, 'configure' creates configuration files for every directory level underneath (unless you tell it not to, with the '--norecursion' option). @@ -2622,13 +2622,13 @@ directory. If the path to 'configure' would be the same as the argument to '--srcdir', you can leave out the '--srcdir' option; it is assumed.) - For example, with version 7.7, you can build GDB in a separate + For example, with version 7.7.1, you can build GDB in a separate directory for a Sun 4 like this: - cd gdb-7.7 + cd gdb-7.7.1 mkdir ../gdb-sun4 cd ../gdb-sun4 - ../gdb-7.7/configure sun4 + ../gdb-7.7.1/configure sun4 make When 'configure' builds a configuration using a remote source @@ -2639,8 +2639,8 @@ Make sure that your path to the 'configure' script has just one instance of 'gdb' in it. If your path to 'configure' looks like -'../gdb-7.7/gdb/configure', you are configuring only one subdirectory of -GDB, not the whole package. This leads to build errors about missing +'../gdb-7.7.1/gdb/configure', you are configuring only one subdirectory +of GDB, not the whole package. This leads to build errors about missing include files such as 'bfd/bfd.h'. One popular reason to build several GDB configurations in separate @@ -2655,9 +2655,9 @@ The 'Makefile' that 'configure' generates in each source directory also runs recursively. If you type 'make' in a source directory such as -'gdb-7.7' (or in a separate configured directory configured with -'--srcdir=DIRNAME/gdb-7.7'), you will build all the required libraries, -and then build GDB. +'gdb-7.7.1' (or in a separate configured directory configured with +'--srcdir=DIRNAME/gdb-7.7.1'), you will build all the required +libraries, and then build GDB. When you have multiple hosts or targets configured in separate directories, you can run 'make' on them in parallel (for example, if @@ -2700,8 +2700,8 @@ % sh config.sub i986v Invalid configuration `i986v': machine `i986v' not recognized -'config.sub' is also distributed in the GDB source directory ('gdb-7.7', -for version 7.7). +'config.sub' is also distributed in the GDB source directory +('gdb-7.7.1', for version 7.7.1).  File: gdb.info, Node: Configure Options, Next: System-wide configuration, Prev: Config Names, Up: Installing GDB diff -Nru gdb-7.7/gdb/doc/gdbinit.5 gdb-7.7.1/gdb/doc/gdbinit.5 --- gdb-7.7/gdb/doc/gdbinit.5 2014-02-06 02:43:11.000000000 +0000 +++ gdb-7.7.1/gdb/doc/gdbinit.5 2014-05-05 21:56:58.000000000 +0000 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "GDBINIT 5" -.TH GDBINIT 5 "2014-02-06" "gdb-7.7" "GNU Development Tools" +.TH GDBINIT 5 "2014-05-05" "gdb-7.7.1" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -Nru gdb-7.7/gdb/doc/gdbserver.1 gdb-7.7.1/gdb/doc/gdbserver.1 --- gdb-7.7/gdb/doc/gdbserver.1 2014-02-06 02:43:11.000000000 +0000 +++ gdb-7.7.1/gdb/doc/gdbserver.1 2014-05-05 21:56:58.000000000 +0000 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "GDBSERVER 1" -.TH GDBSERVER 1 "2014-02-06" "gdb-7.7" "GNU Development Tools" +.TH GDBSERVER 1 "2014-05-05" "gdb-7.7.1" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -Nru gdb-7.7/gdb/infrun.c gdb-7.7.1/gdb/infrun.c --- gdb-7.7/gdb/infrun.c 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/gdb/infrun.c 2014-05-05 21:51:24.000000000 +0000 @@ -4379,7 +4379,11 @@ ecs->event_thread->step_after_step_resume_breakpoint = 1; /* Reset trap_expected to ensure breakpoints are re-inserted. */ ecs->event_thread->control.trap_expected = 0; - keep_going (ecs); + + /* If we were nexting/stepping some other thread, switch to + it, so that we don't continue it, losing control. */ + if (!switch_back_to_stepped_thread (ecs)) + keep_going (ecs); return; } diff -Nru gdb-7.7/gdb/MAINTAINERS gdb-7.7.1/gdb/MAINTAINERS --- gdb-7.7/gdb/MAINTAINERS 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/gdb/MAINTAINERS 2014-05-05 21:51:24.000000000 +0000 @@ -546,6 +546,7 @@ Paul Koning paul_koning@dell.com Jan Kratochvil jan.kratochvil@redhat.com Maxim Kuvyrkov maxim@kugelworks.com +Pierre Langlois pierre.langlois@embecosm.com Jonathan Larmour jifl@ecoscentric.com Jeff Law law@redhat.com Justin Lebar justin.lebar@gmail.com diff -Nru gdb-7.7/gdb/po/gdb.pot gdb-7.7.1/gdb/po/gdb.pot --- gdb-7.7/gdb/po/gdb.pot 2014-02-06 02:42:57.000000000 +0000 +++ gdb-7.7.1/gdb/po/gdb.pot 2014-05-05 21:56:44.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-02-06 06:42+0400\n" +"POT-Creation-Date: 2014-05-05 14:56-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2527,22 +2527,22 @@ msgid "Num pushes too large: %d\n" msgstr "" -#: avr-tdep.c:1483 +#: avr-tdep.c:1490 msgid "ERR: info io_registers NOT supported by current target\n" msgstr "" -#: avr-tdep.c:1491 +#: avr-tdep.c:1498 msgid "Error fetching number of io registers\n" msgstr "" -#: avr-tdep.c:1500 +#: avr-tdep.c:1507 #, possible-c-format msgid "" "Target has %u io registers:\n" "\n" msgstr "" -#: avr-tdep.c:1549 +#: avr-tdep.c:1556 msgid "query remote avr target for io space register values" msgstr "" @@ -8013,56 +8013,56 @@ msgid "Deprecated remotecache flag is %s.\n" msgstr "" -#: dcache.c:564 dcache.c:629 +#: dcache.c:542 dcache.c:607 msgid "No data cache available.\n" msgstr "" -#: dcache.c:579 +#: dcache.c:557 msgid "No such cache line exists.\n" msgstr "" -#: dcache.c:585 dcache.c:645 +#: dcache.c:563 dcache.c:623 #, possible-c-format msgid "Line %d: address %s [%d hits]\n" msgstr "" -#: dcache.c:614 +#: dcache.c:592 msgid "Usage: info dcache [linenumber]\n" msgstr "" -#: dcache.c:622 +#: dcache.c:600 #, possible-c-format msgid "Dcache %u lines of %u bytes each.\n" msgstr "" -#: dcache.c:633 +#: dcache.c:611 #, possible-c-format msgid "Contains data for %s\n" msgstr "" -#: dcache.c:653 +#: dcache.c:631 #, possible-c-format msgid "Cache state: %d active lines, %d hits\n" msgstr "" -#: dcache.c:669 +#: dcache.c:647 msgid "Dcache size must be greater than 0." msgstr "" -#: dcache.c:683 +#: dcache.c:661 #, possible-c-format msgid "Invalid dcache line size: %u (must be power of 2)." msgstr "" -#: dcache.c:706 +#: dcache.c:684 msgid "Set cache use for remote targets." msgstr "" -#: dcache.c:707 +#: dcache.c:685 msgid "Show cache use for remote targets." msgstr "" -#: dcache.c:708 +#: dcache.c:686 msgid "" "This used to enable the data cache for remote targets. The cache\n" "functionality is now controlled by the memory region system and the\n" @@ -8070,7 +8070,7 @@ "exists only for compatibility reasons." msgstr "" -#: dcache.c:718 +#: dcache.c:696 msgid "" "Print information on the dcache performance.\n" "With no arguments, this command prints the cache configuration and a\n" @@ -8078,28 +8078,28 @@ "the contents of a given line." msgstr "" -#: dcache.c:724 +#: dcache.c:702 msgid "Use this command to set number of lines in dcache and line-size." msgstr "" #. allow_unknown -#: dcache.c:727 +#: dcache.c:705 msgid "Show dcachesettings." msgstr "" -#: dcache.c:732 +#: dcache.c:710 msgid "Set dcache line size in bytes (must be power of 2)." msgstr "" -#: dcache.c:733 +#: dcache.c:711 msgid "Show dcache line size." msgstr "" -#: dcache.c:740 +#: dcache.c:718 msgid "Set number of dcache lines." msgstr "" -#: dcache.c:741 +#: dcache.c:719 msgid "Show number of dcache lines." msgstr "" @@ -12153,7 +12153,7 @@ "Cannot remove breakpoint at address %s, no break instruction at such address." msgstr "" -#: inf-child.c:110 windows-nat.c:2037 +#: inf-child.c:110 windows-nat.c:2054 msgid "Use the \"run\" command to start a Unix child process." msgstr "" @@ -12564,7 +12564,7 @@ msgid "The program being debugged is not being run.\n" msgstr "" -#: infcmd.c:1832 infrun.c:6714 +#: infcmd.c:1832 infrun.c:6718 msgid "Selected thread is running." msgstr "" @@ -12637,7 +12637,7 @@ msgid "In %s,\n" msgstr "" -#: infcmd.c:2527 target.c:2591 +#: infcmd.c:2527 target.c:2582 msgid "A program is being debugged already. Kill it? " msgstr "" @@ -13187,7 +13187,7 @@ "this platform." msgstr "" -#: infrun.c:201 infrun.c:230 target.c:5013 target.c:5061 +#: infrun.c:201 infrun.c:230 target.c:5004 target.c:5052 msgid "Cannot change this setting while the inferior is running." msgstr "" @@ -13295,119 +13295,119 @@ msgid "Cannot step over breakpoint hit in wrong thread" msgstr "" -#: infrun.c:6040 linux-fork.c:377 linux-fork.c:409 +#: infrun.c:6044 linux-fork.c:377 linux-fork.c:409 #, possible-c-format msgid "[Switching to %s]\n" msgstr "" -#: infrun.c:6051 +#: infrun.c:6055 msgid "No unwaited-for children left.\n" msgstr "" -#: infrun.c:6059 +#: infrun.c:6063 msgid "" "Cannot remove breakpoints because program is no longer writable.\n" "Further execution is probably impossible.\n" msgstr "" -#: infrun.c:6159 +#: infrun.c:6163 msgid "Unknown value." msgstr "" -#: infrun.c:6346 +#: infrun.c:6350 msgid "Signal Stop\tPrint\tPass to program\tDescription\n" msgstr "" -#: infrun.c:6383 +#: infrun.c:6387 msgid "signal to handle" msgstr "" #. Not a number and not a recognized flag word => complain. -#: infrun.c:6486 +#: infrun.c:6490 #, possible-c-format msgid "Unrecognized or ambiguous flag word: \"%s\"." msgstr "" -#: infrun.c:6501 +#: infrun.c:6505 #, possible-c-format msgid "" "%s is used by the debugger.\n" "Are you sure you want to change it? " msgstr "" -#: infrun.c:6509 +#: infrun.c:6513 msgid "Not confirmed, unchanged.\n" msgstr "" -#: infrun.c:6587 +#: infrun.c:6591 msgid "xdb command" msgstr "" -#: infrun.c:6638 +#: infrun.c:6642 msgid "Invalid signal handling flag.\n" msgstr "" -#: infrun.c:6651 +#: infrun.c:6655 msgid "" "Only signals 1-15 are valid as numeric signals.\n" "Use \"info signals\" for a list of symbolic signals." msgstr "" -#: infrun.c:6694 +#: infrun.c:6698 msgid "" "\n" "Use the \"handle\" command to change these tables.\n" msgstr "" -#: infrun.c:6706 +#: infrun.c:6710 msgid "No thread selected." msgstr "" -#: infrun.c:6710 +#: infrun.c:6714 msgid "The current thread has terminated" msgstr "" -#: infrun.c:6745 +#: infrun.c:6749 msgid "Unable to read siginfo" msgstr "" -#: infrun.c:6766 +#: infrun.c:6770 msgid "Unable to write siginfo" msgstr "" -#: infrun.c:7004 stack.c:1826 stack.c:2051 +#: infrun.c:7008 stack.c:1826 stack.c:2051 msgid "Unable to restore previously selected frame." msgstr "" -#: infrun.c:7165 +#: infrun.c:7169 msgid "Target does not support this operation." msgstr "" -#: infrun.c:7175 +#: infrun.c:7179 msgid "Forward.\n" msgstr "" -#: infrun.c:7178 +#: infrun.c:7182 msgid "Reverse.\n" msgstr "" -#: infrun.c:7182 +#: infrun.c:7186 #, possible-c-format msgid "bogus execution_direction value: %d" msgstr "" -#: infrun.c:7191 +#: infrun.c:7195 #, possible-c-format msgid "Resuming the execution of threads of all processes is %s.\n" msgstr "" -#: infrun.c:7211 infrun.c:7244 +#: infrun.c:7215 infrun.c:7248 msgid "" "What debugger does when program gets various signals.\n" "Specify a signal as argument to print info on that signal only." msgstr "" -#: infrun.c:7216 +#: infrun.c:7220 msgid "" "Specify how to handle signals.\n" "Usage: handle SIGNAL [ACTIONS]\n" @@ -13434,7 +13434,7 @@ "all signals cumulatively specified." msgstr "" -#: infrun.c:7247 +#: infrun.c:7251 msgid "" "Specify how to handle a signal.\n" "Args are signals and actions to apply to those signals.\n" @@ -13453,46 +13453,46 @@ "Pass and Stop may be combined." msgstr "" -#: infrun.c:7267 +#: infrun.c:7271 msgid "" "There is no `stop' command, but you can set a hook on `stop'.\n" "This allows you to set a list of commands to be run each time execution\n" "of the program stops." msgstr "" -#: infrun.c:7272 +#: infrun.c:7276 msgid "Set inferior debugging." msgstr "" -#: infrun.c:7273 +#: infrun.c:7277 msgid "Show inferior debugging." msgstr "" -#: infrun.c:7274 +#: infrun.c:7278 msgid "When non-zero, inferior specific debugging is enabled." msgstr "" -#: infrun.c:7281 +#: infrun.c:7285 msgid "Set displaced stepping debugging." msgstr "" -#: infrun.c:7282 +#: infrun.c:7286 msgid "Show displaced stepping debugging." msgstr "" -#: infrun.c:7283 +#: infrun.c:7287 msgid "When non-zero, displaced stepping specific debugging is enabled." msgstr "" -#: infrun.c:7290 +#: infrun.c:7294 msgid "Set whether gdb controls the inferior in non-stop mode." msgstr "" -#: infrun.c:7291 +#: infrun.c:7295 msgid "Show whether gdb controls the inferior in non-stop mode." msgstr "" -#: infrun.c:7292 +#: infrun.c:7296 msgid "" "When debugging a multi-threaded program and this setting is\n" "off (the default, also called all-stop mode), when one thread stops\n" @@ -13507,30 +13507,30 @@ "leave it stopped or free to run as needed." msgstr "" -#: infrun.c:7367 +#: infrun.c:7371 msgid "Set stopping for shared library events." msgstr "" -#: infrun.c:7368 +#: infrun.c:7372 msgid "Show stopping for shared library events." msgstr "" -#: infrun.c:7369 +#: infrun.c:7373 msgid "" "If nonzero, gdb will give control to the user when the dynamic linker\n" "notifies gdb of shared library events. The most common event of interest\n" "to the user would be loading/unloading of a new library." msgstr "" -#: infrun.c:7379 +#: infrun.c:7383 msgid "Set debugger response to a program call of fork or vfork." msgstr "" -#: infrun.c:7380 +#: infrun.c:7384 msgid "Show debugger response to a program call of fork or vfork." msgstr "" -#: infrun.c:7381 +#: infrun.c:7385 msgid "" "A fork or vfork creates a new process. follow-fork-mode can be:\n" " parent - the original process is debugged after a fork\n" @@ -13539,15 +13539,15 @@ "By default, the debugger will follow the parent process." msgstr "" -#: infrun.c:7393 +#: infrun.c:7397 msgid "Set debugger response to a program call of exec." msgstr "" -#: infrun.c:7394 +#: infrun.c:7398 msgid "Show debugger response to a program call of exec." msgstr "" -#: infrun.c:7395 +#: infrun.c:7399 msgid "" "An exec call replaces the program image of a process.\n" "\n" @@ -13566,15 +13566,15 @@ "By default, the debugger will use the same inferior." msgstr "" -#: infrun.c:7416 +#: infrun.c:7420 msgid "Set mode for locking scheduler during execution." msgstr "" -#: infrun.c:7417 +#: infrun.c:7421 msgid "Show mode for locking scheduler during execution." msgstr "" -#: infrun.c:7418 +#: infrun.c:7422 msgid "" "off == no locking (threads may preempt at any time)\n" "on == full locking (no thread except the current thread may run)\n" @@ -13583,15 +13583,15 @@ "\tOther threads may run while stepping over a function call ('next')." msgstr "" -#: infrun.c:7428 +#: infrun.c:7432 msgid "Set mode for resuming threads of all processes." msgstr "" -#: infrun.c:7429 +#: infrun.c:7433 msgid "Show mode for resuming threads of all processes." msgstr "" -#: infrun.c:7430 +#: infrun.c:7434 msgid "" "When on, execution commands (such as 'continue' or 'next') resume all\n" "threads of all processes. When off (which is the default), execution\n" @@ -13600,30 +13600,30 @@ "mode (see help set scheduler-locking)." msgstr "" -#: infrun.c:7440 +#: infrun.c:7444 msgid "Set mode of the step operation." msgstr "" -#: infrun.c:7441 +#: infrun.c:7445 msgid "Show mode of the step operation." msgstr "" -#: infrun.c:7442 +#: infrun.c:7446 msgid "" "When set, doing a step over a function without debug line information\n" "will stop at the first instruction of that function. Otherwise, the\n" "function is skipped and the step command stops at a different source line." msgstr "" -#: infrun.c:7451 +#: infrun.c:7455 msgid "Set debugger's willingness to use displaced stepping." msgstr "" -#: infrun.c:7452 +#: infrun.c:7456 msgid "Show debugger's willingness to use displaced stepping." msgstr "" -#: infrun.c:7453 +#: infrun.c:7457 msgid "" "If on, gdb will use displaced stepping to step over breakpoints if it is\n" "supported by the target architecture. If off, gdb will not use displaced\n" @@ -13635,57 +13635,57 @@ "use it in all-stop mode (see help set non-stop)." msgstr "" -#: infrun.c:7465 +#: infrun.c:7469 msgid "" "Set direction of execution.\n" "Options are 'forward' or 'reverse'." msgstr "" -#: infrun.c:7467 +#: infrun.c:7471 msgid "Show direction of execution (forward/reverse)." msgstr "" -#: infrun.c:7468 +#: infrun.c:7472 msgid "Tells gdb whether to execute forward or backward." msgstr "" #. Set/show detach-on-fork: user-settable mode. -#: infrun.c:7474 +#: infrun.c:7478 msgid "Set whether gdb will detach the child of a fork." msgstr "" -#: infrun.c:7475 +#: infrun.c:7479 msgid "Show whether gdb will detach the child of a fork." msgstr "" -#: infrun.c:7476 +#: infrun.c:7480 msgid "Tells gdb whether to detach the child of a fork." msgstr "" -#: infrun.c:7483 +#: infrun.c:7487 msgid "Set disabling of debuggee's virtual address space randomization." msgstr "" -#: infrun.c:7484 +#: infrun.c:7488 msgid "Show disabling of debuggee's virtual address space randomization." msgstr "" -#: infrun.c:7485 +#: infrun.c:7489 msgid "" "When this mode is on (which is the default), randomization of the virtual\n" "address space is disabled. Standalone programs run with the randomization\n" "enabled by default on some platforms." msgstr "" -#: infrun.c:7509 +#: infrun.c:7513 msgid "Set whether gdb controls the inferior in observer mode." msgstr "" -#: infrun.c:7510 +#: infrun.c:7514 msgid "Show whether gdb controls the inferior in observer mode." msgstr "" -#: infrun.c:7511 +#: infrun.c:7515 msgid "" "In observer mode, GDB can get data from the inferior, but not\n" "affect its execution. Registers and memory may not be changed,\n" @@ -25001,72 +25001,72 @@ msgid "Cannot find thread-local variables on this target" msgstr "" -#: target.c:1555 +#: target.c:1572 msgid "Writing to flash memory forbidden in this context" msgstr "" -#: target.c:1700 +#: target.c:1691 #, possible-c-format msgid "Writing to memory is not allowed (addr %s, len %s)" msgstr "" -#: target.c:1908 +#: target.c:1899 msgid "Overlapping regions in memory map: ignoring" msgstr "" -#: target.c:1958 +#: target.c:1949 #, possible-c-format msgid "Mode for reading from readonly sections is %s.\n" msgstr "" -#: target.c:2424 +#: target.c:2415 #, possible-c-format msgid "target object %d, annex %s, contained unexpected null characters" msgstr "" -#: target.c:2465 +#: target.c:2456 msgid "May not insert breakpoints" msgstr "" -#: target.c:2482 +#: target.c:2473 msgid "May not remove breakpoints" msgstr "" -#: target.c:2496 +#: target.c:2487 #, possible-c-format msgid "Symbols from \"%s\".\n" msgstr "" -#: target.c:2507 +#: target.c:2498 msgid "\tWhile running this, GDB does not access memory from...\n" msgstr "" -#: target.c:2594 +#: target.c:2585 msgid "Program not killed." msgstr "" -#: target.c:2636 +#: target.c:2627 msgid "could not find a target to detach" msgstr "" -#: target.c:2837 +#: target.c:2828 msgid "could not find a target to follow fork" msgstr "" -#: target.c:2863 +#: target.c:2854 msgid "could not find a target to follow mourn inferior" msgstr "" -#: target.c:2914 +#: target.c:2905 msgid "Unable to allocate memory to perform the search." msgstr "" -#: target.c:2922 target.c:2977 +#: target.c:2913 target.c:2968 #, possible-c-format msgid "Unable to access %s bytes of target memory at %s, halting search." msgstr "" -#: target.c:3067 +#: target.c:3058 #, possible-c-format msgid "" "The \"%s\" target does not support \"run\". Try \"help target\" or " @@ -25076,184 +25076,184 @@ #. This function is only called if the target is running. In that #. case there should have been a process_stratum target and it #. should either know how to create inferiors, or not... -#: target.c:3075 +#: target.c:3066 msgid "No targets found" msgstr "" -#: target.c:3107 +#: target.c:3098 #, possible-c-format msgid "Don't know how to %s. Try \"help target\"." msgstr "" -#: target.c:3294 +#: target.c:3285 #, possible-c-format msgid "Can't determine the current address space of thread %s\n" msgstr "" -#: target.c:3591 +#: target.c:3582 #, possible-c-format msgid "target file %s contained unexpected null characters" msgstr "" -#: target.c:3713 target.c:3721 +#: target.c:3704 target.c:3712 msgid "Command not implemented for this target." msgstr "" -#: target.c:3817 +#: target.c:3808 msgid "could not find a target to attach" msgstr "" -#: target.c:3866 +#: target.c:3857 msgid "May not interrupt or stop the target, ignoring attempt" msgstr "" -#: target.c:3989 +#: target.c:3980 #, possible-c-format msgid "Writing to registers is not allowed (regno %d)" msgstr "" -#: target.c:4980 +#: target.c:4971 msgid "\"monitor\" command not supported by this target." msgstr "" -#: target.c:4991 +#: target.c:4982 msgid "The current target stack is:\n" msgstr "" -#: target.c:5025 +#: target.c:5016 #, possible-c-format msgid "Controlling the inferior in asynchronous mode is %s.\n" msgstr "" -#: target.c:5094 +#: target.c:5085 msgid "Set target debugging." msgstr "" -#: target.c:5095 +#: target.c:5086 msgid "Show target debugging." msgstr "" -#: target.c:5096 +#: target.c:5087 msgid "" "When non-zero, target debugging is enabled. Higher numbers are more\n" "verbose. Changes do not take effect until the next \"run\" or \"target\"\n" "command." msgstr "" -#: target.c:5105 +#: target.c:5096 msgid "Set mode for reading from readonly sections." msgstr "" -#: target.c:5106 +#: target.c:5097 msgid "Show mode for reading from readonly sections." msgstr "" -#: target.c:5107 +#: target.c:5098 msgid "" "When this mode is on, memory reads from readonly sections (such as .text)\n" "will be read from the object file instead of from the target. This will\n" "result in significant performance improvement for remote targets." msgstr "" -#: target.c:5116 +#: target.c:5107 msgid "Send a command to the remote monitor (remote targets only)." msgstr "" -#: target.c:5119 +#: target.c:5110 msgid "Print the name of each layer of the internal target stack." msgstr "" -#: target.c:5123 +#: target.c:5114 msgid "Set whether gdb controls the inferior in asynchronous mode." msgstr "" -#: target.c:5124 +#: target.c:5115 msgid "Show whether gdb controls the inferior in asynchronous mode." msgstr "" -#: target.c:5125 +#: target.c:5116 msgid "Tells gdb whether to control the inferior in asynchronous mode." msgstr "" -#: target.c:5133 +#: target.c:5124 msgid "Set permission to write into registers." msgstr "" -#: target.c:5134 +#: target.c:5125 msgid "Show permission to write into registers." msgstr "" -#: target.c:5135 +#: target.c:5126 msgid "" "When this permission is on, GDB may write into the target's registers.\n" "Otherwise, any sort of write attempt will result in an error." msgstr "" -#: target.c:5142 +#: target.c:5133 msgid "Set permission to write into target memory." msgstr "" -#: target.c:5143 +#: target.c:5134 msgid "Show permission to write into target memory." msgstr "" -#: target.c:5144 +#: target.c:5135 msgid "" "When this permission is on, GDB may write into the target's memory.\n" "Otherwise, any sort of write attempt will result in an error." msgstr "" -#: target.c:5151 +#: target.c:5142 msgid "Set permission to insert breakpoints in the target." msgstr "" -#: target.c:5152 +#: target.c:5143 msgid "Show permission to insert breakpoints in the target." msgstr "" -#: target.c:5153 +#: target.c:5144 msgid "" "When this permission is on, GDB may insert breakpoints in the program.\n" "Otherwise, any sort of insertion attempt will result in an error." msgstr "" -#: target.c:5160 +#: target.c:5151 msgid "Set permission to insert tracepoints in the target." msgstr "" -#: target.c:5161 +#: target.c:5152 msgid "Show permission to insert tracepoints in the target." msgstr "" -#: target.c:5162 +#: target.c:5153 msgid "" "When this permission is on, GDB may insert tracepoints in the program.\n" "Otherwise, any sort of insertion attempt will result in an error." msgstr "" -#: target.c:5169 +#: target.c:5160 msgid "Set permission to insert fast tracepoints in the target." msgstr "" -#: target.c:5170 +#: target.c:5161 msgid "Show permission to insert fast tracepoints in the target." msgstr "" -#: target.c:5171 +#: target.c:5162 msgid "" "When this permission is on, GDB may insert fast tracepoints.\n" "Otherwise, any sort of insertion attempt will result in an error." msgstr "" -#: target.c:5178 +#: target.c:5169 msgid "Set permission to interrupt or signal the target." msgstr "" -#: target.c:5179 +#: target.c:5170 msgid "Show permission to interrupt or signal the target." msgstr "" -#: target.c:5180 +#: target.c:5171 msgid "" "When this permission is on, GDB may interrupt/stop the target's execution.\n" "Otherwise, any attempt to interrupt or stop will be ignored." @@ -28173,31 +28173,31 @@ msgid "Unable to determine location of registers" msgstr "" -#: windows-nat.c:313 +#: windows-nat.c:318 #, possible-c-format msgid "SuspendThread (tid=0x%x) failed. (winerr %u)" msgstr "" -#: windows-nat.c:401 +#: windows-nat.c:407 #, possible-c-format msgid "[%s exited with code %u]\n" msgstr "" -#: windows-nat.c:572 +#: windows-nat.c:578 msgid "Can't get module info" msgstr "" -#: windows-nat.c:582 windows-nat.c:591 +#: windows-nat.c:588 windows-nat.c:597 #, possible-c-format msgid "Error getting dll name: %u." msgstr "" -#: windows-nat.c:586 +#: windows-nat.c:592 #, possible-c-format msgid "Error converting dll name to POSIX: %d." msgstr "" -#: windows-nat.c:750 +#: windows-nat.c:756 msgid "dll path too long" msgstr "" @@ -28208,147 +28208,147 @@ #. 4 mysterious UNLOAD_DLL_DEBUG_EVENTs during the startup phase (these #. events are apparently caused by the WOW layer, the interface between #. 32bit and 64bit worlds). -#: windows-nat.c:924 +#: windows-nat.c:930 #, possible-c-format msgid "dll starting at %s not found." msgstr "" -#: windows-nat.c:946 +#: windows-nat.c:952 msgid "dll-symbols requires a file name" msgstr "" -#: windows-nat.c:1327 +#: windows-nat.c:1344 #, possible-c-format msgid "OpenProcess call failed, GetLastError = %u" msgstr "" -#: windows-nat.c:1452 +#: windows-nat.c:1469 msgid "Could not interrupt program. Press Ctrl-c in the program console." msgstr "" -#: windows-nat.c:1562 +#: windows-nat.c:1579 #, possible-c-format msgid "During startup program exited with code 0x%x." msgstr "" -#: windows-nat.c:1941 +#: windows-nat.c:1958 msgid "Can't attach to process." msgstr "" -#: windows-nat.c:1973 +#: windows-nat.c:1990 #, possible-c-format msgid "Can't detach process %u (error %u)" msgstr "" -#: windows-nat.c:2161 +#: windows-nat.c:2178 msgid "No executable specified, use `target exec'." msgstr "" -#: windows-nat.c:2178 windows-nat.c:2183 +#: windows-nat.c:2195 windows-nat.c:2200 #, possible-c-format msgid "Error starting executable: %d" msgstr "" -#: windows-nat.c:2196 +#: windows-nat.c:2213 #, possible-c-format msgid "Error starting executable via shell: %d" msgstr "" -#: windows-nat.c:2320 +#: windows-nat.c:2337 #, possible-c-format msgid "Warning: Failed to open TTY %s, error %#x." msgstr "" -#: windows-nat.c:2372 +#: windows-nat.c:2389 #, possible-c-format msgid "Error creating process %s, (error %u)." msgstr "" -#: windows-nat.c:2667 +#: windows-nat.c:2684 msgid "Load dll library symbols from FILE." msgstr "" -#: windows-nat.c:2677 +#: windows-nat.c:2694 msgid "Set use of shell to start subprocess." msgstr "" -#: windows-nat.c:2678 +#: windows-nat.c:2695 msgid "Show use of shell to start subprocess." msgstr "" -#: windows-nat.c:2685 +#: windows-nat.c:2702 msgid "Break when an exception is detected in the Cygwin DLL itself." msgstr "" -#: windows-nat.c:2686 +#: windows-nat.c:2703 msgid "Show whether gdb breaks on exceptions in the Cygwin DLL itself." msgstr "" -#: windows-nat.c:2693 +#: windows-nat.c:2710 msgid "Set creation of new console when creating child process." msgstr "" -#: windows-nat.c:2694 +#: windows-nat.c:2711 msgid "Show creation of new console when creating child process." msgstr "" -#: windows-nat.c:2700 +#: windows-nat.c:2717 msgid "Set creation of new group when creating child process." msgstr "" -#: windows-nat.c:2701 +#: windows-nat.c:2718 msgid "Show creation of new group when creating child process." msgstr "" -#: windows-nat.c:2707 +#: windows-nat.c:2724 msgid "Set whether to display execution in child process." msgstr "" -#: windows-nat.c:2708 +#: windows-nat.c:2725 msgid "Show whether to display execution in child process." msgstr "" -#: windows-nat.c:2714 +#: windows-nat.c:2731 msgid "Set whether to display kernel events in child process." msgstr "" -#: windows-nat.c:2715 +#: windows-nat.c:2732 msgid "Show whether to display kernel events in child process." msgstr "" -#: windows-nat.c:2721 +#: windows-nat.c:2738 msgid "Set whether to display memory accesses in child process." msgstr "" -#: windows-nat.c:2722 +#: windows-nat.c:2739 msgid "Show whether to display memory accesses in child process." msgstr "" -#: windows-nat.c:2729 +#: windows-nat.c:2746 msgid "Set whether to display kernel exceptions in child process." msgstr "" -#: windows-nat.c:2730 +#: windows-nat.c:2747 msgid "Show whether to display kernel exceptions in child process." msgstr "" -#: windows-nat.c:2739 +#: windows-nat.c:2756 msgid "Display selectors infos." msgstr "" -#: windows-nat.c:2755 +#: windows-nat.c:2772 #, possible-c-format msgid "Invalid register %d in cygwin_set_dr.\n" msgstr "" -#: windows-nat.c:2842 +#: windows-nat.c:2859 #, possible-c-format msgid "obsolete '%s' found. Rename to '%s'." msgstr "" #. This will probably fail on Windows 9x/Me. Let the user know #. that we're missing some functionality. -#: windows-nat.c:2973 +#: windows-nat.c:2990 msgid "" "cannot automatically find executable file or library to read symbols.\n" "Use \"file\" or \"dll\" command to load executable/libraries directly." diff -Nru gdb-7.7/gdb/python/py-linetable.c gdb-7.7.1/gdb/python/py-linetable.c --- gdb-7.7/gdb/python/py-linetable.c 2014-01-08 09:23:36.000000000 +0000 +++ gdb-7.7.1/gdb/python/py-linetable.c 2014-05-05 21:50:23.000000000 +0000 @@ -168,7 +168,7 @@ 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 @@ 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); diff -Nru gdb-7.7/gdb/target.c gdb-7.7.1/gdb/target.c --- gdb-7.7/gdb/target.c 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/gdb/target.c 2014-05-05 21:51:24.000000000 +0000 @@ -1418,6 +1418,23 @@ } while (ops != NULL); + /* The cache works at the raw memory level. Make sure the cache + gets updated with raw contents no matter what kind of memory + object was originally being written. Note we do write-through + first, so that if it fails, we don't write to the cache contents + that never made it to the target. */ + if (writebuf != NULL + && !ptid_equal (inferior_ptid, null_ptid) + && target_dcache_init_p () + && (stack_cache_enabled_p () || code_cache_enabled_p ())) + { + DCACHE *dcache = target_dcache_get (); + + /* Note that writing to an area of memory which wasn't present + in the cache doesn't cause it to be loaded in. */ + dcache_update (dcache, res, memaddr, writebuf, len); + } + return res; } @@ -1565,6 +1582,7 @@ inf = NULL; if (inf != NULL + && readbuf != NULL /* The dcache reads whole cache lines; that doesn't play well with reading from a trace buffer, because reading outside of the collected memory range fails. */ @@ -1575,18 +1593,8 @@ { DCACHE *dcache = target_dcache_get_or_init (); - if (readbuf != NULL) - res = dcache_xfer_memory (ops, dcache, memaddr, readbuf, reg_len, 0); - else - /* FIXME drow/2006-08-09: If we're going to preserve const - correctness dcache_xfer_memory should take readbuf and - writebuf. */ - res = dcache_xfer_memory (ops, dcache, memaddr, (void *) writebuf, - reg_len, 1); - if (res <= 0) - return -1; - else - return res; + return dcache_read_memory_partial (ops, dcache, memaddr, readbuf, + reg_len); } /* If none of those methods found the memory we wanted, fall back @@ -1597,23 +1605,6 @@ object which can be read from more than one valid target. */ res = raw_memory_xfer_partial (ops, readbuf, writebuf, memaddr, reg_len); - /* Make sure the cache gets updated no matter what - if we are writing - to the stack. Even if this write is not tagged as such, we still need - to update the cache. */ - - if (res > 0 - && inf != NULL - && writebuf != NULL - && target_dcache_init_p () - && !region->attrib.cache - && ((stack_cache_enabled_p () && object != TARGET_OBJECT_STACK_MEMORY) - || (code_cache_enabled_p () && object != TARGET_OBJECT_CODE_MEMORY))) - { - DCACHE *dcache = target_dcache_get (); - - dcache_update (dcache, memaddr, (void *) writebuf, res); - } - /* If we still haven't got anything, return the last error. We give up. */ return res; diff -Nru gdb-7.7/gdb/testsuite/ChangeLog gdb-7.7.1/gdb/testsuite/ChangeLog --- gdb-7.7/gdb/testsuite/ChangeLog 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/gdb/testsuite/ChangeLog 2014-05-05 21:51:24.000000000 +0000 @@ -1,3 +1,30 @@ +2014-03-05 Pedro Alves + + PR gdb/16575 + * gdb.base/breakpoint-shadow.exp (compare_disassembly): New + procedure. + (top level): Adjust to use it. Add tests that exercise breakpoint + interaction with the code-cache. + +2014-02-26 Pedro Alves + Pedro Alves + + PR breakpoints/16292 + * gdb.threads/signal-while-stepping-over-bp-other-thread.c: New + file. + * gdb.threads/signal-while-stepping-over-bp-other-thread.exp: New + file. + +2014-02-25 Jan Kratochvil + + PR gdb/16626 + * gdb.base/auto-load-script: New file. + * gdb.base/auto-load.c: New file. + * gdb.base/auto-load.exp: New file. + + PR gdb/16626 + * gdb.base/auto-load.exp: Fix out-of-srctree run. + 2014-02-05 Yao Qi * gdb.trace/report.exp (use_collected_data): Test the output diff -Nru gdb-7.7/gdb/testsuite/gdb.base/auto-load.c gdb-7.7.1/gdb/testsuite/gdb.base/auto-load.c --- gdb-7.7/gdb/testsuite/gdb.base/auto-load.c 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/gdb/testsuite/gdb.base/auto-load.c 2014-05-05 21:50:23.000000000 +0000 @@ -0,0 +1,22 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +int +main (void) +{ + return 0; +} diff -Nru gdb-7.7/gdb/testsuite/gdb.base/auto-load.exp gdb-7.7.1/gdb/testsuite/gdb.base/auto-load.exp --- gdb-7.7/gdb/testsuite/gdb.base/auto-load.exp 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/gdb/testsuite/gdb.base/auto-load.exp 2014-05-05 21:50:23.000000000 +0000 @@ -0,0 +1,41 @@ +# Copyright 2014 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +standard_testfile + +if [is_remote host] { + return 0 +} + +set targetdir "${binfile}.dir" +set sourcescript "${srcdir}/${subdir}/${testfile}-script" +set targetscriptdir "${targetdir}/[file dirname ${binfile}]" +set targetscript "${targetscriptdir}/${testfile}-gdb.gdb" + +remote_exec host "rm -rf ${targetdir}" + +if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { + return -1 +} + +remote_exec host "mkdir -p ${targetscriptdir}" +remote_exec host "cp ${sourcescript} ${targetscript}" + +gdb_test_no_output "set auto-load scripts-directory ${targetdir}" "set auto-load scripts-directory" +gdb_test_no_output "set auto-load safe-path ${targetscript}" "set auto-load safe-path" + +gdb_load ${binfile} + +gdb_test {print $script_loaded} " = 42" diff -Nru gdb-7.7/gdb/testsuite/gdb.base/auto-load-script gdb-7.7.1/gdb/testsuite/gdb.base/auto-load-script --- gdb-7.7/gdb/testsuite/gdb.base/auto-load-script 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/gdb/testsuite/gdb.base/auto-load-script 2014-05-05 21:50:23.000000000 +0000 @@ -0,0 +1,17 @@ +# Copyright 2014 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +echo script_loaded\n +set $script_loaded=42 diff -Nru gdb-7.7/gdb/testsuite/gdb.base/breakpoint-shadow.exp gdb-7.7.1/gdb/testsuite/gdb.base/breakpoint-shadow.exp --- gdb-7.7/gdb/testsuite/gdb.base/breakpoint-shadow.exp 2014-01-08 09:23:36.000000000 +0000 +++ gdb-7.7.1/gdb/testsuite/gdb.base/breakpoint-shadow.exp 2014-05-05 21:50:23.000000000 +0000 @@ -44,14 +44,36 @@ gdb_test "b [gdb_get_line_number "break-first"]" "Breakpoint \[0-9\] at .*" "First breakpoint placed" gdb_test "b [gdb_get_line_number "break-second"]" "Breakpoint \[0-9\] at .*" "Second breakpoint placed" -set test "disassembly with breakpoints" -gdb_test_multiple "disass main" $test { - -re $match { - set got $expect_out(1,string) - if [string equal -nocase $orig $got] { - pass $test - } else { - fail $test +# Disassemble main, and compare the output to the original output +# before breakpoints were inserted. TEST is used as test message. + +proc test_disassembly {test} { + global match orig + + gdb_test_multiple "disass main" $test { + -re $match { + set got $expect_out(1,string) + if [string equal -nocase $orig $got] { + pass $test + } else { + fail $test + } } } } + +test_disassembly "disassembly with breakpoints" + +# Now check the interaction between the code cache and breakpoint +# always-inserted mode. + +# Recreate the code cache when breakpoints are already inserted. +gdb_test_no_output "set code-cache off" +gdb_test_no_output "set code-cache on" + +test_disassembly "disassembly with breakpoints, fresh code cache" + +# Delete breakpoints. This should update the code cache as well. +delete_breakpoints + +test_disassembly "disassembly without breakpoints, no stale breakpoints" diff -Nru gdb-7.7/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c gdb-7.7.1/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c --- gdb-7.7/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c 2014-05-05 21:51:24.000000000 +0000 @@ -0,0 +1,145 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2009-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 . */ + +#include +#include +#include +#include + +unsigned int args[2]; + +pid_t pid; +pthread_barrier_t barrier; +pthread_t child_thread_2, child_thread_3; + +void +handler (int signo) +{ + /* so that thread 3 is sure to run, in case the bug is present. */ + usleep (10); +} + +void +callme (void) +{ +} + +void +block_signals (void) +{ + sigset_t mask; + + sigfillset (&mask); + sigprocmask (SIG_BLOCK, &mask, NULL); +} + +void +unblock_signals (void) +{ + sigset_t mask; + + sigfillset (&mask); + sigprocmask (SIG_UNBLOCK, &mask, NULL); +} + +void * +child_function_3 (void *arg) +{ + int my_number = (long) arg; + volatile int *myp = (int *) &args[my_number]; + + pthread_barrier_wait (&barrier); + + while (*myp > 0) + { + (*myp) ++; /* set breakpoint child_two here */ + callme (); + } + + pthread_exit (NULL); +} + +void * +child_function_2 (void *arg) +{ + int my_number = (long) arg; + volatile int *myp = (int *) &args[my_number]; + + unblock_signals (); + + pthread_barrier_wait (&barrier); + + while (*myp > 0) + { + (*myp) ++; + callme (); /* set breakpoint child_one here */ + } + + *myp = 1; + while (*myp > 0) + { + (*myp) ++; + callme (); + } + + pthread_exit (NULL); +} + + +int +main () +{ + int res; + long i; + + /* Block signals in all threads but one, so that we're sure which + thread gets the signal we send from the command line. */ + block_signals (); + + signal (SIGUSR1, handler); + + /* Call these early so that PLTs for these are resolved soon, + instead of in the threads. RTLD_NOW should work as well. */ + usleep (0); + pthread_barrier_init (&barrier, NULL, 1); + pthread_barrier_wait (&barrier); + + pthread_barrier_init (&barrier, NULL, 2); + + /* The test uses this global to know where to send the signal + to. */ + pid = getpid (); + + i = 0; + args[i] = 1; + res = pthread_create (&child_thread_2, + NULL, child_function_2, (void *) i); + pthread_barrier_wait (&barrier); + callme (); /* set wait-thread-2 breakpoint here */ + + i = 1; + args[i] = 1; + res = pthread_create (&child_thread_3, + NULL, child_function_3, (void *) i); + pthread_barrier_wait (&barrier); + callme (); /* set wait-thread-3 breakpoint here */ + + pthread_join (child_thread_2, NULL); + pthread_join (child_thread_3, NULL); + + exit(EXIT_SUCCESS); +} diff -Nru gdb-7.7/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp gdb-7.7.1/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp --- gdb-7.7/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp 1970-01-01 00:00:00.000000000 +0000 +++ gdb-7.7.1/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp 2014-05-05 21:51:24.000000000 +0000 @@ -0,0 +1,120 @@ +# Copyright (C) 2011-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 . + +# Test that GDB doesn't inadvertently resume the stepped thread when a +# signal arrives while stepping over the breakpoint that last caused a +# stop, when the thread that hit that breakpoint is not the stepped +# thread. + +standard_testfile +set executable ${testfile} + +if [target_info exists gdb,nosignals] { + verbose "Skipping ${testfile}.exp because of nosignals." + return -1 +} + +# Test uses host "kill". +if { [is_remote target] } { + return -1 +} + +if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ + executable [list debug "incdir=${objdir}"]] != "" } { + return -1 +} + +proc get_value {var test} { + global expect_out + global gdb_prompt + global decimal + + set value -1 + gdb_test_multiple "print $var" "$test" { + -re ".*= ($decimal).*\r\n$gdb_prompt $" { + set value $expect_out(1,string) + pass "$test" + } + } + return ${value} +} + +# Start with a fresh gdb. + +clean_restart $executable + +if ![runto_main] { + return -1 +} + +gdb_breakpoint [gdb_get_line_number "set wait-thread-2 breakpoint here"] +gdb_continue_to_breakpoint "run to wait-thread-2 breakpoint" +gdb_test "info threads" "" "info threads with thread 2" + +gdb_breakpoint [gdb_get_line_number "set wait-thread-3 breakpoint here"] +gdb_continue_to_breakpoint "run to breakpoint" +gdb_test "info threads" "" "info threads with thread 3" + +set testpid [get_value "pid" "get pid of inferior"] + +gdb_test "set scheduler-locking on" + +gdb_breakpoint [gdb_get_line_number "set breakpoint child_two here"] +gdb_breakpoint [gdb_get_line_number "set breakpoint child_one here"] + +gdb_test "thread 3" "" "switch to thread 3 to run to its breakpoint" +gdb_continue_to_breakpoint "run to breakpoint in thread 3" + +gdb_test "thread 2" "" "switch to thread 2 to run to its breakpoint" +gdb_continue_to_breakpoint "run to breakpoint in thread 2" + +delete_breakpoints + +gdb_test "b *\$pc" "" "set breakpoint to be stepped over" +# Make sure the first loop breaks without hitting the breakpoint +# again. +gdb_test "p *myp = 0" " = 0" "force loop break in thread 2" + +# We want "print" to make sure the target reports the signal to the +# core. +gdb_test "handle SIGUSR1 print nostop pass" "" "" + +# Queue a signal in thread 2. +remote_exec host "kill -SIGUSR1 ${testpid}" + +gdb_test "thread 3" "" "switch to thread 3 for stepping" +set my_number [get_value "my_number" "get my_number"] +set cnt_before [get_value "args\[$my_number\]" "get count before step"] +gdb_test "set scheduler-locking off" + +# Make sure we're exercising the paths we want to. +gdb_test "set debug infrun 1" + +gdb_test \ + "step" \ + ".*prepare_to_proceed \\(step=1\\), switched to.*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"] + +# Test that GDB doesn't inadvertently resume the stepped thread when a +# signal arrives while stepping over a breakpoint in another thread. + +set test "stepped thread under control" +if { $cnt_before + 1 == $cnt_after } { + pass $test +} else { + fail $test +} diff -Nru gdb-7.7/gdb/version.in gdb-7.7.1/gdb/version.in --- gdb-7.7/gdb/version.in 2014-02-06 02:27:51.000000000 +0000 +++ gdb-7.7.1/gdb/version.in 2014-05-05 21:51:24.000000000 +0000 @@ -1 +1 @@ -7.7 +7.7.1 diff -Nru gdb-7.7/gdb/windows-nat.c gdb-7.7.1/gdb/windows-nat.c --- gdb-7.7/gdb/windows-nat.c 2014-02-06 02:21:29.000000000 +0000 +++ gdb-7.7.1/gdb/windows-nat.c 2014-05-05 21:51:24.000000000 +0000 @@ -310,12 +310,18 @@ { DWORD err = GetLastError (); - warning (_("SuspendThread (tid=0x%x) failed." - " (winerr %u)"), - (unsigned) id, (unsigned) err); - return NULL; + /* We get Access Denied (5) when trying to suspend + threads that Windows started on behalf of the + debuggee, usually when those threads are just + about to exit. */ + if (err != ERROR_ACCESS_DENIED) + warning (_("SuspendThread (tid=0x%x) failed." + " (winerr %u)"), + (unsigned) id, (unsigned) err); + th->suspended = -1; } - th->suspended = 1; + else + th->suspended = 1; } else if (get_context < 0) th->suspended = -1; @@ -445,7 +451,7 @@ { thread_info *th = current_thread; th->context.ContextFlags = CONTEXT_DEBUGGER_DR; - GetThreadContext (th->h, &th->context); + CHECK (GetThreadContext (th->h, &th->context)); /* Copy dr values from that thread. But only if there were not modified since last stop. PR gdb/2388 */ @@ -1266,10 +1272,12 @@ return 1; } -/* Resume all artificially suspended threads if we are continuing - execution. */ +/* Resume thread specified by ID, or all artificially suspended + threads, if we are continuing execution. KILLED non-zero means we + have killed the inferior, so we should ignore weird errors due to + threads shutting down. */ static BOOL -windows_continue (DWORD continue_status, int id) +windows_continue (DWORD continue_status, int id, int killed) { int i; thread_info *th; @@ -1297,7 +1305,16 @@ } if (th->context.ContextFlags) { - CHECK (SetThreadContext (th->h, &th->context)); + DWORD ec = 0; + + if (GetExitCodeThread (th->h, &ec) + && ec == STILL_ACTIVE) + { + BOOL status = SetThreadContext (th->h, &th->context); + + if (!killed) + CHECK (status); + } th->context.ContextFlags = 0; } if (th->suspended > 0) @@ -1425,9 +1442,9 @@ Otherwise complain. */ if (resume_all) - windows_continue (continue_status, -1); + windows_continue (continue_status, -1, 0); else - windows_continue (continue_status, ptid_get_tid (ptid)); + windows_continue (continue_status, ptid_get_tid (ptid), 0); } /* Ctrl-C handler used when the inferior is not run in the same console. The @@ -1645,7 +1662,7 @@ if (continue_status == -1) windows_resume (ops, minus_one_ptid, 0, 1); else - CHECK (windows_continue (continue_status, -1)); + CHECK (windows_continue (continue_status, -1, 0)); } else { @@ -2382,13 +2399,13 @@ do_initial_windows_stuff (ops, pi.dwProcessId, 0); - /* windows_continue (DBG_CONTINUE, -1); */ + /* windows_continue (DBG_CONTINUE, -1, 0); */ } static void windows_mourn_inferior (struct target_ops *ops) { - (void) windows_continue (DBG_CONTINUE, -1); + (void) windows_continue (DBG_CONTINUE, -1, 0); i386_cleanup_dregs(); if (open_process_used) { @@ -2456,7 +2473,7 @@ for (;;) { - if (!windows_continue (DBG_CONTINUE, -1)) + if (!windows_continue (DBG_CONTINUE, -1, 1)) break; if (!WaitForDebugEvent (¤t_event, INFINITE)) break; diff -Nru gdb-7.7/md5.sum gdb-7.7.1/md5.sum --- gdb-7.7/md5.sum 2014-02-06 02:43:24.000000000 +0000 +++ gdb-7.7.1/md5.sum 2014-05-05 21:57:16.000000000 +0000 @@ -93,7 +93,7 @@ 9ac71375350838903d4e2ea5e273328a bfd/pc532-mach.c bff5cefe7a6dca2fb2cac08f4f44f3dd bfd/elf32-i386.c b50493dbeeb6a6c72d74c195d4334bf9 bfd/cpu-xgate.c -3891f546135da051bf92c4366687c79b bfd/section.c +638f1ae0e9e474e96973222f235d05ca bfd/section.c e24c26414c8cffc67b83fcb4bcfb2a55 bfd/elf32-tic6x.h a1e9a3c25fd579771da3e57df20efbdc bfd/elf32-sh64.c 7f7679ad0dc080844c3868739e9db1b0 bfd/MAINTAINERS @@ -163,7 +163,7 @@ 3e40145c4c05424dab23bc65eb4c5753 bfd/elf-ifunc.c 1c74bfe93f1fe779fe093320c36b4443 bfd/cpu-moxie.c 6474afde93f8e964e3d6dddffde3c41e bfd/ChangeLog-0001 -390127806fd49f3cbb7ad14ea2456202 bfd/rs6000-core.c +1acae1a038a61e4486ec3f62e6d338fc bfd/rs6000-core.c 5bdcb0777ada79fecad6acd7f24e9623 bfd/cpu-m32c.c 30bb118e27b056030ba33809380bd65b bfd/cpu-rx.c 0c2ce76ab285ecdbaeca2b307517268e bfd/elfnn-aarch64.c @@ -186,7 +186,7 @@ b0682558ad69d3671cc55f83abebf32d bfd/genlink.h 25509065b1ee664694b3e5c37bb433e0 bfd/init.c 61035a9ec1c8ace84fb7d95293f1437b bfd/cpu-tilegx.c -163620f024dd51b93258ffa380b67b11 bfd/ChangeLog +557bd76544cc978b311ad2edf622385a bfd/ChangeLog 2260d5d5b17087621f4d22d664caca17 bfd/nlm-target.h 2c65a22621d3101c1bd6b480a6987bb4 bfd/elf32-ppc.c a3d9b5e913108cded9ca9ccd0597756c bfd/elf32-tilegx.c @@ -195,7 +195,7 @@ 140b65ea1bdd039c81067900b5124da8 bfd/elf32-pj.c 325696a8a9e20f4bc7e62bd8bc702277 bfd/configure.com 5cc2d4dfcaec81ddf7c88e00d48b7b01 bfd/elf32-xc16x.c -0a020ae85f45619e7be78a32f07f13ff bfd/bfd-in.h +092dbbb4302cca17531be888d92813a8 bfd/bfd-in.h ea01dce96afa052c76fd823efca3f370 bfd/aout-target.h f7b33e7dcd153dc5e4a4905f65772e08 bfd/i386aout.c b00f7cb9262913124b87eee21a7532d1 bfd/elfxx-sparc.c @@ -283,7 +283,7 @@ e9765c7c89f2baeb3273a69fced434e1 bfd/linker.c c3e727bdfb7a73954c1f7ea914d5de0e bfd/elf32-sh64-com.c 546640a80c1b867a387381e1eee30607 bfd/cpu-iq2000.c -b180737ba2abbeaae9d169a8fe4b9207 bfd/version.h +a5e3c7e44ad41d94d9d4b942471925a5 bfd/version.h 95d88c934f24ee90233fcbdc7fb43423 bfd/elf32-sh-symbian.c da142f9c2f88b9c7588bc32183dad968 bfd/elf-m10200.c fcf3f7fff3f72094447832681d4e23e3 bfd/elf64-tilegx.h @@ -348,7 +348,7 @@ 80da78edc286647ccdfe7ac1beb7847f bfd/cpu-alpha.c 58a3fb1e054b540ef5c1329799b824bb bfd/ChangeLog-2005 93f032da48de60e018eddb5e7080efa4 bfd/elfxx-tilegx.h -10804ec8277e65abd79022a18068f84a bfd/bfd.c +280dbf301cc98855cd36c878799a4584 bfd/bfd.c 7bfeb177a026abccd2614544aea7bf69 bfd/cpu-cr16c.c d26a1e4adc9f59c9f83fd37a4dfcbb1e bfd/cpu-aarch64.c e10350123329061cf3ae2dd4bacf141c bfd/configure.host @@ -362,7 +362,7 @@ 14daf53f44846e0adf24caa24bf52257 bfd/cpu-ns32k.c 7944adcc0e356862a28598769de73fc4 bfd/cpu-tic54x.c 546e2d7c5c9da674ed7600fa87823b1c bfd/cpu-lm32.c -bb3d6835e31501e321cd2d8bff767f6b bfd/cache.c +89cd43d235de68b8c6fc8af59a3e8586 bfd/cache.c 7d0efdbb284f00939c3d7f6de24235da bfd/coff-z8k.c 973084456c9fa330b3b39bd3f1055ee4 bfd/cpu-xtensa.c b7cb85d00b253b2fe42cea4a8a7640f9 bfd/elf32-xtensa.c @@ -385,15 +385,15 @@ d9f7fec3dee69a6c3084e6d4cfd88371 bfd/doc/cache.texi d7a37304ccd7b245f93df4be02797477 bfd/doc/proto.str 5b09719958f9cc1430c13ac46f2339c9 bfd/doc/bfdint.texi -4e7d1b90700096087c7f85f2b33467b0 bfd/doc/bfdt.texi +73fb54bccbe394235ae4b770ad285169 bfd/doc/bfdt.texi 87862cb3a4d559ae6f8837193037a762 bfd/doc/targets.texi 58f9e78e71f2d034a79e172899e792f6 bfd/doc/mmo.texi 2b2af4fc0532d1286cd9293d8bda2f1d bfd/doc/syms.texi f2a35ae681f6ea06b3f73c7a23a28163 bfd/doc/chew.c 65d07f43470f76ee35cc0104a40bba62 bfd/doc/bfd.texinfo 71ed03090263856b9b82dcd682df2c19 bfd/doc/ChangeLog -e11cfb66254ed5451e7edf713331747a bfd/doc/bfdver.texi -a376d2626be11d4e8aab25f553feca38 bfd/doc/bfd.info +e756ddd0825dd68278c7887244f04d55 bfd/doc/bfdver.texi +0fda17b5a30f020be4e6ec82c9454be6 bfd/doc/bfd.info 072910d553f79906db69fa7c0e956bba bfd/doc/fdl.texi 7fd361850a5f96c0087b16241a4de6d5 bfd/doc/bfdsumm.texi 51139f6af786e74446d01ec49807fc28 bfd/doc/elf.texi @@ -407,7 +407,7 @@ 6a1a507e85b4d8cee41c3defa9d24e6a bfd/doc/opncls.texi 7edf511939deb638e8291f264c4249e1 bfd/doc/bfdio.texi 6f32bdfe0063cdb0c3aa73cceee3a1e1 bfd/doc/archive.texi -04a07152780205865412e3ef222415f9 bfd/doc/section.texi +caacf088de29d05e198c468432d127b2 bfd/doc/section.texi 0fc22c68d543f8dc7cc4548a3fad3557 bfd/doc/libbfd.texi 6dd9da257666139a061d6905349d9614 bfd/doc/core.texi 8571ff0c1ad78f4460c4535fb10cac48 bfd/doc/Makefile.in @@ -557,7 +557,7 @@ b02c183fdd2c8d15a1b6e6762e20e5fc bfd/m68klinux.c f5b2082a5a1a29c38e706e3d9c0a8af7 bfd/coff-go32.c 2cfd53095c676672fd9cfdf2d39f2f44 bfd/tekhex.c -43005e7aab68c3a43d6ab84a4c28d989 bfd/bfd-in2.h +e1375f1c96e996a5f55a238d7cf2e1ea bfd/bfd-in2.h db369cf9b35a5d46abb160aa8bbf4145 bfd/elf32-tilepro.c 8e875336f2874e801daca2e0ce78bb22 bfd/coff-sparc.c cf952c320bd31f09566ef5512192907b bfd/pei-arm.c @@ -755,7 +755,7 @@ 50b03d22794b76df053667062b99bde2 gdb/sparc-sol2-nat.c 354cbe95c70c88697011debe2d034fee gdb/gnu-nat.h 830a61a4b9cd4dfb089abc36c750cddf gdb/serial.c -7c0a7cecab6f5125ac995252aace9b33 gdb/infrun.c +35aad96d79ff372b50874f5447312718 gdb/infrun.c dc95e9b0ddb41416d9fbb2273170e006 gdb/monitor.h ad19160e8dd67e397c3fca20ea8b3453 gdb/dwarf2read.c 66060ebf32b75aeeccb9c06ce599d418 gdb/amd64fbsd-nat.c @@ -803,7 +803,7 @@ 18cd6ab578028383eb92571228c8f8e6 gdb/python/py-cmd.c ead8e6cd55f833d428b68144ee3b11fc gdb/python/py-function.c 41dc73f87400ac722da4be9477d0eadc gdb/python/py-continueevent.c -4c7502726fa6b135b5371ed789b87e6f gdb/python/py-linetable.c +c7cf76d517bc002c26287acec489dd9a gdb/python/py-linetable.c 472a1ecd7064576ed64598fc22862a99 gdb/python/py-finishbreakpoint.c 718a36b43700bdb4fb7fdc6dad35085d gdb/python/py-inferior.c 96a70fa36e8d872384482ac518e18720 gdb/python/py-evtregistry.c @@ -873,7 +873,7 @@ 31fe08c7e03330b571268f06ee54b1c4 gdb/coffread.c 9e255ba94dc111fcc573af935b464f3e gdb/arm-tdep.h ebf64a3f08d112ef607af758fa337854 gdb/inf-loop.c -d7b51a602243b2186cc471f23f3caac5 gdb/auto-load.c +013712a548f34099e9f5769e7ea5bbd2 gdb/auto-load.c fd7b0fb712258d1fa8589cc2dd421daf gdb/ctf.h 10899c020b94f342c87c1e5bec49b0c0 gdb/dummy-frame.c b8b7753728ac44d9e95d81953320efcf gdb/inf-ptrace.c @@ -990,7 +990,7 @@ 9507570ff03c81cf48645d8b2b243192 gdb/vax-nat.c e9073adfe0140b34cb4ad424772e4fcc gdb/score-tdep.c e7d4a4de7112cdafd14f2d2128719210 gdb/p-valprint.c -0c6cb62bf04050897f9560f2a2cde2b0 gdb/MAINTAINERS +95c6bdfd4fc27305edd46c80fc722301 gdb/MAINTAINERS 6c8ce6d488761d95eb2fa10c35fa0d61 gdb/m68kbsd-nat.c 4305d8cc143b2eb0968b392a9e6caf1f gdb/alphabsd-nat.c 7a7b0a6d875f1a5badebf85367b3fb24 gdb/sparc-ravenscar-thread.h @@ -1016,7 +1016,7 @@ 8eff99035a942ae675cc6c7f3ac8d053 gdb/typeprint.c d67aa574e3ada6b61b701a51f0b049a5 gdb/bsd-kvm.c bd8640dd04668bbb178f2a2520cb9a4b gdb/target-memory.c -f3ba054c93dbc83a7186ba05390b5f12 gdb/avr-tdep.c +55d21644100fcaa390e878eaec39a36f gdb/avr-tdep.c 32d6f9c8f9471270d10bbdd2645f0820 gdb/gcore.c 16384fb34ba55b9955bb4ff9a396c8e0 gdb/features/mips64-cp0.xml e02f6dd77e5775afccf160656dddba41 gdb/features/arm-with-m-fpa-layout.xml @@ -1264,7 +1264,7 @@ ca568d3af7d6ae508a2c0179ede9bbcf gdb/gdb.h c8923a078f6531cbdd72d6d98a132d31 gdb/dfp.c 7e2adc52e509bdae9d333f4782c23c2c gdb/ppcobsd-tdep.c -5a63a02d9580329864532c08f4c5d16c gdb/po/gdb.pot +9cbc57e424e9db9fa2ea095323137459 gdb/po/gdb.pot 1851bff0653201a488dcae18dde7efad gdb/po/gdbtext 8e0007f6395e21d254d1ac539608c8f8 gdb/go-exp.c 8b9b1aaa262d27476210b75f9c9b6cbb gdb/dwarf2loc.c @@ -1277,7 +1277,7 @@ 1e1c2c423f1413bf27e82eaac8cbecd3 gdb/inflow.c 7e2616730c03776cf51b3a289782cc4b gdb/i386-dicos-tdep.c 32f5147fc89716698c88ccc74f5ae6fa gdb/i386gnu-nat.c -5592444ed03ba54f4c087fb6f5b4edc4 gdb/version.in +9b61718a9b29c999d83042de4504ee06 gdb/version.in 3a107fccd4ad682a20212c7c47817ab6 gdb/macrotab.h 076f775ad2d40deda81f7be7da62ae76 gdb/posix-hdep.c ed3460c657770a83837a39f914a3c38b gdb/solib-aix.h @@ -1407,13 +1407,13 @@ efa1b8401486cc3519f688ebd1c89c0d gdb/spu-tdep.h 7901bae4507272bff063ad44a07ac721 gdb/dwarf2-frame.h ea70d216e42f194b910eb441f3fa5b72 gdb/amd64-sol2-tdep.c -1e53627bae8bae2d7b496f41d50f5291 gdb/ChangeLog +fb264e371df3f1c2fbf1b86dd30bf7b5 gdb/ChangeLog 16dc208205d75892c640e632ff307ff0 gdb/arm-linux-nat.c 404305970676c09e77dd7cb3b748566b gdb/sparc-nat.h 1ee1dc6fffdd147747fd45623bb35225 gdb/armnbsd-tdep.c 5a59ca31efc91ff2fd45527fc90d0779 gdb/solib-spu.c e0eaf56005381b28e172ec7b1ad88497 gdb/cp-support.h -9aad86371744732bb66f2c2004d538d7 gdb/windows-nat.c +f16ee91360720cf7105cd5d83716ef4e gdb/windows-nat.c 9f1bdffe26dc71b3509bf069abcfc64b gdb/main.c d52d6e6d5494cfd13854379f701dd9b5 gdb/nbsd-tdep.c 710b368ba5c704a4c9b86d0212448c9d gdb/linespec.c @@ -1788,7 +1788,7 @@ b5d5a9a42a0955ff4d97209a40a706bc gdb/xstormy16-tdep.c e6d9d892be2b5c9950ce88a416d2b191 gdb/ser-unix.h cca59b1562e25e48063d9b9d15c8a0bb gdb/jv-exp.c -0293698c2f794fd8a7f9cab3290f19ed gdb/dcache.c +0e48f58b6f09b8e24c48683b75c5ddc4 gdb/dcache.c 0233cc263565b923eeb92a4830942ce9 gdb/vax-tdep.c 8767b1bd22d34c9f77e8a2ab83526ff6 gdb/ppc-sysv-tdep.c 29d0cbde19dd75d8a06e93e53e15ed0c gdb/completer.c @@ -2856,7 +2856,7 @@ 1e63d632aebde719ad143f95a1613d44 gdb/testsuite/config/unix.exp 50f6a13c0fd1efa871f0b7c0dc273e0d gdb/testsuite/config/m32r-stub.exp fa9ec353aaf2a8f6ebaf916205906049 gdb/testsuite/config/default.exp -6a07b6870f5f40abf4228540dab71132 gdb/testsuite/ChangeLog +4b9d1ff654f8b7ed745816fe7d4d09c6 gdb/testsuite/ChangeLog 3bf59fe4ee125fed62e361a4235f302d gdb/testsuite/gdb.go/integers.go ea5ff936bcbd68cbc91cb8771230db91 gdb/testsuite/gdb.go/strings.go 42285908fe9cffdad5e7e8c08d189f9e gdb/testsuite/gdb.go/methods.exp @@ -3433,6 +3433,7 @@ 9bb628d1233b58397949f35c005c7164 gdb/testsuite/gdb.base/random-signal.exp 14ef835164b7090f513b27bc74a11cca gdb/testsuite/gdb.base/disp-step-syscall.exp 15b94a2810ce675f9e359a347b700382 gdb/testsuite/gdb.base/argv0-symlink.exp +a1068c7fe8664cbe7fd82e3f011239c9 gdb/testsuite/gdb.base/auto-load.c 55143311aaa933db91b23d2b9900c9e7 gdb/testsuite/gdb.base/annota3.c 87cc97500a902f79ea1351f8bb0f7b47 gdb/testsuite/gdb.base/info-target.exp 0cb031a7e7dc09f9db15197f07176655 gdb/testsuite/gdb.base/info-fun.exp @@ -3508,6 +3509,7 @@ 3ed557fc791da5b82f32ee1d95f4a31c gdb/testsuite/gdb.base/dump.exp a02acebb010a9aebf38dd1262c73e6fc gdb/testsuite/gdb.base/ctxobj.exp 810a04bc0c50752c6664032a6176ce6c gdb/testsuite/gdb.base/info-shared-solib1.c +f0401d4a401e48ecabc7716942278cc6 gdb/testsuite/gdb.base/auto-load-script bece708edda16f2794a94d57898b2da9 gdb/testsuite/gdb.base/commands.exp 40ea0b637bee041d22c72ad5ce356d17 gdb/testsuite/gdb.base/attach2.c 5c53217539317f767797f308fa2d2450 gdb/testsuite/gdb.base/print-file-var-lib2.c @@ -3917,7 +3919,7 @@ 820a7f175e6e83da237f87e2c5d74088 gdb/testsuite/gdb.base/break.exp b2ee495137691e70d3ad7c4aae6f2f22 gdb/testsuite/gdb.base/disasm-end-cu-1.c b4816e4b91e99aa3e905b5d44802e907 gdb/testsuite/gdb.base/spu.ld -7be20c4b0c8c0e679fe4358e35e6b831 gdb/testsuite/gdb.base/breakpoint-shadow.exp +e4a5459490946fb7a33114e06bc814bd gdb/testsuite/gdb.base/breakpoint-shadow.exp 0d6ef9d803f27a96e9756635d57c3939 gdb/testsuite/gdb.base/longest-types.c 35ce0d1e8a6cc6a278649ec7464d8a1c gdb/testsuite/gdb.base/d10vovly.c 50d5cd12a173a5fbb0c89f3e1e4581d8 gdb/testsuite/gdb.base/gcore-relro.exp @@ -3963,6 +3965,7 @@ 51eb9b89892b516752e0aa20fd2e3818 gdb/testsuite/gdb.base/signull.exp 6e8b1ebb505d77ac53cfaab60499a09d gdb/testsuite/gdb.base/skip-solib-lib.c 0dfb974a35473524ad9a4e81d1f319ad gdb/testsuite/gdb.base/gnu_vector.c +a06c8332ff4e84ff4c559c521adf8cce gdb/testsuite/gdb.base/auto-load.exp 8d3ddf4ea359b538d909ebda31f83b8f gdb/testsuite/gdb.base/trace-commands.exp dc1c7b2d0d97de5e07f0046fca14d586 gdb/testsuite/gdb.base/macscp4.h 91907e60647909daed2a097be0d47d27 gdb/testsuite/gdb.base/type-opaque-main.c @@ -4365,12 +4368,14 @@ c5bd39c5b29f906164d3040f8e10a730 gdb/testsuite/gdb.threads/watchthreads2.exp 1c7c3f475ff5763d3779825e29c8bcf3 gdb/testsuite/gdb.threads/manythreads.exp e706ebfe1b780e01050d61fb4fc654ef gdb/testsuite/gdb.threads/print-threads.exp +ec64e55141d583bd2b48cd9361bfde67 gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp d8f8b782a5bc6c1c8122861a1be9a062 gdb/testsuite/gdb.threads/corethreads.exp 65afebe3bcb48182792b0c16b5796838 gdb/testsuite/gdb.threads/non-ldr-exc-3.exp a58389be21255b20dc2aa91107ae9520 gdb/testsuite/gdb.threads/create-fail.c dd7e048ba4d52b17979242914fa1312d gdb/testsuite/gdb.threads/corethreads.c 8fdd249775ceffe2b2bb9d1007db01e8 gdb/testsuite/gdb.threads/execl.exp 7a2c4885bd5b64e65b71db9bf589ca1a gdb/testsuite/gdb.threads/multi-create.exp +3d62dbccacc2a334c6886ba79813d2f4 gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.c 946d19bccefa54d0df3b39f74aadfd1d gdb/testsuite/gdb.threads/ia64-sigill.exp 63c9a72298d67e76ddc71e8a78ab3d68 gdb/testsuite/gdb.threads/watchpoint-fork.h c845000202b82a03c1626ae3b56d6869 gdb/testsuite/gdb.threads/bp_in_thread.exp @@ -4498,31 +4503,31 @@ 40d5a9165335a9512d647423ec4c4e1d gdb/moxie-tdep.c 5fc90173f374a3b462c578a5b6613e76 gdb/amd64-tdep.c e89051f69c9abf9baf2f9276fff8b109 gdb/macroexp.c -5df4df15bf6f3765350c471a16f9a3c6 gdb/doc/gdbserver.1 +b1ce7438fd9dae4311d9a6f0dc7f7664 gdb/doc/gdbserver.1 0a01a0d57ee6760b805e1e507efd14fa gdb/doc/gdb.info-2 -528bcba85b53579e0c481261fca0f181 gdb/doc/gdb.info-5 +368a8e888d527af8f5699272de2a0701 gdb/doc/gdb.info-5 9015134b8028aa4415bec5eea0c3d925 gdb/doc/gdb.info-4 994065978669071f5e0a82de422596e2 gdb/doc/observer.texi e42729d6ac4bb241500d0e33d24a69a6 gdb/doc/ChangeLog d5d06eaf9b4d44aa442a4a281aa9aea4 gdb/doc/a4rc.sed -6305d2ae333ae73be8bbc70b0684ea68 gdb/doc/gdb.info-1 +9d1ed6ad4db47804385626416051a652 gdb/doc/gdb.info-1 8108dd8f906f2654fecc74958cf383db gdb/doc/psrc.sed d39233c86ed6a6dc9e853ae6a11fe03e gdb/doc/stack_frame.pdf 8d169ff7e7d99dff9d951fa869f90fe2 gdb/doc/annotate.texinfo ab0fe311032294b952da80585b8b90e7 gdb/doc/fdl.texi 6076d300a46651562d4ecd0604442414 gdb/doc/stack_frame.png -0e266bd015d7c39f709fc33be3830d16 gdb/doc/gcore.1 +47beeaacf9f16d6196db50259be3f644 gdb/doc/gcore.1 d18f5345c0efad2e1ea93d32fe5aa220 gdb/doc/agentexpr.texi 73ec71cd3b2e7f61bc530f19d4b35056 gdb/doc/lpsrc.sed 7bfdb0765c5d050d204fbb30aeeba0d8 gdb/doc/stack_frame.eps 0e455dcf84caa950691bf7ba8c5741ad gdb/doc/all-cfg.texi 0ce6c0e21f178ab50efe511a07e2229a gdb/doc/annotate.info d3beca78a6ced3dbd2ca6f00102f3e5d gdb/doc/gdb.info-6 -9262fdfbfd4c525e4fa3fd38c2e6ec01 gdb/doc/gdb.1 -4aab686e0f1fc1d4534ec56ea1c71aed gdb/doc/gdbinit.5 +8f718355f2f6a1b584ef12b5d2c74c3a gdb/doc/gdb.1 +4e0a4d7bfd357690b82813d4c2ba04a9 gdb/doc/gdbinit.5 bf96494e6e4d346175babd5ef9781882 gdb/doc/gpl.texi f44023a05ad33ffb8254965d32eef766 gdb/doc/refcard.tex -f1cb6de90418ffafaa2516d10bece7a0 gdb/doc/gdb.info +3e442f21b3e1c50b84c0138d500fbcbb gdb/doc/gdb.info 553b7fe1bf4b5d8b96fdb8cd83503de1 gdb/doc/stack_frame.svg f2037884ba0a0f4a8dd5363ccc973aca gdb/doc/gdb.texinfo f2893d2988807ffbd3a87823b4b87f1a gdb/doc/Makefile.in @@ -4595,7 +4600,7 @@ 5fae2f235bdac98328fc9da7a4b4b01d gdb/stubs/ia64vms-stub.c ffc93e69a8813484cec63da022b68375 gdb/stubs/sh-stub.c d90ac312feb6560716bb616c2c770fb9 gdb/bsd-kvm.h -9420b8f84d43efcd1a87d2a12b5e890f gdb/dcache.h +318722a7aee1f3fa64aac531eac284eb gdb/dcache.h 5cbff1f3c3de2abd63a44ab4e723f872 gdb/observer.c e46d3e5b47032cc9103b7f6c36d8d84e gdb/amd64-nat.h d14e1f94693af6c18fff71dd48a0b56c gdb/Makefile.in @@ -4725,7 +4730,7 @@ 0632556e4e9f184017fb21ba04250eb9 gdb/memattr.c 24b94c533f3b1df00748d6032d756533 gdb/inf-ttrace.h 7d64d551fcf8b2be0064b79c5f749d98 gdb/disasm.c -6ec7c7a0405aa83fbeefd3c894f9cf09 gdb/target.c +b3c32081fbfec6e2084b530bdf2ab583 gdb/target.c 614b080e900d72ffdd6b8d3d6a919067 gdb/demangle.c 1ae3b001ce4665cfe6908c9511018626 gdb/linux-tdep.c 0757bc6becdb634b53cb552121a33525 gdb/go-lang.c