commit b3b0f1fd5bfcb25205c52c9f6e859b24f8248bb7 Author: eabdullin Date: Tue Nov 5 09:38:43 2024 +0000 Import from CS git diff --git a/.gcc-toolset-14-gdb.metadata b/.gcc-toolset-14-gdb.metadata new file mode 100644 index 0000000..a78e9e2 --- /dev/null +++ b/.gcc-toolset-14-gdb.metadata @@ -0,0 +1,3 @@ +4f38f7c24d523b6923f22404b7dee4152a00d0d4 SOURCES/gdb-14.2.tar.xz +1ad1d2c6f0141b37bbe32b8add91b5691ecc6412 SOURCES/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz +fc22d7dfb0c4c686d7dfde9da2aa5b41c475899e SOURCES/v2.0.5.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd1287f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +SOURCES/gdb-14.2.tar.xz +SOURCES/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz +SOURCES/v2.0.5.tar.gz diff --git a/SOURCES/_gdb.spec.Patch.include b/SOURCES/_gdb.spec.Patch.include new file mode 100644 index 0000000..f1c921d --- /dev/null +++ b/SOURCES/_gdb.spec.Patch.include @@ -0,0 +1,233 @@ +# Check distro name is included in the version output. +Patch001: gdb-6.3-rh-testversion-20041202.patch + +# Add a wrapper script to GDB that implements pstack using the +# --readnever option. +#=push +Patch002: gdb-6.3-gstack-20050411.patch + +# Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337). +#=push+jan: It should be replaced by Infinity project. +Patch003: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch + +# Test sideeffects of skipping ppc .so libs trampolines (BZ 218379). +#=fedoratest +Patch004: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch + +# Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517). +#=fedoratest +Patch005: gdb-6.6-bz229517-gcore-without-terminal.patch + +# Avoid too long timeouts on failing cases of "annota1.exp annota3.exp". +#=fedoratest +Patch006: gdb-6.6-testsuite-timeouts.patch + +# Support for stepping over PPC atomic instruction sequences (BZ 237572). +#=fedoratest +Patch007: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch + +# Test kernel VDSO decoding while attaching to an i386 process. +#=fedoratest +Patch008: gdb-6.3-attach-see-vdso-test.patch + +# Test leftover zombie process (BZ 243845). +#=fedoratest +Patch009: gdb-6.5-bz243845-stale-testing-zombie-test.patch + +# New locating of the matching binaries from the pure core file (build-id). +#=push+jan +Patch010: gdb-6.6-buildid-locate.patch + +# Fix loading of core files without build-ids but with build-ids in executables. +# Load strictly build-id-checked core files only if no executable is specified +# (Jan Kratochvil, RH BZ 1339862). +#=push+jan +Patch011: gdb-6.6-buildid-locate-solib-missing-ids.patch + +#=push+jan +Patch012: gdb-6.6-buildid-locate-rpm.patch + +# Test PPC hiding of call-volatile parameter register. +#=fedoratest +Patch013: gdb-6.7-ppc-clobbered-registers-O2-test.patch + +# Test gcore memory and time requirements for large inferiors. +#=fedoratest +Patch014: gdb-6.5-gcore-buffer-limit-test.patch + +# Test GCORE for shmid 0 shared memory mappings. +#=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible. +Patch015: gdb-6.3-mapping-zero-inode-test.patch + +# Test a crash on libraries missing the .text section. +#=fedoratest +Patch016: gdb-6.5-section-num-fixup-test.patch + +# Fix resolving of variables at locations lists in prelinked libs (BZ 466901). +#=fedoratest +Patch017: gdb-6.8-bz466901-backtrace-full-prelinked.patch + +# New test for step-resume breakpoint placed in multiple threads at once. +#=fedoratest +Patch018: gdb-simultaneous-step-resume-breakpoint-test.patch + +# Fix GNU/Linux core open: Can't read pathname for load map: Input/output error. +# Fix regression of undisplayed missing shared libraries caused by a fix for. +#=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*> +Patch019: gdb-core-open-vdso-warning.patch + +# Fix follow-exec for C++ programs (bugreported by Martin Stransky). +#=fedoratest +Patch020: gdb-archer-next-over-throw-cxx-exec.patch + +# Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). +#=push+jan +Patch021: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch + +# [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). +#=fedoratest +Patch022: gdb-test-bt-cfi-without-die.patch + +# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). +#=fedoratest +Patch023: gdb-bz634108-solib_address.patch + +# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. +#=fedoratest +Patch024: gdb-test-dw2-aranges.patch + +# Workaround PR libc/14166 for inferior calls of strstr. +#=fedoratest: Compatibility with RHELs (unchecked which ones). +Patch025: gdb-glibc-strstr-workaround.patch + +# Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343). +#=fedoratest +Patch026: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch + +# Import regression test for `gdb/findvar.c:417: internal-error: +# read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5. +#=fedoratest +Patch027: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch + +# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614) +#=fedoratest +Patch028: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch + +# Fix 'gdb gives highly misleading error when debuginfo pkg is present, +# but not corresponding binary pkg' (RH BZ 981154). +#=push+jan +Patch029: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch + +# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to +# crash.' (RH BZ 1156192). +#=fedoratest +Patch030: gdb-rhbz1156192-recursive-dlopen-test.patch + +# Fix '`catch syscall' doesn't work for parent after `fork' is called' +# (Philippe Waroquiers, RH BZ 1149205). +#=fedoratest +Patch031: gdb-rhbz1149205-catch-syscall-after-fork-test.patch + +# Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan +# Kratochvil, RH BZ 1084404). +#=fedoratest +Patch032: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch + +# Force libncursesw over libncurses to match the includes (RH BZ 1270534). +#=push+jan +Patch033: gdb-fedora-libncursesw.patch + +# [aarch64] Fix hardware watchpoints (RH BZ 1261564). +#=fedoratest +Patch034: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch + +# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). +#=fedora +Patch035: gdb-container-rh-pkg.patch + +# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). +#=fedora +Patch036: gdb-linux_perf-bundle.patch + +# Update gdb-add-index.sh such that, when the GDB environment +# variable is not set, the script is smarter than just looking for +# 'gdb' in the $PATH. +# +# The actual search order is now: /usr/bin/gdb.minimal, gdb (in the +# $PATH), then /usr/libexec/gdb. +# +# For the rationale of looking for gdb.minimal see: +# +# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot +# +#=fedora +Patch037: gdb-add-index.patch + +# Back-port upstream commit 1f0fab7ff86 as part of a fix for +# non-deterministic gdb-index generation (RH BZ 2232086). +Patch038: gdb-rhbz2232086-refactor-selftest-support.patch + +# Back-port upstream commit aa19bc1d259 as part of a fix for +# non-deterministic gdb-index generation (RH BZ 2232086). +Patch039: gdb-rhbz-2232086-reduce-size-of-gdb-index.patch + +# Back-port upstream commit acc117b57f7 as part of a fix for +# non-deterministic gdb-index generation (RH BZ 2232086). +Patch040: gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch + +# Back-port upstream commit aff250145af as part of a fix for +# non-deterministic gdb-index generation (RH BZ 2232086). +Patch041: gdb-rhbz-2232086-generate-gdb-index-consistently.patch + +# Back-port upstream commit 3644f41dc80 as part of a fix for +# non-deterministic gdb-index generation (RH BZ 2232086). +Patch042: gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch + + +Patch043: gdb-rhbz2250652-gdbpy_gil.patch + + +Patch044: gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch + + +Patch045: gdb-ftbs-swapped-calloc-args.patch + +# Backport upstream workaround for GCC 14 problem which cause assertion +# failures in GDB. +Patch046: gdb-rhbz2261580-intrusive_list-assertion-fix.patch + +# Backport "gdb: s390: Add arch14 record/replay support" +# (Andreas Arnez, RHEL-36225) +Patch047: gdb-rhel-36225-add-arch14-record.patch + +# Backport "PowerPC: Add support for Power11 options" +# (Peter Bergner, RHEL-36518) +Patch048: gdb-rhel-36518-add-power11-support.patch + +# Update x86 disassembler +Patch049: gdb-rhel-36527-apx-disasm.patch + +#Revert "gdb: remove unnecessary parameter wait_ptid from do_target_wait" +#(Andrew Burgess, RHEL-13298) +Patch050: gdb-rhel-13298-inferior-funcall-bp-condition-1-of-5.patch + +#gdb: fix b/p conditions with infcalls in multi-threaded inferiors +#(Andrew Burgess, RHEL-13298) +Patch051: gdb-rhel-13298-inferior-funcall-bp-condition-2-of-5.patch + +#gdb: add timeouts for inferior function calls +#(Andrew Burgess, RHEL-13298) +Patch052: gdb-rhel-13298-inferior-funcall-bp-condition-3-of-5.patch + +#gdb: introduce unwind-on-timeout setting +#(Andrew Burgess, RHEL-13298) +Patch053: gdb-rhel-13298-inferior-funcall-bp-condition-4-of-5.patch + +#gdb: rename unwindonsignal to unwind-on-signal +#(Andrew Burgess, RHEL-13298) +Patch054: gdb-rhel-13298-inferior-funcall-bp-condition-5-of-5.patch + +#gdb/unwinders: better support for $pc not saved +#(Andrew Burgess, RHEL-19390) +Patch055: gdb-rhel-19390-pc-not-saved.patch + diff --git a/SOURCES/_gdb.spec.patch.include b/SOURCES/_gdb.spec.patch.include new file mode 100644 index 0000000..b72c412 --- /dev/null +++ b/SOURCES/_gdb.spec.patch.include @@ -0,0 +1,55 @@ +%patch -p1 -P001 +%patch -p1 -P002 +%patch -p1 -P003 +%patch -p1 -P004 +%patch -p1 -P005 +%patch -p1 -P006 +%patch -p1 -P007 +%patch -p1 -P008 +%patch -p1 -P009 +%patch -p1 -P010 +%patch -p1 -P011 +%patch -p1 -P012 +%patch -p1 -P013 +%patch -p1 -P014 +%patch -p1 -P015 +%patch -p1 -P016 +%patch -p1 -P017 +%patch -p1 -P018 +%patch -p1 -P019 +%patch -p1 -P020 +%patch -p1 -P021 +%patch -p1 -P022 +%patch -p1 -P023 +%patch -p1 -P024 +%patch -p1 -P025 +%patch -p1 -P026 +%patch -p1 -P027 +%patch -p1 -P028 +%patch -p1 -P029 +%patch -p1 -P030 +%patch -p1 -P031 +%patch -p1 -P032 +%patch -p1 -P033 +%patch -p1 -P034 +%patch -p1 -P035 +%patch -p1 -P036 +%patch -p1 -P037 +%patch -p1 -P038 +%patch -p1 -P039 +%patch -p1 -P040 +%patch -p1 -P041 +%patch -p1 -P042 +%patch -p1 -P043 +%patch -p1 -P044 +%patch -p1 -P045 +%patch -p1 -P046 +%patch -p1 -P047 +%patch -p1 -P048 +%patch -p1 -P049 +%patch -p1 -P050 +%patch -p1 -P051 +%patch -p1 -P052 +%patch -p1 -P053 +%patch -p1 -P054 +%patch -p1 -P055 diff --git a/SOURCES/gdb-6.3-attach-see-vdso-test.patch b/SOURCES/gdb-6.3-attach-see-vdso-test.patch new file mode 100644 index 0000000..daba42f --- /dev/null +++ b/SOURCES/gdb-6.3-attach-see-vdso-test.patch @@ -0,0 +1,120 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.3-attach-see-vdso-test.patch + +;; Test kernel VDSO decoding while attaching to an i386 process. +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.c b/gdb/testsuite/gdb.base/attach-see-vdso.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/attach-see-vdso.c +@@ -0,0 +1,25 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2007 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ++ ++#include ++ ++int main () ++{ ++ pause (); ++ return 1; ++} +diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.exp b/gdb/testsuite/gdb.base/attach-see-vdso.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/attach-see-vdso.exp +@@ -0,0 +1,77 @@ ++# Copyright 2007 ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++# This file was created by Jan Kratochvil . ++ ++# This test only works on Linux ++if { ![istarget "*-*-linux-gnu*"] } { ++ return 0 ++} ++ ++if {[use_gdb_stub]} { ++ untested "skipping test because of use_gdb_stub" ++ return -1 ++} ++ ++set testfile "attach-see-vdso" ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]] ++ ++# The kernel VDSO is used for the syscalls returns only on i386 (not x86_64). ++# ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-m32}] != "" } { ++ gdb_suppress_entire_file "Testcase nonthraded compile failed, so all tests in this file will automatically fail." ++} ++ ++if [get_compiler_info ${binfile}] { ++ return -1 ++} ++ ++# Start the program running and then wait for a bit, to be sure ++# that it can be attached to. ++ ++set testpid [eval exec $binfile &] ++ ++# Avoid some race: ++sleep 2 ++ ++# Start with clean gdb ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++# Never call: gdb_load ${binfile} ++# as the former problem would not reproduce otherwise. ++ ++set test "attach" ++gdb_test_multiple "attach $testpid" "$test" { ++ -re "Attaching to process $testpid\r?\n.*$gdb_prompt $" { ++ pass "$test" ++ } ++} ++ ++gdb_test "bt" "#0 *0x\[0-9a-f\]* in \[^?\].*" "backtrace decodes VDSO" ++ ++# Exit and detach the process. ++ ++gdb_exit ++ ++# Make sure we don't leave a process around to confuse ++# the next test run (and prevent the compile by keeping ++# the text file busy), in case the "set should_exit" didn't ++# work. ++ ++remote_exec build "kill -9 ${testpid}" diff --git a/SOURCES/gdb-6.3-gstack-20050411.patch b/SOURCES/gdb-6.3-gstack-20050411.patch new file mode 100644 index 0000000..01e8ffa --- /dev/null +++ b/SOURCES/gdb-6.3-gstack-20050411.patch @@ -0,0 +1,258 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Cagney +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.3-gstack-20050411.patch + +;; Add a wrapper script to GDB that implements pstack using the +;; --readnever option. +;;=push + +2004-11-23 Andrew Cagney + + * Makefile.in (uninstall-gstack, install-gstack): New rules, add + to install and uninstall. + * gstack.sh, gstack.1: New files. + +diff --git a/gdb/Makefile.in b/gdb/Makefile.in +--- a/gdb/Makefile.in ++++ b/gdb/Makefile.in +@@ -2035,7 +2035,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force + install: all + @$(MAKE) $(FLAGS_TO_PASS) install-only + +-install-only: $(CONFIG_INSTALL) ++install-only: install-gstack $(CONFIG_INSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ +@@ -2085,7 +2085,25 @@ install-guile: + install-python: + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb + +-uninstall: force $(CONFIG_UNINSTALL) ++GSTACK=gstack ++.PHONY: install-gstack ++install-gstack: ++ transformed_name=`t='$(program_transform_name)'; \ ++ echo $(GSTACK) | sed -e "$$t"` ; \ ++ if test "x$$transformed_name" = x; then \ ++ transformed_name=$(GSTACK) ; \ ++ else \ ++ true ; \ ++ fi ; \ ++ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ ++ $(INSTALL_PROGRAM) $(srcdir)/$(GSTACK).sh \ ++ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ ++ : $(SHELL) $(srcdir)/../mkinstalldirs \ ++ $(DESTDIR)$(man1dir) ; \ ++ : $(INSTALL_DATA) $(srcdir)/gstack.1 \ ++ $(DESTDIR)$(man1dir)/$$transformed_name.1 ++ ++uninstall: force uninstall-gstack $(CONFIG_UNINSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ +@@ -2116,6 +2134,18 @@ uninstall: force $(CONFIG_UNINSTALL) + rm -f $(DESTDIR)$(bindir)/$$transformed_name + @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do + ++.PHONY: uninstall-gstack ++uninstall-gstack: ++ transformed_name=`t='$(program_transform_name)'; \ ++ echo $(GSTACK) | sed -e $$t` ; \ ++ if test "x$$transformed_name" = x; then \ ++ transformed_name=$(GSTACK) ; \ ++ else \ ++ true ; \ ++ fi ; \ ++ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ ++ $(DESTDIR)$(man1dir)/$$transformed_name.1 ++ + # The C++ name parser can be built standalone for testing. + test-cp-name-parser.o: cp-name-parser.c + $(COMPILE) -DTEST_CPNAMES cp-name-parser.c +diff --git a/gdb/gstack.sh b/gdb/gstack.sh +new file mode 100644 +--- /dev/null ++++ b/gdb/gstack.sh +@@ -0,0 +1,43 @@ ++#!/bin/sh ++ ++if test $# -ne 1; then ++ echo "Usage: `basename $0 .sh` " 1>&2 ++ exit 1 ++fi ++ ++if test ! -r /proc/$1; then ++ echo "Process $1 not found." 1>&2 ++ exit 1 ++fi ++ ++# GDB doesn't allow "thread apply all bt" when the process isn't ++# threaded; need to peek at the process to determine if that or the ++# simpler "bt" should be used. ++ ++backtrace="bt" ++if test -d /proc/$1/task ; then ++ # Newer kernel; has a task/ directory. ++ if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then ++ backtrace="thread apply all bt" ++ fi ++elif test -f /proc/$1/maps ; then ++ # Older kernel; go by it loading libpthread. ++ if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then ++ backtrace="thread apply all bt" ++ fi ++fi ++ ++GDB=${GDB:-gdb} ++ ++# Run GDB, strip out unwanted noise. ++# --readnever is no longer used since .gdb_index is now in use. ++$GDB --quiet -nx $GDBARGS /proc/$1/exe $1 <&1 | ++set width 0 ++set height 0 ++set pagination no ++$backtrace ++EOF ++/bin/sed -n \ ++ -e 's/^\((gdb) \)*//' \ ++ -e '/^#/p' \ ++ -e '/^Thread/p' +diff --git a/gdb/testsuite/gdb.base/gstack.c b/gdb/testsuite/gdb.base/gstack.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gstack.c +@@ -0,0 +1,43 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2005, 2007, 2008, 2009 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#include ++#include ++#include ++ ++void ++func (void) ++{ ++ const char msg[] = "looping\n"; ++ ++ /* Use the most simple notification not to get caught by attach on exiting ++ the function. */ ++ write (1, msg, strlen (msg)); ++ ++ for (;;); ++} ++ ++int ++main (void) ++{ ++ alarm (60); ++ nice (100); ++ ++ func (); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gstack.exp +@@ -0,0 +1,84 @@ ++# Copyright (C) 2012 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 . ++ ++set testfile gstack ++set executable ${testfile} ++set binfile [standard_output_file $executable] ++if {[build_executable ${testfile} ${executable} "" {debug}] == -1} { ++ return -1 ++} ++ ++set test "spawn inferior" ++set command "${binfile}" ++set res [remote_spawn host $command]; ++if { $res < 0 || $res == "" } { ++ perror "Spawning $command failed." ++ fail $test ++ return ++} ++ ++# The spawn id of the test inferior. ++set test_spawn_id $res ++ ++set use_gdb_stub 1 ++set pid [exp_pid -i $res] ++gdb_expect { ++ -re "looping\r\n" { ++ pass $test ++ } ++ eof { ++ fail "$test (eof)" ++ return ++ } ++ timeout { ++ fail "$test (timeout)" ++ return ++ } ++} ++ ++# Testcase uses the most simple notification not to get caught by attach on ++# exiting the function. Still we could retry the gstack command if we fail. ++ ++set test "spawn gstack" ++set command "sh -c GDB=$GDB\\ GDBARGS=-data-directory\\\\\\ $BUILD_DATA_DIRECTORY\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END" ++set res [remote_spawn host $command]; ++if { $res < 0 || $res == "" } { ++ perror "Spawning $command failed." ++ fail $test ++} ++ ++set gdb_spawn_id $res ++ ++gdb_test_multiple "" $test { ++ -re "^#0 +(0x\[0-9a-f\]+ in )?\\.?func \\(\\) at \[^\r\n\]*\r\n#1 +0x\[0-9a-f\]+ in \\.?main \\(\\) at \[^\r\n\]*\r\nGSTACK-END\r\n\$" { ++ pass $test ++ } ++} ++ ++gdb_test_multiple "" "gstack exits" { ++ eof { ++ set result [wait -i $gdb_spawn_id] ++ verbose $result ++ ++ gdb_assert { [lindex $result 2] == 0 } "gstack exits with no error" ++ gdb_assert { [lindex $result 3] == 0 } "gstack's exit status is 0" ++ ++ remote_close host ++ clear_gdb_spawn_id ++ } ++} ++ ++# Kill the test inferior. ++kill_wait_spawned_process $test_spawn_id diff --git a/SOURCES/gdb-6.3-mapping-zero-inode-test.patch b/SOURCES/gdb-6.3-mapping-zero-inode-test.patch new file mode 100644 index 0000000..32b62d5 --- /dev/null +++ b/SOURCES/gdb-6.3-mapping-zero-inode-test.patch @@ -0,0 +1,247 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.3-mapping-zero-inode-test.patch + +;; Test GCORE for shmid 0 shared memory mappings. +;;=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible. + +diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.c b/gdb/testsuite/gdb.base/gcore-shmid0.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcore-shmid0.c +@@ -0,0 +1,128 @@ ++/* Copyright 2007, 2009 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or (at ++ your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ ++ ++/* ++ * Test GDB's handling of gcore for mapping with a name but zero inode. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* The same test running in a parallel testsuite may steal us the zero SID, ++ even if we never get any EEXIST. Just try a while. */ ++ ++#define TIMEOUT_SEC 10 ++ ++static volatile int v; ++ ++static void ++initialized (void) ++{ ++ v++; ++} ++ ++static void ++unresolved (void) ++{ ++ v++; ++} ++ ++int ++main (void) ++{ ++ int sid; ++ unsigned int *addr = (void *) -1L; ++ int attempt, round = 0; ++ time_t ts_start, ts; ++ ++ if (time (&ts_start) == (time_t) -1) ++ { ++ printf ("time (): %m\n"); ++ exit (1); ++ } ++ ++ /* The generated SID will cycle with an increment of 32768, attempt until it ++ * wraps to 0. */ ++ ++ for (attempt = 0; addr == (void *) -1L; attempt++) ++ { ++ /* kernel-2.6.25-8.fc9.x86_64 just never returns the value 0 by ++ shmget(2). shmget returns SID range 0..1<<31 in steps of 32768, ++ 0x1000 should be enough but wrap the range it to be sure. */ ++ ++ if (attempt > 0x21000) ++ { ++ if (time (&ts) == (time_t) -1) ++ { ++ printf ("time (): %m\n"); ++ exit (1); ++ } ++ ++ if (ts >= ts_start && ts < ts_start + TIMEOUT_SEC) ++ { ++ attempt = 0; ++ round++; ++ continue; ++ } ++ ++ printf ("Problem is not reproducible on this kernel (attempt %d, " ++ "round %d)\n", attempt, round); ++ unresolved (); ++ exit (1); ++ } ++ ++ sid = shmget ((key_t) rand (), 0x1000, IPC_CREAT | IPC_EXCL | 0777); ++ if (sid == -1) ++ { ++ if (errno == EEXIST) ++ continue; ++ ++ printf ("shmget (%d, 0x1000, IPC_CREAT): errno %d\n", 0, errno); ++ exit (1); ++ } ++ ++ /* Use SID only if it is 0, retry it otherwise. */ ++ ++ if (sid == 0) ++ { ++ addr = shmat (sid, NULL, SHM_RND); ++ if (addr == (void *) -1L) ++ { ++ printf ("shmat (%d, NULL, SHM_RND): errno %d\n", sid, ++ errno); ++ exit (1); ++ } ++ } ++ if (shmctl (sid, IPC_RMID, NULL) != 0) ++ { ++ printf ("shmctl (%d, IPC_RMID, NULL): errno %d\n", sid, errno); ++ exit (1); ++ } ++ } ++ ++ initialized (); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.exp b/gdb/testsuite/gdb.base/gcore-shmid0.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcore-shmid0.exp +@@ -0,0 +1,101 @@ ++# Copyright 2007, 2009 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++# Test GDB's handling of gcore for mapping with a name but zero inode. ++ ++if { [prepare_for_testing gcore-shmid0.exp gcore-shmid0] } { ++ return -1 ++} ++ ++# Does this gdb support gcore? ++set test "help gcore" ++gdb_test_multiple $test $test { ++ -re "Undefined command: .gcore.*$gdb_prompt $" { ++ # gcore command not supported -- nothing to test here. ++ unsupported "gdb does not support gcore on this target" ++ return -1; ++ } ++ -re "Save a core file .*$gdb_prompt $" { ++ pass $test ++ } ++} ++ ++if { ! [ runto_main ] } then { ++ untested gcore-shmid0.exp ++ return -1 ++} ++ ++gdb_breakpoint "initialized" ++gdb_breakpoint "unresolved" ++ ++set oldtimeout $timeout ++set timeout [expr $oldtimeout + 120] ++ ++set test "Continue to initialized." ++gdb_test_multiple "continue" $test { ++ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" { ++ pass $test ++ } ++ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" { ++ set timeout $oldtimeout ++ unsupported $test ++ return -1 ++ } ++} ++set timeout $oldtimeout ++ ++set escapedfilename [string_to_regexp [standard_output_file gcore-shmid0.test]] ++ ++set test "save a corefile" ++gdb_test_multiple "gcore [standard_output_file gcore-shmid0.test]" $test { ++ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" { ++ pass $test ++ } ++ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" { ++ unsupported $test ++ } ++} ++ ++# Be sure to remove the handle first. ++# But it would get removed even on a kill by GDB as the handle is already ++# deleted, just it is still attached. ++gdb_continue_to_end "finish" ++ ++set test "core-file command" ++gdb_test_multiple "core-file [standard_output_file gcore-shmid0.test]" $test { ++ -re ".* program is being debugged already.*y or n. $" { ++ # gdb_load may connect us to a gdbserver. ++ send_gdb "y\n" ++ exp_continue; ++ } ++ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" { ++ # The filename does not fit there anyway so do not check it. ++ pass $test ++ } ++ -re ".*registers from core file: File in wrong format.* $" { ++ fail "core-file command (could not read registers from core file)" ++ } ++} ++ ++set test "backtrace" ++gdb_test_multiple "bt" $test { ++ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" { ++ pass $test ++ } ++ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" { ++ fail $test ++ } ++} diff --git a/SOURCES/gdb-6.3-rh-testversion-20041202.patch b/SOURCES/gdb-6.3-rh-testversion-20041202.patch new file mode 100644 index 0000000..59132bf --- /dev/null +++ b/SOURCES/gdb-6.3-rh-testversion-20041202.patch @@ -0,0 +1,34 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.3-rh-testversion-20041202.patch + +;; Check distro name is included in the version output. + +diff --git a/gdb/testsuite/gdb.base/fedora-version.exp b/gdb/testsuite/gdb.base/fedora-version.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/fedora-version.exp +@@ -0,0 +1,22 @@ ++# Copyright 2023 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 . ++ ++# Start with a fresh gdb ++clean_restart ++ ++# Check the version string contains either the Fedora or RHEL distro ++# name, and that the version number looks roughly correct in format. ++gdb_test "show version" \ ++ "GNU gdb \\((Fedora Linux|Red Hat Enterprise Linux)\\) \[0-9\]+\\.\[0-9\]+-\[0-9\]+.*" diff --git a/SOURCES/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/SOURCES/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch new file mode 100644 index 0000000..ab64f7f --- /dev/null +++ b/SOURCES/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -0,0 +1,265 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Jan Kratochvil +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch + +;; Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337). +;;=push+jan: It should be replaced by Infinity project. + +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337 + +2008-02-24 Jan Kratochvil + + Port to GDB-6.8pre. + +currently for trivial nonthreaded helloworld with no debug info up to -ggdb2 you +will get: + (gdb) p errno + [some error] + +* with -ggdb2 and less "errno" in fact does not exist anywhere as it was + compiled to "(*__errno_location ())" and the macro definition is not present. + Unfortunately gdb will find the TLS symbol and it will try to access it but + as the program has been compiled without -lpthread the TLS base register + (%gs on i386) is not setup and it will result in: + Cannot access memory at address 0x8 + +Attached suggestion patch how to deal with the most common "errno" symbol +for the most common under-ggdb3 compiled programs. + +Original patch hooked into target_translate_tls_address. But its inferior +call invalidates `struct frame *' in the callers - RH BZ 690908. + +https://bugzilla.redhat.com/show_bug.cgi?id=1166549 + +2007-11-03 Jan Kratochvil + + * ./gdb/dwarf2read.c (read_partial_die, dwarf2_linkage_name): Prefer + DW_AT_MIPS_linkage_name over DW_AT_name now only for non-C. + +glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug: + <81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location + <81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location + +diff --git a/gdb/printcmd.c b/gdb/printcmd.c +--- a/gdb/printcmd.c ++++ b/gdb/printcmd.c +@@ -1308,6 +1308,11 @@ process_print_command_args (const char *args, value_print_options *print_opts, + + if (exp != nullptr && *exp) + { ++ /* '*((int *(*) (void)) __errno_location) ()' is incompatible with ++ function descriptors. */ ++ if (target_has_execution () && strcmp (exp, "errno") == 0) ++ exp = "*(*(int *(*)(void)) __errno_location) ()"; ++ + /* This setting allows large arrays to be printed by limiting the + number of elements that are loaded into GDB's memory; we only + need to load as many array elements as we plan to print. */ +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.c b/gdb/testsuite/gdb.dwarf2/dw2-errno.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.c +@@ -0,0 +1,28 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2005, 2007 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 . ++ ++ Please email any bugs, comments, and/or additions to this file to: ++ bug-gdb@prep.ai.mit.edu */ ++ ++#include ++ ++int main() ++{ ++ errno = 42; ++ ++ return 0; /* breakpoint */ ++} +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp +@@ -0,0 +1,60 @@ ++# Copyright 2007 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 . ++ ++set testfile dw2-errno ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++ ++proc prep {} { ++ global srcdir subdir binfile ++ gdb_exit ++ gdb_start ++ gdb_reinitialize_dir $srcdir/$subdir ++ gdb_load ${binfile} ++ ++ runto_main ++ ++ gdb_breakpoint [gdb_get_line_number "breakpoint"] ++ gdb_continue_to_breakpoint "breakpoint" ++} ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++prep ++gdb_test "print errno" ".* = 42" "errno with macros=N threads=N" ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++prep ++gdb_test "print errno" ".* = 42" "errno with macros=Y threads=N" ++ ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } { ++ return -1 ++} ++prep ++gdb_test "print errno" ".* = 42" "errno with macros=N threads=Y" ++ ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } { ++ return -1 ++} ++prep ++gdb_test "print errno" ".* = 42" "errno with macros=Y threads=Y" ++ ++# TODO: Test the error on resolving ERRNO with only libc loaded. ++# Just how to find the current libc filename? +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.c b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c +@@ -0,0 +1,28 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2005, 2007 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 . ++ ++ Please email any bugs, comments, and/or additions to this file to: ++ bug-gdb@prep.ai.mit.edu */ ++ ++#include ++ ++int main() ++{ ++ errno = 42; ++ ++ return 0; /* breakpoint */ ++} +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp +@@ -0,0 +1,71 @@ ++# Copyright 2007 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 . ++ ++set testfile dw2-errno2 ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++ ++proc prep { message {do_xfail 0} } { with_test_prefix $message { ++ global srcdir subdir binfile variant ++ gdb_exit ++ gdb_start ++ gdb_reinitialize_dir $srcdir/$subdir ++ gdb_load ${binfile}${variant} ++ ++ runto_main ++ ++ gdb_breakpoint [gdb_get_line_number "breakpoint"] ++ gdb_continue_to_breakpoint "breakpoint" ++ ++ gdb_test "gcore ${binfile}${variant}.core" "\r\nSaved corefile .*" "gcore $variant" ++ ++ gdb_test "print errno" ".* = 42" ++ ++ gdb_test "kill" ".*" "kill" {Kill the program being debugged\? \(y or n\) } "y" ++ gdb_test "core-file ${binfile}${variant}.core" "\r\nCore was generated by .*" "core-file" ++ if $do_xfail { ++ setup_xfail "*-*-*" ++ } ++ gdb_test "print (int) errno" ".* = 42" "print errno for core" ++}} ++ ++set variant g2thrN ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++prep "macros=N threads=N" 1 ++ ++set variant g3thrN ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++prep "macros=Y threads=N" 1 ++ ++set variant g2thrY ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } { ++ return -1 ++} ++prep "macros=N threads=Y" ++ ++set variant g3thrY ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } { ++ return -1 ++} ++prep "macros=Y threads=Y" 1 ++ ++# TODO: Test the error on resolving ERRNO with only libc loaded. ++# Just how to find the current libc filename? diff --git a/SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch b/SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch new file mode 100644 index 0000000..db4229d --- /dev/null +++ b/SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch @@ -0,0 +1,107 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch + +;; Test sideeffects of skipping ppc .so libs trampolines (BZ 218379). +;;=fedoratest + +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379 + +diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.c b/gdb/testsuite/gdb.base/step-over-trampoline.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/step-over-trampoline.c +@@ -0,0 +1,28 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2006 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++ Please email any bugs, comments, and/or additions to this file to: ++ bug-gdb@prep.ai.mit.edu */ ++ ++#include ++ ++int main (void) ++{ ++ puts ("hello world"); ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.exp b/gdb/testsuite/gdb.base/step-over-trampoline.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/step-over-trampoline.exp +@@ -0,0 +1,59 @@ ++# Copyright 2006 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++if {[use_gdb_stub]} { ++ untested "skipping test because of use_gdb_stub" ++ return -1 ++} ++ ++if $tracelevel then { ++ strace $tracelevel ++} ++ ++set testfile step-over-trampoline ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++ ++# Get things started. ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load ${binfile} ++ ++# For C programs, "start" should stop in main(). ++ ++gdb_test "start" \ ++ "main \\(\\) at .*$srcfile.*" \ ++ "start" ++ ++# main () at hello2.c:5 ++# 5 puts("hello world\n"); ++# (gdb) next ++# 0x100007e0 in call___do_global_ctors_aux () ++ ++gdb_test_multiple "next" "invalid `next' output" { ++ -re "\nhello world.*return 0;.*" { ++ pass "stepped over" ++ } ++ -re " in call___do_global_ctors_aux \\(\\).*" { ++ fail "stepped into trampoline" ++ } ++} diff --git a/SOURCES/gdb-6.5-bz243845-stale-testing-zombie-test.patch b/SOURCES/gdb-6.5-bz243845-stale-testing-zombie-test.patch new file mode 100644 index 0000000..2d62949 --- /dev/null +++ b/SOURCES/gdb-6.5-bz243845-stale-testing-zombie-test.patch @@ -0,0 +1,89 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.5-bz243845-stale-testing-zombie-test.patch + +;; Test leftover zombie process (BZ 243845). +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.base/tracefork-zombie.exp b/gdb/testsuite/gdb.base/tracefork-zombie.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/tracefork-zombie.exp +@@ -0,0 +1,76 @@ ++# Copyright 2007 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ++ ++# are we on a target board ++if {[use_gdb_stub]} { ++ untested "skipping test because of use_gdb_stub" ++ return -1 ++} ++ ++# Start the program running and then wait for a bit, to be sure ++# that it can be attached to. ++ ++gdb_exit ++gdb_start ++gdb_load sleep ++ ++set gdb_pid [exp_pid -i [board_info host fileid]] ++set test "identified the child GDB" ++if {$gdb_pid != "" && $gdb_pid > 0} { ++ pass $test ++ verbose -log "Child GDB PID $gdb_pid" ++} else { ++ fail $test ++} ++ ++set testpid [eval exec sleep 10 &] ++exec sleep 2 ++ ++set test "attach" ++gdb_test_multiple "attach $testpid" "$test" { ++ -re "Attaching to program.*`?.*'?, process $testpid..*$gdb_prompt $" { ++ pass "$test" ++ } ++ -re "Attaching to program.*`?.*\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" { ++ # Response expected on Cygwin ++ pass "$test" ++ } ++} ++ ++# Some time to let GDB spawn its testing child. ++exec sleep 2 ++ ++set found none ++foreach procpid [glob -directory /proc -type d {[0-9]*}] { ++ if {[catch {open $procpid/status} statusfi]} { ++ continue ++ } ++ set status [read $statusfi] ++ close $statusfi ++ if {1 ++ && [regexp -line {^Name:\tgdb$} $status] ++ && [regexp -line {^PPid:\t1$} $status] ++ && [regexp -line "^TracerPid:\t$gdb_pid$" $status]} { ++ set found $procpid ++ verbose -log "Found linux_test_for_tracefork zombie PID $procpid" ++ } ++} ++set test "linux_test_for_tracefork leaves no zombie" ++if {$found eq {none}} { ++ pass $test ++} else { ++ fail $test ++} diff --git a/SOURCES/gdb-6.5-gcore-buffer-limit-test.patch b/SOURCES/gdb-6.5-gcore-buffer-limit-test.patch new file mode 100644 index 0000000..07ba1e9 --- /dev/null +++ b/SOURCES/gdb-6.5-gcore-buffer-limit-test.patch @@ -0,0 +1,154 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.5-gcore-buffer-limit-test.patch + +;; Test gcore memory and time requirements for large inferiors. +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.c b/gdb/testsuite/gdb.base/gcore-excessive-memory.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.c +@@ -0,0 +1,37 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2008 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++ Please email any bugs, comments, and/or additions to this file to: ++ bug-gdb@prep.ai.mit.edu */ ++ ++#include ++#include ++ ++#define MEGS 64 ++ ++int main() ++{ ++ void *mem; ++ ++ mem = malloc (MEGS * 1024ULL * 1024ULL); ++ ++ for (;;) ++ sleep (1); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.exp b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp +@@ -0,0 +1,99 @@ ++# Copyright 2008 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++if {[use_gdb_stub]} { ++ untested "skipping test because of use_gdb_stub" ++ return -1 ++} ++ ++set testfile gcore-excessive-memory ++set srcfile ${testfile}.c ++set shfile [standard_output_file ${testfile}-gdb.sh] ++set corefile [standard_output_file ${testfile}.core] ++set binfile [standard_output_file ${testfile}] ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++ ++set f [open "|getconf PAGESIZE" "r"] ++gets $f pagesize ++close $f ++ ++set pid_of_bin [eval exec $binfile &] ++sleep 2 ++ ++# Get things started. ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load ${binfile} ++ ++set pid_of_gdb [exp_pid -i [board_info host fileid]] ++ ++gdb_test "attach $pid_of_bin" "Attaching to .*" "attach" ++gdb_test "up 99" "in main .*" "verify we can get to main" ++ ++proc memory_v_pages_get {} { ++ global pid_of_gdb pagesize ++ set fd [open "/proc/$pid_of_gdb/statm"] ++ gets $fd line ++ close $fd ++ # number of pages of virtual memory ++ scan $line "%d" drs ++ return $drs ++} ++ ++set pages_found [memory_v_pages_get] ++ ++# It must be definitely less than `MEGS' of `gcore-excessive-memory.c'. ++set mb_gcore_reserve 4 ++verbose -log "pages_found = $pages_found, mb_gcore_reserve = $mb_gcore_reserve" ++set kb_found [expr $pages_found * $pagesize / 1024] ++set kb_permit [expr $kb_found + 1 * 1024 + $mb_gcore_reserve * 1024] ++verbose -log "kb_found = $kb_found, kb_permit = $kb_permit" ++ ++# Create the ulimit wrapper. ++set f [open $shfile "w"] ++puts $f "#! /bin/sh" ++puts $f "ulimit -v $kb_permit" ++puts $f "exec $GDB \"\$@\"" ++close $f ++remote_exec host "chmod +x $shfile" ++ ++gdb_exit ++set GDBold $GDB ++set GDB "$shfile" ++gdb_start ++set GDB $GDBold ++ ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load ${binfile} ++ ++set pid_of_gdb [exp_pid -i [board_info host fileid]] ++ ++gdb_test "attach $pid_of_bin" "Attaching to .*" "attach" ++gdb_test "up 99" "in main .*" "verify we can get to main" ++ ++verbose -log "kb_found before gcore = [expr [memory_v_pages_get] * $pagesize / 1024]" ++ ++gdb_test "gcore $corefile" "Saved corefile \[^\n\r\]*" "Save the core file" ++ ++verbose -log "kb_found after gcore = [expr [memory_v_pages_get] * $pagesize / 1024]" ++ ++# Cleanup. ++exec kill -9 $pid_of_bin diff --git a/SOURCES/gdb-6.5-section-num-fixup-test.patch b/SOURCES/gdb-6.5-section-num-fixup-test.patch new file mode 100644 index 0000000..2fa3995 --- /dev/null +++ b/SOURCES/gdb-6.5-section-num-fixup-test.patch @@ -0,0 +1,127 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.5-section-num-fixup-test.patch + +;; Test a crash on libraries missing the .text section. +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.base/datalib-lib.c b/gdb/testsuite/gdb.base/datalib-lib.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/datalib-lib.c +@@ -0,0 +1,22 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2008 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++ Please email any bugs, comments, and/or additions to this file to: ++ bug-gdb@prep.ai.mit.edu */ ++ ++int var; +diff --git a/gdb/testsuite/gdb.base/datalib-main.c b/gdb/testsuite/gdb.base/datalib-main.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/datalib-main.c +@@ -0,0 +1,26 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2008 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++ Please email any bugs, comments, and/or additions to this file to: ++ bug-gdb@prep.ai.mit.edu */ ++ ++int ++main (void) ++{ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/datalib.exp b/gdb/testsuite/gdb.base/datalib.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/datalib.exp +@@ -0,0 +1,56 @@ ++# Copyright 2008 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++if {[use_gdb_stub]} { ++ untested "skipping test because of use_gdb_stub" ++ return -1 ++} ++ ++set testfile datalib ++set srcfilemain ${testfile}-main.c ++set srcfilelib ${testfile}-lib.c ++set libfile [standard_output_file ${testfile}-lib.so] ++set binfile [standard_output_file ${testfile}-main] ++if { [gdb_compile "${srcdir}/${subdir}/${srcfilelib}" "${libfile}" executable [list debug {additional_flags=-shared -nostdlib}]] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++if { [gdb_compile "${srcdir}/${subdir}/${srcfilemain}" "${binfile} ${libfile}" executable {debug}] != "" } { ++ untested "Couldn't compile test program" ++ return -1 ++} ++ ++# Get things started. ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load ${binfile} ++ ++# We must use a separate library as the main executable is compiled to the ++# address 0 by default and it would get fixed up already at the end of ++# INIT_OBJFILE_SECT_INDICES. We also cannot PRELINK it as PRELINK is missing ++# on ia64. The library must be NOSTDLIB as otherwise some stub code would ++# create the `.text' section there. Also DEBUG option is useful as some of ++# the crashes occur in dwarf2read.c. ++ ++# FAIL case: ++# ../../gdb/ia64-tdep.c:2838: internal-error: sect_index_text not initialized ++# A problem internal to GDB has been detected, ++ ++gdb_test "start" \ ++ "main \\(\\) at .*${srcfilemain}.*" \ ++ "start" diff --git a/SOURCES/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch b/SOURCES/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch new file mode 100644 index 0000000..985cb6a --- /dev/null +++ b/SOURCES/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch @@ -0,0 +1,129 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: + gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch + +;; Fix 'gdb gives highly misleading error when debuginfo pkg is present, +;; but not corresponding binary pkg' (RH BZ 981154). +;;=push+jan + +Comments by Sergio Durigan Junior : + + This is the fix for RH BZ #981154 + + It is mainly a testcase addition, but a minor fix in the gdb/build-id.c + file was also needed. + + gdb/build-id.c was added by: + + commit dc294be54c96414035eed7d53dafdea0a6f31a72 + Author: Tom Tromey + Date: Tue Oct 8 19:56:15 2013 +0000 + + and had a little thinko there. The variable 'filename' needs to be set to + NULL after it is free'd, otherwise the code below thinks that it is still + valid and doesn't print the necessary warning ("Try: yum install ..."). + +diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp +@@ -0,0 +1,97 @@ ++# Copyright (C) 2014 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++standard_testfile "normal.c" ++ ++if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { ++ return -1 ++} ++ ++# Get the build-id of the file ++set build_id_debug_file [build_id_debug_filename_get $binfile] ++regsub -all ".debug$" $build_id_debug_file "" build_id_without_debug ++ ++# Run to main ++if { ![runto_main] } { ++ return -1 ++} ++ ++# We first need to generate a corefile ++set escapedfilename [string_to_regexp [standard_output_file gcore.test]] ++set core_supported 0 ++gdb_test_multiple "gcore [standard_output_file gcore.test]" \ ++ "save a corefile" \ ++{ ++ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" { ++ pass "save a corefile" ++ global core_supported ++ set core_supported 1 ++ } ++ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" { ++ unsupported "save a corefile" ++ global core_supported ++ set core_supported 0 ++ } ++} ++ ++if {!$core_supported} { ++ return -1 ++} ++ ++# Move the binfile to a temporary name ++remote_exec build "mv $binfile ${binfile}.old" ++ ++# Reinitialize GDB and see if we get a yum/dnf warning ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++ ++with_test_prefix "first run:" { ++ gdb_test "set build-id-verbose 1" "" \ ++ "set build-id-verbose" ++ ++ gdb_test "set debug-file-directory [file dirname [standard_output_file gcore.test]]" "" \ ++ "set debug-file-directory" ++ ++ gdb_test "core-file [standard_output_file gcore.test]" \ ++ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install [standard_output_file $build_id_without_debug]\r\n.*" \ ++ "test first yum/dnf warning" ++} ++ ++# Now we define and create our .build-id ++file mkdir [file dirname [standard_output_file ${build_id_without_debug}]] ++# Cannot use "file link" (from TCL) because it requires the target file to ++# exist. ++remote_exec build "ln -s $binfile [standard_output_file ${build_id_without_debug}]" ++ ++# Reinitialize GDB to get the second yum/dnf warning ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++ ++with_test_prefix "second run:" { ++ gdb_test "set build-id-verbose 1" "" \ ++ "set build-id-verbose" ++ ++ gdb_test "set debug-file-directory [file dirname [standard_output_file gcore.test]]" "" \ ++ "set debug-file-directory" ++ ++ gdb_test "core-file [standard_output_file gcore.test]" \ ++ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $binfile\r\n.*" \ ++ "test second yum/dnf warning" ++} ++ ++# Leaving the link there will cause breakage in the next run. ++remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]" diff --git a/SOURCES/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch b/SOURCES/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch new file mode 100644 index 0000000..2b862a0 --- /dev/null +++ b/SOURCES/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch @@ -0,0 +1,19 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch + +;; Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). +;;=push+jan + +diff --git a/gdb/proc-service.list b/gdb/proc-service.list +--- a/gdb/proc-service.list ++++ b/gdb/proc-service.list +@@ -37,4 +37,7 @@ + ps_pstop; + ps_ptread; + ps_ptwrite; ++ ++ /* gdb-6.6-buildid-locate-rpm.patch */ ++ rpmsqEnable; + }; diff --git a/SOURCES/gdb-6.6-buildid-locate-rpm.patch b/SOURCES/gdb-6.6-buildid-locate-rpm.patch new file mode 100644 index 0000000..f38fdd5 --- /dev/null +++ b/SOURCES/gdb-6.6-buildid-locate-rpm.patch @@ -0,0 +1,1084 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Kevin Buettner +Date: Wed, 22 Feb 2023 22:30:40 -0700 +Subject: gdb-6.6-buildid-locate-rpm.patch + +;;=push+jan + +diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4 +--- a/gdb/aclocal.m4 ++++ b/gdb/aclocal.m4 +@@ -11,7 +11,223 @@ + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A + # PARTICULAR PURPOSE. + ++# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- ++# serial 1 (pkg-config-0.24) ++# ++# Copyright © 2004 Scott James Remnant . ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that program. ++ ++# PKG_PROG_PKG_CONFIG([MIN-VERSION]) ++# ---------------------------------- ++AC_DEFUN([PKG_PROG_PKG_CONFIG], ++[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) ++m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) ++m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) ++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) ++AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) ++AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) ++ ++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then ++ AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) ++fi ++if test -n "$PKG_CONFIG"; then ++ _pkg_min_version=m4_default([$1], [0.9.0]) ++ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ AC_MSG_RESULT([yes]) ++ else ++ AC_MSG_RESULT([no]) ++ PKG_CONFIG="" ++ fi ++fi[]dnl ++])# PKG_PROG_PKG_CONFIG ++ ++# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) ++# ++# Check to see whether a particular set of modules exists. Similar ++# to PKG_CHECK_MODULES(), but does not set variables or print errors. ++# ++# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++# only at the first occurence in configure.ac, so if the first place ++# it's called might be skipped (such as if it is within an "if", you ++# have to call PKG_CHECK_EXISTS manually ++# -------------------------------------------------------------- ++AC_DEFUN([PKG_CHECK_EXISTS], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl ++if test -n "$PKG_CONFIG" && \ ++ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then ++ m4_default([$2], [:]) ++m4_ifvaln([$3], [else ++ $3])dnl ++fi]) ++ ++# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) ++# --------------------------------------------- ++m4_define([_PKG_CONFIG], ++[if test -n "$$1"; then ++ pkg_cv_[]$1="$$1" ++ elif test -n "$PKG_CONFIG"; then ++ PKG_CHECK_EXISTS([$3], ++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ], ++ [pkg_failed=yes]) ++ else ++ pkg_failed=untried ++fi[]dnl ++])# _PKG_CONFIG ++ ++# _PKG_SHORT_ERRORS_SUPPORTED ++# ----------------------------- ++AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi[]dnl ++])# _PKG_SHORT_ERRORS_SUPPORTED ++ ++ ++# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], ++# [ACTION-IF-NOT-FOUND]) ++# ++# ++# Note that if there is a possibility the first call to ++# PKG_CHECK_MODULES might not happen, you should be sure to include an ++# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac ++# ++# ++# -------------------------------------------------------------- ++AC_DEFUN([PKG_CHECK_MODULES], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl ++AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl ++AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl ++ ++pkg_failed=no ++AC_MSG_CHECKING([for $1]) ++ ++_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) ++_PKG_CONFIG([$1][_LIBS], [libs], [$2]) ++ ++m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS ++and $1[]_LIBS to avoid the need to call pkg-config. ++See the pkg-config man page for more details.]) ++ ++if test $pkg_failed = yes; then ++ AC_MSG_RESULT([no]) ++ _PKG_SHORT_ERRORS_SUPPORTED ++ if test $_pkg_short_errors_supported = yes; then ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` ++ else ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ++ ++ m4_default([$4], [AC_MSG_ERROR( ++[Package requirements ($2) were not met: ++ ++$$1_PKG_ERRORS ++ ++Consider adjusting the PKG_CONFIG_PATH environment variable if you ++installed software in a non-standard prefix. ++ ++_PKG_TEXT])[]dnl ++ ]) ++elif test $pkg_failed = untried; then ++ AC_MSG_RESULT([no]) ++ m4_default([$4], [AC_MSG_FAILURE( ++[The pkg-config script could not be found or is too old. Make sure it ++is in your PATH or set the PKG_CONFIG environment variable to the full ++path to pkg-config. ++ ++_PKG_TEXT ++ ++To get pkg-config, see .])[]dnl ++ ]) ++else ++ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS ++ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS ++ AC_MSG_RESULT([yes]) ++ $3 ++fi[]dnl ++])# PKG_CHECK_MODULES ++ ++ ++# PKG_INSTALLDIR(DIRECTORY) ++# ------------------------- ++# Substitutes the variable pkgconfigdir as the location where a module ++# should install pkg-config .pc files. By default the directory is ++# $libdir/pkgconfig, but the default can be changed by passing ++# DIRECTORY. The user can override through the --with-pkgconfigdir ++# parameter. ++AC_DEFUN([PKG_INSTALLDIR], ++[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) ++m4_pushdef([pkg_description], ++ [pkg-config installation directory @<:@]pkg_default[@:>@]) ++AC_ARG_WITH([pkgconfigdir], ++ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, ++ [with_pkgconfigdir=]pkg_default) ++AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) ++m4_popdef([pkg_default]) ++m4_popdef([pkg_description]) ++]) dnl PKG_INSTALLDIR ++ ++ ++# PKG_NOARCH_INSTALLDIR(DIRECTORY) ++# ------------------------- ++# Substitutes the variable noarch_pkgconfigdir as the location where a ++# module should install arch-independent pkg-config .pc files. By ++# default the directory is $datadir/pkgconfig, but the default can be ++# changed by passing DIRECTORY. The user can override through the ++# --with-noarch-pkgconfigdir parameter. ++AC_DEFUN([PKG_NOARCH_INSTALLDIR], ++[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) ++m4_pushdef([pkg_description], ++ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) ++AC_ARG_WITH([noarch-pkgconfigdir], ++ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, ++ [with_noarch_pkgconfigdir=]pkg_default) ++AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) ++m4_popdef([pkg_default]) ++m4_popdef([pkg_description]) ++]) dnl PKG_NOARCH_INSTALLDIR ++ ++ ++# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, ++# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) ++# ------------------------------------------- ++# Retrieves the value of the pkg-config variable for the given module. ++AC_DEFUN([PKG_CHECK_VAR], ++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl ++AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl ++ ++_PKG_CONFIG([$1], [variable="][$3]["], [$2]) ++AS_VAR_COPY([$1], [pkg_cv_][$1]) ++ ++AS_VAR_IF([$1], [""], [$5], [$4])dnl ++])# PKG_CHECK_VAR ++ + m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) ++ + # AM_AUX_DIR_EXPAND -*- Autoconf -*- + + # Copyright (C) 2001-2017 Free Software Foundation, Inc. +diff --git a/gdb/build-id.c b/gdb/build-id.c +--- a/gdb/build-id.c ++++ b/gdb/build-id.c +@@ -780,10 +780,10 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor) + static rpmts (*rpmtsCreate_p) (void); + extern rpmts rpmtsFree(rpmts ts); + static rpmts (*rpmtsFree_p) (rpmts ts); +- extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++ extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, + const void * keyp, size_t keylen); + static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts, +- rpmTag rpmtag, ++ rpmDbiTagVal rpmtag, + const void *keyp, + size_t keylen); + #else /* !DLOPEN_LIBRPM */ +@@ -838,7 +838,7 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor) + && (rpmdbNextIterator_p = (Header (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbNextIterator")) + && (rpmtsCreate_p = (rpmts (*) (void)) dlsym (h, "rpmtsCreate")) + && (rpmtsFree_p = (rpmts (*) (rpmts ts)) dlsym (h, "rpmtsFree")) +- && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator")))) ++ && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator")))) + { + warning (_("Opened library \"%s\" is incompatible (%s), " + "missing debuginfos notifications will not be displayed"), +@@ -926,7 +926,7 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor) + + /* RPMDBI_PACKAGES requires keylen == sizeof (int). */ + /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */ +- mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0); ++ mi_debuginfo = rpmtsInitIterator_p (ts, (rpmDbiTagVal) RPMDBI_LABEL, debuginfo, 0); + xfree (debuginfo); + if (mi_debuginfo) + { +diff --git a/gdb/config.in b/gdb/config.in +--- a/gdb/config.in ++++ b/gdb/config.in +@@ -42,6 +42,9 @@ + /* Handle .ctf type-info sections */ + #undef ENABLE_LIBCTF + ++/* librpm version specific library name to dlopen. */ ++#undef DLOPEN_LIBRPM ++ + /* Define to 1 if translation of program messages to the user's native + language is requested. */ + #undef ENABLE_NLS +@@ -265,6 +268,9 @@ + /* Define to 1 if you have the `m' library (-lm). */ + #undef HAVE_LIBM + ++/* Define if librpm library is being used. */ ++#undef HAVE_LIBRPM ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_LIBUNWIND_IA64_H + +diff --git a/gdb/configure b/gdb/configure +--- a/gdb/configure ++++ b/gdb/configure +@@ -778,6 +778,11 @@ AMD_DBGAPI_CFLAGS + ENABLE_BFD_64_BIT_FALSE + ENABLE_BFD_64_BIT_TRUE + subdirs ++RPM_LIBS ++RPM_CFLAGS ++PKG_CONFIG_LIBDIR ++PKG_CONFIG_PATH ++PKG_CONFIG + GDB_DATADIR + DEBUGDIR + MAKEINFO_EXTRA_FLAGS +@@ -911,6 +916,7 @@ with_gdb_datadir + with_relocated_sources + with_auto_load_dir + with_auto_load_safe_path ++with_rpm + enable_targets + enable_64_bit_bfd + with_amd_dbgapi +@@ -988,6 +994,8 @@ AMD_DBGAPI_CFLAGS + AMD_DBGAPI_LIBS + DEBUGINFOD_CFLAGS + DEBUGINFOD_LIBS ++RPM_CFLAGS ++RPM_LIBS + YACC + YFLAGS + ZSTD_CFLAGS +@@ -1679,6 +1687,8 @@ Optional Packages: + --with-amd-dbgapi support for the amd-dbgapi target (yes / no / auto) + --with-debuginfod Enable debuginfo lookups with debuginfod + (auto/yes/no) ++ --with-rpm query rpm database for missing debuginfos (yes/no, ++ def. auto=librpm.so) + --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets + --with-curses use the curses library instead of the termcap + library +@@ -1759,6 +1769,8 @@ Some influential environment variables: + C compiler flags for DEBUGINFOD, overriding pkg-config + DEBUGINFOD_LIBS + linker flags for DEBUGINFOD, overriding pkg-config ++ RPM_CFLAGS C compiler flags for RPM, overriding pkg-config ++ RPM_LIBS linker flags for RPM, overriding pkg-config + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. +@@ -18039,6 +18051,495 @@ _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 + $as_echo "$with_auto_load_safe_path" >&6; } + ++# Integration with rpm library to support missing debuginfo suggestions. ++# --without-rpm: Disable any rpm support. ++# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime. ++# Even with runtime missing `libname.so' GDB will still other run correctly. ++# Missing `libname.so' during ./configure will abort the configuration. ++# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific ++# minor version first such as `librpm-4.6.so' as minor version differences ++# mean API+ABI incompatibility. If the specific match versioned library name ++# could not be found still open dynamically at least `librpm.so'. ++# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try ++# to find librpm for compilation-time linking by pkg-config. GDB binary will ++# be probably linked with the version specific library (as `librpm-4.6.so'). ++# Failure to find librpm by pkg-config will abort the configuration. ++# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config ++# cannot find librpm use to the rpmless compilation (like `--without-rpm'). ++ ++ ++# Check whether --with-rpm was given. ++if test "${with_rpm+set}" = set; then : ++ withval=$with_rpm; ++else ++ with_rpm="auto" ++fi ++ ++ ++ ++ ++if test "x$with_rpm" != "xno"; then ++ if test "x$with_rpm" = "xyes"; then ++ LIBRPM="librpm.so" ++ RPM_REQUIRE=true ++ DLOPEN_REQUIRE=false ++ elif test "x$with_rpm" = "xauto"; then ++ LIBRPM="librpm.so" ++ RPM_REQUIRE=false ++ DLOPEN_REQUIRE=false ++ else ++ LIBRPM="$with_rpm" ++ RPM_REQUIRE=true ++ DLOPEN_REQUIRE=true ++ fi ++ LIBRPM_STRING='"'"$LIBRPM"'"' ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking specific librpm version" >&5 ++$as_echo_n "checking specific librpm version... " >&6; } ++ HAVE_DLOPEN_LIBRPM=false ++ save_LIBS="$LIBS" ++ LIBS="$LIBS -ldl" ++ if test "$cross_compiling" = yes; then : ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error "cannot run test program while cross compiling ++See \`config.log' for more details." "$LINENO" 5; } ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#include ++#include ++#include ++ ++int ++main () ++{ ++ ++ void *h; ++ const char *const *rpmverp; ++ FILE *f; ++ ++ f = fopen ("conftest.out", "w"); ++ if (!f) ++ { ++ fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out", ++ strerror (errno)); ++ return 1; ++ } ++ h = dlopen ($LIBRPM_STRING, RTLD_LAZY); ++ if (!h) ++ { ++ fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ()); ++ return 1; ++ } ++ rpmverp = dlsym (h, "RPMVERSION"); ++ if (!rpmverp) ++ { ++ fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ()); ++ return 1; ++ } ++ fprintf (stderr, "RPMVERSION is: \""); ++ fprintf (stderr, "%s\"\n", *rpmverp); ++ ++ /* Try to find the specific librpm version only for "librpm.so" as we do ++ not know how to assemble the version string otherwise. */ ++ ++ if (strcmp ("librpm.so", $LIBRPM_STRING) != 0) ++ { ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ else ++ { ++ char *h2_name; ++ void *h2; ++ int major, minor; ++ ++ if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2) ++ { ++ fprintf (stderr, "Unable to parse RPMVERSION.\n"); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ /* Avoid the square brackets by malloc. */ ++ h2_name = malloc (64); ++ sprintf (h2_name, "librpm-%d.%d.so", major, minor); ++ h2 = dlopen (h2_name, RTLD_LAZY); ++ if (!h2) ++ { ++ fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ()); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ if (h2 != h) ++ { ++ fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n", ++ $LIBRPM_STRING, h2_name); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ /* Found the valid .so name with a specific version. */ ++ fprintf (f, "%s\n", h2_name); ++ return 0; ++ } ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ ++ DLOPEN_LIBRPM="`cat conftest.out`" ++ if test "x$DLOPEN_LIBRPM" != "x"; then ++ HAVE_DLOPEN_LIBRPM=true ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLOPEN_LIBRPM" >&5 ++$as_echo "$DLOPEN_LIBRPM" >&6; } ++ fi ++ ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++ rm -f conftest.out ++ ++ ++ ++ if $HAVE_DLOPEN_LIBRPM; then ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking rpm library API compatibility" >&5 ++$as_echo_n "checking rpm library API compatibility... " >&6; } ++ # The compilation requires -Werror to verify anything. ++ save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Duplicate here the declarations to verify they match "elfread.c". */ ++#include ++#include ++#include ++#include ++extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); ++extern int rpmReadConfigFiles(const char * file, const char * target); ++extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); ++extern Header rpmdbNextIterator(rpmdbMatchIterator mi); ++extern rpmts rpmtsCreate(void); ++extern rpmts rpmtsFree(rpmts ts); ++extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, ++ const void * keyp, size_t keylen); ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++ LIBRPM_COMPAT=true ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++else ++ ++ LIBRPM_COMPAT=false ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS="$save_CFLAGS" ++ ++ if ! $LIBRPM_COMPAT; then ++ HAVE_DLOPEN_LIBRPM=false ++ fi ++ fi ++ ++ if $HAVE_DLOPEN_LIBRPM; then ++ DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"' ++ ++cat >>confdefs.h <<_ACEOF ++#define DLOPEN_LIBRPM $DLOPEN_LIBRPM_STRING ++_ACEOF ++ ++ ++$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ LIBS="$save_LIBS" ++ if $DLOPEN_REQUIRE; then ++ as_fn_error "Specific name $LIBRPM was requested but it could not be opened." "$LINENO" 5 ++ fi ++ ++ ++ ++ ++ ++ ++ ++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. ++set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $PKG_CONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++fi ++PKG_CONFIG=$ac_cv_path_PKG_CONFIG ++if test -n "$PKG_CONFIG"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 ++$as_echo "$PKG_CONFIG" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_path_PKG_CONFIG"; then ++ ac_pt_PKG_CONFIG=$PKG_CONFIG ++ # Extract the first word of "pkg-config", so it can be a program name with args. ++set dummy pkg-config; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $ac_pt_PKG_CONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++fi ++ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG ++if test -n "$ac_pt_PKG_CONFIG"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 ++$as_echo "$ac_pt_PKG_CONFIG" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_pt_PKG_CONFIG" = x; then ++ PKG_CONFIG="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ PKG_CONFIG=$ac_pt_PKG_CONFIG ++ fi ++else ++ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" ++fi ++ ++fi ++if test -n "$PKG_CONFIG"; then ++ _pkg_min_version=0.9.0 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 ++$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ PKG_CONFIG="" ++ fi ++fi ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPM" >&5 ++$as_echo_n "checking for RPM... " >&6; } ++ ++if test -n "$RPM_CFLAGS"; then ++ pkg_cv_RPM_CFLAGS="$RPM_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rpm\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "rpm") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_RPM_CFLAGS=`$PKG_CONFIG --cflags "rpm" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$RPM_LIBS"; then ++ pkg_cv_RPM_LIBS="$RPM_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rpm\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "rpm") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_RPM_LIBS=`$PKG_CONFIG --libs "rpm" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++ ++ ++ ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ RPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "rpm" 2>&1` ++ else ++ RPM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "rpm" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$RPM_PKG_ERRORS" >&5 ++ ++ HAVE_LIBRPM=false ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ HAVE_LIBRPM=false ++else ++ RPM_CFLAGS=$pkg_cv_RPM_CFLAGS ++ RPM_LIBS=$pkg_cv_RPM_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ HAVE_LIBRPM=true ++fi ++ ++ if $HAVE_LIBRPM; then ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking rpm library API compatibility" >&5 ++$as_echo_n "checking rpm library API compatibility... " >&6; } ++ # The compilation requires -Werror to verify anything. ++ save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Duplicate here the declarations to verify they match "elfread.c". */ ++#include ++#include ++#include ++#include ++extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); ++extern int rpmReadConfigFiles(const char * file, const char * target); ++extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); ++extern Header rpmdbNextIterator(rpmdbMatchIterator mi); ++extern rpmts rpmtsCreate(void); ++extern rpmts rpmtsFree(rpmts ts); ++extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, ++ const void * keyp, size_t keylen); ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++ LIBRPM_COMPAT=true ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ ++else ++ ++ LIBRPM_COMPAT=false ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS="$save_CFLAGS" ++ ++ if ! $LIBRPM_COMPAT; then ++ HAVE_LIBRPM=false ++ RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB" ++ fi ++ fi ++ ++ if $HAVE_LIBRPM; then ++ ++$as_echo "#define HAVE_LIBRPM 1" >>confdefs.h ++ ++ CFLAGS="$CFLAGS $RPM_CFLAGS" ++ LIBS="$LIBS $RPM_LIBS" ++ else ++ if $RPM_REQUIRE; then ++ as_fn_error "$RPM_PKG_ERRORS" "$LINENO" 5 ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $RPM_PKG_ERRORS" >&5 ++$as_echo "$as_me: WARNING: $RPM_PKG_ERRORS" >&2;} ++ fi ++ fi ++ fi ++fi ++ + + + subdirs="$subdirs testsuite" +diff --git a/gdb/configure.ac b/gdb/configure.ac +--- a/gdb/configure.ac ++++ b/gdb/configure.ac +@@ -173,6 +173,200 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir, + [Directories safe to hold auto-loaded files.]) + AC_MSG_RESULT([$with_auto_load_safe_path]) + ++# Integration with rpm library to support missing debuginfo suggestions. ++# --without-rpm: Disable any rpm support. ++# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime. ++# Even with runtime missing `libname.so' GDB will still other run correctly. ++# Missing `libname.so' during ./configure will abort the configuration. ++# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific ++# minor version first such as `librpm-4.6.so' as minor version differences ++# mean API+ABI incompatibility. If the specific match versioned library name ++# could not be found still open dynamically at least `librpm.so'. ++# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try ++# to find librpm for compilation-time linking by pkg-config. GDB binary will ++# be probably linked with the version specific library (as `librpm-4.6.so'). ++# Failure to find librpm by pkg-config will abort the configuration. ++# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config ++# cannot find librpm use to the rpmless compilation (like `--without-rpm'). ++ ++AC_ARG_WITH([rpm], ++ [AS_HELP_STRING([--with-rpm], ++ [query rpm database for missing debuginfos (yes/no, def. auto=librpm.so)])], [], [with_rpm="auto"]) ++ ++m4_pattern_allow([^AC_MSG_ERROR$]) ++m4_pattern_allow([^AC_MSG_WARN$]) ++if test "x$with_rpm" != "xno"; then ++ if test "x$with_rpm" = "xyes"; then ++ LIBRPM="librpm.so" ++ RPM_REQUIRE=true ++ DLOPEN_REQUIRE=false ++ elif test "x$with_rpm" = "xauto"; then ++ LIBRPM="librpm.so" ++ RPM_REQUIRE=false ++ DLOPEN_REQUIRE=false ++ else ++ LIBRPM="$with_rpm" ++ RPM_REQUIRE=true ++ DLOPEN_REQUIRE=true ++ fi ++ LIBRPM_STRING='"'"$LIBRPM"'"' ++ ++ AC_MSG_CHECKING([specific librpm version]) ++ HAVE_DLOPEN_LIBRPM=false ++ save_LIBS="$LIBS" ++ LIBS="$LIBS -ldl" ++ AC_RUN_IFELSE(AC_LANG_PROGRAM([[ ++#include ++#include ++#include ++#include ++ ]], [[ ++ void *h; ++ const char *const *rpmverp; ++ FILE *f; ++ ++ f = fopen ("conftest.out", "w"); ++ if (!f) ++ { ++ fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out", ++ strerror (errno)); ++ return 1; ++ } ++ h = dlopen ($LIBRPM_STRING, RTLD_LAZY); ++ if (!h) ++ { ++ fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ()); ++ return 1; ++ } ++ rpmverp = dlsym (h, "RPMVERSION"); ++ if (!rpmverp) ++ { ++ fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ()); ++ return 1; ++ } ++ fprintf (stderr, "RPMVERSION is: \""); ++ fprintf (stderr, "%s\"\n", *rpmverp); ++ ++ /* Try to find the specific librpm version only for "librpm.so" as we do ++ not know how to assemble the version string otherwise. */ ++ ++ if (strcmp ("librpm.so", $LIBRPM_STRING) != 0) ++ { ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ else ++ { ++ char *h2_name; ++ void *h2; ++ int major, minor; ++ ++ if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2) ++ { ++ fprintf (stderr, "Unable to parse RPMVERSION.\n"); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ /* Avoid the square brackets by malloc. */ ++ h2_name = malloc (64); ++ sprintf (h2_name, "librpm-%d.%d.so", major, minor); ++ h2 = dlopen (h2_name, RTLD_LAZY); ++ if (!h2) ++ { ++ fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ()); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ if (h2 != h) ++ { ++ fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n", ++ $LIBRPM_STRING, h2_name); ++ fprintf (f, "%s\n", $LIBRPM_STRING); ++ return 0; ++ } ++ /* Found the valid .so name with a specific version. */ ++ fprintf (f, "%s\n", h2_name); ++ return 0; ++ } ++ ]]), [ ++ DLOPEN_LIBRPM="`cat conftest.out`" ++ if test "x$DLOPEN_LIBRPM" != "x"; then ++ HAVE_DLOPEN_LIBRPM=true ++ AC_MSG_RESULT($DLOPEN_LIBRPM) ++ fi ++ ]) ++ rm -f conftest.out ++ ++ m4_define([CHECK_LIBRPM_COMPAT], [ ++ AC_MSG_CHECKING([rpm library API compatibility]) ++ # The compilation requires -Werror to verify anything. ++ save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror" ++ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ ++/* Duplicate here the declarations to verify they match "elfread.c". */ ++#include ++#include ++#include ++#include ++extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); ++extern int rpmReadConfigFiles(const char * file, const char * target); ++extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); ++extern Header rpmdbNextIterator(rpmdbMatchIterator mi); ++extern rpmts rpmtsCreate(void); ++extern rpmts rpmtsFree(rpmts ts); ++extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, ++ const void * keyp, size_t keylen); ++ ]]), [ ++ LIBRPM_COMPAT=true ++ AC_MSG_RESULT(yes) ++ ], [ ++ LIBRPM_COMPAT=false ++ AC_MSG_RESULT(no) ++ ]) ++ CFLAGS="$save_CFLAGS" ++ ]) ++ ++ if $HAVE_DLOPEN_LIBRPM; then ++ CHECK_LIBRPM_COMPAT ++ if ! $LIBRPM_COMPAT; then ++ HAVE_DLOPEN_LIBRPM=false ++ fi ++ fi ++ ++ if $HAVE_DLOPEN_LIBRPM; then ++ DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"' ++ AC_DEFINE_UNQUOTED(DLOPEN_LIBRPM, $DLOPEN_LIBRPM_STRING, [librpm version specific library name to dlopen.]) ++ AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.]) ++ else ++ AC_MSG_RESULT(no) ++ LIBS="$save_LIBS" ++ if $DLOPEN_REQUIRE; then ++ AC_MSG_ERROR([Specific name $LIBRPM was requested but it could not be opened.]) ++ fi ++ PKG_CHECK_MODULES(RPM, rpm, [HAVE_LIBRPM=true], [HAVE_LIBRPM=false]) ++ ++ if $HAVE_LIBRPM; then ++ CHECK_LIBRPM_COMPAT ++ if ! $LIBRPM_COMPAT; then ++ HAVE_LIBRPM=false ++ RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB" ++ fi ++ fi ++ ++ if $HAVE_LIBRPM; then ++ AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.]) ++ CFLAGS="$CFLAGS $RPM_CFLAGS" ++ LIBS="$LIBS $RPM_LIBS" ++ else ++ if $RPM_REQUIRE; then ++ AC_MSG_ERROR($RPM_PKG_ERRORS) ++ else ++ AC_MSG_WARN($RPM_PKG_ERRORS) ++ fi ++ fi ++ fi ++fi ++ + AC_CONFIG_SUBDIRS(testsuite) + + # Check whether to support alternative target configurations +diff --git a/gdb/event-top.c b/gdb/event-top.c +--- a/gdb/event-top.c ++++ b/gdb/event-top.c +@@ -43,6 +43,7 @@ + #include "async-event.h" + #include "bt-utils.h" + #include "pager.h" ++#include "symfile.h" + + /* readline include files. */ + #include "readline/readline.h" +@@ -404,6 +405,8 @@ display_gdb_prompt (const char *new_prompt) + /* Reset the nesting depth used when trace-commands is set. */ + reset_command_nest_depth (); + ++ debug_flush_missing (); ++ + /* Do not call the python hook on an explicit prompt change as + passed to this function, as this forms a secondary/local prompt, + IE, displayed but not set. */ +@@ -788,7 +791,10 @@ command_line_handler (gdb::unique_xmalloc_ptr &&rl) + command_handler (cmd); + + if (ui->prompt_state != PROMPTED) +- display_gdb_prompt (0); ++ { ++ debug_flush_missing (); ++ display_gdb_prompt (0); ++ } + } + } + +diff --git a/gdb/symfile.h b/gdb/symfile.h +--- a/gdb/symfile.h ++++ b/gdb/symfile.h +@@ -367,6 +367,7 @@ extern void generic_load (const char *args, int from_tty); + /* build-id support. */ + extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr); + extern void debug_print_missing (const char *binary, const char *debug); ++extern void debug_flush_missing (void); + #define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file") + + /* From minidebug.c. */ diff --git a/SOURCES/gdb-6.6-buildid-locate-solib-missing-ids.patch b/SOURCES/gdb-6.6-buildid-locate-solib-missing-ids.patch new file mode 100644 index 0000000..e9ec7b5 --- /dev/null +++ b/SOURCES/gdb-6.6-buildid-locate-solib-missing-ids.patch @@ -0,0 +1,238 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.6-buildid-locate-solib-missing-ids.patch + +;; Fix loading of core files without build-ids but with build-ids in executables. +;; Load strictly build-id-checked core files only if no executable is specified +;; (Jan Kratochvil, RH BZ 1339862). +;;=push+jan + +gdb returns an incorrect back trace when applying a debuginfo +https://bugzilla.redhat.com/show_bug.cgi?id=1339862 + +diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c +--- a/gdb/solib-svr4.c ++++ b/gdb/solib-svr4.c +@@ -1320,14 +1320,28 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, + } + + { +- struct bfd_build_id *build_id; ++ struct bfd_build_id *build_id = NULL; + + strncpy (newobj->so_original_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1); + newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; + /* May get overwritten below. */ + strcpy (newobj->so_name, newobj->so_original_name); + +- build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld); ++ /* In the case the main executable was found according to its build-id ++ (from a core file) prevent loading a different build of a library ++ with accidentally the same SO_NAME. ++ ++ It suppresses bogus backtraces (and prints "??" there instead) if ++ the on-disk files no longer match the running program version. ++ ++ If the main executable was not loaded according to its build-id do ++ not do any build-id checking of the libraries. There may be missing ++ build-ids dumped in the core file and we would map all the libraries ++ to the only existing file loaded that time - the executable. */ ++ if (current_program_space->symfile_object_file != NULL ++ && (current_program_space->symfile_object_file->flags ++ & OBJF_BUILD_ID_CORE_LOADED) != 0) ++ build_id = build_id_addr_get (li->l_ld); + if (build_id != NULL) + { + char *name, *build_id_filename; +@@ -1342,23 +1356,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, + xfree (name); + } + else +- { +- debug_print_missing (newobj->so_name, build_id_filename); +- +- /* In the case the main executable was found according to +- its build-id (from a core file) prevent loading +- a different build of a library with accidentally the +- same SO_NAME. +- +- It suppresses bogus backtraces (and prints "??" there +- instead) if the on-disk files no longer match the +- running program version. */ +- +- if (current_program_space->symfile_object_file != NULL +- && (current_program_space->symfile_object_file->flags +- & OBJF_BUILD_ID_CORE_LOADED) != 0) +- newobj->so_name[0] = 0; +- } ++ debug_print_missing (newobj->so_name, build_id_filename); + + xfree (build_id_filename); + xfree (build_id); +diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c +@@ -0,0 +1,21 @@ ++/* Copyright 2010 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 . */ ++ ++void ++lib (void) ++{ ++} +diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c +@@ -0,0 +1,25 @@ ++/* Copyright 2010 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 . */ ++ ++extern void lib (void); ++ ++int ++main (void) ++{ ++ lib (); ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp +@@ -0,0 +1,105 @@ ++# Copyright 2016 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++if {[skip_shlib_tests]} { ++ return 0 ++} ++ ++set testfile "gcore-buildid-exec-but-not-solib" ++set srcmainfile ${testfile}-main.c ++set srclibfile ${testfile}-lib.c ++set libfile [standard_output_file ${testfile}-lib.so] ++set objfile [standard_output_file ${testfile}-main.o] ++set executable ${testfile}-main ++set binfile [standard_output_file ${executable}] ++set gcorefile [standard_output_file ${executable}.gcore] ++set outdir [file dirname $binfile] ++ ++if { [gdb_compile_shlib ${srcdir}/${subdir}/${srclibfile} ${libfile} "debug additional_flags=-Wl,--build-id"] != "" ++ || [gdb_compile ${srcdir}/${subdir}/${srcmainfile} ${objfile} object {debug}] != "" } { ++ unsupported "-Wl,--build-id compilation failed" ++ return -1 ++} ++set opts [list debug shlib=${libfile} "additional_flags=-Wl,--build-id"] ++if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } { ++ unsupported "-Wl,--build-id compilation failed" ++ return -1 ++} ++ ++clean_restart $executable ++gdb_load_shlib $libfile ++ ++# Does this gdb support gcore? ++set test "help gcore" ++gdb_test_multiple $test $test { ++ -re "Undefined command: .gcore.*\r\n$gdb_prompt $" { ++ # gcore command not supported -- nothing to test here. ++ unsupported "gdb does not support gcore on this target" ++ return -1; ++ } ++ -re "Save a core file .*\r\n$gdb_prompt $" { ++ pass $test ++ } ++} ++ ++if { ![runto lib] } then { ++ return -1 ++} ++ ++set escapedfilename [string_to_regexp ${gcorefile}] ++ ++set test "save a corefile" ++gdb_test_multiple "gcore ${gcorefile}" $test { ++ -re "Saved corefile ${escapedfilename}\r\n$gdb_prompt $" { ++ pass $test ++ } ++ -re "Can't create a corefile\r\n$gdb_prompt $" { ++ unsupported $test ++ return -1 ++ } ++} ++ ++# Now restart gdb and load the corefile. ++ ++clean_restart $executable ++gdb_load_shlib $libfile ++ ++set buildid [build_id_debug_filename_get $libfile] ++ ++regsub {\.debug$} $buildid {} buildid ++ ++set debugdir [standard_output_file ${testfile}-debugdir] ++file delete -force -- $debugdir ++ ++file mkdir $debugdir/[file dirname $libfile] ++file copy $libfile $debugdir/${libfile} ++ ++file mkdir $debugdir/[file dirname $buildid] ++file copy $libfile $debugdir/${buildid} ++ ++remote_exec build "ln -s /lib ${debugdir}/" ++remote_exec build "ln -s /lib64 ${debugdir}/" ++# /usr is not needed, all the libs are in /lib64: libm.so.6 libc.so.6 ld-linux-x86-64.so.2 ++ ++gdb_test "set solib-absolute-prefix $debugdir" ++ ++gdb_test_no_output "set debug-file-directory $debugdir" "set debug-file-directory" ++ ++gdb_test "core ${gcorefile}" "Core was generated by .*" "re-load generated corefile" ++ ++gdb_test "frame" "#0 \[^\r\n\]* lib .*" "library got loaded" ++ ++gdb_test "bt" ++gdb_test "info shared" diff --git a/SOURCES/gdb-6.6-buildid-locate.patch b/SOURCES/gdb-6.6-buildid-locate.patch new file mode 100644 index 0000000..1350051 --- /dev/null +++ b/SOURCES/gdb-6.6-buildid-locate.patch @@ -0,0 +1,1925 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.6-buildid-locate.patch + +;; New locating of the matching binaries from the pure core file (build-id). +;;=push+jan + +diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h +--- a/bfd/libbfd-in.h ++++ b/bfd/libbfd-in.h +@@ -110,7 +110,7 @@ static inline char * + bfd_strdup (const char *str) + { + size_t len = strlen (str) + 1; +- char *buf = bfd_malloc (len); ++ char *buf = (char *) bfd_malloc (len); + if (buf != NULL) + memcpy (buf, str, len); + return buf; +diff --git a/bfd/libbfd.h b/bfd/libbfd.h +--- a/bfd/libbfd.h ++++ b/bfd/libbfd.h +@@ -116,7 +116,7 @@ static inline char * + bfd_strdup (const char *str) + { + size_t len = strlen (str) + 1; +- char *buf = bfd_malloc (len); ++ char *buf = (char *) bfd_malloc (len); + if (buf != NULL) + memcpy (buf, str, len); + return buf; +diff --git a/gdb/build-id.c b/gdb/build-id.c +--- a/gdb/build-id.c ++++ b/gdb/build-id.c +@@ -24,14 +24,72 @@ + #include "gdbsupport/gdb_vecs.h" + #include "symfile.h" + #include "objfiles.h" ++#include ++#include "elf-bfd.h" ++#include "elf/common.h" ++#include "elf/external.h" ++#include "elf/internal.h" + #include "filenames.h" ++#include "gdb_bfd.h" ++#include "gdbcmd.h" + #include "gdbcore.h" + #include "cli/cli-style.h" ++#include "inferior.h" ++#include "objfiles.h" ++#include "observable.h" ++#include "symfile.h" ++ ++#define BUILD_ID_VERBOSE_NONE 0 ++#define BUILD_ID_VERBOSE_FILENAMES 1 ++#define BUILD_ID_VERBOSE_BINARY_PARSE 2 ++static int build_id_verbose = BUILD_ID_VERBOSE_FILENAMES; ++static void ++show_build_id_verbose (struct ui_file *file, int from_tty, ++ struct cmd_list_element *c, const char *value) ++{ ++ gdb_printf (file, _("Verbosity level of the build-id locator is %s.\n"), ++ value); ++} ++/* Locate NT_GNU_BUILD_ID and return its matching debug filename. ++ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */ ++ ++static struct bfd_build_id * ++build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size) ++{ ++ bfd_byte *p; ++ ++ p = buf; ++ while (p < buf + size) ++ { ++ /* FIXME: bad alignment assumption. */ ++ Elf_External_Note *xnp = (Elf_External_Note *) p; ++ size_t namesz = H_GET_32 (templ, xnp->namesz); ++ size_t descsz = H_GET_32 (templ, xnp->descsz); ++ bfd_byte *descdata = (gdb_byte *) xnp->name + BFD_ALIGN (namesz, 4); ++ ++ if (H_GET_32 (templ, xnp->type) == NT_GNU_BUILD_ID ++ && namesz == sizeof "GNU" ++ && memcmp (xnp->name, "GNU", sizeof "GNU") == 0) ++ { ++ size_t sz = descsz; ++ gdb_byte *data = (gdb_byte *) descdata; ++ struct bfd_build_id *retval; ++ ++ retval = (struct bfd_build_id *) xmalloc (sizeof *retval - 1 + sz); ++ retval->size = sz; ++ memcpy (retval->data, data, sz); ++ ++ return retval; ++ } ++ p = descdata + BFD_ALIGN (descsz, 4); ++ } ++ return NULL; ++} + + /* See build-id.h. */ + + const struct bfd_build_id * +-build_id_bfd_get (bfd *abfd) ++build_id_bfd_shdr_get (bfd *abfd) + { + /* Dynamic objfiles such as ones created by JIT reader API + have no underlying bfd structure (that is, objfile->obfd +@@ -50,6 +108,348 @@ build_id_bfd_get (bfd *abfd) + return NULL; + } + ++/* Core files may have missing (corrupt) SHDR but PDHR is correct there. ++ bfd_elf_bfd_from_remote_memory () has too much overhead by ++ allocating/reading all the available ELF PT_LOADs. */ ++ ++static struct bfd_build_id * ++build_id_phdr_get (bfd *templ, bfd_vma loadbase, unsigned e_phnum, ++ Elf_Internal_Phdr *i_phdr) ++{ ++ int i; ++ struct bfd_build_id *retval = NULL; ++ ++ for (i = 0; i < e_phnum; i++) ++ if (i_phdr[i].p_type == PT_NOTE && i_phdr[i].p_filesz > 0) ++ { ++ Elf_Internal_Phdr *hdr = &i_phdr[i]; ++ gdb_byte *buf; ++ int err; ++ ++ buf = (gdb_byte *) xmalloc (hdr->p_filesz); ++ err = target_read_memory (loadbase + i_phdr[i].p_vaddr, buf, ++ hdr->p_filesz); ++ if (err == 0) ++ retval = build_id_buf_get (templ, buf, hdr->p_filesz); ++ else ++ retval = NULL; ++ xfree (buf); ++ if (retval != NULL) ++ break; ++ } ++ return retval; ++} ++ ++/* First we validate the file by reading in the ELF header and checking ++ the magic number. */ ++ ++static inline bfd_boolean ++elf_file_p (Elf64_External_Ehdr *x_ehdrp64) ++{ ++ gdb_assert (sizeof (Elf64_External_Ehdr) >= sizeof (Elf32_External_Ehdr)); ++ gdb_assert (offsetof (Elf64_External_Ehdr, e_ident) ++ == offsetof (Elf32_External_Ehdr, e_ident)); ++ gdb_assert (sizeof (((Elf64_External_Ehdr *) 0)->e_ident) ++ == sizeof (((Elf32_External_Ehdr *) 0)->e_ident)); ++ ++ return ((x_ehdrp64->e_ident[EI_MAG0] == ELFMAG0) ++ && (x_ehdrp64->e_ident[EI_MAG1] == ELFMAG1) ++ && (x_ehdrp64->e_ident[EI_MAG2] == ELFMAG2) ++ && (x_ehdrp64->e_ident[EI_MAG3] == ELFMAG3)); ++} ++ ++/* Translate an ELF file header in external format into an ELF file header in ++ internal format. */ ++ ++#define H_GET_WORD(bfd, ptr) (is64 ? H_GET_64 (bfd, (ptr)) \ ++ : H_GET_32 (bfd, (ptr))) ++#define H_GET_SIGNED_WORD(bfd, ptr) (is64 ? H_GET_S64 (bfd, (ptr)) \ ++ : H_GET_S32 (bfd, (ptr))) ++ ++static void ++elf_swap_ehdr_in (bfd *abfd, ++ const Elf64_External_Ehdr *src64, ++ Elf_Internal_Ehdr *dst) ++{ ++ int is64 = bfd_get_arch_size (abfd) == 64; ++#define SRC(field) (is64 ? src64->field \ ++ : ((const Elf32_External_Ehdr *) src64)->field) ++ ++ int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma; ++ memcpy (dst->e_ident, SRC (e_ident), EI_NIDENT); ++ dst->e_type = H_GET_16 (abfd, SRC (e_type)); ++ dst->e_machine = H_GET_16 (abfd, SRC (e_machine)); ++ dst->e_version = H_GET_32 (abfd, SRC (e_version)); ++ if (signed_vma) ++ dst->e_entry = H_GET_SIGNED_WORD (abfd, SRC (e_entry)); ++ else ++ dst->e_entry = H_GET_WORD (abfd, SRC (e_entry)); ++ dst->e_phoff = H_GET_WORD (abfd, SRC (e_phoff)); ++ dst->e_shoff = H_GET_WORD (abfd, SRC (e_shoff)); ++ dst->e_flags = H_GET_32 (abfd, SRC (e_flags)); ++ dst->e_ehsize = H_GET_16 (abfd, SRC (e_ehsize)); ++ dst->e_phentsize = H_GET_16 (abfd, SRC (e_phentsize)); ++ dst->e_phnum = H_GET_16 (abfd, SRC (e_phnum)); ++ dst->e_shentsize = H_GET_16 (abfd, SRC (e_shentsize)); ++ dst->e_shnum = H_GET_16 (abfd, SRC (e_shnum)); ++ dst->e_shstrndx = H_GET_16 (abfd, SRC (e_shstrndx)); ++ ++#undef SRC ++} ++ ++/* Translate an ELF program header table entry in external format into an ++ ELF program header table entry in internal format. */ ++ ++static void ++elf_swap_phdr_in (bfd *abfd, ++ const Elf64_External_Phdr *src64, ++ Elf_Internal_Phdr *dst) ++{ ++ int is64 = bfd_get_arch_size (abfd) == 64; ++#define SRC(field) (is64 ? src64->field \ ++ : ((const Elf32_External_Phdr *) src64)->field) ++ ++ int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma; ++ ++ dst->p_type = H_GET_32 (abfd, SRC (p_type)); ++ dst->p_flags = H_GET_32 (abfd, SRC (p_flags)); ++ dst->p_offset = H_GET_WORD (abfd, SRC (p_offset)); ++ if (signed_vma) ++ { ++ dst->p_vaddr = H_GET_SIGNED_WORD (abfd, SRC (p_vaddr)); ++ dst->p_paddr = H_GET_SIGNED_WORD (abfd, SRC (p_paddr)); ++ } ++ else ++ { ++ dst->p_vaddr = H_GET_WORD (abfd, SRC (p_vaddr)); ++ dst->p_paddr = H_GET_WORD (abfd, SRC (p_paddr)); ++ } ++ dst->p_filesz = H_GET_WORD (abfd, SRC (p_filesz)); ++ dst->p_memsz = H_GET_WORD (abfd, SRC (p_memsz)); ++ dst->p_align = H_GET_WORD (abfd, SRC (p_align)); ++ ++#undef SRC ++} ++ ++#undef H_GET_SIGNED_WORD ++#undef H_GET_WORD ++ ++static Elf_Internal_Phdr * ++elf_get_phdr (bfd *templ, bfd_vma ehdr_vma, unsigned *e_phnum_pointer, ++ bfd_vma *loadbase_pointer) ++{ ++ /* sizeof (Elf64_External_Ehdr) >= sizeof (Elf32_External_Ehdr) */ ++ Elf64_External_Ehdr x_ehdr64; /* Elf file header, external form */ ++ Elf_Internal_Ehdr i_ehdr; /* Elf file header, internal form */ ++ bfd_size_type x_phdrs_size; ++ gdb_byte *x_phdrs_ptr; ++ Elf_Internal_Phdr *i_phdrs; ++ int err; ++ unsigned int i; ++ bfd_vma loadbase; ++ int loadbase_set; ++ ++ gdb_assert (templ != NULL); ++ gdb_assert (sizeof (Elf64_External_Ehdr) >= sizeof (Elf32_External_Ehdr)); ++ ++ /* Read in the ELF header in external format. */ ++ err = target_read_memory (ehdr_vma, (bfd_byte *) &x_ehdr64, sizeof x_ehdr64); ++ if (err) ++ { ++ if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE) ++ warning (_("build-id: Error reading ELF header at address 0x%lx"), ++ (unsigned long) ehdr_vma); ++ return NULL; ++ } ++ ++ /* Now check to see if we have a valid ELF file, and one that BFD can ++ make use of. The magic number must match, the address size ('class') ++ and byte-swapping must match our XVEC entry. */ ++ ++ if (! elf_file_p (&x_ehdr64) ++ || x_ehdr64.e_ident[EI_VERSION] != EV_CURRENT ++ || !((bfd_get_arch_size (templ) == 64 ++ && x_ehdr64.e_ident[EI_CLASS] == ELFCLASS64) ++ || (bfd_get_arch_size (templ) == 32 ++ && x_ehdr64.e_ident[EI_CLASS] == ELFCLASS32))) ++ { ++ if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE) ++ warning (_("build-id: Unrecognized ELF header at address 0x%lx"), ++ (unsigned long) ehdr_vma); ++ return NULL; ++ } ++ ++ /* Check that file's byte order matches xvec's */ ++ switch (x_ehdr64.e_ident[EI_DATA]) ++ { ++ case ELFDATA2MSB: /* Big-endian */ ++ if (! bfd_header_big_endian (templ)) ++ { ++ if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE) ++ warning (_("build-id: Unrecognized " ++ "big-endian ELF header at address 0x%lx"), ++ (unsigned long) ehdr_vma); ++ return NULL; ++ } ++ break; ++ case ELFDATA2LSB: /* Little-endian */ ++ if (! bfd_header_little_endian (templ)) ++ { ++ if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE) ++ warning (_("build-id: Unrecognized " ++ "little-endian ELF header at address 0x%lx"), ++ (unsigned long) ehdr_vma); ++ return NULL; ++ } ++ break; ++ case ELFDATANONE: /* No data encoding specified */ ++ default: /* Unknown data encoding specified */ ++ if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE) ++ warning (_("build-id: Unrecognized " ++ "ELF header endianity at address 0x%lx"), ++ (unsigned long) ehdr_vma); ++ return NULL; ++ } ++ ++ elf_swap_ehdr_in (templ, &x_ehdr64, &i_ehdr); ++ ++ /* The file header tells where to find the program headers. ++ These are what we use to actually choose what to read. */ ++ ++ if (i_ehdr.e_phentsize != (bfd_get_arch_size (templ) == 64 ++ ? sizeof (Elf64_External_Phdr) ++ : sizeof (Elf32_External_Phdr)) ++ || i_ehdr.e_phnum == 0) ++ { ++ if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE) ++ warning (_("build-id: Invalid ELF program headers from the ELF header " ++ "at address 0x%lx"), (unsigned long) ehdr_vma); ++ return NULL; ++ } ++ ++ x_phdrs_size = (bfd_get_arch_size (templ) == 64 ? sizeof (Elf64_External_Phdr) ++ : sizeof (Elf32_External_Phdr)); ++ ++ i_phdrs = (Elf_Internal_Phdr *) xmalloc (i_ehdr.e_phnum * (sizeof *i_phdrs + x_phdrs_size)); ++ x_phdrs_ptr = (gdb_byte *) &i_phdrs[i_ehdr.e_phnum]; ++ err = target_read_memory (ehdr_vma + i_ehdr.e_phoff, (bfd_byte *) x_phdrs_ptr, ++ i_ehdr.e_phnum * x_phdrs_size); ++ if (err) ++ { ++ free (i_phdrs); ++ if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE) ++ warning (_("build-id: Error reading " ++ "ELF program headers at address 0x%lx"), ++ (unsigned long) (ehdr_vma + i_ehdr.e_phoff)); ++ return NULL; ++ } ++ ++ loadbase = ehdr_vma; ++ loadbase_set = 0; ++ for (i = 0; i < i_ehdr.e_phnum; ++i) ++ { ++ elf_swap_phdr_in (templ, (Elf64_External_Phdr *) ++ (x_phdrs_ptr + i * x_phdrs_size), &i_phdrs[i]); ++ /* IA-64 vDSO may have two mappings for one segment, where one mapping ++ is executable only, and one is read only. We must not use the ++ executable one (PF_R is the first one, PF_X the second one). */ ++ if (i_phdrs[i].p_type == PT_LOAD && (i_phdrs[i].p_flags & PF_R)) ++ { ++ /* Only the first PT_LOAD segment indicates the file bias. ++ Next segments may have P_VADDR arbitrarily higher. ++ If the first segment has P_VADDR zero any next segment must not ++ confuse us, the first one sets LOADBASE certainly enough. */ ++ if (!loadbase_set && i_phdrs[i].p_offset == 0) ++ { ++ loadbase = ehdr_vma - i_phdrs[i].p_vaddr; ++ loadbase_set = 1; ++ } ++ } ++ } ++ ++ if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE) ++ warning (_("build-id: Found ELF header at address 0x%lx, loadbase 0x%lx"), ++ (unsigned long) ehdr_vma, (unsigned long) loadbase); ++ ++ *e_phnum_pointer = i_ehdr.e_phnum; ++ *loadbase_pointer = loadbase; ++ return i_phdrs; ++} ++ ++/* BUILD_ID_ADDR_GET gets ADDR located somewhere in the object. ++ Find the first section before ADDR containing an ELF header. ++ We rely on the fact the sections from multiple files do not mix. ++ FIXME: We should check ADDR is contained _inside_ the section with possibly ++ missing content (P_FILESZ < P_MEMSZ). These omitted sections are currently ++ hidden by _BFD_ELF_MAKE_SECTION_FROM_PHDR. */ ++ ++static CORE_ADDR build_id_addr; ++struct build_id_addr_sect ++ { ++ struct build_id_addr_sect *next; ++ asection *sect; ++ }; ++static struct build_id_addr_sect *build_id_addr_sect; ++ ++static void build_id_addr_candidate (bfd *abfd, asection *sect, void *obj) ++{ ++ if (build_id_addr >= bfd_section_vma (sect)) ++ { ++ struct build_id_addr_sect *candidate; ++ ++ candidate = (struct build_id_addr_sect *) xmalloc (sizeof *candidate); ++ candidate->next = build_id_addr_sect; ++ build_id_addr_sect = candidate; ++ candidate->sect = sect; ++ } ++} ++ ++struct bfd_build_id * ++build_id_addr_get (CORE_ADDR addr) ++{ ++ struct build_id_addr_sect *candidate; ++ struct bfd_build_id *retval = NULL; ++ Elf_Internal_Phdr *i_phdr = NULL; ++ bfd_vma loadbase = 0; ++ unsigned e_phnum = 0; ++ ++ if (core_bfd == NULL) ++ return NULL; ++ ++ build_id_addr = addr; ++ gdb_assert (build_id_addr_sect == NULL); ++ bfd_map_over_sections (core_bfd, build_id_addr_candidate, NULL); ++ ++ /* Sections are sorted in the high-to-low VMAs order. ++ Stop the search on the first ELF header we find. ++ Do not continue the search even if it does not contain NT_GNU_BUILD_ID. */ ++ ++ for (candidate = build_id_addr_sect; candidate != NULL; ++ candidate = candidate->next) ++ { ++ i_phdr = elf_get_phdr (core_bfd, ++ bfd_section_vma (candidate->sect), ++ &e_phnum, &loadbase); ++ if (i_phdr != NULL) ++ break; ++ } ++ ++ if (i_phdr != NULL) ++ { ++ retval = build_id_phdr_get (core_bfd, loadbase, e_phnum, i_phdr); ++ xfree (i_phdr); ++ } ++ ++ while (build_id_addr_sect != NULL) ++ { ++ candidate = build_id_addr_sect; ++ build_id_addr_sect = candidate->next; ++ xfree (candidate); ++ } ++ ++ return retval; ++} ++ + /* See build-id.h. */ + + int +@@ -58,7 +458,7 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) + const struct bfd_build_id *found; + int retval = 0; + +- found = build_id_bfd_get (abfd); ++ found = build_id_bfd_shdr_get (abfd); + + if (found == NULL) + warning (_("File \"%s\" has no build-id, file skipped"), +@@ -73,63 +473,166 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) + return retval; + } + ++static char * ++link_resolve (const char *symlink, int level) ++{ ++ char buf[PATH_MAX + 1], *retval; ++ gdb::unique_xmalloc_ptr target; ++ ssize_t got; ++ ++ if (level > 10) ++ return xstrdup (symlink); ++ ++ got = readlink (symlink, buf, sizeof (buf)); ++ if (got < 0 || got >= sizeof (buf)) ++ return xstrdup (symlink); ++ buf[got] = '\0'; ++ ++ if (IS_ABSOLUTE_PATH (buf)) ++ target = make_unique_xstrdup (buf); ++ else ++ { ++ const std::string dir (ldirname (symlink)); ++ ++ target = xstrprintf ("%s" ++#ifndef HAVE_DOS_BASED_FILE_SYSTEM ++ "/" ++#else /* HAVE_DOS_BASED_FILE_SYSTEM */ ++ "\\" ++#endif /* HAVE_DOS_BASED_FILE_SYSTEM */ ++ "%s", dir.c_str(), buf); ++ } ++ ++ retval = link_resolve (target.get (), level + 1); ++ return retval; ++} ++ + /* Helper for build_id_to_debug_bfd. LINK is a path to a potential + build-id-based separate debug file, potentially a symlink to the real file. + If the file exists and matches BUILD_ID, return a BFD reference to it. */ + + static gdb_bfd_ref_ptr +-build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len, +- const bfd_byte *build_id) ++build_id_to_debug_bfd_1 (const std::string &orig_link, size_t build_id_len, ++ const bfd_byte *build_id, char **link_return) + { ++ gdb_bfd_ref_ptr ret_bfd = {}; ++ std::string ret_link; ++ + if (separate_debug_file_debug) + { +- gdb_printf (gdb_stdlog, _(" Trying %s..."), link.c_str ()); +- gdb_flush (gdb_stdlog); ++ gdb_printf (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ()); ++ gdb_flush (gdb_stdout); + } + +- /* lrealpath() is expensive even for the usually non-existent files. */ +- gdb::unique_xmalloc_ptr filename_holder; +- const char *filename = nullptr; +- if (startswith (link, TARGET_SYSROOT_PREFIX)) +- filename = link.c_str (); +- else if (access (link.c_str (), F_OK) == 0) ++ for (unsigned seqno = 0;; seqno++) + { +- filename_holder.reset (lrealpath (link.c_str ())); +- filename = filename_holder.get (); +- } ++ std::string link = orig_link; + +- if (filename == NULL) +- { +- if (separate_debug_file_debug) +- gdb_printf (gdb_stdlog, +- _(" no, unable to compute real path\n")); ++ if (seqno > 0) ++ { ++ /* There can be multiple build-id symlinks pointing to real files ++ with the same build-id (such as hard links). Some of the real ++ files may not be installed. */ + +- return {}; +- } ++ string_appendf (link, ".%u", seqno); ++ } + +- /* We expect to be silent on the non-existing files. */ +- gdb_bfd_ref_ptr debug_bfd = gdb_bfd_open (filename, gnutarget); ++ ret_link = link; + +- if (debug_bfd == NULL) +- { +- if (separate_debug_file_debug) +- gdb_printf (gdb_stdlog, _(" no, unable to open.\n")); ++ struct stat statbuf_trash; ++ ++ /* `access' automatically dereferences LINK. */ ++ if (lstat (link.c_str (), &statbuf_trash) != 0) ++ { ++ /* Stop increasing SEQNO. */ ++ break; ++ } ++ ++ /* lrealpath() is expensive even for the usually non-existent files. */ ++ gdb::unique_xmalloc_ptr filename_holder; ++ const char *filename = nullptr; ++ if (startswith (link, TARGET_SYSROOT_PREFIX)) ++ filename = link.c_str (); ++ else if (access (link.c_str (), F_OK) == 0) ++ { ++ filename_holder.reset (lrealpath (link.c_str ())); ++ filename = filename_holder.get (); ++ } ++ ++ if (filename == NULL) ++ { ++ if (separate_debug_file_debug) ++ gdb_printf (gdb_stdlog, ++ _(" no, unable to compute real path\n")); ++ ++ continue; ++ } ++ ++ /* We expect to be silent on the non-existing files. */ ++ gdb_bfd_ref_ptr debug_bfd = gdb_bfd_open (filename, gnutarget); ++ ++ if (debug_bfd == NULL) ++ { ++ if (separate_debug_file_debug) ++ gdb_printf (gdb_stdlog, _(" no, unable to open.\n")); + +- return {}; ++ continue; ++ } ++ ++ if (!build_id_verify (debug_bfd.get(), build_id_len, build_id)) ++ { ++ if (separate_debug_file_debug) ++ gdb_printf (gdb_stdlog, ++ _(" no, build-id does not match.\n")); ++ ++ continue; ++ } ++ ++ ret_bfd = debug_bfd; ++ break; + } + +- if (!build_id_verify (debug_bfd.get(), build_id_len, build_id)) ++ std::string link_all; ++ ++ if (ret_bfd != NULL) + { + if (separate_debug_file_debug) +- gdb_printf (gdb_stdlog, _(" no, build-id does not match.\n")); ++ gdb_printf (gdb_stdlog, _(" yes!\n")); ++ } ++ else ++ { ++ /* If none of the real files is found report as missing file ++ always the non-.%u-suffixed file. */ ++ std::string link0 = orig_link; + +- return {}; ++ /* If the symlink has target request to install the target. ++ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing. ++ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */ ++ std::string link0_resolved (link_resolve (link0.c_str (), 0)); ++ ++ if (link_all.empty ()) ++ link_all = link0_resolved; ++ else ++ { ++ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with ++ its possible use as an argument for installation command. */ ++ link_all += " " + link0_resolved; ++ } + } + +- if (separate_debug_file_debug) +- gdb_printf (gdb_stdlog, _(" yes!\n")); ++ if (link_return != NULL) ++ { ++ if (ret_bfd != NULL) ++ { ++ *link_return = xstrdup (ret_link.c_str ()); ++ } ++ else ++ { ++ *link_return = xstrdup (link_all.c_str ()); ++ } ++ } + +- return debug_bfd; ++ return ret_bfd; + } + + /* Common code for finding BFDs of a given build-id. This function +@@ -138,7 +641,7 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len, + + static gdb_bfd_ref_ptr + build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id, +- const char *suffix) ++ const char *suffix, char **link_return) + { + /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will + cause "/.build-id/..." lookups. */ +@@ -161,16 +664,17 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id, + if (size > 0) + { + size--; +- string_appendf (link, "%02x/", (unsigned) *data++); ++ string_appendf (link, "%02x", (unsigned) *data++); + } +- ++ if (size > 0) ++ link += "/"; + while (size-- > 0) + string_appendf (link, "%02x", (unsigned) *data++); + + link += suffix; + + gdb_bfd_ref_ptr debug_bfd +- = build_id_to_debug_bfd_1 (link, build_id_len, build_id); ++ = build_id_to_debug_bfd_1 (link, build_id_len, build_id, link_return); + if (debug_bfd != NULL) + return debug_bfd; + +@@ -181,7 +685,7 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id, + if (!gdb_sysroot.empty ()) + { + link = gdb_sysroot + link; +- debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id); ++ debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id, NULL); + if (debug_bfd != NULL) + return debug_bfd; + } +@@ -190,31 +694,663 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id, + return {}; + } + ++char * ++build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) ++{ ++ gdb_bfd_ref_ptr abfd; ++ char *result; ++ ++ abfd = build_id_to_exec_bfd (build_id->size, build_id->data, link_return); ++ if (abfd == NULL) ++ return NULL; ++ ++ result = xstrdup (bfd_get_filename (abfd.get ())); ++ return result; ++} ++ ++void debug_flush_missing (void); ++ ++#ifdef HAVE_LIBRPM ++ ++#include ++#include ++#include ++#include ++#ifdef DLOPEN_LIBRPM ++#include ++#endif ++ ++/* Workarodun https://bugzilla.redhat.com/show_bug.cgi?id=643031 ++ librpm must not exit() an application on SIGINT ++ ++ Enable or disable a signal handler. SIGNUM: signal to enable (or disable ++ if negative). HANDLER: sa_sigaction handler (or NULL to use ++ rpmsqHandler()). Returns: no. of refs, -1 on error. */ ++extern int rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler); ++int ++rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler) ++{ ++ return 0; ++} ++ ++/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files ++ and avoid their duplicities during a single inferior run. */ ++ ++static struct htab *missing_rpm_hash; ++ ++/* This MISSING_RPM_LIST tracker is used to collect and print as a single line ++ all the rpms right before the nearest GDB prompt. It gets cleared after ++ each such print (it is questionable if we should clear it after the print). ++ */ ++ ++struct missing_rpm ++ { ++ struct missing_rpm *next; ++ char rpm[1]; ++ }; ++static struct missing_rpm *missing_rpm_list; ++static int missing_rpm_list_entries; ++ ++/* Returns the count of newly added rpms. */ ++ ++static int ++#ifndef GDB_INDEX_VERIFY_VENDOR ++missing_rpm_enlist (const char *filename) ++#else ++missing_rpm_enlist_1 (const char *filename, int verify_vendor) ++#endif ++{ ++ static int rpm_init_done = 0; ++ rpmts ts; ++ rpmdbMatchIterator mi; ++ int count = 0; ++ ++#ifdef DLOPEN_LIBRPM ++ /* Duplicate here the declarations to verify they match. The same sanity ++ check is present also in `configure.ac'. */ ++ extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg); ++ static char *(*headerFormat_p) (Header h, const char * fmt, errmsg_t *errmsg); ++ extern int rpmReadConfigFiles(const char * file, const char * target); ++ static int (*rpmReadConfigFiles_p) (const char * file, const char * target); ++ extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); ++ static rpmdbMatchIterator (*rpmdbFreeIterator_p) (rpmdbMatchIterator mi); ++ extern Header rpmdbNextIterator(rpmdbMatchIterator mi); ++ static Header (*rpmdbNextIterator_p) (rpmdbMatchIterator mi); ++ extern rpmts rpmtsCreate(void); ++ static rpmts (*rpmtsCreate_p) (void); ++ extern rpmts rpmtsFree(rpmts ts); ++ static rpmts (*rpmtsFree_p) (rpmts ts); ++ extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, ++ const void * keyp, size_t keylen); ++ static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts, ++ rpmTag rpmtag, ++ const void *keyp, ++ size_t keylen); ++#else /* !DLOPEN_LIBRPM */ ++# define headerFormat_p headerFormat ++# define rpmReadConfigFiles_p rpmReadConfigFiles ++# define rpmdbFreeIterator_p rpmdbFreeIterator ++# define rpmdbNextIterator_p rpmdbNextIterator ++# define rpmtsCreate_p rpmtsCreate ++# define rpmtsFree_p rpmtsFree ++# define rpmtsInitIterator_p rpmtsInitIterator ++#endif /* !DLOPEN_LIBRPM */ ++ ++ gdb_assert (filename != NULL); ++ ++ if (strcmp (filename, BUILD_ID_MAIN_EXECUTABLE_FILENAME) == 0) ++ return 0; ++ ++ if (is_target_filename (filename)) ++ return 0; ++ ++ if (filename[0] != '/') ++ { ++ warning (_("Ignoring non-absolute filename: <%s>"), filename); ++ return 0; ++ } ++ ++ if (!rpm_init_done) ++ { ++ static int init_tried; ++ ++ /* Already failed the initialization before? */ ++ if (init_tried) ++ return 0; ++ init_tried = 1; ++ ++#ifdef DLOPEN_LIBRPM ++ { ++ void *h; ++ ++ h = dlopen (DLOPEN_LIBRPM, RTLD_LAZY); ++ if (!h) ++ { ++ warning (_("Unable to open \"%s\" (%s), " ++ "missing debuginfos notifications will not be displayed"), ++ DLOPEN_LIBRPM, dlerror ()); ++ return 0; ++ } ++ ++ if (!((headerFormat_p = (char *(*) (Header h, const char * fmt, errmsg_t *errmsg)) dlsym (h, "headerFormat")) ++ && (rpmReadConfigFiles_p = (int (*) (const char * file, const char * target)) dlsym (h, "rpmReadConfigFiles")) ++ && (rpmdbFreeIterator_p = (rpmdbMatchIterator (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbFreeIterator")) ++ && (rpmdbNextIterator_p = (Header (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbNextIterator")) ++ && (rpmtsCreate_p = (rpmts (*) (void)) dlsym (h, "rpmtsCreate")) ++ && (rpmtsFree_p = (rpmts (*) (rpmts ts)) dlsym (h, "rpmtsFree")) ++ && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator")))) ++ { ++ warning (_("Opened library \"%s\" is incompatible (%s), " ++ "missing debuginfos notifications will not be displayed"), ++ DLOPEN_LIBRPM, dlerror ()); ++ if (dlclose (h)) ++ warning (_("Error closing library \"%s\": %s\n"), DLOPEN_LIBRPM, ++ dlerror ()); ++ return 0; ++ } ++ } ++#endif /* DLOPEN_LIBRPM */ ++ ++ if (rpmReadConfigFiles_p (NULL, NULL) != 0) ++ { ++ warning (_("Error reading the rpm configuration files")); ++ return 0; ++ } ++ ++ rpm_init_done = 1; ++ } ++ ++ ts = rpmtsCreate_p (); ++ ++ mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); ++ if (mi != NULL) ++ { ++#ifndef GDB_INDEX_VERIFY_VENDOR ++ for (;;) ++#else ++ if (!verify_vendor) for (;;) ++#endif ++ { ++ Header h; ++ char *debuginfo, **slot, *s, *s2; ++ errmsg_t err; ++ size_t srcrpmlen = sizeof (".src.rpm") - 1; ++ size_t debuginfolen = sizeof ("-debuginfo") - 1; ++ rpmdbMatchIterator mi_debuginfo; ++ ++ h = rpmdbNextIterator_p (mi); ++ if (h == NULL) ++ break; ++ ++ /* Verify the debuginfo file is not already installed. */ ++ ++ debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}", ++ &err); ++ if (!debuginfo) ++ { ++ warning (_("Error querying the rpm file `%s': %s"), filename, ++ err); ++ continue; ++ } ++ /* s = `.src.rpm-debuginfo.%{arch}' */ ++ s = strrchr (debuginfo, '-') - srcrpmlen; ++ s2 = NULL; ++ if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0) ++ { ++ /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */ ++ s2 = (char *) memrchr (debuginfo, '-', s - debuginfo); ++ } ++ if (s2) ++ { ++ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */ ++ s2 = (char *) memrchr (debuginfo, '-', s2 - debuginfo); ++ } ++ if (!s2) ++ { ++ warning (_("Error querying the rpm file `%s': %s"), filename, ++ debuginfo); ++ xfree (debuginfo); ++ continue; ++ } ++ /* s = `.src.rpm-debuginfo.%{arch}' */ ++ /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */ ++ memmove (s2 + debuginfolen, s2, s - s2); ++ memcpy (s2, "-debuginfo", debuginfolen); ++ /* s = `XXXX.%{arch}' */ ++ /* strlen ("XXXX") == srcrpmlen + debuginfolen */ ++ /* s2 = `-debuginfo-%{version}-%{release}XX.%{arch}' */ ++ /* strlen ("XX") == srcrpmlen */ ++ memmove (s + debuginfolen, s + srcrpmlen + debuginfolen, ++ strlen (s + srcrpmlen + debuginfolen) + 1); ++ /* s = `-debuginfo-%{version}-%{release}.%{arch}' */ ++ ++ /* RPMDBI_PACKAGES requires keylen == sizeof (int). */ ++ /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */ ++ mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0); ++ xfree (debuginfo); ++ if (mi_debuginfo) ++ { ++ rpmdbFreeIterator_p (mi_debuginfo); ++ count = 0; ++ break; ++ } ++ ++ /* The allocated memory gets utilized below for MISSING_RPM_HASH. */ ++ debuginfo = headerFormat_p (h, ++ "%{name}-%{version}-%{release}.%{arch}", ++ &err); ++ if (!debuginfo) ++ { ++ warning (_("Error querying the rpm file `%s': %s"), filename, ++ err); ++ continue; ++ } ++ ++ /* Base package name for `debuginfo-install'. We do not use the ++ `yum' command directly as the line ++ yum --enablerepo='*debug*' install NAME-debuginfo.ARCH ++ would be more complicated than just: ++ debuginfo-install NAME-VERSION-RELEASE.ARCH ++ Do not supply the rpm base name (derived from .src.rpm name) as ++ debuginfo-install is unable to install the debuginfo package if ++ the base name PKG binary rpm is not installed while for example ++ PKG-libs would be installed (RH Bug 467901). ++ FUTURE: After multiple debuginfo versions simultaneously installed ++ get supported the support for the VERSION-RELEASE tags handling ++ may need an update. */ ++ ++ if (missing_rpm_hash == NULL) ++ { ++ /* DEL_F is passed NULL as MISSING_RPM_LIST's HTAB_DELETE ++ should not deallocate the entries. */ ++ ++ missing_rpm_hash = htab_create_alloc (64, htab_hash_string, ++ (int (*) (const void *, const void *)) streq, ++ NULL, xcalloc, xfree); ++ } ++ slot = (char **) htab_find_slot (missing_rpm_hash, debuginfo, INSERT); ++ /* XCALLOC never returns NULL. */ ++ gdb_assert (slot != NULL); ++ if (*slot == NULL) ++ { ++ struct missing_rpm *missing_rpm; ++ ++ *slot = debuginfo; ++ ++ missing_rpm = (struct missing_rpm *) xmalloc (sizeof (*missing_rpm) + strlen (debuginfo)); ++ strcpy (missing_rpm->rpm, debuginfo); ++ missing_rpm->next = missing_rpm_list; ++ missing_rpm_list = missing_rpm; ++ missing_rpm_list_entries++; ++ } ++ else ++ xfree (debuginfo); ++ count++; ++ } ++#ifdef GDB_INDEX_VERIFY_VENDOR ++ else /* verify_vendor */ ++ { ++ int vendor_pass = 0, vendor_fail = 0; ++ ++ for (;;) ++ { ++ Header h; ++ errmsg_t err; ++ char *vendor; ++ ++ h = rpmdbNextIterator_p (mi); ++ if (h == NULL) ++ break; ++ ++ vendor = headerFormat_p (h, "%{vendor}", &err); ++ if (!vendor) ++ { ++ warning (_("Error querying the rpm file `%s': %s"), filename, ++ err); ++ continue; ++ } ++ if (strcmp (vendor, "Red Hat, Inc.") == 0) ++ vendor_pass = 1; ++ else ++ vendor_fail = 1; ++ xfree (vendor); ++ } ++ count = vendor_pass != 0 && vendor_fail == 0; ++ } ++#endif ++ ++ rpmdbFreeIterator_p (mi); ++ } ++ ++ rpmtsFree_p (ts); ++ ++ return count; ++} ++ ++#ifdef GDB_INDEX_VERIFY_VENDOR ++missing_rpm_enlist (const char *filename) ++{ ++ return missing_rpm_enlist_1 (filename, 0); ++} ++ ++extern int rpm_verify_vendor (const char *filename); ++int ++rpm_verify_vendor (const char *filename) ++{ ++ return missing_rpm_enlist_1 (filename, 1); ++} ++#endif ++ ++static bool ++missing_rpm_list_compar (const char *ap, const char *bp) ++{ ++ return strcoll (ap, bp) < 0; ++} ++ ++/* It returns a NULL-terminated array of strings needing to be FREEd. It may ++ also return only NULL. */ ++ ++static void ++missing_rpm_list_print (void) ++{ ++ struct missing_rpm *list_iter; ++ ++ if (missing_rpm_list_entries == 0) ++ return; ++ ++ std::vector array (missing_rpm_list_entries); ++ size_t idx = 0; ++ ++ for (list_iter = missing_rpm_list; list_iter != NULL; ++ list_iter = list_iter->next) ++ { ++ array[idx++] = list_iter->rpm; ++ } ++ gdb_assert (idx == missing_rpm_list_entries); ++ ++ std::sort (array.begin (), array.end (), missing_rpm_list_compar); ++ ++ /* We zero out the number of missing RPMs here because of a nasty ++ bug (see RHBZ 1801974). ++ ++ When we call 'puts_unfiltered' below, if pagination is on and if ++ the number of missing RPMs is big enough to trigger pagination, ++ we will end up in an infinite recursion. The call chain looks ++ like this: ++ ++ missing_rpm_list_print -> puts_unfiltered -> fputs_maybe_filtered ++ -> prompt_for_continue -> display_gdb_prompt -> ++ debug_flush_missing -> missing_rpm_list_print ... ++ ++ For this reason, we make sure MISSING_RPM_LIST_ENTRIES is zero ++ *before* calling any print function. ++ ++ Note: kevinb/2023-02-22: The code below used to call ++ puts_unfiltered() and printf_unfiltered(), but calls to these ++ functions have been replaced by calls to gdb_printf(). The call ++ chain shown above (probably) used to be the case at one time and ++ hopefully something similar is still the case now that ++ gdb_printf() is being used instead. */ ++ missing_rpm_list_entries = 0; ++ ++ gdb_printf (_("Missing separate debuginfos, use: %s"), ++#ifdef DNF_DEBUGINFO_INSTALL ++ "dnf " ++#endif ++ "debuginfo-install"); ++ for (const char *el : array) ++ { ++ gdb_printf (" %s", el); ++ } ++ gdb_printf ("\n"); ++ ++ while (missing_rpm_list != NULL) ++ { ++ list_iter = missing_rpm_list; ++ missing_rpm_list = list_iter->next; ++ xfree (list_iter); ++ } ++} ++ ++static void ++missing_rpm_change (void) ++{ ++ debug_flush_missing (); ++ ++ gdb_assert (missing_rpm_list == NULL); ++ if (missing_rpm_hash != NULL) ++ { ++ htab_delete (missing_rpm_hash); ++ missing_rpm_hash = NULL; ++ } ++} ++ ++enum missing_exec ++ { ++ /* Init state. EXEC_BFD also still could be NULL. */ ++ MISSING_EXEC_NOT_TRIED, ++ /* We saw a non-NULL EXEC_BFD but RPM has no info about it. */ ++ MISSING_EXEC_NOT_FOUND, ++ /* We found EXEC_BFD by RPM and we either have its symbols (either embedded ++ or separate) or the main executable's RPM is now contained in ++ MISSING_RPM_HASH. */ ++ MISSING_EXEC_ENLISTED ++ }; ++static enum missing_exec missing_exec = MISSING_EXEC_NOT_TRIED; ++ ++#endif /* HAVE_LIBRPM */ ++ ++void ++debug_flush_missing (void) ++{ ++#ifdef HAVE_LIBRPM ++ missing_rpm_list_print (); ++#endif ++} ++ ++/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages ++ yum --enablerepo='*debug*' install ... ++ avoidance. */ ++ ++struct missing_filepair ++ { ++ char *binary; ++ char *debug; ++ char data[1]; ++ }; ++ ++static struct htab *missing_filepair_hash; ++static struct obstack missing_filepair_obstack; ++ ++static void * ++missing_filepair_xcalloc (size_t nmemb, size_t nmemb_size) ++{ ++ void *retval; ++ size_t size = nmemb * nmemb_size; ++ ++ retval = obstack_alloc (&missing_filepair_obstack, size); ++ memset (retval, 0, size); ++ return retval; ++} ++ ++static hashval_t ++missing_filepair_hash_func (const struct missing_filepair *elem) ++{ ++ hashval_t retval = 0; ++ ++ retval ^= htab_hash_string (elem->binary); ++ if (elem->debug != NULL) ++ retval ^= htab_hash_string (elem->debug); ++ ++ return retval; ++} ++ ++static int ++missing_filepair_eq (const struct missing_filepair *elem1, ++ const struct missing_filepair *elem2) ++{ ++ return strcmp (elem1->binary, elem2->binary) == 0 ++ && ((elem1->debug == NULL) == (elem2->debug == NULL)) ++ && (elem1->debug == NULL || strcmp (elem1->debug, elem2->debug) == 0); ++} ++ ++static void ++missing_filepair_change (void) ++{ ++ if (missing_filepair_hash != NULL) ++ { ++ obstack_free (&missing_filepair_obstack, NULL); ++ /* All their memory came just from missing_filepair_OBSTACK. */ ++ missing_filepair_hash = NULL; ++ } ++#ifdef HAVE_LIBRPM ++ missing_exec = MISSING_EXEC_NOT_TRIED; ++#endif ++} ++ ++static void ++debug_print_executable_changed (struct program_space *pspace, bool reload_p) ++{ ++#ifdef HAVE_LIBRPM ++ missing_rpm_change (); ++#endif ++ missing_filepair_change (); ++} ++ ++/* Notify user the file BINARY with (possibly NULL) associated separate debug ++ information file DEBUG is missing. DEBUG may or may not be the build-id ++ file such as would be: ++ /usr/lib/debug/.build-id/dd/b1d2ce632721c47bb9e8679f369e2295ce71be.debug ++ */ ++ ++void ++debug_print_missing (const char *binary, const char *debug) ++{ ++ size_t binary_len0 = strlen (binary) + 1; ++ size_t debug_len0 = debug ? strlen (debug) + 1 : 0; ++ struct missing_filepair missing_filepair_find; ++ struct missing_filepair *missing_filepair; ++ struct missing_filepair **slot; ++ ++ if (build_id_verbose < BUILD_ID_VERBOSE_FILENAMES) ++ return; ++ ++ if (missing_filepair_hash == NULL) ++ { ++ obstack_init (&missing_filepair_obstack); ++ missing_filepair_hash = htab_create_alloc (64, ++ (hashval_t (*) (const void *)) missing_filepair_hash_func, ++ (int (*) (const void *, const void *)) missing_filepair_eq, NULL, ++ missing_filepair_xcalloc, NULL); ++ } ++ ++ /* Use MISSING_FILEPAIR_FIND first instead of calling obstack_alloc with ++ obstack_free in the case of a (rare) match. The problem is ALLOC_F for ++ MISSING_FILEPAIR_HASH allocates from MISSING_FILEPAIR_OBSTACK maintenance ++ structures for MISSING_FILEPAIR_HASH. Calling obstack_free would possibly ++ not to free only MISSING_FILEPAIR but also some such structures (allocated ++ during the htab_find_slot call). */ ++ ++ missing_filepair_find.binary = (char *) binary; ++ missing_filepair_find.debug = (char *) debug; ++ slot = (struct missing_filepair **) htab_find_slot (missing_filepair_hash, ++ &missing_filepair_find, ++ INSERT); ++ ++ /* While it may be still printed duplicitely with the missing debuginfo file ++ * it is due to once printing about the binary file build-id link and once ++ * about the .debug file build-id link as both the build-id symlinks are ++ * located in the debuginfo package. */ ++ ++ if (*slot != NULL) ++ return; ++ ++ missing_filepair = (struct missing_filepair *) obstack_alloc (&missing_filepair_obstack, ++ sizeof (*missing_filepair) - 1 ++ + binary_len0 + debug_len0); ++ missing_filepair->binary = missing_filepair->data; ++ memcpy (missing_filepair->binary, binary, binary_len0); ++ if (debug != NULL) ++ { ++ missing_filepair->debug = missing_filepair->binary + binary_len0; ++ memcpy (missing_filepair->debug, debug, debug_len0); ++ } ++ else ++ missing_filepair->debug = NULL; ++ ++ *slot = missing_filepair; ++ ++#ifdef HAVE_LIBRPM ++ if (missing_exec == MISSING_EXEC_NOT_TRIED) ++ { ++ const char *execfilename = get_exec_file (0); ++ ++ if (execfilename != NULL) ++ { ++ if (missing_rpm_enlist (execfilename) == 0) ++ missing_exec = MISSING_EXEC_NOT_FOUND; ++ else ++ missing_exec = MISSING_EXEC_ENLISTED; ++ } ++ } ++ if (missing_exec != MISSING_EXEC_ENLISTED) ++ if ((binary[0] == 0 || missing_rpm_enlist (binary) == 0) ++ && (debug == NULL || missing_rpm_enlist (debug) == 0)) ++#endif /* HAVE_LIBRPM */ ++ { ++ /* We do not collect and flush these messages as each such message ++ already requires its own separate lines. */ ++ ++ gdb_printf (gdb_stdlog, ++ _("Missing separate debuginfo for %s.\n"), binary); ++ if (debug != NULL) ++ { ++ if (access (debug, F_OK) == 0) { ++ gdb_printf (gdb_stdlog, _("Try: %s %s\n"), ++#ifdef DNF_DEBUGINFO_INSTALL ++ "dnf" ++#else ++ "yum" ++#endif ++ " --enablerepo='*debug*' install", debug); ++ } else ++ gdb_printf (gdb_stdlog, _("The debuginfo package for this file is probably broken.\n")); ++ } ++ } ++} ++ + /* See build-id.h. */ + + gdb_bfd_ref_ptr +-build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) ++build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, ++ char **link_return) + { +- return build_id_to_bfd_suffix (build_id_len, build_id, ".debug"); ++ return build_id_to_bfd_suffix (build_id_len, build_id, ".debug", ++ link_return); + } + + /* See build-id.h. */ + + gdb_bfd_ref_ptr +-build_id_to_exec_bfd (size_t build_id_len, const bfd_byte *build_id) ++build_id_to_exec_bfd (size_t build_id_len, const bfd_byte *build_id, ++ char **link_return) + { +- return build_id_to_bfd_suffix (build_id_len, build_id, ""); ++ return build_id_to_bfd_suffix (build_id_len, build_id, "", link_return); + } + + /* See build-id.h. */ + + std::string + find_separate_debug_file_by_buildid (struct objfile *objfile, +- deferred_warnings *warnings) ++ deferred_warnings *warnings, ++ gdb::unique_xmalloc_ptr *build_id_filename_return) + { + const struct bfd_build_id *build_id; + +- build_id = build_id_bfd_get (objfile->obfd.get ()); ++ if (build_id_filename_return) ++ *build_id_filename_return = NULL; ++ ++ build_id = build_id_bfd_shdr_get (objfile->obfd.get ()); + if (build_id != NULL) + { + if (separate_debug_file_debug) +@@ -222,8 +1358,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile, + _("\nLooking for separate debug info (build-id) for " + "%s\n"), objfile_name (objfile)); + ++ char *build_id_filename_cstr = NULL; + gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size, +- build_id->data)); ++ build_id->data, ++ (!build_id_filename_return ? NULL : &build_id_filename_cstr))); ++ if (build_id_filename_return) ++ { ++ if (!build_id_filename_cstr) ++ gdb_assert (!*build_id_filename_return); ++ else ++ { ++ *build_id_filename_return = gdb::unique_xmalloc_ptr (build_id_filename_cstr); ++ build_id_filename_cstr = NULL; ++ } ++ } ++ + /* Prevent looping on a stripped .debug file. */ + if (abfd != NULL + && filename_cmp (bfd_get_filename (abfd.get ()), +@@ -243,3 +1392,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile, + + return std::string (); + } ++ ++void _initialize_build_id (); ++ ++void ++_initialize_build_id () ++{ ++ add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose, ++ _("\ ++Set debugging level of the build-id locator."), _("\ ++Show debugging level of the build-id locator."), _("\ ++Level 1 (default) enables printing the missing debug filenames,\n\ ++level 2 also prints the parsing of binaries to find the identificators."), ++ NULL, ++ show_build_id_verbose, ++ &setlist, &showlist); ++ ++ gdb::observers::executable_changed.attach (debug_print_executable_changed, ++ "build-id"); ++} +diff --git a/gdb/build-id.h b/gdb/build-id.h +--- a/gdb/build-id.h ++++ b/gdb/build-id.h +@@ -23,9 +23,10 @@ + #include "gdb_bfd.h" + #include "gdbsupport/rsp-low.h" + +-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ ++/* Separate debuginfo files have corrupted PHDR but SHDR is correct there. ++ Locate NT_GNU_BUILD_ID from ABFD and return its content. */ + +-extern const struct bfd_build_id *build_id_bfd_get (bfd *abfd); ++extern const struct bfd_build_id *build_id_bfd_shdr_get (bfd *abfd); + + /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value. + Otherwise, issue a warning and return false. */ +@@ -38,14 +39,19 @@ extern int build_id_verify (bfd *abfd, + can be found, return NULL. */ + + extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len, +- const bfd_byte *build_id); ++ const bfd_byte *build_id, ++ char **link_return = NULL); ++ ++extern char *build_id_to_filename (const struct bfd_build_id *build_id, ++ char **link_return); + + /* Find and open a BFD for an executable file given a build-id. If no BFD + can be found, return NULL. The returned reference to the BFD must be + released by the caller. */ + + extern gdb_bfd_ref_ptr build_id_to_exec_bfd (size_t build_id_len, +- const bfd_byte *build_id); ++ const bfd_byte *build_id, ++ char **link_return); + + /* Find the separate debug file for OBJFILE, by using the build-id + associated with OBJFILE's BFD. If successful, returns the file name for the +@@ -58,7 +64,8 @@ extern gdb_bfd_ref_ptr build_id_to_exec_bfd (size_t build_id_len, + will be printed. */ + + extern std::string find_separate_debug_file_by_buildid +- (struct objfile *objfile, deferred_warnings *warnings); ++ (struct objfile *objfile, deferred_warnings *warnings, ++ gdb::unique_xmalloc_ptr *build_id_filename_return); + + /* Return an hex-string representation of BUILD_ID. */ + +diff --git a/gdb/coffread.c b/gdb/coffread.c +--- a/gdb/coffread.c ++++ b/gdb/coffread.c +@@ -729,7 +729,7 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) + { + deferred_warnings warnings; + std::string debugfile +- = find_separate_debug_file_by_buildid (objfile, &warnings); ++ = find_separate_debug_file_by_buildid (objfile, &warnings, NULL); + + if (debugfile.empty ()) + debugfile +diff --git a/gdb/corelow.c b/gdb/corelow.c +--- a/gdb/corelow.c ++++ b/gdb/corelow.c +@@ -22,6 +22,10 @@ + #include + #include + #include "frame.h" ++#include "auxv.h" ++#include "build-id.h" ++#include "elf/common.h" ++#include "gdbcmd.h" + #include "inferior.h" + #include "infrun.h" + #include "symtab.h" +@@ -380,6 +384,8 @@ add_to_thread_list (asection *asect, asection *reg_sect, inferior *inf) + switch_to_thread (thr); /* Yes, make it current. */ + } + ++static bool build_id_core_loads = true; ++ + /* Issue a message saying we have no core to debug, if FROM_TTY. */ + + static void +@@ -563,12 +569,14 @@ rename_vmcore_idle_reg_sections (bfd *abfd, inferior *inf) + static void + locate_exec_from_corefile_build_id (bfd *abfd, int from_tty) + { +- const bfd_build_id *build_id = build_id_bfd_get (abfd); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (abfd); + if (build_id == nullptr) + return; + ++ char *build_id_filename; + gdb_bfd_ref_ptr execbfd +- = build_id_to_exec_bfd (build_id->size, build_id->data); ++ = build_id_to_exec_bfd (build_id->size, build_id->data, ++ &build_id_filename); + + if (execbfd == nullptr) + { +@@ -596,7 +604,12 @@ locate_exec_from_corefile_build_id (bfd *abfd, int from_tty) + exec_file_attach (bfd_get_filename (execbfd.get ()), from_tty); + symbol_file_add_main (bfd_get_filename (execbfd.get ()), + symfile_add_flag (from_tty ? SYMFILE_VERBOSE : 0)); ++ if (current_program_space->symfile_object_file != NULL) ++ current_program_space->symfile_object_file->flags |= ++ OBJF_BUILD_ID_CORE_LOADED; + } ++ else ++ debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename); + } + + /* See gdbcore.h. */ +@@ -1506,4 +1519,11 @@ _initialize_corelow () + maintenance_print_core_file_backed_mappings, + _("Print core file's file-backed mappings."), + &maintenanceprintlist); ++ ++ add_setshow_boolean_cmd ("build-id-core-loads", class_files, ++ &build_id_core_loads, _("\ ++Set whether CORE-FILE loads the build-id associated files automatically."), _("\ ++Show whether CORE-FILE loads the build-id associated files automatically."), ++ NULL, NULL, NULL, ++ &setlist, &showlist); + } +diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo +--- a/gdb/doc/gdb.texinfo ++++ b/gdb/doc/gdb.texinfo +@@ -22296,6 +22296,27 @@ information files. + + @end table + ++You can also adjust the current verbosity of the @dfn{build id} locating. ++ ++@table @code ++ ++@kindex set build-id-verbose ++@item set build-id-verbose 0 ++No additional messages are printed. ++ ++@item set build-id-verbose 1 ++Missing separate debug filenames are printed. ++ ++@item set build-id-verbose 2 ++Missing separate debug filenames are printed and also all the parsing of the ++binaries to find their @dfn{build id} content is printed. ++ ++@kindex show build-id-verbose ++@item show build-id-verbose ++Show the current verbosity value for the @dfn{build id} content locating. ++ ++@end table ++ + @cindex @code{.gnu_debuglink} sections + @cindex debug link sections + A debug link is a special section of the executable file named +diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c +--- a/gdb/dwarf2/index-cache.c ++++ b/gdb/dwarf2/index-cache.c +@@ -96,7 +96,7 @@ index_cache_store_context::index_cache_store_context (const index_cache &ic, + return; + + /* Get build id of objfile. */ +- const bfd_build_id *build_id = build_id_bfd_get (per_bfd->obfd); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (per_bfd->obfd); + if (build_id == nullptr) + { + index_cache_debug ("objfile %s has no build id", +@@ -111,7 +111,8 @@ index_cache_store_context::index_cache_store_context (const index_cache &ic, + + if (dwz != nullptr) + { +- const bfd_build_id *dwz_build_id = build_id_bfd_get (dwz->dwz_bfd.get ()); ++ const bfd_build_id *dwz_build_id ++ = build_id_bfd_shdr_get (dwz->dwz_bfd.get ()); + + if (dwz_build_id == nullptr) + { +diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c +--- a/gdb/dwarf2/read.c ++++ b/gdb/dwarf2/read.c +@@ -3355,7 +3355,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) + static gdb::array_view + get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd) + { +- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ()); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ()); + if (build_id == nullptr) + return {}; + +@@ -3368,7 +3368,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd) + static gdb::array_view + get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz) + { +- const bfd_build_id *build_id = build_id_bfd_get (dwz->dwz_bfd.get ()); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (dwz->dwz_bfd.get ()); + if (build_id == nullptr) + return {}; + +diff --git a/gdb/elfread.c b/gdb/elfread.c +--- a/gdb/elfread.c ++++ b/gdb/elfread.c +@@ -1220,8 +1220,10 @@ elf_symfile_read_dwarf2 (struct objfile *objfile, + { + deferred_warnings warnings; + ++ gdb::unique_xmalloc_ptr build_id_filename; + std::string debugfile +- = find_separate_debug_file_by_buildid (objfile, &warnings); ++ = find_separate_debug_file_by_buildid (objfile, &warnings, ++ &build_id_filename); + + if (debugfile.empty ()) + debugfile = find_separate_debug_file_by_debuglink (objfile, &warnings); +@@ -1239,7 +1241,7 @@ elf_symfile_read_dwarf2 (struct objfile *objfile, + { + has_dwarf2 = false; + const struct bfd_build_id *build_id +- = build_id_bfd_get (objfile->obfd.get ()); ++ = build_id_bfd_shdr_get (objfile->obfd.get ()); + const char *filename = bfd_get_filename (objfile->obfd.get ()); + + if (build_id != nullptr) +@@ -1265,6 +1267,11 @@ elf_symfile_read_dwarf2 (struct objfile *objfile, + has_dwarf2 = true; + } + } ++ /* Check if any separate debug info has been extracted out. */ ++ else if (bfd_get_section_by_name (objfile->obfd.get (), ++ ".gnu_debuglink") ++ != NULL) ++ debug_print_missing (objfile_name (objfile), build_id_filename.get ()); + } + } + /* If all the methods to collect the debuginfo failed, print the +diff --git a/gdb/exec.c b/gdb/exec.c +--- a/gdb/exec.c ++++ b/gdb/exec.c +@@ -237,7 +237,7 @@ validate_exec_file (int from_tty) + current_exec_file = get_exec_file (0); + + const bfd_build_id *exec_file_build_id +- = build_id_bfd_get (current_program_space->exec_bfd ()); ++ = build_id_bfd_shdr_get (current_program_space->exec_bfd ()); + if (exec_file_build_id != nullptr) + { + /* Prepend the target prefix, to force gdb_bfd_open to open the +@@ -250,7 +250,7 @@ validate_exec_file (int from_tty) + if (abfd != nullptr) + { + const bfd_build_id *target_exec_file_build_id +- = build_id_bfd_get (abfd.get ()); ++ = build_id_bfd_shdr_get (abfd.get ()); + + if (target_exec_file_build_id != nullptr) + { +diff --git a/gdb/objfiles.h b/gdb/objfiles.h +--- a/gdb/objfiles.h ++++ b/gdb/objfiles.h +@@ -884,6 +884,10 @@ struct objfile + bool object_format_has_copy_relocs = false; + }; + ++/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */ ++ ++#define OBJF_BUILD_ID_CORE_LOADED static_cast(1 << 12) ++ + /* A deleter for objfile. */ + + struct objfile_deleter +diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c +--- a/gdb/python/py-objfile.c ++++ b/gdb/python/py-objfile.c +@@ -158,7 +158,7 @@ objfpy_get_build_id (PyObject *self, void *closure) + + try + { +- build_id = build_id_bfd_get (objfile->obfd.get ()); ++ build_id = build_id_bfd_shdr_get (objfile->obfd.get ()); + } + catch (const gdb_exception &except) + { +@@ -629,7 +629,7 @@ gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw) + if (obfd == nullptr) + return 0; + +- const bfd_build_id *obfd_build_id = build_id_bfd_get (obfd); ++ const bfd_build_id *obfd_build_id = build_id_bfd_shdr_get (obfd); + if (obfd_build_id == nullptr) + return 0; + +diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c +--- a/gdb/solib-svr4.c ++++ b/gdb/solib-svr4.c +@@ -44,6 +44,7 @@ + #include "auxv.h" + #include "gdb_bfd.h" + #include "probe.h" ++#include "build-id.h" + + #include + +@@ -1318,9 +1319,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, + continue; + } + +- strncpy (newobj->so_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1); +- newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; +- strcpy (newobj->so_original_name, newobj->so_name); ++ { ++ struct bfd_build_id *build_id; ++ ++ strncpy (newobj->so_original_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1); ++ newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; ++ /* May get overwritten below. */ ++ strcpy (newobj->so_name, newobj->so_original_name); ++ ++ build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld); ++ if (build_id != NULL) ++ { ++ char *name, *build_id_filename; ++ ++ /* Missing the build-id matching separate debug info file ++ would be handled while SO_NAME gets loaded. */ ++ name = build_id_to_filename (build_id, &build_id_filename); ++ if (name != NULL) ++ { ++ strncpy (newobj->so_name, name, SO_NAME_MAX_PATH_SIZE - 1); ++ newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; ++ xfree (name); ++ } ++ else ++ { ++ debug_print_missing (newobj->so_name, build_id_filename); ++ ++ /* In the case the main executable was found according to ++ its build-id (from a core file) prevent loading ++ a different build of a library with accidentally the ++ same SO_NAME. ++ ++ It suppresses bogus backtraces (and prints "??" there ++ instead) if the on-disk files no longer match the ++ running program version. */ ++ ++ if (current_program_space->symfile_object_file != NULL ++ && (current_program_space->symfile_object_file->flags ++ & OBJF_BUILD_ID_CORE_LOADED) != 0) ++ newobj->so_name[0] = 0; ++ } ++ ++ xfree (build_id_filename); ++ xfree (build_id); ++ } ++ } + + /* If this entry has no name, or its name matches the name + for the main executable, don't include it in the list. */ +diff --git a/gdb/source.c b/gdb/source.c +--- a/gdb/source.c ++++ b/gdb/source.c +@@ -1167,7 +1167,7 @@ open_source_file (struct symtab *s) + } + + const struct bfd_build_id *build_id +- = build_id_bfd_get (ofp->obfd.get ()); ++ = build_id_bfd_shdr_get (ofp->obfd.get ()); + + /* Query debuginfod for the source file. */ + if (build_id != nullptr && !srcpath.empty ()) +diff --git a/gdb/symfile.h b/gdb/symfile.h +--- a/gdb/symfile.h ++++ b/gdb/symfile.h +@@ -357,12 +357,18 @@ bool expand_symtabs_matching + void map_symbol_filenames (gdb::function_view fun, + bool need_fullname); + ++ + /* Target-agnostic function to load the sections of an executable into memory. + + ARGS should be in the form "EXECUTABLE [OFFSET]", where OFFSET is an + optional offset to apply to each section. */ + extern void generic_load (const char *args, int from_tty); + ++/* build-id support. */ ++extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr); ++extern void debug_print_missing (const char *binary, const char *debug); ++#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file") ++ + /* From minidebug.c. */ + + extern gdb_bfd_ref_ptr find_separate_debug_file_in_section (struct objfile *); +diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp +--- a/gdb/testsuite/gdb.base/corefile.exp ++++ b/gdb/testsuite/gdb.base/corefile.exp +@@ -347,3 +347,33 @@ gdb_test_multiple "core-file $corefile" $test { + pass $test + } + } ++ ++ ++# Test auto-loading of binary files through build-id from the core file. ++set buildid [build_id_debug_filename_get $binfile] ++set wholetest "binfile found by build-id" ++if {$buildid == ""} { ++ untested "$wholetest (binary has no build-id)" ++} else { ++ gdb_exit ++ gdb_start ++ ++ regsub {\.debug$} $buildid {} buildid ++ set debugdir [standard_output_file ${testfile}-debugdir] ++ file delete -force -- $debugdir ++ file mkdir $debugdir/[file dirname $buildid] ++ file copy $binfile $debugdir/$buildid ++ ++ set test "show debug-file-directory" ++ gdb_test_multiple $test $test { ++ -re "The directory where separate debug symbols are searched for is \"(.*)\"\\.\r\n$gdb_prompt $" { ++ set debugdir_orig $expect_out(1,string) ++ pass $test ++ } ++ } ++ gdb_test_no_output "set debug-file-directory $debugdir:$debugdir_orig" "set debug-file-directory" ++ gdb_test "show build-id-core-loads" {Whether CORE-FILE loads the build-id associated files automatically is on\.} ++ gdb_test "core-file $corefile" "\r\nProgram terminated with .*" "core-file without executable" ++ gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*" ++ pass $wholetest ++} +diff --git a/gdb/testsuite/gdb.base/gdbinit-history.exp b/gdb/testsuite/gdb.base/gdbinit-history.exp +--- a/gdb/testsuite/gdb.base/gdbinit-history.exp ++++ b/gdb/testsuite/gdb.base/gdbinit-history.exp +@@ -179,7 +179,8 @@ proc test_empty_history_filename { } { + global env + global gdb_prompt + +- set common_history [list "set height 0" "set width 0"] ++ set common_history [list "set height 0" "set width 0" \ ++ "set build-id-verbose 0"] + + set test_dir [standard_output_file history_test] + remote_exec host "mkdir -p $test_dir" +diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb.base/new-ui-pending-input.exp +--- a/gdb/testsuite/gdb.base/new-ui-pending-input.exp ++++ b/gdb/testsuite/gdb.base/new-ui-pending-input.exp +@@ -62,6 +62,7 @@ proc test_command_line_new_ui_pending_input {} { + set options "" + append options " -iex \"set height 0\"" + append options " -iex \"set width 0\"" ++ append options " -iex \"set build-id-verbose 0\"" + append options " -iex \"new-ui console $extra_tty_name\"" + append options " -ex \"b $bpline\"" + append options " -ex \"run\"" +diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp +--- a/gdb/testsuite/lib/gdb.exp ++++ b/gdb/testsuite/lib/gdb.exp +@@ -226,7 +226,8 @@ if ![info exists INTERNAL_GDBFLAGS] { + "-nx" \ + "-q" \ + {-iex "set height 0"} \ +- {-iex "set width 0"}]] ++ {-iex "set width 0"} \ ++ {-iex "set build-id-verbose 0"}]] + + # If DEBUGINFOD_URLS is set, gdb will try to download sources and + # debug info for f.i. system libraries. Prevent this. +@@ -2434,6 +2435,17 @@ proc default_gdb_start { } { + } + } + ++ # Turn off the missing warnings as the testsuite does not expect it. ++ send_gdb "set build-id-verbose 0\n" ++ gdb_expect 10 { ++ -re "$gdb_prompt $" { ++ verbose "Disabled the missing debug infos warnings." 2 ++ } ++ timeout { ++ warning "Could not disable the missing debug infos warnings.." ++ } ++ } ++ + gdb_debug_init + return 0 + } +diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp +--- a/gdb/testsuite/lib/mi-support.exp ++++ b/gdb/testsuite/lib/mi-support.exp +@@ -321,6 +321,16 @@ proc default_mi_gdb_start { { flags {} } } { + warning "Couldn't set the width to 0." + } + } ++ # Turn off the missing warnings as the testsuite does not expect it. ++ send_gdb "190-gdb-set build-id-verbose 0\n" ++ gdb_expect 10 { ++ -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" { ++ verbose "Disabled the missing debug infos warnings." 2 ++ } ++ timeout { ++ warning "Could not disable the missing debug infos warnings.." ++ } ++ } + + if { $separate_inferior_pty } { + mi_create_inferior_pty diff --git a/SOURCES/gdb-6.6-bz229517-gcore-without-terminal.patch b/SOURCES/gdb-6.6-bz229517-gcore-without-terminal.patch new file mode 100644 index 0000000..2c127cc --- /dev/null +++ b/SOURCES/gdb-6.6-bz229517-gcore-without-terminal.patch @@ -0,0 +1,188 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Jan Kratochvil +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.6-bz229517-gcore-without-terminal.patch + +;; Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517). +;;=fedoratest + +2007-04-22 Jan Kratochvil + + * gdb_gcore.sh: Redirect GDB from ` + + * gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files. + +diff --git a/gdb/testsuite/gdb.base/gcorebg.c b/gdb/testsuite/gdb.base/gcorebg.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcorebg.c +@@ -0,0 +1,49 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++int main (int argc, char **argv) ++{ ++ pid_t pid = 0; ++ pid_t ppid; ++ char buf[1024*2 + 500]; ++ int gotint; ++ ++ if (argc != 4) ++ { ++ fprintf (stderr, "Syntax: %s {standard|detached} \n", ++ argv[0]); ++ exit (1); ++ } ++ ++ pid = fork (); ++ ++ switch (pid) ++ { ++ case 0: ++ if (strcmp (argv[1], "detached") == 0) ++ setpgrp (); ++ ppid = getppid (); ++ gotint = snprintf (buf, sizeof (buf), "sh %s -o %s %d", argv[2], argv[3], (int) ppid); ++ assert (gotint < sizeof (buf)); ++ system (buf); ++ fprintf (stderr, "Killing parent PID %d\n", ppid); ++ kill (ppid, SIGTERM); ++ break; ++ ++ case -1: ++ perror ("fork err\n"); ++ exit (1); ++ break; ++ ++ default: ++ fprintf (stderr,"Sleeping as PID %d\n", getpid ()); ++ sleep (60); ++ } ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/gcorebg.exp b/gdb/testsuite/gdb.base/gcorebg.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gcorebg.exp +@@ -0,0 +1,113 @@ ++# Copyright 2007 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++# Please email any bugs, comments, and/or additions to this file to: ++# bug-gdb@prep.ai.mit.edu ++ ++# This file was written by Jan Kratochvil . ++# This is a test for `gdb_gcore.sh' functionality. ++# It also tests a regression with `gdb_gcore.sh' being run without its ++# accessible terminal. ++ ++if ![info exists GCORE] { ++ set GCORE "[standard_output_file ../../../../gcore]" ++} ++verbose "using GCORE = $GCORE" 2 ++ ++set testfile "gcorebg" ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++set corefile [standard_output_file ${testfile}.test] ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { ++ untested gcorebg.exp ++ return -1 ++} ++ ++# Cleanup. ++ ++proc core_clean {} { ++ global corefile ++ ++ foreach file [glob -nocomplain [join [list $corefile *] ""]] { ++ verbose "Delete file $file" 1 ++ remote_file target delete $file ++ } ++} ++core_clean ++remote_file target delete "./gdb" ++ ++# Generate the core file. ++ ++# Provide `./gdb' for `gdb_gcore.sh' running it as a bare `gdb' command. ++# Setup also `$PATH' appropriately. ++# If GDB was not found let `gdb_gcore.sh' to find the system GDB by `$PATH'. ++if {$GDB != "gdb"} { ++ file link ./gdb $GDB ++} ++global env ++set oldpath $env(PATH) ++set env(PATH) [join [list . $env(PATH)] ":"] ++verbose "PATH = $env(PATH)" 2 ++ ++# Test file body. ++# $detached == "standard" || $detached == "detached" ++ ++proc test_body { detached } { ++ global binfile ++ global GCORE ++ global corefile ++ ++ set res [remote_spawn target "$binfile $detached $GCORE $corefile"] ++ if { $res < 0 || $res == "" } { ++ fail "Spawning $detached gcore" ++ return 1 ++ } ++ pass "Spawning $detached gcore" ++ remote_expect target 20 { ++ timeout { ++ fail "Spawned $detached gcore finished (timeout)" ++ remote_exec target "kill -9 -[exp_pid -i $res]" ++ return 1 ++ } ++ "Saved corefile .*\r\nKilling parent PID " { ++ pass "Spawned $detached gcore finished" ++ remote_wait target 20 ++ } ++ } ++ ++ if {1 == [llength [glob -nocomplain [join [list $corefile *] ""]]]} { ++ pass "Core file generated by $detached gcore" ++ } else { ++ fail "Core file generated by $detached gcore" ++ } ++ core_clean ++} ++ ++# First a general `gdb_gcore.sh' spawn with its controlling terminal available. ++ ++test_body standard ++ ++# And now `gdb_gcore.sh' spawn without its controlling terminal available. ++# It is spawned through `gcorebg.c' using setpgrp (). ++ ++test_body detached ++ ++ ++# Cleanup. ++ ++set env(PATH) $oldpath ++remote_file target delete "./gdb" diff --git a/SOURCES/gdb-6.6-bz237572-ppc-atomic-sequence-test.patch b/SOURCES/gdb-6.6-bz237572-ppc-atomic-sequence-test.patch new file mode 100644 index 0000000..4faef13 --- /dev/null +++ b/SOURCES/gdb-6.6-bz237572-ppc-atomic-sequence-test.patch @@ -0,0 +1,278 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Jan Kratochvil +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch + +;; Support for stepping over PPC atomic instruction sequences (BZ 237572). +;;=fedoratest + +2007-06-25 Jan Kratochvil + + * gdb.threads/atomic-seq-threaded.c, + gdb.threads/atomic-seq-threaded.exp: New files. + +diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.c b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c +@@ -0,0 +1,171 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2007 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, ++ MA 02110-1301, USA. */ ++ ++/* Test stepping over RISC atomic sequences. ++ This variant testcases the code for stepping another thread while skipping ++ over the atomic sequence in the former thread ++ (STEPPING_PAST_SINGLESTEP_BREAKPOINT). ++ Code comes from gcc/testsuite/gcc.dg/sync-2.c */ ++ ++/* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ ++/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */ ++ ++/* Test functionality of the intrinsics for 'short' and 'char'. */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#define LOOPS 2 ++ ++static int unused; ++ ++static char AI[18]; ++static char init_qi[18] = { 3,5,7,9,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 }; ++static char test_qi[18] = { 3,5,7,9,1,4,22,-12,7,8,9,7,1,-12,7,8,9,7 }; ++ ++static void ++do_qi (void) ++{ ++ if (__sync_fetch_and_add(AI+4, 1) != 0) ++ abort (); ++ if (__sync_fetch_and_add(AI+5, 4) != 0) ++ abort (); ++ if (__sync_fetch_and_add(AI+6, 22) != 0) ++ abort (); ++ if (__sync_fetch_and_sub(AI+7, 12) != 0) ++ abort (); ++ if (__sync_fetch_and_and(AI+8, 7) != (char)-1) ++ abort (); ++ if (__sync_fetch_and_or(AI+9, 8) != 0) ++ abort (); ++ if (__sync_fetch_and_xor(AI+10, 9) != 0) ++ abort (); ++ if (__sync_fetch_and_nand(AI+11, 7) != 0) ++ abort (); ++ ++ if (__sync_add_and_fetch(AI+12, 1) != 1) ++ abort (); ++ if (__sync_sub_and_fetch(AI+13, 12) != (char)-12) ++ abort (); ++ if (__sync_and_and_fetch(AI+14, 7) != 7) ++ abort (); ++ if (__sync_or_and_fetch(AI+15, 8) != 8) ++ abort (); ++ if (__sync_xor_and_fetch(AI+16, 9) != 9) ++ abort (); ++ if (__sync_nand_and_fetch(AI+17, 7) != 7) ++ abort (); ++} ++ ++static short AL[18]; ++static short init_hi[18] = { 3,5,7,9,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 }; ++static short test_hi[18] = { 3,5,7,9,1,4,22,-12,7,8,9,7,1,-12,7,8,9,7 }; ++ ++static void ++do_hi (void) ++{ ++ if (__sync_fetch_and_add(AL+4, 1) != 0) ++ abort (); ++ if (__sync_fetch_and_add(AL+5, 4) != 0) ++ abort (); ++ if (__sync_fetch_and_add(AL+6, 22) != 0) ++ abort (); ++ if (__sync_fetch_and_sub(AL+7, 12) != 0) ++ abort (); ++ if (__sync_fetch_and_and(AL+8, 7) != -1) ++ abort (); ++ if (__sync_fetch_and_or(AL+9, 8) != 0) ++ abort (); ++ if (__sync_fetch_and_xor(AL+10, 9) != 0) ++ abort (); ++ if (__sync_fetch_and_nand(AL+11, 7) != 0) ++ abort (); ++ ++ if (__sync_add_and_fetch(AL+12, 1) != 1) ++ abort (); ++ if (__sync_sub_and_fetch(AL+13, 12) != -12) ++ abort (); ++ if (__sync_and_and_fetch(AL+14, 7) != 7) ++ abort (); ++ if (__sync_or_and_fetch(AL+15, 8) != 8) ++ abort (); ++ if (__sync_xor_and_fetch(AL+16, 9) != 9) ++ abort (); ++ if (__sync_nand_and_fetch(AL+17, 7) != 7) ++ abort (); ++} ++ ++static void * ++start1 (void *arg) ++{ ++ unsigned loop; ++ sleep(1); ++ ++ for (loop = 0; loop < LOOPS; loop++) ++ { ++ memcpy(AI, init_qi, sizeof(init_qi)); ++ ++ do_qi (); ++ ++ if (memcmp (AI, test_qi, sizeof(test_qi))) ++ abort (); ++ } ++ ++ return arg; /* _delete1_ */ ++} ++ ++static void * ++start2 (void *arg) ++{ ++ unsigned loop; ++ ++ for (loop = 0; loop < LOOPS; loop++) ++ { ++ memcpy(AL, init_hi, sizeof(init_hi)); ++ ++ do_hi (); ++ ++ if (memcmp (AL, test_hi, sizeof(test_hi))) ++ abort (); ++ } ++ ++ return arg; /* _delete2_ */ ++} ++ ++int ++main (int argc, char **argv) ++{ ++ pthread_t thread; ++ int i; ++ ++ i = pthread_create (&thread, NULL, start1, NULL); /* _create_ */ ++ assert (i == 0); /* _create_after_ */ ++ ++ sleep (1); ++ ++ start2 (NULL); ++ ++ i = pthread_join (thread, NULL); /* _delete_ */ ++ assert (i == 0); ++ ++ return 0; /* _exit_ */ ++} +diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp +@@ -0,0 +1,84 @@ ++# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs. ++# This variant testcases the code for stepping another thread while skipping ++# over the atomic sequence in the former thread ++# (STEPPING_PAST_SINGLESTEP_BREAKPOINT). ++# Copyright (C) 2007 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ++ ++# Please email any bugs, comments, and/or additions to this file to: ++# bug-gdb@prep.ai.mit.edu ++ ++set testfile atomic-seq-threaded ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++ ++foreach opts {{} {compiler=gcc4} {FAIL}} { ++ if {$opts eq "FAIL"} { ++ return -1 ++ } ++ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $opts]] eq "" } { ++ break ++ } ++} ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++ ++gdb_load ${binfile} ++if ![runto_main] then { ++ fail "Can't run to main" ++ return 0 ++} ++ ++# pthread_create () will not pass even on x86_64 with software watchpoint. ++# Pass after pthread_create () without any watchpoint active. ++set line [gdb_get_line_number "_create_after_"] ++gdb_test "tbreak $line" \ ++ "reakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \ ++ "set breakpoint after pthread_create ()" ++gdb_test "c" \ ++ ".*/\\* _create_after_ \\*/.*" \ ++ "run till after pthread_create ()" ++ ++# Without a watchpoint being software no single-stepping would be used. ++set test "Start (software) watchpoint" ++gdb_test_multiple "watch unused" $test { ++ -re "Watchpoint \[0-9\]+: unused.*$gdb_prompt $" { ++ pass $test ++ } ++ -re "Hardware watchpoint \[0-9\]+: unused.*$gdb_prompt $" { ++ # We do not test the goal but still the whole testcase should pass. ++ unsupported $test ++ } ++} ++ ++# More thorough testing of the scheduling logic. ++gdb_test "set scheduler-locking step" "" ++ ++# Critical code path is stepped through at this point. ++set line [gdb_get_line_number "_exit_"] ++gdb_test "tbreak $line" \ ++ "reakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \ ++ "set breakpoint at _exit_" ++gdb_test "c" \ ++ ".*/\\* _exit_ \\*/.*" \ ++ "run till _exit_" ++ ++# Just a nonproblematic program exit. ++gdb_test "c" \ ++ ".*Program exited normally\\..*" \ ++ "run till program exit" diff --git a/SOURCES/gdb-6.6-testsuite-timeouts.patch b/SOURCES/gdb-6.6-testsuite-timeouts.patch new file mode 100644 index 0000000..9a31a5b --- /dev/null +++ b/SOURCES/gdb-6.6-testsuite-timeouts.patch @@ -0,0 +1,32 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.6-testsuite-timeouts.patch + +;; Avoid too long timeouts on failing cases of "annota1.exp annota3.exp". +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp +--- a/gdb/testsuite/gdb.base/annota1.exp ++++ b/gdb/testsuite/gdb.base/annota1.exp +@@ -37,6 +37,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb + + clean_restart ${binfile} + ++gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions" ++ + # The commands we test here produce many lines of output; disable "press + # to continue" prompts. + gdb_test_no_output "set height 0" +diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp +--- a/gdb/testsuite/gdb.base/annota3.exp ++++ b/gdb/testsuite/gdb.base/annota3.exp +@@ -36,6 +36,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb + + clean_restart ${binfile} + ++gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions" ++ + # The commands we test here produce many lines of output; disable "press + # to continue" prompts. + gdb_test_no_output "set height 0" diff --git a/SOURCES/gdb-6.7-ppc-clobbered-registers-O2-test.patch b/SOURCES/gdb-6.7-ppc-clobbered-registers-O2-test.patch new file mode 100644 index 0000000..08ee2f9 --- /dev/null +++ b/SOURCES/gdb-6.7-ppc-clobbered-registers-O2-test.patch @@ -0,0 +1,108 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Jan Kratochvil +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.7-ppc-clobbered-registers-O2-test.patch + +;; Test PPC hiding of call-volatile parameter register. +;;=fedoratest + +2007-11-04 Jan Kratochvil + + * gdb.arch/ppc-clobbered-registers-O2.exp: `powerpc64' changed to + `powerpc*'. + +Testcase for: + +http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html + +2007-10-21 Luis Machado + + * rs6000-tdep.c (ppc_dwarf2_frame_init_reg): New function. + * (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as + default dwarf2_frame_set_init_reg function. + +diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c +@@ -0,0 +1,21 @@ ++ ++unsigned * __attribute__((noinline)) ++start_sequence (unsigned * x, unsigned * y) ++{ ++ return (unsigned *)0xdeadbeef; ++}; ++ ++unsigned __attribute__((noinline)) ++gen_movsd (unsigned * operand0, unsigned * operand1) ++{ ++ return *start_sequence(operand0, operand1); ++} ++ ++int main(void) ++{ ++ unsigned x, y; ++ ++ x = 13; ++ y = 14; ++ return (int)gen_movsd (&x, &y); ++} +diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp +@@ -0,0 +1,54 @@ ++# Copyright 2006 Free Software Foundation, Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# This file is part of the gdb testsuite. ++ ++# Test displaying call clobbered registers in optimized binaries for ppc. ++# GDB should not show incorrect values. ++ ++if ![istarget "powerpc*-*"] then { ++ verbose "Skipping powerpc* call clobbered registers testing." ++ return ++} ++ ++set testfile "ppc-clobbered-registers-O2" ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++set compile_flags "debug additional_flags=-O2" ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${compile_flags}] != "" } { ++ unsupported "Testcase compile failed." ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load ${binfile} ++ ++if ![runto_main] then { ++ perror "Couldn't run to breakpoint" ++ continue ++} ++ ++gdb_test "b start_sequence" ".*Breakpoint 2 at.*line 6.*" \ ++ "Insert breakpoint at problematic function" ++ ++gdb_test continue ".*Breakpoint 2.*in start_sequence.*" \ ++ "Run until problematic function" ++ ++gdb_test backtrace ".*operand0=.*operand1=.*" \ ++ "Check value of call clobbered registers" diff --git a/SOURCES/gdb-6.8-bz466901-backtrace-full-prelinked.patch b/SOURCES/gdb-6.8-bz466901-backtrace-full-prelinked.patch new file mode 100644 index 0000000..39d8947 --- /dev/null +++ b/SOURCES/gdb-6.8-bz466901-backtrace-full-prelinked.patch @@ -0,0 +1,481 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-6.8-bz466901-backtrace-full-prelinked.patch + +;; Fix resolving of variables at locations lists in prelinked libs (BZ 466901). +;;=fedoratest + +Fix resolving of variables at locations lists in prelinked libs (BZ 466901). + +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S +@@ -0,0 +1,328 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2008 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 ++ ++void ++func (void) ++{ ++ int i; ++ ++ abort (); ++} ++*/ ++ .file "dw2-loclist-prelinked.c" ++ .section .debug_abbrev,"",@progbits ++.Ldebug_abbrev0: ++ .section .debug_info,"",@progbits ++.Ldebug_info0: ++ .section .debug_line,"",@progbits ++.Ldebug_line0: ++ .text ++.Ltext0: ++.globl func ++ .type func, @function ++func: ++.LFB2: ++ .file 1 "dw2-loclist-prelinked.c" ++ .loc 1 5 0 ++ pushl %ebp ++.LCFI0: ++ movl %esp, %ebp ++.LCFI1: ++ subl $24, %esp ++.LCFI2: ++ .loc 1 8 0 ++ call abort ++.LFE2: ++ .size func, .-func ++ .section .debug_frame,"",@progbits ++.Lframe0: ++ .long .LECIE0-.LSCIE0 ++.LSCIE0: ++ .long 0xffffffff ++ .byte 0x1 ++ .string "" ++ .uleb128 0x1 ++ .sleb128 -4 ++ .byte 0x8 ++ .byte 0xc ++ .uleb128 0x4 ++ .uleb128 0x4 ++ .byte 0x88 ++ .uleb128 0x1 ++ .align 4 ++.LECIE0: ++.LSFDE0: ++ .long .LEFDE0-.LASFDE0 ++.LASFDE0: ++ .long .Lframe0 ++ .long .LFB2 ++ .long .LFE2-.LFB2 ++ .byte 0x4 ++ .long .LCFI0-.LFB2 ++ .byte 0xe ++ .uleb128 0x8 ++ .byte 0x85 ++ .uleb128 0x2 ++ .byte 0x4 ++ .long .LCFI1-.LCFI0 ++ .byte 0xd ++ .uleb128 0x5 ++ .align 4 ++.LEFDE0: ++ .text ++.Letext0: ++ .section .debug_loc,"",@progbits ++.Ldebug_loc0: ++.LLST0: ++ .long .LFB2-.Ltext0 ++ .long .LCFI0-.Ltext0 ++ .value 0x2 ++ .byte 0x74 ++ .sleb128 4 ++ .long .LCFI0-.Ltext0 ++ .long .LCFI1-.Ltext0 ++ .value 0x2 ++ .byte 0x74 ++ .sleb128 8 ++ .long .LCFI1-.Ltext0 ++ .long .LFE2-.Ltext0 ++ .value 0x2 ++ .byte 0x75 ++ .sleb128 8 ++ .long 0x0 ++ .long 0x0 ++ .section .debug_info ++ .long 0x94 ++ .value 0x2 ++ .long .Ldebug_abbrev0 ++ .byte 0x4 ++ .uleb128 0x1 ++ .long .LASF10 ++ .byte 0x1 ++ .long .LASF11 ++ .long .LASF12 ++ .long .Ltext0 ++ .long .Letext0 ++ .long .Ldebug_line0 ++ .uleb128 0x2 ++ .byte 0x4 ++ .byte 0x7 ++ .long .LASF0 ++ .uleb128 0x3 ++ .byte 0x4 ++ .byte 0x5 ++ .string "int" ++ .uleb128 0x2 ++ .byte 0x4 ++ .byte 0x5 ++ .long .LASF1 ++ .uleb128 0x2 ++ .byte 0x1 ++ .byte 0x8 ++ .long .LASF2 ++ .uleb128 0x2 ++ .byte 0x2 ++ .byte 0x7 ++ .long .LASF3 ++ .uleb128 0x2 ++ .byte 0x4 ++ .byte 0x7 ++ .long .LASF4 ++ .uleb128 0x2 ++ .byte 0x1 ++ .byte 0x6 ++ .long .LASF5 ++ .uleb128 0x2 ++ .byte 0x2 ++ .byte 0x5 ++ .long .LASF6 ++ .uleb128 0x2 ++ .byte 0x8 ++ .byte 0x5 ++ .long .LASF7 ++ .uleb128 0x2 ++ .byte 0x8 ++ .byte 0x7 ++ .long .LASF8 ++ .uleb128 0x4 ++ .byte 0x4 ++ .byte 0x7 ++ .uleb128 0x2 ++ .byte 0x1 ++ .byte 0x6 ++ .long .LASF9 ++ .uleb128 0x5 ++ .byte 0x1 ++ .long .LASF13 ++ .byte 0x1 ++ .byte 0x5 ++ .byte 0x1 ++ .long .LFB2 ++ .long .LFE2 ++ .long .LLST0 ++ .uleb128 0x6 ++ .string "i" ++ .byte 0x1 ++ .byte 0x6 ++ .long 0x2c ++ .byte 0x2 ++ .byte 0x91 ++ .sleb128 -12 ++ .byte 0x0 ++ .byte 0x0 ++ .section .debug_abbrev ++ .uleb128 0x1 ++ .uleb128 0x11 ++ .byte 0x1 ++ .uleb128 0x25 ++ .uleb128 0xe ++ .uleb128 0x13 ++ .uleb128 0xb ++ .uleb128 0x3 ++ .uleb128 0xe ++ .uleb128 0x1b ++ .uleb128 0xe ++ .uleb128 0x11 ++ .uleb128 0x1 ++ .uleb128 0x12 ++ .uleb128 0x1 ++ .uleb128 0x10 ++ .uleb128 0x6 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x2 ++ .uleb128 0x24 ++ .byte 0x0 ++ .uleb128 0xb ++ .uleb128 0xb ++ .uleb128 0x3e ++ .uleb128 0xb ++ .uleb128 0x3 ++ .uleb128 0xe ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x3 ++ .uleb128 0x24 ++ .byte 0x0 ++ .uleb128 0xb ++ .uleb128 0xb ++ .uleb128 0x3e ++ .uleb128 0xb ++ .uleb128 0x3 ++ .uleb128 0x8 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x4 ++ .uleb128 0x24 ++ .byte 0x0 ++ .uleb128 0xb ++ .uleb128 0xb ++ .uleb128 0x3e ++ .uleb128 0xb ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x5 ++ .uleb128 0x2e ++ .byte 0x1 ++ .uleb128 0x3f ++ .uleb128 0xc ++ .uleb128 0x3 ++ .uleb128 0xe ++ .uleb128 0x3a ++ .uleb128 0xb ++ .uleb128 0x3b ++ .uleb128 0xb ++ .uleb128 0x27 ++ .uleb128 0xc ++ .uleb128 0x11 ++ .uleb128 0x1 ++ .uleb128 0x12 ++ .uleb128 0x1 ++ .uleb128 0x40 ++ .uleb128 0x6 ++ .byte 0x0 ++ .byte 0x0 ++ .uleb128 0x6 ++ .uleb128 0x34 ++ .byte 0x0 ++ .uleb128 0x3 ++ .uleb128 0x8 ++ .uleb128 0x3a ++ .uleb128 0xb ++ .uleb128 0x3b ++ .uleb128 0xb ++ .uleb128 0x49 ++ .uleb128 0x13 ++ .uleb128 0x2 ++ .uleb128 0xa ++ .byte 0x0 ++ .byte 0x0 ++ .byte 0x0 ++ .section .debug_pubnames,"",@progbits ++ .long 0x17 ++ .value 0x2 ++ .long .Ldebug_info0 ++ .long 0x98 ++ .long 0x75 ++ .string "func" ++ .long 0x0 ++ .section .debug_aranges,"",@progbits ++ .long 0x1c ++ .value 0x2 ++ .long .Ldebug_info0 ++ .byte 0x4 ++ .byte 0x0 ++ .value 0x0 ++ .value 0x0 ++ .long .Ltext0 ++ .long .Letext0-.Ltext0 ++ .long 0x0 ++ .long 0x0 ++ .section .debug_str,"MS",@progbits,1 ++.LASF7: ++ .string "long long int" ++.LASF0: ++ .string "unsigned int" ++.LASF11: ++ .string "dw2-loclist-prelinked.c" ++.LASF12: ++ .string "gdb-6.8/gdb/testsuite/gdb.dwarf2" ++.LASF4: ++ .string "long unsigned int" ++.LASF8: ++ .string "long long unsigned int" ++.LASF2: ++ .string "unsigned char" ++.LASF9: ++ .string "char" ++.LASF1: ++ .string "long int" ++.LASF3: ++ .string "short unsigned int" ++.LASF5: ++ .string "signed char" ++.LASF10: ++ .string "GNU C 4.3.2 20081007 (Red Hat 4.3.2-6)" ++.LASF13: ++ .string "func" ++.LASF6: ++ .string "short int" ++ .ident "GCC: (GNU) 4.3.2 20081007 (Red Hat 4.3.2-6)" ++ .section .note.GNU-stack,"",@progbits +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c +@@ -0,0 +1,26 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2008 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 . */ ++ ++/* dw2-loclist-prelinked-func.S */ ++extern void func (void); ++ ++int ++main (void) ++{ ++ func (); ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp +@@ -0,0 +1,102 @@ ++# Copyright 2008 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++# Minimal DWARF-2 unit test ++ ++# This test can only be run on i386/x86_64 targets which support DWARF-2. ++# For now pick a sampling of likely targets. ++if {(![istarget *-*-linux*] ++ && ![istarget *-*-gnu*] ++ && ![istarget *-*-elf*] ++ && ![istarget *-*-openbsd*]) ++ || (![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"])} { ++ return 0 ++} ++ ++set testfile "dw2-loclist-prelinked" ++set srcfuncfile ${testfile}-func.S ++set binsharedfuncfile [standard_output_file ${testfile}.so] ++set srcmainfile ${testfile}-main.c ++set binfile [standard_output_file ${testfile}] ++ ++remote_exec build "rm -f ${binfile}" ++ ++# get the value of gcc_compiled ++if [get_compiler_info ${binfile}] { ++ return -1 ++} ++ ++# This test can only be run on gcc as we use additional_flags=FIXME ++if {$gcc_compiled == 0} { ++ return 0 ++} ++ ++if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfuncfile}" "${binsharedfuncfile}" {debug additional_flags=-m32}] != "" } { ++ untested "Couldn't compile test library" ++ return -1 ++} ++ ++# The new separate debug info file will be stored in the .debug subdirectory. ++ ++if [gdb_gnu_strip_debug ${binsharedfuncfile}] { ++ # check that you have a recent version of strip and objcopy installed ++ unsupported "cannot produce separate debug info files" ++ return -1 ++} ++ ++if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${binsharedfuncfile}\""] != 0} { ++ # Maybe we don't have prelink. ++ return -1 ++} ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" \ ++ "${binfile}" executable [list debug additional_flags=-m32 shlib=${binsharedfuncfile}]] != "" } { ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load ${binfile} ++ ++gdb_run_cmd ++ ++gdb_test "" "Program received signal SIGABRT, Aborted..*" "Enter abort()" ++ ++# Incorrect: ++# #0 0x00110430 in __kernel_vsyscall () ++# No symbol table info available. ++# #1 0x003d44c0 in raise () from /lib/libc.so.6 ++# No symbol table info available. ++# #2 0x003d5e88 in abort () from /lib/libc.so.6 ++# No symbol table info available. ++# #3 0x44f10437 in func () at dw2-loclist-prelinked.c:8 ++# i = Could not find the frame base for "func". ++ ++# Correct: ++# #0 0x00110430 in __kernel_vsyscall () ++# No symbol table info available. ++# #1 0x003d44c0 in raise () from /lib/libc.so.6 ++# No symbol table info available. ++# #2 0x003d5e88 in abort () from /lib/libc.so.6 ++# No symbol table info available. ++# #3 0x4ae36437 in func () at dw2-loclist-prelinked.c:8 ++# i = 3827288 ++# #4 0x0804851a in main () at ../../../gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c:24 ++# No locals. ++ ++# `abort' can get expressed as `*__GI_abort'. ++gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\r\n\[\t \]+i = -?\[0-9\].*in main \\(.*" "Backtrace after abort()" diff --git a/SOURCES/gdb-add-index.patch b/SOURCES/gdb-add-index.patch new file mode 100644 index 0000000..5039172 --- /dev/null +++ b/SOURCES/gdb-add-index.patch @@ -0,0 +1,77 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-add-index.patch + +;; Update gdb-add-index.sh such that, when the GDB environment +;; variable is not set, the script is smarter than just looking for +;; 'gdb' in the $PATH. +;; +;; The actual search order is now: /usr/bin/gdb.minimal, gdb (in the +;; $PATH), then /usr/libexec/gdb. +;; +;; For the rationale of looking for gdb.minimal see: +;; +;; https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot +;; +;;=fedora + +diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh +--- a/gdb/contrib/gdb-add-index.sh ++++ b/gdb/contrib/gdb-add-index.sh +@@ -16,14 +16,52 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + +-# This program assumes gdb and objcopy are in $PATH. +-# If not, or you want others, pass the following in the environment +-GDB=${GDB:=gdb} ++# This program assumes objcopy and readelf are in $PATH. If not, or ++# you want others, pass the following in the environment + OBJCOPY=${OBJCOPY:=objcopy} + READELF=${READELF:=readelf} + + myname="${0##*/}" + ++# For GDB itself we need to be a little smarter. If GDB is set in the ++# environment then we will use that. But if GDB is not set in the ++# environment then we have a couple of options that we need to check ++# through. ++# ++# Our default choice is for /usr/bin/gdb.minimal. For an explanation ++# of why this is chosen, check out: ++# https://bugzilla.redhat.com/show_bug.cgi?id=1695015 ++# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot ++# ++# If gdb.minimal is not found then we look for a 'gdb' executable on ++# the path. ++# ++# And finally, we check for /usr/libexec/gdb. ++# ++# If none of those result in a useable GDB then we give an error and ++# exit. ++if test -z "$GDB"; then ++ for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb; do ++ if ! which "$possible_gdb" >/dev/null 2>&1; then ++ continue ++ fi ++ ++ possible_gdb=$(which "$possible_gdb") ++ ++ if ! test -x "$possible_gdb"; then ++ continue ++ fi ++ ++ GDB="$possible_gdb" ++ break ++ done ++ ++ if test -z "$GDB"; then ++ echo "$myname: Failed to find a useable GDB binary" 1>&2 ++ exit 1 ++ fi ++fi ++ + dwarf5="" + if [ "$1" = "-dwarf-5" ]; then + dwarf5="$1" diff --git a/SOURCES/gdb-archer-next-over-throw-cxx-exec.patch b/SOURCES/gdb-archer-next-over-throw-cxx-exec.patch new file mode 100644 index 0000000..ba71cd3 --- /dev/null +++ b/SOURCES/gdb-archer-next-over-throw-cxx-exec.patch @@ -0,0 +1,88 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-archer-next-over-throw-cxx-exec.patch + +;; Fix follow-exec for C++ programs (bugreported by Martin Stransky). +;;=fedoratest + +Archer-upstreamed: +http://sourceware.org/ml/archer/2010-q2/msg00031.html + +diff --git a/gdb/testsuite/gdb.cp/cxxexec.cc b/gdb/testsuite/gdb.cp/cxxexec.cc +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.cp/cxxexec.cc +@@ -0,0 +1,25 @@ ++/* This test script is part of GDB, the GNU debugger. ++ ++ Copyright 2010 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 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 ++ ++int ++main() ++{ ++ execlp ("true", "true", NULL); ++ return 1; ++} +diff --git a/gdb/testsuite/gdb.cp/cxxexec.exp b/gdb/testsuite/gdb.cp/cxxexec.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.cp/cxxexec.exp +@@ -0,0 +1,42 @@ ++# Copyright 2010 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 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 . ++ ++if { [skip_cplus_tests] } { continue } ++ ++set testfile cxxexec ++if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.cc {c++ debug}] } { ++ return -1 ++} ++ ++runto_main ++ ++# We could stop after `continue' again at `main'. ++delete_breakpoints ++ ++set test "p _Unwind_DebugHook" ++gdb_test_multiple $test $test { ++ -re " = .* 0x\[0-9a-f\].*\r\n$gdb_prompt $" { ++ pass $test ++ } ++ -re "\r\nNo symbol .*\r\n$gdb_prompt $" { ++ xfail $test ++ untested ${testfile}.exp ++ return -1 ++ } ++} ++ ++# Run to end. The buggy GDB failed instead with: ++# Cannot access memory at address ADDR. ++gdb_continue_to_end "" "continue" 1 diff --git a/SOURCES/gdb-bz634108-solib_address.patch b/SOURCES/gdb-bz634108-solib_address.patch new file mode 100644 index 0000000..58b473f --- /dev/null +++ b/SOURCES/gdb-bz634108-solib_address.patch @@ -0,0 +1,41 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-bz634108-solib_address.patch + +;; Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). +;;=fedoratest + +Fix gdb.solib_address (fix by Phil Muldoon). + +s/solib_address/solib_name/ during upstreaming. + +diff --git a/gdb/testsuite/gdb.python/rh634108-solib_address.exp b/gdb/testsuite/gdb.python/rh634108-solib_address.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp +@@ -0,0 +1,24 @@ ++# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 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 . ++ ++# https://bugzilla.redhat.com/show_bug.cgi?id=634108 ++ ++gdb_exit ++gdb_start ++ ++# Skip all tests if Python scripting is not enabled. ++if { [skip_python_tests] } { continue } ++ ++gdb_test "python print (gdb.solib_name(-1))" "None" "gdb.solib_name exists" diff --git a/SOURCES/gdb-container-rh-pkg.patch b/SOURCES/gdb-container-rh-pkg.patch new file mode 100644 index 0000000..7107e5d --- /dev/null +++ b/SOURCES/gdb-container-rh-pkg.patch @@ -0,0 +1,30 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-container-rh-pkg.patch + +;; Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). +;;=fedora + +diff --git a/gdb/remote.c b/gdb/remote.c +--- a/gdb/remote.c ++++ b/gdb/remote.c +@@ -14742,7 +14742,17 @@ remote_target::pid_to_exec_file (int pid) + char *annex = NULL; + + if (m_features.packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) +- return NULL; ++ { ++ warning (_("Remote gdbserver does not support determining executable " ++ "automatically.\n" ++"RHEL <=6.8 and <=7.2 versions of gdbserver do not support such automatic executable detection.\n" ++"The following versions of gdbserver support it:\n" ++"- Upstream version of gdbserver (unsupported) 7.10 or later\n" ++"- Red Hat Developer Toolset (DTS) version of gdbserver from DTS 4.0 or later (only on x86_64)\n" ++"- RHEL-7.3 versions of gdbserver (on any architecture)" ++)); ++ return NULL; ++ } + + inferior *inf = find_inferior_pid (this, pid); + if (inf == NULL) diff --git a/SOURCES/gdb-core-open-vdso-warning.patch b/SOURCES/gdb-core-open-vdso-warning.patch new file mode 100644 index 0000000..fdd06fb --- /dev/null +++ b/SOURCES/gdb-core-open-vdso-warning.patch @@ -0,0 +1,58 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-core-open-vdso-warning.patch + +;; Fix GNU/Linux core open: Can't read pathname for load map: Input/output error. +;; Fix regression of undisplayed missing shared libraries caused by a fix for. +;;=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*> + +http://sourceware.org/ml/gdb-patches/2009-10/msg00142.html +Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Input/output error. + +[ New patch variant. ] + +commit 7d760051ffb8a23cdc51342d4e6243fbc462f73f +Author: Ulrich Weigand +Date: Wed Sep 25 11:52:50 2013 +0000 + +diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp +--- a/gdb/testsuite/gdb.base/solib-symbol.exp ++++ b/gdb/testsuite/gdb.base/solib-symbol.exp +@@ -27,6 +27,7 @@ set testfile "solib-symbol-main" + set srcfile ${srcdir}/${subdir}/${testfile}.c + set binfile [standard_output_file ${testfile}] + set bin_flags [list debug shlib=${binfile_lib}] ++set executable ${testfile} + + if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != "" + || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } { +@@ -61,4 +62,28 @@ gdb_test "br foo2" \ + "Breakpoint.*: foo2. .2 locations..*" \ + "foo2 in mdlib" + ++# Test GDB warns for shared libraris which have not been found. ++ ++gdb_test "info sharedlibrary" "/${libname}.*" ++ ++clean_restart ${executable} ++gdb_breakpoint "main" ++gdb_run_cmd ++set test "no warning for missing libraries" ++gdb_test_multiple "" $test { ++ -re "warning: Could not load shared library symbols for \[0-9\]+ libraries,.*\r\n$gdb_prompt $" { ++ fail $test ++ } ++ -re "Breakpoint \[0-9\]+, main .*\r\n$gdb_prompt $" { ++ pass $test ++ } ++} ++ ++clean_restart ${executable} ++gdb_test_no_output "set solib-absolute-prefix /doESnotEXIST" ++gdb_breakpoint "main" ++gdb_run_cmd ++gdb_test "" "warning: Could not load shared library symbols for \[0-9\]+ libraries,.*\r\nBreakpoint \[0-9\]+, main .*" \ ++ "warning for missing libraries" ++ + gdb_exit diff --git a/SOURCES/gdb-fedora-libncursesw.patch b/SOURCES/gdb-fedora-libncursesw.patch new file mode 100644 index 0000000..1bb640d --- /dev/null +++ b/SOURCES/gdb-fedora-libncursesw.patch @@ -0,0 +1,333 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-fedora-libncursesw.patch + +;; Force libncursesw over libncurses to match the includes (RH BZ 1270534). +;;=push+jan + +Fedora: Force libncursesw over libncurses to match the includes. +https://bugzilla.redhat.com/show_bug.cgi?id=1270534 + +diff --git a/gdb/configure b/gdb/configure +--- a/gdb/configure ++++ b/gdb/configure +@@ -780,9 +780,6 @@ ENABLE_BFD_64_BIT_TRUE + subdirs + RPM_LIBS + RPM_CFLAGS +-PKG_CONFIG_LIBDIR +-PKG_CONFIG_PATH +-PKG_CONFIG + GDB_DATADIR + DEBUGDIR + MAKEINFO_EXTRA_FLAGS +@@ -990,12 +987,12 @@ PKG_CONFIG_PATH + PKG_CONFIG_LIBDIR + MAKEINFO + MAKEINFOFLAGS ++RPM_CFLAGS ++RPM_LIBS + AMD_DBGAPI_CFLAGS + AMD_DBGAPI_LIBS + DEBUGINFOD_CFLAGS + DEBUGINFOD_LIBS +-RPM_CFLAGS +-RPM_LIBS + YACC + YFLAGS + ZSTD_CFLAGS +@@ -1684,11 +1681,11 @@ Optional Packages: + [--with-auto-load-dir] + --without-auto-load-safe-path + do not restrict auto-loaded files locations ++ --with-rpm query rpm database for missing debuginfos (yes/no, ++ def. auto=librpm.so) + --with-amd-dbgapi support for the amd-dbgapi target (yes / no / auto) + --with-debuginfod Enable debuginfo lookups with debuginfod + (auto/yes/no) +- --with-rpm query rpm database for missing debuginfos (yes/no, +- def. auto=librpm.so) + --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets + --with-curses use the curses library instead of the termcap + library +@@ -1761,6 +1758,8 @@ Some influential environment variables: + MAKEINFO Parent configure detects if it is of sufficient version. + MAKEINFOFLAGS + Parameters for MAKEINFO. ++ RPM_CFLAGS C compiler flags for RPM, overriding pkg-config ++ RPM_LIBS linker flags for RPM, overriding pkg-config + AMD_DBGAPI_CFLAGS + C compiler flags for AMD_DBGAPI, overriding pkg-config + AMD_DBGAPI_LIBS +@@ -1769,8 +1768,6 @@ Some influential environment variables: + C compiler flags for DEBUGINFOD, overriding pkg-config + DEBUGINFOD_LIBS + linker flags for DEBUGINFOD, overriding pkg-config +- RPM_CFLAGS C compiler flags for RPM, overriding pkg-config +- RPM_LIBS linker flags for RPM, overriding pkg-config + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. +@@ -11495,7 +11492,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11486 "configure" ++#line 11495 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11601,7 +11598,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11592 "configure" ++#line 11601 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -18102,8 +18099,8 @@ $as_echo_n "checking specific librpm version... " >&6; } + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "cannot run test program while cross compiling +-See \`config.log' for more details." "$LINENO" 5; } ++as_fn_error $? "cannot run test program while cross compiling ++See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -18275,132 +18272,12 @@ $as_echo "#define HAVE_LIBRPM 1" >>confdefs.h + $as_echo "no" >&6; } + LIBS="$save_LIBS" + if $DLOPEN_REQUIRE; then +- as_fn_error "Specific name $LIBRPM was requested but it could not be opened." "$LINENO" 5 ++ as_fn_error $? "Specific name $LIBRPM was requested but it could not be opened." "$LINENO" 5 + fi + +- +- +- +- +- +- +-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then +- if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $PKG_CONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-PKG_CONFIG=$ac_cv_path_PKG_CONFIG +-if test -n "$PKG_CONFIG"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +-$as_echo "$PKG_CONFIG" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +-fi +-if test -z "$ac_cv_path_PKG_CONFIG"; then +- ac_pt_PKG_CONFIG=$PKG_CONFIG +- # Extract the first word of "pkg-config", so it can be a program name with args. +-set dummy pkg-config; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $ac_pt_PKG_CONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +-if test -n "$ac_pt_PKG_CONFIG"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +-$as_echo "$ac_pt_PKG_CONFIG" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- if test "x$ac_pt_PKG_CONFIG" = x; then +- PKG_CONFIG="" +- else +- case $cross_compiling:$ac_tool_warned in +-yes:) +-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +-ac_tool_warned=yes ;; +-esac +- PKG_CONFIG=$ac_pt_PKG_CONFIG +- fi +-else +- PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +-fi +- +-fi +-if test -n "$PKG_CONFIG"; then +- _pkg_min_version=0.9.0 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } +- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- PKG_CONFIG="" +- fi +-fi +- + pkg_failed=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPM" >&5 +-$as_echo_n "checking for RPM... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpm" >&5 ++$as_echo_n "checking for rpm... " >&6; } + + if test -n "$RPM_CFLAGS"; then + pkg_cv_RPM_CFLAGS="$RPM_CFLAGS" +@@ -18437,6 +18314,30 @@ fi + pkg_failed=untried + fi + ++if test $pkg_failed = no; then ++ pkg_save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS $pkg_cv_RPM_LIBS" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ++else ++ pkg_failed=yes ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ LDFLAGS=$pkg_save_LDFLAGS ++fi ++ + + + if test $pkg_failed = yes; then +@@ -18531,7 +18432,7 @@ $as_echo "#define HAVE_LIBRPM 1" >>confdefs.h + LIBS="$LIBS $RPM_LIBS" + else + if $RPM_REQUIRE; then +- as_fn_error "$RPM_PKG_ERRORS" "$LINENO" 5 ++ as_fn_error $? "$RPM_PKG_ERRORS" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $RPM_PKG_ERRORS" >&5 + $as_echo "$as_me: WARNING: $RPM_PKG_ERRORS" >&2;} +@@ -21164,6 +21065,7 @@ if test x"$prefer_curses" = xyes; then + # search /usr/local/include, if ncurses is installed in /usr/local. A + # default installation of ncurses on alpha*-dec-osf* will lead to such + # a situation. ++ # Fedora: Force libncursesw over libncurses to match the includes. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 + $as_echo_n "checking for library containing waddstr... " >&6; } + if ${ac_cv_search_waddstr+:} false; then : +@@ -21188,7 +21090,7 @@ return waddstr (); + return 0; + } + _ACEOF +-for ac_lib in '' ncursesw ncurses cursesX curses; do ++for ac_lib in '' ncursesw; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -21260,6 +21162,7 @@ case $host_os in + esac + + # These are the libraries checked by Readline. ++# Fedora: Force libncursesw over libncurses to match the includes. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 + $as_echo_n "checking for library containing tgetent... " >&6; } + if ${ac_cv_search_tgetent+:} false; then : +@@ -21284,7 +21187,7 @@ return tgetent (); + return 0; + } + _ACEOF +-for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do ++for ac_lib in '' ncursesw; do + if test -z "$ac_lib"; then + ac_res="none required" + else +diff --git a/gdb/configure.ac b/gdb/configure.ac +--- a/gdb/configure.ac ++++ b/gdb/configure.ac +@@ -749,7 +749,8 @@ if test x"$prefer_curses" = xyes; then + # search /usr/local/include, if ncurses is installed in /usr/local. A + # default installation of ncurses on alpha*-dec-osf* will lead to such + # a situation. +- AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses], ++ # Fedora: Force libncursesw over libncurses to match the includes. ++ AC_SEARCH_LIBS(waddstr, [ncursesw], + [curses_found=yes + AC_DEFINE([HAVE_LIBCURSES], [1], + [Define to 1 if curses is enabled.]) +@@ -789,7 +790,8 @@ case $host_os in + esac + + # These are the libraries checked by Readline. +-AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses]) ++# Fedora: Force libncursesw over libncurses to match the includes. ++AC_SEARCH_LIBS(tgetent, [ncursesw]) + + if test "$ac_cv_search_tgetent" = no; then + CONFIG_OBS="$CONFIG_OBS stub-termcap.o" diff --git a/SOURCES/gdb-ftbs-swapped-calloc-args.patch b/SOURCES/gdb-ftbs-swapped-calloc-args.patch new file mode 100644 index 0000000..3486c8e --- /dev/null +++ b/SOURCES/gdb-ftbs-swapped-calloc-args.patch @@ -0,0 +1,42 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Kevin Buettner +Date: Wed, 17 Jan 2024 12:53:53 -0700 +Subject: gdb-ftbs-swapped-calloc-args.patch + +Backport upstream commit 54195469c18ec9873cc5ba6907f768509473fa9b +which fixes a build problem in which arguments to calloc were swapped. + +[opcodes] ARC + PPC: Fix -Walloc-size warnings + +Recently, -Walloc-size warnings started to kick in. Fix these two +calloc() calls to match the intended usage pattern. + +opcodes/ChangeLog: + + * arc-dis.c (init_arc_disasm_info): Fix calloc() call. + * ppc-dis.c (powerpc_init_dialect): Ditto. + +diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c +--- a/opcodes/arc-dis.c ++++ b/opcodes/arc-dis.c +@@ -147,7 +147,7 @@ static bool + init_arc_disasm_info (struct disassemble_info *info) + { + struct arc_disassemble_info *arc_infop +- = calloc (sizeof (*arc_infop), 1); ++ = calloc (1, sizeof (*arc_infop)); + + if (arc_infop == NULL) + return false; +diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c +--- a/opcodes/ppc-dis.c ++++ b/opcodes/ppc-dis.c +@@ -348,7 +348,7 @@ powerpc_init_dialect (struct disassemble_info *info) + { + ppc_cpu_t dialect = 0; + ppc_cpu_t sticky = 0; +- struct dis_private *priv = calloc (sizeof (*priv), 1); ++ struct dis_private *priv = calloc (1, sizeof (*priv)); + + if (priv == NULL) + return; diff --git a/SOURCES/gdb-glibc-strstr-workaround.patch b/SOURCES/gdb-glibc-strstr-workaround.patch new file mode 100644 index 0000000..da9c5de --- /dev/null +++ b/SOURCES/gdb-glibc-strstr-workaround.patch @@ -0,0 +1,132 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-glibc-strstr-workaround.patch + +;; Workaround PR libc/14166 for inferior calls of strstr. +;;=fedoratest: Compatibility with RHELs (unchecked which ones). + +diff --git a/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp +@@ -0,0 +1,119 @@ ++# Copyright (C) 2012 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 . ++ ++# Workaround for: ++# invalid IFUNC DW_AT_linkage_name: memmove strstr time ++# http://sourceware.org/bugzilla/show_bug.cgi?id=14166 ++ ++if {[skip_shlib_tests]} { ++ return 0 ++} ++ ++set testfile "gnu-ifunc-strstr-workaround" ++set executable ${testfile} ++set srcfile start.c ++set binfile [standard_output_file ${executable}] ++ ++if [prepare_for_testing ${testfile}.exp $executable $srcfile] { ++ return -1 ++} ++ ++if ![runto_main] { ++ return 0 ++} ++ ++set test "ptype atoi" ++gdb_test_multiple $test $test { ++ -re "type = int \\(const char \\*\\)\r\n$gdb_prompt $" { ++ pass $test ++ } ++ -re "type = int \\(\\)\r\n$gdb_prompt $" { ++ untested "$test (no DWARF)" ++ return 0 ++ } ++ -re "type = \\(\\)\r\n$gdb_prompt $" { ++ untested "$test (no DWARF)" ++ return 0 ++ } ++} ++ ++set addr "" ++set test "print strstr" ++gdb_test_multiple $test $test { ++ -re " = {} (0x\[0-9a-f\]+) \r\n$gdb_prompt $" { ++ set addr $expect_out(1,string) ++ pass $test ++ } ++ -re " = {} (0x\[0-9a-f\]+) <__strstr>\r\n$gdb_prompt $" { ++ set addr $expect_out(1,string) ++ pass "$test (GDB workaround)" ++ } ++ -re " = {} (0x\[0-9a-f\]+) <__libc_strstr>\r\n$gdb_prompt $" { ++ set addr $expect_out(1,string) ++ pass "$test (fixed glibc)" ++ } ++ -re " = {} (0x\[0-9a-f\]+) <__libc_strstr_ifunc>\r\n$gdb_prompt $" { ++ set addr $expect_out(1,string) ++ pass "$test (fixed glibc)" ++ } ++ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ \r\n$gdb_prompt $" { ++ untested "$test (gnu-ifunc not in use by glibc)" ++ return 0 ++ } ++} ++ ++set test "info sym" ++gdb_test_multiple "info sym $addr" $test { ++ -re "strstr in section \\.text of /lib\[^/\]*/libc.so.6\r\n$gdb_prompt $" { ++ pass $test ++ } ++ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ \r\n$gdb_prompt $" { ++ # unexpected ++ xfail "$test (not in libc.so.6)" ++ return 0 ++ } ++} ++ ++set test "info addr strstr" ++gdb_test_multiple $test $test { ++ -re "Symbol \"strstr\" is a function at address $addr\\.\r\n$gdb_prompt $" { ++ fail "$test (DWARF for strstr)" ++ } ++ -re "Symbol \"strstr\" is at $addr in a file compiled without debugging\\.\r\n$gdb_prompt $" { ++ pass "$test" ++ } ++} ++ ++set test "print strstr second time" ++gdb_test_multiple "print strstr" $test { ++ -re " = {} $addr \r\n$gdb_prompt $" { ++ pass $test ++ } ++ -re " = {} $addr <__strstr>\r\n$gdb_prompt $" { ++ pass "$test (GDB workaround)" ++ } ++ -re " = {} $addr <__libc_strstr>\r\n$gdb_prompt $" { ++ pass "$test (fixed glibc)" ++ } ++ -re " = {} $addr <__libc_strstr_ifunc>\r\n$gdb_prompt $" { ++ pass "$test (fixed glibc)" ++ } ++ -re " = {void \\*\\(void\\)} 0x\[0-9a-f\]+ \r\n$gdb_prompt $" { ++ fail $test ++ } ++} ++ ++gdb_test {print (char *)strstr("abc","b")} { = 0x[0-9a-f]+ "bc"} ++gdb_test {print (char *)strstr("def","e")} { = 0x[0-9a-f]+ "ef"} diff --git a/SOURCES/gdb-gstack.man b/SOURCES/gdb-gstack.man new file mode 100644 index 0000000..1f4e406 --- /dev/null +++ b/SOURCES/gdb-gstack.man @@ -0,0 +1,48 @@ +.\" +.\" gstack manual page. +.\" Copyright (c) 1999 Ross Thompson +.\" Copyright (c) 2001, 2002, 2004, 2008 Red Hat, Inc. +.\" +.\" Original author: Ross Thompson +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2, 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; see the file COPYING. If not, write to +.\" the Free Software Foundation, 59 Temple Place - Suite 330, +.\" Boston, MA 02111-1307, USA. +.\" +.TH GSTACK 1 "Feb 15 2008" "Red Hat Linux" "Linux Programmer's Manual" + +.SH NAME +gstack \- print a stack trace of a running process + +.SH SYNOPSIS +.B gstack +pid + +.SH DESCRIPTION + +\f3gstack\f1 attaches to the active process named by the \f3pid\f1 on +the command line, and prints out an execution stack trace. If ELF +symbols exist in the binary (usually the case unless you have run +strip(1)), then symbolic addresses are printed as well. + +If the process is part of a thread group, then \f3gstack\f1 will print +out a stack trace for each of the threads in the group. + +.SH SEE ALSO +nm(1), ptrace(2), gdb(1) + +.SH AUTHORS +Ross Thompson + +Red Hat, Inc. diff --git a/SOURCES/gdb-linux_perf-bundle.patch b/SOURCES/gdb-linux_perf-bundle.patch new file mode 100644 index 0000000..bb6fb6a --- /dev/null +++ b/SOURCES/gdb-linux_perf-bundle.patch @@ -0,0 +1,226 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-linux_perf-bundle.patch + +;; [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). +;;=fedora + +diff --git a/gdb/gdb.c b/gdb/gdb.c +--- a/gdb/gdb.c ++++ b/gdb/gdb.c +@@ -21,6 +21,10 @@ + #include "interps.h" + #include "run-on-main-thread.h" + ++#ifdef PERF_ATTR_SIZE_VER5_BUNDLE ++extern "C" void __libipt_init(void); ++#endif ++ + int + main (int argc, char **argv) + { +@@ -32,6 +36,10 @@ main (int argc, char **argv) + + struct captured_main_args args; + ++#ifdef PERF_ATTR_SIZE_VER5_BUNDLE ++ __libipt_init(); ++#endif ++ + memset (&args, 0, sizeof args); + args.argc = argc; + args.argv = argv; +diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h +--- a/gdb/nat/linux-btrace.h ++++ b/gdb/nat/linux-btrace.h +@@ -28,6 +28,177 @@ + # include + #endif + ++#ifdef PERF_ATTR_SIZE_VER5_BUNDLE ++#ifndef HAVE_LINUX_PERF_EVENT_H ++# error "PERF_ATTR_SIZE_VER5_BUNDLE && !HAVE_LINUX_PERF_EVENT_H" ++#endif ++#ifndef PERF_ATTR_SIZE_VER5 ++#define PERF_ATTR_SIZE_VER5 ++#define perf_event_mmap_page perf_event_mmap_page_bundle ++// kernel-headers-3.10.0-493.el7.x86_64/usr/include/linux/perf_event.h ++/* ++ * Structure of the page that can be mapped via mmap ++ */ ++struct perf_event_mmap_page { ++ __u32 version; /* version number of this structure */ ++ __u32 compat_version; /* lowest version this is compat with */ ++ ++ /* ++ * Bits needed to read the hw events in user-space. ++ * ++ * u32 seq, time_mult, time_shift, index, width; ++ * u64 count, enabled, running; ++ * u64 cyc, time_offset; ++ * s64 pmc = 0; ++ * ++ * do { ++ * seq = pc->lock; ++ * barrier() ++ * ++ * enabled = pc->time_enabled; ++ * running = pc->time_running; ++ * ++ * if (pc->cap_usr_time && enabled != running) { ++ * cyc = rdtsc(); ++ * time_offset = pc->time_offset; ++ * time_mult = pc->time_mult; ++ * time_shift = pc->time_shift; ++ * } ++ * ++ * index = pc->index; ++ * count = pc->offset; ++ * if (pc->cap_user_rdpmc && index) { ++ * width = pc->pmc_width; ++ * pmc = rdpmc(index - 1); ++ * } ++ * ++ * barrier(); ++ * } while (pc->lock != seq); ++ * ++ * NOTE: for obvious reason this only works on self-monitoring ++ * processes. ++ */ ++ __u32 lock; /* seqlock for synchronization */ ++ __u32 index; /* hardware event identifier */ ++ __s64 offset; /* add to hardware event value */ ++ __u64 time_enabled; /* time event active */ ++ __u64 time_running; /* time event on cpu */ ++ union { ++ __u64 capabilities; ++ struct { ++ __u64 cap_bit0 : 1, /* Always 0, deprecated, see commit 860f085b74e9 */ ++ cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */ ++ ++ cap_user_rdpmc : 1, /* The RDPMC instruction can be used to read counts */ ++ cap_user_time : 1, /* The time_* fields are used */ ++ cap_user_time_zero : 1, /* The time_zero field is used */ ++ cap_____res : 59; ++ }; ++ }; ++ ++ /* ++ * If cap_user_rdpmc this field provides the bit-width of the value ++ * read using the rdpmc() or equivalent instruction. This can be used ++ * to sign extend the result like: ++ * ++ * pmc <<= 64 - width; ++ * pmc >>= 64 - width; // signed shift right ++ * count += pmc; ++ */ ++ __u16 pmc_width; ++ ++ /* ++ * If cap_usr_time the below fields can be used to compute the time ++ * delta since time_enabled (in ns) using rdtsc or similar. ++ * ++ * u64 quot, rem; ++ * u64 delta; ++ * ++ * quot = (cyc >> time_shift); ++ * rem = cyc & (((u64)1 << time_shift) - 1); ++ * delta = time_offset + quot * time_mult + ++ * ((rem * time_mult) >> time_shift); ++ * ++ * Where time_offset,time_mult,time_shift and cyc are read in the ++ * seqcount loop described above. This delta can then be added to ++ * enabled and possible running (if index), improving the scaling: ++ * ++ * enabled += delta; ++ * if (index) ++ * running += delta; ++ * ++ * quot = count / running; ++ * rem = count % running; ++ * count = quot * enabled + (rem * enabled) / running; ++ */ ++ __u16 time_shift; ++ __u32 time_mult; ++ __u64 time_offset; ++ /* ++ * If cap_usr_time_zero, the hardware clock (e.g. TSC) can be calculated ++ * from sample timestamps. ++ * ++ * time = timestamp - time_zero; ++ * quot = time / time_mult; ++ * rem = time % time_mult; ++ * cyc = (quot << time_shift) + (rem << time_shift) / time_mult; ++ * ++ * And vice versa: ++ * ++ * quot = cyc >> time_shift; ++ * rem = cyc & (((u64)1 << time_shift) - 1); ++ * timestamp = time_zero + quot * time_mult + ++ * ((rem * time_mult) >> time_shift); ++ */ ++ __u64 time_zero; ++ __u32 size; /* Header size up to __reserved[] fields. */ ++ ++ /* ++ * Hole for extension of the self monitor capabilities ++ */ ++ ++ __u8 __reserved[118*8+4]; /* align to 1k. */ ++ ++ /* ++ * Control data for the mmap() data buffer. ++ * ++ * User-space reading the @data_head value should issue an smp_rmb(), ++ * after reading this value. ++ * ++ * When the mapping is PROT_WRITE the @data_tail value should be ++ * written by userspace to reflect the last read data, after issueing ++ * an smp_mb() to separate the data read from the ->data_tail store. ++ * In this case the kernel will not over-write unread data. ++ * ++ * See perf_output_put_handle() for the data ordering. ++ * ++ * data_{offset,size} indicate the location and size of the perf record ++ * buffer within the mmapped area. ++ */ ++ __u64 data_head; /* head in the data section */ ++ __u64 data_tail; /* user-space written tail */ ++ __u64 data_offset; /* where the buffer starts */ ++ __u64 data_size; /* data buffer size */ ++ ++ /* ++ * AUX area is defined by aux_{offset,size} fields that should be set ++ * by the userspace, so that ++ * ++ * aux_offset >= data_offset + data_size ++ * ++ * prior to mmap()ing it. Size of the mmap()ed area should be aux_size. ++ * ++ * Ring buffer pointers aux_{head,tail} have the same semantics as ++ * data_{head,tail} and same ordering rules apply. ++ */ ++ __u64 aux_head; ++ __u64 aux_tail; ++ __u64 aux_offset; ++ __u64 aux_size; ++}; ++#endif // PERF_ATTR_SIZE_VER5 ++#endif // PERF_ATTR_SIZE_VER5_BUNDLE ++ + struct target_ops; + + #if HAVE_LINUX_PERF_EVENT_H +diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4 +--- a/gdbsupport/common.m4 ++++ b/gdbsupport/common.m4 +@@ -168,7 +168,7 @@ AC_DEFUN([GDB_AC_COMMON], [ + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ + #include + #ifndef PERF_ATTR_SIZE_VER5 +- # error ++ // error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL + #endif + ]])], [perf_event=yes], [perf_event=no]) + if test "$perf_event" != yes; then diff --git a/SOURCES/gdb-orphanripper.c b/SOURCES/gdb-orphanripper.c new file mode 100644 index 0000000..2653dd2 --- /dev/null +++ b/SOURCES/gdb-orphanripper.c @@ -0,0 +1,752 @@ +/* + * Copyright 2006-2007 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Reap any leftover children possibly holding file descriptors. + * Children are identified by the stale file descriptor or PGID / SID. + * Both can be missed but only the stale file descriptors are important for us. + * PGID / SID may be set by the children on their own. + * If we fine a candidate we kill it will all its process tree (grandchildren). + * The child process is run with `2>&1' redirection (due to forkpty(3)). + * 2007-07-10 Jan Kratochvil + */ + +/* For getpgid(2). */ +#define _GNU_SOURCE 1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define LENGTH(x) (sizeof (x) / sizeof (*(x))) + +static const char *progname; + +static volatile pid_t child; + +static void signal_chld (int signo) +{ +} + +static volatile int signal_alrm_hit = 0; + +static void signal_alrm (int signo) +{ + signal_alrm_hit = 1; +} + +static char childptyname[LINE_MAX]; + +static void print_child_error (const char *reason, char **argv) +{ + char **sp; + + fprintf (stderr, "%s: %d %s:", progname, (int) child, reason); + for (sp = argv; *sp != NULL; sp++) + { + fputc (' ', stderr); + fputs (*sp, stderr); + } + fputc ('\n', stderr); +} + +static int read_out (int amaster) +{ + char buf[LINE_MAX]; + ssize_t buf_got; + + buf_got = read (amaster, buf, sizeof buf); + if (buf_got == 0) + return 0; + /* Weird but at least after POLLHUP we get EIO instead of just EOF. */ + if (buf_got == -1 && errno == EIO) + return 0; + if (buf_got == -1 && errno == EAGAIN) + return 0; + if (buf_got < 0) + { + perror ("read (amaster)"); + exit (EXIT_FAILURE); + } + if (write (STDOUT_FILENO, buf, buf_got) != buf_got) + { + perror ("write(2)"); + exit (EXIT_FAILURE); + } + return 1; +} + +/* kill (child, 0) == 0 sometimes even when CHILD's state is already "Z". */ + +static int child_exited (void) +{ + char buf[200]; + int fd, i, retval; + ssize_t got; + char state[3]; + + snprintf (buf, sizeof (buf), "/proc/%ld/stat", (long) child); + fd = open (buf, O_RDONLY); + if (fd == -1) + { + perror ("open (/proc/CHILD/stat)"); + exit (EXIT_FAILURE); + } + got = read (fd, buf, sizeof(buf)); + if (got <= 0) + { + perror ("read (/proc/CHILD/stat)"); + exit (EXIT_FAILURE); + } + if (close (fd) != 0) + { + perror ("close (/proc/CHILD/stat)"); + exit (EXIT_FAILURE); + } + /* RHEL-5 does not support %ms. */ + i = sscanf (buf, "%*d%*s%2s", state); + if (i != 1) + { + perror ("sscanf (/proc/CHILD/stat)"); + exit (EXIT_FAILURE); + } + retval = strcmp (state, "Z") == 0; + return retval; +} + +static int spawn (char **argv, int timeout) +{ + pid_t child_got; + int status, amaster, i, rc; + struct sigaction act; + sigset_t set; + struct termios termios; + unsigned alarm_orig; + + /* We do not use signal(2) to be sure we do not have SA_RESTART. */ + memset (&act, 0, sizeof (act)); + act.sa_handler = signal_chld; + i = sigemptyset (&act.sa_mask); + assert (i == 0); + act.sa_flags = 0; /* !SA_RESTART */ + i = sigaction (SIGCHLD, &act, NULL); + assert (i == 0); + + i = sigemptyset (&set); + assert (i == 0); + i = sigaddset (&set, SIGCHLD); + assert (i == 0); + i = sigprocmask (SIG_SETMASK, &set, NULL); + assert (i == 0); + + /* With TERMP passed as NULL we get "\n" -> "\r\n". */ + termios.c_iflag = IGNBRK | IGNPAR; + termios.c_oflag = 0; + termios.c_cflag = CS8 | CREAD | CLOCAL | HUPCL | B9600; + termios.c_lflag = IEXTEN | NOFLSH; + memset (termios.c_cc, _POSIX_VDISABLE, sizeof (termios.c_cc)); + termios.c_cc[VTIME] = 0; + termios.c_cc[VMIN ] = 1; + cfmakeraw (&termios); +#ifdef FLUSHO + /* Workaround a readline deadlock bug in _get_tty_settings(). */ + termios.c_lflag &= ~FLUSHO; +#endif + child = forkpty (&amaster, childptyname, &termios, NULL); + switch (child) + { + case -1: + perror ("forkpty(3)"); + exit (EXIT_FAILURE); + case 0: + /* Do not replace STDIN as inferiors query its termios. */ +#if 0 + i = close (STDIN_FILENO); + assert (i == 0); + i = open ("/dev/null", O_RDONLY); + assert (i == STDIN_FILENO); +#endif + + i = sigemptyset (&set); + assert (i == 0); + i = sigprocmask (SIG_SETMASK, &set, NULL); + assert (i == 0); + + /* Do not setpgrp(2) in the parent process as the process-group + is shared for the whole sh(1) pipeline we could be a part + of. The process-group is set according to PID of the first + command in the pipeline. + We would rip even vi(1) in the case of: + ./orphanripper sh -c 'sleep 1&' | vi - + */ + /* Do not setpgrp(2) as our pty would not be ours and we would + get `SIGSTOP' later, particularly after spawning gdb(1). + setsid(3) was already executed by forkpty(3) and it would fail if + executed again. */ + if (getpid() != getpgrp ()) + { + perror ("getpgrp(2)"); + exit (EXIT_FAILURE); + } + execvp (argv[0], argv); + perror ("execvp(2)"); + exit (EXIT_FAILURE); + default: + break; + } + i = fcntl (amaster, F_SETFL, O_RDWR | O_NONBLOCK); + if (i != 0) + { + perror ("fcntl (amaster, F_SETFL, O_NONBLOCK)"); + exit (EXIT_FAILURE); + } + + /* We do not use signal(2) to be sure we do not have SA_RESTART. */ + act.sa_handler = signal_alrm; + i = sigaction (SIGALRM, &act, NULL); + assert (i == 0); + + alarm_orig = alarm (timeout); + assert (alarm_orig == 0); + + i = sigemptyset (&set); + assert (i == 0); + + while (!signal_alrm_hit) + { + struct pollfd pollfd; + + pollfd.fd = amaster; + pollfd.events = POLLIN; + i = ppoll (&pollfd, 1, NULL, &set); + if (i == -1 && errno == EINTR) + { + if (child_exited ()) + break; + /* Non-CHILD child may have exited. */ + continue; + } + assert (i == 1); + /* Data available? Process it first. */ + if (pollfd.revents & POLLIN) + { + if (!read_out (amaster)) + { + fprintf (stderr, "%s: Unexpected EOF\n", progname); + exit (EXIT_FAILURE); + } + } + if (pollfd.revents & POLLHUP) + break; + if ((pollfd.revents &= ~POLLIN) != 0) + { + fprintf (stderr, "%s: ppoll(2): revents 0x%x\n", progname, + (unsigned) pollfd.revents); + exit (EXIT_FAILURE); + } + /* Child exited? */ + if (child_exited ()) + break; + } + + if (signal_alrm_hit) + { + i = kill (child, SIGKILL); + assert (i == 0); + } + else + alarm (0); + + /* WNOHANG still could fail. */ + child_got = waitpid (child, &status, 0); + if (child != child_got) + { + fprintf (stderr, "waitpid (%d) = %d: %m\n", (int) child, (int) child_got); + exit (EXIT_FAILURE); + } + if (signal_alrm_hit) + { + char *buf; + + if (asprintf (&buf, "Timed out after %d seconds", timeout) != -1) + { + print_child_error (buf, argv); + free (buf); + } + rc = 128 + SIGALRM; + } + else if (WIFEXITED (status)) + rc = WEXITSTATUS (status); + else if (WIFSIGNALED (status)) + { + print_child_error (strsignal (WTERMSIG (status)), argv); + rc = 128 + WTERMSIG (status); + } + else if (WIFSTOPPED (status)) + { + fprintf (stderr, "waitpid (%d): WIFSTOPPED - WSTOPSIG is %d\n", + (int) child, WSTOPSIG (status)); + exit (EXIT_FAILURE); + } + else + { + fprintf (stderr, "waitpid (%d): !WIFEXITED (%d)\n", (int) child, status); + exit (EXIT_FAILURE); + } + + /* Not used in fact. */ + i = sigprocmask (SIG_SETMASK, &set, NULL); + assert (i == 0); + + /* Do not unset O_NONBLOCK as a stale child (the whole purpose of this + program) having open its output pty would block us in read_out. */ +#if 0 + i = fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */); + if (i != 0) + { + perror ("fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */)"); + exit (EXIT_FAILURE); + } +#endif + + while (read_out (amaster)); + + /* Do not close the master FD as the child would have `/dev/pts/23 (deleted)' + entries which are not expected (and expecting ` (deleted)' would be + a race. */ +#if 0 + i = close (amaster); + if (i != 0) + { + perror ("close (forkpty ()'s amaster)"); + exit (EXIT_FAILURE); + } +#endif + + return rc; +} + +/* Detected commandline may look weird due to a race: + Original command: + ./orphanripper sh -c 'sleep 1&' & + Correct output: + [1] 29610 + ./orphanripper: Killed -9 orphan PID 29612 (PGID 29611): sleep 1 + Raced output (sh(1) child still did not update its argv[]): + [1] 29613 + ./orphanripper: Killed -9 orphan PID 29615 (PGID 29614): sh -c sleep 1& + We could delay a bit before ripping the children. */ +static const char *read_cmdline (pid_t pid) +{ + char cmdline_fname[32]; + static char cmdline[LINE_MAX]; + int fd; + ssize_t got; + char *s; + + if (snprintf (cmdline_fname, sizeof cmdline_fname, "/proc/%d/cmdline", + (int) pid) < 0) + return NULL; + fd = open (cmdline_fname, O_RDONLY); + if (fd == -1) + { + /* It may have already exited - ENOENT. */ +#if 0 + fprintf (stderr, "%s: open (\"%s\"): %m\n", progname, cmdline_fname); +#endif + return NULL; + } + got = read (fd, cmdline, sizeof (cmdline) - 1); + if (got == -1) + fprintf (stderr, "%s: read (\"%s\"): %m\n", progname, + cmdline_fname); + if (close (fd) != 0) + fprintf (stderr, "%s: close (\"%s\"): %m\n", progname, + cmdline_fname); + if (got < 0) + return NULL; + /* Convert '\0' argument delimiters to spaces. */ + for (s = cmdline; s < cmdline + got; s++) + if (!*s) + *s = ' '; + /* Trim the trailing spaces (typically single '\0'->' '). */ + while (s > cmdline && isspace (s[-1])) + s--; + *s = 0; + return cmdline; +} + +static int dir_scan (const char *dirname, + int (*callback) (struct dirent *dirent, const char *pathname)) +{ + DIR *dir; + struct dirent *dirent; + int rc = 0; + + dir = opendir (dirname); + if (dir == NULL) + { + if (errno == EACCES || errno == ENOENT) + return rc; + fprintf (stderr, "%s: opendir (\"%s\"): %m\n", progname, dirname); + exit (EXIT_FAILURE); + } + while ((errno = 0, dirent = readdir (dir))) + { + char pathname[LINE_MAX]; + int pathname_len; + + pathname_len = snprintf (pathname, sizeof pathname, "%s/%s", + dirname, dirent->d_name); + if (pathname_len <= 0 || pathname_len >= (int) sizeof pathname) + { + fprintf (stderr, "entry file name too long: `%s' / `%s'\n", + dirname, dirent->d_name); + continue; + } + /* RHEL-4.5 on s390x never fills in D_TYPE. */ + if (dirent->d_type == DT_UNKNOWN) + { + struct stat statbuf; + int i; + + /* We are not interested in the /proc/PID/fd/ links targets. */ + i = lstat (pathname, &statbuf); + if (i == -1) + { + if (errno == EACCES || errno == ENOENT) + continue; + fprintf (stderr, "%s: stat (\"%s\"): %m\n", progname, pathname); + exit (EXIT_FAILURE); + } + if (S_ISDIR (statbuf.st_mode)) + dirent->d_type = DT_DIR; + if (S_ISLNK (statbuf.st_mode)) + dirent->d_type = DT_LNK; + /* No other D_TYPE types used in this code. */ + } + rc = (*callback) (dirent, pathname); + if (rc != 0) + { + errno = 0; + break; + } + } + if (errno != 0) + { + fprintf (stderr, "%s: readdir (\"%s\"): %m\n", progname, dirname); + exit (EXIT_FAILURE); + } + if (closedir (dir) != 0) + { + fprintf (stderr, "%s: closedir (\"%s\"): %m\n", progname, dirname); + exit (EXIT_FAILURE); + } + return rc; +} + +static int fd_fs_scan (pid_t pid, int (*func) (pid_t pid, const char *link)) +{ + char dirname[64]; + + if (snprintf (dirname, sizeof dirname, "/proc/%d/fd", (int) pid) < 0) + { + perror ("snprintf(3)"); + exit (EXIT_FAILURE); + } + + int callback (struct dirent *dirent, const char *pathname) + { + char buf[LINE_MAX]; + ssize_t buf_len; + + if ((dirent->d_type != DT_DIR && dirent->d_type != DT_LNK) + || (dirent->d_type == DT_DIR && strcmp (dirent->d_name, ".") != 0 + && strcmp (dirent->d_name, "..") != 0) + || (dirent->d_type == DT_LNK && strspn (dirent->d_name, "0123456789") + != strlen (dirent->d_name))) + { + fprintf (stderr, "Unexpected entry \"%s\" (d_type %u)" + " on readdir (\"%s\"): %m\n", + dirent->d_name, (unsigned) dirent->d_type, dirname); + return 0; + } + if (dirent->d_type == DT_DIR) + return 0; + buf_len = readlink (pathname, buf, sizeof buf - 1); + if (buf_len <= 0 || buf_len >= (ssize_t) sizeof buf - 1) + { + if (errno != ENOENT && errno != EACCES) + fprintf (stderr, "Error reading link \"%s\": %m\n", pathname); + return 0; + } + buf[buf_len] = 0; + return (*func) (pid, buf); + } + + return dir_scan (dirname, callback); +} + +static void pid_fs_scan (void (*func) (pid_t pid, void *data), void *data) +{ + int callback (struct dirent *dirent, const char *pathname) + { + if (dirent->d_type != DT_DIR + || strspn (dirent->d_name, "0123456789") != strlen (dirent->d_name)) + return 0; + (*func) (atoi (dirent->d_name), data); + return 0; + } + + dir_scan ("/proc", callback); +} + +static int rip_check_ptyname (pid_t pid, const char *link) +{ + assert (pid != getpid ()); + + return strcmp (link, childptyname) == 0; +} + +struct pid + { + struct pid *next; + pid_t pid; + }; +static struct pid *pid_list; + +static int pid_found (pid_t pid) +{ + struct pid *entry; + + for (entry = pid_list; entry != NULL; entry = entry->next) + if (entry->pid == pid) + return 1; + return 0; +} + +/* Single pass is not enough, a (multithreaded) process was seen to survive. + Repeated killing of the same process is not enough, zombies can be killed. + */ +static int cleanup_acted; + +static void pid_record (pid_t pid) +{ + struct pid *entry; + + if (pid_found (pid)) + return; + cleanup_acted = 1; + + entry = malloc (sizeof (*entry)); + if (entry == NULL) + { + fprintf (stderr, "%s: malloc: %m\n", progname); + exit (EXIT_FAILURE); + } + entry->pid = pid; + entry->next = pid_list; + pid_list = entry; +} + +static void pid_forall (void (*func) (pid_t pid)) +{ + struct pid *entry; + + for (entry = pid_list; entry != NULL; entry = entry->next) + (*func) (entry->pid); +} + +/* Returns 0 on failure. */ +static pid_t pid_get_parent (pid_t pid) +{ + char fname[64]; + FILE *f; + char line[LINE_MAX]; + pid_t retval = 0; + + if (snprintf (fname, sizeof fname, "/proc/%d/status", (int) pid) < 0) + { + perror ("snprintf(3)"); + exit (EXIT_FAILURE); + } + f = fopen (fname, "r"); + if (f == NULL) + { + return 0; + } + while (errno = 0, fgets (line, sizeof line, f) == line) + { + if (strncmp (line, "PPid:\t", sizeof "PPid:\t" - 1) != 0) + continue; + retval = atoi (line + sizeof "PPid:\t" - 1); + errno = 0; + break; + } + if (errno != 0) + { + fprintf (stderr, "%s: fgets (\"%s\"): %m\n", progname, fname); + exit (EXIT_FAILURE); + } + if (fclose (f) != 0) + { + fprintf (stderr, "%s: fclose (\"%s\"): %m\n", progname, fname); + exit (EXIT_FAILURE); + } + return retval; +} + +static void killtree (pid_t pid); + +static void killtree_pid_fs_scan (pid_t pid, void *data) +{ + pid_t parent_pid = *(pid_t *) data; + + /* Do not optimize it as we could miss some newly spawned processes. + Always traverse all the leaves. */ +#if 0 + /* Optimization. */ + if (pid_found (pid)) + return; +#endif + + if (pid_get_parent (pid) != parent_pid) + return; + + killtree (pid); +} + +static void killtree (pid_t pid) +{ + pid_record (pid); + pid_fs_scan (killtree_pid_fs_scan, &pid); +} + +static void rip_pid_fs_scan (pid_t pid, void *data) +{ + pid_t pgid; + + /* Shouldn't happen. */ + if (pid == getpid ()) + return; + + /* Check both PGID and the stale file descriptors. */ + pgid = getpgid (pid); + if (pgid == child + || fd_fs_scan (pid, rip_check_ptyname) != 0) + killtree (pid); +} + +static void killproc (pid_t pid) +{ + const char *cmdline; + + cmdline = read_cmdline (pid); + /* Avoid printing the message for already gone processes. */ + if (kill (pid, 0) != 0 && errno == ESRCH) + return; + if (cmdline == NULL) + cmdline = ""; + fprintf (stderr, "%s: Killed -9 orphan PID %d: %s\n", progname, (int) pid, cmdline); + if (kill (pid, SIGKILL) == 0) + cleanup_acted = 1; + else if (errno != ESRCH) + fprintf (stderr, "%s: kill (%d, SIGKILL): %m\n", progname, (int) pid); + /* RHEL-3 kernels cannot SIGKILL a `T (stopped)' process. */ + kill (pid, SIGCONT); + /* Do not waitpid(2) as it cannot be our direct descendant and it gets + cleaned up by init(8). */ +#if 0 + pid_t pid_got; + pid_got = waitpid (pid, NULL, 0); + if (pid != pid_got) + { + fprintf (stderr, "%s: waitpid (%d) != %d: %m\n", progname, + (int) pid, (int) pid_got); + return; + } +#endif +} + +static void rip (void) +{ + cleanup_acted = 0; + do + { + if (cleanup_acted) + usleep (1000000 / 10); + cleanup_acted = 0; + pid_fs_scan (rip_pid_fs_scan, NULL); + pid_forall (killproc); + } + while (cleanup_acted); +} + +int main (int argc, char **argv) +{ + int timeout = 0; + int rc; + + progname = *argv++; + argc--; + + if (argc < 1 || strcmp (*argv, "-h") == 0 + || strcmp (*argv, "--help") == 0) + { + puts ("Syntax: orphanripper [-t ] "); + exit (EXIT_FAILURE); + } + if ((*argv)[0] == '-' && (*argv)[1] == 't') + { + char *timeout_s = NULL; + + if ((*argv)[2] == 0) + timeout_s = *++argv; + else if (isdigit ((*argv)[2])) + timeout_s = (*argv) + 2; + if (timeout_s != NULL) + { + long l; + char *endptr; + + argv++; + l = strtol (timeout_s, &endptr, 0); + timeout = l; + if ((endptr != NULL && *endptr != 0) || timeout < 0 || timeout != l) + { + fprintf (stderr, "%s: Invalid timeout value: %s\n", progname, + timeout_s); + exit (EXIT_FAILURE); + } + } + } + + rc = spawn (argv, timeout); + rip (); + return rc; +} diff --git a/SOURCES/gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch b/SOURCES/gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch new file mode 100644 index 0000000..1d6e1fb --- /dev/null +++ b/SOURCES/gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch @@ -0,0 +1,264 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Sat, 25 Nov 2023 10:35:37 +0000 +Subject: gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch + +;; Back-port upstream commit acc117b57f7 as part of a fix for +;; non-deterministic gdb-index generation (RH BZ 2232086). + +gdb: C++-ify mapped_symtab from dwarf2/index-write.c + +Make static the functions add_index_entry, find_slot, and hash_expand, +member functions of the mapped_symtab class. + +Fold an additional snippet of code from write_gdbindex into +mapped_symtab::minimize, this code relates to minimisation, so this +seems like a good home for it. + +Make the n_elements, data, and m_string_obstack member variables of +mapped_symtab private. Provide a new obstack() member function to +provide access to the obstack when needed, and also add member +functions begin(), end(), cbegin(), and cend() so that the +mapped_symtab class can be treated like a contained and iterated +over. + +I've also taken this opportunity to split out the logic for whether +the hash table (m_data) needs expanding, this is the new function +hash_needs_expanding. This will be useful in a later commit. + +There should be no user visible changes after this commit. + +Approved-By: Tom Tromey + +diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c +--- a/gdb/dwarf2/index-write.c ++++ b/gdb/dwarf2/index-write.c +@@ -187,86 +187,135 @@ struct mapped_symtab + { + mapped_symtab () + { +- data.resize (1024); ++ m_data.resize (1024); + } + +- /* Minimize each entry in the symbol table, removing duplicates. */ ++ /* If there are no elements in the symbol table, then reduce the table ++ size to zero. Otherwise call symtab_index_entry::minimize each entry ++ in the symbol table. */ ++ + void minimize () + { +- for (symtab_index_entry &item : data) ++ if (m_element_count == 0) ++ m_data.resize (0); ++ ++ for (symtab_index_entry &item : m_data) + item.minimize (); + } + +- offset_type n_elements = 0; +- std::vector data; ++ /* Add an entry to SYMTAB. NAME is the name of the symbol. CU_INDEX is ++ the index of the CU in which the symbol appears. IS_STATIC is one if ++ the symbol is static, otherwise zero (global). */ ++ ++ void add_index_entry (const char *name, int is_static, ++ gdb_index_symbol_kind kind, offset_type cu_index); ++ ++ /* Access the obstack. */ ++ struct obstack *obstack () ++ { return &m_string_obstack; } ++ ++private: ++ ++ /* Find a slot in SYMTAB for the symbol NAME. Returns a reference to ++ the slot. ++ ++ Function is used only during write_hash_table so no index format ++ backward compatibility is needed. */ ++ ++ symtab_index_entry &find_slot (const char *name); ++ ++ /* Expand SYMTAB's hash table. */ ++ ++ void hash_expand (); ++ ++ /* Return true if the hash table in data needs to grow. */ ++ ++ bool hash_needs_expanding () const ++ { return 4 * m_element_count / 3 >= m_data.size (); } ++ ++ /* A vector that is used as a hash table. */ ++ std::vector m_data; ++ ++ /* The number of elements stored in the m_data hash. */ ++ offset_type m_element_count = 0; + + /* Temporary storage for names. */ + auto_obstack m_string_obstack; +-}; + +-/* Find a slot in SYMTAB for the symbol NAME. Returns a reference to +- the slot. ++public: ++ using iterator = decltype (m_data)::iterator; ++ using const_iterator = decltype (m_data)::const_iterator; + +- Function is used only during write_hash_table so no index format backward +- compatibility is needed. */ ++ iterator begin () ++ { return m_data.begin (); } + +-static symtab_index_entry & +-find_slot (struct mapped_symtab *symtab, const char *name) ++ iterator end () ++ { return m_data.end (); } ++ ++ const_iterator cbegin () ++ { return m_data.cbegin (); } ++ ++ const_iterator cend () ++ { return m_data.cend (); } ++}; ++ ++/* See class definition. */ ++ ++symtab_index_entry & ++mapped_symtab::find_slot (const char *name) + { + offset_type index, step, hash = mapped_index_string_hash (INT_MAX, name); + +- index = hash & (symtab->data.size () - 1); +- step = ((hash * 17) & (symtab->data.size () - 1)) | 1; ++ index = hash & (m_data.size () - 1); ++ step = ((hash * 17) & (m_data.size () - 1)) | 1; + + for (;;) + { +- if (symtab->data[index].name == NULL +- || strcmp (name, symtab->data[index].name) == 0) +- return symtab->data[index]; +- index = (index + step) & (symtab->data.size () - 1); ++ if (m_data[index].name == NULL ++ || strcmp (name, m_data[index].name) == 0) ++ return m_data[index]; ++ index = (index + step) & (m_data.size () - 1); + } + } + +-/* Expand SYMTAB's hash table. */ ++/* See class definition. */ + +-static void +-hash_expand (struct mapped_symtab *symtab) ++void ++mapped_symtab::hash_expand () + { +- auto old_entries = std::move (symtab->data); ++ auto old_entries = std::move (m_data); + +- symtab->data.clear (); +- symtab->data.resize (old_entries.size () * 2); ++ gdb_assert (m_data.size () == 0); ++ m_data.resize (old_entries.size () * 2); + + for (auto &it : old_entries) + if (it.name != NULL) + { +- auto &ref = find_slot (symtab, it.name); ++ auto &ref = this->find_slot (it.name); + ref = std::move (it); + } + } + +-/* Add an entry to SYMTAB. NAME is the name of the symbol. +- CU_INDEX is the index of the CU in which the symbol appears. +- IS_STATIC is one if the symbol is static, otherwise zero (global). */ ++/* See class definition. */ + +-static void +-add_index_entry (struct mapped_symtab *symtab, const char *name, +- int is_static, gdb_index_symbol_kind kind, +- offset_type cu_index) ++void ++mapped_symtab::add_index_entry (const char *name, int is_static, ++ gdb_index_symbol_kind kind, ++ offset_type cu_index) + { +- symtab_index_entry *slot = &find_slot (symtab, name); ++ symtab_index_entry *slot = &this->find_slot (name); + if (slot->name == NULL) + { + /* This is a new element in the hash table. */ +- ++symtab->n_elements; ++ ++this->m_element_count; + + /* We might need to grow the hash table. */ +- if (4 * symtab->n_elements / 3 >= symtab->data.size ()) ++ if (this->hash_needs_expanding ()) + { +- hash_expand (symtab); ++ this->hash_expand (); + + /* This element will have a different slot in the new table. */ +- slot = &find_slot (symtab, name); ++ slot = &this->find_slot (name); + + /* But it should still be a new element in the hash table. */ + gdb_assert (slot->name == nullptr); +@@ -387,7 +436,7 @@ write_hash_table (mapped_symtab *symtab, data_buf &output, data_buf &cpool) + + /* We add all the index vectors to the constant pool first, to + ensure alignment is ok. */ +- for (symtab_index_entry &entry : symtab->data) ++ for (symtab_index_entry &entry : *symtab) + { + if (entry.name == NULL) + continue; +@@ -416,7 +465,7 @@ write_hash_table (mapped_symtab *symtab, data_buf &output, data_buf &cpool) + + /* Now write out the hash table. */ + std::unordered_map str_table; +- for (const auto &entry : symtab->data) ++ for (const auto &entry : *symtab) + { + offset_type str_off, vec_off; + +@@ -1151,7 +1200,7 @@ write_cooked_index (cooked_index *table, + const auto it = cu_index_htab.find (entry->per_cu); + gdb_assert (it != cu_index_htab.cend ()); + +- const char *name = entry->full_name (&symtab->m_string_obstack); ++ const char *name = entry->full_name (symtab->obstack ()); + + if (entry->per_cu->lang () == language_ada) + { +@@ -1159,7 +1208,7 @@ write_cooked_index (cooked_index *table, + gdb, it has to use the encoded name, with any + suffixes stripped. */ + std::string encoded = ada_encode (name, false); +- name = obstack_strdup (&symtab->m_string_obstack, ++ name = obstack_strdup (symtab->obstack (), + encoded.c_str ()); + } + else if (entry->per_cu->lang () == language_cplus +@@ -1191,8 +1240,8 @@ write_cooked_index (cooked_index *table, + else + kind = GDB_INDEX_SYMBOL_KIND_TYPE; + +- add_index_entry (symtab, name, (entry->flags & IS_STATIC) != 0, +- kind, it->second); ++ symtab->add_index_entry (name, (entry->flags & IS_STATIC) != 0, ++ kind, it->second); + } + } + +@@ -1267,8 +1316,6 @@ write_gdbindex (dwarf2_per_bfd *per_bfd, cooked_index *table, + symtab.minimize (); + + data_buf symtab_vec, constant_pool; +- if (symtab.n_elements == 0) +- symtab.data.resize (0); + + write_hash_table (&symtab, symtab_vec, constant_pool); + diff --git a/SOURCES/gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch b/SOURCES/gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch new file mode 100644 index 0000000..e9b0b9e --- /dev/null +++ b/SOURCES/gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch @@ -0,0 +1,101 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Mon, 27 Nov 2023 13:19:39 +0000 +Subject: gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch + +;; Back-port upstream commit 3644f41dc80 as part of a fix for +;; non-deterministic gdb-index generation (RH BZ 2232086). + +gdb: generate dwarf-5 index identically as worker-thread count changes + +Similar to the previous commit, this commit ensures that the dwarf-5 +index files are generated identically as the number of worker-threads +changes. + +Building the dwarf-5 index makes use of a closed hash table, the +bucket_hash local within debug_names::build(). Entries are added to +bucket_hash from m_name_to_value_set, which, in turn, is populated +by calls to debug_names::insert() in write_debug_names. The insert +calls are ordered based on the entries within the cooked_index, and +the ordering within cooked_index depends on the number of worker +threads that GDB is using. + +My proposal is to sort each chain within the bucket_hash closed hash +table prior to using this to build the dwarf-5 index. + +The buckets within bucket_hash will always have the same ordering (for +a given GDB build with a given executable), and by sorting the chains +within each bucket, we can be sure that GDB will see each entry in a +deterministic order. + +I've extended the index creation test to cover this case. + +Approved-By: Tom Tromey + +diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c +--- a/gdb/dwarf2/index-write.c ++++ b/gdb/dwarf2/index-write.c +@@ -452,6 +452,11 @@ class c_str_view + return strcmp (m_cstr, other.m_cstr) == 0; + } + ++ bool operator< (const c_str_view &other) const ++ { ++ return strcmp (m_cstr, other.m_cstr) < 0; ++ } ++ + /* Return the underlying C string. Note, the returned string is + only a reference with lifetime of this object. */ + const char *c_str () const +@@ -771,10 +776,18 @@ class debug_names + } + for (size_t bucket_ix = 0; bucket_ix < bucket_hash.size (); ++bucket_ix) + { +- const std::forward_list &hashitlist +- = bucket_hash[bucket_ix]; ++ std::forward_list &hashitlist = bucket_hash[bucket_ix]; + if (hashitlist.empty ()) + continue; ++ ++ /* Sort the items within each bucket. This ensures that the ++ generated index files will be the same no matter the order in ++ which symbols were added into the index. */ ++ hashitlist.sort ([] (const hash_it_pair &a, const hash_it_pair &b) ++ { ++ return a.it->first < b.it->first; ++ }); ++ + uint32_t &bucket_slot = m_bucket_table[bucket_ix]; + /* The hashes array is indexed starting at 1. */ + store_unsigned_integer (reinterpret_cast (&bucket_slot), +diff --git a/gdb/testsuite/gdb.gdb/index-file.exp b/gdb/testsuite/gdb.gdb/index-file.exp +--- a/gdb/testsuite/gdb.gdb/index-file.exp ++++ b/gdb/testsuite/gdb.gdb/index-file.exp +@@ -47,6 +47,9 @@ remote_exec host "mkdir -p ${dir1}" + with_timeout_factor $timeout_factor { + gdb_test_no_output "save gdb-index $dir1" \ + "create gdb-index file" ++ ++ gdb_test_no_output "save gdb-index -dwarf-5 $dir1" \ ++ "create dwarf-index files" + } + + # Close GDB. +@@ -143,13 +146,16 @@ if { $worker_threads > 1 } { + with_timeout_factor $timeout_factor { + gdb_test_no_output "save gdb-index $dir2" \ + "create second gdb-index file" ++ ++ gdb_test_no_output "save gdb-index -dwarf-5 $dir2" \ ++ "create second dwarf-index files" + } + + # Close GDB. + gdb_exit + + # Now check that the index files are identical. +- foreach suffix { gdb-index } { ++ foreach suffix { gdb-index debug_names debug_str } { + set result \ + [remote_exec host \ + "cmp -s \"$dir1/${index_filename_base}.${suffix}\" \"$dir2/${index_filename_base}.${suffix}\""] diff --git a/SOURCES/gdb-rhbz-2232086-generate-gdb-index-consistently.patch b/SOURCES/gdb-rhbz-2232086-generate-gdb-index-consistently.patch new file mode 100644 index 0000000..d6917ec --- /dev/null +++ b/SOURCES/gdb-rhbz-2232086-generate-gdb-index-consistently.patch @@ -0,0 +1,230 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Fri, 24 Nov 2023 12:04:36 +0000 +Subject: gdb-rhbz-2232086-generate-gdb-index-consistently.patch + +;; Back-port upstream commit aff250145af as part of a fix for +;; non-deterministic gdb-index generation (RH BZ 2232086). + +gdb: generate gdb-index identically regardless of work thread count + +It was observed that changing the number of worker threads that GDB +uses (maintenance set worker-threads NUM) would have an impact on the +layout of the generated gdb-index. + +The cause seems to be how the CU are distributed between threads, and +then symbols that appear in multiple CU can be encountered earlier or +later depending on whether a particular CU moves between threads. + +I certainly found this behaviour was reproducible when generating an +index for GDB itself, like: + + gdb -q -nx -nh -batch \ + -eiex 'maint set worker-threads NUM' \ + -ex 'save gdb-index /tmp/' + +And then setting different values for NUM will change the generated +index. + +Now, the question is: does this matter? + +I would like to suggest that yes, this does matter. At Red Hat we +generate a gdb-index as part of the build process, and we would +ideally like to have reproducible builds: for the same source, +compiled with the same tool-chain, we should get the exact same output +binary. And we do .... except for the index. + +Now we could simply force GDB to only use a single worker thread when +we build the index, but, I don't think the idea of reproducible builds +is that strange, so I think we should ensure that our generated +indexes are always reproducible. + +To achieve this, I propose that we add an extra step when building the +gdb-index file. After constructing the initial symbol hash table +contents, we will pull all the symbols out of the hash, sort them, +then re-insert them in sorted order. This will ensure that the +structure of the generated hash will remain consistent (given the same +set of symbols). + +I've extended the existing index-file test to check that the generated +index doesn't change if we adjust the number of worker threads used. +Given that this test is already rather slow, I've only made one change +to the worker-thread count. Maybe this test should be changed to use +a smaller binary, which is quicker to load, and for which we could +then try many different worker thread counts. + +Approved-By: Tom Tromey + +diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c +--- a/gdb/dwarf2/index-write.c ++++ b/gdb/dwarf2/index-write.c +@@ -210,6 +210,13 @@ struct mapped_symtab + void add_index_entry (const char *name, int is_static, + gdb_index_symbol_kind kind, offset_type cu_index); + ++ /* When entries are originally added into the data hash the order will ++ vary based on the number of worker threads GDB is configured to use. ++ This function will rebuild the hash such that the final layout will be ++ deterministic regardless of the number of worker threads used. */ ++ ++ void sort (); ++ + /* Access the obstack. */ + struct obstack *obstack () + { return &m_string_obstack; } +@@ -296,6 +303,65 @@ mapped_symtab::hash_expand () + } + } + ++/* See mapped_symtab class declaration. */ ++ ++void mapped_symtab::sort () ++{ ++ /* Move contents out of this->data vector. */ ++ std::vector original_data = std::move (m_data); ++ ++ /* Restore the size of m_data, this will avoid having to expand the hash ++ table (and rehash all elements) when we reinsert after sorting. ++ However, we do reset the element count, this allows for some sanity ++ checking asserts during the reinsert phase. */ ++ gdb_assert (m_data.size () == 0); ++ m_data.resize (original_data.size ()); ++ m_element_count = 0; ++ ++ /* Remove empty entries from ORIGINAL_DATA, this makes sorting quicker. */ ++ auto it = std::remove_if (original_data.begin (), original_data.end (), ++ [] (const symtab_index_entry &entry) -> bool ++ { ++ return entry.name == nullptr; ++ }); ++ original_data.erase (it, original_data.end ()); ++ ++ /* Sort the existing contents. */ ++ std::sort (original_data.begin (), original_data.end (), ++ [] (const symtab_index_entry &a, ++ const symtab_index_entry &b) -> bool ++ { ++ /* Return true if A is before B. */ ++ gdb_assert (a.name != nullptr); ++ gdb_assert (b.name != nullptr); ++ ++ return strcmp (a.name, b.name) < 0; ++ }); ++ ++ /* Re-insert each item from the sorted list. */ ++ for (auto &entry : original_data) ++ { ++ /* We know that ORIGINAL_DATA contains no duplicates, this data was ++ taken from a hash table that de-duplicated entries for us, so ++ count this as a new item. ++ ++ As we retained the original size of m_data (see above) then we ++ should never need to grow m_data_ during this re-insertion phase, ++ assert that now. */ ++ ++m_element_count; ++ gdb_assert (!this->hash_needs_expanding ()); ++ ++ /* Lookup a slot. */ ++ symtab_index_entry &slot = this->find_slot (entry.name); ++ ++ /* As discussed above, we should not find duplicates. */ ++ gdb_assert (slot.name == nullptr); ++ ++ /* Move this item into the slot we found. */ ++ slot = std::move (entry); ++ } ++} ++ + /* See class definition. */ + + void +@@ -1311,6 +1377,9 @@ write_gdbindex (dwarf2_per_bfd *per_bfd, cooked_index *table, + for (auto map : table->get_addrmaps ()) + write_address_map (map, addr_vec, cu_index_htab); + ++ /* Ensure symbol hash is built domestically. */ ++ symtab.sort (); ++ + /* Now that we've processed all symbols we can shrink their cu_indices + lists. */ + symtab.minimize (); +diff --git a/gdb/testsuite/gdb.gdb/index-file.exp b/gdb/testsuite/gdb.gdb/index-file.exp +--- a/gdb/testsuite/gdb.gdb/index-file.exp ++++ b/gdb/testsuite/gdb.gdb/index-file.exp +@@ -38,6 +38,9 @@ with_timeout_factor $timeout_factor { + clean_restart $filename + } + ++# Record how many worker threads GDB is using. ++set worker_threads [gdb_get_worker_threads] ++ + # Generate an index file. + set dir1 [standard_output_file "index_1"] + remote_exec host "mkdir -p ${dir1}" +@@ -116,3 +119,41 @@ proc check_symbol_table_usage { filename } { + + set index_filename_base [file tail $filename] + check_symbol_table_usage "$dir1/${index_filename_base}.gdb-index" ++ ++# If GDB is using more than 1 worker thread then reduce the number of ++# worker threads, regenerate the index, and check that we get the same ++# index file back. At one point the layout of the index would vary ++# based on the number of worker threads used. ++if { $worker_threads > 1 } { ++ # Start GDB, but don't load a file yet. ++ clean_restart ++ ++ # Adjust the number of threads to use. ++ set reduced_threads [expr $worker_threads / 2] ++ gdb_test_no_output "maint set worker-threads $reduced_threads" ++ ++ with_timeout_factor $timeout_factor { ++ # Now load the test binary. ++ gdb_file_cmd $filename ++ } ++ ++ # Generate an index file. ++ set dir2 [standard_output_file "index_2"] ++ remote_exec host "mkdir -p ${dir2}" ++ with_timeout_factor $timeout_factor { ++ gdb_test_no_output "save gdb-index $dir2" \ ++ "create second gdb-index file" ++ } ++ ++ # Close GDB. ++ gdb_exit ++ ++ # Now check that the index files are identical. ++ foreach suffix { gdb-index } { ++ set result \ ++ [remote_exec host \ ++ "cmp -s \"$dir1/${index_filename_base}.${suffix}\" \"$dir2/${index_filename_base}.${suffix}\""] ++ gdb_assert { [lindex $result 0] == 0 } \ ++ "$suffix files are identical" ++ } ++} +diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp +--- a/gdb/testsuite/lib/gdb.exp ++++ b/gdb/testsuite/lib/gdb.exp +@@ -10033,6 +10033,21 @@ proc is_target_non_stop { {testname ""} } { + return $is_non_stop + } + ++# Return the number of worker threads that GDB is currently using. ++ ++proc gdb_get_worker_threads { {testname ""} } { ++ set worker_threads "UNKNOWN" ++ gdb_test_multiple "maintenance show worker-threads" $testname { ++ -wrap -re "The number of worker threads GDB can use is unlimited \\(currently ($::decimal)\\)\\." { ++ set worker_threads $expect_out(1,string) ++ } ++ -wrap -re "The number of worker threads GDB can use is ($::decimal)\\." { ++ set worker_threads $expect_out(1,string) ++ } ++ } ++ return $worker_threads ++} ++ + # Check if the compiler emits epilogue information associated + # with the closing brace or with the last statement line. + # diff --git a/SOURCES/gdb-rhbz-2232086-reduce-size-of-gdb-index.patch b/SOURCES/gdb-rhbz-2232086-reduce-size-of-gdb-index.patch new file mode 100644 index 0000000..9eaf615 --- /dev/null +++ b/SOURCES/gdb-rhbz-2232086-reduce-size-of-gdb-index.patch @@ -0,0 +1,222 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Fri, 24 Nov 2023 11:50:35 +0000 +Subject: gdb-rhbz-2232086-reduce-size-of-gdb-index.patch + +;; Back-port upstream commit aa19bc1d259 as part of a fix for +;; non-deterministic gdb-index generation (RH BZ 2232086). + +gdb: reduce size of generated gdb-index file + +I noticed in passing that out algorithm for generating the gdb-index +file is incorrect. When building the hash table in add_index_entry we +count every incoming entry rehash when the number of entries gets too +large. However, some of the incoming entries will be duplicates, +which don't actually result in new items being added to the hash +table. + +As a result, we grow the gdb-index hash table far too often. + +With an unmodified GDB, generating a gdb-index for GDB, I see a file +size of 90M, with a hash usage (in the generated index file) of just +2.6%. + +With a patched GDB, generating a gdb-index for the _same_ GDB binary, +I now see a gdb-index file size of 30M, with a hash usage of 41.9%. + +This is a 67% reduction in gdb-index file size. + +Obviously, not every gdb-index file is going to see such big savings, +however, the larger a program, and the more symbols that are +duplicated between compilation units, the more GDB would over count, +and so, over-grow the index. + +The gdb-index hash table we create has a minimum size of 1024, and +then we grow the hash when it is 75% full, doubling the hash table at +that time. Given this, then we expect that either: + + a. The hash table is size 1024, and less than 75% full, or + b. The hash table is between 37.5% and 75% full. + +I've include a test that checks some of these constraints -- I've not +bothered to check the upper limit, and over full hash table isn't +really a problem here, but if the fill percentage is less than 37.5% +then this indicates that we've done something wrong (obviously, I also +check for the 1024 minimum size). + +Approved-By: Tom Tromey + +diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c +--- a/gdb/dwarf2/index-write.c ++++ b/gdb/dwarf2/index-write.c +@@ -254,20 +254,29 @@ add_index_entry (struct mapped_symtab *symtab, const char *name, + int is_static, gdb_index_symbol_kind kind, + offset_type cu_index) + { +- offset_type cu_index_and_attrs; ++ symtab_index_entry *slot = &find_slot (symtab, name); ++ if (slot->name == NULL) ++ { ++ /* This is a new element in the hash table. */ ++ ++symtab->n_elements; + +- ++symtab->n_elements; +- if (4 * symtab->n_elements / 3 >= symtab->data.size ()) +- hash_expand (symtab); ++ /* We might need to grow the hash table. */ ++ if (4 * symtab->n_elements / 3 >= symtab->data.size ()) ++ { ++ hash_expand (symtab); + +- symtab_index_entry &slot = find_slot (symtab, name); +- if (slot.name == NULL) +- { +- slot.name = name; ++ /* This element will have a different slot in the new table. */ ++ slot = &find_slot (symtab, name); ++ ++ /* But it should still be a new element in the hash table. */ ++ gdb_assert (slot->name == nullptr); ++ } ++ ++ slot->name = name; + /* index_offset is set later. */ + } + +- cu_index_and_attrs = 0; ++ offset_type cu_index_and_attrs = 0; + DW2_GDB_INDEX_CU_SET_VALUE (cu_index_and_attrs, cu_index); + DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE (cu_index_and_attrs, is_static); + DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE (cu_index_and_attrs, kind); +@@ -279,7 +288,7 @@ add_index_entry (struct mapped_symtab *symtab, const char *name, + the last entry pushed), but a symbol could have multiple kinds in one CU. + To keep things simple we don't worry about the duplication here and + sort and uniquify the list after we've processed all symbols. */ +- slot.cu_indices.push_back (cu_index_and_attrs); ++ slot->cu_indices.push_back (cu_index_and_attrs); + } + + /* See symtab_index_entry. */ +diff --git a/gdb/testsuite/gdb.gdb/index-file.exp b/gdb/testsuite/gdb.gdb/index-file.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.gdb/index-file.exp +@@ -0,0 +1,118 @@ ++# Copyright 2023 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 . ++ ++# Load the GDB executable, and then 'save gdb-index', and make some ++# checks of the generated index file. ++ ++load_lib selftest-support.exp ++ ++# Can't save an index with readnow. ++if {[readnow]} { ++ untested "cannot create an index when readnow is in use" ++ return -1 ++} ++ ++# A multiplier used to ensure slow tasks are less likely to timeout. ++set timeout_factor 20 ++ ++set filename [selftest_prepare] ++if { $filename eq "" } { ++ unsupported "${gdb_test_file_name}.exp" ++ return -1 ++} ++ ++with_timeout_factor $timeout_factor { ++ # Start GDB, load FILENAME. ++ clean_restart $filename ++} ++ ++# Generate an index file. ++set dir1 [standard_output_file "index_1"] ++remote_exec host "mkdir -p ${dir1}" ++with_timeout_factor $timeout_factor { ++ gdb_test_no_output "save gdb-index $dir1" \ ++ "create gdb-index file" ++} ++ ++# Close GDB. ++gdb_exit ++ ++# Validate that the index-file FILENAME has made efficient use of its ++# symbol hash table. Calculate the number of symbols in the hash ++# table and the total hash table size. The hash table starts with ++# 1024 entries, and then doubles each time it is filled to 75%. At ++# 75% filled, doubling the size takes it to 37.5% filled. ++# ++# Thus, the hash table is correctly filled if: ++# 1. Its size is 1024 (i.e. it has not yet had its first doubling), or ++# 2. Its filled percentage is over 37% ++# ++# We could check that it is not over filled, but I don't as that's not ++# really an issue. But we did once have a bug where the table was ++# doubled incorrectly, in which case we'd see a filled percentage of ++# around 2% in some cases, which is a huge waste of disk space. ++proc check_symbol_table_usage { filename } { ++ # Open the file in binary mode and read-only mode. ++ set fp [open $filename rb] ++ ++ # Configure the channel to use binary translation. ++ fconfigure $fp -translation binary ++ ++ # Read the first 8 bytes of the file, which contain the header of ++ # the index section. ++ set header [read $fp [expr 7 * 4]] ++ ++ # Scan the header to get the version, the CU list offset, and the ++ # types CU list offset. ++ binary scan $header iiiiii version \ ++ _ _ _ symbol_table_offset shortcut_offset ++ ++ # The length of the symbol hash table (in entries). ++ set len [expr ($shortcut_offset - $symbol_table_offset) / 8] ++ ++ # Now walk the hash table and count how many entries are in use. ++ set offset $symbol_table_offset ++ set count 0 ++ while { $offset < $shortcut_offset } { ++ seek $fp $offset ++ set entry [read $fp 8] ++ binary scan $entry ii name_ptr flags ++ if { $name_ptr != 0 } { ++ incr count ++ } ++ ++ incr offset 8 ++ } ++ ++ # Close the file. ++ close $fp ++ ++ # Calculate how full the cache is. ++ set pct [expr (100 * double($count)) / $len] ++ ++ # Write our results out to the gdb.log. ++ verbose -log "Hash table size: $len" ++ verbose -log "Hash table entries: $count" ++ verbose -log "Percentage usage: $pct%" ++ ++ # The minimum fill percentage is actually 37.5%, but we give TCL a ++ # little flexibility in case the FP maths give a result a little ++ # off. ++ gdb_assert { $len == 1024 || $pct > 37 } \ ++ "symbol hash table usage" ++} ++ ++set index_filename_base [file tail $filename] ++check_symbol_table_usage "$dir1/${index_filename_base}.gdb-index" diff --git a/SOURCES/gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch b/SOURCES/gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch new file mode 100644 index 0000000..20e5f75 --- /dev/null +++ b/SOURCES/gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch @@ -0,0 +1,83 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch + +;; Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343). +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c +@@ -0,0 +1,26 @@ ++/* Copyright (C) 2012 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 ++ ++int ++main (int argc, char *argv[]) ++{ ++ printf ("Hello, World.\n"); ++ abort (); ++} +diff --git a/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp +@@ -0,0 +1,39 @@ ++# Copyright 2012 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 . ++ ++set testfile "set-solib-absolute-prefix" ++set srcfile ${testfile}.c ++ ++# It is necessary to verify if the binary is 32-bit, so that the system ++# call `__kernel_vsyscall' originates from vDSO. ++ ++if { ![is_ilp32_target] } { ++ return -1 ++} ++ ++if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { ++ return -1 ++} ++ ++if { ![runto_main] } { ++ return -1 ++} ++ ++gdb_test "continue" "Program received signal SIGABRT, Aborted.*" \ ++ "continue until abort" ++gdb_test "set solib-absolute-prefix /BOGUS_DIRECT" \ ++ ".*warning: Unable to find dynamic linker breakpoint function.*" \ ++ "set solib-absolute-prefix" ++gdb_test "bt" "__kernel_vsyscall.*" "backtrace with __kernel_vsyscall" diff --git a/SOURCES/gdb-rhbz1007614-memleak-infpy_read_memory-test.patch b/SOURCES/gdb-rhbz1007614-memleak-infpy_read_memory-test.patch new file mode 100644 index 0000000..4d05ba5 --- /dev/null +++ b/SOURCES/gdb-rhbz1007614-memleak-infpy_read_memory-test.patch @@ -0,0 +1,170 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch + +;; Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614) +;;=fedoratest + +Original message by Tom Tromey: + + + Message-ID: <871uoc1va3.fsf@fleche.redhat.com> + +Comment from Sergio Durigan Junior: + + In order to correctly test this patch, I wrote a testcase based on Jan + Kratochvil's . The + testcase, which can be seen below, tests GDB in order to see if the + amount of memory being leaked is minimal, as requested in the bugzilla. + It is hard to define what "minimum" is, so I ran the testcase on all + supported RHEL architectures and came up with an average. + +commit cc0265cdda9dc7e8665e8bfcf5b4477489daf27c +Author: Tom Tromey +Date: Wed Mar 28 17:38:08 2012 +0000 + + * python/py-inferior.c (infpy_read_memory): Remove cleanups and + explicitly free 'buffer' on exit paths. Decref 'membuf_object' + before returning. + +diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c +@@ -0,0 +1,27 @@ ++/* 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 . */ ++ ++static struct x ++ { ++ char unsigned u[4096]; ++ } x, *px = &x; ++ ++int ++main (int argc, char *argv[]) ++{ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp +@@ -0,0 +1,68 @@ ++# 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 . ++ ++set testfile py-gdb-rhbz1007614-memleak-infpy_read_memory ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++ ++if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { ++ return -1 ++} ++ ++if { [skip_python_tests] } { continue } ++ ++set pid_of_gdb [exp_pid -i [board_info host fileid]] ++ ++proc memory_v_pages_get {} { ++ global pid_of_gdb ++ set fd [open "/proc/$pid_of_gdb/statm"] ++ gets $fd line ++ close $fd ++ # number of pages of virtual memory ++ scan $line "%d" drs ++ return $drs ++} ++ ++if { ![runto_main] } { ++ untested $testfile.exp ++ return -1 ++} ++ ++set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py] ++ ++gdb_test "source ${remote_python_file}" "" ++ ++gdb_test "hello-world" "" ++ ++set kbytes_before [memory_v_pages_get] ++verbose -log "kbytes_before = $kbytes_before" ++ ++gdb_test "hello-world" "" ++ ++set kbytes_after [memory_v_pages_get] ++verbose -log "kbytes_after = $kbytes_after" ++ ++set kbytes_diff [expr $kbytes_after - $kbytes_before] ++verbose -log "kbytes_diff = $kbytes_diff" ++ ++# The value "1000" was calculated by running a few GDB sessions with this ++# testcase, and seeing how much (in average) the memory consumption ++# increased after the "hello-world" command issued above. The average ++# was around 500 bytes, so I chose 1000 as a high estimate. ++if { $kbytes_diff > 1000 } { ++ fail "there is a memory leak on GDB (RHBZ 1007614)" ++} else { ++ pass "there is not a memory leak on GDB (RHBZ 1007614)" ++} +diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py +@@ -0,0 +1,30 @@ ++# Copyright (C) 2014 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++class HelloWorld (gdb.Command): ++ """Greet the whole world.""" ++ ++ def __init__ (self): ++ super (HelloWorld, self).__init__ ("hello-world", ++ gdb.COMMAND_OBSCURE) ++ ++ def invoke (self, arg, from_tty): ++ px = gdb.parse_and_eval("px") ++ core = gdb.inferiors()[0] ++ for i in range(256 * 1024): ++ chunk = core.read_memory(px, 4096) ++ print "Hello, World!" ++ ++HelloWorld () diff --git a/SOURCES/gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch b/SOURCES/gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch new file mode 100644 index 0000000..d92bfc3 --- /dev/null +++ b/SOURCES/gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch @@ -0,0 +1,235 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch + +;; Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan +;; Kratochvil, RH BZ 1084404). +;;=fedoratest + +These testcases have been created by compiling glibc-2.17-78 on +RHEL-7.1 s390x/ppc64 boxes, and then taking the "select.o" file +present at $builddir/misc/select.o. + +diff --git a/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp +@@ -0,0 +1,34 @@ ++# Copyright 2015 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 . ++ ++if { ![istarget powerpc64-*linux-*] || ![is_lp64_target] } { ++ verbose "Skipping ppc64-prologue-skip.exp" ++ return ++} ++ ++set testfile "ppc64-prologue-skip" ++set uufile "${srcdir}/${subdir}/${testfile}.o.uu" ++set ofile "${srcdir}/${subdir}/${testfile}.o" ++ ++if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } { ++ untested "failed uudecode" ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_load $ofile ++ ++gdb_test "break ___newselect_nocancel" "Breakpoint $decimal at 0xc: file ../sysdeps/unix/syscall-template.S, line 81." "breakpoint on ___newselect_nocancel" +diff --git a/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu +@@ -0,0 +1,70 @@ ++begin 644 ppc64-skip-prologue.o.uu ++M?T5,1@("`0`````````````!`!4````!```````````````````````````` ++M``-(``````!```````!``!0`$8%-B-`L"@``0,(`-#@``(Y$```"3.,`('P( ++M`J;X`0`0^"'_D4@```%@````Z`$`@#@A`'!\"`.F3H``(/@A_X%]*`*F^2$` ++MD/CA`-#XP0#(^*$`P/B!`+CX80"P2````6````#X80!PZ.$`T.C!`,CHH0#` ++MZ($`N.AA`+`X``".1````GP``";X80!X^`$`B.AA`'!(```!8````.DA`)#H ++M`0"(Z&$`>'TH`Z9\#_$@."$`@$SC`"!+__]@```````,($``````````O``( ++M7U]S96QE8W0```````````````````````````!6``(````Y!`'[#@T``0$! ++M`0````$```$N+B]S>7-D97!S+W5N:7@``'-Y"]S>7-C86QL+71E;7!L871E ++M+E,`+W)O;W0O9VQI8F,O9VQI8F,M,BXQ-RTW."YE;#$$!&PP!```` ++M`#`````8`````````+P`20YP$4%^1`X`009!0@Z``4(107Y2$49_20X`!D$& ++M1@``````+G-Y;71A8@`N`````````!(````$@````$`````````"``````````8```` ++M)@````$``````````P```````````````````1@````````````````````` ++M``````````$``````````````"P````(``````````,````````````````` ++M``$8```````````````````````````````!```````````````V`````0`` ++M```````#```````````````````!&``````````0```````````````````` ++M"```````````````,0````0`````````````````````````````"L`````` ++M````,````!(````%``````````@`````````&````#L````!```````````` ++M``````````````````$H```````````````````````````````!```````` ++M``````!0`````0`````````````````````````````!*`````````!:```` ++M`````````````````0``````````````2P````0````````````````````` ++M````````"O``````````&````!(````(``````````@`````````&````&$` ++M```!``````````````````````````````&"`````````),````````````` ++M```````!``````````````!<````!``````````````````````````````+ ++M"`````````!@````$@````H`````````"``````````8````;0````$````` ++M`````````````````````````A4`````````%`````````````````````$` ++M`````````````(`````!``````````````````````````````(P```````` ++M`#`````````````````````0``````````````![````!``````````````` ++M```````````````+:``````````P````$@````T`````````"``````````8 ++M````E`````$``````````@```````````````````F``````````2``````` ++M``````````````@``````````````(\````$```````````````````````` ++M``````N8`````````!@````2````#P`````````(`````````!@````1```` ++M`P`````````````````````````````"J`````````">```````````````` ++M`````0```````````````0````(`````````````````````````````"$@` ++M```````!L````!,````+``````````@`````````&`````D````#```````` ++M``````````````````````GX`````````'H````````````````````!```` ++M`````````````````````````````````````````````P```0`````````` ++M`````````````````P```P```````````````````````````P``!``````` ++M`````````````````````P``!0```````````````````````````P``"@`` ++M`````````````````````````P``#````````````````````````````P`` ++M"````````````````````````````P``#0`````````````````````````` ++M`P``#P```````````````````````````P``!P`````````````````````` ++M```!$@``!0```````````````````-@````*$@```0`````````,```````` ++M`#`````@$``````````````````````````````P$``````````````````` ++M``````````!*$`````````````````````````````!E(@``!0`````````` ++M`````````-@```!S(@``!0```````````````````-@`7U]S96QE8W0`7U]? ++M;F5W6YC8V%N8V5L`%]?;&EB8U]D:7-A8FQE7V%S>6YC8V%N8V5L`%]? ++M;&EB8U]S96QE8W0`. ++ ++if { ![istarget s390x-*linux-*] || ![is_lp64_target] } { ++ verbose "Skipping s390x-prologue-skip.exp" ++ return ++} ++ ++set testfile "s390x-prologue-skip" ++set uufile "${srcdir}/${subdir}/${testfile}.o.uu" ++set ofile "${srcdir}/${subdir}/${testfile}.o" ++ ++if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } { ++ untested "failed uudecode" ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_load $ofile ++ ++gdb_test "break select" "Breakpoint $decimal at 0x48: file ../sysdeps/unix/syscall-template.S, line 81." "breakpoint on select" +diff --git a/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu b/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu +@@ -0,0 +1,64 @@ ++begin 644 s390x-prologue-skip.o.uu ++M?T5,1@("`0`````````````!`!8````!```````````````````````````` ++M``+```````!```````!``!(`#^LE\!``).O?\&@`)+D$`.^G^_]@X^#P```D ++MP.4`````N00``NLE\+``!`J.N00`TKD$`"#`Y0````"Y!``MZ]_Q"``$I_0` ++M"L`0`````+\/$`"G=/_7"HZG2?`!N2$`),"T``````?^````5@`"````.0$! ++M^PX-``$!`0$````!```!+BXO7-C86QL+71E;7!L ++M871E+E,``0`````)`@```````````]```0)F$P("``$!````CP`"``````@! ++M```````````````````````````N+B]S>7-D97!S+W5N:7@OE(``7@. ++M`1L,#Z`!````````&````!P`````````1`!,CP6.!HT'2`[``@```!`````X ++M`````````"```````"YS>6UT86(`+G-T``````````&````!`````&``````````@````````` ++M&````%<````!``````````````````````````````$"`````````),````` ++M```````````````!``````````````!2````!``````````````````````` ++M```````)^`````````!@````$`````@`````````"``````````8````8P`` ++M``$``````````````````````````````94`````````%``````````````` ++M``````$``````````````'8````!``````````````````````````````&P ++M`````````#`````````````````````0``````````````!Q````!``````` ++M```````````````````````*6``````````P````$`````L`````````"``` ++M```````8````B@````$``````````@```````````````````>`````````` ++M2`````````````````````@``````````````(4````$```````````````` ++M``````````````J(`````````#`````0````#0`````````(`````````!@` ++M```1`````P`````````````````````````````"*`````````"4```````` ++M`````````````0```````````````0````(````````````````````````` ++M````!T`````````!L````!$````*``````````@`````````&`````D````# ++M``````````````````````````````CP`````````(X````````````````` ++M```!`````````````````````````````````````````````````P```0`` ++M`````````````````````````P```P```````````````````````````P`` ++M!````````````````````````````P``"``````````````````````````` ++M`P``"@```````````````````````````P``!@`````````````````````` ++M`````P``"P```````````````````````````P``#0`````````````````` ++M`````````P``!0`````````````````````````!$``````````````````` ++M```````````;$``````````````````````````````V$@```0````````!( ++M`````````"`````_$`````````````````````````````!7$@```0`````` ++M``!6`````````!````!I$`````````````````````````````!Y(@```0`` ++M``````!(`````````"````"'(@```0````````!(`````````"``7U]L:6)C ++M7V5N86)L95]A +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-rhbz1149205-catch-syscall-after-fork-test.patch + +;; Fix '`catch syscall' doesn't work for parent after `fork' is called' +;; (Philippe Waroquiers, RH BZ 1149205). +;;=fedoratest + +URL: +Message-ID: <1368136582.30058.7.camel@soleil> + + From: Philippe Waroquiers + To: gdb-patches at sourceware dot org + Subject: RFA: fix gdb_assert caused by 'catch signal ...' and fork + Date: Thu, 09 May 2013 23:56:22 +0200 + + The attached patch fixes a gdb_assert caused by the combination of catch + signal and fork: + break-catch-sig.c:152: internal-error: signal_catchpoint_remove_location: Assertion `signal_catch_counts[iter] > 0' failed. + + The problem is that the signal_catch_counts is decremented by detach_breakpoints. + The fix consists in not detaching breakpoint locations of type bp_loc_other. + The patch introduces a new test. + +Comments by Sergio Durigan Junior: + + I addded a specific testcase for this patch, which tests exactly the + issue that the customer is facing. This patch does not solve the + whole problem of catching a syscall and forking (for more details, + see , + specifically comment #3), but it solves the issue reported by the + customer. + + I also removed the original testcase of this patch, because it + relied on "catch signal", which is a command that is not implemented + in this version of GDB. + +commit bd9673a4ded96ea5c108601501c8e59003ea1be6 +Author: Philippe Waroquiers +Date: Tue May 21 18:47:05 2013 +0000 + + Fix internal error caused by interaction between catch signal and fork + +diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c +@@ -0,0 +1,11 @@ ++#include ++#include ++ ++int ++main (int argc, char **argv) ++{ ++ if (fork () == 0) ++ sleep (1); ++ chdir ("."); ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp +@@ -0,0 +1,58 @@ ++# Copyright 2015 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 . ++ ++if { [is_remote target] || ![isnative] } then { ++ continue ++} ++ ++set testfile "gdb-rhbz1149205-catch-syscall-fork" ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++ ++# Until "catch syscall" is implemented on other targets... ++if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then { ++ continue ++} ++ ++# This shall be updated whenever 'catch syscall' is implemented ++# on some architecture. ++#if { ![istarget "i\[34567\]86-*-linux*"] ++if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"] ++ && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"] ++ && ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"] } { ++ continue ++} ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { ++ untested ${testfile}.exp ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++gdb_load $binfile ++ ++if { ![runto_main] } { ++ return -1 ++} ++ ++gdb_test "catch syscall chdir" \ ++ "Catchpoint $decimal \\\(syscall (.)?chdir(.)? \\\[$decimal\\\]\\\)" \ ++ "catch syscall chdir" ++ ++gdb_test "continue" \ ++ "Continuing\.\r\n.*\r\nCatchpoint $decimal \\\(call to syscall .?chdir.?.*" \ ++ "continue from catch syscall after fork" diff --git a/SOURCES/gdb-rhbz1156192-recursive-dlopen-test.patch b/SOURCES/gdb-rhbz1156192-recursive-dlopen-test.patch new file mode 100644 index 0000000..96b93ae --- /dev/null +++ b/SOURCES/gdb-rhbz1156192-recursive-dlopen-test.patch @@ -0,0 +1,371 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-rhbz1156192-recursive-dlopen-test.patch + +;; Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to +;; crash.' (RH BZ 1156192). +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c +@@ -0,0 +1,30 @@ ++/* Testcase for recursive dlopen calls. ++ ++ Copyright (C) 2014 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 . */ ++ ++/* This test was copied from glibc's testcase called ++ and related files. */ ++ ++#include ++#include ++ ++void ++bar (void) ++{ ++ printf ("Called bar.\n"); ++} +diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c +@@ -0,0 +1,30 @@ ++/* Testcase for recursive dlopen calls. ++ ++ Copyright (C) 2014 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 . */ ++ ++/* This test was copied from glibc's testcase called ++ and related files. */ ++ ++#include ++#include ++ ++void ++foo (void) ++{ ++ printf ("Called foo.\n"); ++} +diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c +@@ -0,0 +1,125 @@ ++/* Testcase for recursive dlopen calls. ++ ++ Copyright (C) 2014 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 . */ ++ ++/* This test was copied from glibc's testcase called ++ and related files. */ ++ ++#include ++#include ++#include ++#include ++ ++#define DSO "gdb-rhbz1156192-recursive-dlopen-libfoo.so" ++#define FUNC "foo" ++ ++#define DSO1 "gdb-rhbz1156192-recursive-dlopen-libbar.so" ++#define FUNC1 "bar" ++ ++/* Prototype for my hook. */ ++void *custom_malloc_hook (size_t, const void *); ++ ++/* Pointer to old malloc hooks. */ ++void *(*old_malloc_hook) (size_t, const void *); ++ ++/* Call function func_name in DSO dso_name via dlopen. */ ++void ++call_func (const char *dso_name, const char *func_name) ++{ ++ int ret; ++ void *dso; ++ void (*func) (void); ++ char *err; ++ ++ /* Open the DSO. */ ++ dso = dlopen (dso_name, RTLD_NOW|RTLD_GLOBAL); ++ if (dso == NULL) ++ { ++ err = dlerror (); ++ fprintf (stderr, "%s\n", err); ++ exit (1); ++ } ++ /* Clear any errors. */ ++ dlerror (); ++ ++ /* Lookup func. */ ++ *(void **) (&func) = dlsym (dso, func_name); ++ if (func == NULL) ++ { ++ err = dlerror (); ++ if (err != NULL) ++ { ++ fprintf (stderr, "%s\n", err); ++ exit (1); ++ } ++ } ++ /* Call func twice. */ ++ (*func) (); ++ ++ /* Close the library and look for errors too. */ ++ ret = dlclose (dso); ++ if (ret != 0) ++ { ++ err = dlerror (); ++ fprintf (stderr, "%s\n", err); ++ exit (1); ++ } ++ ++} ++ ++/* Empty hook that does nothing. */ ++void * ++custom_malloc_hook (size_t size, const void *caller) ++{ ++ void *result; ++ /* Restore old hooks. */ ++ __malloc_hook = old_malloc_hook; ++ /* First call a function in another library via dlopen. */ ++ call_func (DSO1, FUNC1); ++ /* Called recursively. */ ++ result = malloc (size); ++ /* Restore new hooks. */ ++ old_malloc_hook = __malloc_hook; ++ __malloc_hook = custom_malloc_hook; ++ return result; ++} ++ ++int ++main (void) ++{ ++ ++ /* Save old hook. */ ++ old_malloc_hook = __malloc_hook; ++ /* Install new hook. */ ++ __malloc_hook = custom_malloc_hook; ++ ++ /* Attempt to dlopen a shared library. This dlopen will ++ trigger an access to the ld.so.cache, and that in turn ++ will require a malloc to duplicate data in the cache. ++ The malloc will call our malloc hook which calls dlopen ++ recursively, and upon return of this dlopen the non-ref ++ counted ld.so.cache mapping will be unmapped. We will ++ return to the original dlopen and crash trying to access ++ dlopened data. */ ++ call_func (DSO, FUNC); ++ ++ /* Restore old hook. */ ++ __malloc_hook = old_malloc_hook; ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp +@@ -0,0 +1,157 @@ ++# 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 . ++ ++if {[skip_shlib_tests]} { ++ untested "skipping shlib tests" ++ return 0 ++} elseif {[use_gdb_stub]} { ++ untested "skipping tests because of stub" ++ return 0 ++} ++ ++# Library foo ++set libname1 "gdb-rhbz1156192-recursive-dlopen-libfoo" ++set srcfile_lib1 ${srcdir}/${subdir}/${libname1}.c ++set binfile_lib1 [standard_output_file ${libname1}.so] ++# Library bar ++set libname2 "gdb-rhbz1156192-recursive-dlopen-libbar" ++set srcfile_lib2 ${srcdir}/${subdir}/${libname2}.c ++set binfile_lib2 [standard_output_file ${libname2}.so] ++ ++set testfile "gdb-rhbz1156192-recursive-dlopen" ++set srcfile ${testfile}.c ++set executable ${testfile} ++set binfile [standard_output_file ${executable}] ++ ++if { [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} \ ++ { debug "additional_flags=-fPIC" }] != "" } { ++ untested "Could not compile ${binfile_lib1}" ++ return -1 ++} ++ ++if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} \ ++ { debug "additional_flags=-fPIC" }] != "" } { ++ untested "Could not compile ${binfile_lib2}" ++ return -1 ++} ++ ++if { [prepare_for_testing ${testfile}.exp ${executable} ${srcfile} \ ++ [ list debug shlib_load "additional_flags=-Wno-deprecated-declarations" ]] } { ++ untested "Could not compile ${executable}" ++ return -1 ++} ++ ++set supported 0 ++gdb_test_multiple "run" "initial trial run" { ++ -re -wrap "exited normally.*" { ++ set supported 1 ++ pass $gdb_test_name ++ } ++ -re -wrap "exited with code.*" { ++ untested "failed at $gdb_test_name" ++ } ++} ++ ++if { $supported == 0 } { ++ return -1 ++} ++ ++proc do_test { has_libfoo has_libbar } { ++ global hex binfile_lib2 binfile_lib1 gdb_prompt ++ set libbar_match "[string_to_regexp $binfile_lib2]" ++ set libfoo_match "[string_to_regexp $binfile_lib1]" ++ ++ gdb_test_multiple "info shared" "info shared" { ++ -re ".*$libfoo_match\r\n.*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" { ++ if { $has_libfoo && $has_libbar } { ++ pass "matched libfoo and libbar" ++ } else { ++ fail "matched libfoo and libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)" ++ } ++ } ++ -re ".*$libfoo_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" { ++ if { $has_libfoo && !$has_libbar } { ++ pass "matched libfoo" ++ } else { ++ fail "matched libfoo (has_libfoo = $has_libfoo, has_libbar = $has_libbar)" ++ } ++ } ++ -re ".*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" { ++ if { $has_libbar && !$has_libfoo } { ++ pass "matched libbar" ++ } else { ++ fail "matched libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)" ++ } ++ } ++ "\r\n${gdb_prompt} $" { ++ if { !$has_libfoo && !$has_libbar } { ++ pass "did not match libfoo nor libbar" ++ } else { ++ fail "did not match libfoo nor libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)" ++ } ++ } ++ } ++} ++ ++proc test_stop_on_solib_events { } { ++ set pass 0 ++ # This variable holds the information about whether libfoo and ++ # libbar (respectively) are expected in the "info shared" output. ++ set solib_event_order { { 0 0 } { 0 0 } { 0 0 } { 0 1 } \ ++ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \ ++ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \ ++ { 0 1 } { 0 0 } { 0 0 1 } { 1 1 } \ ++ { 1 1 } { 1 0 } { 1 0 } { 1 1 } \ ++ { 1 1 } { 1 0 1 } { 1 0 } { 1 0 } } ++ ++ with_test_prefix "stop-on-solib-events" { ++ gdb_test_no_output "set stop-on-solib-events 1" "setting stop-on-solib-events" ++ ++ gdb_run_cmd ++ gdb_test "" "Wait for first prompt" ++ foreach l $solib_event_order { ++ incr pass ++ with_test_prefix "pass #$pass" { ++ set should_be_corrupted [expr 0+0[lindex $l 2]] ++ do_test [lindex $l 0] [lindex $l 1] ++ set test "continue" ++ global gdb_prompt ++ gdb_test_multiple $test $test { ++ -re "\r\nwarning: Corrupted shared library list:.*\r\nStopped due to shared library event.*\r\n$gdb_prompt $" { ++ set corrupted 1 ++ pass $test ++ } ++ -re "\r\nStopped due to shared library event.*\r\n$gdb_prompt $" { ++ set corrupted 0 ++ pass $test ++ } ++ } ++ set test "corrupted=$corrupted but should_be_corrupted=$should_be_corrupted" ++ if {$corrupted == $should_be_corrupted} { ++ pass $test ++ } else { ++ fail $test ++ } ++ } ++ } ++ # In the last pass we do not expect to see libfoo or libbar. ++ incr pass ++ with_test_prefix "pass #$pass" { ++ do_test 0 0 ++ } ++ } ++} ++ ++test_stop_on_solib_events diff --git a/SOURCES/gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch b/SOURCES/gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch new file mode 100644 index 0000000..a0eb440 --- /dev/null +++ b/SOURCES/gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch @@ -0,0 +1,104 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch + +;; [aarch64] Fix hardware watchpoints (RH BZ 1261564). +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.c b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.c +@@ -0,0 +1,33 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2016 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++__attribute__((aligned(16))) struct ++{ ++ int var0, var4, var8; ++} aligned; ++ ++int ++main (void) ++{ ++ aligned.var0 = 1; ++ aligned.var4 = 2; ++ aligned.var8 = 3; ++ ++ aligned.var4 = aligned.var0; ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp +@@ -0,0 +1,53 @@ ++# Copyright (C) 2016 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++if { [prepare_for_testing rhbz1261564-aarch64-watchpoint.exp "rhbz1261564-aarch64-watchpoint"] } { ++ return -1 ++} ++ ++if { ! [ runto main ] } then { return 0 } ++ ++set test "rwatch aligned.var4" ++if [istarget "s390*-*-*"] { ++ gdb_test $test {Target does not support this type of hardware watchpoint\.} ++ untested "s390* does not support hw read watchpoint" ++ return ++} ++gdb_test $test "Hardware read watchpoint \[0-9\]+: aligned.var4" ++ ++proc checkvar { address } { ++ global gdb_prompt ++ ++ set test "p &aligned.var$address" ++ gdb_test_multiple $test $test { ++ -re " = \\(int \\*\\) 0x\[0-9a-f\]+$address \r\n$gdb_prompt $" { ++ pass $test ++ } ++ -re "\r\n$gdb_prompt $" { ++ untested "$test (unexpected ELF layout)" ++ return 0 ++ } ++ } ++ return 1 ++} ++if ![checkvar "0"] { return } ++if ![checkvar "4"] { return } ++if ![checkvar "8"] { return } ++ ++# Assumes: PPC_PTRACE_GETHWDBGINFO::data_bp_alignment == 8 ++# 'lwz' does read only 4 bytes but the hw watchpoint is 8 bytes wide. ++setup_xfail "powerpc*-*-*" ++ ++gdb_continue_to_end diff --git a/SOURCES/gdb-rhbz2232086-refactor-selftest-support.patch b/SOURCES/gdb-rhbz2232086-refactor-selftest-support.patch new file mode 100644 index 0000000..e9febf7 --- /dev/null +++ b/SOURCES/gdb-rhbz2232086-refactor-selftest-support.patch @@ -0,0 +1,77 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Fri, 24 Nov 2023 11:10:08 +0000 +Subject: gdb-rhbz2232086-refactor-selftest-support.patch + +;; Back-port upstream commit 1f0fab7ff86 as part of a fix for +;; non-deterministic gdb-index generation (RH BZ 2232086). + +gdb/testsuite: small refactor in selftest-support.exp + +Split out the code that makes a copy of the GDB executable ready for +self testing into a new proc. A later commit in this series wants to +load the GDB executable into GDB (for creating an on-disk debug +index), but doesn't need to make use of the full do_self_tests proc. + +There should be no changes in what is tested after this commit. + +Approved-By: Tom Tromey + +diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp +--- a/gdb/testsuite/lib/selftest-support.exp ++++ b/gdb/testsuite/lib/selftest-support.exp +@@ -92,11 +92,13 @@ proc selftest_setup { executable function } { + return 0 + } + +-# A simple way to run some self-tests. +- +-proc do_self_tests {function body} { +- global GDB tool +- ++# Prepare for running a self-test by moving the GDB executable to a ++# location where we can use it as the inferior. Return the filename ++# of the new location. ++# ++# If the current testing setup is not suitable for running a ++# self-test, then return an empty string. ++proc selftest_prepare {} { + # Are we testing with a remote board? In that case, the target + # won't have access to the GDB's auxilliary data files + # (data-directory, etc.). It's simpler to just skip. +@@ -120,19 +122,31 @@ proc do_self_tests {function body} { + # Run the test with self. Copy the file executable file in case + # this OS doesn't like to edit its own text space. + +- set GDB_FULLPATH [find_gdb $GDB] ++ set gdb_fullpath [find_gdb $::GDB] + + if {[is_remote host]} { +- set xgdb x$tool ++ set xgdb x$::tool + } else { +- set xgdb [standard_output_file x$tool] ++ set xgdb [standard_output_file x$::tool] + } + + # Remove any old copy lying around. + remote_file host delete $xgdb + ++ set filename [remote_download host $gdb_fullpath $xgdb] ++ ++ return $filename ++} ++ ++# A simple way to run some self-tests. ++ ++proc do_self_tests {function body} { ++ set file [selftest_prepare] ++ if { $file eq "" } { ++ return ++ } ++ + gdb_start +- set file [remote_download host $GDB_FULLPATH $xgdb] + + # When debugging GDB with GDB, some operations can take a relatively long + # time, especially if the build is non-optimized. Bump the timeout for the diff --git a/SOURCES/gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch b/SOURCES/gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch new file mode 100644 index 0000000..1997ef9 --- /dev/null +++ b/SOURCES/gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch @@ -0,0 +1,48 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= +Date: Mon, 8 Jan 2024 13:24:05 +0100 +Subject: gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch + +gdb/python: avoid use of _PyOS_ReadlineTState + +In python/py-gdb-readline.c we make use of _PyOS_ReadlineTState, +however, this variable is no longer public in Python 3.13, and so GDB +no longer builds. + +We are making use of _PyOS_ReadlineTState in order to re-acquire the +Python Global Interpreter Lock (GIL). The _PyOS_ReadlineTState +variable is set in Python's outer readline code prior to calling the +user (GDB) supplied readline callback function, which for us is +gdbpy_readline_wrapper. The gdbpy_readline_wrapper function is called +without the GIL held. + +Instead of using _PyOS_ReadlineTState, I propose that we switch to +calling PyGILState_Ensure() and PyGILState_Release(). These functions +will acquire the GIL based on the current thread. I think this should +be sufficient; I can't imagine why we'd be running +gdbpy_readline_wrapper on one thread on behalf of a different Python +thread.... that would be unexpected I think. + +Approved-By: Tom Tromey + +diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c +--- a/gdb/python/py-gdb-readline.c ++++ b/gdb/python/py-gdb-readline.c +@@ -56,13 +56,11 @@ gdbpy_readline_wrapper (FILE *sys_stdin, FILE *sys_stdout, + if (except.reason == RETURN_QUIT) + return NULL; + +- /* The thread state is nulled during gdbpy_readline_wrapper, +- with the original value saved in the following undocumented +- variable (see Python's Parser/myreadline.c and +- Modules/readline.c). */ +- PyEval_RestoreThread (_PyOS_ReadlineTState); ++ ++ /* This readline callback is called without the GIL held. */ ++ gdbpy_gil gil; ++ + gdbpy_convert_exception (except); +- PyEval_SaveThread (); + return NULL; + } + diff --git a/SOURCES/gdb-rhbz2250652-gdbpy_gil.patch b/SOURCES/gdb-rhbz2250652-gdbpy_gil.patch new file mode 100644 index 0000000..a72c350 --- /dev/null +++ b/SOURCES/gdb-rhbz2250652-gdbpy_gil.patch @@ -0,0 +1,81 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= +Date: Mon, 8 Jan 2024 13:12:15 +0100 +Subject: gdb-rhbz2250652-gdbpy_gil.patch + +gdb: move gdbpy_gil into python-internal.h + +Move gdbpy_gil class into python-internal.h, the next +commit wants to make use of this class from a file other +than python.c. + +Approved-By: Tom Tromey + +diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h +--- a/gdb/python/python-internal.h ++++ b/gdb/python/python-internal.h +@@ -754,6 +754,30 @@ class gdbpy_allow_threads + PyThreadState *m_save; + }; + ++/* A helper class to save and restore the GIL, but without touching ++ the other globals that are handled by gdbpy_enter. */ ++ ++class gdbpy_gil ++{ ++public: ++ ++ gdbpy_gil () ++ : m_state (PyGILState_Ensure ()) ++ { ++ } ++ ++ ~gdbpy_gil () ++ { ++ PyGILState_Release (m_state); ++ } ++ ++ DISABLE_COPY_AND_ASSIGN (gdbpy_gil); ++ ++private: ++ ++ PyGILState_STATE m_state; ++}; ++ + /* Use this after a TRY_EXCEPT to throw the appropriate Python + exception. */ + #define GDB_PY_HANDLE_EXCEPTION(Exception) \ +diff --git a/gdb/python/python.c b/gdb/python/python.c +--- a/gdb/python/python.c ++++ b/gdb/python/python.c +@@ -257,30 +257,6 @@ gdbpy_enter::finalize () + python_gdbarch = target_gdbarch (); + } + +-/* A helper class to save and restore the GIL, but without touching +- the other globals that are handled by gdbpy_enter. */ +- +-class gdbpy_gil +-{ +-public: +- +- gdbpy_gil () +- : m_state (PyGILState_Ensure ()) +- { +- } +- +- ~gdbpy_gil () +- { +- PyGILState_Release (m_state); +- } +- +- DISABLE_COPY_AND_ASSIGN (gdbpy_gil); +- +-private: +- +- PyGILState_STATE m_state; +-}; +- + /* Set the quit flag. */ + + static void diff --git a/SOURCES/gdb-rhbz2261580-intrusive_list-assertion-fix.patch b/SOURCES/gdb-rhbz2261580-intrusive_list-assertion-fix.patch new file mode 100644 index 0000000..adb8eb7 --- /dev/null +++ b/SOURCES/gdb-rhbz2261580-intrusive_list-assertion-fix.patch @@ -0,0 +1,55 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Kevin Buettner +Date: Mon, 29 Jan 2024 14:51:22 -0700 +Subject: gdb-rhbz2261580-intrusive_list-assertion-fix.patch + +;; Backport upstream workaround for GCC 14 problem which cause assertion +;; failures in GDB. + +[gdb/build] Workaround gcc PR113599 + +Since gcc commit d3f48f68227 ("c++: non-dependent .* operand folding +[PR112427]"), with gdb we run into PR gcc/113599 [1], a wrong-code bug, as +reported in PR build/31281. + +Work around this by flipping inherit order: +... +-class thread_info : public refcounted_object, +- public intrusive_list_node ++class thread_info : public intrusive_list_node, ++ public refcounted_object +... + +An argument could be made that this isn't necessary, because this occurred in +an unreleased gcc version. + +However, I think it could be useful when bisecting gcc for other problems in +building gdb. Having this workaround means the bisect won't reintroduce the +problem. Furthermore, the workaround is harmless. + +Tested on Fedora rawhide x86_64. + +Approved-By: Tom Tromey + +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31281 + +[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113599 + +diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h +--- a/gdb/gdbthread.h ++++ b/gdb/gdbthread.h +@@ -242,10 +242,11 @@ using private_thread_info_up = std::unique_ptr; + strong reference, and is thus not accounted for in the thread's + refcount. + +- The intrusive_list_node base links threads in a per-inferior list. */ ++ The intrusive_list_node base links threads in a per-inferior list. ++ We place it first in the inherit order to work around PR gcc/113599. */ + +-class thread_info : public refcounted_object, +- public intrusive_list_node ++class thread_info : public intrusive_list_node, ++ public refcounted_object + { + public: + explicit thread_info (inferior *inf, ptid_t ptid); diff --git a/SOURCES/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch b/SOURCES/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch new file mode 100644 index 0000000..0df5ee5 --- /dev/null +++ b/SOURCES/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch @@ -0,0 +1,147 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch + +;; Import regression test for `gdb/findvar.c:417: internal-error: +;; read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5. +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.threads/tls-rhbz947564.cc b/gdb/testsuite/gdb.threads/tls-rhbz947564.cc +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/tls-rhbz947564.cc +@@ -0,0 +1,53 @@ ++#include ++#include ++ ++class x ++ { ++ public: ++ int n; ++ ++ x() : n(0) {} ++ }; ++ ++class y ++ { ++ public: ++ int v; ++ ++ y() : v(0) {} ++ static __thread x *xp; ++ }; ++ ++__thread x *y::xp; ++ ++static void ++foo (y *yp) ++{ ++ yp->v = 1; /* foo_marker */ ++} ++ ++static void * ++bar (void *unused) ++{ ++ x xinst; ++ y::xp= &xinst; ++ ++ y yy; ++ foo(&yy); ++ ++ return NULL; ++} ++ ++int ++main(int argc, char *argv[]) ++{ ++ pthread_t t[2]; ++ ++ pthread_create (&t[0], NULL, bar, NULL); ++ pthread_create (&t[1], NULL, bar, NULL); ++ ++ pthread_join (t[0], NULL); ++ pthread_join (t[1], NULL); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.threads/tls-rhbz947564.exp b/gdb/testsuite/gdb.threads/tls-rhbz947564.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/tls-rhbz947564.exp +@@ -0,0 +1,75 @@ ++# Copyright (C) 2013 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . */ ++ ++set testfile tls-rhbz947564 ++set srcfile ${testfile}.cc ++set binfile [standard_output_file ${testfile}] ++ ++if [istarget "*-*-linux"] then { ++ set target_cflags "-D_MIT_POSIX_THREADS" ++} else { ++ set target_cflags "" ++} ++ ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list c++ debug]] != "" } { ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++ ++gdb_load ${binfile} ++ ++if { ![runto_main] } { ++ fail "Can't run to function main" ++ return 0 ++} ++ ++gdb_breakpoint "foo" ++gdb_continue_to_breakpoint "foo" ".* foo_marker .*" ++ ++proc get_xp_val {try} { ++ global expect_out ++ global gdb_prompt ++ global hex ++ ++ set xp_val "" ++ gdb_test_multiple "print *yp" "print yp value" { ++ -re { = \{v = 0, static xp = (0x[0-9a-f]+)\}.* } { ++ pass "print $try value of *yp" ++ set xp_val $expect_out(1,string) ++ } ++ -re "$gdb_prompt $" { ++ fail "print $try value of *yp" ++ } ++ timeout { ++ fail "print $try value of *yp (timeout)" ++ } ++ } ++ return $xp_val ++} ++ ++set first_run [get_xp_val "first"] ++ ++gdb_test "continue" "Breakpoint \[0-9\]+, foo \\\(yp=$hex\\\) at.*" ++ ++set second_run [get_xp_val "second"] ++ ++if { $first_run != $second_run } { ++ pass "different values for TLS variable" ++} else { ++ fail "different values for TLS variable" ++} diff --git a/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-1-of-5.patch b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-1-of-5.patch new file mode 100644 index 0000000..fbecc59 --- /dev/null +++ b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-1-of-5.patch @@ -0,0 +1,70 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Mon, 9 May 2022 17:51:54 +0100 +Subject: gdb-rhel-13298-inferior-funcall-bp-condition-1-of-5.patch + +;;Revert "gdb: remove unnecessary parameter wait_ptid from do_target_wait" +;;(Andrew Burgess, RHEL-13298) + +This reverts commit ac0d67ed1dcf470bad6a3bc4800c2ddc9bedecca. + +There was nothing wrong with the commit which I'm reverting here, but +it removed some functionality that will be needed for a later commit; +that is, the ability for GDB to ask for events from a specific ptid_t +via the do_target_wait function. + +In a follow up commit, this functionality will be used to implement +inferior function calls in multi-threaded inferiors. + +This is not a straight revert of the above commit. Reverting the +above commit replaces a 'nullptr' with 'NULL', I've gone in and +changed that, preserving the 'nullptr'. + +Reviewed-By: Tankut Baris Aktemur +Tested-By: Luis Machado +Tested-By: Keith Seitz + +diff --git a/gdb/infrun.c b/gdb/infrun.c +--- a/gdb/infrun.c ++++ b/gdb/infrun.c +@@ -3946,7 +3946,8 @@ do_target_wait_1 (inferior *inf, ptid_t ptid, + more events. Polls for events from all inferiors/targets. */ + + static bool +-do_target_wait (execution_control_state *ecs, target_wait_flags options) ++do_target_wait (ptid_t wait_ptid, execution_control_state *ecs, ++ target_wait_flags options) + { + int num_inferiors = 0; + int random_selector; +@@ -3956,9 +3957,10 @@ do_target_wait (execution_control_state *ecs, target_wait_flags options) + polling the rest of the inferior list starting from that one in a + circular fashion until the whole list is polled once. */ + +- auto inferior_matches = [] (inferior *inf) ++ auto inferior_matches = [&wait_ptid] (inferior *inf) + { +- return inf->process_target () != nullptr; ++ return (inf->process_target () != nullptr ++ && ptid_t (inf->pid).matches (wait_ptid)); + }; + + /* First see how many matching inferiors we have. */ +@@ -3997,7 +3999,7 @@ do_target_wait (execution_control_state *ecs, target_wait_flags options) + + auto do_wait = [&] (inferior *inf) + { +- ecs->ptid = do_target_wait_1 (inf, minus_one_ptid, &ecs->ws, options); ++ ecs->ptid = do_target_wait_1 (inf, wait_ptid, &ecs->ws, options); + ecs->target = inf->process_target (); + return (ecs->ws.kind () != TARGET_WAITKIND_IGNORE); + }; +@@ -4427,7 +4429,7 @@ fetch_inferior_event () + the event. */ + scoped_disable_commit_resumed disable_commit_resumed ("handling event"); + +- if (!do_target_wait (&ecs, TARGET_WNOHANG)) ++ if (!do_target_wait (minus_one_ptid, &ecs, TARGET_WNOHANG)) + { + infrun_debug_printf ("do_target_wait returned no event"); + disable_commit_resumed.reset_and_commit (); diff --git a/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-2-of-5.patch b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-2-of-5.patch new file mode 100644 index 0000000..f582130 --- /dev/null +++ b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-2-of-5.patch @@ -0,0 +1,1274 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Fri, 9 Oct 2020 13:27:13 +0200 +Subject: gdb-rhel-13298-inferior-funcall-bp-condition-2-of-5.patch + +;;gdb: fix b/p conditions with infcalls in multi-threaded inferiors +;;(Andrew Burgess, RHEL-13298) + +This commit fixes bug PR 28942, that is, creating a conditional +breakpoint in a multi-threaded inferior, where the breakpoint +condition includes an inferior function call. + +Currently, when a user tries to create such a breakpoint, then GDB +will fail with: + + (gdb) break infcall-from-bp-cond-single.c:61 if (return_true ()) + Breakpoint 2 at 0x4011fa: file /tmp/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c, line 61. + (gdb) continue + Continuing. + [New Thread 0x7ffff7c5d700 (LWP 2460150)] + [New Thread 0x7ffff745c700 (LWP 2460151)] + [New Thread 0x7ffff6c5b700 (LWP 2460152)] + [New Thread 0x7ffff645a700 (LWP 2460153)] + [New Thread 0x7ffff5c59700 (LWP 2460154)] + Error in testing breakpoint condition: + Couldn't get registers: No such process. + An error occurred while in a function called from GDB. + Evaluation of the expression containing the function + (return_true) will be abandoned. + When the function is done executing, GDB will silently stop. + Selected thread is running. + (gdb) + +Or, in some cases, like this: + + (gdb) break infcall-from-bp-cond-simple.c:56 if (is_matching_tid (arg, 1)) + Breakpoint 2 at 0x401194: file /tmp/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c, line 56. + (gdb) continue + Continuing. + [New Thread 0x7ffff7c5d700 (LWP 2461106)] + [New Thread 0x7ffff745c700 (LWP 2461107)] + ../../src.release/gdb/nat/x86-linux-dregs.c:146: internal-error: x86_linux_update_debug_registers: Assertion `lwp_is_stopped (lwp)' failed. + A problem internal to GDB has been detected, + further debugging may prove unreliable. + +The precise error depends on the exact thread state; so there's race +conditions depending on which threads have fully started, and which +have not. But the underlying problem is always the same; when GDB +tries to execute the inferior function call from within the breakpoint +condition, GDB will, incorrectly, try to resume threads that are +already running - GDB doesn't realise that some threads might already +be running. + +The solution proposed in this patch requires an additional member +variable thread_info::in_cond_eval. This flag is set to true (in +breakpoint.c) when GDB is evaluating a breakpoint condition. + +In user_visible_resume_ptid (infrun.c), when the in_cond_eval flag is +true, then GDB will only try to resume the current thread, that is, +the thread for which the breakpoint condition is being evaluated. +This solves the problem of GDB trying to resume threads that are +already running. + +The next problem is that inferior function calls are assumed to be +synchronous, that is, GDB doesn't expect to start an inferior function +call in thread #1, then receive a stop from thread #2 for some other, +unrelated reason. To prevent GDB responding to an event from another +thread, we update fetch_inferior_event and do_target_wait in infrun.c, +so that, when an inferior function call (on behalf of a breakpoint +condition) is in progress, we only wait for events from the current +thread (the one evaluating the condition). + +In do_target_wait I had to change the inferior_matches lambda +function, which is used to select which inferior to wait on. +Previously the logic was this: + + auto inferior_matches = [&wait_ptid] (inferior *inf) + { + return (inf->process_target () != nullptr + && ptid_t (inf->pid).matches (wait_ptid)); + }; + +This compares the pid of the inferior against the complete ptid we +want to wait on. Before this commit wait_ptid was only ever +minus_one_ptid (which is special, and means any process), and so every +inferior would match. + +After this commit though wait_ptid might represent a specific thread +in a specific inferior. If we compare the pid of the inferior to a +specific ptid then these will not match. The fix is to compare +against the pid extracted from the wait_ptid, not against the complete +wait_ptid itself. + +In fetch_inferior_event, after receiving the event, we only want to +stop all the other threads, and call inferior_event_handler with +INF_EXEC_COMPLETE, if we are not evaluating a conditional breakpoint. +If we are, then all the other threads should be left doing whatever +they were before. The inferior_event_handler call will be performed +once the breakpoint condition has finished being evaluated, and GDB +decides to stop or not. + +The final problem that needs solving relates to GDB's commit-resume +mechanism, which allows GDB to collect resume requests into a single +packet in order to reduce traffic to a remote target. + +The problem is that the commit-resume mechanism will not send any +resume requests for an inferior if there are already events pending on +the GDB side. + +Imagine an inferior with two threads. Both threads hit a breakpoint, +maybe the same conditional breakpoint. At this point there are two +pending events, one for each thread. + +GDB selects one of the events and spots that this is a conditional +breakpoint, GDB evaluates the condition. + +The condition includes an inferior function call, so GDB sets up for +the call and resumes the one thread, the resume request is added to +the commit-resume queue. + +When the commit-resume queue is committed GDB sees that there is a +pending event from another thread, and so doesn't send any resume +requests to the actual target, GDB is assuming that when we wait we +will select the event from the other thread. + +However, as this is an inferior function call for a condition +evaluation, we will not select the event from the other thread, we +only care about events from the thread that is evaluating the +condition - and the resume for this thread was never sent to the +target. + +And so, GDB hangs, waiting for an event from a thread that was never +fully resumed. + +To fix this issue I have added the concept of "forcing" the +commit-resume queue. When enabling commit resume, if the force flag +is true, then any resumes will be committed to the target, even if +there are other threads with pending events. + +A note on authorship: this patch was based on some work done by +Natalia Saiapova and Tankut Baris Aktemur from Intel[1]. I have made +some changes to their work in this version. + +Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28942 + +[1] https://sourceware.org/pipermail/gdb-patches/2020-October/172454.html + +Co-authored-by: Natalia Saiapova +Co-authored-by: Tankut Baris Aktemur +Reviewed-By: Tankut Baris Aktemur +Tested-By: Luis Machado +Tested-By: Keith Seitz + +diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c +--- a/gdb/breakpoint.c ++++ b/gdb/breakpoint.c +@@ -5679,6 +5679,8 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread) + { + try + { ++ scoped_restore reset_in_cond_eval ++ = make_scoped_restore (&thread->control.in_cond_eval, true); + condition_result = breakpoint_cond_eval (cond); + } + catch (const gdb_exception_error &ex) +diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h +--- a/gdb/gdbthread.h ++++ b/gdb/gdbthread.h +@@ -171,6 +171,9 @@ struct thread_control_state + command. This is used to decide whether "set scheduler-locking + step" behaves like "on" or "off". */ + int stepping_command = 0; ++ ++ /* True if the thread is evaluating a BP condition. */ ++ bool in_cond_eval = false; + }; + + /* Inferior thread specific part of `struct infcall_suspend_state'. */ +diff --git a/gdb/infcall.c b/gdb/infcall.c +--- a/gdb/infcall.c ++++ b/gdb/infcall.c +@@ -672,6 +672,12 @@ run_inferior_call (std::unique_ptr sm, + + proceed (real_pc, GDB_SIGNAL_0); + ++ /* Enable commit resume, but pass true for the force flag. This ++ ensures any thread we set running in proceed will actually be ++ committed to the target, even if some other thread in the current ++ target has a pending event. */ ++ scoped_enable_commit_resumed enable ("infcall", true); ++ + infrun_debug_show_threads ("non-exited threads after proceed for inferior-call", + all_non_exited_threads ()); + +diff --git a/gdb/infrun.c b/gdb/infrun.c +--- a/gdb/infrun.c ++++ b/gdb/infrun.c +@@ -2292,6 +2292,14 @@ user_visible_resume_ptid (int step) + mode. */ + resume_ptid = inferior_ptid; + } ++ else if (inferior_ptid != null_ptid ++ && inferior_thread ()->control.in_cond_eval) ++ { ++ /* The inferior thread is evaluating a BP condition. Other threads ++ might be stopped or running and we do not want to change their ++ state, thus, resume only the current thread. */ ++ resume_ptid = inferior_ptid; ++ } + else if (!sched_multi && target_supports_multi_process ()) + { + /* Resume all threads of the current process (and none of other +@@ -3020,12 +3028,24 @@ schedlock_applies (struct thread_info *tp) + execution_direction))); + } + +-/* Set process_stratum_target::COMMIT_RESUMED_STATE in all target +- stacks that have threads executing and don't have threads with +- pending events. */ ++/* When FORCE_P is false, set process_stratum_target::COMMIT_RESUMED_STATE ++ in all target stacks that have threads executing and don't have threads ++ with pending events. ++ ++ When FORCE_P is true, set process_stratum_target::COMMIT_RESUMED_STATE ++ in all target stacks that have threads executing regardless of whether ++ there are pending events or not. ++ ++ Passing FORCE_P as false makes sense when GDB is going to wait for ++ events from all threads and will therefore spot the pending events. ++ However, if GDB is only going to wait for events from select threads ++ (i.e. when performing an inferior call) then a pending event on some ++ other thread will not be spotted, and if we fail to commit the resume ++ state for the thread performing the inferior call, then the inferior ++ call will never complete (or even start). */ + + static void +-maybe_set_commit_resumed_all_targets () ++maybe_set_commit_resumed_all_targets (bool force_p) + { + scoped_restore_current_thread restore_thread; + +@@ -3054,7 +3074,7 @@ maybe_set_commit_resumed_all_targets () + status to report, handle it before requiring the target to + commit its resumed threads: handling the status might lead to + resuming more threads. */ +- if (proc_target->has_resumed_with_pending_wait_status ()) ++ if (!force_p && proc_target->has_resumed_with_pending_wait_status ()) + { + infrun_debug_printf ("not requesting commit-resumed for target %s, a" + " thread has a pending waitstatus", +@@ -3064,7 +3084,7 @@ maybe_set_commit_resumed_all_targets () + + switch_to_inferior_no_thread (inf); + +- if (target_has_pending_events ()) ++ if (!force_p && target_has_pending_events ()) + { + infrun_debug_printf ("not requesting commit-resumed for target %s, " + "target has pending events", +@@ -3157,7 +3177,7 @@ scoped_disable_commit_resumed::reset () + { + /* This is the outermost instance, re-enable + COMMIT_RESUMED_STATE on the targets where it's possible. */ +- maybe_set_commit_resumed_all_targets (); ++ maybe_set_commit_resumed_all_targets (false); + } + else + { +@@ -3190,7 +3210,7 @@ scoped_disable_commit_resumed::reset_and_commit () + /* See infrun.h. */ + + scoped_enable_commit_resumed::scoped_enable_commit_resumed +- (const char *reason) ++ (const char *reason, bool force_p) + : m_reason (reason), + m_prev_enable_commit_resumed (enable_commit_resumed) + { +@@ -3202,7 +3222,7 @@ scoped_enable_commit_resumed::scoped_enable_commit_resumed + + /* Re-enable COMMIT_RESUMED_STATE on the targets where it's + possible. */ +- maybe_set_commit_resumed_all_targets (); ++ maybe_set_commit_resumed_all_targets (force_p); + + maybe_call_commit_resumed_all_targets (); + } +@@ -3957,10 +3977,11 @@ do_target_wait (ptid_t wait_ptid, execution_control_state *ecs, + polling the rest of the inferior list starting from that one in a + circular fashion until the whole list is polled once. */ + +- auto inferior_matches = [&wait_ptid] (inferior *inf) ++ ptid_t wait_ptid_pid {wait_ptid.pid ()}; ++ auto inferior_matches = [&wait_ptid_pid] (inferior *inf) + { + return (inf->process_target () != nullptr +- && ptid_t (inf->pid).matches (wait_ptid)); ++ && ptid_t (inf->pid).matches (wait_ptid_pid)); + }; + + /* First see how many matching inferiors we have. */ +@@ -4429,7 +4450,17 @@ fetch_inferior_event () + the event. */ + scoped_disable_commit_resumed disable_commit_resumed ("handling event"); + +- if (!do_target_wait (minus_one_ptid, &ecs, TARGET_WNOHANG)) ++ /* Is the current thread performing an inferior function call as part ++ of a breakpoint condition evaluation? */ ++ bool in_cond_eval = (inferior_ptid != null_ptid ++ && inferior_thread ()->control.in_cond_eval); ++ ++ /* If the thread is in the middle of the condition evaluation, wait for ++ an event from the current thread. Otherwise, wait for an event from ++ any thread. */ ++ ptid_t waiton_ptid = in_cond_eval ? inferior_ptid : minus_one_ptid; ++ ++ if (!do_target_wait (waiton_ptid, &ecs, TARGET_WNOHANG)) + { + infrun_debug_printf ("do_target_wait returned no event"); + disable_commit_resumed.reset_and_commit (); +@@ -4487,7 +4518,12 @@ fetch_inferior_event () + bool should_notify_stop = true; + bool proceeded = false; + +- stop_all_threads_if_all_stop_mode (); ++ /* If the thread that stopped just completed an inferior ++ function call as part of a condition evaluation, then we ++ don't want to stop all the other threads. */ ++ if (ecs.event_thread == nullptr ++ || !ecs.event_thread->control.in_cond_eval) ++ stop_all_threads_if_all_stop_mode (); + + clean_up_just_stopped_threads_fsms (&ecs); + +@@ -4514,7 +4550,7 @@ fetch_inferior_event () + proceeded = normal_stop (); + } + +- if (!proceeded) ++ if (!proceeded && !in_cond_eval) + { + inferior_event_handler (INF_EXEC_COMPLETE); + cmd_done = 1; +diff --git a/gdb/infrun.h b/gdb/infrun.h +--- a/gdb/infrun.h ++++ b/gdb/infrun.h +@@ -406,7 +406,8 @@ extern void maybe_call_commit_resumed_all_targets (); + + struct scoped_enable_commit_resumed + { +- explicit scoped_enable_commit_resumed (const char *reason); ++ explicit scoped_enable_commit_resumed (const char *reason, ++ bool force_p = false); + ~scoped_enable_commit_resumed (); + + DISABLE_COPY_AND_ASSIGN (scoped_enable_commit_resumed); +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.c +@@ -0,0 +1,135 @@ ++/* Copyright 2022-2024 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 ++ ++#define NUM_THREADS 2 ++ ++pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; ++ ++/* Some global variables to poke, just for something to do. */ ++volatile int global_var_0 = 0; ++volatile int global_var_1 = 0; ++ ++/* This flag is updated from GDB. */ ++volatile int raise_signal = 0; ++ ++/* Implement the breakpoint condition function. Release the other thread ++ and try to give the other thread a chance to run. Then return ANSWER. */ ++int ++condition_core_func (int answer) ++{ ++ /* This unlock should release the other thread. */ ++ if (pthread_mutex_unlock (&mutex) != 0) ++ abort (); ++ ++ /* And this yield and sleep should (hopefully) give the other thread a ++ chance to run. This isn't guaranteed of course, but once the other ++ thread does run it should hit a breakpoint, which GDB should ++ (temporarily) ignore, so there's no easy way for us to know the other ++ thread has done what it needs to, thus, yielding and sleeping is the ++ best we can do. */ ++ sched_yield (); ++ sleep (2); ++ ++ return answer; ++} ++ ++void ++stop_marker () ++{ ++ int a = 100; /* Final breakpoint here. */ ++} ++ ++/* A breakpoint condition function that always returns true. */ ++int ++condition_true_func () ++{ ++ return condition_core_func (1); ++} ++ ++/* A breakpoint condition function that always returns false. */ ++int ++condition_false_func () ++{ ++ return condition_core_func (0); ++} ++ ++void * ++worker_func (void *arg) ++{ ++ volatile int *ptr = 0; ++ int tid = *((int *) arg); ++ ++ switch (tid) ++ { ++ case 0: ++ global_var_0 = 11; /* First thread breakpoint. */ ++ break; ++ ++ case 1: ++ if (pthread_mutex_lock (&mutex) != 0) ++ abort (); ++ if (raise_signal) ++ global_var_1 = *ptr; /* Signal here. */ ++ else ++ global_var_1 = 99; /* Other thread breakpoint. */ ++ break; ++ ++ default: ++ abort (); ++ } ++ ++ return NULL; ++} ++ ++int ++main () ++{ ++ pthread_t threads[NUM_THREADS]; ++ int args[NUM_THREADS]; ++ ++ /* Set an alarm, just in case the test deadlocks. */ ++ alarm (300); ++ ++ /* We want the mutex to start locked. */ ++ if (pthread_mutex_lock (&mutex) != 0) ++ abort (); ++ ++ for (int i = 0; i < NUM_THREADS; i++) ++ { ++ args[i] = i; ++ pthread_create (&threads[i], NULL, worker_func, &args[i]); ++ } ++ ++ for (int i = 0; i < NUM_THREADS; i++) ++ { ++ void *retval; ++ pthread_join (threads[i], &retval); ++ } ++ ++ /* Unlock once we're done, just for cleanliness. */ ++ if (pthread_mutex_unlock (&mutex) != 0) ++ abort (); ++ ++ stop_marker (); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp +@@ -0,0 +1,174 @@ ++# Copyright 2022-2024 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 for conditional breakpoints where the breakpoint condition includes ++# an inferior function call. ++# ++# The tests in this script are testing what happens when an event arrives in ++# another thread while GDB is waiting for the inferior function call (in the ++# breakpoint condition) to finish. ++# ++# The expectation is that GDB will queue events for other threads and wait ++# for the inferior function call to complete, if the condition is true, then ++# the conditional breakpoint should be reported first. The other thread ++# event should of course, not get lost, and should be reported as soon as ++# the user tries to continue the inferior. ++# ++# If the conditional breakpoint ends up not being taken (the condition is ++# false), then the other thread event should be reported immediately. ++# ++# This script tests what happens when the other thread event is (a) the ++# other thread hitting a breakpoint, and (b) the other thread taking a ++# signal (SIGSEGV in this case). ++ ++standard_testfile ++ ++if { [build_executable "failed to prepare" ${binfile} "${srcfile}" \ ++ {debug pthreads}] == -1 } { ++ return ++} ++ ++set cond_bp_line [gdb_get_line_number "First thread breakpoint"] ++set other_bp_line [gdb_get_line_number "Other thread breakpoint"] ++set final_bp_line [gdb_get_line_number "Final breakpoint here"] ++set signal_line [gdb_get_line_number "Signal here"] ++ ++# Start GDB based on TARGET_ASYNC and TARGET_NON_STOP, and then runto main. ++proc start_gdb_and_runto_main { target_async target_non_stop } { ++ save_vars { ::GDBFLAGS } { ++ append ::GDBFLAGS \ ++ " -ex \"maint set target-non-stop $target_non_stop\"" ++ append ::GDBFLAGS \ ++ " -ex \"maintenance set target-async ${target_async}\"" ++ ++ clean_restart ${::binfile} ++ } ++ ++ if { ![runto_main] } { ++ return -1 ++ } ++ ++ return 0 ++} ++ ++# Run a test of GDB's conditional breakpoints, where the conditions include ++# inferior function calls. While the inferior function call is executing ++# another thread will hit a breakpoint (when OTHER_THREAD_SIGNAL is false), ++# or receive a signal (when OTHER_THREAD_SIGNAL is true). GDB should report ++# the conditional breakpoint first (if the condition is true), and then ++# report the second thread event once the inferior is continued again. ++# ++# When STOP_AT_COND is true then the conditional breakpoint will have a ++# condition that evaluates to true (and GDB will stop at the breakpoint), ++# otherwise, the condition will evaluate to false (and GDB will not stop at ++# the breakpoint). ++proc run_condition_test { stop_at_cond other_thread_signal \ ++ target_async target_non_stop } { ++ if { [start_gdb_and_runto_main $target_async \ ++ $target_non_stop] == -1 } { ++ return ++ } ++ ++ # Setup the conditional breakpoint. ++ if { $stop_at_cond } { ++ set cond_func "condition_true_func" ++ } else { ++ set cond_func "condition_false_func" ++ } ++ gdb_breakpoint \ ++ "${::srcfile}:${::cond_bp_line} if (${cond_func} ())" ++ set cond_bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number for conditional breakpoint"] ++ ++ if { $other_thread_signal } { ++ # Arrange for the other thread to raise a signal while GDB is ++ # evaluating the breakpoint condition. ++ gdb_test_no_output "set raise_signal = 1" ++ } else { ++ # And a breakpoint that will be hit by another thread only once the ++ # breakpoint condition starts to be evaluated. ++ gdb_breakpoint "${::srcfile}:${::other_bp_line}" ++ set other_bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number for other breakpoint"] ++ } ++ ++ # A final breakpoint once the test has completed. ++ gdb_breakpoint "${::srcfile}:${::final_bp_line}" ++ set final_bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number for final breakpoint"] ++ ++ if { $stop_at_cond } { ++ # Continue. The first breakpoint we hit should be the conditional ++ # breakpoint. The other thread will have hit its breakpoint, but ++ # that will have been deferred until the conditional breakpoint is ++ # reported. ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "" \ ++ "Thread ${::decimal} \"\[^\"\r\n\]+\" hit Breakpoint ${cond_bp_num}, worker_func \[^\r\n\]+:${::cond_bp_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+First thread breakpoint\[^\r\n\]+"] \ ++ "hit the conditional breakpoint" ++ } ++ ++ if { $other_thread_signal } { ++ # Now continue again, the other thread will now report that it ++ # received a signal. ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "Thread ${::decimal} \"\[^\"\r\n\]+\" received signal SIGSEGV, Segmentation fault\\." \ ++ "\\\[Switching to Thread \[^\r\n\]+\\\]" \ ++ "${::hex} in worker_func \[^\r\n\]+:${::signal_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Signal here\[^\r\n\]+"] \ ++ "received signal in other thread" ++ } else { ++ # Now continue again, the other thread will now report its ++ # breakpoint. ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "" \ ++ "Thread ${::decimal} \"\[^\"\r\n\]+\" hit Breakpoint ${other_bp_num}, worker_func \[^\r\n\]+:${::other_bp_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Other thread breakpoint\[^\r\n\]+"] \ ++ "hit the breakpoint in other thread" ++ ++ # Run to the stop marker. ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "" \ ++ "Thread ${::decimal} \"\[^\"\r\n\]+\" hit Breakpoint ${final_bp_num}, stop_marker \[^\r\n\]+:${::final_bp_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Final breakpoint here\[^\r\n\]+"] \ ++ "hit the final breakpoint" ++ } ++ ++ gdb_exit ++} ++ ++foreach_with_prefix target_async { "on" "off" } { ++ foreach_with_prefix target_non_stop { "on" "off" } { ++ foreach_with_prefix other_thread_signal { true false } { ++ foreach_with_prefix stop_at_cond { true false } { ++ run_condition_test $stop_at_cond $other_thread_signal \ ++ $target_async $target_non_stop ++ } ++ } ++ } ++} +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c +@@ -0,0 +1,89 @@ ++/* Copyright 2022-2024 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 ++ ++#define NUM_THREADS 3 ++ ++int ++is_matching_tid (int *tid_ptr, int tid_value) ++{ ++ return *tid_ptr == tid_value; ++} ++ ++int ++return_true () ++{ ++ return 1; ++} ++ ++int ++return_false () ++{ ++ return 0; ++} ++ ++int ++function_that_segfaults () ++{ ++ int *p = 0; ++ *p = 1; /* Segfault happens here. */ ++} ++ ++int ++function_with_breakpoint () ++{ ++ return 1; /* Nested breakpoint. */ ++} ++ ++void * ++worker_func (void *arg) ++{ ++ int a = 42; /* Breakpoint here. */ ++} ++ ++void ++stop_marker () ++{ ++ int b = 99; /* Stop marker. */ ++} ++ ++int ++main () ++{ ++ pthread_t threads[NUM_THREADS]; ++ int args[NUM_THREADS]; ++ ++ alarm (300); ++ ++ for (int i = 0; i < NUM_THREADS; i++) ++ { ++ args[i] = i; ++ pthread_create (&threads[i], NULL, worker_func, &args[i]); ++ } ++ ++ for (int i = 0; i < NUM_THREADS; i++) ++ { ++ void *retval; ++ pthread_join (threads[i], &retval); ++ } ++ ++ stop_marker (); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp +@@ -0,0 +1,235 @@ ++# Copyright 2022-2024 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 . ++ ++# Some simple tests of inferior function calls from breakpoint ++# conditions, in multi-threaded inferiors. ++# ++# This test sets up a multi-threaded inferior, and places a breakpoint ++# at a location that many of the threads will reach. We repeat the ++# test with different conditions, sometimes a single thread should ++# stop at the breakpoint, sometimes multiple threads should stop, and ++# sometimes no threads should stop. ++ ++standard_testfile ++ ++if { [build_executable "failed to prepare" ${binfile} "${srcfile}" \ ++ {debug pthreads}] == -1 } { ++ return ++} ++ ++set cond_bp_line [gdb_get_line_number "Breakpoint here"] ++set stop_bp_line [gdb_get_line_number "Stop marker"] ++set nested_bp_line [gdb_get_line_number "Nested breakpoint"] ++set segv_line [gdb_get_line_number "Segfault happens here"] ++ ++# Start GDB based on TARGET_ASYNC and TARGET_NON_STOP, and then runto main. ++proc start_gdb_and_runto_main { target_async target_non_stop } { ++ save_vars { ::GDBFLAGS } { ++ append ::GDBFLAGS \ ++ " -ex \"maint set target-non-stop $target_non_stop\"" ++ append ::GDBFLAGS \ ++ " -ex \"maintenance set target-async ${target_async}\"" ++ ++ clean_restart ${::binfile} ++ } ++ ++ if { ![runto_main] } { ++ return -1 ++ } ++ ++ return 0 ++} ++ ++# Run a test of GDB's conditional breakpoints, where the conditions include ++# inferior function calls. ++# ++# CONDITION is the expression to be used as the breakpoint condition. ++# ++# N_EXPECTED_HITS is the number of threads that we expect to stop due to ++# CONDITON. ++# ++# MESSAGE is used as a test name prefix. ++proc run_condition_test { message n_expected_hits condition \ ++ target_async target_non_stop } { ++ with_test_prefix $message { ++ ++ if { [start_gdb_and_runto_main $target_async \ ++ $target_non_stop] == -1 } { ++ return ++ } ++ ++ # Use this convenience variable to track how often the ++ # breakpoint condition has been evaluated. This should be ++ # once per thread. ++ gdb_test "set \$n_cond_eval = 0" ++ ++ # Setup the conditional breakpoint. ++ gdb_breakpoint \ ++ "${::srcfile}:${::cond_bp_line} if ((++\$n_cond_eval) && (${condition}))" ++ ++ # And a breakpoint that we hit when the test is over, this one is ++ # not conditional. Only the main thread gets here once all the ++ # other threads have finished. ++ gdb_breakpoint "${::srcfile}:${::stop_bp_line}" ++ ++ # The number of times we stop at the conditional breakpoint. ++ set n_hit_condition 0 ++ ++ # Now keep 'continue'-ing GDB until all the threads have finished ++ # and we reach the stop_marker breakpoint. ++ gdb_test_multiple "continue" "spot all breakpoint hits" { ++ -re " worker_func \[^\r\n\]+${::srcfile}:${::cond_bp_line}\r\n${::decimal}\\s+\[^\r\n\]+Breakpoint here\[^\r\n\]+\r\n${::gdb_prompt} $" { ++ incr n_hit_condition ++ send_gdb "continue\n" ++ exp_continue ++ } ++ ++ -re " stop_marker \[^\r\n\]+${::srcfile}:${::stop_bp_line}\r\n${::decimal}\\s+\[^\r\n\]+Stop marker\[^\r\n\]+\r\n${::gdb_prompt} $" { ++ pass $gdb_test_name ++ } ++ } ++ ++ gdb_assert { $n_hit_condition == $n_expected_hits } \ ++ "stopped at breakpoint the expected number of times" ++ ++ # Ensure the breakpoint condition was evaluated once per thread. ++ gdb_test "print \$n_cond_eval" "= 3" \ ++ "condition was evaluated in each thread" ++ } ++} ++ ++# Check that after handling a conditional breakpoint (where the condition ++# includes an inferior call), it is still possible to kill the running ++# inferior, and then restart the inferior. ++# ++# At once point doing this would result in GDB giving an assertion error. ++proc_with_prefix run_kill_and_restart_test { target_async target_non_stop } { ++ # This test relies on the 'start' command, which is not possible with ++ # the plain 'remote' target. ++ if { [target_info gdb_protocol] == "remote" } { ++ return ++ } ++ ++ if { [start_gdb_and_runto_main $target_async \ ++ $target_non_stop] == -1 } { ++ return ++ } ++ ++ # Setup the conditional breakpoint. ++ gdb_breakpoint \ ++ "${::srcfile}:${::cond_bp_line} if (is_matching_tid (arg, 1))" ++ gdb_continue_to_breakpoint "worker_func" ++ ++ # Now kill the program being debugged. ++ gdb_test "kill" "" "kill process" \ ++ "Kill the program being debugged.*y or n. $" "y" ++ ++ # Check we can restart the inferior. At one point this would trigger an ++ # assertion. ++ gdb_start_cmd ++} ++ ++# Create a conditional breakpoint which includes a call to a function that ++# segfaults. Run GDB and check what happens when the inferior segfaults ++# during the inferior call. ++proc_with_prefix run_bp_cond_segfaults { target_async target_non_stop } { ++ if { [start_gdb_and_runto_main $target_async \ ++ $target_non_stop] == -1 } { ++ return ++ } ++ ++ # This test relies on the inferior segfaulting when trying to ++ # access address zero. ++ if { [is_address_zero_readable] } { ++ return ++ } ++ ++ # Setup the conditional breakpoint, include a call to ++ # 'function_that_segfaults', which triggers the segfault. ++ gdb_breakpoint \ ++ "${::srcfile}:${::cond_bp_line} if (is_matching_tid (arg, 0) && function_that_segfaults ())" ++ set bp_1_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number of conditional breakpoint"] ++ ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "Thread ${::decimal} \"infcall-from-bp\" received signal SIGSEGV, Segmentation fault\\." \ ++ "${::hex} in function_that_segfaults \\(\\) at \[^\r\n\]+:${::segv_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Segfault happens here\[^\r\n\]+" \ ++ "Error in testing condition for breakpoint ${bp_1_num}:" \ ++ "The program being debugged was signaled while in a function called from GDB\\." \ ++ "GDB remains in the frame where the signal was received\\." \ ++ "To change this behavior use \"set unwindonsignal on\"\\." \ ++ "Evaluation of the expression containing the function" \ ++ "\\(function_that_segfaults\\) will be abandoned\\." \ ++ "When the function is done executing, GDB will silently stop\\."] ++} ++ ++# Create a conditional breakpoint which includes a call to a function that ++# itself has a breakpoint set within it. Run GDB and check what happens ++# when GDB hits the nested breakpoint. ++proc_with_prefix run_bp_cond_hits_breakpoint { target_async target_non_stop } { ++ if { [start_gdb_and_runto_main $target_async \ ++ $target_non_stop] == -1 } { ++ return ++ } ++ ++ # Setup the conditional breakpoint, include a call to ++ # 'function_with_breakpoint' in which we will shortly place a ++ # breakpoint. ++ gdb_breakpoint \ ++ "${::srcfile}:${::cond_bp_line} if (is_matching_tid (arg, 0) && function_with_breakpoint ())" ++ set bp_1_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number of conditional breakpoint"] ++ ++ gdb_breakpoint "${::srcfile}:${::nested_bp_line}" ++ set bp_2_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number of nested breakpoint"] ++ ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "Thread ${::decimal} \"infcall-from-bp\" hit Breakpoint ${bp_2_num}, function_with_breakpoint \\(\\) at \[^\r\n\]+:${::nested_bp_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Nested breakpoint\[^\r\n\]+" \ ++ "Error in testing condition for breakpoint ${bp_1_num}:" \ ++ "The program being debugged stopped while in a function called from GDB\\." \ ++ "Evaluation of the expression containing the function" \ ++ "\\(function_with_breakpoint\\) will be abandoned\\." \ ++ "When the function is done executing, GDB will silently stop\\."] ++} ++ ++foreach_with_prefix target_async { "on" "off" } { ++ foreach_with_prefix target_non_stop { "on" "off" } { ++ run_condition_test "exactly one thread is hit" \ ++ 1 "is_matching_tid (arg, 1)" \ ++ $target_async $target_non_stop ++ run_condition_test "exactly two threads are hit" \ ++ 2 "(is_matching_tid (arg, 0) || is_matching_tid (arg, 2))" \ ++ $target_async $target_non_stop ++ run_condition_test "all three threads are hit" \ ++ 3 "return_true ()" \ ++ $target_async $target_non_stop ++ run_condition_test "no thread is hit" \ ++ 0 "return_false ()" \ ++ $target_async $target_non_stop ++ ++ run_kill_and_restart_test $target_async $target_non_stop ++ run_bp_cond_segfaults $target_async $target_non_stop ++ run_bp_cond_hits_breakpoint $target_async $target_non_stop ++ } ++} +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.c +@@ -0,0 +1,139 @@ ++/* Copyright 2022-2024 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 ++ ++#define NUM_THREADS 5 ++ ++/* Semaphores, used to track when threads have started, and to control ++ when the threads finish. */ ++sem_t startup_semaphore; ++sem_t finish_semaphore; ++ ++/* Mutex to control when the first worker thread hit a breakpoint ++ location. */ ++pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; ++ ++/* Global variable to poke, just so threads have something to do. */ ++volatile int global_var = 0; ++ ++int ++return_true () ++{ ++ return 1; ++} ++ ++int ++return_false () ++{ ++ return 0; ++} ++ ++void * ++worker_func (void *arg) ++{ ++ int tid = *((int *) arg); ++ ++ switch (tid) ++ { ++ case 0: ++ /* Wait for MUTEX to become available, then pass through the ++ conditional breakpoint location. */ ++ if (pthread_mutex_lock (&mutex) != 0) ++ abort (); ++ global_var = 99; /* Conditional breakpoint here. */ ++ if (pthread_mutex_unlock (&mutex) != 0) ++ abort (); ++ break; ++ ++ default: ++ /* Notify the main thread that the thread has started, then wait for ++ the main thread to tell us to finish. */ ++ sem_post (&startup_semaphore); ++ if (sem_wait (&finish_semaphore) != 0) ++ abort (); ++ break; ++ } ++} ++ ++void ++stop_marker () ++{ ++ global_var = 99; /* Stop marker. */ ++} ++ ++int ++main () ++{ ++ pthread_t threads[NUM_THREADS]; ++ int args[NUM_THREADS]; ++ void *retval; ++ ++ /* An alarm, just in case the thread deadlocks. */ ++ alarm (300); ++ ++ /* Semaphore initialization. */ ++ if (sem_init (&startup_semaphore, 0, 0) != 0) ++ abort (); ++ if (sem_init (&finish_semaphore, 0, 0) != 0) ++ abort (); ++ ++ /* Lock MUTEX, this prevents the first worker thread from rushing ahead. */ ++ if (pthread_mutex_lock (&mutex) != 0) ++ abort (); ++ ++ /* Worker thread creation. */ ++ for (int i = 0; i < NUM_THREADS; i++) ++ { ++ args[i] = i; ++ pthread_create (&threads[i], NULL, worker_func, &args[i]); ++ } ++ ++ /* Wait for every thread (other than the first) to tell us it has started ++ up. */ ++ for (int i = 1; i < NUM_THREADS; i++) ++ { ++ if (sem_wait (&startup_semaphore) != 0) ++ abort (); ++ } ++ ++ /* Unlock the first thread so it can proceed. */ ++ if (pthread_mutex_unlock (&mutex) != 0) ++ abort (); ++ ++ /* Wait for the first thread only. */ ++ pthread_join (threads[0], &retval); ++ ++ /* Now post FINISH_SEMAPHORE to allow all the other threads to finish. */ ++ for (int i = 1; i < NUM_THREADS; i++) ++ sem_post (&finish_semaphore); ++ ++ /* Now wait for the remaining threads to complete. */ ++ for (int i = 1; i < NUM_THREADS; i++) ++ pthread_join (threads[i], &retval); ++ ++ /* Semaphore cleanup. */ ++ sem_destroy (&finish_semaphore); ++ sem_destroy (&startup_semaphore); ++ ++ stop_marker (); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp +@@ -0,0 +1,117 @@ ++# Copyright 2022-2024 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 . ++ ++# This test reprocuces bug gdb/28942, performing an inferior function ++# call from a breakpoint condition in a multi-threaded inferior. ++# ++# The important part of this test is that, when the conditional ++# breakpoint is hit, and the condition (which includes an inferior ++# function call) is evaluated, the other threads are running. ++ ++standard_testfile ++ ++if { [build_executable "failed to prepare" ${binfile} "${srcfile}" \ ++ {debug pthreads}] == -1 } { ++ return ++} ++ ++set cond_bp_line [gdb_get_line_number "Conditional breakpoint here"] ++set final_bp_line [gdb_get_line_number "Stop marker"] ++ ++# Start GDB based on TARGET_ASYNC and TARGET_NON_STOP, and then runto main. ++proc start_gdb_and_runto_main { target_async target_non_stop } { ++ save_vars { ::GDBFLAGS } { ++ append ::GDBFLAGS \ ++ " -ex \"maint set target-non-stop $target_non_stop\"" ++ append ::GDBFLAGS \ ++ " -ex \"maintenance set target-async ${target_async}\"" ++ ++ clean_restart ${::binfile} ++ } ++ ++ if { ![runto_main] } { ++ return -1 ++ } ++ ++ return 0 ++} ++ ++# Run a test of GDB's conditional breakpoints, where the conditions include ++# inferior function calls. ++# ++# TARGET_ASYNC and TARGET_NON_STOP are used when starting up GDB. ++# ++# When STOP_AT_COND is true the breakpoint condtion will evaluate to ++# true, and GDB will stop at the breakpoint. Otherwise, the ++# breakpoint condition will evaluate to false and GDB will not stop at ++# the breakpoint. ++proc run_condition_test { stop_at_cond \ ++ target_async target_non_stop } { ++ if { [start_gdb_and_runto_main $target_async \ ++ $target_non_stop] == -1 } { ++ return ++ } ++ ++ # Setup the conditional breakpoint. ++ if { $stop_at_cond } { ++ set cond_func "return_true" ++ } else { ++ set cond_func "return_false" ++ } ++ gdb_breakpoint \ ++ "${::srcfile}:${::cond_bp_line} if (${cond_func} ())" ++ set cond_bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number for conditional breakpoint"] ++ ++ # And a breakpoint that we hit when the test is over, this one is ++ # not conditional. ++ gdb_breakpoint "${::srcfile}:${::final_bp_line}" ++ set final_bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number for final breakpoint"] ++ ++ if { $stop_at_cond } { ++ # Continue. The first breakpoint we hit should be the conditional ++ # breakpoint. The other thread will have hit its breakpoint, but ++ # that will have been deferred until the conditional breakpoint is ++ # reported. ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "" \ ++ "Thread ${::decimal} \"\[^\"\r\n\]+\" hit Breakpoint ${cond_bp_num}, worker_func \[^\r\n\]+:${::cond_bp_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Conditional breakpoint here\[^\r\n\]+"] \ ++ "hit the conditional breakpoint" ++ } ++ ++ # Run to the stop marker. ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "" \ ++ "Thread ${::decimal} \"\[^\"\r\n\]+\" hit Breakpoint ${final_bp_num}, stop_marker \[^\r\n\]+:${::final_bp_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Stop marker\[^\r\n\]+"] \ ++ "hit the final breakpoint" ++} ++ ++foreach_with_prefix target_async { "on" "off" } { ++ foreach_with_prefix target_non_stop { "on" "off" } { ++ foreach_with_prefix stop_at_cond { true false } { ++ run_condition_test $stop_at_cond \ ++ $target_async $target_non_stop ++ } ++ } ++} diff --git a/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-3-of-5.patch b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-3-of-5.patch new file mode 100644 index 0000000..3087f1d --- /dev/null +++ b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-3-of-5.patch @@ -0,0 +1,1148 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Fri, 7 Oct 2022 12:39:07 +0100 +Subject: gdb-rhel-13298-inferior-funcall-bp-condition-3-of-5.patch + +;;gdb: add timeouts for inferior function calls +;;(Andrew Burgess, RHEL-13298) + +In the previous commits I have been working on improving inferior +function call support. One thing that worries me about using inferior +function calls from a conditional breakpoint is: what happens if the +inferior function call fails? + +If the failure is obvious, e.g. the thread performing the call +crashes, or hits a breakpoint, then this case is already well handled, +and the error is reported to the user. + +But what if the thread performing the inferior call just deadlocks? +If the user made the call from a 'print' or 'call' command, then the +user might have some expectation of when the function call should +complete, and, when this time limit is exceeded, the user +will (hopefully) interrupt GDB and regain control of the debug +session. + +But, when the inferior function call is from a breakpoint condition it +is much harder to understand that GDB is deadlocked within an inferior +call. Maybe the breakpoint hasn't been hit yet? Or maybe the +condition was always false? Or maybe GDB is deadlocked in an inferior +call? The only way to know for sure is for the user to periodically +interrupt the inferior, check on the state of all the threads, and +then continue. + +Additionally, the focus of the previous commit was inferior function +calls, from a conditional breakpoint, in a multi-threaded inferior. +This opens up a whole new set of potential failure conditions. For +example, what if the function called relies on interaction with some +other thread, and the other thread crashes? Or hits a breakpoint? +Given how inferior function calls work (in a synchronous manner), a +stop event in some other thread is going to be ignored while the +inferior function call is being executed as part of a breakpoint +condition, and this means that GDB could get stuck waiting for the +original condition thread, which will now never complete. + +In this commit I propose a solution to this problem. A timeout. For +targets that support async-mode we can install an event-loop timer +before starting the inferior function call. When the timer expires we +will stop the thread performing the inferior function call. With this +mechanism in place a user can be sure that any inferior call they make +will either complete, or timeout eventually. + +Adding a timer like this is obviously a change in behaviour for the +more common 'call' and 'print' uses of inferior function calls, so, in +this patch, I propose having two different timers. One I call the +'direct-call-timeout', which is used for 'call' and 'print' commands. +This timeout is by default set to unlimited, which, not surprisingly, +means there is no timeout in place. + +A second timer, which I've called 'indirect-call-timeout', is used for +inferior function calls from breakpoint conditions. This timeout has +a default value of 30 seconds. This is a reasonably long time to +wait, and hopefully should be enough in most cases to allow the +inferior call to complete. An inferior call that takes more than 30 +seconds, which is installed on a breakpoint condition is really going +to slow down the debug session, so hopefully this is not a common use +case. + +The user is, of course, free to reduce, or increase the timeout value, +and can always use Ctrl-c to interrupt an inferior function call, but +this timeout will ensure that GDB will stop at some point. + +The new commands added by this commit are: + + set direct-call-timeout SECONDS + show direct-call-timeout + set indirect-call-timeout SECONDS + show indirect-call-timeout + +These new timeouts do depend on async-mode, so, if async-mode is +disabled (maint set target-async off), or not supported (e.g. target +sim), then the timeout is treated as unlimited (that is, no timeout is +set). + +For targets that "fake" non-async mode, e.g. Linux native, where +non-async mode is really just async mode, but then we park the target +in a sissuspend, we could easily fix things so that the timeouts still +work, however, for targets that really are not async aware, like the +simulator, fixing things so that timeouts work correctly would be a +much bigger task - that effort would be better spent just making the +target async-aware. And so, I'm happy for now that this feature will +only work on async targets. + +The two new show commands will display slightly different text if the +current target is a non-async target, which should allow users to +understand what's going on. + +There's a somewhat random test adjustment needed in gdb.base/help.exp, +the test uses a regexp with the apropos command, and expects to find a +single result. Turns out the new settings I added also matched the +regexp, which broke the test. I've updated the regexp a little to +exclude my new settings. + +Reviewed-By: Tankut Baris Aktemur +Reviewed-By: Eli Zaretskii +Tested-By: Luis Machado +Tested-By: Keith Seitz + +diff --git a/gdb/NEWS b/gdb/NEWS +--- a/gdb/NEWS ++++ b/gdb/NEWS +@@ -1,6 +1,179 @@ + What has changed in GDB? + (Organized release by release) + ++*** Changes since GDB 14 ++ ++* The MPX commands "show/set mpx bound" have been deprecated, as Intel ++ listed MPX as removed in 2019. ++ ++* Building GDB and GDBserver now requires a C++17 compiler. ++ For example, GCC 9 or later. ++ ++* GDB index now contains information about the main function. This speeds up ++ startup when it is being used for some large binaries. ++ ++* On hosts where threading is available, DWARF reading is now done in ++ the background, resulting in faster startup. This can be controlled ++ using "maint set dwarf synchronous". ++ ++* Changed commands ++ ++disassemble ++ Attempting to use both the 'r' and 'b' flags with the disassemble ++ command will now give an error. Previously the 'b' flag would ++ always override the 'r' flag. ++ ++gcore ++generate-core-file ++ GDB now generates sparse core files, on systems that support it. ++ ++maintenance info line-table ++ Add an EPILOGUE-BEGIN column to the output of the command. It indicates ++ if the line is considered the start of the epilgoue, and thus a point at ++ which the frame can be considered destroyed. ++ ++* New commands ++ ++info missing-debug-handler ++ List all the registered missing debug handlers. ++ ++enable missing-debug-handler LOCUS HANDLER ++disable missing-debug-handler LOCUS HANDLER ++ Enable or disable a missing debug handler with a name matching the ++ regular expression HANDLER, in LOCUS. ++ ++ LOCUS can be 'global' to operate on global missing debug handler, ++ 'progspace' to operate on handlers within the current program space, ++ or can be a regular expression which is matched against the filename ++ of the primary executable in each program space. ++ ++maintenance info linux-lwps ++ List all LWPs under control of the linux-nat target. ++ ++set remote thread-options-packet ++show remote thread-options-packet ++ Set/show the use of the thread options packet. ++ ++set direct-call-timeout SECONDS ++show direct-call-timeout ++set indirect-call-timeout SECONDS ++show indirect-call-timeout ++ These new settings can be used to limit how long GDB will wait for ++ an inferior function call to complete. The direct timeout is used ++ for inferior function calls from e.g. 'call' and 'print' commands, ++ while the indirect timeout is used for inferior function calls from ++ within a conditional breakpoint expression. ++ ++ The default for the direct timeout is unlimited, while the default ++ for the indirect timeout is 30 seconds. ++ ++ These timeouts will only have an effect for targets that are ++ operating in async mode. For non-async targets the timeouts are ++ ignored, GDB will wait indefinitely for an inferior function to ++ complete, unless interrupted by the user using Ctrl-C. ++ ++* New features in the GDB remote stub, GDBserver ++ ++ ** The --remote-debug and --event-loop-debug command line options ++ have been removed. ++ ++ ** The --debug command line option now takes an optional comma ++ separated list of components to emit debug for. The currently ++ supported components are: all, threads, event-loop, and remote. ++ If no components are given then threads is assumed. ++ ++ ** The 'monitor set remote-debug' and 'monitor set event-loop-debug' ++ command have been removed. ++ ++ ** The 'monitor set debug 0|1' command has been extended to take a ++ component name, e.g.: 'monitor set debug COMPONENT off|on'. ++ Possible component names are: all, threads, event-loop, and ++ remote. ++ ++* Python API ++ ++ ** New function gdb.notify_mi(NAME, DATA), that emits custom ++ GDB/MI async notification. ++ ++ ** New read/write attribute gdb.Value.bytes that contains a bytes ++ object holding the contents of this value. ++ ++ ** New module gdb.missing_debug that facilitates dealing with ++ objfiles that are missing any debug information. ++ ++ ** New function gdb.missing_debug.register_handler that can register ++ an instance of a sub-class of gdb.missing_debug.MissingDebugInfo ++ as a handler for objfiles that are missing debug information. ++ ++ ** New class gdb.missing_debug.MissingDebugInfo which can be ++ sub-classed to create handlers for objfiles with missing debug ++ information. ++ ++ ** Stop events now have a "details" attribute that holds a ++ dictionary that carries the same information as an MI "*stopped" ++ event. ++ ++ ** New function gdb.interrupt(), that interrupts GDB as if the user ++ typed control-c. ++ ++ ** New gdb.InferiorThread.ptid_string attribute. This read-only ++ attribute contains the string that appears in the 'Target Id' ++ column of the 'info threads' command output. ++ ++ ** It is no longer possible to create new gdb.Progspace object using ++ 'gdb.Progspace()', this will result in a TypeError. Progspace ++ objects can still be obtained through calling other API ++ functions, for example 'gdb.current_progspace()'. ++ ++ ** User defined attributes can be added to a gdb.Inferior object, ++ these will be stored in the object's new Inferior.__dict__ ++ attribute. ++ ++ ** User defined attributes can be added to a gdb.InferiorThread ++ object, these will be stored in the object's new ++ InferiorThread.__dict__ attribute. ++ ++ ** New constants gdb.SYMBOL_TYPE_DOMAIN, gdb.SYMBOL_FUNCTION_DOMAIN, ++ and gdb.SEARCH_*_DOMAIN corresponding to all the existing symbol ++ domains. Symbol lookup can now search in multiple domains at ++ once, and can also narrowly search for just a type or function. ++ ++* Debugger Adapter Protocol changes ++ ++ ** GDB now emits the "process" event. ++ ++ ** GDB now supports the "cancel" request. ++ ++ ** The "attach" request now supports specifying the program. ++ ++ ** New command "set debug dap-log-level" controls DAP logging. ++ ++ ** The "set debug dap-log-file" command is now documented. This ++ command was available in GDB 14 but not documented. ++ ++* Guile API ++ ++ ** New constants SYMBOL_TYPE_DOMAIN, SYMBOL_FUNCTION_DOMAIN, and ++ SEARCH_*_DOMAIN corresponding to all the existing symbol domains. ++ Symbol lookup can now search in multiple domains at once, and can ++ also narrowly search for just a type or function. ++ ++* New remote packets ++ ++New stop reason: clone ++ Indicates that a clone system call was executed. ++ ++QThreadOptions ++ Enable/disable optional event reporting, on a per-thread basis. ++ Currently supported options are GDB_THREAD_OPTION_CLONE, to enable ++ clone event reporting, and GDB_THREAD_OPTION_EXIT to enable thread ++ exit event reporting. ++ ++QThreadOptions in qSupported ++ The qSupported packet allows GDB to inform the stub it supports the ++ QThreadOptions packet, and the qSupported response can contain the ++ set of thread options the remote stub supports. ++ + *** Changes in GDB 14 + + * GDB now supports the AArch64 Scalable Matrix Extension 2 (SME2), which +diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo +--- a/gdb/doc/gdb.texinfo ++++ b/gdb/doc/gdb.texinfo +@@ -20987,6 +20987,72 @@ to resume the inferior (using commands like @code{continue}, + @code{step}, etc). In this case, when the inferior finally returns to + the dummy-frame, @value{GDBN} will once again halt the inferior. + ++On targets that support asynchronous execution (@pxref{Background ++Execution}) @value{GDBN} can place a timeout on any functions called ++from @value{GDBN}. If the timeout expires and the function call is ++still ongoing, then @value{GDBN} will interrupt the program. ++ ++For targets that don't support asynchronous execution ++(@pxref{Background Execution}) then timeouts for functions called from ++@value{GDBN} are not supported, the timeout settings described below ++will be treated as @code{unlimited}, meaning @value{GDBN} will wait ++indefinitely for function call to complete, unless interrupted by the ++user using @kbd{Ctrl-C}. ++ ++@table @code ++@item set direct-call-timeout @var{seconds} ++@kindex set direct-call-timeout ++@cindex timeout for called functions ++Set the timeout used when calling functions in the program to ++@var{seconds}, which should be an integer greater than zero, or the ++special value @code{unlimited}, which indicates no timeout should be ++used. The default for this setting is @code{unlimited}. ++ ++This setting is used when the user calls a function directly from the ++command prompt, for example with a @code{call} or @code{print} ++command. ++ ++This setting only works for targets that support asynchronous ++execution (@pxref{Background Execution}), for any other target the ++setting is treated as @code{unlimited}. ++ ++@item show direct-call-timeout ++@kindex show direct-call-timeout ++@cindex timeout for called functions ++Show the timeout used when calling functions in the program with a ++@code{call} or @code{print} command. ++@end table ++ ++It is also possible to call functions within the program from the ++condition of a conditional breakpoint (@pxref{Conditions, ,Break ++Conditions}). A different setting controls the timeout used for ++function calls made from a breakpoint condition. ++ ++@table @code ++@item set indirect-call-timeout @var{seconds} ++@kindex set indirect-call-timeout ++@cindex timeout for called functions ++Set the timeout used when calling functions in the program from a ++breakpoint or watchpoint condition to @var{seconds}, which should be ++an integer greater than zero, or the special value @code{unlimited}, ++which indicates no timeout should be used. The default for this ++setting is @code{30} seconds. ++ ++This setting only works for targets that support asynchronous ++execution (@pxref{Background Execution}), for any other target the ++setting is treated as @code{unlimited}. ++ ++If a function called from a breakpoint or watchpoint condition times ++out, then @value{GDBN} will stop at the point where the timeout ++occurred. The breakpoint condition evaluation will be abandoned. ++ ++@item show indirect-call-timeout ++@kindex show indirect-call-timeout ++@cindex timeout for called functions ++Show the timeout used when calling functions in the program from a ++breakpoint or watchpoint condition. ++@end table ++ + @subsection Calling functions with no debug info + + @cindex no debug info functions +diff --git a/gdb/infcall.c b/gdb/infcall.c +--- a/gdb/infcall.c ++++ b/gdb/infcall.c +@@ -96,6 +96,53 @@ show_may_call_functions_p (struct ui_file *file, int from_tty, + value); + } + ++/* A timeout (in seconds) for direct inferior calls. A direct inferior ++ call is one the user triggers from the prompt, e.g. with a 'call' or ++ 'print' command. Compare with the definition of indirect calls below. */ ++ ++static unsigned int direct_call_timeout = UINT_MAX; ++ ++/* Implement 'show direct-call-timeout'. */ ++ ++static void ++show_direct_call_timeout (struct ui_file *file, int from_tty, ++ struct cmd_list_element *c, const char *value) ++{ ++ if (target_has_execution () && !target_can_async_p ()) ++ gdb_printf (file, _("Current target does not support async mode, timeout " ++ "for direct inferior calls is \"unlimited\".\n")); ++ else if (direct_call_timeout == UINT_MAX) ++ gdb_printf (file, _("Timeout for direct inferior function calls " ++ "is \"unlimited\".\n")); ++ else ++ gdb_printf (file, _("Timeout for direct inferior function calls " ++ "is \"%s seconds\".\n"), value); ++} ++ ++/* A timeout (in seconds) for indirect inferior calls. An indirect inferior ++ call is one that originates from within GDB, for example, when ++ evaluating an expression for a conditional breakpoint. Compare with ++ the definition of direct calls above. */ ++ ++static unsigned int indirect_call_timeout = 30; ++ ++/* Implement 'show indirect-call-timeout'. */ ++ ++static void ++show_indirect_call_timeout (struct ui_file *file, int from_tty, ++ struct cmd_list_element *c, const char *value) ++{ ++ if (target_has_execution () && !target_can_async_p ()) ++ gdb_printf (file, _("Current target does not support async mode, timeout " ++ "for indirect inferior calls is \"unlimited\".\n")); ++ else if (indirect_call_timeout == UINT_MAX) ++ gdb_printf (file, _("Timeout for indirect inferior function calls " ++ "is \"unlimited\".\n")); ++ else ++ gdb_printf (file, _("Timeout for indirect inferior function calls " ++ "is \"%s seconds\".\n"), value); ++} ++ + /* How you should pass arguments to a function depends on whether it + was defined in K&R style or prototype style. If you define a + function using the K&R syntax that takes a `float' argument, then +@@ -620,6 +667,85 @@ call_thread_fsm::should_notify_stop () + return true; + } + ++/* A class to control creation of a timer that will interrupt a thread ++ during an inferior call. */ ++struct infcall_timer_controller ++{ ++ /* Setup an event-loop timer that will interrupt PTID if the inferior ++ call takes too long. DIRECT_CALL_P is true when this inferior call is ++ a result of the user using a 'print' or 'call' command, and false when ++ this inferior call is a result of e.g. a conditional breakpoint ++ expression, this is used to select which timeout to use. */ ++ infcall_timer_controller (thread_info *thr, bool direct_call_p) ++ : m_thread (thr) ++ { ++ unsigned int timeout ++ = direct_call_p ? direct_call_timeout : indirect_call_timeout; ++ if (timeout < UINT_MAX && target_can_async_p ()) ++ { ++ int ms = timeout * 1000; ++ int id = create_timer (ms, infcall_timer_controller::timed_out, this); ++ m_timer_id.emplace (id); ++ infcall_debug_printf ("Setting up infcall timeout timer for " ++ "ptid %s: %d milliseconds", ++ m_thread->ptid.to_string ().c_str (), ms); ++ } ++ } ++ ++ /* Destructor. Ensure that the timer is removed from the event loop. */ ++ ~infcall_timer_controller () ++ { ++ /* If the timer has already triggered, then it will have already been ++ deleted from the event loop. If the timer has not triggered, then ++ delete it now. */ ++ if (m_timer_id.has_value () && !m_triggered) ++ delete_timer (*m_timer_id); ++ ++ /* Just for clarity, discard the timer id now. */ ++ m_timer_id.reset (); ++ } ++ ++ /* Return true if there was a timer in place, and the timer triggered, ++ otherwise, return false. */ ++ bool triggered_p () ++ { ++ gdb_assert (!m_triggered || m_timer_id.has_value ()); ++ return m_triggered; ++ } ++ ++private: ++ /* The thread we should interrupt. */ ++ thread_info *m_thread; ++ ++ /* Set true when the timer is triggered. */ ++ bool m_triggered = false; ++ ++ /* Given a value when a timer is in place. */ ++ gdb::optional m_timer_id; ++ ++ /* Callback for the timer, forwards to ::trigger below. */ ++ static void ++ timed_out (gdb_client_data context) ++ { ++ infcall_timer_controller *ctrl ++ = static_cast (context); ++ ctrl->trigger (); ++ } ++ ++ /* Called when the timer goes off. Stop thread M_THREAD. */ ++ void ++ trigger () ++ { ++ m_triggered = true; ++ ++ scoped_disable_commit_resumed disable_commit_resumed ("infcall timeout"); ++ ++ infcall_debug_printf ("Stopping thread %s", ++ m_thread->ptid.to_string ().c_str ()); ++ target_stop (m_thread->ptid); ++ } ++}; ++ + /* Subroutine of call_function_by_hand to simplify it. + Start up the inferior and wait for it to stop. + Return the exception if there's an error, or an exception with +@@ -630,13 +756,15 @@ call_thread_fsm::should_notify_stop () + + static struct gdb_exception + run_inferior_call (std::unique_ptr sm, +- struct thread_info *call_thread, CORE_ADDR real_pc) ++ struct thread_info *call_thread, CORE_ADDR real_pc, ++ bool *timed_out_p) + { + INFCALL_SCOPED_DEBUG_ENTER_EXIT; + + struct gdb_exception caught_error; + ptid_t call_thread_ptid = call_thread->ptid; + int was_running = call_thread->state == THREAD_RUNNING; ++ *timed_out_p = false; + + infcall_debug_printf ("call function at %s in thread %s, was_running = %d", + core_addr_to_string (real_pc), +@@ -681,11 +809,23 @@ run_inferior_call (std::unique_ptr sm, + infrun_debug_show_threads ("non-exited threads after proceed for inferior-call", + all_non_exited_threads ()); + ++ /* Setup a timer (if possible, and if the settings allow) to prevent ++ the inferior call running forever. */ ++ bool direct_call_p = !call_thread->control.in_cond_eval; ++ infcall_timer_controller infcall_timer (call_thread, direct_call_p); ++ + /* Inferior function calls are always synchronous, even if the + target supports asynchronous execution. */ + wait_sync_command_done (); + +- infcall_debug_printf ("inferior call completed successfully"); ++ /* If the timer triggered then the inferior call failed. */ ++ if (infcall_timer.triggered_p ()) ++ { ++ infcall_debug_printf ("inferior call timed out"); ++ *timed_out_p = true; ++ } ++ else ++ infcall_debug_printf ("inferior call completed successfully"); + } + catch (gdb_exception &e) + { +@@ -1357,6 +1497,10 @@ call_function_by_hand_dummy (struct value *function, + scoped_restore restore_stopped_by_random_signal + = make_scoped_restore (&stopped_by_random_signal, 0); + ++ /* Set to true by the call to run_inferior_call below if the inferior ++ call is artificially interrupted by GDB due to taking too long. */ ++ bool timed_out_p = false; ++ + /* - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - SNIP - + If you're looking to implement asynchronous dummy-frames, then + just below is the place to chop this function in two.. */ +@@ -1383,7 +1527,8 @@ call_function_by_hand_dummy (struct value *function, + struct_addr); + { + std::unique_ptr sm_up (sm); +- e = run_inferior_call (std::move (sm_up), call_thread.get (), real_pc); ++ e = run_inferior_call (std::move (sm_up), call_thread.get (), real_pc, ++ &timed_out_p); + } + + if (e.reason < 0) +@@ -1535,7 +1680,10 @@ When the function is done executing, GDB will silently stop."), + std::string name = get_function_name (funaddr, name_buf, + sizeof (name_buf)); + +- if (stopped_by_random_signal) ++ /* If the inferior call timed out then it will have been interrupted ++ by a signal, but we want to report this differently to the user, ++ which is done later in this function. */ ++ if (stopped_by_random_signal && !timed_out_p) + { + /* We stopped inside the FUNCTION because of a random + signal. Further execution of the FUNCTION is not +@@ -1586,6 +1734,36 @@ GDB remains in the frame where the signal was received.\n\ + To change this behavior use \"set unwindonsignal on\".\n\ + Evaluation of the expression containing the function\n\ + (%s) will be abandoned.\n\ ++When the function is done executing, GDB will silently stop."), ++ name.c_str ()); ++ } ++ } ++ ++ if (timed_out_p) ++ { ++ /* A timeout results in a signal being sent to the inferior. */ ++ gdb_assert (stopped_by_random_signal); ++ ++ /* Indentation is weird here. A later patch is going to move the ++ following block into an if/else, so I'm leaving the indentation ++ here to minimise the later patch. ++ ++ Also, the error message used below refers to 'set ++ unwind-on-timeout' which doesn't exist yet. This will be added ++ in a later commit, I'm leaving this in for now to minimise the ++ churn caused by the commit that adds unwind-on-timeout. */ ++ { ++ /* The user wants to stay in the frame where we stopped ++ (default). Discard inferior status, we're not at the same ++ point we started at. */ ++ discard_infcall_control_state (inf_status.release ()); ++ ++ error (_("\ ++The program being debugged timed out while in a function called from GDB.\n\ ++GDB remains in the frame where the timeout occurred.\n\ ++To change this behavior use \"set unwind-on-timeout on\".\n\ ++Evaluation of the expression containing the function\n\ ++(%s) will be abandoned.\n\ + When the function is done executing, GDB will silently stop."), + name.c_str ()); + } +@@ -1699,6 +1877,30 @@ The default is to unwind the frame."), + show_unwind_on_terminating_exception_p, + &setlist, &showlist); + ++ add_setshow_uinteger_cmd ("direct-call-timeout", no_class, ++ &direct_call_timeout, _("\ ++Set the timeout, for direct calls to inferior function calls."), _("\ ++Show the timeout, for direct calls to inferior function calls."), _("\ ++If running on a target that supports, and is running in, async mode\n\ ++then this timeout is used for any inferior function calls triggered\n\ ++directly from the prompt, i.e. from a 'call' or 'print' command. The\n\ ++timeout is specified in seconds."), ++ nullptr, ++ show_direct_call_timeout, ++ &setlist, &showlist); ++ ++ add_setshow_uinteger_cmd ("indirect-call-timeout", no_class, ++ &indirect_call_timeout, _("\ ++Set the timeout, for indirect calls to inferior function calls."), _("\ ++Show the timeout, for indirect calls to inferior function calls."), _("\ ++If running on a target that supports, and is running in, async mode\n\ ++then this timeout is used for any inferior function calls triggered\n\ ++indirectly, i.e. being made as part of a breakpoint, or watchpoint,\n\ ++condition expression. The timeout is specified in seconds."), ++ nullptr, ++ show_indirect_call_timeout, ++ &setlist, &showlist); ++ + add_setshow_boolean_cmd + ("infcall", class_maintenance, &debug_infcall, + _("Set inferior call debugging."), +diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp +--- a/gdb/testsuite/gdb.base/help.exp ++++ b/gdb/testsuite/gdb.base/help.exp +@@ -121,7 +121,7 @@ gdb_test "help info bogus-gdb-command" "Undefined info command: \"bogus-gdb-comm + gdb_test "help gotcha" "Undefined command: \"gotcha\"\. Try \"help\"\." + + # Test apropos regex. +-gdb_test "apropos \\\(print\[\^\[ bsiedf\\\".-\]\\\)" "handle -- Specify how to handle signals\." ++gdb_test "apropos \\\(print\[\^\[ bsiedf\\\"'.-\]\\\)" "handle -- Specify how to handle signals\." + # Test apropos >1 word string. + gdb_test "apropos handle signal" "handle -- Specify how to handle signals\." + # Test apropos apropos. +diff --git a/gdb/testsuite/gdb.base/infcall-timeout.c b/gdb/testsuite/gdb.base/infcall-timeout.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/infcall-timeout.c +@@ -0,0 +1,36 @@ ++/* Copyright 2022-2024 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ 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 ++ ++/* This function is called from GDB. */ ++int ++function_that_never_returns () ++{ ++ while (1) ++ sleep (1); ++ ++ return 0; ++} ++ ++int ++main () ++{ ++ alarm (300); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/infcall-timeout.exp b/gdb/testsuite/gdb.base/infcall-timeout.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/infcall-timeout.exp +@@ -0,0 +1,94 @@ ++# Copyright 2022-2024 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 GDB's direct-call-timeout setting, that is, ensure that if an ++# inferior function call, invoked from e.g. a 'print' command, takes ++# too long, then GDB can interrupt it, and return control to the user. ++ ++standard_testfile ++ ++if { [build_executable "failed to prepare" ${binfile} "${srcfile}" \ ++ {debug}] == -1 } { ++ return ++} ++ ++# Start GDB according to TARGET_ASYNC, TARGET_NON_STOP, and NON_STOP, ++# then adjust the direct-call-timeout, and make an inferior function ++# call that will never return. GDB should eventually timeout and stop ++# the inferior. ++proc run_test { target_async target_non_stop non_stop } { ++ save_vars { ::GDBFLAGS } { ++ append ::GDBFLAGS \ ++ " -ex \"maint set target-non-stop $target_non_stop\"" ++ append ::GDBFLAGS \ ++ " -ex \"set non-stop $non_stop\"" ++ append ::GDBFLAGS \ ++ " -ex \"maintenance set target-async ${target_async}\"" ++ ++ clean_restart ${::binfile} ++ } ++ ++ if {![runto_main]} { ++ return ++ } ++ ++ gdb_test_no_output "set direct-call-timeout 5" ++ ++ # When non-stop mode is off we get slightly different output from GDB. ++ if { ([target_info gdb_protocol] == "remote" ++ || [target_info gdb_protocol] == "extended-remote") ++ && !$target_non_stop } { ++ set stopped_line_pattern "Program received signal SIGINT, Interrupt\\." ++ } else { ++ set stopped_line_pattern "Program stopped\\." ++ } ++ ++ gdb_test "print function_that_never_returns ()" \ ++ [multi_line \ ++ $stopped_line_pattern \ ++ ".*" \ ++ "The program being debugged timed out while in a function called from GDB\\." \ ++ "GDB remains in the frame where the timeout occurred\\." \ ++ "To change this behavior use \"set unwind-on-timeout on\"\\." \ ++ "Evaluation of the expression containing the function" \ ++ "\\(function_that_never_returns\\) will be abandoned\\." \ ++ "When the function is done executing, GDB will silently stop\\."] ++ ++ gdb_test "bt" ".* function_that_never_returns .*.*" ++} ++ ++foreach_with_prefix target_async { "on" "off" } { ++ ++ if { !$target_async } { ++ # GDB can't timeout while waiting for a thread if the target ++ # runs with async-mode turned off; once the target is running ++ # GDB is effectively blocked until the target stops for some ++ # reason. ++ continue ++ } ++ ++ foreach_with_prefix target_non_stop { "on" "off" } { ++ foreach_with_prefix non_stop { "on" "off" } { ++ if { $non_stop && !$target_non_stop } { ++ # It doesn't make sense to operate GDB in non-stop ++ # mode when the target has (in theory) non-stop mode ++ # disabled. ++ continue ++ } ++ ++ run_test $target_async $target_non_stop $non_stop ++ } ++ } ++} +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.c +@@ -0,0 +1,169 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2022-2024 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 ++#include ++#include ++ ++#define NUM_THREADS 5 ++ ++/* Semaphores, used to track when threads have started, and to control ++ when the threads finish. */ ++sem_t startup_semaphore; ++sem_t finish_semaphore; ++sem_t thread_1_semaphore; ++sem_t thread_2_semaphore; ++ ++/* Mutex to control when the first worker thread hit a breakpoint ++ location. */ ++pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; ++ ++/* Global variable to poke, just so threads have something to do. */ ++volatile int global_var = 0; ++ ++int ++condition_func () ++{ ++ /* Let thread 2 run. */ ++ if (sem_post (&thread_2_semaphore) != 0) ++ abort (); ++ ++ /* Wait for thread 2 to complete its actions. */ ++ if (sem_wait (&thread_1_semaphore) != 0) ++ abort (); ++ ++ return 1; ++} ++ ++void ++do_segfault () ++{ ++ volatile int *p = 0; ++ *p = 0; /* Segfault here. */ ++} ++ ++void * ++worker_func (void *arg) ++{ ++ int tid = *((int *) arg); ++ ++ /* Let the main thread know that this worker has started. */ ++ if (sem_post (&startup_semaphore) != 0) ++ abort (); ++ ++ switch (tid) ++ { ++ case 0: ++ /* Wait for MUTEX to become available, then pass through the ++ conditional breakpoint location. */ ++ if (pthread_mutex_lock (&mutex) != 0) ++ abort (); ++ global_var = 99; /* Conditional breakpoint here. */ ++ if (pthread_mutex_unlock (&mutex) != 0) ++ abort (); ++ break; ++ ++ case 1: ++ if (sem_wait (&thread_2_semaphore) != 0) ++ abort (); ++ do_segfault (); ++ if (sem_post (&thread_1_semaphore) != 0) ++ abort (); ++ ++ /* Fall through. */ ++ default: ++ /* Wait until we are allowed to finish. */ ++ if (sem_wait (&finish_semaphore) != 0) ++ abort (); ++ break; ++ } ++} ++ ++void ++stop_marker () ++{ ++ global_var = 99; /* Stop marker. */ ++} ++ ++/* The main program entry point. */ ++ ++int ++main () ++{ ++ pthread_t threads[NUM_THREADS]; ++ int args[NUM_THREADS]; ++ void *retval; ++ ++ /* An alarm, just in case the thread deadlocks. */ ++ alarm (300); ++ ++ /* Semaphore initialization. */ ++ if (sem_init (&startup_semaphore, 0, 0) != 0) ++ abort (); ++ if (sem_init (&finish_semaphore, 0, 0) != 0) ++ abort (); ++ if (sem_init (&thread_1_semaphore, 0, 0) != 0) ++ abort (); ++ if (sem_init (&thread_2_semaphore, 0, 0) != 0) ++ abort (); ++ ++ /* Lock MUTEX, this prevents the first worker thread from rushing ahead. */ ++ if (pthread_mutex_lock (&mutex) != 0) ++ abort (); ++ ++ /* Worker thread creation. */ ++ for (int i = 0; i < NUM_THREADS; i++) ++ { ++ args[i] = i; ++ pthread_create (&threads[i], NULL, worker_func, &args[i]); ++ } ++ ++ /* Wait for every thread to start. */ ++ for (int i = 0; i < NUM_THREADS; i++) ++ { ++ if (sem_wait (&startup_semaphore) != 0) ++ abort (); ++ } ++ ++ /* Unlock the first thread so it can proceed. */ ++ if (pthread_mutex_unlock (&mutex) != 0) ++ abort (); ++ ++ /* Wait for the first thread only. */ ++ pthread_join (threads[0], &retval); ++ ++ /* Now post FINISH_SEMAPHORE to allow all the other threads to finish. */ ++ for (int i = 1; i < NUM_THREADS; i++) ++ sem_post (&finish_semaphore); ++ ++ /* Now wait for the remaining threads to complete. */ ++ for (int i = 1; i < NUM_THREADS; i++) ++ pthread_join (threads[i], &retval); ++ ++ /* Semaphore cleanup. */ ++ sem_destroy (&finish_semaphore); ++ sem_destroy (&startup_semaphore); ++ sem_destroy (&thread_1_semaphore); ++ sem_destroy (&thread_2_semaphore); ++ ++ stop_marker (); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp +@@ -0,0 +1,166 @@ ++# Copyright 2022-2024 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 . ++ ++# Tests inferior calls executed from a breakpoint condition in ++# a multi-threaded program. ++# ++# This test has the inferior function call timeout, and checks how GDB ++# handles this situation. ++ ++standard_testfile ++ ++if { [build_executable "failed to prepare" ${binfile} "${srcfile}" \ ++ {debug pthreads}] } { ++ return ++} ++ ++set cond_bp_line [gdb_get_line_number "Conditional breakpoint here"] ++set final_bp_line [gdb_get_line_number "Stop marker"] ++set segfault_line [gdb_get_line_number "Segfault here"] ++ ++# Setup GDB based on TARGET_ASYNC, TARGET_NON_STOP, and NON_STOP. ++# Setup some breakpoints in the inferior, one of which has an inferior ++# call within its condition. ++# ++# Continue GDB, the breakpoint with inferior call will be hit, but the ++# inferior call will never return. We expect GDB to timeout. ++# ++# The reason that the inferior call never completes is that a second ++# thread, on which the inferior call relies, either hits a breakpoint ++# (when OTHER_THREAD_BP is true), or crashes (when OTHER_THREAD_BP is ++# false). ++proc run_test { target_async target_non_stop non_stop other_thread_bp } { ++ save_vars { ::GDBFLAGS } { ++ append ::GDBFLAGS " -ex \"maint set target-non-stop $target_non_stop\"" ++ append ::GDBFLAGS " -ex \"maint non-stop $non_stop\"" ++ append ::GDBFLAGS " -ex \"maintenance set target-async ${target_async}\"" ++ ++ clean_restart ${::binfile} ++ } ++ ++ if {![runto_main]} { ++ return ++ } ++ ++ # The default timeout for indirect inferior calls (e.g. inferior ++ # calls for conditional breakpoint expressions) is pretty high. ++ # We don't want the test to take too long, so reduce this. ++ # ++ # However, the test relies on a second thread hitting some event ++ # (either a breakpoint or signal) before this timeout expires. ++ # ++ # There is a chance that on a really slow system this might not ++ # happen, in which case the test might fail. ++ # ++ # However, we still allocate 5 seconds, which feels like it should ++ # be enough time in most cases, but maybe we need to do something ++ # smarter here? Possibly we could have some initial run where the ++ # inferior doesn't timeout, but does perform the same interaction ++ # between threads, we could time that, and use that as the basis ++ # for this timeout. For now though, we just hope 5 seconds is ++ # enough. ++ gdb_test_no_output "set indirect-call-timeout 5" ++ ++ gdb_breakpoint \ ++ "${::srcfile}:${::cond_bp_line} if (condition_func ())" ++ set bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number for conditional breakpoint"] ++ ++ gdb_breakpoint "${::srcfile}:${::final_bp_line}" ++ set final_bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number for final breakpoint"] ++ ++ # The thread performing an inferior call relies on a second ++ # thread. The second thread will segfault unless it hits a ++ # breakpoint first. In either case the initial thread will not ++ # complete its inferior call. ++ if { $other_thread_bp } { ++ gdb_breakpoint "${::srcfile}:${::segfault_line}" ++ set segfault_bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \ ++ "get number for segfault breakpoint"] ++ } ++ ++ # When non-stop mode is off we get slightly different output from GDB. ++ if { ([target_info gdb_protocol] == "remote" ++ || [target_info gdb_protocol] == "extended-remote") ++ && !$target_non_stop} { ++ set stopped_line_pattern "Thread ${::decimal} \"\[^\r\n\"\]+\" received signal SIGINT, Interrupt\\." ++ } else { ++ set stopped_line_pattern "Thread ${::decimal} \"\[^\r\n\"\]+\" stopped\\." ++ } ++ ++ gdb_test "continue" \ ++ [multi_line \ ++ $stopped_line_pattern \ ++ ".*" \ ++ "Error in testing condition for breakpoint ${bp_num}:" \ ++ "The program being debugged timed out while in a function called from GDB\\." \ ++ "GDB remains in the frame where the timeout occurred\\." \ ++ "To change this behavior use \"set unwind-on-timeout on\"\\." \ ++ "Evaluation of the expression containing the function" \ ++ "\\(condition_func\\) will be abandoned\\." \ ++ "When the function is done executing, GDB will silently stop\\."] \ ++ "expected timeout waiting for inferior call to complete" ++ ++ # Remember that other thread that either crashed (with a segfault) ++ # or hit a breakpoint? Now that the inferior call has timed out, ++ # if we try to resume then we should see the pending event from ++ # that other thread. ++ if { $other_thread_bp } { ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "" \ ++ "Thread ${::decimal} \"\[^\"\r\n\]+\" hit Breakpoint ${segfault_bp_num}, do_segfault \[^\r\n\]+:${::segfault_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Segfault here\[^\r\n\]+"] \ ++ "hit the segfault breakpoint" ++ } else { ++ gdb_test "continue" \ ++ [multi_line \ ++ "Continuing\\." \ ++ ".*" \ ++ "Thread ${::decimal} \"infcall-from-bp\" received signal SIGSEGV, Segmentation fault\\." \ ++ "\\\[Switching to Thread \[^\r\n\]+\\\]" \ ++ "${::hex} in do_segfault \\(\\) at \[^\r\n\]+:${::segfault_line}" \ ++ "${::decimal}\\s+\[^\r\n\]+Segfault here\[^\r\n\]+"] \ ++ "hit the segfault" ++ } ++} ++ ++foreach_with_prefix target_async {"on" "off" } { ++ ++ if { !$target_async } { ++ # GDB can't timeout while waiting for a thread if the target ++ # runs with async-mode turned off; once the target is running ++ # GDB is effectively blocked until the target stops for some ++ # reason. ++ continue ++ } ++ ++ foreach_with_prefix target_non_stop {"off" "on"} { ++ foreach_with_prefix non_stop {"off" "on"} { ++ if { $non_stop && !$target_non_stop } { ++ # It doesn't make sense to operate GDB in non-stop ++ # mode when the target has (in theory) non-stop mode ++ # disabled. ++ continue ++ } ++ foreach_with_prefix other_thread_bp { true false } { ++ run_test $target_async $target_non_stop $non_stop $other_thread_bp ++ } ++ } ++ } ++} diff --git a/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-4-of-5.patch b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-4-of-5.patch new file mode 100644 index 0000000..27a0e11 --- /dev/null +++ b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-4-of-5.patch @@ -0,0 +1,413 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Wed, 18 Jan 2023 10:17:57 +0000 +Subject: gdb-rhel-13298-inferior-funcall-bp-condition-4-of-5.patch + +;;gdb: introduce unwind-on-timeout setting +;;(Andrew Burgess, RHEL-13298) + +Now that inferior function calls can timeout (see the recent +introduction of direct-call-timeout and indirect-call-timeout), this +commit adds a new setting unwind-on-timeout. + +This new setting is just like the existing unwindonsignal and +unwind-on-terminating-exception, but the new setting will cause GDB to +unwind the stack if an inferior function call times out. + +The existing inferior function call timeout tests have been updated to +cover the new setting. + +Reviewed-By: Eli Zaretskii +Tested-By: Luis Machado +Tested-By: Keith Seitz + +diff --git a/gdb/NEWS b/gdb/NEWS +--- a/gdb/NEWS ++++ b/gdb/NEWS +@@ -72,6 +72,15 @@ show indirect-call-timeout + ignored, GDB will wait indefinitely for an inferior function to + complete, unless interrupted by the user using Ctrl-C. + ++set unwind-on-timeout on|off ++show unwind-on-timeout ++ These commands control whether GDB should unwind the stack when a ++ timeout occurs during an inferior function call. The default is ++ off, in which case the inferior will remain in the frame where the ++ timeout occurred. When on, GDB will unwind the stack removing the ++ dummy frame that was added for the inferior call, and restoring the ++ inferior state to how it was before the inferior call started. ++ + * New features in the GDB remote stub, GDBserver + + ** The --remote-debug and --event-loop-debug command line options +diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo +--- a/gdb/doc/gdb.texinfo ++++ b/gdb/doc/gdb.texinfo +@@ -20932,6 +20932,22 @@ the default C@t{++} exception handler and the inferior terminated. + Show the current setting of stack unwinding in the functions called by + @value{GDBN}. + ++@anchor{set unwind-on-timeout} ++@item set unwind-on-timeout ++@kindex set unwind-on-timeout ++@cindex unwind stack in called functions when timing out ++@cindex call dummy stack unwinding on timeout. ++Set unwinding of the stack if a function called from @value{GDBN} ++times out. If set to @code{off} (the default), @value{GDBN} stops in ++the frame where the timeout occurred. If set to @code{on}, ++@value{GDBN} unwinds the stack it created for the call and restores ++the context to what it was before the call. ++ ++@item show unwind-on-timeout ++@kindex show unwind-on-timeout ++Show whether @value{GDBN} will unwind the stack if a function called ++from @value{GDBN} times out. ++ + @item set may-call-functions + @kindex set may-call-functions + @cindex disabling calling functions in the program +@@ -20963,11 +20979,11 @@ call by typing the interrupt character (often @kbd{Ctrl-c}). + + If a called function is interrupted for any reason, including hitting + a breakpoint, or triggering a watchpoint, and the stack is not unwound +-due to @code{set unwind-on-terminating-exception on} or @code{set +-unwindonsignal on} (@pxref{stack unwind settings}), +-then the dummy-frame, created by @value{GDBN} to facilitate the call +-to the program function, will be visible in the backtrace, for example +-frame @code{#3} in the following backtrace: ++due to @code{set unwind-on-terminating-exception on}, @code{set ++unwind-on-timeout on}, or @code{set unwindonsignal on} (@pxref{stack ++unwind settings}), then the dummy-frame, created by @value{GDBN} to ++facilitate the call to the program function, will be visible in the ++backtrace, for example frame @code{#3} in the following backtrace: + + @smallexample + (@value{GDBP}) backtrace +@@ -20992,6 +21008,11 @@ Execution}) @value{GDBN} can place a timeout on any functions called + from @value{GDBN}. If the timeout expires and the function call is + still ongoing, then @value{GDBN} will interrupt the program. + ++If a function called from @value{GDBN} is interrupted by a timeout, ++then by default the inferior is left in the frame where the timeout ++occurred, this behaviour can be adjusted with @samp{set ++unwind-on-timeout} (@pxref{set unwind-on-timeout}). ++ + For targets that don't support asynchronous execution + (@pxref{Background Execution}) then timeouts for functions called from + @value{GDBN} are not supported, the timeout settings described below +diff --git a/gdb/infcall.c b/gdb/infcall.c +--- a/gdb/infcall.c ++++ b/gdb/infcall.c +@@ -218,6 +218,27 @@ show_unwind_on_terminating_exception_p (struct ui_file *file, int from_tty, + value); + } + ++/* This boolean tells GDB what to do if an inferior function, called from ++ GDB, times out. If true, GDB unwinds the stack and restores the context ++ to what it was before the call. When false, GDB leaves the thread as it ++ is at the point of the timeout. ++ ++ The default is to stop in the frame where the timeout occurred. */ ++ ++static bool unwind_on_timeout_p = false; ++ ++/* Implement 'show unwind-on-timeout'. */ ++ ++static void ++show_unwind_on_timeout_p (struct ui_file *file, int from_tty, ++ struct cmd_list_element *c, const char *value) ++{ ++ gdb_printf (file, ++ _("Unwinding of stack if a timeout occurs " ++ "while in a call dummy is %s.\n"), ++ value); ++} ++ + /* Perform the standard coercions that are specified + for arguments to be passed to C, Ada or Fortran functions. + +@@ -574,6 +595,16 @@ struct call_thread_fsm : public thread_fsm + bool should_stop (struct thread_info *thread) override; + + bool should_notify_stop () override; ++ ++ /* Record that this thread timed out while performing an infcall. */ ++ void timed_out () ++ { ++ m_timed_out = true; ++ } ++ ++private: ++ /* Set true if the thread timed out while performing an infcall. */ ++ bool m_timed_out = false; + }; + + /* Allocate a new call_thread_fsm object. */ +@@ -649,7 +680,8 @@ call_thread_fsm::should_notify_stop () + + infcall_debug_printf ("inferior call didn't complete fully"); + +- if (stopped_by_random_signal && unwind_on_signal_p) ++ if ((stopped_by_random_signal && unwind_on_signal_p) ++ || (m_timed_out && unwind_on_timeout_p)) + { + infcall_debug_printf ("unwind-on-signal is on, don't notify"); + return false; +@@ -742,6 +774,9 @@ struct infcall_timer_controller + + infcall_debug_printf ("Stopping thread %s", + m_thread->ptid.to_string ().c_str ()); ++ call_thread_fsm *fsm ++ = gdb::checked_static_cast (m_thread->thread_fsm ()); ++ fsm->timed_out (); + target_stop (m_thread->ptid); + } + }; +@@ -1744,14 +1779,27 @@ When the function is done executing, GDB will silently stop."), + /* A timeout results in a signal being sent to the inferior. */ + gdb_assert (stopped_by_random_signal); + +- /* Indentation is weird here. A later patch is going to move the +- following block into an if/else, so I'm leaving the indentation +- here to minimise the later patch. ++ if (unwind_on_timeout_p) ++ { ++ /* The user wants the context restored. */ ++ ++ /* We must get back to the frame we were before the ++ dummy call. */ ++ dummy_frame_pop (dummy_id, call_thread.get ()); + +- Also, the error message used below refers to 'set +- unwind-on-timeout' which doesn't exist yet. This will be added +- in a later commit, I'm leaving this in for now to minimise the +- churn caused by the commit that adds unwind-on-timeout. */ ++ /* We also need to restore inferior status to that before the ++ dummy call. */ ++ restore_infcall_control_state (inf_status.release ()); ++ ++ error (_("\ ++The program being debugged timed out while in a function called from GDB.\n\ ++GDB has restored the context to what it was before the call.\n\ ++To change this behavior use \"set unwind-on-timeout off\".\n\ ++Evaluation of the expression containing the function\n\ ++(%s) will be abandoned."), ++ name.c_str ()); ++ } ++ else + { + /* The user wants to stay in the frame where we stopped + (default). Discard inferior status, we're not at the same +@@ -1877,6 +1925,20 @@ The default is to unwind the frame."), + show_unwind_on_terminating_exception_p, + &setlist, &showlist); + ++ add_setshow_boolean_cmd ("unwind-on-timeout", no_class, ++ &unwind_on_timeout_p, _("\ ++Set unwinding of stack if a timeout occurs while in a call dummy."), _("\ ++Show unwinding of stack if a timeout occurs while in a call dummy."), ++ _("\ ++The unwind on timeout flag lets the user determine what gdb should do if\n\ ++gdb times out while in a function called from gdb. If set, gdb unwinds\n\ ++the stack and restores the context to what it was before the call. If\n\ ++unset, gdb leaves the inferior in the frame where the timeout occurred.\n\ ++The default is to stop in the frame where the timeout occurred."), ++ NULL, ++ show_unwind_on_timeout_p, ++ &setlist, &showlist); ++ + add_setshow_uinteger_cmd ("direct-call-timeout", no_class, + &direct_call_timeout, _("\ + Set the timeout, for direct calls to inferior function calls."), _("\ +diff --git a/gdb/testsuite/gdb.base/infcall-timeout.exp b/gdb/testsuite/gdb.base/infcall-timeout.exp +--- a/gdb/testsuite/gdb.base/infcall-timeout.exp ++++ b/gdb/testsuite/gdb.base/infcall-timeout.exp +@@ -28,7 +28,11 @@ if { [build_executable "failed to prepare" ${binfile} "${srcfile}" \ + # then adjust the direct-call-timeout, and make an inferior function + # call that will never return. GDB should eventually timeout and stop + # the inferior. +-proc run_test { target_async target_non_stop non_stop } { ++# ++# When UNWIND is "off" the inferior wil be left in the frame where the ++# timeout occurs, otherwise, when UNWIND is "on", GDB should unwind ++# back to the frame where the inferior call was made. ++proc run_test { target_async target_non_stop non_stop unwind } { + save_vars { ::GDBFLAGS } { + append ::GDBFLAGS \ + " -ex \"maint set target-non-stop $target_non_stop\"" +@@ -45,28 +49,43 @@ proc run_test { target_async target_non_stop non_stop } { + } + + gdb_test_no_output "set direct-call-timeout 5" ++ gdb_test_no_output "set unwind-on-timeout $unwind" ++ ++ if { $unwind } { ++ gdb_test "print function_that_never_returns ()" \ ++ [multi_line \ ++ "The program being debugged timed out while in a function called from GDB\\." \ ++ "GDB has restored the context to what it was before the call\\." \ ++ "To change this behavior use \"set unwind-on-timeout off\"\\." \ ++ "Evaluation of the expression containing the function" \ ++ "\\(function_that_never_returns\\) will be abandoned\\."] + +- # When non-stop mode is off we get slightly different output from GDB. +- if { ([target_info gdb_protocol] == "remote" +- || [target_info gdb_protocol] == "extended-remote") +- && !$target_non_stop } { +- set stopped_line_pattern "Program received signal SIGINT, Interrupt\\." ++ gdb_test "bt" \ ++ "#0\\s+main \\(\\).*" + } else { +- set stopped_line_pattern "Program stopped\\." +- } ++ # When non-stop mode is off we get slightly different output from GDB. ++ if { ([target_info gdb_protocol] == "remote" ++ || [target_info gdb_protocol] == "extended-remote") ++ && !$target_non_stop } { ++ set stopped_line_pattern "Program received signal SIGINT, Interrupt\\." ++ } else { ++ set stopped_line_pattern "Program stopped\\." ++ } + +- gdb_test "print function_that_never_returns ()" \ +- [multi_line \ +- $stopped_line_pattern \ +- ".*" \ +- "The program being debugged timed out while in a function called from GDB\\." \ +- "GDB remains in the frame where the timeout occurred\\." \ +- "To change this behavior use \"set unwind-on-timeout on\"\\." \ +- "Evaluation of the expression containing the function" \ +- "\\(function_that_never_returns\\) will be abandoned\\." \ +- "When the function is done executing, GDB will silently stop\\."] +- +- gdb_test "bt" ".* function_that_never_returns .*.*" ++ gdb_test "print function_that_never_returns ()" \ ++ [multi_line \ ++ $stopped_line_pattern \ ++ ".*" \ ++ "The program being debugged timed out while in a function called from GDB\\." \ ++ "GDB remains in the frame where the timeout occurred\\." \ ++ "To change this behavior use \"set unwind-on-timeout on\"\\." \ ++ "Evaluation of the expression containing the function" \ ++ "\\(function_that_never_returns\\) will be abandoned\\." \ ++ "When the function is done executing, GDB will silently stop\\."] ++ ++ gdb_test "bt" \ ++ ".* function_that_never_returns .*.*" ++ } + } + + foreach_with_prefix target_async { "on" "off" } { +@@ -88,7 +107,9 @@ foreach_with_prefix target_async { "on" "off" } { + continue + } + +- run_test $target_async $target_non_stop $non_stop ++ foreach_with_prefix unwind { "on" "off" } { ++ run_test $target_async $target_non_stop $non_stop $unwind ++ } + } + } + } +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp +--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp +@@ -41,7 +41,12 @@ set segfault_line [gdb_get_line_number "Segfault here"] + # thread, on which the inferior call relies, either hits a breakpoint + # (when OTHER_THREAD_BP is true), or crashes (when OTHER_THREAD_BP is + # false). +-proc run_test { target_async target_non_stop non_stop other_thread_bp } { ++# ++# When UNWIND is "on" GDB will unwind the thread which performed the ++# inferior function call back to the state where the inferior call was ++# made (when the inferior call times out). Otherwise, when UNWIND is ++# "off", the inferior is left in the frame where the timeout occurred. ++proc run_test { target_async target_non_stop non_stop other_thread_bp unwind } { + save_vars { ::GDBFLAGS } { + append ::GDBFLAGS " -ex \"maint set target-non-stop $target_non_stop\"" + append ::GDBFLAGS " -ex \"maint non-stop $non_stop\"" +@@ -72,6 +77,7 @@ proc run_test { target_async target_non_stop non_stop other_thread_bp } { + # for this timeout. For now though, we just hope 5 seconds is + # enough. + gdb_test_no_output "set indirect-call-timeout 5" ++ gdb_test_no_output "set unwind-on-timeout $unwind" + + gdb_breakpoint \ + "${::srcfile}:${::cond_bp_line} if (condition_func ())" +@@ -92,27 +98,43 @@ proc run_test { target_async target_non_stop non_stop other_thread_bp } { + "get number for segfault breakpoint"] + } + +- # When non-stop mode is off we get slightly different output from GDB. +- if { ([target_info gdb_protocol] == "remote" +- || [target_info gdb_protocol] == "extended-remote") +- && !$target_non_stop} { +- set stopped_line_pattern "Thread ${::decimal} \"\[^\r\n\"\]+\" received signal SIGINT, Interrupt\\." ++ if { $unwind } { ++ gdb_test "continue" \ ++ [multi_line \ ++ "Error in testing condition for breakpoint ${bp_num}:" \ ++ "The program being debugged timed out while in a function called from GDB\\." \ ++ "GDB has restored the context to what it was before the call\\." \ ++ "To change this behavior use \"set unwind-on-timeout off\"\\." \ ++ "Evaluation of the expression containing the function" \ ++ "\\(condition_func\\) will be abandoned\\." \ ++ "" \ ++ "Thread ${::decimal}\[^\r\n\]*hit Breakpoint ${bp_num}, \[^\r\n\]+" \ ++ "\[^\r\n\]+ Conditional breakpoint here\\. \[^\r\n\]+"] \ ++ "expected timeout waiting for inferior call to complete" + } else { +- set stopped_line_pattern "Thread ${::decimal} \"\[^\r\n\"\]+\" stopped\\." +- } ++ # When non-stop mode is off we get slightly different output from GDB. ++ if { ([target_info gdb_protocol] == "remote" ++ || [target_info gdb_protocol] == "extended-remote") ++ && !$target_non_stop} { ++ set stopped_line_pattern \ ++ "Thread ${::decimal} \"\[^\r\n\"\]+\" received signal SIGINT, Interrupt\\." ++ } else { ++ set stopped_line_pattern "Thread ${::decimal} \"\[^\r\n\"\]+\" stopped\\." ++ } + +- gdb_test "continue" \ +- [multi_line \ +- $stopped_line_pattern \ +- ".*" \ +- "Error in testing condition for breakpoint ${bp_num}:" \ +- "The program being debugged timed out while in a function called from GDB\\." \ +- "GDB remains in the frame where the timeout occurred\\." \ +- "To change this behavior use \"set unwind-on-timeout on\"\\." \ +- "Evaluation of the expression containing the function" \ +- "\\(condition_func\\) will be abandoned\\." \ +- "When the function is done executing, GDB will silently stop\\."] \ +- "expected timeout waiting for inferior call to complete" ++ gdb_test "continue" \ ++ [multi_line \ ++ "$stopped_line_pattern" \ ++ ".*" \ ++ "Error in testing condition for breakpoint ${bp_num}:" \ ++ "The program being debugged timed out while in a function called from GDB\\." \ ++ "GDB remains in the frame where the timeout occurred\\." \ ++ "To change this behavior use \"set unwind-on-timeout on\"\\." \ ++ "Evaluation of the expression containing the function" \ ++ "\\(condition_func\\) will be abandoned\\." \ ++ "When the function is done executing, GDB will silently stop\\."] \ ++ "expected timeout waiting for inferior call to complete" ++ } + + # Remember that other thread that either crashed (with a segfault) + # or hit a breakpoint? Now that the inferior call has timed out, +@@ -158,8 +180,11 @@ foreach_with_prefix target_async {"on" "off" } { + # disabled. + continue + } +- foreach_with_prefix other_thread_bp { true false } { +- run_test $target_async $target_non_stop $non_stop $other_thread_bp ++ foreach_with_prefix unwind {"off" "on"} { ++ foreach_with_prefix other_thread_bp { true false } { ++ run_test $target_async $target_non_stop $non_stop \ ++ $other_thread_bp $unwind ++ } + } + } + } diff --git a/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-5-of-5.patch b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-5-of-5.patch new file mode 100644 index 0000000..9dcaeac --- /dev/null +++ b/SOURCES/gdb-rhel-13298-inferior-funcall-bp-condition-5-of-5.patch @@ -0,0 +1,467 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Wed, 18 Jan 2023 12:09:05 +0000 +Subject: gdb-rhel-13298-inferior-funcall-bp-condition-5-of-5.patch + +;;gdb: rename unwindonsignal to unwind-on-signal +;;(Andrew Burgess, RHEL-13298) + +We now have unwind-on-timeout and unwind-on-terminating-exception, and +then the odd one out unwindonsignal. + +I'm not a great fan of these squashed together command names, so in +this commit I propose renaming this to unwind-on-signal. + +Obviously I've added the hidden alias unwindonsignal so any existing +GDB scripts will keep working. + +There's one test that I've extended to test the alias works, but in +most of the other test scripts I've changed over to use the new name. + +The docs are updated to reference the new name. + +Reviewed-By: Eli Zaretskii +Tested-By: Luis Machado +Tested-By: Keith Seitz + +diff --git a/gdb/NEWS b/gdb/NEWS +--- a/gdb/NEWS ++++ b/gdb/NEWS +@@ -32,6 +32,10 @@ maintenance info line-table + if the line is considered the start of the epilgoue, and thus a point at + which the frame can be considered destroyed. + ++set unwindonsignal on|off ++show unwindonsignal ++ These commands are now aliases for the new set/show unwind-on-signal. ++ + * New commands + + info missing-debug-handler +@@ -81,6 +85,11 @@ show unwind-on-timeout + dummy frame that was added for the inferior call, and restoring the + inferior state to how it was before the inferior call started. + ++set unwind-on-signal on|off ++show unwind-on-signal ++ These new commands replaces the existing set/show unwindonsignal. The ++ old command is maintained as an alias. ++ + * New features in the GDB remote stub, GDBserver + + ** The --remote-debug and --event-loop-debug command line options +diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo +--- a/gdb/doc/gdb.texinfo ++++ b/gdb/doc/gdb.texinfo +@@ -20886,7 +20886,7 @@ value history. + It is possible for the function you call via the @code{print} or + @code{call} command to generate a signal (e.g., if there's a bug in + the function, or if you passed it incorrect arguments). What happens +-in that case is controlled by the @code{set unwindonsignal} command. ++in that case is controlled by the @code{set unwind-on-signal} command. + + Similarly, with a C@t{++} program it is possible for the function you + call via the @code{print} or @code{call} command to generate an +@@ -20900,7 +20900,8 @@ in that case is controlled by the + + @anchor{stack unwind settings} + @table @code +-@item set unwindonsignal ++@item set unwind-on-signal ++@kindex set unwind-on-signal + @kindex set unwindonsignal + @cindex unwind stack in called functions + @cindex call dummy stack unwinding +@@ -20911,11 +20912,18 @@ the context to what it was before the call. If set to off (the + default), @value{GDBN} stops in the frame where the signal was + received. + +-@item show unwindonsignal ++The command @code{set unwindonsignal} is an alias for this command, ++and is maintained for backward compatibility. ++ ++@item show unwind-on-signal ++@kindex show unwind-on-signal + @kindex show unwindonsignal + Show the current setting of stack unwinding in the functions called by + @value{GDBN}. + ++The command @code{show unwindonsignal} is an alias for this command, ++and is maintained for backward compatibility. ++ + @item set unwind-on-terminating-exception + @kindex set unwind-on-terminating-exception + @cindex unwind stack in called functions with unhandled exceptions +@@ -20980,7 +20988,7 @@ call by typing the interrupt character (often @kbd{Ctrl-c}). + If a called function is interrupted for any reason, including hitting + a breakpoint, or triggering a watchpoint, and the stack is not unwound + due to @code{set unwind-on-terminating-exception on}, @code{set +-unwind-on-timeout on}, or @code{set unwindonsignal on} (@pxref{stack ++unwind-on-timeout on}, or @code{set unwind-on-signal on} (@pxref{stack + unwind settings}), then the dummy-frame, created by @value{GDBN} to + facilitate the call to the program function, will be visible in the + backtrace, for example frame @code{#3} in the following backtrace: +diff --git a/gdb/infcall.c b/gdb/infcall.c +--- a/gdb/infcall.c ++++ b/gdb/infcall.c +@@ -1747,7 +1747,7 @@ When the function is done executing, GDB will silently stop."), + The program being debugged received signal %s, %s\n\ + while in a function called from GDB. GDB has restored the context\n\ + to what it was before the call. To change this behavior use\n\ +-\"set unwindonsignal off\". Evaluation of the expression containing\n\ ++\"set unwind-on-signal off\". Evaluation of the expression containing\n\ + the function (%s) will be abandoned."), + gdb_signal_to_name (stop_signal), + gdb_signal_to_string (stop_signal), +@@ -1766,7 +1766,7 @@ the function (%s) will be abandoned."), + error (_("\ + The program being debugged was signaled while in a function called from GDB.\n\ + GDB remains in the frame where the signal was received.\n\ +-To change this behavior use \"set unwindonsignal on\".\n\ ++To change this behavior use \"set unwind-on-signal on\".\n\ + Evaluation of the expression containing the function\n\ + (%s) will be abandoned.\n\ + When the function is done executing, GDB will silently stop."), +@@ -1898,17 +1898,22 @@ The default is to perform the conversion."), + show_coerce_float_to_double_p, + &setlist, &showlist); + +- add_setshow_boolean_cmd ("unwindonsignal", no_class, +- &unwind_on_signal_p, _("\ ++ set_show_commands setshow_unwind_on_signal_cmds ++ = add_setshow_boolean_cmd ("unwind-on-signal", no_class, ++ &unwind_on_signal_p, _("\ + Set unwinding of stack if a signal is received while in a call dummy."), _("\ + Show unwinding of stack if a signal is received while in a call dummy."), _("\ +-The unwindonsignal lets the user determine what gdb should do if a signal\n\ ++The unwind-on-signal lets the user determine what gdb should do if a signal\n\ + is received while in a function called from gdb (call dummy). If set, gdb\n\ + unwinds the stack and restore the context to what as it was before the call.\n\ + The default is to stop in the frame where the signal was received."), +- NULL, +- show_unwind_on_signal_p, +- &setlist, &showlist); ++ NULL, ++ show_unwind_on_signal_p, ++ &setlist, &showlist); ++ add_alias_cmd ("unwindonsignal", setshow_unwind_on_signal_cmds.set, ++ no_class, 1, &setlist); ++ add_alias_cmd ("unwindonsignal", setshow_unwind_on_signal_cmds.show, ++ no_class, 1, &showlist); + + add_setshow_boolean_cmd ("unwind-on-terminating-exception", no_class, + &unwind_on_terminating_exception_p, _("\ +diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp +--- a/gdb/testsuite/gdb.base/callfuncs.exp ++++ b/gdb/testsuite/gdb.base/callfuncs.exp +@@ -46,7 +46,7 @@ proc do_function_calls {prototypes} { + + # If any of these calls segv we don't want to affect subsequent tests. + # E.g., we want to ensure register values are restored. +- gdb_test_no_output "set unwindonsignal on" ++ gdb_test_no_output "set unwind-on-signal on" + + gdb_test "p t_char_values(0,0)" " = 0" + gdb_test "p t_char_values('a','b')" " = 1" +@@ -237,7 +237,7 @@ proc do_function_calls {prototypes} { + "call inferior func with struct - returns char *" + + # Restore default value. +- gdb_test_no_output "set unwindonsignal off" ++ gdb_test_no_output "set unwind-on-signal off" + } + + # Procedure to get current content of all registers. +diff --git a/gdb/testsuite/gdb.base/infcall-failure.exp b/gdb/testsuite/gdb.base/infcall-failure.exp +--- a/gdb/testsuite/gdb.base/infcall-failure.exp ++++ b/gdb/testsuite/gdb.base/infcall-failure.exp +@@ -137,7 +137,7 @@ proc_with_prefix run_cond_hits_segfault_test { async_p non_stop_p } { + "Error in testing condition for breakpoint ${bp_1_num}:" \ + "The program being debugged was signaled while in a function called from GDB\\." \ + "GDB remains in the frame where the signal was received\\." \ +- "To change this behavior use \"set unwindonsignal on\"\\." \ ++ "To change this behavior use \"set unwind-on-signal on\"\\." \ + "Evaluation of the expression containing the function" \ + "\\(func_segfault\\) will be abandoned\\." \ + "When the function is done executing, GDB will silently stop\\."] +@@ -166,7 +166,7 @@ proc_with_prefix run_call_hits_segfault_test { async_p non_stop_p } { + "${::decimal}\\s+\[^\r\n\]+Segfault here\[^\r\n\]+" \ + "The program being debugged was signaled while in a function called from GDB\\." \ + "GDB remains in the frame where the signal was received\\." \ +- "To change this behavior use \"set unwindonsignal on\"\\." \ ++ "To change this behavior use \"set unwind-on-signal on\"\\." \ + "Evaluation of the expression containing the function" \ + "\\(func_segfault\\) will be abandoned\\." \ + "When the function is done executing, GDB will silently stop\\."] +diff --git a/gdb/testsuite/gdb.base/unwindonsignal.exp b/gdb/testsuite/gdb.base/unwindonsignal.exp +--- a/gdb/testsuite/gdb.base/unwindonsignal.exp ++++ b/gdb/testsuite/gdb.base/unwindonsignal.exp +@@ -34,13 +34,29 @@ gdb_test "break stop_here" "Breakpoint \[0-9\]* at .*" + gdb_test "continue" "Continuing.*Breakpoint \[0-9\]*, stop_here.*" \ + "continue to breakpoint at stop_here" + +-# Turn on unwindonsignal. +-gdb_test_no_output "set unwindonsignal on" \ +- "setting unwindonsignal" ++# Turn on unwind-on-signal. ++gdb_test_no_output "set unwind-on-signal on" \ ++ "setting unwind-on-signal" + +-gdb_test "show unwindonsignal" \ ++gdb_test "show unwind-on-signal" \ + "Unwinding of stack .* is on." \ +- "showing unwindonsignal" ++ "showing unwind-on-signal" ++ ++# For backward compatibility we maintain a 'unwindonsignal' alias for ++# 'unwind-on-signal', check it now. ++gdb_test "show unwindonsignal" \ ++ "Unwinding of stack .* is on\\." \ ++ "showing unwindonsignal alias" ++ ++gdb_test_no_output "set unwindonsignal off" \ ++ "setting unwindonsignal alias to off" ++ ++gdb_test "show unwind-on-signal" \ ++ "Unwinding of stack .* is off\\." \ ++ "showing unwind-on-signal after setting via alias" ++ ++gdb_test_no_output "set unwindonsignal on" \ ++ "setting unwindonsignal alias to on" + + # Call function (causing the program to get a signal), and see if gdb handles + # it properly. +@@ -49,7 +65,7 @@ if {[gdb_test "call gen_signal ()" \ + "The program being debugged received signal SIGABRT, Aborted" \ + "while in a function called from GDB\\. GDB has restored the context" \ + "to what it was before the call\\. To change this behavior use" \ +- "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ ++ "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ + "the function \\(gen_signal\\) will be abandoned\\."] \ + "unwindonsignal, inferior function call signaled"] != 0} { + return 0 +@@ -58,15 +74,15 @@ if {[gdb_test "call gen_signal ()" \ + # Verify the stack got unwound. + gdb_test "bt" \ + "#0 *\[x0-9a-f in\]*stop_here \\(.*\\) at .*#1 *\[x0-9a-f in\]*main \\(.*\\) at .*" \ +- "unwindonsignal, stack unwound" ++ "stack unwound" + + # Verify the dummy frame got removed from dummy_frame_stack. + gdb_test_multiple "maint print dummy-frames" \ +- "unwindonsignal, dummy frame removed" { ++ "unwind-on-signal, dummy frame removed" { + -re "\[\r\n\]*.*stack=.*code=.*\[\r\n\]+$gdb_prompt $" { +- fail "unwindonsignal, dummy frame removed" ++ fail $gdb_test_name + } + -re "\[\r\n\]+$gdb_prompt $" { +- pass "unwindonsignal, dummy frame removed" ++ pass $gdb_test_name + } + } +diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp +--- a/gdb/testsuite/gdb.compile/compile-cplus.exp ++++ b/gdb/testsuite/gdb.compile/compile-cplus.exp +@@ -131,13 +131,13 @@ gdb_test "return" "\r\n#0 main .*" "return" \ + "Make _gdb_expr\\(__gdb_regs\\*\\) return now\\? \\(y or n\\) " "y" + gdb_test "info sym $infcall_pc" "\r\nNo symbol matches .*" "info sym not found" + +-gdb_test_no_output "set unwindonsignal on" ++gdb_test_no_output "set unwind-on-signal on" + gdb_test "compile code *(volatile int *) 0 = 0;" \ + [multi_line \ + "The program being debugged received signal SIGSEGV, Segmentation fault" \ + "while in a function called from GDB\\. GDB has restored the context" \ + "to what it was before the call\\. To change this behavior use" \ +- "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ ++ "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ + "the function \\(_gdb_expr\\(__gdb_regs\\*\\)\\) will be abandoned\\."] \ + "compile code segfault second" + +@@ -313,7 +313,7 @@ gdb_test "compile code static const int readonly = 1; *(int *) &readonly = 2;" \ + "The program being debugged received signal SIGSEGV, Segmentation fault" \ + "while in a function called from GDB\\. GDB has restored the context" \ + "to what it was before the call\\. To change this behavior use" \ +- "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ ++ "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ + "the function \\(_gdb_expr\\(__gdb_regs\\*\\)\\) will be abandoned\\."] + gdb_test_no_output "set debug compile off" + +diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp +--- a/gdb/testsuite/gdb.compile/compile.exp ++++ b/gdb/testsuite/gdb.compile/compile.exp +@@ -157,13 +157,13 @@ gdb_test "return" "\r\n#0 main .*" "return" \ + "Make _gdb_expr return now\\? \\(y or n\\) " "y" + gdb_test "info sym $infcall_pc" "\r\nNo symbol matches .*" "info sym not found" + +-gdb_test_no_output "set unwindonsignal on" ++gdb_test_no_output "set unwind-on-signal on" + gdb_test "compile code *(volatile int *) 0 = 0;" \ + [multi_line \ + "The program being debugged received signal SIGSEGV, Segmentation fault" \ + "while in a function called from GDB\\. GDB has restored the context" \ + "to what it was before the call\\. To change this behavior use" \ +- "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ ++ "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ + "the function \\(_gdb_expr\\) will be abandoned\\."] \ + "compile code segfault second" + +@@ -321,7 +321,7 @@ gdb_test "compile code static const int readonly = 1; *(int *) &readonly = 2;" \ + "The program being debugged received signal SIGSEGV, Segmentation fault" \ + "while in a function called from GDB\\. GDB has restored the context" \ + "to what it was before the call\\. To change this behavior use" \ +- "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ ++ "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ + "the function \\(_gdb_expr\\) will be abandoned\\."] + gdb_test_no_output "set debug compile off" + +diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp +--- a/gdb/testsuite/gdb.cp/gdb2495.exp ++++ b/gdb/testsuite/gdb.cp/gdb2495.exp +@@ -98,10 +98,10 @@ if {![runto_main]} { + # behaviour; it should not. Test both on and off states. + + # Turn on unwind on signal behaviour. +-gdb_test_no_output "set unwindonsignal on" ++gdb_test_no_output "set unwind-on-signal on" + + # Check that it is turned on. +-gdb_test "show unwindonsignal" \ ++gdb_test "show unwind-on-signal" \ + "signal is received while in a call dummy is on.*" \ + "turn on unwind on signal" + +@@ -112,20 +112,20 @@ gdb_test "p exceptions.raise_signal(1)" \ + "The program being debugged received signal SIGABRT, Aborted" \ + "while in a function called from GDB\\. GDB has restored the context" \ + "to what it was before the call\\. To change this behavior use" \ +- "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ ++ "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ + "the function \\(SimpleException::raise_signal\\(int\\)\\) will be abandoned\\."]\ +- "check for unwindonsignal off message" ++ "check for unwind-on-signal off message" + + # And reverse - turn off again. +-gdb_test_no_output "set unwindonsignal off" ++gdb_test_no_output "set unwind-on-signal off" + + # Check that it is actually turned off. +-gdb_test "show unwindonsignal" \ ++gdb_test "show unwind-on-signal" \ + "signal is received while in a call dummy is off.*" \ + "turn off unwind on signal" + + # Check to see if new behaviour interferes with + # normal signal handling in inferior function calls. + gdb_test "p exceptions.raise_signal(1)" \ +- "To change this behavior use \"set unwindonsignal on\".*" \ +- "check for unwindonsignal on message" ++ "To change this behavior use \"set unwind-on-signal on\".*" \ ++ "check for unwind-on-signal on message" +diff --git a/gdb/testsuite/gdb.fortran/function-calls.exp b/gdb/testsuite/gdb.fortran/function-calls.exp +--- a/gdb/testsuite/gdb.fortran/function-calls.exp ++++ b/gdb/testsuite/gdb.fortran/function-calls.exp +@@ -44,7 +44,7 @@ if {![runto [gdb_get_line_number "post_init"]]} { + } + + # Use inspired by gdb.base/callfuncs.exp. +-gdb_test_no_output "set unwindonsignal on" ++gdb_test_no_output "set unwind-on-signal on" + + # Baseline: function and subroutine call with no arguments. + gdb_test "p no_arg()" " = .TRUE." +diff --git a/gdb/testsuite/gdb.mi/mi-condbreak-fail.exp b/gdb/testsuite/gdb.mi/mi-condbreak-fail.exp +--- a/gdb/testsuite/gdb.mi/mi-condbreak-fail.exp ++++ b/gdb/testsuite/gdb.mi/mi-condbreak-fail.exp +@@ -43,7 +43,7 @@ proc run_test { unwind_on_signal } { + return + } + +- mi_gdb_test "-gdb-set unwindonsignal ${unwind_on_signal}" {\^done} \ ++ mi_gdb_test "-gdb-set unwind-on-signal ${unwind_on_signal}" {\^done} \ + "set unwind-on-signal" + + # Create the conditional breakpoint. +@@ -70,7 +70,7 @@ proc run_test { unwind_on_signal } { + "&\"The program being debugged received signal SIGSEGV, Segmentation fault\\\\n\"" \ + "&\"while in a function called from GDB\\. GDB has restored the context\\\\n\"" \ + "&\"to what it was before the call\\. To change this behavior use\\\\n\"" \ +- "&\"\\\\\"set unwindonsignal off\\\\\"\\. Evaluation of the expression containing\\\\n\"" \ ++ "&\"\\\\\"set unwind-on-signal off\\\\\"\\. Evaluation of the expression containing\\\\n\"" \ + "&\"the function \\(cond_fail\\) will be abandoned\\.\\\\n\"" \ + "=breakpoint-modified,bkpt={number=\"$bpnum\",type=\"breakpoint\",\[^\r\n\]+times=\"1\",\[^\r\n\]+}" \ + "~\"\\\\n\"" \ +@@ -92,7 +92,7 @@ proc run_test { unwind_on_signal } { + "&\"Error in testing condition for breakpoint $bpnum:\\\\n\"" \ + "&\"The program being debugged was signaled while in a function called from GDB\\.\\\\n\"" \ + "&\"GDB remains in the frame where the signal was received\\.\\\\n\"" \ +- "&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\.\\\\n\"" \ ++ "&\"To change this behavior use \\\\\"set unwind-on-signal on\\\\\"\\.\\\\n\"" \ + "&\"Evaluation of the expression containing the function\\\\n\"" \ + "&\"\\(cond_fail\\) will be abandoned\\.\\\\n\"" \ + "&\"When the function is done executing, GDB will silently stop\\.\\\\n\"" \ +diff --git a/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp b/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp +--- a/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp ++++ b/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp +@@ -103,7 +103,7 @@ proc run_test { unwind_on_exception } { + "&\"Error in testing condition for breakpoint $bpnum:\\\\n\"" \ + "&\"The program being debugged was signaled while in a function called from GDB\\.\\\\n\"" \ + "&\"GDB remains in the frame where the signal was received\\.\\\\n\"" \ +- "&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\.\\\\n\"" \ ++ "&\"To change this behavior use \\\\\"set unwind-on-signal on\\\\\"\\.\\\\n\"" \ + "&\"Evaluation of the expression containing the function\\\\n\"" \ + "&\"\\(cond_throw\\(\\)\\) will be abandoned\\.\\\\n\"" \ + "&\"When the function is done executing, GDB will silently stop\\.\\\\n\"" \ +diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp +--- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp ++++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp +@@ -94,7 +94,7 @@ mi_gdb_test "409-stack-list-frames 0 0" \ + # + + mi_gdb_test "410-data-evaluate-expression bar()" \ +- ".*410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\".\\\\nEvaluation of the expression containing the function\\\\n\\(bar\\) will be abandoned.\\\\nWhen the function is done executing, GDB will silently stop.\"" \ ++ ".*410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwind-on-signal on\\\\\".\\\\nEvaluation of the expression containing the function\\\\n\\(bar\\) will be abandoned.\\\\nWhen the function is done executing, GDB will silently stop.\"" \ + "call inferior function which raises exception" + + mi_gdb_test "411-stack-list-frames" "411\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"},frame=\{level=\"1\",addr=\"$hex\",func=\"\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"}.*\\\]" "backtrace from inferior function at exception" +diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp +--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp ++++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp +@@ -173,7 +173,7 @@ proc_with_prefix run_bp_cond_segfaults { target_async target_non_stop } { + "Error in testing condition for breakpoint ${bp_1_num}:" \ + "The program being debugged was signaled while in a function called from GDB\\." \ + "GDB remains in the frame where the signal was received\\." \ +- "To change this behavior use \"set unwindonsignal on\"\\." \ ++ "To change this behavior use \"set unwind-on-signal on\"\\." \ + "Evaluation of the expression containing the function" \ + "\\(function_that_segfaults\\) will be abandoned\\." \ + "When the function is done executing, GDB will silently stop\\."] +diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp +--- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp ++++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp +@@ -13,7 +13,7 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + +-# Test use of unwindonsignal when a hand function call that gets interrupted ++# Test use of unwind-on-signal when a hand function call that gets interrupted + # by a signal in another thread. + + set NR_THREADS 4 +@@ -49,12 +49,12 @@ gdb_test "continue" \ + # We want the main thread (hand_call_with_signal) and + # thread 1 (sigabrt_handler) to both run. + +-# Do turn on unwindonsignal. ++# Do turn on unwind-on-signal. + # We want to test gdb handling of the current thread changing when + # unwindonsignal is in effect. +-gdb_test_no_output "set unwindonsignal on" \ ++gdb_test_no_output "set unwind-on-signal on" \ + "setting unwindonsignal" +-gdb_test "show unwindonsignal" \ ++gdb_test "show unwind-on-signal" \ + "Unwinding of stack .* is on." \ + "showing unwindonsignal" + diff --git a/SOURCES/gdb-rhel-19390-pc-not-saved.patch b/SOURCES/gdb-rhel-19390-pc-not-saved.patch new file mode 100644 index 0000000..3bfd212 --- /dev/null +++ b/SOURCES/gdb-rhel-19390-pc-not-saved.patch @@ -0,0 +1,379 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Wed, 24 Jan 2024 13:52:59 +0000 +Subject: gdb-rhel-19390-pc-not-saved.patch + +;;gdb/unwinders: better support for $pc not saved +;;(Andrew Burgess, RHEL-19390) + +This started with a Red Hat bug report which can be seen here: + + https://bugzilla.redhat.com/show_bug.cgi?id=1850710 + +The problem reported here was using GDB on GNU/Linux for S390, the +user stepped into JIT generated code. As they enter the JIT code GDB +would report 'PC not saved', and this same message would be reported +after each step/stepi. + +Additionally, the user had 'set disassemble-next-line on', and once +they entered the JIT code this output was not displayed, nor were any +'display' directives displayed. + +The user is not making use of the JIT plugin API to provide debug +information. But that's OK, they aren't expecting any source level +debug here, they are happy to use 'stepi', but the missing 'display' +directives are a problem, as is the constant 'PC not saved' (error) +message. + +What is happening here is that as GDB is failing to find any debug +information for the JIT generated code, it is falling back on to the +S390 prologue unwinder to try and unwind frame #0. Unfortunately, +without being able to identify the function boundaries, the S390 +prologue scanner can't help much, in fact, it doesn't even suggest an +arbitrary previous $pc value (some targets that use a link-register +will, by default, assume the link-register contains the previous $pc), +instead the S390 will just say, "sorry, I have no previous $pc value". + +The result of this is that when GDB tries to find frame #1 we end +throwing an error from frame_unwind_pc (the 'PC not saved' error). +This error is not caught anywhere except at the top-level interpreter +loop, and so we end up skipping all the 'display' directive handling. + +While thinking about this, I wondered, could I trigger the same error +using the Python Unwinder API? What happens if a Python unwinder +claims a frame, but then fails to provide a previous $pc value? + +Turns out that exactly the same thing happens, which is great, as that +means we now have a way to reproduce this bug on any target. And so +the test included with this patch does just this. I have a Python +unwinder that claims a frame, but doesn't provide any previous +register values. + +I then do two tests, first I stop in the claimed frame (i.e. frame #0 +is the frame that can't be unwound), I perform a few steps, and check +the backtrace. And second, I stop in a child of the problem +frame (i.e. frame #1 is the frame that can't be unwound), and from +here I check the backtrace. + +While all this is going on I have a 'display' directive in place, and +each time GDB stops I check that the display directive triggers. + +Additionally, when checking the backtrace, I am checking that the +backtrace finishes with the message 'Backtrace stopped: frame did not +save the PC'. + +As for the fix I chose to add a call to frame_unwind_pc directly to +get_prev_frame_always_1. Calling frame_unwind_pc will cache the +unwound $pc value, so this doesn't add much additional work as +immediately after the new frame_unwind_pc call, we call +get_prev_frame_maybe_check_cycle, which actually generates the +previous frame, which will always (I think) require a call to +frame_unwind_pc anyway. + +The reason for adding the frame_unwind_pc call into +get_prev_frame_always_1, is that if the frame_unwind_pc call fails we +want to set the frames 'stop_reason', and get_prev_frame_always_1 +seems to be the place where this is done, so I wanted to keep the new +stop_reason setting code next to all the existing stop_reason setting +code. + +Additionally, once we enter get_prev_frame_maybe_check_cycle we +actually create the previous frame, then, if it turns out that the +previous frame can't be created we need to remove the frame .. this +seemed more complex than just making the check in +get_prev_frame_always_1. + +With this fix in place the original S390 bug is fixed, and also the +test added in this commit, that uses the Python API, is also fixed. + +Reviewed-By: Kevin Buettner + +diff --git a/gdb/frame.c b/gdb/frame.c +--- a/gdb/frame.c ++++ b/gdb/frame.c +@@ -2422,6 +2422,38 @@ get_prev_frame_always_1 (frame_info_ptr this_frame) + } + } + ++ /* Ensure we can unwind the program counter of THIS_FRAME. */ ++ try ++ { ++ /* Calling frame_unwind_pc for the sentinel frame relies on the ++ current_frame being set, which at this point it might not be if we ++ are in the process of setting the current_frame after a stop (see ++ get_current_frame). ++ ++ The point of this check is to ensure that the unwinder for ++ THIS_FRAME can actually unwind the $pc, which we assume the ++ sentinel frame unwinder can always do (it's just a read from the ++ machine state), so we only call frame_unwind_pc for frames other ++ than the sentinel (level -1) frame. ++ ++ Additionally, we don't actually care about the value of the ++ unwound $pc, just that the call completed successfully. */ ++ if (this_frame->level >= 0) ++ frame_unwind_pc (this_frame); ++ } ++ catch (const gdb_exception_error &ex) ++ { ++ if (ex.error == NOT_AVAILABLE_ERROR || ex.error == OPTIMIZED_OUT_ERROR) ++ { ++ frame_debug_printf (" -> nullptr // no saved PC"); ++ this_frame->stop_reason = UNWIND_NO_SAVED_PC; ++ this_frame->prev = nullptr; ++ return nullptr; ++ } ++ ++ throw; ++ } ++ + return get_prev_frame_maybe_check_cycle (this_frame); + } + +diff --git a/gdb/testsuite/gdb.base/pc-not-saved.c b/gdb/testsuite/gdb.base/pc-not-saved.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/pc-not-saved.c +@@ -0,0 +1,48 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2024 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 . */ ++ ++volatile int global_var = 0; ++ ++void ++other_func (void) ++{ ++ /* Nothing. */ ++} ++ ++void ++break_bt_here (void) ++{ ++ /* This is all nonsense; just filler so this function has a body. */ ++ if (global_var != 99) ++ global_var++; ++ if (global_var != 98) ++ global_var++; ++ if (global_var != 97) ++ global_var++; ++ if (global_var != 96) ++ global_var++; ++ other_func (); ++ if (global_var != 95) ++ global_var++; ++} ++ ++int ++main (void) ++{ ++ break_bt_here (); ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.base/pc-not-saved.exp b/gdb/testsuite/gdb.base/pc-not-saved.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/pc-not-saved.exp +@@ -0,0 +1,113 @@ ++# Copyright 2024 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 how GDB handles a frame in which the previous-pc value is not ++# available. Specifically, check that the backtrace correctly reports ++# why the backtrace is truncated, and ensure that 'display' directives ++# still work when 'stepi'-ing through the frame. ++# ++# We do this by registering a Python unwinder which doesn't provide ++# any previous register values. ++ ++require allow_python_tests ++ ++standard_testfile ++ ++if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { ++ return ++} ++ ++set remote_python_file \ ++ [gdb_remote_download host "${srcdir}/${subdir}/${testfile}.py"] ++ ++if { ![runto "break_bt_here"] } { ++ return ++} ++ ++# Figuring out the correct frame-id from a Python unwinder is hard. ++# We need to know the function's start address (not too hard), and the ++# stack address on entry to the function, which is much harder to ++# figure out in a cross-target way. ++# ++# So instead we run without any Python unwinder in place and use ++# 'maint print frame-id' to record the frame-id. We then restart GDB, ++# load the Python unwinder, and tell it to use the frame-id we ++# recorded here. ++set pc unknown ++set cfa unknown ++gdb_test_multiple "maintenance print frame-id" "store break_bt_here frame-id" { ++ -re -wrap "frame-id for frame #0: \\{stack=($hex),code=($hex),\[^\}\]+\\}" { ++ set cfa $expect_out(1,string) ++ set pc $expect_out(1,string) ++ } ++} ++gdb_assert { ![string equal $cfa unknown] } \ ++ "check we read the frame's CFA" ++ ++gdb_assert { ![string equal $pc unknown] } \ ++ "check we read the frame's PC" ++ ++# Restart and load the Python unwinder script. ++clean_restart $binfile ++gdb_test_no_output "source ${remote_python_file}" "load python file" ++ ++# Tell the Python unwinder to use the frame-id we cached above. ++gdb_test_no_output "python set_break_bt_here_frame_id($pc, $cfa)" ++ ++# Run up to the function which the unwinder will claim. ++if { ![runto "break_bt_here"] } { ++ return ++} ++ ++# Print the backtrace. Check that the reason for stopping the ++# backtrace is that the previous $pc is not available. ++gdb_test "bt" \ ++ [multi_line \ ++ "^#0 break_bt_here \\(\\) at \[^\r\n\]+" \ ++ "Backtrace stopped: frame did not save the PC"] \ ++ "backtrace from break_bt_here function" ++ ++# Ensure we can stepi. ++gdb_test "stepi" \ ++ "(:?$hex\\s+)?$decimal\\s+\[^\r\n\]+" \ ++ "stepi without a display in place" ++ ++# Setup a 'display' directive. ++gdb_test "display/i \$pc" \ ++ [multi_line \ ++ "^1: x/i \\\$pc" \ ++ "=> $hex :\\s+\[^\r\n\]+"] ++ ++# Step again, check the 'display' directive is shown. ++gdb_test "stepi" \ ++ [multi_line \ ++ "(:?$hex\\s+)?$decimal\\s+\[^\r\n\]+" \ ++ "1: x/i \\\$pc" \ ++ "=> $hex :\\s+\[^\r\n\]+"] \ ++ "stepi with a display in place" ++ ++# Continue to a function that is called from within break_bt_here. ++# The Python unwinder will then be claiming frame #1. ++gdb_breakpoint other_func ++gdb_continue_to_breakpoint "continue to other_func" ++ ++# Print the backtrace and check that the reason for stopping the ++# backtrace is that the previous $pc is not available. ++gdb_test "bt" \ ++ [multi_line \ ++ "#0 other_func \\(\\) at \[^\r\n\]+" \ ++ "#1 (:?$hex in )?break_bt_here \\(\\) at \[^\r\n\]+" \ ++ "Backtrace stopped: frame did not save the PC"] \ ++ "backtrace from other_func function" +diff --git a/gdb/testsuite/gdb.base/pc-not-saved.py b/gdb/testsuite/gdb.base/pc-not-saved.py +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/pc-not-saved.py +@@ -0,0 +1,71 @@ ++# Copyright (C) 2024 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 . ++ ++import gdb ++from gdb.unwinder import Unwinder, FrameId ++ ++# Cached FrameId. See set_break_bt_here_frame_id for details. ++break_bt_here_frame_id = None ++ ++ ++def set_break_bt_here_frame_id(pc, cfa): ++ """Call this to pre-calculate the FrameId for the frame our unwinder ++ is going to claim, this avoids us having to actually figure out a ++ frame-id within the unwinder, something which is going to be hard ++ to do in a cross-target way. ++ ++ Instead we first run the test without the Python unwinder in ++ place, use 'maint print frame-id' to record the frame-id, then, ++ after loading this Python script, we all this function to record ++ the frame-id that the unwinder should use.""" ++ global break_bt_here_frame_id ++ break_bt_here_frame_id = FrameId(cfa, pc) ++ ++ ++class break_unwinding(Unwinder): ++ ++ """An unwinder for the function 'break_bt_here'. This unwinder will ++ claim any frame for the function in question, but doesn't provide ++ any unwound register values. Importantly, we don't provide a ++ previous $pc value, this means that if we are stopped in ++ 'break_bt_here' then we should fail to unwind beyond frame #0.""" ++ ++ def __init__(self): ++ Unwinder.__init__(self, "break unwinding") ++ ++ def __call__(self, pending_frame): ++ pc_desc = pending_frame.architecture().registers().find("pc") ++ pc = pending_frame.read_register(pc_desc) ++ ++ if pc.is_optimized_out: ++ return None ++ ++ block = gdb.block_for_pc(pc) ++ if block == None: ++ return None ++ func = block.function ++ if func == None: ++ return None ++ if str(func) != "break_bt_here": ++ return None ++ ++ global break_bt_here_frame_id ++ if break_bt_here_frame_id is None: ++ return None ++ ++ return pending_frame.create_unwind_info(break_bt_here_frame_id) ++ ++ ++gdb.unwinder.register_unwinder(None, break_unwinding(), True) diff --git a/SOURCES/gdb-rhel-36225-add-arch14-record.patch b/SOURCES/gdb-rhel-36225-add-arch14-record.patch new file mode 100644 index 0000000..31c15f9 --- /dev/null +++ b/SOURCES/gdb-rhel-36225-add-arch14-record.patch @@ -0,0 +1,46 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Andreas Arnez +Date: Tue, 13 Feb 2024 18:55:29 +0100 +Subject: gdb-rhel-36225-add-arch14-record.patch + +;; Backport "gdb: s390: Add arch14 record/replay support" +;; (Andreas Arnez, RHEL-36225) + +Enable recording of the new "arch14" instructions on z/Architecture +targets, except for the specialized-function-assist instruction NNPA. + +diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c +--- a/gdb/s390-tdep.c ++++ b/gdb/s390-tdep.c +@@ -5534,6 +5534,14 @@ s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache, + case 0xe635: /* VLRL - vector load rightmost with immed. length */ + case 0xe637: /* VLRLR - vector load rightmost with length */ + case 0xe649: /* VLIP - vector load immediate decimal */ ++ case 0xe656: /* VCLFNH - vector fp convert and lengthen from NNP high */ ++ case 0xe65e: /* VCLFNL - vector fp convert and lengthen from NNP low */ ++ case 0xe655: /* VCNF - vector fp convert to NNP */ ++ case 0xe65d: /* VCFN - vector fp convert from NNP */ ++ case 0xe674: /* VSCHP - decimal scale and convert to HFP */ ++ case 0xe675: /* VCRNF - vector fp convert and round to NNP */ ++ case 0xe67c: /* VSCSHP - decimal scale and convert and split to HFP */ ++ case 0xe67d: /* VCSPH - vector convert HFP to scaled decimal */ + case 0xe700: /* VLEB - vector load element */ + case 0xe701: /* VLEH - vector load element */ + case 0xe702: /* VLEG - vector load element */ +@@ -5791,11 +5799,16 @@ s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache, + + /* 0xe747-0xe749 undefined */ + ++ case 0xe651: /* VCLZDP - vector count leading zero digits */ ++ case 0xe654: /* VUPKZH - vector unpack zoned high */ + case 0xe658: /* VCVD - vector convert to decimal 32 bit */ + case 0xe659: /* VSRP - vector shift and round decimal */ + case 0xe65a: /* VCVDG - vector convert to decimal 64 bit*/ + case 0xe65b: /* VPSOP - vector perform sign operation decimal */ ++ case 0xe65c: /* VUPKZL - vector unpack zoned low */ ++ case 0xe670: /* VPKZR - vector pack zoned register */ + case 0xe671: /* VAP - vector add decimal */ ++ case 0xe672: /* VSRPR - vector shift and round decimal register */ + case 0xe673: /* VSP - vector subtract decimal */ + case 0xe678: /* VMP - vector multiply decimal */ + case 0xe679: /* VMSP - vector multiply decimal */ diff --git a/SOURCES/gdb-rhel-36518-add-power11-support.patch b/SOURCES/gdb-rhel-36518-add-power11-support.patch new file mode 100644 index 0000000..805a868 --- /dev/null +++ b/SOURCES/gdb-rhel-36518-add-power11-support.patch @@ -0,0 +1,48 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Peter Bergner +Date: Fri, 9 Feb 2024 10:51:30 -0600 +Subject: gdb-rhel-36518-add-power11-support.patch + +;; Backport "PowerPC: Add support for Power11 options" +;; (Peter Bergner, RHEL-36518) + +opcodes/ + * ppc-dis.c (ppc_opts): Add "power11" and "pwr11" entries. + (powerpc_init_dialect): Default to "power11". + +diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c +--- a/opcodes/ppc-dis.c ++++ b/opcodes/ppc-dis.c +@@ -208,6 +208,11 @@ struct ppc_mopt ppc_opts[] = { + | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 + | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX), + 0 }, ++ { "power11", (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 ++ | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 ++ | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 ++ | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX), ++ 0 }, + { "libresoc",(PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 + | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 + | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 +@@ -267,6 +272,11 @@ struct ppc_mopt ppc_opts[] = { + | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 + | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX), + 0 }, ++ { "pwr11", (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 ++ | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 ++ | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 ++ | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX), ++ 0 }, + { "pwrx", PPC_OPCODE_POWER | PPC_OPCODE_POWER2, + 0 }, + { "raw", PPC_OPCODE_PPC, +@@ -396,7 +406,7 @@ powerpc_init_dialect (struct disassemble_info *info) + break; + default: + if (info->arch == bfd_arch_powerpc) +- dialect = ppc_parse_cpu (dialect, &sticky, "power10") | PPC_OPCODE_ANY; ++ dialect = ppc_parse_cpu (dialect, &sticky, "power11") | PPC_OPCODE_ANY; + else + dialect = ppc_parse_cpu (dialect, &sticky, "pwr"); + break; diff --git a/SOURCES/gdb-rhel-36527-apx-disasm.patch b/SOURCES/gdb-rhel-36527-apx-disasm.patch new file mode 100644 index 0000000..e143e99 --- /dev/null +++ b/SOURCES/gdb-rhel-36527-apx-disasm.patch @@ -0,0 +1,7834 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Keith Seitz +Date: Wed, 15 May 2024 09:59:51 -0700 +Subject: gdb-rhel-36527-apx-disasm.patch + +;; Update x86 disassembler + +Update x86 disassembler with APX improvements by syncing +with gdb-15.1 release candidate. + +Resolves: RHEL-36527 + +diff --git a/include/opcode/i386.h b/include/opcode/i386.h +--- a/include/opcode/i386.h ++++ b/include/opcode/i386.h +@@ -1,5 +1,5 @@ + /* opcode/i386.h -- Intel 80386 opcode macros +- Copyright (C) 1989-2023 Free Software Foundation, Inc. ++ Copyright (C) 1989-2024 Free Software Foundation, Inc. + + This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger. + +@@ -112,9 +112,13 @@ + /* x86-64 extension prefix. */ + #define REX_OPCODE 0x40 + ++#define REX2_OPCODE 0xd5 ++ + /* Non-zero if OPCODE is the rex prefix. */ + #define REX_PREFIX_P(opcode) (((opcode) & 0xf0) == REX_OPCODE) + ++/* M0 in rex2 prefix represents map0 or map1. */ ++#define REX2_M 0x8 + /* Indicates 64 bit operand size. */ + #define REX_W 8 + /* High extension to reg field of modrm byte. */ +diff --git a/opcodes/i386-dis-evex-mod.h b/opcodes/i386-dis-evex-mod.h +--- a/opcodes/i386-dis-evex-mod.h ++++ b/opcodes/i386-dis-evex-mod.h +@@ -1 +1,10 @@ +-/* Nothing at present. */ ++ /* MOD_EVEX_MAP4_F8_P1 */ ++ { ++ { "enqcmds", { Gva, M }, 0 }, ++ { VEX_W_TABLE (EVEX_W_MAP4_F8_P1_M_1) }, ++ }, ++ /* MOD_EVEX_MAP4_F8_P3 */ ++ { ++ { "enqcmd", { Gva, M }, 0 }, ++ { VEX_W_TABLE (EVEX_W_MAP4_F8_P3_M_1) }, ++ }, +diff --git a/opcodes/i386-dis-evex-prefix.h b/opcodes/i386-dis-evex-prefix.h +--- a/opcodes/i386-dis-evex-prefix.h ++++ b/opcodes/i386-dis-evex-prefix.h +@@ -338,6 +338,29 @@ + { "vcmpp%XH", { MaskG, Vex, EXxh, EXxEVexS, CMP }, 0 }, + { "vcmps%XH", { MaskG, VexScalar, EXw, EXxEVexS, CMP }, 0 }, + }, ++ /* PREFIX_EVEX_MAP4_F0 */ ++ { ++ { "crc32A", { Gdq, Eb }, 0 }, ++ { "invept", { Gm, Mo }, 0 }, ++ }, ++ /* PREFIX_EVEX_MAP4_F1 */ ++ { ++ { "crc32Q", { Gdq, Ev }, 0 }, ++ { "invvpid", { Gm, Mo }, 0 }, ++ { "crc32Q", { Gdq, Ev }, 0 }, ++ }, ++ /* PREFIX_EVEX_MAP4_F2 */ ++ { ++ { Bad_Opcode }, ++ { "invpcid", { Gm, M }, 0 }, ++ }, ++ /* PREFIX_EVEX_MAP4_F8 */ ++ { ++ { Bad_Opcode }, ++ { MOD_TABLE (MOD_EVEX_MAP4_F8_P_1) }, ++ { "movdir64b", { Gva, M }, 0 }, ++ { MOD_TABLE (MOD_EVEX_MAP4_F8_P_3) }, ++ }, + /* PREFIX_EVEX_MAP5_10 */ + { + { Bad_Opcode }, +diff --git a/opcodes/i386-dis-evex-reg.h b/opcodes/i386-dis-evex-reg.h +--- a/opcodes/i386-dis-evex-reg.h ++++ b/opcodes/i386-dis-evex-reg.h +@@ -49,3 +49,74 @@ + { "vscatterpf0qp%XW", { MVexVSIBQWpX }, PREFIX_DATA }, + { "vscatterpf1qp%XW", { MVexVSIBQWpX }, PREFIX_DATA }, + }, ++ /* REG_EVEX_MAP4_80 */ ++ { ++ { "%NFaddA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NForA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "adcA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "sbbA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NFandA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NFsubA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NFxorA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ }, ++ /* REG_EVEX_MAP4_81 */ ++ { ++ { "%NFaddQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA }, ++ { "%NForQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA }, ++ { "adcQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA }, ++ { "sbbQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA }, ++ { "%NFandQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA }, ++ { "%NFsubQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA }, ++ { "%NFxorQ", { VexGv, Ev, Iv }, PREFIX_NP_OR_DATA }, ++ }, ++ /* REG_EVEX_MAP4_83 */ ++ { ++ { "%NFaddQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA }, ++ { "%NForQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA }, ++ { "adcQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA }, ++ { "sbbQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA }, ++ { "%NFandQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA }, ++ { "%NFsubQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA }, ++ { "%NFxorQ", { VexGv, Ev, sIb }, PREFIX_NP_OR_DATA }, ++ }, ++ /* REG_EVEX_MAP4_8F */ ++ { ++ { VEX_W_TABLE (EVEX_W_MAP4_8F_R_0) }, ++ }, ++ /* REG_EVEX_MAP4_F6 */ ++ { ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { "notA", { VexGb, Eb }, NO_PREFIX }, ++ { "%NFnegA", { VexGb, Eb }, NO_PREFIX }, ++ { "%NFmulA", { Eb }, NO_PREFIX }, ++ { "%NFimulA", { Eb }, NO_PREFIX }, ++ { "%NFdivA", { Eb }, NO_PREFIX }, ++ { "%NFidivA", { Eb }, NO_PREFIX }, ++ }, ++ /* REG_EVEX_MAP4_F7 */ ++ { ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { "notQ", { VexGv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%NFnegQ", { VexGv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%NFmulQ", { Ev }, PREFIX_NP_OR_DATA }, ++ { "%NFimulQ", { Ev }, PREFIX_NP_OR_DATA }, ++ { "%NFdivQ", { Ev }, PREFIX_NP_OR_DATA }, ++ { "%NFidivQ", { Ev }, PREFIX_NP_OR_DATA }, ++ }, ++ /* REG_EVEX_MAP4_FE */ ++ { ++ { "%NFincA", { VexGb, Eb }, NO_PREFIX }, ++ { "%NFdecA", { VexGb, Eb }, NO_PREFIX }, ++ }, ++ /* REG_EVEX_MAP4_FF */ ++ { ++ { "%NFincQ", { VexGv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%NFdecQ", { VexGv, Ev }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { VEX_W_TABLE (EVEX_W_MAP4_FF_R_6) }, ++ }, +diff --git a/opcodes/i386-dis-evex-w.h b/opcodes/i386-dis-evex-w.h +--- a/opcodes/i386-dis-evex-w.h ++++ b/opcodes/i386-dis-evex-w.h +@@ -442,6 +442,24 @@ + { Bad_Opcode }, + { "vpshrdw", { XM, Vex, EXx, Ib }, 0 }, + }, ++ /* EVEX_W_MAP4_8F_R_0 */ ++ { ++ { "pop2", { { PUSH2_POP2_Fixup, q_mode}, Eq }, NO_PREFIX }, ++ { "pop2p", { { PUSH2_POP2_Fixup, q_mode}, Eq }, NO_PREFIX }, ++ }, ++ /* EVEX_W_MAP4_F8_P1_M_1 */ ++ { ++ { "uwrmsr", { Gq, Eq }, 0 }, ++ }, ++ /* EVEX_W_MAP4_F8_P3_M_1 */ ++ { ++ { "urdmsr", { Eq, Gq }, 0 }, ++ }, ++ /* EVEX_W_MAP4_FF_R_6 */ ++ { ++ { "push2", { { PUSH2_POP2_Fixup, q_mode}, Eq }, 0 }, ++ { "push2p", { { PUSH2_POP2_Fixup, q_mode}, Eq }, 0 }, ++ }, + /* EVEX_W_MAP5_5B_P_0 */ + { + { "vcvtdq2ph%XY", { XMxmmq, EXx, EXxEVexR }, 0 }, +diff --git a/opcodes/i386-dis-evex.h b/opcodes/i386-dis-evex.h +--- a/opcodes/i386-dis-evex.h ++++ b/opcodes/i386-dis-evex.h +@@ -164,10 +164,10 @@ static const struct dis386 evex_table[][256] = { + { Bad_Opcode }, + { Bad_Opcode }, + /* 90 */ +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, ++ { X86_64_EVEX_W_TABLE (VEX_W_0F90_L_0) }, ++ { X86_64_EVEX_W_TABLE (VEX_W_0F91_L_0) }, ++ { X86_64_EVEX_W_TABLE (VEX_W_0F92_L_0) }, ++ { X86_64_EVEX_W_TABLE (VEX_W_0F93_L_0) }, + { Bad_Opcode }, + { Bad_Opcode }, + { Bad_Opcode }, +@@ -375,9 +375,9 @@ static const struct dis386 evex_table[][256] = { + { "vpsllv%DQ", { XM, Vex, EXx }, PREFIX_DATA }, + /* 48 */ + { Bad_Opcode }, ++ { X86_64_EVEX_MEM_W_TABLE (VEX_W_0F3849_X86_64_L_0) }, + { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, ++ { X86_64_EVEX_MEM_W_TABLE (VEX_W_0F384B_X86_64_L_0) }, + { "vrcp14p%XW", { XM, EXx }, PREFIX_DATA }, + { "vrcp14s%XW", { XMScalar, VexScalar, EXdq }, PREFIX_DATA }, + { "vrsqrt14p%XW", { XM, EXx }, 0 }, +@@ -545,32 +545,32 @@ static const struct dis386 evex_table[][256] = { + { "%XEvaesdecY", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvaesdeclastY", { XM, Vex, EXx }, PREFIX_DATA }, + /* E0 */ +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E0) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E1) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E2) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E3) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E4) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E5) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E6) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E7) }, + /* E8 */ +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E8) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38E9) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38EA) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38EB) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38EC) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38ED) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38EE) }, ++ { X86_64_EVEX_FROM_VEX_TABLE (X86_64_VEX_0F38EF) }, + /* F0 */ + { Bad_Opcode }, + { Bad_Opcode }, ++ { X86_64_EVEX_PFX_TABLE (PREFIX_VEX_0F38F2_L_0) }, ++ { X86_64_EVEX_PFX_TABLE (PREFIX_VEX_0F38F3_L_0) }, + { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, +- { Bad_Opcode }, ++ { X86_64_EVEX_PFX_TABLE (PREFIX_VEX_0F38F5_L_0) }, ++ { X86_64_EVEX_PFX_TABLE (PREFIX_VEX_0F38F6_L_0) }, ++ { X86_64_EVEX_PFX_TABLE (PREFIX_VEX_0F38F7_L_0) }, + /* F8 */ + { Bad_Opcode }, + { Bad_Opcode }, +@@ -854,7 +854,7 @@ static const struct dis386 evex_table[][256] = { + { Bad_Opcode }, + { Bad_Opcode }, + /* F0 */ +- { Bad_Opcode }, ++ { X86_64_EVEX_PFX_TABLE (PREFIX_VEX_0F3AF0_L_0) }, + { Bad_Opcode }, + { Bad_Opcode }, + { Bad_Opcode }, +@@ -872,6 +872,297 @@ static const struct dis386 evex_table[][256] = { + { Bad_Opcode }, + { Bad_Opcode }, + }, ++ /* EVEX_MAP4_ */ ++ { ++ /* 00 */ ++ { "%NFaddB", { VexGb, Eb, Gb }, NO_PREFIX }, ++ { "%NFaddS", { VexGv, Ev, Gv }, PREFIX_NP_OR_DATA }, ++ { "%NFaddB", { VexGb, Gb, EbS }, NO_PREFIX }, ++ { "%NFaddS", { VexGv, Gv, EvS }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 08 */ ++ { "%NForB", { VexGb, Eb, Gb }, NO_PREFIX }, ++ { "%NForS", { VexGv, Ev, Gv }, PREFIX_NP_OR_DATA }, ++ { "%NForB", { VexGb, Gb, EbS }, NO_PREFIX }, ++ { "%NForS", { VexGv, Gv, EvS }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 10 */ ++ { "adcB", { VexGb, Eb, Gb }, NO_PREFIX }, ++ { "adcS", { VexGv, Ev, Gv }, PREFIX_NP_OR_DATA }, ++ { "adcB", { VexGb, Gb, EbS }, NO_PREFIX }, ++ { "adcS", { VexGv, Gv, EvS }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 18 */ ++ { "sbbB", { VexGb, Eb, Gb }, NO_PREFIX }, ++ { "sbbS", { VexGv, Ev, Gv }, PREFIX_NP_OR_DATA }, ++ { "sbbB", { VexGb, Gb, EbS }, NO_PREFIX }, ++ { "sbbS", { VexGv, Gv, EvS }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 20 */ ++ { "%NFandB", { VexGb, Eb, Gb }, NO_PREFIX }, ++ { "%NFandS", { VexGv, Ev, Gv }, PREFIX_NP_OR_DATA }, ++ { "%NFandB", { VexGb, Gb, EbS }, NO_PREFIX }, ++ { "%NFandS", { VexGv, Gv, EvS }, PREFIX_NP_OR_DATA }, ++ { "%NFshldS", { VexGv, Ev, Gv, Ib }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 28 */ ++ { "%NFsubB", { VexGb, Eb, Gb }, NO_PREFIX }, ++ { "%NFsubS", { VexGv, Ev, Gv }, PREFIX_NP_OR_DATA }, ++ { "%NFsubB", { VexGb, Gb, EbS }, NO_PREFIX }, ++ { "%NFsubS", { VexGv, Gv, EvS }, PREFIX_NP_OR_DATA }, ++ { "%NFshrdS", { VexGv, Ev, Gv, Ib }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 30 */ ++ { "%NFxorB", { VexGb, Eb, Gb }, NO_PREFIX }, ++ { "%NFxorS", { VexGv, Ev, Gv }, PREFIX_NP_OR_DATA }, ++ { "%NFxorB", { VexGb, Gb, EbS }, NO_PREFIX }, ++ { "%NFxorS", { VexGv, Gv, EvS }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 38 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 40 */ ++ { "%CFcmovoS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovnoS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovbS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovaeS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmoveS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovneS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovbeS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovaS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ /* 48 */ ++ { "%CFcmovsS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovnsS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovpS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovnpS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovlS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovgeS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovleS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%CFcmovgS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ /* 50 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 58 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 60 */ ++ { "%MEmovbeS", { Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%MEmovbeS", { Ev, Gv }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { "wrussK", { M, Gdq }, PREFIX_DATA }, ++ { PREFIX_TABLE (PREFIX_0F38F6) }, ++ { Bad_Opcode }, ++ /* 68 */ ++ { Bad_Opcode }, ++ { "%NFimulS", { Gv, Ev, Iv }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { "%NFimulS", { Gv, Ev, sIb }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 70 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 78 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 80 */ ++ { REG_TABLE (REG_EVEX_MAP4_80) }, ++ { REG_TABLE (REG_EVEX_MAP4_81) }, ++ { Bad_Opcode }, ++ { REG_TABLE (REG_EVEX_MAP4_83) }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 88 */ ++ { "%NFpopcntS", { Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { REG_TABLE (REG_EVEX_MAP4_8F) }, ++ /* 90 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* 98 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* A0 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { "%NFshldS", { VexGv, Ev, Gv, CL }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* A8 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { "%NFshrdS", { VexGv, Ev, Gv, CL }, PREFIX_NP_OR_DATA }, ++ { Bad_Opcode }, ++ { "%NFimulS", { VexGv, Gv, Ev }, PREFIX_NP_OR_DATA }, ++ /* B0 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* B8 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* C0 */ ++ { REG_TABLE (REG_C0) }, ++ { REG_TABLE (REG_C1) }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* C8 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* D0 */ ++ { REG_TABLE (REG_D0) }, ++ { REG_TABLE (REG_D1) }, ++ { REG_TABLE (REG_D2) }, ++ { REG_TABLE (REG_D3) }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* D8 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* E0 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* E8 */ ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ /* F0 */ ++ { PREFIX_TABLE (PREFIX_EVEX_MAP4_F0) }, ++ { PREFIX_TABLE (PREFIX_EVEX_MAP4_F1) }, ++ { PREFIX_TABLE (PREFIX_EVEX_MAP4_F2) }, ++ { Bad_Opcode }, ++ { "%NFtzcntS", { Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { "%NFlzcntS", { Gv, Ev }, PREFIX_NP_OR_DATA }, ++ { REG_TABLE (REG_EVEX_MAP4_F6) }, ++ { REG_TABLE (REG_EVEX_MAP4_F7) }, ++ /* F8 */ ++ { PREFIX_TABLE (PREFIX_EVEX_MAP4_F8) }, ++ { "movdiri", { Mdq, Gdq }, NO_PREFIX }, ++ { Bad_Opcode }, ++ { Bad_Opcode }, ++ { PREFIX_TABLE (PREFIX_0F38FC) }, ++ { Bad_Opcode }, ++ { REG_TABLE (REG_EVEX_MAP4_FE) }, ++ { REG_TABLE (REG_EVEX_MAP4_FF) }, ++ }, + /* EVEX_MAP5_ */ + { + /* 00 */ +diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c +--- a/opcodes/i386-dis.c ++++ b/opcodes/i386-dis.c +@@ -1,5 +1,5 @@ + /* Print i386 instructions for GDB, the GNU debugger. +- Copyright (C) 1988-2023 Free Software Foundation, Inc. ++ Copyright (C) 1988-2024 Free Software Foundation, Inc. + + This file is part of the GNU opcodes library. + +@@ -105,6 +105,8 @@ static bool FXSAVE_Fixup (instr_info *, int, int); + static bool MOVSXD_Fixup (instr_info *, int, int); + static bool DistinctDest_Fixup (instr_info *, int, int); + static bool PREFETCHI_Fixup (instr_info *, int, int); ++static bool PUSH2_POP2_Fixup (instr_info *, int, int); ++static bool JMPABS_Fixup (instr_info *, int, int); + + static void ATTRIBUTE_PRINTF_3 i386_dis_printf (const disassemble_info *, + enum disassembler_style, +@@ -132,6 +134,13 @@ enum x86_64_isa + intel64 + }; + ++enum evex_type ++{ ++ evex_default = 0, ++ evex_from_legacy, ++ evex_from_vex, ++}; ++ + struct instr_info + { + enum address_mode address_mode; +@@ -144,6 +153,12 @@ struct instr_info + /* Bits of REX we've already used. */ + uint8_t rex_used; + ++ /* Record W R4 X4 B4 bits for rex2. */ ++ unsigned char rex2; ++ /* Bits of rex2 we've already used. */ ++ unsigned char rex2_used; ++ unsigned char rex2_payload; ++ + bool need_modrm; + unsigned char need_vex; + bool has_sib; +@@ -169,6 +184,7 @@ struct instr_info + signed char last_data_prefix; + signed char last_addr_prefix; + signed char last_rex_prefix; ++ signed char last_rex2_prefix; + signed char last_seg_prefix; + signed char fwait_prefix; + /* The active segment register prefix. */ +@@ -205,14 +221,19 @@ struct instr_info + int ll; + bool w; + bool evex; +- bool r; + bool v; + bool zeroing; + bool b; + bool no_broadcast; ++ bool nf; + } + vex; + ++/* For APX EVEX-promoted prefix, EVEX.ND shares the same bit as vex.b. */ ++#define nd b ++ ++ enum evex_type evex_type; ++ + /* Remember if the current op is a jump instruction. */ + bool op_is_jump; + +@@ -221,6 +242,9 @@ struct instr_info + /* Record whether EVEX masking is used incorrectly. */ + bool illegal_masking; + ++ /* Record whether the modrm byte has been skipped. */ ++ bool has_skipped_modrm; ++ + unsigned char op_ad; + signed char op_index[MAX_OPERANDS]; + bool op_riprel[MAX_OPERANDS]; +@@ -262,8 +286,13 @@ struct dis_private { + { \ + if (value) \ + { \ +- if ((ins->rex & value)) \ ++ if (ins->rex & value) \ + ins->rex_used |= (value) | REX_OPCODE; \ ++ if (ins->rex2 & value) \ ++ { \ ++ ins->rex2_used |= (value); \ ++ ins->rex_used |= REX_OPCODE; \ ++ } \ + } \ + else \ + ins->rex_used |= REX_OPCODE; \ +@@ -273,6 +302,10 @@ struct dis_private { + #define EVEX_b_used 1 + #define EVEX_len_used 2 + ++ ++/* {rex2} is not printed when the REX2_SPECIAL is set. */ ++#define REX2_SPECIAL 16 ++ + /* Flags stored in PREFIXES. */ + #define PREFIX_REPZ 1 + #define PREFIX_REPNZ 2 +@@ -286,6 +319,9 @@ struct dis_private { + #define PREFIX_DATA 0x200 + #define PREFIX_ADDR 0x400 + #define PREFIX_FWAIT 0x800 ++#define PREFIX_REX2 0x1000 ++#define PREFIX_NP_OR_DATA 0x2000 ++#define NO_PREFIX 0x4000 + + /* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive) + to ADDR (exclusive) are valid. Returns true for success, false +@@ -367,6 +403,7 @@ fetch_error (const instr_info *ins) + #define PREFIX_IGNORED_DATA (PREFIX_DATA << PREFIX_IGNORED_SHIFT) + #define PREFIX_IGNORED_ADDR (PREFIX_ADDR << PREFIX_IGNORED_SHIFT) + #define PREFIX_IGNORED_LOCK (PREFIX_LOCK << PREFIX_IGNORED_SHIFT) ++#define PREFIX_REX2_ILLEGAL (PREFIX_REX2 << PREFIX_IGNORED_SHIFT) + + /* Opcode prefixes. */ + #define PREFIX_OPCODE (PREFIX_REPZ \ +@@ -418,6 +455,7 @@ fetch_error (const instr_info *ins) + #define Gv { OP_G, v_mode } + #define Gd { OP_G, d_mode } + #define Gdq { OP_G, dq_mode } ++#define Gq { OP_G, q_mode } + #define Gm { OP_G, m_mode } + #define Gva { OP_G, va_mode } + #define Gw { OP_G, w_mode } +@@ -527,7 +565,8 @@ fetch_error (const instr_info *ins) + #define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode } + #define Rd { OP_R, d_mode } + #define Rdq { OP_R, dq_mode } +-#define Nq { OP_R, q_mode } ++#define Rq { OP_R, q_mode } ++#define Nq { OP_R, q_mm_mode } + #define Ux { OP_R, x_mode } + #define Uxmm { OP_R, xmm_mode } + #define Rxmmq { OP_R, xmmq_mode } +@@ -548,6 +587,8 @@ fetch_error (const instr_info *ins) + #define VexGatherD { OP_VEX, vex_vsib_d_w_dq_mode } + #define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode } + #define VexGdq { OP_VEX, dq_mode } ++#define VexGb { OP_VEX, b_mode } ++#define VexGv { OP_VEX, v_mode } + #define VexTmm { OP_VEX, tmm_mode } + #define XMVexI4 { OP_REG_VexI4, x_mode } + #define XMVexScalarI4 { OP_REG_VexI4, scalar_mode } +@@ -624,6 +665,8 @@ enum + d_swap_mode, + /* quad word operand */ + q_mode, ++ /* 8-byte MM operand */ ++ q_mm_mode, + /* quad word operand with operand swapped */ + q_swap_mode, + /* ten-byte operand */ +@@ -778,6 +821,10 @@ enum + USE_RM_TABLE, + USE_PREFIX_TABLE, + USE_X86_64_TABLE, ++ USE_X86_64_EVEX_FROM_VEX_TABLE, ++ USE_X86_64_EVEX_PFX_TABLE, ++ USE_X86_64_EVEX_W_TABLE, ++ USE_X86_64_EVEX_MEM_W_TABLE, + USE_3BYTE_TABLE, + USE_XOP_8F_TABLE, + USE_VEX_C4_TABLE, +@@ -796,6 +843,11 @@ enum + #define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I)) + #define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I)) + #define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I)) ++#define X86_64_EVEX_FROM_VEX_TABLE(I) \ ++ DIS386 (USE_X86_64_EVEX_FROM_VEX_TABLE, (I)) ++#define X86_64_EVEX_PFX_TABLE(I) DIS386 (USE_X86_64_EVEX_PFX_TABLE, (I)) ++#define X86_64_EVEX_W_TABLE(I) DIS386 (USE_X86_64_EVEX_W_TABLE, (I)) ++#define X86_64_EVEX_MEM_W_TABLE(I) DIS386 (USE_X86_64_EVEX_MEM_W_TABLE, (I)) + #define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I)) + #define XOP_8F_TABLE() DIS386 (USE_XOP_8F_TABLE, 0) + #define VEX_C4_TABLE() DIS386 (USE_VEX_C4_TABLE, 0) +@@ -844,7 +896,8 @@ enum + REG_VEX_0F73, + REG_VEX_0FAE, + REG_VEX_0F3849_X86_64_L_0_W_0_M_1_P_0, +- REG_VEX_0F38F3_L_0, ++ REG_VEX_0F38F3_L_0_P_0, ++ REG_VEX_MAP7_F8_L_0_W_0, + + REG_XOP_09_01_L_0, + REG_XOP_09_02_L_0, +@@ -855,7 +908,15 @@ enum + REG_EVEX_0F72, + REG_EVEX_0F73, + REG_EVEX_0F38C6_L_2, +- REG_EVEX_0F38C7_L_2 ++ REG_EVEX_0F38C7_L_2, ++ REG_EVEX_MAP4_80, ++ REG_EVEX_MAP4_81, ++ REG_EVEX_MAP4_83, ++ REG_EVEX_MAP4_8F, ++ REG_EVEX_MAP4_F6, ++ REG_EVEX_MAP4_F7, ++ REG_EVEX_MAP4_FE, ++ REG_EVEX_MAP4_FF, + }; + + enum +@@ -893,8 +954,12 @@ enum + MOD_0FC7_REG_6, + MOD_0FC7_REG_7, + MOD_0F38DC_PREFIX_1, ++ MOD_0F38F8, + + MOD_VEX_0F3849_X86_64_L_0_W_0, ++ ++ MOD_EVEX_MAP4_F8_P_1, ++ MOD_EVEX_MAP4_F8_P_3, + }; + + enum +@@ -1010,7 +1075,8 @@ enum + PREFIX_0F38F0, + PREFIX_0F38F1, + PREFIX_0F38F6, +- PREFIX_0F38F8, ++ PREFIX_0F38F8_M_0, ++ PREFIX_0F38F8_M_1_X86_64, + PREFIX_0F38FA, + PREFIX_0F38FB, + PREFIX_0F38FC, +@@ -1069,10 +1135,13 @@ enum + PREFIX_VEX_0F38CC, + PREFIX_VEX_0F38CD, + PREFIX_VEX_0F38DA_W_0, ++ PREFIX_VEX_0F38F2_L_0, ++ PREFIX_VEX_0F38F3_L_0, + PREFIX_VEX_0F38F5_L_0, + PREFIX_VEX_0F38F6_L_0, + PREFIX_VEX_0F38F7_L_0, + PREFIX_VEX_0F3AF0_L_0, ++ PREFIX_VEX_MAP7_F8_L_0_W_0_R_0_X86_64, + + PREFIX_EVEX_0F5B, + PREFIX_EVEX_0F6F, +@@ -1130,6 +1199,11 @@ enum + PREFIX_EVEX_0F3A67, + PREFIX_EVEX_0F3AC2, + ++ PREFIX_EVEX_MAP4_F0, ++ PREFIX_EVEX_MAP4_F1, ++ PREFIX_EVEX_MAP4_F2, ++ PREFIX_EVEX_MAP4_F8, ++ + PREFIX_EVEX_MAP5_10, + PREFIX_EVEX_MAP5_11, + PREFIX_EVEX_MAP5_1D, +@@ -1217,6 +1291,7 @@ enum + X86_64_0F18_REG_7_MOD_0, + X86_64_0F24, + X86_64_0F26, ++ X86_64_0F38F8_M_1, + X86_64_0FC7_REG_6_MOD_3_PREFIX_1, + + X86_64_VEX_0F3849, +@@ -1240,6 +1315,8 @@ enum + X86_64_VEX_0F38ED, + X86_64_VEX_0F38EE, + X86_64_VEX_0F38EF, ++ ++ X86_64_VEX_MAP7_F8_L_0_W_0_R_0, + }; + + enum +@@ -1259,7 +1336,8 @@ enum + { + VEX_0F = 0, + VEX_0F38, +- VEX_0F3A ++ VEX_0F3A, ++ VEX_MAP7, + }; + + enum +@@ -1267,8 +1345,10 @@ enum + EVEX_0F = 0, + EVEX_0F38, + EVEX_0F3A, ++ EVEX_MAP4, + EVEX_MAP5, + EVEX_MAP6, ++ EVEX_MAP7, + }; + + enum +@@ -1350,6 +1430,7 @@ enum + VEX_LEN_0F3ADE_W_0, + VEX_LEN_0F3ADF, + VEX_LEN_0F3AF0, ++ VEX_LEN_MAP7_F8, + VEX_LEN_XOP_08_85, + VEX_LEN_XOP_08_86, + VEX_LEN_XOP_08_87, +@@ -1510,6 +1591,7 @@ enum + VEX_W_0F3ACE, + VEX_W_0F3ACF, + VEX_W_0F3ADE, ++ VEX_W_MAP7_F8_L_0, + + VEX_W_XOP_08_85_L_0, + VEX_W_XOP_08_86_L_0, +@@ -1656,6 +1738,11 @@ enum + EVEX_W_0F3A70, + EVEX_W_0F3A72, + ++ EVEX_W_MAP4_8F_R_0, ++ EVEX_W_MAP4_F8_P1_M_1, ++ EVEX_W_MAP4_F8_P3_M_1, ++ EVEX_W_MAP4_FF_R_6, ++ + EVEX_W_MAP5_5B_P_0, + EVEX_W_MAP5_7A_P_3, + }; +@@ -1673,7 +1760,7 @@ struct dis386 { + }; + + /* Upper case letters in the instruction names here are macros. +- 'A' => print 'b' if no register operands or suffix_always is true ++ 'A' => print 'b' if no (suitable) register operand or suffix_always is true + 'B' => print 'b' if suffix_always is true + 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand + size prefix +@@ -1686,14 +1773,14 @@ struct dis386 { + 'I' unused. + 'J' unused. + 'K' => print 'd' or 'q' if rex prefix is present. +- 'L' unused. ++ 'L' => print 'l' or 'q' if suffix_always is true + 'M' => print 'r' if intel_mnemonic is false. + 'N' => print 'n' if instruction has no wait "prefix" + 'O' => print 'd' or 'o' (or 'q' in Intel mode) + 'P' => behave as 'T' except with register operand outside of suffix_always + mode +- 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always +- is true ++ 'Q' => print 'w', 'l' or 'q' if no (suitable) register operand or ++ suffix_always is true + 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode) + 'S' => print 'w', 'l' or 'q' if suffix_always is true + 'T' => print 'w', 'l'/'d', or 'q' if instruction has an operand size +@@ -1724,6 +1811,11 @@ struct dis386 { + "XV" => print "{vex} " pseudo prefix + "XE" => print "{evex} " pseudo prefix if no EVEX-specific functionality is + is used by an EVEX-encoded (AVX512VL) instruction. ++ "ME" => print "{evex} " pseudo prefix for ins->modrm.mod != 3,if no ++ EVEX-specific functionality is used by an EVEX-encoded (AVX512VL) ++ instruction. ++ "NF" => print "{nf} " pseudo prefix when EVEX.NF = 1 and print "{evex} " ++ pseudo prefix when instructions without NF, EGPR and VVVV, + "YK" keep unused, to avoid ambiguity with the combined use of Y and K. + "YX" keep unused, to avoid ambiguity with the combined use of Y and X. + "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand, cond +@@ -1836,23 +1928,23 @@ static const struct dis386 dis386[] = { + { "dec{S|}", { RMeSI }, 0 }, + { "dec{S|}", { RMeDI }, 0 }, + /* 50 */ +- { "push{!P|}", { RMrAX }, 0 }, +- { "push{!P|}", { RMrCX }, 0 }, +- { "push{!P|}", { RMrDX }, 0 }, +- { "push{!P|}", { RMrBX }, 0 }, +- { "push{!P|}", { RMrSP }, 0 }, +- { "push{!P|}", { RMrBP }, 0 }, +- { "push{!P|}", { RMrSI }, 0 }, +- { "push{!P|}", { RMrDI }, 0 }, ++ { "push!P", { RMrAX }, 0 }, ++ { "push!P", { RMrCX }, 0 }, ++ { "push!P", { RMrDX }, 0 }, ++ { "push!P", { RMrBX }, 0 }, ++ { "push!P", { RMrSP }, 0 }, ++ { "push!P", { RMrBP }, 0 }, ++ { "push!P", { RMrSI }, 0 }, ++ { "push!P", { RMrDI }, 0 }, + /* 58 */ +- { "pop{!P|}", { RMrAX }, 0 }, +- { "pop{!P|}", { RMrCX }, 0 }, +- { "pop{!P|}", { RMrDX }, 0 }, +- { "pop{!P|}", { RMrBX }, 0 }, +- { "pop{!P|}", { RMrSP }, 0 }, +- { "pop{!P|}", { RMrBP }, 0 }, +- { "pop{!P|}", { RMrSI }, 0 }, +- { "pop{!P|}", { RMrDI }, 0 }, ++ { "pop!P", { RMrAX }, 0 }, ++ { "pop!P", { RMrCX }, 0 }, ++ { "pop!P", { RMrDX }, 0 }, ++ { "pop!P", { RMrBX }, 0 }, ++ { "pop!P", { RMrSP }, 0 }, ++ { "pop!P", { RMrBP }, 0 }, ++ { "pop!P", { RMrSI }, 0 }, ++ { "pop!P", { RMrDI }, 0 }, + /* 60 */ + { X86_64_TABLE (X86_64_60) }, + { X86_64_TABLE (X86_64_61) }, +@@ -1872,23 +1964,23 @@ static const struct dis386 dis386[] = { + { "outs{b|}", { indirDXr, Xb }, 0 }, + { X86_64_TABLE (X86_64_6F) }, + /* 70 */ +- { "joH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jnoH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jbH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jaeH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jeH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jneH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jbeH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jaH", { Jb, BND, cond_jump_flag }, 0 }, ++ { "joH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jnoH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jbH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jaeH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jeH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jneH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jbeH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jaH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, + /* 78 */ +- { "jsH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jnsH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jpH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jnpH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jlH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jgeH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jleH", { Jb, BND, cond_jump_flag }, 0 }, +- { "jgH", { Jb, BND, cond_jump_flag }, 0 }, ++ { "jsH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jnsH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jpH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jnpH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jlH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jgeH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jleH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jgH", { Jb, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, + /* 80 */ + { REG_TABLE (REG_80) }, + { REG_TABLE (REG_81) }, +@@ -1926,23 +2018,23 @@ static const struct dis386 dis386[] = { + { "sahf", { XX }, 0 }, + { "lahf", { XX }, 0 }, + /* a0 */ +- { "mov%LB", { AL, Ob }, 0 }, +- { "mov%LS", { eAX, Ov }, 0 }, +- { "mov%LB", { Ob, AL }, 0 }, +- { "mov%LS", { Ov, eAX }, 0 }, +- { "movs{b|}", { Ybr, Xb }, 0 }, +- { "movs{R|}", { Yvr, Xv }, 0 }, +- { "cmps{b|}", { Xb, Yb }, 0 }, +- { "cmps{R|}", { Xv, Yv }, 0 }, ++ { "mov%LB", { AL, Ob }, PREFIX_REX2_ILLEGAL }, ++ { "mov%LS", { { JMPABS_Fixup, eAX_reg }, { JMPABS_Fixup, v_mode } }, PREFIX_REX2_ILLEGAL }, ++ { "mov%LB", { Ob, AL }, PREFIX_REX2_ILLEGAL }, ++ { "mov%LS", { Ov, eAX }, PREFIX_REX2_ILLEGAL }, ++ { "movs{b|}", { Ybr, Xb }, PREFIX_REX2_ILLEGAL }, ++ { "movs{R|}", { Yvr, Xv }, PREFIX_REX2_ILLEGAL }, ++ { "cmps{b|}", { Xb, Yb }, PREFIX_REX2_ILLEGAL }, ++ { "cmps{R|}", { Xv, Yv }, PREFIX_REX2_ILLEGAL }, + /* a8 */ +- { "testB", { AL, Ib }, 0 }, +- { "testS", { eAX, Iv }, 0 }, +- { "stosB", { Ybr, AL }, 0 }, +- { "stosS", { Yvr, eAX }, 0 }, +- { "lodsB", { ALr, Xb }, 0 }, +- { "lodsS", { eAXr, Xv }, 0 }, +- { "scasB", { AL, Yb }, 0 }, +- { "scasS", { eAX, Yv }, 0 }, ++ { "testB", { AL, Ib }, PREFIX_REX2_ILLEGAL }, ++ { "testS", { eAX, Iv }, PREFIX_REX2_ILLEGAL }, ++ { "stosB", { Ybr, AL }, PREFIX_REX2_ILLEGAL }, ++ { "stosS", { Yvr, eAX }, PREFIX_REX2_ILLEGAL }, ++ { "lodsB", { ALr, Xb }, PREFIX_REX2_ILLEGAL }, ++ { "lodsS", { eAXr, Xv }, PREFIX_REX2_ILLEGAL }, ++ { "scasB", { AL, Yb }, PREFIX_REX2_ILLEGAL }, ++ { "scasS", { eAX, Yv }, PREFIX_REX2_ILLEGAL }, + /* b0 */ + { "movB", { RMAL, Ib }, 0 }, + { "movB", { RMCL, Ib }, 0 }, +@@ -1998,23 +2090,23 @@ static const struct dis386 dis386[] = { + { FLOAT }, + { FLOAT }, + /* e0 */ +- { "loopneFH", { Jb, XX, loop_jcxz_flag }, 0 }, +- { "loopeFH", { Jb, XX, loop_jcxz_flag }, 0 }, +- { "loopFH", { Jb, XX, loop_jcxz_flag }, 0 }, +- { "jEcxzH", { Jb, XX, loop_jcxz_flag }, 0 }, +- { "inB", { AL, Ib }, 0 }, +- { "inG", { zAX, Ib }, 0 }, +- { "outB", { Ib, AL }, 0 }, +- { "outG", { Ib, zAX }, 0 }, ++ { "loopneFH", { Jb, XX, loop_jcxz_flag }, PREFIX_REX2_ILLEGAL }, ++ { "loopeFH", { Jb, XX, loop_jcxz_flag }, PREFIX_REX2_ILLEGAL }, ++ { "loopFH", { Jb, XX, loop_jcxz_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jEcxzH", { Jb, XX, loop_jcxz_flag }, PREFIX_REX2_ILLEGAL }, ++ { "inB", { AL, Ib }, PREFIX_REX2_ILLEGAL }, ++ { "inG", { zAX, Ib }, PREFIX_REX2_ILLEGAL }, ++ { "outB", { Ib, AL }, PREFIX_REX2_ILLEGAL }, ++ { "outG", { Ib, zAX }, PREFIX_REX2_ILLEGAL }, + /* e8 */ + { X86_64_TABLE (X86_64_E8) }, + { X86_64_TABLE (X86_64_E9) }, + { X86_64_TABLE (X86_64_EA) }, +- { "jmp", { Jb, BND }, 0 }, +- { "inB", { AL, indirDX }, 0 }, +- { "inG", { zAX, indirDX }, 0 }, +- { "outB", { indirDX, AL }, 0 }, +- { "outG", { indirDX, zAX }, 0 }, ++ { "jmp", { Jb, BND }, PREFIX_REX2_ILLEGAL }, ++ { "inB", { AL, indirDX }, PREFIX_REX2_ILLEGAL }, ++ { "inG", { zAX, indirDX }, PREFIX_REX2_ILLEGAL }, ++ { "outB", { indirDX, AL }, PREFIX_REX2_ILLEGAL }, ++ { "outG", { indirDX, zAX }, PREFIX_REX2_ILLEGAL }, + /* f0 */ + { Bad_Opcode }, /* lock prefix */ + { "int1", { XX }, 0 }, +@@ -2091,12 +2183,12 @@ static const struct dis386 dis386_twobyte[] = { + { PREFIX_TABLE (PREFIX_0F2E) }, + { PREFIX_TABLE (PREFIX_0F2F) }, + /* 30 */ +- { "wrmsr", { XX }, 0 }, +- { "rdtsc", { XX }, 0 }, +- { "rdmsr", { XX }, 0 }, +- { "rdpmc", { XX }, 0 }, +- { "sysenter", { SEP }, 0 }, +- { "sysexit%LQ", { SEP }, 0 }, ++ { "wrmsr", { XX }, PREFIX_REX2_ILLEGAL }, ++ { "rdtsc", { XX }, PREFIX_REX2_ILLEGAL }, ++ { "rdmsr", { XX }, PREFIX_REX2_ILLEGAL }, ++ { "rdpmc", { XX }, PREFIX_REX2_ILLEGAL }, ++ { "sysenter", { SEP }, PREFIX_REX2_ILLEGAL }, ++ { "sysexit%LQ", { SEP }, PREFIX_REX2_ILLEGAL }, + { Bad_Opcode }, + { "getsec", { XX }, 0 }, + /* 38 */ +@@ -2181,23 +2273,23 @@ static const struct dis386 dis386_twobyte[] = { + { PREFIX_TABLE (PREFIX_0F7E) }, + { PREFIX_TABLE (PREFIX_0F7F) }, + /* 80 */ +- { "joH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jnoH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jbH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jaeH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jeH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jneH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jbeH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jaH", { Jv, BND, cond_jump_flag }, 0 }, ++ { "joH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jnoH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jbH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jaeH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jeH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jneH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jbeH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jaH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, + /* 88 */ +- { "jsH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jnsH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jpH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jnpH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jlH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jgeH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jleH", { Jv, BND, cond_jump_flag }, 0 }, +- { "jgH", { Jv, BND, cond_jump_flag }, 0 }, ++ { "jsH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jnsH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jpH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jnpH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jlH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jgeH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jleH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, ++ { "jgH", { Jv, BND, cond_jump_flag }, PREFIX_REX2_ILLEGAL }, + /* 90 */ + { "seto", { Eb }, 0 }, + { "setno", { Eb }, 0 }, +@@ -2390,22 +2482,30 @@ static const char intel_index16[][6] = { + + static const char att_names64[][8] = { + "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi", +- "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" ++ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", ++ "%r16", "%r17", "%r18", "%r19", "%r20", "%r21", "%r22", "%r23", ++ "%r24", "%r25", "%r26", "%r27", "%r28", "%r29", "%r30", "%r31", + }; + static const char att_names32[][8] = { + "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi", +- "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d" ++ "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d", ++ "%r16d", "%r17d", "%r18d", "%r19d", "%r20d", "%r21d", "%r22d", "%r23d", ++ "%r24d", "%r25d", "%r26d", "%r27d", "%r28d", "%r29d", "%r30d", "%r31d", + }; + static const char att_names16[][8] = { + "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di", +- "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w" ++ "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w", ++ "%r16w", "%r17w", "%r18w", "%r19w", "%r20w", "%r21w", "%r22w", "%r23w", ++ "%r24w", "%r25w", "%r26w", "%r27w", "%r28w", "%r29w", "%r30w", "%r31w", + }; + static const char att_names8[][8] = { + "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh", + }; + static const char att_names8rex[][8] = { + "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil", +- "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b" ++ "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b", ++ "%r16b", "%r17b", "%r18b", "%r19b", "%r20b", "%r21b", "%r22b", "%r23b", ++ "%r24b", "%r25b", "%r26b", "%r27b", "%r28b", "%r29b", "%r30b", "%r31b", + }; + static const char att_names_seg[][4] = { + "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?", +@@ -2520,25 +2620,25 @@ static const struct dis386 reg_table[][8] = { + }, + /* REG_C0 */ + { +- { "rolA", { Eb, Ib }, 0 }, +- { "rorA", { Eb, Ib }, 0 }, +- { "rclA", { Eb, Ib }, 0 }, +- { "rcrA", { Eb, Ib }, 0 }, +- { "shlA", { Eb, Ib }, 0 }, +- { "shrA", { Eb, Ib }, 0 }, +- { "shlA", { Eb, Ib }, 0 }, +- { "sarA", { Eb, Ib }, 0 }, ++ { "%NFrolA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NFrorA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "rclA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "rcrA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NFshlA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NFshrA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NFshlA", { VexGb, Eb, Ib }, NO_PREFIX }, ++ { "%NFsarA", { VexGb, Eb, Ib }, NO_PREFIX }, + }, + /* REG_C1 */ + { +- { "rolQ", { Ev, Ib }, 0 }, +- { "rorQ", { Ev, Ib }, 0 }, +- { "rclQ", { Ev, Ib }, 0 }, +- { "rcrQ", { Ev, Ib }, 0 }, +- { "shlQ", { Ev, Ib }, 0 }, +- { "shrQ", { Ev, Ib }, 0 }, +- { "shlQ", { Ev, Ib }, 0 }, +- { "sarQ", { Ev, Ib }, 0 }, ++ { "%NFrolQ", { VexGv, Ev, Ib }, PREFIX_NP_OR_DATA }, ++ { "%NFrorQ", { VexGv, Ev, Ib }, PREFIX_NP_OR_DATA }, ++ { "rclQ", { VexGv, Ev, Ib }, PREFIX_NP_OR_DATA }, ++ { "rcrQ", { VexGv, Ev, Ib }, PREFIX_NP_OR_DATA }, ++ { "%NFshlQ", { VexGv, Ev, Ib }, PREFIX_NP_OR_DATA }, ++ { "%NFshrQ", { VexGv, Ev, Ib }, PREFIX_NP_OR_DATA }, ++ { "%NFshlQ", { VexGv, Ev, Ib }, PREFIX_NP_OR_DATA }, ++ { "%NFsarQ", { VexGv, Ev, Ib }, PREFIX_NP_OR_DATA }, + }, + /* REG_C6 */ + { +@@ -2564,47 +2664,47 @@ static const struct dis386 reg_table[][8] = { + }, + /* REG_D0 */ + { +- { "rolA", { Eb, I1 }, 0 }, +- { "rorA", { Eb, I1 }, 0 }, +- { "rclA", { Eb, I1 }, 0 }, +- { "rcrA", { Eb, I1 }, 0 }, +- { "shlA", { Eb, I1 }, 0 }, +- { "shrA", { Eb, I1 }, 0 }, +- { "shlA", { Eb, I1 }, 0 }, +- { "sarA", { Eb, I1 }, 0 }, ++ { "%NFrolA", { VexGb, Eb, I1 }, NO_PREFIX }, ++ { "%NFrorA", { VexGb, Eb, I1 }, NO_PREFIX }, ++ { "rclA", { VexGb, Eb, I1 }, NO_PREFIX }, ++ { "rcrA", { VexGb, Eb, I1 }, NO_PREFIX }, ++ { "%NFshlA", { VexGb, Eb, I1 }, NO_PREFIX }, ++ { "%NFshrA", { VexGb, Eb, I1 }, NO_PREFIX }, ++ { "%NFshlA", { VexGb, Eb, I1 }, NO_PREFIX }, ++ { "%NFsarA", { VexGb, Eb, I1 }, NO_PREFIX }, + }, + /* REG_D1 */ + { +- { "rolQ", { Ev, I1 }, 0 }, +- { "rorQ", { Ev, I1 }, 0 }, +- { "rclQ", { Ev, I1 }, 0 }, +- { "rcrQ", { Ev, I1 }, 0 }, +- { "shlQ", { Ev, I1 }, 0 }, +- { "shrQ", { Ev, I1 }, 0 }, +- { "shlQ", { Ev, I1 }, 0 }, +- { "sarQ", { Ev, I1 }, 0 }, ++ { "%NFrolQ", { VexGv, Ev, I1 }, PREFIX_NP_OR_DATA }, ++ { "%NFrorQ", { VexGv, Ev, I1 }, PREFIX_NP_OR_DATA }, ++ { "rclQ", { VexGv, Ev, I1 }, PREFIX_NP_OR_DATA }, ++ { "rcrQ", { VexGv, Ev, I1 }, PREFIX_NP_OR_DATA }, ++ { "%NFshlQ", { VexGv, Ev, I1 }, PREFIX_NP_OR_DATA }, ++ { "%NFshrQ", { VexGv, Ev, I1 }, PREFIX_NP_OR_DATA }, ++ { "%NFshlQ", { VexGv, Ev, I1 }, PREFIX_NP_OR_DATA }, ++ { "%NFsarQ", { VexGv, Ev, I1 }, PREFIX_NP_OR_DATA }, + }, + /* REG_D2 */ + { +- { "rolA", { Eb, CL }, 0 }, +- { "rorA", { Eb, CL }, 0 }, +- { "rclA", { Eb, CL }, 0 }, +- { "rcrA", { Eb, CL }, 0 }, +- { "shlA", { Eb, CL }, 0 }, +- { "shrA", { Eb, CL }, 0 }, +- { "shlA", { Eb, CL }, 0 }, +- { "sarA", { Eb, CL }, 0 }, ++ { "%NFrolA", { VexGb, Eb, CL }, NO_PREFIX }, ++ { "%NFrorA", { VexGb, Eb, CL }, NO_PREFIX }, ++ { "rclA", { VexGb, Eb, CL }, NO_PREFIX }, ++ { "rcrA", { VexGb, Eb, CL }, NO_PREFIX }, ++ { "%NFshlA", { VexGb, Eb, CL }, NO_PREFIX }, ++ { "%NFshrA", { VexGb, Eb, CL }, NO_PREFIX }, ++ { "%NFshlA", { VexGb, Eb, CL }, NO_PREFIX }, ++ { "%NFsarA", { VexGb, Eb, CL }, NO_PREFIX }, + }, + /* REG_D3 */ + { +- { "rolQ", { Ev, CL }, 0 }, +- { "rorQ", { Ev, CL }, 0 }, +- { "rclQ", { Ev, CL }, 0 }, +- { "rcrQ", { Ev, CL }, 0 }, +- { "shlQ", { Ev, CL }, 0 }, +- { "shrQ", { Ev, CL }, 0 }, +- { "shlQ", { Ev, CL }, 0 }, +- { "sarQ", { Ev, CL }, 0 }, ++ { "%NFrolQ", { VexGv, Ev, CL }, PREFIX_NP_OR_DATA }, ++ { "%NFrorQ", { VexGv, Ev, CL }, PREFIX_NP_OR_DATA }, ++ { "rclQ", { VexGv, Ev, CL }, PREFIX_NP_OR_DATA }, ++ { "rcrQ", { VexGv, Ev, CL }, PREFIX_NP_OR_DATA }, ++ { "%NFshlQ", { VexGv, Ev, CL }, PREFIX_NP_OR_DATA }, ++ { "%NFshrQ", { VexGv, Ev, CL }, PREFIX_NP_OR_DATA }, ++ { "%NFshlQ", { VexGv, Ev, CL }, PREFIX_NP_OR_DATA }, ++ { "%NFsarQ", { VexGv, Ev, CL }, PREFIX_NP_OR_DATA }, + }, + /* REG_F6 */ + { +@@ -2794,9 +2894,9 @@ static const struct dis386 reg_table[][8] = { + { Bad_Opcode }, + { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } }, 0 }, + { Bad_Opcode }, +- { "xrstors", { FXSAVE }, 0 }, +- { "xsavec", { FXSAVE }, 0 }, +- { "xsaves", { FXSAVE }, 0 }, ++ { "xrstors", { FXSAVE }, PREFIX_REX2_ILLEGAL }, ++ { "xsavec", { FXSAVE }, PREFIX_REX2_ILLEGAL }, ++ { "xsaves", { FXSAVE }, PREFIX_REX2_ILLEGAL }, + { MOD_TABLE (MOD_0FC7_REG_6) }, + { MOD_TABLE (MOD_0FC7_REG_7) }, + }, +@@ -2842,12 +2942,16 @@ static const struct dis386 reg_table[][8] = { + { + { RM_TABLE (RM_VEX_0F3849_X86_64_L_0_W_0_M_1_P_0_R_0) }, + }, +- /* REG_VEX_0F38F3_L_0 */ ++ /* REG_VEX_0F38F3_L_0_P_0 */ + { + { Bad_Opcode }, +- { "blsrS", { VexGdq, Edq }, PREFIX_OPCODE }, +- { "blsmskS", { VexGdq, Edq }, PREFIX_OPCODE }, +- { "blsiS", { VexGdq, Edq }, PREFIX_OPCODE }, ++ { "%NFblsrS", { VexGdq, Edq }, 0 }, ++ { "%NFblsmskS", { VexGdq, Edq }, 0 }, ++ { "%NFblsiS", { VexGdq, Edq }, 0 }, ++ }, ++ /* REG_VEX_MAP7_F8_L_0_W_0 */ ++ { ++ { X86_64_TABLE (X86_64_VEX_MAP7_F8_L_0_W_0_R_0) }, + }, + /* REG_XOP_09_01_L_0 */ + { +@@ -3364,7 +3468,7 @@ static const struct dis386 prefix_table[][4] = { + + /* PREFIX_0FAE_REG_4_MOD_0 */ + { +- { "xsave", { FXSAVE }, 0 }, ++ { "xsave", { FXSAVE }, PREFIX_REX2_ILLEGAL }, + { "ptwrite{%LQ|}", { Edq }, 0 }, + }, + +@@ -3382,7 +3486,7 @@ static const struct dis386 prefix_table[][4] = { + + /* PREFIX_0FAE_REG_6_MOD_0 */ + { +- { "xsaveopt", { FXSAVE }, PREFIX_OPCODE }, ++ { "xsaveopt", { FXSAVE }, PREFIX_OPCODE | PREFIX_REX2_ILLEGAL }, + { "clrssbsy", { Mq }, PREFIX_OPCODE }, + { "clwb", { Mb }, PREFIX_OPCODE }, + }, +@@ -3550,18 +3654,27 @@ static const struct dis386 prefix_table[][4] = { + /* PREFIX_0F38F6 */ + { + { "wrssK", { M, Gdq }, 0 }, +- { "adoxS", { Gdq, Edq}, 0 }, +- { "adcxS", { Gdq, Edq}, 0 }, ++ { "adoxL", { VexGdq, Gdq, Edq }, 0 }, ++ { "adcxL", { VexGdq, Gdq, Edq }, 0 }, + { Bad_Opcode }, + }, + +- /* PREFIX_0F38F8 */ ++ /* PREFIX_0F38F8_M_0 */ + { + { Bad_Opcode }, + { "enqcmds", { Gva, M }, 0 }, + { "movdir64b", { Gva, M }, 0 }, + { "enqcmd", { Gva, M }, 0 }, + }, ++ ++ /* PREFIX_0F38F8_M_1_X86_64 */ ++ { ++ { Bad_Opcode }, ++ { "uwrmsr", { Gq, Rq }, 0 }, ++ { Bad_Opcode }, ++ { "urdmsr", { Rq, Gq }, 0 }, ++ }, ++ + /* PREFIX_0F38FA */ + { + { Bad_Opcode }, +@@ -3768,38 +3881,38 @@ static const struct dis386 prefix_table[][4] = { + + /* PREFIX_VEX_0F90_L_0_W_0 */ + { +- { "kmovw", { MaskG, MaskE }, 0 }, ++ { "%XEkmovw", { MaskG, MaskE }, 0 }, + { Bad_Opcode }, +- { "kmovb", { MaskG, MaskBDE }, 0 }, ++ { "%XEkmovb", { MaskG, MaskBDE }, 0 }, + }, + + /* PREFIX_VEX_0F90_L_0_W_1 */ + { +- { "kmovq", { MaskG, MaskE }, 0 }, ++ { "%XEkmovq", { MaskG, MaskE }, 0 }, + { Bad_Opcode }, +- { "kmovd", { MaskG, MaskBDE }, 0 }, ++ { "%XEkmovd", { MaskG, MaskBDE }, 0 }, + }, + + /* PREFIX_VEX_0F91_L_0_W_0 */ + { +- { "kmovw", { Mw, MaskG }, 0 }, ++ { "%XEkmovw", { Mw, MaskG }, 0 }, + { Bad_Opcode }, +- { "kmovb", { Mb, MaskG }, 0 }, ++ { "%XEkmovb", { Mb, MaskG }, 0 }, + }, + + /* PREFIX_VEX_0F91_L_0_W_1 */ + { +- { "kmovq", { Mq, MaskG }, 0 }, ++ { "%XEkmovq", { Mq, MaskG }, 0 }, + { Bad_Opcode }, +- { "kmovd", { Md, MaskG }, 0 }, ++ { "%XEkmovd", { Md, MaskG }, 0 }, + }, + + /* PREFIX_VEX_0F92_L_0_W_0 */ + { +- { "kmovw", { MaskG, Rdq }, 0 }, ++ { "%XEkmovw", { MaskG, Rdq }, 0 }, + { Bad_Opcode }, +- { "kmovb", { MaskG, Rdq }, 0 }, +- { "kmovd", { MaskG, Rdq }, 0 }, ++ { "%XEkmovb", { MaskG, Rdq }, 0 }, ++ { "%XEkmovd", { MaskG, Rdq }, 0 }, + }, + + /* PREFIX_VEX_0F92_L_0_W_1 */ +@@ -3807,15 +3920,15 @@ static const struct dis386 prefix_table[][4] = { + { Bad_Opcode }, + { Bad_Opcode }, + { Bad_Opcode }, +- { "kmovK", { MaskG, Rdq }, 0 }, ++ { "%XEkmovK", { MaskG, Rdq }, 0 }, + }, + + /* PREFIX_VEX_0F93_L_0_W_0 */ + { +- { "kmovw", { Gdq, MaskR }, 0 }, ++ { "%XEkmovw", { Gdq, MaskR }, 0 }, + { Bad_Opcode }, +- { "kmovb", { Gdq, MaskR }, 0 }, +- { "kmovd", { Gdq, MaskR }, 0 }, ++ { "%XEkmovb", { Gdq, MaskR }, 0 }, ++ { "%XEkmovd", { Gdq, MaskR }, 0 }, + }, + + /* PREFIX_VEX_0F93_L_0_W_1 */ +@@ -3823,7 +3936,7 @@ static const struct dis386 prefix_table[][4] = { + { Bad_Opcode }, + { Bad_Opcode }, + { Bad_Opcode }, +- { "kmovK", { Gdq, MaskR }, 0 }, ++ { "%XEkmovK", { Gdq, MaskR }, 0 }, + }, + + /* PREFIX_VEX_0F98_L_0_W_0 */ +@@ -3982,12 +4095,22 @@ static const struct dis386 prefix_table[][4] = { + { "vsm4rnds4", { XM, Vex, EXx }, 0 }, + }, + ++ /* PREFIX_VEX_0F38F2_L_0 */ ++ { ++ { "%NFandnS", { Gdq, VexGdq, Edq }, 0 }, ++ }, ++ ++ /* PREFIX_VEX_0F38F3_L_0 */ ++ { ++ { REG_TABLE (REG_VEX_0F38F3_L_0_P_0) }, ++ }, ++ + /* PREFIX_VEX_0F38F5_L_0 */ + { +- { "bzhiS", { Gdq, Edq, VexGdq }, 0 }, +- { "pextS", { Gdq, VexGdq, Edq }, 0 }, ++ { "%NFbzhiS", { Gdq, Edq, VexGdq }, 0 }, ++ { "%XEpextS", { Gdq, VexGdq, Edq }, 0 }, + { Bad_Opcode }, +- { "pdepS", { Gdq, VexGdq, Edq }, 0 }, ++ { "%XEpdepS", { Gdq, VexGdq, Edq }, 0 }, + }, + + /* PREFIX_VEX_0F38F6_L_0 */ +@@ -3995,15 +4118,15 @@ static const struct dis386 prefix_table[][4] = { + { Bad_Opcode }, + { Bad_Opcode }, + { Bad_Opcode }, +- { "mulxS", { Gdq, VexGdq, Edq }, 0 }, ++ { "%XEmulxS", { Gdq, VexGdq, Edq }, 0 }, + }, + + /* PREFIX_VEX_0F38F7_L_0 */ + { +- { "bextrS", { Gdq, Edq, VexGdq }, 0 }, +- { "sarxS", { Gdq, Edq, VexGdq }, 0 }, +- { "shlxS", { Gdq, Edq, VexGdq }, 0 }, +- { "shrxS", { Gdq, Edq, VexGdq }, 0 }, ++ { "%NFbextrS", { Gdq, Edq, VexGdq }, 0 }, ++ { "%XEsarxS", { Gdq, Edq, VexGdq }, 0 }, ++ { "%XEshlxS", { Gdq, Edq, VexGdq }, 0 }, ++ { "%XEshrxS", { Gdq, Edq, VexGdq }, 0 }, + }, + + /* PREFIX_VEX_0F3AF0_L_0 */ +@@ -4011,7 +4134,15 @@ static const struct dis386 prefix_table[][4] = { + { Bad_Opcode }, + { Bad_Opcode }, + { Bad_Opcode }, +- { "rorxS", { Gdq, Edq, Ib }, 0 }, ++ { "%XErorxS", { Gdq, Edq, Ib }, 0 }, ++ }, ++ ++ /* PREFIX_VEX_MAP7_F8_L_0_W_0_R_0_X86_64 */ ++ { ++ { Bad_Opcode }, ++ { "uwrmsr", { Skip_MODRM, Id, Rq }, 0 }, ++ { Bad_Opcode }, ++ { "urdmsr", { Rq, Id }, 0 }, + }, + + #include "i386-dis-evex-prefix.h" +@@ -4160,13 +4291,13 @@ static const struct dis386 x86_64_table[][2] = { + /* X86_64_E8 */ + { + { "callP", { Jv, BND }, 0 }, +- { "call@", { Jv, BND }, 0 } ++ { "call@", { Jv, BND }, PREFIX_REX2_ILLEGAL } + }, + + /* X86_64_E9 */ + { + { "jmpP", { Jv, BND }, 0 }, +- { "jmp@", { Jv, BND }, 0 } ++ { "jmp@", { Jv, BND }, PREFIX_REX2_ILLEGAL } + }, + + /* X86_64_EA */ +@@ -4322,6 +4453,12 @@ static const struct dis386 x86_64_table[][2] = { + { "movZ", { Td, Em }, 0 }, + }, + ++ { ++ /* X86_64_0F38F8_M_1 */ ++ { Bad_Opcode }, ++ { PREFIX_TABLE (PREFIX_0F38F8_M_1_X86_64) }, ++ }, ++ + /* X86_64_0FC7_REG_6_MOD_3_PREFIX_1 */ + { + { Bad_Opcode }, +@@ -4361,97 +4498,103 @@ static const struct dis386 x86_64_table[][2] = { + /* X86_64_VEX_0F38E0 */ + { + { Bad_Opcode }, +- { "cmpoxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpoxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E1 */ + { + { Bad_Opcode }, +- { "cmpnoxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpnoxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E2 */ + { + { Bad_Opcode }, +- { "cmpbxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpbxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E3 */ + { + { Bad_Opcode }, +- { "cmpnbxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpnbxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E4 */ + { + { Bad_Opcode }, +- { "cmpzxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpzxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E5 */ + { + { Bad_Opcode }, +- { "cmpnzxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpnzxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E6 */ + { + { Bad_Opcode }, +- { "cmpbexadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpbexadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E7 */ + { + { Bad_Opcode }, +- { "cmpnbexadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpnbexadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E8 */ + { + { Bad_Opcode }, +- { "cmpsxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpsxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38E9 */ + { + { Bad_Opcode }, +- { "cmpnsxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpnsxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38EA */ + { + { Bad_Opcode }, +- { "cmppxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmppxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38EB */ + { + { Bad_Opcode }, +- { "cmpnpxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpnpxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38EC */ + { + { Bad_Opcode }, +- { "cmplxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmplxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38ED */ + { + { Bad_Opcode }, +- { "cmpnlxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpnlxadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38EE */ + { + { Bad_Opcode }, +- { "cmplexadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmplexadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, + }, + + /* X86_64_VEX_0F38EF */ + { + { Bad_Opcode }, +- { "cmpnlexadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ { "%XEcmpnlexadd", { Mdq, Gdq, VexGdq }, PREFIX_DATA }, ++ }, ++ ++ /* X86_64_VEX_MAP7_F8_L_0_W_0_R_0 */ ++ { ++ { Bad_Opcode }, ++ { PREFIX_TABLE (PREFIX_VEX_MAP7_F8_L_0_W_0_R_0_X86_64) }, + }, + }; + +@@ -4739,7 +4882,7 @@ static const struct dis386 three_byte_table[][256] = { + { PREFIX_TABLE (PREFIX_0F38F6) }, + { Bad_Opcode }, + /* f8 */ +- { PREFIX_TABLE (PREFIX_0F38F8) }, ++ { MOD_TABLE (MOD_0F38F8) }, + { "movdiri", { Mdq, Gdq }, PREFIX_OPCODE }, + { PREFIX_TABLE (PREFIX_0F38FA) }, + { PREFIX_TABLE (PREFIX_0F38FB) }, +@@ -7039,12 +7182,12 @@ static const struct dis386 vex_len_table[][2] = { + + /* VEX_LEN_0F38F2 */ + { +- { "andnS", { Gdq, VexGdq, Edq }, PREFIX_OPCODE }, ++ { PREFIX_TABLE (PREFIX_VEX_0F38F2_L_0) }, + }, + + /* VEX_LEN_0F38F3 */ + { +- { REG_TABLE(REG_VEX_0F38F3_L_0) }, ++ { PREFIX_TABLE (PREFIX_VEX_0F38F3_L_0) }, + }, + + /* VEX_LEN_0F38F5 */ +@@ -7205,6 +7348,11 @@ static const struct dis386 vex_len_table[][2] = { + { PREFIX_TABLE (PREFIX_VEX_0F3AF0_L_0) }, + }, + ++ /* VEX_LEN_MAP7_F8 */ ++ { ++ { VEX_W_TABLE (VEX_W_MAP7_F8_L_0) }, ++ }, ++ + /* VEX_LEN_XOP_08_85 */ + { + { VEX_W_TABLE (VEX_W_XOP_08_85_L_0) }, +@@ -7811,6 +7959,10 @@ static const struct dis386 vex_w_table[][2] = { + /* VEX_W_0F3ADE */ + { VEX_LEN_TABLE (VEX_LEN_0F3ADE_W_0) }, + }, ++ { ++ /* VEX_W_MAP7_F8_L_0 */ ++ { REG_TABLE (REG_VEX_MAP7_F8_L_0_W_0) }, ++ }, + /* VEX_W_XOP_08_85_L_0 */ + { + { "vpmacssww", { XM, Vex, EXx, XMVexI4 }, 0 }, +@@ -8125,7 +8277,7 @@ static const struct dis386 mod_table[][2] = { + }, + { + /* MOD_0FAE_REG_5 */ +- { "xrstor", { FXSAVE }, PREFIX_OPCODE }, ++ { "xrstor", { FXSAVE }, PREFIX_OPCODE | PREFIX_REX2_ILLEGAL }, + { PREFIX_TABLE (PREFIX_0FAE_REG_5_MOD_3) }, + }, + { +@@ -8153,6 +8305,11 @@ static const struct dis386 mod_table[][2] = { + { "aesenc128kl", { XM, M }, 0 }, + { "loadiwkey", { XM, EXx }, 0 }, + }, ++ /* MOD_0F38F8 */ ++ { ++ { PREFIX_TABLE (PREFIX_0F38F8_M_0) }, ++ { X86_64_TABLE (X86_64_0F38F8_M_1) }, ++ }, + { + /* MOD_VEX_0F3849_X86_64_L_0_W_0 */ + { PREFIX_TABLE (PREFIX_VEX_0F3849_X86_64_L_0_W_0_M_0) }, +@@ -8323,6 +8480,24 @@ ckprefix (instr_info *ins) + return ckp_okay; + ins->last_rex_prefix = i; + break; ++ /* REX2 must be the last prefix. */ ++ case REX2_OPCODE: ++ if (ins->address_mode == mode_64bit) ++ { ++ if (ins->last_rex_prefix >= 0) ++ return ckp_bogus; ++ ++ ins->codep++; ++ if (!fetch_code (ins->info, ins->codep + 1)) ++ return ckp_fetch_error; ++ ins->rex2_payload = *ins->codep; ++ ins->rex2 = ins->rex2_payload >> 4; ++ ins->rex = (ins->rex2_payload & 0xf) | REX_OPCODE; ++ ins->codep++; ++ ins->last_rex2_prefix = i; ++ ins->all_prefixes[i] = REX2_OPCODE; ++ } ++ return ckp_okay; + case 0xf3: + ins->prefixes |= PREFIX_REPZ; + ins->last_repz_prefix = i; +@@ -8490,6 +8665,8 @@ prefix_name (enum address_mode mode, uint8_t pref, int sizeflag) + return "bnd"; + case NOTRACK_PREFIX: + return "notrack"; ++ case REX2_OPCODE: ++ return "rex2"; + default: + return NULL; + } +@@ -8507,10 +8684,10 @@ with the -M switch (multiple options should be separated by commas):\n")); + fprintf (stream, _(" i8086 Disassemble in 16bit mode\n")); + fprintf (stream, _(" att Display instruction in AT&T syntax\n")); + fprintf (stream, _(" intel Display instruction in Intel syntax\n")); +- fprintf (stream, _(" att-mnemonic\n" +- " Display instruction in AT&T mnemonic\n")); +- fprintf (stream, _(" intel-mnemonic\n" +- " Display instruction in Intel mnemonic\n")); ++ fprintf (stream, _(" att-mnemonic (AT&T syntax only)\n" ++ " Display instruction with AT&T mnemonic\n")); ++ fprintf (stream, _(" intel-mnemonic (AT&T syntax only)\n" ++ " Display instruction with Intel mnemonic\n")); + fprintf (stream, _(" addr64 Assume 64bit address size\n")); + fprintf (stream, _(" addr32 Assume 32bit address size\n")); + fprintf (stream, _(" addr16 Assume 16bit address size\n")); +@@ -8527,6 +8704,8 @@ static const struct dis386 bad_opcode = { "(bad)", { XX }, 0 }; + /* Fetch error indicator. */ + static const struct dis386 err_opcode = { NULL, { XX }, 0 }; + ++static const struct dis386 map7_f8_opcode = { VEX_LEN_TABLE (VEX_LEN_MAP7_F8) }; ++ + /* Get a pointer to struct dis386 with a valid name. */ + + static const struct dis386 * +@@ -8553,6 +8732,7 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + break; + + case USE_PREFIX_TABLE: ++ use_prefix_table: + if (ins->need_vex) + { + /* The prefix in VEX is implicit. */ +@@ -8622,12 +8802,40 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + dp = &prefix_table[dp->op[1].bytemode][vindex]; + break; + ++ case USE_X86_64_EVEX_FROM_VEX_TABLE: ++ case USE_X86_64_EVEX_PFX_TABLE: ++ case USE_X86_64_EVEX_W_TABLE: ++ case USE_X86_64_EVEX_MEM_W_TABLE: ++ ins->evex_type = evex_from_vex; ++ /* EVEX from VEX instructions are 64-bit only and require that EVEX.z, ++ EVEX.L'L, EVEX.b, and the lower 2 bits of EVEX.aaa must be 0. */ ++ if (ins->address_mode != mode_64bit ++ || (ins->vex.mask_register_specifier & 0x3) != 0 ++ || ins->vex.ll != 0 ++ || ins->vex.zeroing != 0 ++ || ins->vex.b) ++ return &bad_opcode; ++ ++ if (dp->op[0].bytemode == USE_X86_64_EVEX_PFX_TABLE) ++ goto use_prefix_table; ++ if (dp->op[0].bytemode == USE_X86_64_EVEX_W_TABLE) ++ goto use_vex_w_table; ++ if (dp->op[0].bytemode == USE_X86_64_EVEX_MEM_W_TABLE) ++ { ++ if (ins->modrm.mod == 3) ++ return &bad_opcode; ++ goto use_vex_w_table; ++ } ++ ++ /* Fall through. */ + case USE_X86_64_TABLE: + vindex = ins->address_mode == mode_64bit ? 1 : 0; + dp = &x86_64_table[dp->op[1].bytemode][vindex]; + break; + + case USE_3BYTE_TABLE: ++ if (ins->last_rex2_prefix >= 0) ++ return &err_opcode; + if (!fetch_code (ins->info, ins->codep + 2)) + return &err_opcode; + vindex = *ins->codep++; +@@ -8769,6 +8977,9 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + case 0x3: + vex_table_index = VEX_0F3A; + break; ++ case 0x7: ++ vex_table_index = VEX_MAP7; ++ break; + } + ins->codep++; + ins->vex.w = *ins->codep & 0x80; +@@ -8803,7 +9014,12 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + ins->need_vex = 3; + ins->codep++; + vindex = *ins->codep++; +- dp = &vex_table[vex_table_index][vindex]; ++ if (vex_table_index != VEX_MAP7) ++ dp = &vex_table[vex_table_index][vindex]; ++ else if (vindex == 0xf8) ++ dp = &map7_f8_opcode; ++ else ++ dp = &bad_opcode; + ins->end_codep = ins->codep; + /* There is no MODRM byte for VEX0F 77. */ + if ((vex_table_index != VEX_0F || vindex != 0x77) +@@ -8846,6 +9062,7 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + break; + + case USE_VEX_W_TABLE: ++ use_vex_w_table: + if (!ins->need_vex) + abort (); + +@@ -8859,9 +9076,13 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + if (!fetch_code (ins->info, ins->codep + 4)) + return &err_opcode; + /* The first byte after 0x62. */ ++ if (*ins->codep & 0x8) ++ ins->rex2 |= REX_B; ++ if (!(*ins->codep & 0x10)) ++ ins->rex2 |= REX_R; ++ + ins->rex = ~(*ins->codep >> 5) & 0x7; +- ins->vex.r = *ins->codep & 0x10; +- switch ((*ins->codep & 0xf)) ++ switch (*ins->codep & 0x7) + { + default: + return &bad_opcode; +@@ -8874,12 +9095,21 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + case 0x3: + vex_table_index = EVEX_0F3A; + break; ++ case 0x4: ++ vex_table_index = EVEX_MAP4; ++ ins->evex_type = evex_from_legacy; ++ if (ins->address_mode != mode_64bit) ++ return &bad_opcode; ++ break; + case 0x5: + vex_table_index = EVEX_MAP5; + break; + case 0x6: + vex_table_index = EVEX_MAP6; + break; ++ case 0x7: ++ vex_table_index = EVEX_MAP7; ++ break; + } + + /* The second byte after 0x62. */ +@@ -8890,9 +9120,8 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + + ins->vex.register_specifier = (~(*ins->codep >> 3)) & 0xf; + +- /* The U bit. */ + if (!(*ins->codep & 0x4)) +- return &bad_opcode; ++ ins->rex2 |= REX_X; + + switch ((*ins->codep & 0x3)) + { +@@ -8919,24 +9148,54 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) + ins->vex.v = *ins->codep & 0x8; + ins->vex.mask_register_specifier = *ins->codep & 0x7; + ins->vex.zeroing = *ins->codep & 0x80; ++ /* Set the NF bit for EVEX-Promoted instructions, this bit will be cleared ++ when it's an evex_default one. */ ++ ins->vex.nf = *ins->codep & 0x4; + + if (ins->address_mode != mode_64bit) + { ++ /* Report bad for !evex_default and when two fixed values of evex ++ change.. */ ++ if (ins->evex_type != evex_default ++ || (ins->rex2 & (REX_B | REX_X))) ++ return &bad_opcode; + /* In 16/32-bit mode silently ignore following bits. */ + ins->rex &= ~REX_B; +- ins->vex.r = true; ++ ins->rex2 &= ~REX_R; + } + ++ /* EVEX from legacy instructions, when the EVEX.ND bit is 0, ++ all bits of EVEX.vvvv and EVEX.V' must be 1. */ ++ if (ins->evex_type == evex_from_legacy && !ins->vex.nd ++ && (ins->vex.register_specifier || !ins->vex.v)) ++ return &bad_opcode; ++ + ins->need_vex = 4; ++ ++ /* EVEX from legacy instructions require that EVEX.z, EVEX.L’L and the ++ lower 2 bits of EVEX.aaa must be 0. */ ++ if (ins->evex_type == evex_from_legacy ++ && ((ins->vex.mask_register_specifier & 0x3) != 0 ++ || ins->vex.ll != 0 ++ || ins->vex.zeroing != 0)) ++ return &bad_opcode; ++ + ins->codep++; + vindex = *ins->codep++; +- dp = &evex_table[vex_table_index][vindex]; ++ if (vex_table_index != EVEX_MAP7) ++ dp = &evex_table[vex_table_index][vindex]; ++ else if (vindex == 0xf8) ++ dp = &map7_f8_opcode; ++ else ++ dp = &bad_opcode; + ins->end_codep = ins->codep; + if (!fetch_modrm (ins)) + return &err_opcode; + +- /* Set vector length. */ +- if (ins->modrm.mod == 3 && ins->vex.b) ++ /* Set vector length. For EVEX-promoted instructions, evex.ll == 0b00, ++ which has the same encoding as vex.length == 128 and they can share ++ the same processing with vex.length in OP_VEX. */ ++ if (ins->modrm.mod == 3 && ins->vex.b && ins->evex_type != evex_from_legacy) + ins->vex.length = 512; + else + { +@@ -9128,6 +9387,7 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + .last_data_prefix = -1, + .last_addr_prefix = -1, + .last_rex_prefix = -1, ++ .last_rex2_prefix = -1, + .last_seg_prefix = -1, + .fwait_prefix = -1, + }; +@@ -9167,9 +9427,10 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + } + else if (startswith (p, "intel")) + { +- ins.intel_syntax = 1; + if (startswith (p + 5, "-mnemonic")) + ins.intel_mnemonic = true; ++ else ++ ins.intel_syntax = 1; + } + else if (startswith (p, "att")) + { +@@ -9292,24 +9553,25 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + goto out; + } + +- if (*ins.codep == 0x0f) ++ /* REX2.M in rex2 prefix represents map0 or map1. */ ++ if (ins.last_rex2_prefix < 0 ? *ins.codep == 0x0f : (ins.rex2 & REX2_M)) + { +- unsigned char threebyte; ++ if (!ins.rex2) ++ { ++ ins.codep++; ++ if (!fetch_code (info, ins.codep + 1)) ++ goto fetch_error_out; ++ } + +- ins.codep++; +- if (!fetch_code (info, ins.codep + 1)) +- goto fetch_error_out; +- threebyte = *ins.codep; +- dp = &dis386_twobyte[threebyte]; +- ins.need_modrm = twobyte_has_modrm[threebyte]; +- ins.codep++; ++ dp = &dis386_twobyte[*ins.codep]; ++ ins.need_modrm = twobyte_has_modrm[*ins.codep]; + } + else + { + dp = &dis386[*ins.codep]; + ins.need_modrm = onebyte_has_modrm[*ins.codep]; +- ins.codep++; + } ++ ins.codep++; + + /* Save sizeflag for printing the extra ins.prefixes later before updating + it for mnemonic and operand processing. The prefix names depend +@@ -9335,6 +9597,22 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + dp = get_valid_dis386 (dp, &ins); + if (dp == &err_opcode) + goto fetch_error_out; ++ ++ /* For APX instructions promoted from legacy maps 0/1, embedded prefix ++ is interpreted as the operand size override. */ ++ if (ins.evex_type == evex_from_legacy ++ && ins.vex.prefix == DATA_PREFIX_OPCODE) ++ sizeflag ^= DFLAG; ++ ++ if(ins.evex_type == evex_default) ++ ins.vex.nf = false; ++ else ++ /* For EVEX-promoted formats, we need to clear EVEX.NF (ccmp and ctest ++ are cleared separately.) in mask_register_specifier and keep the low ++ 2 bits of mask_register_specifier to report errors for invalid cases ++ . */ ++ ins.vex.mask_register_specifier &= 0x3; ++ + if (dp != NULL && putop (&ins, dp->name, sizeflag) == 0) + { + if (!get_sib (&ins, sizeflag)) +@@ -9387,10 +9665,13 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + oappend (&ins, "/(bad)"); + } + } ++ /* vex.nf is cleared after being consumed. */ ++ if (ins.vex.nf) ++ oappend (&ins, "{bad-nf}"); + + /* Check whether rounding control was enabled for an insn not +- supporting it. */ +- if (ins.modrm.mod == 3 && ins.vex.b ++ supporting it, when evex.b is not treated as evex.nd. */ ++ if (ins.modrm.mod == 3 && ins.vex.b && ins.evex_type == evex_default + && !(ins.evex_used & EVEX_b_used)) + { + for (i = 0; i < MAX_OPERANDS; ++i) +@@ -9454,7 +9735,15 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + goto out; + } + +- switch (dp->prefix_requirement) ++ if ((dp->prefix_requirement & PREFIX_REX2_ILLEGAL) ++ && ins.last_rex2_prefix >= 0 && (ins.rex2 & REX2_SPECIAL) == 0) ++ { ++ i386_dis_printf (info, dis_style_text, "(bad)"); ++ ret = ins.end_codep - priv.the_buffer; ++ goto out; ++ } ++ ++ switch (dp->prefix_requirement & ~PREFIX_REX2_ILLEGAL) + { + case PREFIX_DATA: + /* If only the data prefix is marked as mandatory, its absence renders +@@ -9506,6 +9795,25 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + if (ins.last_repnz_prefix >= 0) + ins.all_prefixes[ins.last_repnz_prefix] = 0xf2; + break; ++ ++ case PREFIX_NP_OR_DATA: ++ if (ins.vex.prefix == REPE_PREFIX_OPCODE ++ || ins.vex.prefix == REPNE_PREFIX_OPCODE) ++ { ++ i386_dis_printf (info, dis_style_text, "(bad)"); ++ ret = ins.end_codep - priv.the_buffer; ++ goto out; ++ } ++ break; ++ ++ case NO_PREFIX: ++ if (ins.vex.prefix) ++ { ++ i386_dis_printf (info, dis_style_text, "(bad)"); ++ ret = ins.end_codep - priv.the_buffer; ++ goto out; ++ } ++ break; + } + + /* Check if the REX prefix is used. */ +@@ -9513,6 +9821,14 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + && !ins.need_vex && ins.last_rex_prefix >= 0) + ins.all_prefixes[ins.last_rex_prefix] = 0; + ++ /* Check if the REX2 prefix is used. */ ++ if (ins.last_rex2_prefix >= 0 ++ && ((ins.rex2 & REX2_SPECIAL) ++ || (((ins.rex2 & 7) ^ (ins.rex2_used & 7)) == 0 ++ && (ins.rex ^ ins.rex_used) == 0 ++ && (ins.rex2 & 7)))) ++ ins.all_prefixes[ins.last_rex2_prefix] = 0; ++ + /* Check if the SEG prefix is used. */ + if ((ins.prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES + | PREFIX_FS | PREFIX_GS)) != 0 +@@ -9541,7 +9857,11 @@ print_insn (bfd_vma pc, disassemble_info *info, int intel_syntax) + if (name == NULL) + abort (); + prefix_length += strlen (name) + 1; +- i386_dis_printf (info, dis_style_mnemonic, "%s ", name); ++ if (ins.all_prefixes[i] == REX2_OPCODE) ++ i386_dis_printf (info, dis_style_mnemonic, "{%s 0x%x} ", name, ++ (unsigned int) ins.rex2_payload); ++ else ++ i386_dis_printf (info, dis_style_mnemonic, "%s ", name); + } + + /* Check maximum code length. */ +@@ -10077,6 +10397,16 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + int cond = 1; + unsigned int l = 0, len = 0; + char last[4]; ++ bool evex_printed = false; ++ ++ /* We don't want to add any prefix or suffix to (bad), so return early. */ ++ if (!strncmp (in_template, "(bad)", 5)) ++ { ++ oappend (ins, "(bad)"); ++ *ins->obufp = 0; ++ ins->mnemonicendp = ins->obufp; ++ return 0; ++ } + + for (p = in_template; *p; p++) + { +@@ -10090,6 +10420,12 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + switch (*p) + { + default: ++ if (ins->evex_type == evex_from_legacy && !ins->vex.nd ++ && !(ins->rex2 & 7) && !evex_printed) ++ { ++ oappend (ins, "{evex} "); ++ evex_printed = true; ++ } + *ins->obufp++ = *p; + break; + case '%': +@@ -10120,7 +10456,7 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + case 'A': + if (ins->intel_syntax) + break; +- if ((ins->need_modrm && ins->modrm.mod != 3) ++ if ((ins->need_modrm && ins->modrm.mod != 3 && !ins->vex.nd) + || (sizeflag & SUFFIX_ALWAYS)) + *ins->obufp++ = 'b'; + break; +@@ -10204,7 +10540,7 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + { + case 'X': + if (!ins->vex.evex || ins->vex.b || ins->vex.ll >= 2 +- || !ins->vex.r ++ || (ins->rex2 & 7) + || (ins->modrm.mod == 3 && (ins->rex & REX_X)) + || !ins->vex.v || ins->vex.mask_register_specifier) + break; +@@ -10226,6 +10562,11 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + *ins->obufp++ = '}'; + *ins->obufp++ = ' '; + break; ++ case 'M': ++ if (ins->modrm.mod != 3 && !(ins->rex2 & 7)) ++ oappend (ins, "{evex} "); ++ evex_printed = true; ++ break; + default: + abort (); + } +@@ -10245,16 +10586,39 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + ins->used_prefixes |= (ins->prefixes & PREFIX_ADDR); + break; + case 'F': +- if (ins->intel_syntax) ++ if (l == 0) ++ { ++ if (ins->intel_syntax) ++ break; ++ if ((ins->prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS)) ++ { ++ if (sizeflag & AFLAG) ++ *ins->obufp++ = ins->address_mode == mode_64bit ? 'q' : 'l'; ++ else ++ *ins->obufp++ = ins->address_mode == mode_64bit ? 'l' : 'w'; ++ ins->used_prefixes |= (ins->prefixes & PREFIX_ADDR); ++ } ++ } ++ else if (l == 1 && last[0] == 'C') + break; +- if ((ins->prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS)) ++ else if (l == 1 && last[0] == 'N') + { +- if (sizeflag & AFLAG) +- *ins->obufp++ = ins->address_mode == mode_64bit ? 'q' : 'l'; +- else +- *ins->obufp++ = ins->address_mode == mode_64bit ? 'l' : 'w'; +- ins->used_prefixes |= (ins->prefixes & PREFIX_ADDR); ++ if (ins->vex.nf) ++ { ++ oappend (ins, "{nf} "); ++ /* This bit needs to be cleared after it is consumed. */ ++ ins->vex.nf = false; ++ evex_printed = true; ++ } ++ else if (ins->evex_type == evex_from_vex && !(ins->rex2 & 7) ++ && ins->vex.v) ++ { ++ oappend (ins, "{evex} "); ++ evex_printed = true; ++ } + } ++ else ++ abort (); + break; + case 'G': + if (ins->intel_syntax || (ins->obufp[-1] != 's' +@@ -10311,7 +10675,16 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + *ins->obufp++ = 'd'; + break; + case 'L': +- abort (); ++ if (ins->intel_syntax) ++ break; ++ if (sizeflag & SUFFIX_ALWAYS) ++ { ++ if (ins->rex & REX_W) ++ *ins->obufp++ = 'q'; ++ else ++ *ins->obufp++ = 'l'; ++ } ++ break; + case 'M': + if (ins->intel_mnemonic != cond) + *ins->obufp++ = 'r'; +@@ -10346,6 +10719,19 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + case 'P': + if (l == 0) + { ++ if (!cond && ins->last_rex2_prefix >= 0 && (ins->rex & REX_W)) ++ { ++ /* For pushp and popp, p is printed and do not print {rex2} ++ for them. */ ++ *ins->obufp++ = 'p'; ++ ins->rex2 |= REX2_SPECIAL; ++ break; ++ } ++ ++ /* For "!P" print nothing else in Intel syntax. */ ++ if (!cond && ins->intel_syntax) ++ break; ++ + if ((ins->modrm.mod == 3 || !cond) + && !(sizeflag & SUFFIX_ALWAYS)) + break; +@@ -10390,7 +10776,7 @@ putop (instr_info *ins, const char *in_template, int sizeflag) + if (ins->intel_syntax && !alt) + break; + USED_REX (REX_W); +- if ((ins->need_modrm && ins->modrm.mod != 3) ++ if ((ins->need_modrm && ins->modrm.mod != 3 && !ins->vex.nd) + || (sizeflag & SUFFIX_ALWAYS)) + { + if (ins->rex & REX_W) +@@ -10818,7 +11204,8 @@ print_displacement (instr_info *ins, bfd_signed_vma val) + static void + intel_operand_size (instr_info *ins, int bytemode, int sizeflag) + { +- if (ins->vex.b) ++ /* Check if there is a broadcast, when evex.b is not treated as evex.nd. */ ++ if (ins->vex.b && ins->evex_type == evex_default) + { + if (!ins->vex.no_broadcast) + switch (bytemode) +@@ -11088,6 +11475,8 @@ print_register (instr_info *ins, unsigned int reg, unsigned int rexmask, + USED_REX (rexmask); + if (ins->rex & rexmask) + reg += 8; ++ if (ins->rex2 & rexmask) ++ reg += 16; + + switch (bytemode) + { +@@ -11095,7 +11484,7 @@ print_register (instr_info *ins, unsigned int reg, unsigned int rexmask, + case b_swap_mode: + if (reg & 4) + USED_REX (0); +- if (ins->rex) ++ if (ins->rex || ins->rex2) + names = att_names8rex; + else + names = att_names8; +@@ -11300,6 +11689,7 @@ OP_Skip_MODRM (instr_info *ins, int bytemode ATTRIBUTE_UNUSED, + /* Skip mod/rm byte. */ + MODRM_CHECK; + ins->codep++; ++ ins->has_skipped_modrm = true; + return true; + } + +@@ -11310,7 +11700,10 @@ OP_E_memory (instr_info *ins, int bytemode, int sizeflag) + int riprel = 0; + int shift; + +- if (ins->vex.evex) ++ add += (ins->rex2 & REX_B) ? 16 : 0; ++ ++ /* Handles EVEX other than APX EVEX-promoted instructions. */ ++ if (ins->vex.evex && ins->evex_type == evex_default) + { + + /* Zeroing-masking is invalid for memory destinations. Set the flag +@@ -11454,6 +11847,13 @@ OP_E_memory (instr_info *ins, int bytemode, int sizeflag) + abort (); + if (ins->vex.evex) + { ++ /* S/G EVEX insns require EVEX.X4 not to be set. */ ++ if (ins->rex2 & REX_X) ++ { ++ oappend (ins, "(bad)"); ++ return true; ++ } ++ + if (!ins->vex.v) + vindex += 16; + check_gather = ins->obufp == ins->op_out[1]; +@@ -11483,6 +11883,9 @@ OP_E_memory (instr_info *ins, int bytemode, int sizeflag) + } + break; + default: ++ if (ins->rex2 & REX_X) ++ vindex += 16; ++ + if (vindex != 4) + indexes = ins->address_mode == mode_64bit && !addr32flag + ? att_names64 : att_names32; +@@ -11653,7 +12056,7 @@ OP_E_memory (instr_info *ins, int bytemode, int sizeflag) + + if (ins->rex & REX_R) + modrm_reg += 8; +- if (!ins->vex.r) ++ if (ins->rex2 & REX_R) + modrm_reg += 16; + if (vindex == modrm_reg) + oappend (ins, "/(bad)"); +@@ -11735,7 +12138,7 @@ OP_E_memory (instr_info *ins, int bytemode, int sizeflag) + print_operand_value (ins, disp & 0xffff, dis_style_text); + } + } +- if (ins->vex.b) ++ if (ins->vex.b && ins->evex_type == evex_default) + { + ins->evex_used |= EVEX_b_used; + +@@ -11818,7 +12221,11 @@ OP_E (instr_info *ins, int bytemode, int sizeflag) + { + /* Skip mod/rm byte. */ + MODRM_CHECK; +- ins->codep++; ++ if (!ins->has_skipped_modrm) ++ { ++ ins->codep++; ++ ins->has_skipped_modrm = true; ++ } + + if (ins->modrm.mod == 3) + { +@@ -11855,10 +12262,7 @@ OP_indirE (instr_info *ins, int bytemode, int sizeflag) + static bool + OP_G (instr_info *ins, int bytemode, int sizeflag) + { +- if (ins->vex.evex && !ins->vex.r && ins->address_mode == mode_64bit) +- oappend (ins, "(bad)"); +- else +- print_register (ins, ins->modrm.reg, REX_R, bytemode, sizeflag); ++ print_register (ins, ins->modrm.reg, REX_R, bytemode, sizeflag); + return true; + } + +@@ -11866,7 +12270,7 @@ static bool + OP_REG (instr_info *ins, int code, int sizeflag) + { + const char *s; +- int add; ++ int add = 0; + + switch (code) + { +@@ -11879,8 +12283,8 @@ OP_REG (instr_info *ins, int code, int sizeflag) + USED_REX (REX_B); + if (ins->rex & REX_B) + add = 8; +- else +- add = 0; ++ if (ins->rex2 & REX_B) ++ add += 16; + + switch (code) + { +@@ -12011,6 +12415,8 @@ OP_I (instr_info *ins, int bytemode, int sizeflag) + case const_1_mode: + if (ins->intel_syntax) + oappend (ins, "1"); ++ else ++ oappend (ins, "$1"); + return true; + default: + oappend (ins, INTERNAL_DISASSEMBLER_ERROR); +@@ -12487,7 +12893,7 @@ OP_XMM (instr_info *ins, int bytemode, int sizeflag ATTRIBUTE_UNUSED) + reg += 8; + if (ins->vex.evex) + { +- if (!ins->vex.r) ++ if (ins->rex2 & REX_R) + reg += 16; + } + +@@ -12592,6 +12998,8 @@ OP_EX (instr_info *ins, int bytemode, int sizeflag) + USED_REX (REX_B); + if (ins->rex & REX_B) + reg += 8; ++ if (ins->rex2 & REX_B) ++ reg += 16; + if (ins->vex.evex) + { + USED_REX (REX_X); +@@ -12623,9 +13031,10 @@ OP_R (instr_info *ins, int bytemode, int sizeflag) + { + case d_mode: + case dq_mode: ++ case q_mode: + case mask_mode: + return OP_E (ins, bytemode, sizeflag); +- case q_mode: ++ case q_mm_mode: + return OP_EM (ins, x_mode, sizeflag); + case xmm_mode: + if (ins->vex.length <= 128) +@@ -13095,6 +13504,13 @@ OP_VEX (instr_info *ins, int bytemode, int sizeflag ATTRIBUTE_UNUSED) + if (!ins->need_vex) + return true; + ++ if (ins->evex_type == evex_from_legacy) ++ { ++ ins->evex_used |= EVEX_b_used; ++ if (!ins->vex.nd) ++ return true; ++ } ++ + reg = ins->vex.register_specifier; + ins->vex.register_specifier = 0; + if (ins->address_mode != mode_64bit) +@@ -13186,12 +13602,22 @@ OP_VEX (instr_info *ins, int bytemode, int sizeflag ATTRIBUTE_UNUSED) + names = att_names_xmm; + ins->evex_used |= EVEX_len_used; + break; ++ case v_mode: + case dq_mode: + if (ins->rex & REX_W) + names = att_names64; ++ else if (bytemode == v_mode ++ && !(sizeflag & DFLAG)) ++ names = att_names16; + else + names = att_names32; + break; ++ case b_mode: ++ names = att_names8rex; ++ break; ++ case q_mode: ++ names = att_names64; ++ break; + case mask_bd_mode: + case mask_mode: + if (reg > 0x7) +@@ -13491,7 +13917,7 @@ DistinctDest_Fixup (instr_info *ins, int bytemode, int sizeflag) + /* Calc destination register number. */ + if (ins->rex & REX_R) + modrm_reg += 8; +- if (!ins->vex.r) ++ if (ins->rex2 & REX_R) + modrm_reg += 16; + + /* Calc src1 register number. */ +@@ -13576,3 +14002,58 @@ PREFETCHI_Fixup (instr_info *ins, int bytemode, int sizeflag) + + return OP_M (ins, bytemode, sizeflag); + } ++ ++static bool ++PUSH2_POP2_Fixup (instr_info *ins, int bytemode, int sizeflag) ++{ ++ if (ins->modrm.mod != 3) ++ return true; ++ ++ unsigned int vvvv_reg = ins->vex.register_specifier ++ | (!ins->vex.v << 4); ++ unsigned int rm_reg = ins->modrm.rm + (ins->rex & REX_B ? 8 : 0) ++ + (ins->rex2 & REX_B ? 16 : 0); ++ ++ /* Push2/Pop2 cannot use RSP and Pop2 cannot pop two same registers. */ ++ if (!ins->vex.nd || vvvv_reg == 0x4 || rm_reg == 0x4 ++ || (!ins->modrm.reg ++ && vvvv_reg == rm_reg)) ++ { ++ oappend (ins, "(bad)"); ++ return true; ++ } ++ ++ return OP_VEX (ins, bytemode, sizeflag); ++} ++ ++static bool ++JMPABS_Fixup (instr_info *ins, int bytemode, int sizeflag) ++{ ++ if (ins->last_rex2_prefix >= 0) ++ { ++ uint64_t op; ++ ++ if ((ins->prefixes & (PREFIX_OPCODE | PREFIX_ADDR | PREFIX_LOCK)) != 0x0 ++ || (ins->rex & REX_W) != 0x0) ++ { ++ oappend (ins, "(bad)"); ++ return true; ++ } ++ ++ if (bytemode == eAX_reg) ++ return true; ++ ++ if (!get64 (ins, &op)) ++ return false; ++ ++ ins->mnemonicendp = stpcpy (ins->obuf, "jmpabs"); ++ ins->rex2 |= REX2_SPECIAL; ++ oappend_immediate (ins, op); ++ ++ return true; ++ } ++ ++ if (bytemode == eAX_reg) ++ return OP_IMREG (ins, bytemode, sizeflag); ++ return OP_OFF64 (ins, bytemode, sizeflag); ++} +diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c +--- a/opcodes/i386-gen.c ++++ b/opcodes/i386-gen.c +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2007-2023 Free Software Foundation, Inc. ++/* Copyright (C) 2007-2024 Free Software Foundation, Inc. + + This file is part of the GNU opcodes library. + +@@ -63,7 +63,7 @@ static const dependency isa_dependencies[] = + { "NOCONA", + "GENERIC64|FISTTP|SSE3|MONITOR|CX16" }, + { "CORE", +- "P4|FISTTP|SSE3|MONITOR|CX16" }, ++ "P4|FISTTP|SSE3|MONITOR" }, + { "CORE2", + "NOCONA|SSSE3" }, + { "COREI7", +@@ -94,6 +94,8 @@ static const dependency isa_dependencies[] = + "ZNVER2|INVLPGB|TLBSYNC|VAES|VPCLMULQDQ|INVPCID|SNP|OSPKE" }, + { "ZNVER4", + "ZNVER3|AVX512F|AVX512DQ|AVX512IFMA|AVX512CD|AVX512BW|AVX512VL|AVX512_BF16|AVX512VBMI|AVX512_VBMI2|AVX512_VNNI|AVX512_BITALG|AVX512_VPOPCNTDQ|GFNI|RMPQUERY" }, ++ { "ZNVER5", ++ "ZNVER4|AVX_VNNI|MOVDIRI|MOVDIR64B|AVX512_VP2INTERSECT|PREFETCHI" }, + { "BTVER1", + "GENERIC64|FISTTP|MONITOR|CX16|LAHF_SAHF|Rdtscp|SSSE3|SSE4A|ABM|PRFCHW|Clflush|FISTTP|SVME" }, + { "BTVER2", +@@ -166,6 +168,10 @@ static const dependency isa_dependencies[] = + "AVX2" }, + { "AVX_NE_CONVERT", + "AVX2" }, ++ { "CX16", ++ "64" }, ++ { "LKGS", ++ "64" }, + { "FRED", + "LKGS" }, + { "AVX512F", +@@ -240,13 +246,13 @@ static const dependency isa_dependencies[] = + { "SNP", + "SEV_ES" }, + { "RMPQUERY", +- "SNP" }, ++ "SNP|64" }, + { "TSX", + "RTM|HLE" }, + { "TSXLDTRK", + "RTM" }, + { "AMX_TILE", +- "XSAVE" }, ++ "XSAVE|64" }, + { "AMX_INT8", + "AMX_TILE" }, + { "AMX_BF16", +@@ -259,6 +265,20 @@ static const dependency isa_dependencies[] = + "SSE2" }, + { "WIDEKL", + "KL" }, ++ { "PBNDKB", ++ "64" }, ++ { "UINTR", ++ "64" }, ++ { "PREFETCHI", ++ "64" }, ++ { "CMPCCXADD", ++ "64" }, ++ { "MSRLIST", ++ "64" }, ++ { "USER_MSR", ++ "64" }, ++ { "APX_F", ++ "XSAVE|64" }, + }; + + /* This array is populated as process_i386_initializers() walks cpu_flags[]. */ +@@ -380,6 +400,8 @@ static bitfield cpu_flags[] = + BITFIELD (RAO_INT), + BITFIELD (FRED), + BITFIELD (LKGS), ++ BITFIELD (USER_MSR), ++ BITFIELD (APX_F), + BITFIELD (MWAITX), + BITFIELD (CLZERO), + BITFIELD (OSPKE), +@@ -463,12 +485,12 @@ static bitfield opcode_modifiers[] = + BITFIELD (StaticRounding), + BITFIELD (SAE), + BITFIELD (Disp8MemShift), +- BITFIELD (Vsz), + BITFIELD (Optimize), +- BITFIELD (ATTMnemonic), +- BITFIELD (ATTSyntax), +- BITFIELD (IntelSyntax), ++ BITFIELD (Dialect), + BITFIELD (ISA64), ++ BITFIELD (NoEgpr), ++ BITFIELD (NF), ++ BITFIELD (Rex2), + }; + + #define CLASS(n) #n, n +@@ -587,7 +609,7 @@ static void + process_copyright (FILE *fp) + { + fprintf (fp, "/* This file is automatically generated by i386-gen. Do not edit! */\n\ +-/* Copyright (C) 2007-2023 Free Software Foundation, Inc.\n\ ++/* Copyright (C) 2007-2024 Free Software Foundation, Inc.\n\ + \n\ + This file is part of the GNU opcodes library.\n\ + \n\ +@@ -771,8 +793,10 @@ add_isa_dependencies (bitfield *flags, const char *f, int value, + } + free (deps); + +- /* ISA extensions with dependencies need CPU_ANY_*_FLAGS emitted. */ +- if (reverse < ARRAY_SIZE (isa_reverse_deps[0])) ++ /* ISA extensions with dependencies need CPU_ANY_*_FLAGS emitted, ++ unless the sole dependency is the "64-bit mode only" one. */ ++ if (reverse < ARRAY_SIZE (isa_reverse_deps[0]) ++ && strcmp (isa_dependencies[i].deps, "64")) + isa_reverse_deps[reverse][reverse] = 1; + + is_avx = orig_is_avx; +@@ -787,15 +811,16 @@ add_isa_dependencies (bitfield *flags, const char *f, int value, + + static void + output_cpu_flags (FILE *table, bitfield *flags, unsigned int size, +- int macro, const char *comma, const char *indent, int lineno) ++ int mode, const char *comma, const char *indent, int lineno) + { + unsigned int i = 0, j = 0; + +- memset (&active_cpu_flags, 0, sizeof(active_cpu_flags)); ++ if (mode < 0) ++ memset (&active_cpu_flags, 0, sizeof(active_cpu_flags)); + + fprintf (table, "%s{ { ", indent); + +- if (!macro) ++ if (mode <= 0) + { + for (j = ~0u; i < CpuAttrEnums; i++) + { +@@ -806,7 +831,8 @@ output_cpu_flags (FILE *table, bitfield *flags, unsigned int size, + fail ("%s: %d: invalid combination of CPU identifiers\n", + filename, lineno); + j = i; +- active_cpu_flags.array[i / 32] |= 1U << (i % 32); ++ if (mode) ++ active_cpu_flags.array[i / 32] |= 1U << (i % 32); + } + + /* Write 0 to indicate "no associated flag". */ +@@ -824,16 +850,25 @@ output_cpu_flags (FILE *table, bitfield *flags, unsigned int size, + if (((j + 1) % 20) == 0) + { + /* We need \\ for macro. */ +- if (macro) ++ if (mode > 0) + fprintf (table, " \\\n %s", indent); + else + fprintf (table, "\n %s", indent); + } +- if (flags[i].value) ++ if (mode < 0 && flags[i].value) + active_cpu_flags.array[i / 32] |= 1U << (i % 32); + } + +- fprintf (table, "%d } }%s\n", flags[i].value, comma); ++#if defined(CpuAttrUnused) != defined(CpuUnused) ++ if (mode <= 0) ++# ifdef CpuUnused ++ fprintf (table, " } }%s\n", comma); ++# else ++ fprintf (table, "%d, 0 } }%s\n", flags[i].value, comma); ++# endif ++ else ++#endif ++ fprintf (table, "%d } }%s\n", flags[i].value, comma); + } + + static void +@@ -846,15 +881,17 @@ process_i386_cpu_flag (FILE *table, char *flag, + unsigned int i; + int value = 1; + bool is_isa = false; +- bitfield flags [ARRAY_SIZE (cpu_flags)]; ++ bitfield all [ARRAY_SIZE (cpu_flags)]; ++ bitfield any [ARRAY_SIZE (cpu_flags)]; + + /* Copy the default cpu flags. */ +- memcpy (flags, cpu_flags, sizeof (cpu_flags)); ++ memcpy (all, cpu_flags, sizeof (cpu_flags)); ++ memcpy (any, cpu_flags, sizeof (cpu_flags)); + + if (flag == NULL) + { + for (i = 0; i < ARRAY_SIZE (isa_reverse_deps[0]); ++i) +- flags[i].value = isa_reverse_deps[reverse][i]; ++ any[i].value = isa_reverse_deps[reverse][i]; + goto output; + } + +@@ -876,9 +913,9 @@ process_i386_cpu_flag (FILE *table, char *flag, + + /* First we turn on everything except for cpuno64 and - if + present - the padding field. */ +- for (i = 0; i < ARRAY_SIZE (flags); i++) +- if (flags[i].position < CpuNo64) +- flags[i].value = 1; ++ for (i = 0; i < ARRAY_SIZE (any); i++) ++ if (any[i].position < CpuNo64) ++ any[i].value = 1; + + /* Turn off selective bits. */ + value = 0; +@@ -886,10 +923,10 @@ process_i386_cpu_flag (FILE *table, char *flag, + + if (name != NULL && value != 0) + { +- for (i = 0; i < ARRAY_SIZE (flags); i++) +- if (strcasecmp (flags[i].name, name) == 0) ++ for (i = 0; i < ARRAY_SIZE (any); i++) ++ if (strcasecmp (any[i].name, name) == 0) + { +- add_isa_dependencies (flags, name, 1, reverse); ++ add_isa_dependencies (any, name, 1, reverse); + is_isa = true; + break; + } +@@ -897,18 +934,40 @@ process_i386_cpu_flag (FILE *table, char *flag, + + if (strcmp (flag, "0")) + { ++ bool combined = false; ++ + if (is_isa) + return; + + /* Turn on/off selective bits. */ + last = flag + strlen (flag); ++ if (name == NULL && strchr (flag, '&')) ++ { ++ for (; next < last && *next != '('; ) ++ { ++ str = next_field (next, '&', &next, last); ++ set_bitfield (str, all, value, ARRAY_SIZE (all), lineno); ++ } ++ if (*next == '(') ++ { ++ if (*--last != ')') ++ fail ("%s: %d: missing `)' in bitfield: %s\n", filename, ++ lineno, flag); ++ ++next; ++ *last = '\0'; ++ } ++ combined = true; ++ } + for (; next && next < last; ) + { + str = next_field (next, '|', &next, last); +- if (name == NULL) +- set_bitfield (str, flags, value, ARRAY_SIZE (flags), lineno); +- else +- add_isa_dependencies (flags, str, value, reverse); ++ if (name) ++ add_isa_dependencies (any, str, value, reverse); ++ else if (combined || next < last) ++ set_bitfield (str, any, value, ARRAY_SIZE (any), lineno); ++ else /* Singular specifiers go into "all". */ ++ set_bitfield (str, all, value, ARRAY_SIZE (all), lineno); ++ combined = true; + } + } + +@@ -918,6 +977,15 @@ process_i386_cpu_flag (FILE *table, char *flag, + size_t len = strlen (name); + char *upper = xmalloc (len + 1); + ++ /* Cpu64 is special: It specifies a mode dependency, not an ISA one. Zap ++ the flag from ISA initializer macros (and from CPU_ANY_64_FLAGS ++ itself we only care about tracking its dependents. Also don't emit the ++ (otherwise all zero) CPU_64_FLAGS. */ ++ if (flag != NULL && reverse == Cpu64) ++ return; ++ if (is_isa || flag == NULL) ++ any[Cpu64].value = 0; ++ + for (i = 0; i < len; ++i) + { + /* Don't emit #define-s for auxiliary entries. */ +@@ -930,8 +998,18 @@ process_i386_cpu_flag (FILE *table, char *flag, + flag != NULL ? "": "ANY_", upper); + free (upper); + } ++ else ++ { ++ /* Synthesize "64-bit mode only" dependencies from the dependencies we ++ have accumulated. */ ++ for (i = 0; i < ARRAY_SIZE (isa_reverse_deps[0]); ++i) ++ if (all[i].value && isa_reverse_deps[Cpu64][i]) ++ all[Cpu64].value = 1; ++ ++ output_cpu_flags(table, all, ARRAY_SIZE (all), -1, comma, indent, lineno); ++ } + +- output_cpu_flags (table, flags, ARRAY_SIZE (flags), name != NULL, ++ output_cpu_flags (table, any, ARRAY_SIZE (any), name != NULL, + comma, indent, lineno); + } + +@@ -1008,10 +1086,44 @@ get_element_size (char **opnd, int lineno) + return elem_size; + } + ++static bool ++rex2_disallowed (const unsigned long long opcode, unsigned int length, ++ unsigned int space, const char *cpu_flags) ++{ ++ /* Some opcodes encode a ModR/M-like byte directly in the opcode. */ ++ unsigned int base_opcode = opcode >> (8 * length - 8); ++ ++ /* All opcodes listed map0 0x4*, 0x7*, 0xa*, 0xe* and map1 0x3*, 0x8* ++ are reserved under REX2 and triggers #UD when prefixed with REX2 */ ++ if (space == 0) ++ switch (base_opcode >> 4) ++ { ++ case 0x4: ++ case 0x7: ++ case 0xA: ++ case 0xE: ++ return true; ++ default: ++ return false; ++ } ++ ++ if (space == SPACE_0F) ++ switch (base_opcode >> 4) ++ { ++ case 0x3: ++ case 0x8: ++ return true; ++ default: ++ return false; ++ } ++ ++ return false; ++} ++ + static void + process_i386_opcode_modifier (FILE *table, char *mod, unsigned int space, + unsigned int prefix, const char *extension_opcode, +- char **opnd, int lineno) ++ char **opnd, int lineno, bool rex2_disallowed) + { + char *str, *next, *last; + bitfield modifiers [ARRAY_SIZE (opcode_modifiers)]; +@@ -1021,8 +1133,10 @@ process_i386_opcode_modifier (FILE *table, char *mod, unsigned int space, + SPACE(0F), + SPACE(0F38), + SPACE(0F3A), ++ SPACE(EVEXMAP4), + SPACE(EVEXMAP5), + SPACE(EVEXMAP6), ++ SPACE(VEXMAP7), + SPACE(XOP08), + SPACE(XOP09), + SPACE(XOP0A), +@@ -1127,6 +1241,22 @@ process_i386_opcode_modifier (FILE *table, char *mod, unsigned int space, + fprintf (table, " SPACE_%s, %s,\n", + spaces[space], extension_opcode ? extension_opcode : "None"); + ++ /* Rather than evaluating multiple conditions at runtime to determine ++ whether an EVEX encoding is being dealt with, derive that information ++ right here. A missing EVex attribute means "dynamic". */ ++ if (!modifiers[EVex].value ++ && (modifiers[Disp8MemShift].value ++ || modifiers[Broadcast].value ++ || modifiers[Masking].value ++ || modifiers[SAE].value)) ++ modifiers[EVex].value = EVEXDYN; ++ ++ /* Vex, legacy map2 and map3 and rex2_disallowed do not support EGPR. ++ For templates supporting both Vex and EVex allowing EGPR. */ ++ if ((modifiers[Vex].value || space > SPACE_0F || rex2_disallowed) ++ && !modifiers[EVex].value) ++ modifiers[NoEgpr].value = 1; ++ + output_opcode_modifier (table, modifiers, ARRAY_SIZE (modifiers)); + } + +@@ -1351,7 +1481,9 @@ output_i386_opcode (FILE *table, const char *name, char *str, + free (ident); + + process_i386_opcode_modifier (table, opcode_modifier, space, prefix, +- extension_opcode, operand_types, lineno); ++ extension_opcode, operand_types, lineno, ++ rex2_disallowed (opcode, length, space, ++ cpu_flags)); + + process_i386_cpu_flag (table, cpu_flags, NULL, ",", " ", lineno, CpuMax); + +@@ -1406,10 +1538,10 @@ opcode_hash_eq (const void *p, const void *q) + return strcmp (name, entry->name) == 0; + } + +-static void ++static bool + parse_template (char *buf, int lineno) + { +- char sep, *end, *name; ++ char sep, *end, *ptr; + struct template *tmpl; + struct template_instance *last_inst = NULL; + +@@ -1436,8 +1568,16 @@ parse_template (char *buf, int lineno) + prev->next = tmpl->next; + else + templates = tmpl->next; +- return; ++ return true; + } ++ ++ /* Check whether this actually is a reference to an existing template: ++ If there's '>' ahead of ':', it can't be a new template definition ++ (and template undefs have are dealt with above). */ ++ ptr = strchr (buf, '>'); ++ if (ptr != NULL && ptr < end) ++ return false; ++ + *end++ = '\0'; + remove_trailing_whitespaces (buf); + +@@ -1512,6 +1652,8 @@ parse_template (char *buf, int lineno) + + tmpl->next = templates; + templates = tmpl; ++ ++ return true; + } + + static unsigned int +@@ -1768,10 +1910,12 @@ process_i386_opcodes (FILE *table) + /* Ignore comments. */ + case '\0': + continue; +- break; ++ + case '<': +- parse_template (p, lineno); +- continue; ++ if (parse_template (p, lineno)) ++ continue; ++ break; ++ + default: + if (!marker) + continue; +@@ -1808,23 +1952,26 @@ process_i386_opcodes (FILE *table) + + /* Generate opcode sets array. */ + fprintf (table, "\n/* i386 opcode sets table. */\n\n"); +- fprintf (table, "static const insn_template *const i386_op_sets[] =\n{\n"); +- fprintf (table, " i386_optab,\n"); ++ fprintf (table, "typedef unsigned short i386_op_off_t;\n"); ++ fprintf (table, "static const i386_op_off_t i386_op_sets[] =\n{\n "); + + for (nr = j = 0; j < i; j++) + { + struct opcode_entry *next = &opcode_array[j]->entry; + ++ if ((j + 1) % 8 != 0) ++ fprintf (table, "%5u,", nr); ++ else ++ fprintf (table, "%5u,\n ", nr); + do + { + ++nr; + next = next->next; + } + while (next); +- fprintf (table, " i386_optab + %u,\n", nr); + } + +- fprintf (table, "};\n"); ++ fprintf (table, "%5u\n};\n", nr); + + /* Emit mnemonics and associated #define-s. */ + qsort (opcode_array, i, sizeof (*opcode_array), mnemonic_cmp); +@@ -2140,6 +2287,8 @@ main (int argc, char **argv) + qsort (operand_types, ARRAY_SIZE (operand_types), + sizeof (operand_types [0]), compare); + ++ process_i386_initializers (); ++ + table = fopen ("i386-tbl.h", "w"); + if (table == NULL) + fail ("can't create i386-tbl.h, errno = %s\n", +@@ -2149,7 +2298,6 @@ main (int argc, char **argv) + + process_i386_opcodes (table); + process_i386_registers (table); +- process_i386_initializers (); + + fclose (table); + +diff --git a/opcodes/i386-init.h b/opcodes/i386-init.h +--- a/opcodes/i386-init.h ++++ b/opcodes/i386-init.h +@@ -1,5 +1,5 @@ + /* This file is automatically generated by i386-gen. Do not edit! */ +-/* Copyright (C) 2007-2023 Free Software Foundation, Inc. ++/* Copyright (C) 2007-2024 Free Software Foundation, Inc. + + This file is part of the GNU opcodes library. + +@@ -26,7 +26,7 @@ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0,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0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ +- 0, 1, 0, 0 } } ++ 0, 0, 1, 0, 0, 0 } } ++ ++#define CPU_ANY_APX_F_FLAGS \ ++ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 1, 0, 0 } } + +diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl +--- a/opcodes/i386-opc.tbl ++++ b/opcodes/i386-opc.tbl +@@ -1,5 +1,5 @@ + // i386 opcode table. +-// Copyright (C) 2007-2023 Free Software Foundation, Inc. ++// Copyright (C) 2007-2024 Free Software Foundation, Inc. + // + // This file is part of the GNU opcodes library. + // +@@ -85,6 +85,11 @@ + #define RegKludge OperandConstraint=REG_KLUDGE + #define SwapSources OperandConstraint=SWAP_SOURCES + #define Ugh OperandConstraint=UGH ++#define ImplicitStackOp OperandConstraint=IMPLICIT_STACK_OP ++ ++#define ATTSyntax Dialect=ATT_SYNTAX ++#define ATTMnemonic Dialect=ATT_MNEMONIC ++#define IntelSyntax Dialect=INTEL_SYNTAX + + #define IgnoreSize MnemonicSize=IGNORESIZE + #define DefaultSize MnemonicSize=DEFAULTSIZE +@@ -109,9 +114,12 @@ + #define SpaceXOP09 OpcodeSpace=SPACE_XOP09 + #define SpaceXOP0A OpcodeSpace=SPACE_XOP0A + ++#define EVexMap4 OpcodeSpace=SPACE_EVEXMAP4|EVex128 + #define EVexMap5 OpcodeSpace=SPACE_EVEXMAP5 + #define EVexMap6 OpcodeSpace=SPACE_EVEXMAP6 + ++#define VexMap7 OpcodeSpace=SPACE_VEXMAP7 ++ + #define VexW0 VexW=VEXW0 + #define VexW1 VexW=VEXW1 + #define VexWIG VexW=VEXWIG +@@ -133,12 +141,22 @@ + + #define Disp8ShiftVL Disp8MemShift=DISP8_SHIFT_VL + +-#define Vsz256 Vsz=VSZ256 +-#define Vsz512 Vsz=VSZ512 ++#define DstVVVV VexVVVV=VexVVVV_DST ++ ++// The template supports VEX format for cpuid and EVEX format for cpuid & APX_F. ++// While therefore we really mean cpuid|(cpuid&APX_F) here, this can't be ++// expressed in the generated templates. It's equivalent to just cpuid|APX_F ++// anyway, but that is not what we want (as APX_F alone isn't a sufficient ++// prereq for such insns). Instead the assembler will massage the CPU specifier ++// to the equivalent of either cpuid&(cpuid) or cpuid&(APX_F) (or something ++// substantially similar), depending on what encoding was requested. ++#define APX_F(cpuid) cpuid&(cpuid|APX_F) + + // The EVEX purpose of StaticRounding appears only together with SAE. Re-use + // the bit to mark commutative VEX encodings where swapping the source + // operands may allow to switch from 3-byte to 2-byte VEX encoding. ++// And re-use the bit to mark some NDD insns that swapping the source operands ++// may allow to switch from EVEX encoding to REX2 encoding. + #define C StaticRounding + + #define FP 387|287|8087 +@@ -156,6 +174,8 @@ + #define i287 287 + #define i387 387 + #define i687 687 ++// Note: Don't add this one to any templates already specifying a 64-bit-mode- ++// only ISA extension: i386-gen takes care of adding such dependencies. + #define x64 64 + + ### MARKER ### +@@ -164,11 +184,11 @@ + mov, 0xa0, No64, D|W|CheckOperandSize|No_sSuf|No_qSuf, { Disp16|Disp32|Unspecified|Byte|Word|Dword, Acc|Byte|Word|Dword } + mov, 0xa0, x64, D|W|CheckOperandSize|No_sSuf, { Disp64|Unspecified|Byte|Word|Dword|Qword, Acc|Byte|Word|Dword|Qword } + movabs, 0xa0, x64, D|W|CheckOperandSize|No_sSuf, { Disp64|Unspecified|Byte|Word|Dword|Qword, Acc|Byte|Word|Dword|Qword } +-mov, 0x88, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixRelease, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++mov, 0x88, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixRelease, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } + // In the 64bit mode the short form mov immediate is redefined to have + // 64bit value. + mov, 0xb0, 0, W|No_sSuf|No_qSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32 } +-mov, 0xc6/0, 0, W|Modrm|No_sSuf|HLEPrefixRelease|Optimize, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++mov, 0xc6/0, 0, W|Modrm|No_sSuf|HLEPrefixRelease|Optimize, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } + mov, 0xb8, x64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|Optimize, { Imm64, Reg64 } + movabs, 0xb8, x64, No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Imm64, Reg64 } + // The segment register moves accept WordReg so that a segment register +@@ -181,14 +201,18 @@ mov, 0x8c, 0, D|Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf, { SReg, Word|U + mov, 0x8e, 0, Modrm|IgnoreSize|No_bSuf|No_sSuf|NoRex64, { Reg16|Reg32|Reg64, SReg } + // Move to/from control debug registers. In the 16 or 32bit modes + // they are 32bit. In the 64bit mode they are 64bit. +-mov, 0xf20, i386|No64, D|RegMem|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Control, Reg32 } ++mov, 0xf20, i386&No64, D|RegMem|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Control, Reg32 } + mov, 0xf20, x64, D|RegMem|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Control, Reg64 } +-mov, 0xf21, i386|No64, D|RegMem|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Debug, Reg32 } ++mov, 0xf21, i386&No64, D|RegMem|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Debug, Reg32 } + mov, 0xf21, x64, D|RegMem|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Debug, Reg64 } +-mov, 0xf24, i386|No64, D|RegMem|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Test, Reg32 } ++mov, 0xf24, i386&No64, D|RegMem|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Test, Reg32 } + + // Move after swapping the bytes + movbe, 0x0f38f0, Movbe, D|Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++movbe, 0x60, Movbe&APX_F, D|Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++// This needs to live here for easy EVEX -> REX2 conversion, which wants to ++// restart with the next sequential template. ++bswap, 0xfc8, i486, No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64 } + + // Move with sign extend. + movsb, 0xfbe, i386, Modrm|No_bSuf|No_sSuf, { Reg8|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } +@@ -201,37 +225,39 @@ movsxd, 0x63, x64, Amd64|Modrm|NoSuf, { Reg32|Unspecified|BaseIndex, Reg16 } + movsxd, 0x63, x64, Intel64|Modrm|NoSuf, { Reg16|Unspecified|BaseIndex, Reg16 } + + // Move with zero extend. +-movzb, 0xfb6, i386, Modrm|No_bSuf|No_sSuf, { Reg8|Byte|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } +-movzw, 0xfb7, i386, Modrm|No_bSuf|No_wSuf|No_sSuf, { Reg16|Word|Unspecified|BaseIndex, Reg32|Reg64 } ++movzb, 0xfb6, i386, Modrm|No_bSuf|No_sSuf, { Reg8|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++movzw, 0xfb7, i386, Modrm|No_bSuf|No_wSuf|No_sSuf, { Reg16|Unspecified|BaseIndex, Reg32|Reg64 } + // The 64-bit variant is not particularly useful since the zero extend + // 32->64 is implicit, but we can encode them. + movzx, 0xfb6, i386, W|Modrm|No_lSuf|No_sSuf|No_qSuf, { Reg8|Reg16|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } + + // Push instructions. +-push, 0x50, No64, No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32 } +-push, 0xff/6, No64, Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32|Word|Dword|Unspecified|BaseIndex } +-push, 0x6a, i186|No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm8S } +-push, 0x68, i186|No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm16|Imm32 } +-push, 0x6, No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, { SReg } ++push, 0x50, No64, ImplicitStackOp|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32 } ++push, 0xff/6, No64, Modrm|ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32|Unspecified|BaseIndex } ++push, 0x6a, i186&No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm8S } ++push, 0x68, i186&No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm16|Imm32 } ++push, 0x6, No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { SReg } + // In 64bit mode, the operand size is implicitly 64bit. +-push, 0x50, x64, No_bSuf|No_lSuf|No_sSuf|NoRex64, { Reg16|Reg64 } +-push, 0xff/6, x64, Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Reg16|Reg64|Word|Qword|Unspecified|BaseIndex } +-push, 0x6a, x64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Imm8S } +-push, 0x68, x64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Imm16|Imm32S } +-push, 0xfa0, x64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { SReg } ++push, 0x50, x64, ImplicitStackOp|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Reg16|Reg64 } ++pushp, 0x50, APX_F, ImplicitStackOp|No_bSuf|No_wSuf|No_lSuf|No_sSuf|Rex2, { Reg64 } ++push, 0xff/6, x64, Modrm|ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Reg16|Reg64|Unspecified|BaseIndex } ++push, 0x6a, x64, ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Imm8S } ++push, 0x68, x64, ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Imm16|Imm32S } ++push, 0xfa0, x64, ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { SReg } + +-pusha, 0x60, i186|No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} ++pusha, 0x60, i186&No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} + + // Pop instructions. +-pop, 0x58, No64, No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32 } +-pop, 0x8f/0, No64, Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32|Word|Dword|Unspecified|BaseIndex } +-pop, 0x7, No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, { SReg } ++pop, 0x58, No64, ImplicitStackOp|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32 } ++pop, 0x8f/0, No64, Modrm|ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32|Unspecified|BaseIndex } ++pop, 0x7, No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { SReg } + // In 64bit mode, the operand size is implicitly 64bit. +-pop, 0x58, x64, No_bSuf|No_lSuf|No_sSuf|NoRex64, { Reg16|Reg64 } +-pop, 0x8f/0, x64, Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Reg16|Reg64|Word|Qword|Unspecified|BaseIndex } +-pop, 0xfa1, x64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { SReg } ++pop, 0x58, x64, ImplicitStackOp|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Reg16|Reg64 } ++popp, 0x58, APX_F, ImplicitStackOp|No_bSuf|No_wSuf|No_lSuf|No_sSuf|Rex2, { Reg64 } ++pop, 0x8f/0, x64, Modrm|ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Reg16|Reg64|Unspecified|BaseIndex } ++pop, 0xfa1, x64, ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { SReg } + +-popa, 0x61, i186|No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} ++popa, 0x61, i186&No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} + + // Exchange instructions. + // xchg commutes: we allow both operand orders. +@@ -273,70 +299,67 @@ lahf, 0x9f, No64, NoSuf, {} + lahf, 0x9f, LAHF_SAHF, NoSuf, {} + sahf, 0x9e, No64, NoSuf, {} + sahf, 0x9e, LAHF_SAHF, NoSuf, {} +-pushf, 0x9c, No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} +-pushf, 0x9c, x64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, {} +-popf, 0x9d, No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} +-popf, 0x9d, x64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, {} ++pushf, 0x9c, No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} ++pushf, 0x9c, x64, ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, {} ++popf, 0x9d, No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} ++popf, 0x9d, x64, ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, {} + stc, 0xf9, 0, NoSuf, {} + std, 0xfd, 0, NoSuf, {} + sti, 0xfb, 0, NoSuf, {} + + // Arithmetic. +-add, 0x0, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-add, 0x83/0, 0, Modrm|No_bSuf|No_sSuf|HLEPrefixLock, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-add, 0x4, 0, W|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-add, 0x80/0, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-inc, 0x40, No64, No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32 } +-inc, 0xfe/0, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } + +-sub, 0x28, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock|Optimize, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-sub, 0x83/5, 0, Modrm|No_bSuf|No_sSuf|HLEPrefixLock, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-sub, 0x2c, 0, W|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-sub, 0x80/5, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++ ++ ++, << 3, APX_F, D||W|CheckOperandSize|Modrm|No_sSuf|DstVVVV|EVexMap4||, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg8|Reg16|Reg32|Reg64 } ++, << 3, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock||, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, << 3, APX_F, D|W|CheckOperandSize|Modrm|No_sSuf|EVexMap4|, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0x83/, APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|DstVVVV|EVexMap4|, { Imm8S, Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++, 0x83/, 0, Modrm|No_bSuf|No_sSuf|HLEPrefixLock|, { Imm8S, Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0x83/, 0, Modrm|No_bSuf|No_sSuf|EVexMap4|, { Imm8S, Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0x04 | ( << 3), 0, W|No_sSuf|, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } ++, 0x80/, APX_F, W|Modrm|CheckOperandSize|No_sSuf|DstVVVV|EVexMap4|, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg8|Reg16|Reg32|Reg64 } ++, 0x80/, 0, W|Modrm|No_sSuf|HLEPrefixLock|, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0x80/, APX_F, W|Modrm|EVexMap4|No_sSuf|, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++ ++ + +-dec, 0x48, No64, No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32 } +-dec, 0xfe/1, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-sbb, 0x18, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-sbb, 0x83/3, 0, Modrm|No_bSuf|No_sSuf|HLEPrefixLock, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-sbb, 0x1c, 0, W|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-sbb, 0x80/3, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++// clr with 1 operand is really xor with 2 operands. ++clr, 0x30, 0, W|Modrm|No_sSuf|RegKludge|Optimize, { Reg8|Reg16|Reg32|Reg64 } ++clr, 0x30, APX_F, W|Modrm|No_sSuf|RegKludge|EVexMap4|NF, { Reg8|Reg16|Reg32|Reg64 } + +-cmp, 0x38, 0, D|W|CheckOperandSize|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-cmp, 0x83/7, 0, Modrm|No_bSuf|No_sSuf, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } ++cmp, 0x38, 0, D|W|CheckOperandSize|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++cmp, 0x83/7, 0, Modrm|No_bSuf|No_sSuf, { Imm8S, Reg16|Reg32|Reg64|Unspecified|BaseIndex } + cmp, 0x3c, 0, W|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-cmp, 0x80/7, 0, W|Modrm|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++cmp, 0x80/7, 0, W|Modrm|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } + + test, 0x84, 0, D|W|C|CheckOperandSize|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } + test, 0xa8, 0, W|No_sSuf|Optimize, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-test, 0xf6/0, 0, W|Modrm|No_sSuf|Optimize, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++test, 0xf6/0, 0, W|Modrm|No_sSuf|Optimize, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } + +-and, 0x20, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock|Optimize, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-and, 0x83/4, 0, Modrm|No_bSuf|No_sSuf|HLEPrefixLock|Optimize, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-and, 0x24, 0, W|No_sSuf|Optimize, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-and, 0x80/4, 0, W|Modrm|No_sSuf|HLEPrefixLock|Optimize, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++ + +-or, 0x8, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock|Optimize, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-or, 0x83/1, 0, Modrm|No_bSuf|No_sSuf|HLEPrefixLock, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-or, 0xc, 0, W|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-or, 0x80/1, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++, 0x40 | ( << 3), No64, No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32 } ++, 0xfe/, APX_F, W|Modrm|No_sSuf|CheckOperandSize|DstVVVV|EVexMap4|NF, {Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg8|Reg16|Reg32|Reg64} ++, 0xfe/, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xfe/, APX_F, W|Modrm|No_sSuf|EVexMap4|NF, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } + +-xor, 0x30, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock|Optimize, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-xor, 0x83/6, 0, Modrm|No_bSuf|No_sSuf|HLEPrefixLock, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-xor, 0x34, 0, W|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-xor, 0x80/6, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++ + +-// clr with 1 operand is really xor with 2 operands. +-clr, 0x30, 0, W|Modrm|No_sSuf|RegKludge|Optimize, { Reg8|Reg16|Reg32|Reg64 } ++ + +-adc, 0x10, 0, D|W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-adc, 0x83/2, 0, Modrm|No_bSuf|No_sSuf|HLEPrefixLock, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-adc, 0x14, 0, W|No_sSuf, { Imm8|Imm16|Imm32|Imm32S, Acc|Byte|Word|Dword|Qword } +-adc, 0x80/2, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++, 0xf6/, APX_F, W|Modrm|CheckOperandSize|No_sSuf|DstVVVV|EVexMap4|, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg8|Reg16|Reg32|Reg64 } ++, 0xf6/, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xf6/, APX_F, W|Modrm|No_sSuf|EVexMap4|, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } + +-neg, 0xf6/3, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-not, 0xf6/2, 0, W|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++ + + aaa, 0x37, No64, NoSuf, {} + aas, 0x3f, No64, NoSuf, {} +@@ -367,81 +390,82 @@ cqto, 0x99, x64, Size64|NoSuf, {} + // expanding 64-bit multiplies, and *cannot* be selected to accomplish + // 'imul %ebx, %eax' (opcode 0x0faf must be used in this case) + // These multiplies can only be selected with single operand forms. +-mul, 0xf6/4, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-imul, 0xf6/5, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-imul, 0xfaf, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Unspecified|Word|Dword|Qword|BaseIndex, Reg16|Reg32|Reg64 } +-imul, 0x6b, i186, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Imm8S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } +-imul, 0x69, i186, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Imm16|Imm32|Imm32S, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++ ++ ++, 0xf6/, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xf6/, APX_F, W|Modrm|No_sSuf|EVexMap4|NF, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++imul, 0xaf, APX_F, C|Modrm|CheckOperandSize|No_bSuf|No_sSuf|DstVVVV|EVexMap4|NF, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64 } ++imul, 0xfaf, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++imul, 0xaf, APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++imul, 0x6b, i186, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Imm8S, Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++imul, 0x6b, APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, { Imm8S, Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++imul, 0x69, i186, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Imm16|Imm32|Imm32S, Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++imul, 0x69, APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, { Imm16|Imm32|Imm32S, Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } + // imul with 2 operands mimics imul with 3 by putting the register in + // both i.rm.reg & i.rm.regmem fields. RegKludge enables this + // transformation. + imul, 0x6b, i186, Modrm|No_bSuf|No_sSuf|RegKludge, { Imm8S, Reg16|Reg32|Reg64 } ++imul, 0x6b, APX_F, Modrm|No_bSuf|No_sSuf|RegKludge|EVexMap4|NF, { Imm8S, Reg16|Reg32|Reg64 } + imul, 0x69, i186, Modrm|No_bSuf|No_sSuf|RegKludge, { Imm16|Imm32|Imm32S, Reg16|Reg32|Reg64 } +- +-div, 0xf6/6, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-div, 0xf6/6, 0, W|CheckOperandSize|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex, Acc|Byte|Word|Dword|Qword } +-idiv, 0xf6/7, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-idiv, 0xf6/7, 0, W|CheckOperandSize|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex, Acc|Byte|Word|Dword|Qword } +- +-rol, 0xd0/0, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rol, 0xc0/0, i186, W|Modrm|No_sSuf, { Imm8|Imm8S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rol, 0xd2/0, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rol, 0xd0/0, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-ror, 0xd0/1, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-ror, 0xc0/1, i186, W|Modrm|No_sSuf, { Imm8|Imm8S, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-ror, 0xd2/1, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-ror, 0xd0/1, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-rcl, 0xd0/2, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rcl, 0xc0/2, i186, W|Modrm|No_sSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rcl, 0xd2/2, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rcl, 0xd0/2, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-rcr, 0xd0/3, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rcr, 0xc0/3, i186, W|Modrm|No_sSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rcr, 0xd2/3, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-rcr, 0xd0/3, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-sal, 0xd0/4, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-sal, 0xc0/4, i186, W|Modrm|No_sSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-sal, 0xd2/4, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-sal, 0xd0/4, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-shl, 0xd0/4, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-shl, 0xc0/4, i186, W|Modrm|No_sSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-shl, 0xd2/4, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-shl, 0xd0/4, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-shr, 0xd0/5, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-shr, 0xc0/5, i186, W|Modrm|No_sSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-shr, 0xd2/5, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-shr, 0xd0/5, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-sar, 0xd0/7, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-sar, 0xc0/7, i186, W|Modrm|No_sSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-sar, 0xd2/7, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-sar, 0xd0/7, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +- +-shld, 0xfa4, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Imm8, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-shld, 0xfa5, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { ShiftCount, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-shld, 0xfa5, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +- +-shrd, 0xfac, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Imm8, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-shrd, 0xfad, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { ShiftCount, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } +-shrd, 0xfad, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } ++imul, 0x69, APX_F, Modrm|No_bSuf|No_sSuf|RegKludge|EVexMap4|NF, { Imm16|Imm32|Imm32S, Reg16|Reg32|Reg64 } ++ ++ ++ ++ ++ ++
, 0xf6/, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++
, 0xf6/, APX_F, W|Modrm|No_sSuf|EVexMap4|NF, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++
, 0xf6/, 0, W|CheckOperandSize|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Acc|Byte|Word|Dword|Qword } ++
, 0xf6/, APX_F, W|CheckOperandSize|Modrm|No_sSuf|EVexMap4|NF, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Acc|Byte|Word|Dword|Qword } ++ ++
++ ++ ++ ++, 0xd0/, APX_F, W|Modrm|No_sSuf|CheckOperandSize|DstVVVV|EVexMap4|, { Imm1, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg8|Reg16|Reg32|Reg64 } ++, 0xd0/, 0, W|Modrm|No_sSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xd0/, APX_F, W|Modrm|No_sSuf|EVexMap4|, { Imm1, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xc0/, APX_F, W|Modrm|No_sSuf|CheckOperandSize|DstVVVV|EVexMap4|, { , Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg8|Reg16|Reg32|Reg64 } ++, 0xc0/, i186, W|Modrm|No_sSuf, { , Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xc0/, APX_F, W|Modrm|No_sSuf|EVexMap4|, { , Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xd2/, APX_F, W|Modrm|No_sSuf|CheckOperandSize|DstVVVV|EVexMap4|, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg8|Reg16|Reg32|Reg64 } ++, 0xd2/, 0, W|Modrm|No_sSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xd2/, APX_F, W|Modrm|No_sSuf|EVexMap4|, { ShiftCount, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++, 0xd0/, 0, W|Modrm|No_sSuf, { Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++ ++ ++ ++ ++ ++shd, 0x24 | , APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|DstVVVV|EVexMap4|NF, { Imm8, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++shd, 0x0fa4 | , i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Imm8, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++shd, 0x24 | , APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, { Imm8, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++shd, 0xa5 | , APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|DstVVVV|EVexMap4|NF, { ShiftCount, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++shd, 0x0fa5 | , i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { ShiftCount, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++shd, 0xa5 | , APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, { ShiftCount, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++shd, 0x0fa5 | , i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++ ++ + + // Control transfer instructions. +-call, 0xe8, No64, JumpDword|DefaultSize|No_bSuf|No_sSuf|No_qSuf|BNDPrefixOk, { Disp16|Disp32 } +-call, 0xe8, x64, Amd64|JumpDword|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64|BNDPrefixOk, { Disp16|Disp32 } +-call, 0xe8, x64, Intel64|JumpDword|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|BNDPrefixOk, { Disp32 } +-call, 0xff/2, No64, Modrm|JumpAbsolute|DefaultSize|No_bSuf|No_sSuf|No_qSuf|BNDPrefixOk|NoTrackPrefixOk, { Reg16|Reg32|Unspecified|BaseIndex } +-call, 0xff/2, x64, Amd64|Modrm|JumpAbsolute|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64|BNDPrefixOk|NoTrackPrefixOk, { Reg16|Reg64|Unspecified|BaseIndex } +-call, 0xff/2, x64, Intel64|Modrm|JumpAbsolute|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|BNDPrefixOk|NoTrackPrefixOk, { Reg64|Unspecified|BaseIndex } ++call, 0xe8, No64, JumpDword|ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf|BNDPrefixOk, { Disp16|Disp32 } ++call, 0xe8, x64, Amd64|JumpDword|ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64|BNDPrefixOk, { Disp16|Disp32 } ++call, 0xe8, x64, Intel64|JumpDword|ImplicitStackOp|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|BNDPrefixOk, { Disp32 } ++call, 0xff/2, No64, Modrm|JumpAbsolute|ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf|BNDPrefixOk|NoTrackPrefixOk, { Reg16|Reg32|Unspecified|BaseIndex } ++call, 0xff/2, x64, Amd64|Modrm|JumpAbsolute|ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64|BNDPrefixOk|NoTrackPrefixOk, { Reg16|Reg64|Unspecified|BaseIndex } ++call, 0xff/2, x64, Intel64|Modrm|JumpAbsolute|ImplicitStackOp|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|BNDPrefixOk|NoTrackPrefixOk, { Reg64|Unspecified|BaseIndex } + // Intel Syntax remaining call instances. +-call, 0x9a, No64, JumpInterSegment|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm16, Imm16|Imm32 } +-call, 0xff/3, 0, Amd64|Modrm|JumpAbsolute|DefaultSize|NoSuf, { Dword|Fword|BaseIndex } +-call, 0xff/3, x64, Intel64|Modrm|JumpAbsolute|NoSuf, { Dword|Fword|Tbyte|BaseIndex } ++call, 0x9a, No64, JumpInterSegment|ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm16, Imm16|Imm32 } ++call, 0xff/3, 0, Amd64|Modrm|JumpAbsolute|ImplicitStackOp|DefaultSize|NoSuf, { Dword|Fword|BaseIndex } ++call, 0xff/3, x64, Intel64|Modrm|JumpAbsolute|ImplicitStackOp|NoSuf, { Dword|Fword|Tbyte|BaseIndex } + lcall, 0x9a, No64, JumpInterSegment|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm16, Imm16|Imm32 } + lcall, 0xff/3, 0, Amd64|Modrm|JumpAbsolute|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Unspecified|BaseIndex } + lcall, 0xff/3, x64, Intel64|Modrm|JumpAbsolute|No_bSuf|No_sSuf, { Unspecified|BaseIndex } +@@ -459,22 +483,22 @@ ljmp, 0xea, No64, JumpInterSegment|No_bSuf|No_sSuf|No_qSuf, { Imm16, Imm16|Imm32 + ljmp, 0xff/5, 0, Amd64|Modrm|JumpAbsolute|No_bSuf|No_sSuf|No_qSuf, { Unspecified|BaseIndex } + ljmp, 0xff/5, x64, Intel64|Modrm|JumpAbsolute|No_bSuf|No_sSuf, { Unspecified|BaseIndex } + +-ret, 0xc3, No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|RepPrefixOk|BNDPrefixOk, {} +-ret, 0xc2, No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|RepPrefixOk|BNDPrefixOk, { Imm16 } +-ret, 0xc3, x64, Amd64|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64|RepPrefixOk|BNDPrefixOk, {} +-ret, 0xc2, x64, Amd64|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64|RepPrefixOk|BNDPrefixOk, { Imm16 } +-ret, 0xc3, x64, Intel64|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|RepPrefixOk|BNDPrefixOk, {} +-ret, 0xc2, x64, Intel64|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|RepPrefixOk|BNDPrefixOk, { Imm16 } ++ret, 0xc3, No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf|RepPrefixOk|BNDPrefixOk, {} ++ret, 0xc2, No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf|RepPrefixOk|BNDPrefixOk, { Imm16 } ++ret, 0xc3, x64, Amd64|ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64|RepPrefixOk|BNDPrefixOk, {} ++ret, 0xc2, x64, Amd64|ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64|RepPrefixOk|BNDPrefixOk, { Imm16 } ++ret, 0xc3, x64, Intel64|ImplicitStackOp|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|RepPrefixOk|BNDPrefixOk, {} ++ret, 0xc2, x64, Intel64|ImplicitStackOp|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|RepPrefixOk|BNDPrefixOk, { Imm16 } + lret, 0xcb, 0, DefaultSize|No_bSuf|No_sSuf, {} + lret, 0xca, 0, DefaultSize|No_bSuf|No_sSuf, { Imm16 } + // Intel Syntax. + retf, 0xcb, 0, DefaultSize|No_bSuf|No_sSuf, {} + retf, 0xca, 0, DefaultSize|No_bSuf|No_sSuf, { Imm16 } + +-enter, 0xc8, i186|No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm16, Imm8 } +-enter, 0xc8, x64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Imm16, Imm8 } +-leave, 0xc9, i186|No64, DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} +-leave, 0xc9, x64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, {} ++enter, 0xc8, i186&No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, { Imm16, Imm8 } ++enter, 0xc8, x64, ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, { Imm16, Imm8 } ++leave, 0xc9, i186&No64, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf|No_qSuf, {} ++leave, 0xc9, x64, ImplicitStackOp|DefaultSize|No_bSuf|No_lSuf|No_sSuf|NoRex64, {} + + +@@ -503,7 +527,7 @@ loopne, 0xe0, No64, JumpByte|No_bSuf|No_sSuf|No_qSuf, { Disp8 } + loopne, 0xe0, x64, JumpByte|No_bSuf|No_wSuf|No_sSuf|NoRex64, { Disp8 } + + // Set byte on flag instructions. +-set, 0xf9/0, i386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { Reg8|Byte|Unspecified|BaseIndex } ++set, 0xf9/0, i386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { Reg8|Unspecified|BaseIndex } + + // String manipulation. + cmps, 0xa6, 0, W|No_sSuf|RepPrefixOk, {} +@@ -540,58 +564,58 @@ xlat, 0xd7, 0, No_wSuf|No_lSuf|No_sSuf|No_qSuf, {} + xlat, 0xd7, 0, No_wSuf|No_lSuf|No_sSuf|No_qSuf|IsString, { Byte|Unspecified|BaseIndex } + + // Bit manipulation. +-bsf, 0xfbc, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|RepPrefixOk, { Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } +-bsr, 0xfbd, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|RepPrefixOk, { Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } +-bt, 0xfa3, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } ++bsf, 0xfbc, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|RepPrefixOk, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++bsr, 0xfbd, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|RepPrefixOk, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++bt, 0xfa3, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } + bt, 0xfba/4, i386, Modrm|No_bSuf|No_sSuf|Optimize, { Imm8, Reg16|Reg32|Reg64|Unspecified|BaseIndex } +-btc, 0xfbb, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|HLEPrefixLock, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } ++btc, 0xfbb, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|HLEPrefixLock, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } + btc, 0xfba/7, i386, Modrm|No_bSuf|No_sSuf|Optimize|HLEPrefixLock, { Imm8, Reg16|Reg32|Reg64|Unspecified|BaseIndex } +-btr, 0xfb3, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|HLEPrefixLock, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } ++btr, 0xfb3, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|HLEPrefixLock, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } + btr, 0xfba/6, i386, Modrm|No_bSuf|No_sSuf|Optimize|HLEPrefixLock, { Imm8, Reg16|Reg32|Reg64|Unspecified|BaseIndex } +-bts, 0xfab, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|HLEPrefixLock, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } ++bts, 0xfab, i386, Modrm|CheckOperandSize|No_bSuf|No_sSuf|HLEPrefixLock, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|Unspecified|BaseIndex } + bts, 0xfba/5, i386, Modrm|No_bSuf|No_sSuf|Optimize|HLEPrefixLock, { Imm8, Reg16|Reg32|Reg64|Unspecified|BaseIndex } + + // Interrupts & op. sys insns. + // See gas/config/tc-i386.c for conversion of 'int $3' into the special + // int 3 insn. +-int, 0xcd, 0, NoSuf, { Imm8 } +-int1, 0xf1, 0, NoSuf, {} +-int3, 0xcc, 0, NoSuf, {} +-into, 0xce, No64, NoSuf, {} +-iret, 0xcf, 0, DefaultSize|No_bSuf|No_sSuf, {} ++int, 0xcd, 0, ImplicitStackOp|NoSuf, { Imm8 } ++int1, 0xf1, 0, ImplicitStackOp|NoSuf, {} ++int3, 0xcc, 0, ImplicitStackOp|NoSuf, {} ++into, 0xce, No64, ImplicitStackOp|NoSuf, {} ++iret, 0xcf, 0, ImplicitStackOp|DefaultSize|No_bSuf|No_sSuf, {} + // i386sl, i486sl, later 486, and Pentium. + rsm, 0xfaa, i386, NoSuf, {} + +-bound, 0x62, i186|No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32, Dword|Qword|Unspecified|BaseIndex } ++bound, 0x62, i186&No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32, Dword|Qword|Unspecified|BaseIndex } + + hlt, 0xf4, 0, NoSuf, {} + +-nop, 0xf1f/0, Nop, Modrm|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex } ++nop, 0xf1f/0, Nop, Modrm|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Unspecified|BaseIndex } + + // nop is actually "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in + // 32bit mode and "xchg %rax,%rax" in 64bit mode. + nop, 0x90, 0, NoSuf|RepPrefixOk, {} + + // Protection control. +-arpl, 0x63, i286|No64, RegMem|CheckOperandSize|IgnoreSize|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32, Reg16|Reg32 } +-arpl, 0x63, i286|No64, Modrm|IgnoreSize|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32, Word|Unspecified|BaseIndex } ++arpl, 0x63, i286&No64, RegMem|CheckOperandSize|IgnoreSize|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32, Reg16|Reg32 } ++arpl, 0x63, i286&No64, Modrm|IgnoreSize|No_bSuf|No_sSuf|No_qSuf, { Reg16|Reg32, Word|Unspecified|BaseIndex } + lar, 0xf02, i286, Modrm|CheckOperandSize|No_bSuf|No_sSuf|NoRex64, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64 } + lar, 0xf02, i286, Modrm|No_bSuf|No_sSuf|NoRex64, { Reg16|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } +-lgdt, 0xf01/2, i286|No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Fword|Unspecified|BaseIndex } ++lgdt, 0xf01/2, i286&No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Fword|Unspecified|BaseIndex } + lgdt, 0xf01/2, x64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Tbyte|Unspecified|BaseIndex } +-lidt, 0xf01/3, i286|No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Fword|Unspecified|BaseIndex } ++lidt, 0xf01/3, i286&No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Fword|Unspecified|BaseIndex } + lidt, 0xf01/3, x64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Tbyte|Unspecified|BaseIndex } + lldt, 0xf00/2, i286, Modrm|IgnoreSize|No_bSuf|No_sSuf|NoRex64, { Reg16|Reg32|Reg64 } + lldt, 0xf00/2, i286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf, { Word|Unspecified|BaseIndex } +-lmsw, 0xf01/6, i286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf, { Reg16|Word|Unspecified|BaseIndex } ++lmsw, 0xf01/6, i286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf, { Reg16|Unspecified|BaseIndex } + lsl, 0xf03, i286, Modrm|CheckOperandSize|No_bSuf|No_sSuf|NoRex64, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64 } + lsl, 0xf03, i286, Modrm|No_bSuf|No_sSuf|NoRex64, { Reg16|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } + ltr, 0xf00/3, i286, Modrm|IgnoreSize|No_bSuf|No_sSuf|NoRex64, { Reg16|Reg32|Reg64 } + ltr, 0xf00/3, i286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf, { Word|Unspecified|BaseIndex } + +-sgdt, 0xf01/0, i286|No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Fword|Unspecified|BaseIndex } ++sgdt, 0xf01/0, i286&No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Fword|Unspecified|BaseIndex } + sgdt, 0xf01/0, x64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Tbyte|Unspecified|BaseIndex } +-sidt, 0xf01/1, i286|No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Fword|Unspecified|BaseIndex } ++sidt, 0xf01/1, i286&No64, Modrm|No_bSuf|No_sSuf|No_qSuf, { Fword|Unspecified|BaseIndex } + sidt, 0xf01/1, x64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Tbyte|Unspecified|BaseIndex } + sldt, 0xf00/0, i286, Modrm|No_bSuf|No_sSuf|NoRex64, { Reg16|Reg32|Reg64 } + sldt, 0xf00/0, i286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf, { Word|Unspecified|BaseIndex } +@@ -700,14 +724,13 @@ faddp, 0xdec1, FP, NoSuf, {} + fsub, 0xd8/4, FP, Modrm|NoSuf, { FloatReg } + fsub, 0xd8/4, FP, D|Modrm|NoSuf, { FloatReg, FloatAcc } + // alias for fsubp +-fsub, 0xdee1, FP, NoSuf|Ugh|ATTMnemonic|ATTSyntax, {} +-fsub, 0xdee9, FP, NoSuf|Ugh|ATTMnemonic, {} ++fsub, 0xdee1, FP, NoSuf|Ugh|ATTMnemonic, {} + fsub, 0xd8/4, FP, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf, { Dword|Qword|Unspecified|BaseIndex } + fisub, 0xde/4, FP, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf, { Word|Dword|Unspecified|BaseIndex } + +-fsubp, 0xde/4, FP, Modrm|NoSuf|ATTMnemonic|ATTSyntax, { FloatAcc, FloatReg } +-fsubp, 0xde/4, FP, Modrm|NoSuf|ATTMnemonic|ATTSyntax, { FloatReg } +-fsubp, 0xdee1, FP, NoSuf|ATTMnemonic|ATTSyntax, {} ++fsubp, 0xde/4, FP, Modrm|NoSuf|ATTMnemonic, { FloatAcc, FloatReg } ++fsubp, 0xde/4, FP, Modrm|NoSuf|ATTMnemonic, { FloatReg } ++fsubp, 0xdee1, FP, NoSuf|ATTMnemonic, {} + fsubp, 0xde/5, FP, Modrm|NoSuf, { FloatAcc, FloatReg } + fsubp, 0xde/5, FP, Modrm|NoSuf, { FloatReg } + fsubp, 0xdee9, FP, NoSuf, {} +@@ -716,14 +739,13 @@ fsubp, 0xdee9, FP, NoSuf, {} + fsubr, 0xd8/5, FP, Modrm|NoSuf, { FloatReg } + fsubr, 0xd8/5, FP, D|Modrm|NoSuf, { FloatReg, FloatAcc } + // alias for fsubrp +-fsubr, 0xdee9, FP, NoSuf|Ugh|ATTMnemonic|ATTSyntax, {} +-fsubr, 0xdee1, FP, NoSuf|Ugh|ATTMnemonic, {} ++fsubr, 0xdee9, FP, NoSuf|Ugh|ATTMnemonic, {} + fsubr, 0xd8/5, FP, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf, { Dword|Qword|Unspecified|BaseIndex } + fisubr, 0xde/5, FP, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf, { Word|Dword|Unspecified|BaseIndex } + +-fsubrp, 0xde/5, FP, Modrm|NoSuf|ATTMnemonic|ATTSyntax, { FloatAcc, FloatReg } +-fsubrp, 0xde/5, FP, Modrm|NoSuf|ATTMnemonic|ATTSyntax, { FloatReg } +-fsubrp, 0xdee9, FP, NoSuf|ATTMnemonic|ATTSyntax, {} ++fsubrp, 0xde/5, FP, Modrm|NoSuf|ATTMnemonic, { FloatAcc, FloatReg } ++fsubrp, 0xde/5, FP, Modrm|NoSuf|ATTMnemonic, { FloatReg } ++fsubrp, 0xdee9, FP, NoSuf|ATTMnemonic, {} + fsubrp, 0xde/4, FP, Modrm|NoSuf, { FloatAcc, FloatReg } + fsubrp, 0xde/4, FP, Modrm|NoSuf, { FloatReg } + fsubrp, 0xdee1, FP, NoSuf, {} +@@ -745,14 +767,13 @@ fmulp, 0xdec9, FP, NoSuf, {} + fdiv, 0xd8/6, FP, Modrm|NoSuf, { FloatReg } + fdiv, 0xd8/6, FP, D|Modrm|NoSuf, { FloatReg, FloatAcc } + // alias for fdivp +-fdiv, 0xdef1, FP, NoSuf|Ugh|ATTMnemonic|ATTSyntax, {} +-fdiv, 0xdef9, FP, NoSuf|Ugh|ATTMnemonic, {} ++fdiv, 0xdef1, FP, NoSuf|Ugh|ATTMnemonic, {} + fdiv, 0xd8/6, FP, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf, { Dword|Qword|Unspecified|BaseIndex } + fidiv, 0xde/6, FP, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf, { Word|Dword|Unspecified|BaseIndex } + +-fdivp, 0xde/6, FP, Modrm|NoSuf|ATTMnemonic|ATTSyntax, { FloatAcc, FloatReg } +-fdivp, 0xde/6, FP, Modrm|NoSuf|ATTMnemonic|ATTSyntax, { FloatReg } +-fdivp, 0xdef1, FP, NoSuf|ATTMnemonic|ATTSyntax, {} ++fdivp, 0xde/6, FP, Modrm|NoSuf|ATTMnemonic, { FloatAcc, FloatReg } ++fdivp, 0xde/6, FP, Modrm|NoSuf|ATTMnemonic, { FloatReg } ++fdivp, 0xdef1, FP, NoSuf|ATTMnemonic, {} + fdivp, 0xde/7, FP, Modrm|NoSuf, { FloatAcc, FloatReg } + fdivp, 0xde/7, FP, Modrm|NoSuf, { FloatReg } + fdivp, 0xdef9, FP, NoSuf, {} +@@ -761,14 +782,13 @@ fdivp, 0xdef9, FP, NoSuf, {} + fdivr, 0xd8/7, FP, Modrm|NoSuf, { FloatReg } + fdivr, 0xd8/7, FP, D|Modrm|NoSuf, { FloatReg, FloatAcc } + // alias for fdivrp +-fdivr, 0xdef9, FP, NoSuf|Ugh|ATTMnemonic|ATTSyntax, {} +-fdivr, 0xdef1, FP, NoSuf|Ugh|ATTMnemonic, {} ++fdivr, 0xdef9, FP, NoSuf|Ugh|ATTMnemonic, {} + fdivr, 0xd8/7, FP, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf, { Dword|Qword|Unspecified|BaseIndex } + fidivr, 0xde/7, FP, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf, { Word|Dword|Unspecified|BaseIndex } + +-fdivrp, 0xde/7, FP, Modrm|NoSuf|ATTMnemonic|ATTSyntax, { FloatAcc, FloatReg } +-fdivrp, 0xde/7, FP, Modrm|NoSuf|ATTMnemonic|ATTSyntax, { FloatReg } +-fdivrp, 0xdef9, FP, NoSuf|ATTMnemonic|ATTSyntax, {} ++fdivrp, 0xde/7, FP, Modrm|NoSuf|ATTMnemonic, { FloatAcc, FloatReg } ++fdivrp, 0xde/7, FP, Modrm|NoSuf|ATTMnemonic, { FloatReg } ++fdivrp, 0xdef9, FP, NoSuf|ATTMnemonic, {} + fdivrp, 0xde/6, FP, Modrm|NoSuf, { FloatAcc, FloatReg } + fdivrp, 0xde/6, FP, Modrm|NoSuf, { FloatReg } + fdivrp, 0xdef1, FP, NoSuf, {} +@@ -831,14 +851,14 @@ fwait, 0x9b, FP, NoSuf, {} + + // Opcode prefixes; we allow them as separate insns too. + +-addr16, 0x67, i386|No64, Size16|IgnoreSize|NoSuf|IsPrefix, {} ++addr16, 0x67, i386&No64, Size16|IgnoreSize|NoSuf|IsPrefix, {} + addr32, 0x67, i386, Size32|IgnoreSize|NoSuf|IsPrefix, {} +-aword, 0x67, i386|No64, Size16|IgnoreSize|NoSuf|IsPrefix, {} ++aword, 0x67, i386&No64, Size16|IgnoreSize|NoSuf|IsPrefix, {} + adword, 0x67, i386, Size32|IgnoreSize|NoSuf|IsPrefix, {} + data16, 0x66, i386, Size16|IgnoreSize|NoSuf|IsPrefix, {} +-data32, 0x66, i386|No64, Size32|IgnoreSize|NoSuf|IsPrefix, {} ++data32, 0x66, i386&No64, Size32|IgnoreSize|NoSuf|IsPrefix, {} + word, 0x66, i386, Size16|IgnoreSize|NoSuf|IsPrefix, {} +-dword, 0x66, i386|No64, Size32|IgnoreSize|NoSuf|IsPrefix, {} ++dword, 0x66, i386&No64, Size32|IgnoreSize|NoSuf|IsPrefix, {} + lock, 0xf0, 0, NoSuf|IsPrefix, {} + wait, 0x9b, 0, NoSuf|IsPrefix, {} + cs, 0x2e, 0, NoSuf|IsPrefix, {} +@@ -888,18 +908,18 @@ rex.wrxb, 0x4f, x64, NoSuf|IsPrefix, {} + + // Pseudo prefixes (base_opcode == PSEUDO_PREFIX) + +- ++ rex:REX:x64, rex2:REX2:APX_F, nf:NF:APX_F, + ++ nooptimize:NoOptimize:0> + + {}, PSEUDO_PREFIX/Prefix_, , NoSuf|IsPrefix, {} + +-// 486 extensions. ++// 486 extensions (BSWAP moved elsewhere). + +-bswap, 0xfc8, i486, No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64 } +-xadd, 0xfc0, i486, W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } +-cmpxchg, 0xfb0, i486, W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Byte|Word|Dword|Qword|Unspecified|BaseIndex } ++xadd, 0xfc0, i486, W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } ++cmpxchg, 0xfb0, i486, W|CheckOperandSize|Modrm|No_sSuf|HLEPrefixLock, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|Unspecified|BaseIndex } + invd, 0xf08, i486, NoSuf, {} + wbinvd, 0xf09, i486, NoSuf, {} + invlpg, 0xf01/7, i486, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex } +@@ -915,13 +935,13 @@ cmpxchg8b, 0xfc7/1, i586, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64|HLEPrefi + + // Pentium II/Pentium Pro extensions. + sysenter, 0xf34, x64, Intel64Only|NoSuf, {} +-sysenter, 0xf34, i686|No64, NoSuf, {} ++sysenter, 0xf34, i686&No64, NoSuf, {} + sysexit, 0xf35, x64, Intel64Only|No_bSuf|No_wSuf|No_sSuf, {} +-sysexit, 0xf35, i686|No64, NoSuf, {} ++sysexit, 0xf35, i686&No64, NoSuf, {} + fxsave, 0xfae/0, FXSR, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Unspecified|BaseIndex } +-fxsave64, 0xfae/0, FXSR|x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } ++fxsave64, 0xfae/0, FXSR&x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } + fxrstor, 0xfae/1, FXSR, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Unspecified|BaseIndex } +-fxrstor64, 0xfae/1, FXSR|x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } ++fxrstor64, 0xfae/1, FXSR&x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } + rdpmc, 0xf33, i686, NoSuf, {} + // official undefined instr. + ud2, 0xf0b, i186, NoSuf, {} +@@ -934,7 +954,8 @@ ud2b, 0xfb9, i186, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|U + // 3rd official undefined instr (older CPUs don't take a ModR/M byte) + ud0, 0xfff, i186, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } + +-cmov, 0xf4, CMOV, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++cmov, 0x4, CMOV&APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|DstVVVV|EVexMap4, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64 } ++cmov, 0xf4, CMOV, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } + + fcmovb, 0xda/0, i687, Modrm|NoSuf, { FloatReg, FloatAcc } + fcmovnae, 0xda/0, i687, Modrm|NoSuf, { FloatReg, FloatAcc } +@@ -992,9 +1013,9 @@ pause, 0xf390, i186, NoSuf, {} + b:0:VexW0:Byte:AVX512DQ:66:AVX512VBMI, + + w:1:VexW1:Word:AVX512F::AVX512BW> + +- ++ + + emms, 0xf77, MMX, NoSuf, {} + // These really shouldn't allow for Reg64 (movq is the right mnemonic for +@@ -1002,21 +1023,21 @@ emms, 0xf77, MMX, NoSuf, {} + // spec). AMD's spec, having been in existence for much longer, failed to + // recognize that and specified movd for 32- and 64-bit operations. + movd, 0x666e, AVX, D|Modrm|Vex128|Space0F|VexW0|NoSuf|SSE2AVX, { Reg32|Unspecified|BaseIndex, RegXMM } +-movd, 0x666e, AVX|x64, D|Modrm|Vex=1|Space0F|VexW1|NoSuf|Size64|SSE2AVX, { Reg64|BaseIndex, RegXMM } ++movd, 0x666e, AVX&x64, D|Modrm|Vex=1|Space0F|VexW1|NoSuf|Size64|SSE2AVX, { Reg64|BaseIndex, RegXMM } + movd, 0x660f6e, SSE2, D|Modrm|IgnoreSize|NoSuf, { Reg32|Unspecified|BaseIndex, RegXMM } +-movd, 0x660f6e, SSE2|x64, D|Modrm|NoSuf|Size64, { Reg64|BaseIndex, RegXMM } ++movd, 0x660f6e, SSE2&x64, D|Modrm|NoSuf|Size64, { Reg64|BaseIndex, RegXMM } + // The MMX templates have to remain after at least the SSE2AVX ones. + movd, 0xf6e, MMX, D|Modrm|IgnoreSize|NoSuf, { Reg32|Unspecified|BaseIndex, RegMMX } +-movd, 0xf6e, MMX|x64, D|Modrm|NoSuf|Size64, { Reg64|BaseIndex, RegMMX } +-movq, 0xf37e, AVX, Load|Modrm|Vex=1|Space0F|VexWIG|NoSuf|SSE2AVX, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } +-movq, 0x66d6, AVX, Modrm|Vex=1|Space0F|VexWIG|NoSuf|SSE2AVX, { RegXMM, Qword|Unspecified|BaseIndex|RegXMM } +-movq, 0x666e, AVX|x64, D|Modrm|Vex=1|Space0F|VexW1|NoSuf|Size64|SSE2AVX, { Reg64|Unspecified|BaseIndex, RegXMM } ++movd, 0xf6e, MMX&x64, D|Modrm|NoSuf|Size64, { Reg64|BaseIndex, RegMMX } ++movq, 0xf37e, AVX, Load|Modrm|Vex128|Space0F|VexW0|NoSuf|SSE2AVX, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } ++movq, 0x66d6, AVX, Modrm|Vex128|Space0F|VexW0|NoSuf|SSE2AVX, { RegXMM, Qword|Unspecified|BaseIndex|RegXMM } ++movq, 0x666e, AVX&x64, D|Modrm|Vex=1|Space0F|VexW1|NoSuf|Size64|SSE2AVX, { Reg64|Unspecified|BaseIndex, RegXMM } + movq, 0xf30f7e, SSE2, Load|Modrm|NoSuf, { Unspecified|Qword|BaseIndex|RegXMM, RegXMM } + movq, 0x660fd6, SSE2, Modrm|NoSuf, { RegXMM, Unspecified|Qword|BaseIndex|RegXMM } +-movq, 0x660f6e, SSE2|x64, D|Modrm|NoSuf|Size64, { Reg64|Unspecified|BaseIndex, RegXMM } ++movq, 0x660f6e, SSE2&x64, D|Modrm|NoSuf|Size64, { Reg64|Unspecified|BaseIndex, RegXMM } + // The MMX templates have to remain after at least the SSE2AVX ones. + movq, 0xf6f, MMX, D|Modrm|NoSuf, { Unspecified|Qword|BaseIndex|RegMMX, RegMMX } +-movq, 0xf6e, MMX|x64, D|Modrm|NoSuf|Size64, { Reg64|Unspecified|BaseIndex, RegMMX } ++movq, 0xf6e, MMX&x64, D|Modrm|NoSuf|Size64, { Reg64|Unspecified|BaseIndex, RegMMX } + packssdw, 0x0f6b, , Modrm||NoSuf, { ||Unspecified|BaseIndex, } + packsswb, 0x0f63, , Modrm||NoSuf, { ||Unspecified|BaseIndex, } + packuswb, 0x0f67, , Modrm||NoSuf, { ||Unspecified|BaseIndex, } +@@ -1083,11 +1104,11 @@ cmpss, 0xf30fc2, , Modrm|||NoSuf, { Imm8, Dwor + comiss, 0x0f2f, , Modrm||NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM } + cvtpi2ps, 0xf2a, SSE, Modrm|NoSuf, { Qword|Unspecified|BaseIndex|RegMMX, RegXMM } + cvtps2pi, 0xf2d, SSE, Modrm|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegMMX } +-cvtsi2ss, 0xf30f2a, |No64, Modrm|||IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32|Unspecified|BaseIndex, RegXMM } +-cvtsi2ss, 0xf32a, AVX|x64, Modrm|Vex=3|Space0F|VexVVVV|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|SSE2AVX|ATTSyntax, { Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-cvtsi2ss, 0xf32a, AVX|x64, Modrm|Vex=3|Space0F|VexVVVV|No_bSuf|No_wSuf|No_sSuf|SSE2AVX|IntelSyntax, { Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-cvtsi2ss, 0xf30f2a, SSE|x64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|ATTSyntax, { Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-cvtsi2ss, 0xf30f2a, SSE|x64, Modrm|No_bSuf|No_wSuf|No_sSuf|IntelSyntax, { Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++cvtsi2ss, 0xf30f2a, &No64, Modrm|||IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32|Unspecified|BaseIndex, RegXMM } ++cvtsi2ss, 0xf32a, AVX&x64, Modrm|Vex=3|Space0F|VexVVVV|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|SSE2AVX|ATTSyntax, { Reg32|Reg64|Unspecified|BaseIndex, RegXMM } ++cvtsi2ss, 0xf32a, AVX&x64, Modrm|Vex=3|Space0F|VexVVVV|No_bSuf|No_wSuf|No_sSuf|SSE2AVX|IntelSyntax, { Reg32|Reg64|Unspecified|BaseIndex, RegXMM } ++cvtsi2ss, 0xf30f2a, SSE&x64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|ATTSyntax, { Reg32|Reg64|Unspecified|BaseIndex, RegXMM } ++cvtsi2ss, 0xf30f2a, SSE&x64, Modrm|No_bSuf|No_wSuf|No_sSuf|IntelSyntax, { Reg32|Reg64|Unspecified|BaseIndex, RegXMM } + cvtss2si, 0xf32d, AVX, Modrm|VexLIG|Space0F|No_bSuf|No_wSuf|No_sSuf|SSE2AVX, { Dword|Unspecified|BaseIndex|RegXMM, Reg32|Reg64 } + cvtss2si, 0xf30f2d, SSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Dword|Unspecified|BaseIndex|RegXMM, Reg32|Reg64 } + cvttps2pi, 0xf2c, SSE, Modrm|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegMMX } +@@ -1178,11 +1199,11 @@ comisd, 0x660f2f, , Modrm||NoSuf, { Qword|Unspecified + cvtpi2pd, 0x660f2a, SSE2, Modrm|NoSuf, { RegMMX, RegXMM } + cvtpi2pd, 0xf3e6, AVX, Modrm|Vex|Space0F|VexW0|NoSuf|SSE2AVX, { Qword|Unspecified|BaseIndex, RegXMM } + cvtpi2pd, 0x660f2a, SSE2, Modrm|NoSuf, { Qword|Unspecified|BaseIndex, RegXMM } +-cvtsi2sd, 0xf20f2a, |No64, Modrm|IgnoreSize|||No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32|Unspecified|BaseIndex, RegXMM } +-cvtsi2sd, 0xf22a, AVX|x64, Modrm|Vex=3|Space0F|VexVVVV|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|SSE2AVX|ATTSyntax, { Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-cvtsi2sd, 0xf22a, AVX|x64, Modrm|Vex=3|Space0F|VexVVVV|No_bSuf|No_wSuf|No_sSuf|SSE2AVX|IntelSyntax, { Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-cvtsi2sd, 0xf20f2a, SSE2|x64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|ATTSyntax, { Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-cvtsi2sd, 0xf20f2a, SSE2|x64, Modrm|No_bSuf|No_wSuf|No_sSuf|IntelSyntax, { Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++cvtsi2sd, 0xf20f2a, &No64, Modrm|IgnoreSize|||No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32|Unspecified|BaseIndex, RegXMM } ++cvtsi2sd, 0xf22a, AVX&x64, Modrm|Vex=3|Space0F|VexVVVV|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|SSE2AVX|ATTSyntax, { Reg32|Reg64|Unspecified|BaseIndex, RegXMM } ++cvtsi2sd, 0xf22a, AVX&x64, Modrm|Vex=3|Space0F|VexVVVV|No_bSuf|No_wSuf|No_sSuf|SSE2AVX|IntelSyntax, { Reg32|Reg64|Unspecified|BaseIndex, RegXMM } ++cvtsi2sd, 0xf20f2a, SSE2&x64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|ATTSyntax, { Reg32|Reg64|Unspecified|BaseIndex, RegXMM } ++cvtsi2sd, 0xf20f2a, SSE2&x64, Modrm|No_bSuf|No_wSuf|No_sSuf|IntelSyntax, { Reg32|Reg64|Unspecified|BaseIndex, RegXMM } + divpd, 0x660f5e, , Modrm|||NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } + divsd, 0xf20f5e, , Modrm|||NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } + maxpd, 0x660f5f, , Modrm|||NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } +@@ -1271,7 +1292,7 @@ fisttpll, 0xdd/1, FISTTP, Modrm|NoSuf|ATTSyntax, { Unspecified|BaseIndex } + + // CMPXCHG16B instruction. + +-cmpxchg16b, 0xfc7/1, CX16|x64, Modrm|NoSuf|Size64|LockPrefixOk, { Oword|Unspecified|BaseIndex } ++cmpxchg16b, 0xfc7/1, CX16, Modrm|NoSuf|Size64|LockPrefixOk, { Oword|Unspecified|BaseIndex } + + // MONITOR instructions. + +@@ -1281,7 +1302,7 @@ monitor, 0xf01c8, MONITOR, NoSuf, {} + // all modes. + monitor, 0xf01c8, MONITOR, AddrPrefixOpReg|NoSuf, { Acc|Word|Dword|Qword, RegC|Dword, RegD|Dword } + // The 64-bit form exists only for compatibility with older gas. +-monitor, 0xf01c8, MONITOR|x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword, RegD|Qword } ++monitor, 0xf01c8, MONITOR&x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword, RegD|Qword } + mwait, 0xf01c9, MONITOR, NoSuf, {} + // mwait is very special. AX and CX are always 32 bits. + // The 64-bit form exists only for compatibility with older gas. +@@ -1295,10 +1316,10 @@ vmlaunch, 0xf01c2, VMX, NoSuf, {} + vmresume, 0xf01c3, VMX, NoSuf, {} + vmptrld, 0xfc7/6, VMX, Modrm|NoSuf, { Qword|Unspecified|BaseIndex } + vmptrst, 0xfc7/7, VMX, Modrm|NoSuf, { Qword|Unspecified|BaseIndex } +-vmread, 0xf78, VMX|No64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32, Reg32|Unspecified|BaseIndex } +-vmread, 0xf78, VMX|x64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Reg64, Reg64|Qword|Unspecified|BaseIndex } +-vmwrite, 0xf79, VMX|No64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32|Unspecified|BaseIndex, Reg32 } +-vmwrite, 0xf79, VMX|x64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Reg64|Qword|Unspecified|BaseIndex, Reg64 } ++vmread, 0xf78, VMX&No64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32, Reg32|Unspecified|BaseIndex } ++vmread, 0xf78, VMX&x64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Reg64, Reg64|Unspecified|BaseIndex } ++vmwrite, 0xf79, VMX&No64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32|Unspecified|BaseIndex, Reg32 } ++vmwrite, 0xf79, VMX&x64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoRex64, { Reg64|Unspecified|BaseIndex, Reg64 } + vmxoff, 0xf01c4, VMX, NoSuf, {} + vmxon, 0xf30fc7/6, VMX, Modrm|NoSuf, { Qword|Unspecified|BaseIndex } + +@@ -1312,15 +1333,18 @@ getsec, 0xf37, SMX, NoSuf, {} + + // EPT instructions. + +-invept, 0x660f3880, EPT|No64, Modrm|IgnoreSize|NoSuf, { Oword|Unspecified|BaseIndex, Reg32 } +-invept, 0x660f3880, EPT|x64, Modrm|NoSuf|NoRex64, { Oword|Unspecified|BaseIndex, Reg64 } +-invvpid, 0x660f3881, EPT|No64, Modrm|IgnoreSize|NoSuf, { Oword|Unspecified|BaseIndex, Reg32 } +-invvpid, 0x660f3881, EPT|x64, Modrm|NoSuf|NoRex64, { Oword|Unspecified|BaseIndex, Reg64 } ++invept, 0x660f3880, EPT&No64, Modrm|IgnoreSize|NoSuf, { Oword|Unspecified|BaseIndex, Reg32 } ++invept, 0x660f3880, EPT&x64, Modrm|NoSuf|NoRex64, { Oword|Unspecified|BaseIndex, Reg64 } ++invept, 0xf3f0, EPT&APX_F, Modrm|NoSuf|EVexMap4|VexWIG, { Oword|Unspecified|BaseIndex, Reg64 } ++invvpid, 0x660f3881, EPT&No64, Modrm|IgnoreSize|NoSuf, { Oword|Unspecified|BaseIndex, Reg32 } ++invvpid, 0x660f3881, EPT&x64, Modrm|NoSuf|NoRex64, { Oword|Unspecified|BaseIndex, Reg64 } ++invvpid, 0xf3f1, EPT&APX_F, Modrm|NoSuf|EVexMap4|VexWIG, { Oword|Unspecified|BaseIndex, Reg64 } + + // INVPCID instruction + +-invpcid, 0x660f3882, INVPCID|No64, Modrm|IgnoreSize|NoSuf, { Oword|Unspecified|BaseIndex, Reg32 } +-invpcid, 0x660f3882, INVPCID|x64, Modrm|NoSuf|NoRex64, { Oword|Unspecified|BaseIndex, Reg64 } ++invpcid, 0x660f3882, INVPCID&No64, Modrm|IgnoreSize|NoSuf, { Oword|Unspecified|BaseIndex, Reg32 } ++invpcid, 0x660f3882, INVPCID&x64, Modrm|NoSuf|NoRex64, { Oword|Unspecified|BaseIndex, Reg64 } ++invpcid, 0xf3f2, INVPCID&APX_F, Modrm|NoSuf|EVexMap4|VexWIG, { Oword|Unspecified|BaseIndex, Reg64 } + + // SSSE3 instructions. + +@@ -1355,10 +1379,10 @@ blendvp, 0x664a | , AVX, Modrm|Vex128|Space0F3A|VexVVVV|VexW0|NoSuf| + blendvp, 0x660f3814 | , SSE4_1, Modrm|NoSuf, { Acc|Xmmword, RegXMM|Unspecified|BaseIndex, RegXMM } + blendvp, 0x660f3814 | , SSE4_1, Modrm|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } + dpp, 0x660f3a40 | , , Modrm|||NoSuf, { Imm8|Imm8S, RegXMM|Unspecified|BaseIndex, RegXMM } +-extractps, 0x6617, AVX, Modrm|Vex|Space0F3A|VexWIG|NoSuf|SSE2AVX, { Imm8, RegXMM, Reg32|Dword|Unspecified|BaseIndex } +-extractps, 0x6617, AVX|x64, RegMem|Vex|Space0F3A|VexWIG|NoSuf|SSE2AVX, { Imm8, RegXMM, Reg64 } +-extractps, 0x660f3a17, SSE4_1, Modrm|IgnoreSize|NoSuf, { Imm8, RegXMM, Reg32|Dword|Unspecified|BaseIndex } +-extractps, 0x660f3a17, SSE4_1|x64, RegMem|NoSuf|NoRex64, { Imm8, RegXMM, Reg64 } ++extractps, 0x6617, AVX, Modrm|Vex128|Space0F3A|VexW0|NoSuf|SSE2AVX, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex } ++extractps, 0x6617, AVX&x64, RegMem|Vex128|Space0F3A|VexW1|NoSuf|SSE2AVX, { Imm8, RegXMM, Reg64 } ++extractps, 0x660f3a17, SSE4_1, Modrm|IgnoreSize|NoSuf, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex } ++extractps, 0x660f3a17, SSE4_1&x64, RegMem|NoSuf|NoRex64, { Imm8, RegXMM, Reg64 } + insertps, 0x660f3a21, , Modrm|||NoSuf, { Imm8, Dword|Unspecified|BaseIndex|RegXMM, RegXMM } + movntdqa, 0x660f382a, , Modrm||NoSuf, { Xmmword|Unspecified|BaseIndex, RegXMM } + mpsadbw, 0x660f3a42, , Modrm|||NoSuf, { Imm8|Imm8S, RegXMM|Unspecified|BaseIndex, RegXMM } +@@ -1372,14 +1396,14 @@ pcmpeqq, 0x660f3829, , Modrm|||NoSuf|O + pextr, 0x660f3a14 | , , RegMem||NoSuf|IgnoreSize|NoRex64, { Imm8, RegXMM, Reg32|Reg64 } + pextr, 0x660f3a14 | , , Modrm||NoSuf, { Imm8, RegXMM, |Unspecified|BaseIndex } + pextrd, 0x660f3a16, , Modrm||NoSuf|IgnoreSize, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex } +-pextrq, 0x6616, AVX|x64, Modrm|Vex|Space0F3A|VexW1|NoSuf|SSE2AVX, { Imm8, RegXMM, Reg64|Unspecified|BaseIndex } +-pextrq, 0x660f3a16, SSE4_1|x64, Modrm|Size64|NoSuf, { Imm8, RegXMM, Reg64|Unspecified|BaseIndex } ++pextrq, 0x6616, AVX&x64, Modrm|Vex|Space0F3A|VexW1|NoSuf|SSE2AVX, { Imm8, RegXMM, Reg64|Unspecified|BaseIndex } ++pextrq, 0x660f3a16, SSE4_1&x64, Modrm|Size64|NoSuf, { Imm8, RegXMM, Reg64|Unspecified|BaseIndex } + phminposuw, 0x660f3841, , Modrm||NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } + pinsrb, 0x660f3a20, , Modrm|||NoSuf|IgnoreSize|NoRex64, { Imm8, Reg32|Reg64, RegXMM } + pinsrb, 0x660f3a20, , Modrm|||NoSuf, { Imm8, Byte|Unspecified|BaseIndex, RegXMM } + pinsrd, 0x660f3a22, , Modrm|||NoSuf|IgnoreSize, { Imm8, Reg32|Unspecified|BaseIndex, RegXMM } +-pinsrq, 0x6622, AVX|x64, Modrm|Vex|Space0F3A|VexVVVV|VexW1|NoSuf|SSE2AVX, { Imm8, Reg64|Unspecified|BaseIndex, RegXMM } +-pinsrq, 0x660f3a22, SSE4_1|x64, Modrm|Size64|NoSuf, { Imm8, Reg64|Unspecified|BaseIndex, RegXMM } ++pinsrq, 0x6622, AVX&x64, Modrm|Vex|Space0F3A|VexVVVV|VexW1|NoSuf|SSE2AVX, { Imm8, Reg64|Unspecified|BaseIndex, RegXMM } ++pinsrq, 0x660f3a22, SSE4_1&x64, Modrm|Size64|NoSuf, { Imm8, Reg64|Unspecified|BaseIndex, RegXMM } + pmaxsb, 0x660f383c, , Modrm|||NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } + pmaxsd, 0x660f383d, , Modrm|||NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } + pmaxud, 0x660f383f, , Modrm|||NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } +@@ -1411,33 +1435,36 @@ rounds, 0x660f3a0a | , , Modrm|| + + pcmpgtq, 0x660f3837, , Modrm|||NoSuf|Optimize, { RegXMM|Unspecified|BaseIndex, RegXMM } +-pcmpestri, 0x660f3a61, |No64, Modrm||NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } +-pcmpestri, 0x6661, AVX|x64, Modrm|Vex|Space0F3A|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|SSE2AVX, { Imm8, Xmmword|Unspecified|BaseIndex|RegXMM, RegXMM } +-pcmpestri, 0x660f3a61, SSE4_2|x64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Imm8, Xmmword|Unspecified|BaseIndex|RegXMM, RegXMM } +-pcmpestrm, 0x660f3a60, |No64, Modrm||NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } +-pcmpestrm, 0x6660, AVX|x64, Modrm|Vex|Space0F3A|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|SSE2AVX, { Imm8, Xmmword|Unspecified|BaseIndex|RegXMM, RegXMM } +-pcmpestrm, 0x660f3a60, SSE4_2|x64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Imm8, Xmmword|Unspecified|BaseIndex|RegXMM, RegXMM } ++pcmpestri, 0x660f3a61, &No64, Modrm||NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } ++pcmpestri, 0x6661, AVX&x64, Modrm|Vex|Space0F3A|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|SSE2AVX, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } ++pcmpestri, 0x660f3a61, SSE4_2&x64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } ++pcmpestrm, 0x660f3a60, &No64, Modrm||NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } ++pcmpestrm, 0x6660, AVX&x64, Modrm|Vex|Space0F3A|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|SSE2AVX, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } ++pcmpestrm, 0x660f3a60, SSE4_2&x64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } + pcmpistri, 0x660f3a63, , Modrm||NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } + pcmpistrm, 0x660f3a62, , Modrm||NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } + crc32, 0xf20f38f0, SSE4_2, W|Modrm|No_sSuf|No_qSuf, { Reg8|Reg16|Reg32|Unspecified|BaseIndex, Reg32 } +-crc32, 0xf20f38f0, SSE4_2|x64, W|Modrm|No_wSuf|No_lSuf|No_sSuf, { Reg8|Reg64|Unspecified|BaseIndex, Reg64 } ++crc32, 0xf20f38f0, SSE4_2&x64, W|Modrm|No_wSuf|No_lSuf|No_sSuf, { Reg8|Reg64|Unspecified|BaseIndex, Reg64 } ++crc32, 0xf0, APX_F, W|Modrm|No_sSuf|No_qSuf|EVexMap4, { Reg8|Reg16|Reg32|Unspecified|BaseIndex, Reg32 } ++crc32, 0xf0, APX_F, W|Modrm|No_wSuf|No_lSuf|No_sSuf|EVexMap4, { Reg8|Reg64|Unspecified|BaseIndex, Reg64 } + + // xsave/xrstor New Instructions. + +-xsave, 0xfae/4, Xsave, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Unspecified|BaseIndex } +-xsave64, 0xfae/4, Xsave|x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } +-xrstor, 0xfae/5, Xsave, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Unspecified|BaseIndex } +-xrstor64, 0xfae/5, Xsave|x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } ++xsave, 0xfae/4, Xsave, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoEgpr, { Unspecified|BaseIndex } ++xsave64, 0xfae/4, Xsave&x64, Modrm|NoSuf|Size64|NoEgpr, { Unspecified|BaseIndex } ++xrstor, 0xfae/5, Xsave, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoEgpr, { Unspecified|BaseIndex } ++xrstor64, 0xfae/5, Xsave&x64, Modrm|NoSuf|Size64|NoEgpr, { Unspecified|BaseIndex } + xgetbv, 0xf01d0, Xsave, NoSuf, {} + xsetbv, 0xf01d1, Xsave, NoSuf, {} + + // xsaveopt +-xsaveopt, 0xfae/6, Xsaveopt, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Unspecified|BaseIndex } +-xsaveopt64, 0xfae/6, Xsaveopt|x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } ++ ++xsaveopt, 0xfae/6, Xsaveopt, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|NoEgpr, { Unspecified|BaseIndex } ++xsaveopt64, 0xfae/6, Xsaveopt&x64, Modrm|NoSuf|Size64|NoEgpr, { Unspecified|BaseIndex } + + // AES instructions. + +- ++ + + aesdec, 0x660f38de, AES, Modrm|||NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } + aesdeclast, 0x660f38df, AES, Modrm|||NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM } +@@ -1448,7 +1475,7 @@ aeskeygenassist, 0x660f3adf, AES, Modrm||NoSuf, { Imm8, + + // PCLMULQDQ + +- ++ + + pclmulqdq, 0x660f3a44, PCLMULQDQ, Modrm||NoSuf, { Imm8|Imm8S, RegXMM|Unspecified|BaseIndex, RegXMM } + pclmullqlqdq, 0x660f3a44/0x00, PCLMULQDQ, Modrm||NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM } +@@ -1458,7 +1485,7 @@ pclmulhqhqdq, 0x660f3a44/0x11, PCLMULQDQ, Modrm| ++ + + gf2p8affineqb, 0x660f3ace, GFNI, Modrm||NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } + gf2p8affineinvqb, 0x660f3acf, GFNI, Modrm||NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM } +@@ -1477,6 +1504,9 @@ gf2p8mulb, 0x660f38cf, GFNI, Modrm||NoSuf, { RegXMM|Uns + true_us:1f:C> + + // is used for VEX instructions with x/y suffixes. ++// NOTE: The order of the "unnamed" ($-prefixed) entries here needs to remain ++// in sync with , for match_template()'s EVEX-to-VEX lowering to ++// continue to work. + , 0x55, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSiz + vandp, 0x54, AVX, Modrm|C|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vblendp, 0x660c | , AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vblendvp, 0x664a | , AVX, Modrm|Vex|Space0F3A|VexVVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +-vbroadcastf128, 0x661a, AVX, Modrm|Vex=2|Space0F38|VexW=1|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM } ++vbroadcastf128, 0x661a, AVX, Modrm|Vex256|Space0F38|VexW0|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM } ++// vbroadcastf32x4 in disguise (see vround{p,s}{s,d} comment) ++vbroadcastf128, 0x661a, APX_F&AVX512VL, Modrm|EVex256|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM } + vbroadcastsd, 0x6619, AVX, Modrm|Vex256|Space0F38|VexW0|NoSuf, { Qword|Unspecified|BaseIndex, RegYMM } + vbroadcastss, 0x6618, AVX, Modrm|Vex128|Space0F38|VexW0|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM|RegYMM } + vcmpp, 0xc2/0x, AVX, Modrm||Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM } +@@ -1519,14 +1551,18 @@ vdivp, 0x5e, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize + vdivs, 0x5e, AVX, Modrm|VexLIG|Space0F|VexVVVV|VexWIG|NoSuf, { |Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } + vdppd, 0x6641, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } + vdpps, 0x6640, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +-vextractf128, 0x6619, AVX, Modrm|Vex=2|Space0F3A|VexW=1|NoSuf, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM } +-vextractps, 0x6617, AVX|AVX512F, Modrm|Vex128|EVex128|Space0F3A|VexWIG|Disp8MemShift=2|NoSuf, { Imm8, RegXMM, Reg32|Dword|Unspecified|BaseIndex } +-vextractps, 0x6617, AVX|AVX512F|x64, RegMem|Vex128|EVex128|Space0F3A|VexWIG|NoSuf, { Imm8, RegXMM, Reg64 } ++vextractf128, 0x6619, AVX, Modrm|Vex256|Space0F3A|VexW0|NoSuf, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM } ++// vextractf32x4 in disguise (see vround{p,s}{s,d} comment) ++vextractf128, 0x6619, APX_F&AVX512VL, Modrm|EVex256|Space0F3A|VexW0|Disp8MemShift=4|NoSuf, { Imm8, RegYMM, Xmmword|Unspecified|BaseIndex } ++vextractps, 0x6617, AVX|AVX512F, Modrm|Vex128|EVex128|Space0F3A|VexWIG|Disp8MemShift=2|NoSuf, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex } ++vextractps, 0x6617, x64&(AVX|AVX512F), RegMem|Vex128|EVex128|Space0F3A|VexWIG|NoSuf, { Imm8, RegXMM, Reg64 } + vhaddpd, 0x667c, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vhaddps, 0xf27c, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vhsubpd, 0x667d, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vhsubps, 0xf27d, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vinsertf128, 0x6618, AVX, Modrm|Vex256|Space0F3A|VexVVVV|VexW0|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegYMM, RegYMM } ++// vinsertf32x4 in disguise (see vround{p,s}{s,d} comment) ++vinsertf128, 0x6618, APX_F&AVX512VL, Modrm|EVex256|Space0F3A|VexVVVV|VexW0|Disp8MemShift=4|NoSuf, { Imm8, Xmmword|Unspecified|BaseIndex, RegYMM, RegYMM } + vinsertps, 0x6621, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8, Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } + vlddqu, 0xf2f0, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM } + vldmxcsr, 0xae/2, AVX, Modrm|Vex128|Space0F|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex } +@@ -1544,7 +1580,7 @@ vmovap, 0x28, AVX, D|Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSu + // support assembler for AMD64, we accept 64bit operand on vmovd so + // that we can use one template for both SSE and AVX instructions. + vmovd, 0x666e, AVX|AVX512F, D|Modrm|Vex128|EVex128|Space0F|Disp8MemShift=2|NoSuf, { Reg32|Unspecified|BaseIndex, RegXMM } +-vmovd, 0x667e, AVX|x64, D|RegMem|Vex=1|Space0F|VexW=2|NoSuf|Size64, { RegXMM, Reg64 } ++vmovd, 0x667e, AVX&x64, D|RegMem|Vex=1|Space0F|VexW=2|NoSuf|Size64, { RegXMM, Reg64 } + vmovddup, 0xf212, AVX, Modrm|Vex|Space0F|VexWIG|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } + vmovddup, 0xf212, AVX, Modrm|Vex=2|Space0F|VexWIG|NoSuf, { Unspecified|BaseIndex|RegYMM, RegYMM } + vmovdqa, 0x666f, AVX, D|Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM } +@@ -1561,7 +1597,7 @@ vmovntdqa, 0x662a, AVX|AVX2, Modrm|Vex|Space0F38|VexWIG|CheckOperandSize|NoSuf, + vmovntp, 0x2b, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { RegXMM|RegYMM, Xmmword|Ymmword|Unspecified|BaseIndex } + vmovq, 0xf37e, AVX, Load|Modrm|Vex=1|Space0F|VexWIG|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } + vmovq, 0x66d6, AVX, Modrm|Vex=1|Space0F|VexWIG|NoSuf, { RegXMM, Qword|Unspecified|BaseIndex|RegXMM } +-vmovq, 0x666e, AVX|AVX512F|x64, D|Modrm|Vex128|EVex128|Space0F|VexW1|Disp8MemShift=3|NoSuf, { Reg64|Unspecified|BaseIndex, RegXMM } ++vmovq, 0x666e, x64&(AVX|AVX512F), D|Modrm|Vex128|EVex128|Space0F|VexW1|Disp8MemShift=3|NoSuf, { Reg64|Unspecified|BaseIndex, RegXMM } + vmovs, 0x10, AVX, D|Modrm|VexLIG|Space0F|VexWIG|NoSuf, { |Unspecified|BaseIndex, RegXMM } + vmovs, 0x10, AVX, D|Modrm|VexLIG|Space0F|VexVVVV|VexWIG|NoSuf, { RegXMM, RegXMM, RegXMM } + vmovshdup, 0xf316, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM } +@@ -1591,10 +1627,10 @@ vpblendw, 0x660e, AVX|AVX2, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|CheckOperandSize| + vpcmpeq, 0x6674 | , AVX|AVX2, Modrm|C|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpcmpeqd, 0x6676, AVX|AVX2, Modrm|C|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpcmpeqq, 0x6629, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize|NoSuf|Optimize, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +-vpcmpestri, 0x6661, AVX|No64, Modrm|Vex|Space0F3A|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM } +-vpcmpestri, 0x6661, AVX|x64, Modrm|Vex|Space0F3A|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Imm8, Xmmword|Unspecified|BaseIndex|RegXMM, RegXMM } +-vpcmpestrm, 0x6660, AVX|No64, Modrm|Vex|Space0F3A|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM } +-vpcmpestrm, 0x6660, AVX|x64, Modrm|Vex|Space0F3A|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Imm8, Xmmword|Unspecified|BaseIndex|RegXMM, RegXMM } ++vpcmpestri, 0x6661, AVX&No64, Modrm|Vex|Space0F3A|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM } ++vpcmpestri, 0x6661, AVX&x64, Modrm|Vex|Space0F3A|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM } ++vpcmpestrm, 0x6660, AVX&No64, Modrm|Vex|Space0F3A|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM } ++vpcmpestrm, 0x6660, AVX&x64, Modrm|Vex|Space0F3A|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM } + vpcmpgt, 0x6664 | , AVX|AVX2, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf|Optimize, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpcmpgtd, 0x6666, AVX|AVX2, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf|Optimize, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpcmpgtq, 0x6637, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize|NoSuf|Optimize, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +@@ -1605,7 +1641,7 @@ vpermilps, 0x660c, AVX|AVX512F, Modrm|Vex|EVexDYN|Masking|Space0F38|VexVVVV|VexW + vpermilps, 0x6604, AVX|AVX512F, Modrm|Vex|EVexDYN|Masking|Space0F3A|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + vpermilpd, 0x660d, AVX, Modrm|Vex|Space0F38|VexVVVV|VexW0|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpermilpd, 0x6605, AVX, Modrm|Vex|Space0F3A|VexW0|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM } +-vpextr, 0x6616, AVX|, Modrm|Vex|Space0F3A||NoSuf, { Imm8, RegXMM, |Unspecified|BaseIndex } ++vpextr, 0x6616, AVX&, Modrm|Vex|Space0F3A||NoSuf, { Imm8, RegXMM, |Unspecified|BaseIndex } + vpextrw, 0x66c5, AVX, Load|Modrm|Vex|Space0F|VexWIG|No_bSuf|No_wSuf|No_sSuf, { Imm8, RegXMM, Reg32|Reg64 } + vpextr, 0x6614 | , AVX, RegMem|Vex|Space0F3A|VexWIG|NoSuf, { Imm8, RegXMM, Reg32|Reg64 } + vpextr, 0x6614 | , AVX, Modrm|Vex|Space0F3A|VexWIG|NoSuf, { Imm8, RegXMM, |Unspecified|BaseIndex } +@@ -1618,7 +1654,7 @@ vphsubsw, 0x6607, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize| + vphsubw, 0x6605, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpinsrb, 0x6620, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8, Reg32|Reg64, RegXMM, RegXMM } + vpinsrb, 0x6620, AVX, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8, Byte|Unspecified|BaseIndex, RegXMM, RegXMM } +-vpinsr, 0x6622, AVX|, Modrm|Vex|Space0F3A|VexVVVV||NoSuf, { Imm8, |Unspecified|BaseIndex, RegXMM, RegXMM } ++vpinsr, 0x6622, AVX&, Modrm|Vex|Space0F3A|VexVVVV||NoSuf, { Imm8, |Unspecified|BaseIndex, RegXMM, RegXMM } + vpinsrw, 0x66c4, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|No_bSuf|No_wSuf|No_sSuf, { Imm8, Reg32|Reg64, RegXMM, RegXMM } + vpinsrw, 0x66c4, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|NoSuf, { Imm8, Word|Unspecified|BaseIndex, RegXMM, RegXMM } + vpmaddubsw, 0x6604, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +@@ -1636,18 +1672,18 @@ vpminub, 0x66da, AVX|AVX2, Modrm|C|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|N + vpminud, 0x663b, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpminuw, 0x663a, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpmovmskb, 0x66d7, AVX|AVX2, Modrm|Vex|Space0F|VexWIG|No_bSuf|No_wSuf|No_sSuf, { RegXMM|RegYMM, Reg32|Reg64 } +-vpmovsxbd, 0x6621, AVX|AVX512F|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM } +-vpmovsxbq, 0x6622, AVX|AVX512F|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=1|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegXMM } ++vpmovsxbd, 0x6621, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM } ++vpmovsxbq, 0x6622, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=1|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegXMM } + vpmovsxbw, 0x6620, AVX, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } + vpmovsxdq, 0x6625, AVX, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } +-vpmovsxwd, 0x6623, AVX|AVX512F|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } +-vpmovsxwq, 0x6624, AVX|AVX512F|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM } +-vpmovzxbd, 0x6631, AVX|AVX512F|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM } +-vpmovzxbq, 0x6632, AVX|AVX512F|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=1|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegXMM } ++vpmovsxwd, 0x6623, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } ++vpmovsxwq, 0x6624, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM } ++vpmovzxbd, 0x6631, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM } ++vpmovzxbq, 0x6632, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=1|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegXMM } + vpmovzxbw, 0x6630, AVX, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } + vpmovzxdq, 0x6635, AVX, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM } +-vpmovzxwd, 0x6633, AVX|AVX512F|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } +-vpmovzxwq, 0x6634, AVX|AVX512F|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM } ++vpmovzxwd, 0x6633, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } ++vpmovzxwq, 0x6634, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM } + vpmuldq, 0x6628, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpmulhrsw, 0x660b, AVX|AVX2, Modrm|Vex|Space0F38|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } + vpmulhuw, 0x66e4, AVX|AVX2, Modrm|C|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +@@ -1695,6 +1731,10 @@ vrcpps, 0x53, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecifie + vrcpss, 0xf353, AVX, Modrm|Vex=3|Space0F|VexVVVV|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } + vroundp, 0x6608 | , AVX, Modrm|Vex|Space0F3A|VexWIG|CheckOperandSize|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM } + vrounds, 0x660a | , AVX, Modrm|VexLIG|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8, |Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++// These are really clones of VRNDSCALE{P,S}{S,D}, with broadcast, masking, SAE, ++// 512-bit operand size, and register sources dropped. ++vroundp, 0x6608 | , APX_F&AVX512VL, Modrm|Space0F3A||Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM } ++vrounds, 0x660a | , APX_F&AVX512F, Modrm|EVexLIG|Space0F3A|VexVVVV||Disp8MemShift|NoSuf, { Imm8, |Unspecified|BaseIndex, RegXMM, RegXMM } + vrsqrtps, 0x52, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM } + vrsqrtss, 0xf352, AVX, Modrm|Vex=3|Space0F|VexVVVV|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } + vshufp, 0xc6, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +@@ -1714,22 +1754,24 @@ vzeroupper, 0x77, AVX, Vex|Space0F|VexWIG|NoSuf, {} + + // 256bit integer AVX2 instructions. + +-vpmovsxbd, 0x6621, AVX2|AVX512F|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM } +-vpmovsxbq, 0x6622, AVX2|AVX512F|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++vpmovsxbd, 0x6621, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM } ++vpmovsxbq, 0x6622, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } + vpmovsxbw, 0x6620, AVX2, Modrm|Vex=2|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegYMM } + vpmovsxdq, 0x6625, AVX2, Modrm|Vex=2|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegYMM } +-vpmovsxwd, 0x6623, AVX2|AVX512F|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } +-vpmovsxwq, 0x6624, AVX2|AVX512F|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM } +-vpmovzxbd, 0x6631, AVX2|AVX512F|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM } +-vpmovzxbq, 0x6632, AVX2|AVX512F|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++vpmovsxwd, 0x6623, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } ++vpmovsxwq, 0x6624, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM } ++vpmovzxbd, 0x6631, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM } ++vpmovzxbq, 0x6632, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } + vpmovzxbw, 0x6630, AVX2, Modrm|Vex=2|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegYMM } + vpmovzxdq, 0x6635, AVX2, Modrm|Vex=2|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegYMM } +-vpmovzxwd, 0x6633, AVX2|AVX512F|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } +-vpmovzxwq, 0x6634, AVX2|AVX512F|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM } ++vpmovzxwd, 0x6633, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } ++vpmovzxwq, 0x6634, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM } + + // New AVX2 instructions. + +-vbroadcasti128, 0x665A, AVX2, Modrm|Vex=2|Space0F38|VexW=1|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM } ++vbroadcasti128, 0x665A, AVX2, Modrm|Vex256|Space0F38|VexW0|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM } ++// vbroadcasti32x4 in disguise (see vround{p,s}{s,d} comment) ++vbroadcasti128, 0x665a, APX_F&AVX512VL, Modrm|EVex256|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { Xmmword|Unspecified|BaseIndex, RegYMM } + vbroadcastsd, 0x6619, AVX2, Modrm|Vex=2|Space0F38|VexW=1|NoSuf, { RegXMM, RegYMM } + vbroadcastss, 0x6618, AVX2|AVX512F, Modrm|Vex|EVexDYN|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + vpblendd, 0x6602, AVX2, Modrm|Vex|Space0F3A|VexVVVV|VexW0|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +@@ -1741,8 +1783,12 @@ vpermd, 0x6636, AVX2|AVX512F, Modrm|Vex256|EVexDYN|Masking|Space0F38|VexVVVV|Vex + vpermpd, 0x6601, AVX2|AVX512F, Modrm|Vex256|EVexDYN|Masking|Space0F3A|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegYMM|RegZMM } + vpermps, 0x6616, AVX2|AVX512F, Modrm|Vex256|EVexDYN|Masking|Space0F38|VexVVVV|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM } + vpermq, 0x6600, AVX2|AVX512F, Modrm|Vex256|EVexDYN|Masking|Space0F3A|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegYMM|RegZMM } +-vextracti128, 0x6639, AVX2, Modrm|Vex=2|Space0F3A|VexW=1|NoSuf, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM } ++vextracti128, 0x6639, AVX2, Modrm|Vex256|Space0F3A|VexW0|NoSuf, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM } ++// vextracti32x4 in disguise (see vround{p,s}{s,d} comment) ++vextracti128, 0x6639, APX_F&AVX512VL, Modrm|EVex256|Space0F3A|VexW0|Disp8MemShift=4|NoSuf, { Imm8, RegYMM, Xmmword|Unspecified|BaseIndex } + vinserti128, 0x6638, AVX2, Modrm|Vex256|Space0F3A|VexVVVV|VexW0|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegYMM, RegYMM } ++// vinserti32x4 in disguise (see vround{p,s}{s,d} comment) ++vinserti128, 0x6638, APX_F&AVX512VL, Modrm|EVex256|Space0F3A|VexVVVV|VexW0|Disp8MemShift=4|NoSuf, { Imm8, Xmmword|Unspecified|BaseIndex, RegYMM, RegYMM } + vpmaskmov, 0x668e, AVX2, Modrm|Vex|Space0F38|VexVVVV||CheckOperandSize|NoSuf, { RegXMM|RegYMM, RegXMM|RegYMM, Xmmword|Ymmword|Unspecified|BaseIndex } + vpmaskmov, 0x668c, AVX2, Modrm|Vex|Space0F38|VexVVVV||CheckOperandSize|NoSuf, { Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM } + vpsllv, 0x6647, AVX2|AVX512F, Modrm|Vex|EVexDYN|Masking|Space0F38|VexVVVV||Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM||Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +@@ -1765,26 +1811,26 @@ vpgatherqq, 0x6691, AVX2, Modrm|Vex256|Space0F38|VexVVVV|VexW1|SwapSources|NoSuf + + // AES + AVX + +-vaesdec, 0x66de, AVX|AES, Modrm|Vex|Space0F38|VexVVVV|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } +-vaesdeclast, 0x66df, AVX|AES, Modrm|Vex|Space0F38|VexVVVV|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } +-vaesenc, 0x66dc, AVX|AES, Modrm|Vex|Space0F38|VexVVVV|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } +-vaesenclast, 0x66dd, AVX|AES, Modrm|Vex|Space0F38|VexVVVV|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } +-vaesimc, 0x66db, AVX|AES, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM } +-vaeskeygenassist, 0x66df, AVX|AES, Modrm|Vex|Space0F3A|VexWIG|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM } ++vaesdec, 0x66de, AVX&AES, Modrm|Vex|Space0F38|VexVVVV|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vaesdeclast, 0x66df, AVX&AES, Modrm|Vex|Space0F38|VexVVVV|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vaesenc, 0x66dc, AVX&AES, Modrm|Vex|Space0F38|VexVVVV|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vaesenclast, 0x66dd, AVX&AES, Modrm|Vex|Space0F38|VexVVVV|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vaesimc, 0x66db, AVX&AES, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM } ++vaeskeygenassist, 0x66df, AVX&AES, Modrm|Vex|Space0F3A|VexWIG|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM } + + // PCLMULQDQ + AVX + +-vpclmulqdq, 0x6644, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } +-vpclmullqlqdq, 0x6644/0x00, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } +-vpclmulhqlqdq, 0x6644/0x01, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } +-vpclmullqhqdq, 0x6644/0x10, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } +-vpclmulhqhqdq, 0x6644/0x11, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vpclmulqdq, 0x6644, AVX&PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vpclmullqlqdq, 0x6644/0x00, AVX&PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vpclmulhqlqdq, 0x6644/0x01, AVX&PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vpclmullqhqdq, 0x6644/0x10, AVX&PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } ++vpclmulhqhqdq, 0x6644/0x11, AVX&PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM } + + // GFNI + AVX + +-vgf2p8affineinvqb, 0x66cf, AVX|GFNI, Modrm|Vex|Space0F3A|VexVVVV|VexW1|CheckOperandSize|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +-vgf2p8affineqb, 0x66ce, AVX|GFNI, Modrm|Vex|Space0F3A|VexVVVV|VexW1|CheckOperandSize|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } +-vgf2p8mulb, 0x66cf, GFNI|AVX|AVX512F, Modrm|Vex|EVexDYN|Masking|Space0F38|VexVVVV|VexW0|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vgf2p8affineinvqb, 0x66cf, AVX&GFNI, Modrm|Vex|Space0F3A|VexVVVV|VexW1|CheckOperandSize|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } ++vgf2p8affineqb, 0x66ce, AVX&GFNI, Modrm|Vex|Space0F3A|VexVVVV|VexW1|CheckOperandSize|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM } ++vgf2p8mulb, 0x66cf, GFNI&(AVX|AVX512F), Modrm|Vex|EVexDYN|Masking|Space0F38|VexVVVV|VexW0|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } + + // FSGSBASE, RDRND and F16C + +@@ -1803,8 +1849,8 @@ vcvtps2ph, 0x661d, F16C, Modrm|Vex=2|Space0F3A|VexW=1|NoSuf, { Imm8, RegYMM, Uns + + + + + vfmaddp, 0x6688 | 0x, , Modrm||Masking||VexVVVV||Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM||Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +@@ -1831,14 +1877,14 @@ xtest, 0xf01d6, HLE|RTM, NoSuf, {} + + // BMI2 instructions. + +-bzhi, 0xf5, BMI2, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } +-mulx, 0xf2f6, BMI2, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } +-pdep, 0xf2f5, BMI2, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } +-pext, 0xf3f5, BMI2, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } +-rorx, 0xf2f0, BMI2, Modrm|CheckOperandSize|Vex128|Space0F3A|No_bSuf|No_wSuf|No_sSuf, { Imm8|Imm8S, Reg32|Reg64|Dword|Qword|Unspecified|BaseIndex, Reg32|Reg64 } +-sarx, 0xf3f7, BMI2, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } +-shlx, 0x66f7, BMI2, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } +-shrx, 0xf2f7, BMI2, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++bzhi, 0xf5, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf|NF, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++mulx, 0xf2f6, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } ++pdep, 0xf2f5, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } ++pext, 0xf3f5, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } ++rorx, 0xf2f0, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F3A|No_bSuf|No_wSuf|No_sSuf, { Imm8|Imm8S, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++sarx, 0xf3f7, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++shlx, 0x66f7, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++shrx, 0xf2f7, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } + + // FMA4 instructions + +@@ -1908,12 +1954,13 @@ lwpins, 0x12/0, LWP, Modrm|SpaceXOP0A|NoSuf|VexVVVV|Vex, { Imm32|Imm32S, Reg32|U + + // BMI instructions + +-andn, 0xf2, BMI, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } +-bextr, 0xf7, BMI, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } +-blsi, 0xf3/3, BMI, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } +-blsmsk, 0xf3/2, BMI, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } +-blsr, 0xf3/1, BMI, Modrm|CheckOperandSize|Vex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } +-tzcnt, 0xf30fbc, BMI, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++andn, 0xf2, APX_F(BMI), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf|NF, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } ++bextr, 0xf7, APX_F(BMI), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|SwapSources|No_bSuf|No_wSuf|No_sSuf|NF, { Reg32|Reg64, Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++blsi, 0xf3/3, APX_F(BMI), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf|NF, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++blsmsk, 0xf3/2, APX_F(BMI), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf|NF, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++blsr, 0xf3/1, APX_F(BMI), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|VexVVVV|No_bSuf|No_wSuf|No_sSuf|NF, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++tzcnt, 0xf30fbc, BMI, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++tzcnt, 0xf4, BMI&APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } + + // TBM instructions + +@@ -1990,10 +2037,12 @@ insertq, 0xf20f79, SSE4a, Modrm|NoSuf, { RegXMM, RegXMM } + insertq, 0xf20f78, SSE4a, Modrm|NoSuf, { Imm8, Imm8, RegXMM, RegXMM } + + // LZCNT instruction +-lzcnt, 0xf30fbd, LZCNT, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++lzcnt, 0xf30fbd, LZCNT, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++lzcnt, 0xf5, LZCNT&APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } + + // POPCNT instruction +-popcnt, 0xf30fb8, POPCNT, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++popcnt, 0xf30fb8, POPCNT, Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++popcnt, 0x88, POPCNT&APX_F, Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 } + + // VIA PadLock extensions. + xstore-rng, 0xfa7c0, PadLock, NoSuf|RepPrefixOk, {} +@@ -2016,8 +2065,11 @@ xcryptofb, 0xf30fa7e8, PadLock, NoSuf|RepPrefixOk, {} + xstore, 0xfa7c0, PadLock, NoSuf|RepPrefixOk, {} + + // Multy-precision Add Carry, rdseed instructions. +-adcx, 0x660f38f6, ADX, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } +-adox, 0xf30f38f6, ADX, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++ ++adx, 0x66, ADX&APX_F, C|Modrm|CheckOperandSize|No_bSuf|No_wSuf|No_sSuf|DstVVVV|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64, Reg32|Reg64 } ++adx, 0x0f38f6, ADX, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++adx, 0x66, ADX&APX_F, Modrm|CheckOperandSize|No_bSuf|No_wSuf|No_sSuf|EVexMap4, { Reg32|Reg64|Unspecified|BaseIndex, Reg32|Reg64 } ++ + rdseed, 0xfc7/7, RdSeed, Modrm|NoSuf, { Reg16|Reg32|Reg64 } + + // SMAP instructions. +@@ -2030,12 +2082,12 @@ bnd, 0xf2, MPX, NoSuf|IsPrefix, {} + // MPX instructions. + bndmk, 0xf30f1b, MPX, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex, RegBND } + bndmov, 0x660f1a, MPX, D|Modrm|NoSuf, { Xmmword|Unspecified|BaseIndex|RegBND, RegBND } +-bndcl, 0xf30f1a, MPX|No64, Modrm|Anysize|IgnoreSize|NoSuf, { Reg32|BaseIndex, RegBND } +-bndcl, 0xf30f1a, MPX|x64, Modrm|Anysize|IgnoreSize|NoSuf|NoRex64, { Reg64|BaseIndex, RegBND } +-bndcu, 0xf20f1a, MPX|No64, Modrm|Anysize|IgnoreSize|NoSuf, { Reg32|BaseIndex, RegBND } +-bndcu, 0xf20f1a, MPX|x64, Modrm|Anysize|IgnoreSize|NoSuf|NoRex64, { Reg64|BaseIndex, RegBND } +-bndcn, 0xf20f1b, MPX|No64, Modrm|Anysize|IgnoreSize|NoSuf, { Reg32|BaseIndex, RegBND } +-bndcn, 0xf20f1b, MPX|x64, Modrm|Anysize|IgnoreSize|NoSuf|NoRex64, { Reg64|BaseIndex, RegBND } ++bndcl, 0xf30f1a, MPX&No64, Modrm|Anysize|IgnoreSize|NoSuf, { Reg32|BaseIndex, RegBND } ++bndcl, 0xf30f1a, MPX&x64, Modrm|Anysize|IgnoreSize|NoSuf|NoRex64, { Reg64|BaseIndex, RegBND } ++bndcu, 0xf20f1a, MPX&No64, Modrm|Anysize|IgnoreSize|NoSuf, { Reg32|BaseIndex, RegBND } ++bndcu, 0xf20f1a, MPX&x64, Modrm|Anysize|IgnoreSize|NoSuf|NoRex64, { Reg64|BaseIndex, RegBND } ++bndcn, 0xf20f1b, MPX&No64, Modrm|Anysize|IgnoreSize|NoSuf, { Reg32|BaseIndex, RegBND } ++bndcn, 0xf20f1b, MPX&x64, Modrm|Anysize|IgnoreSize|NoSuf|NoRex64, { Reg64|BaseIndex, RegBND } + bndstx, 0x0f1b, MPX, Modrm|Anysize|IgnoreSize|NoSuf, { RegBND, BaseIndex } + bndldx, 0x0f1a, MPX, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex, RegBND } + +@@ -2073,26 +2125,29 @@ vsm4rnds4, 0xf2da, SM4, Modrm|Space0F38|Vex|VexVVVV|VexW0|CheckOperandSize|NoSuf + + // VAES + +-vaesdec, 0x66de, VAES|AVX|AVX512F, Modrm|Vex|EVexDYN|Space0F38|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +-vaesdeclast, 0x66df, VAES|AVX|AVX512F, Modrm|Vex|EVexDYN|Space0F38|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +-vaesenc, 0x66dc, VAES|AVX|AVX512F, Modrm|Vex|EVexDYN|Space0F38|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +-vaesenclast, 0x66dd, VAES|AVX|AVX512F, Modrm|Vex|EVexDYN|Space0F38|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vaesdec, 0x66de, VAES&(AVX|AVX512F), Modrm|Vex|EVexDYN|Space0F38|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vaesdeclast, 0x66df, VAES&(AVX|AVX512F), Modrm|Vex|EVexDYN|Space0F38|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vaesenc, 0x66dc, VAES&(AVX|AVX512F), Modrm|Vex|EVexDYN|Space0F38|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vaesenclast, 0x66dd, VAES&(AVX|AVX512F), Modrm|Vex|EVexDYN|Space0F38|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } + + // VAES instructions end + + // VPCLMULQDQ instructions + +-vpclmulqdq, 0x6644, VPCLMULQDQ|AVX|AVX512F, Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +-vpclmullqlqdq, 0x6644/0x00, VPCLMULQDQ|AVX|AVX512F, Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +-vpclmulhqlqdq, 0x6644/0x01, VPCLMULQDQ|AVX|AVX512F, Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +-vpclmullqhqdq, 0x6644/0x10, VPCLMULQDQ|AVX|AVX512F, Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +-vpclmulhqhqdq, 0x6644/0x11, VPCLMULQDQ|AVX|AVX512F, Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vpclmulqdq, 0x6644, VPCLMULQDQ&(AVX|AVX512F), Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vpclmullqlqdq, 0x6644/0x00, VPCLMULQDQ&(AVX|AVX512F), Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vpclmulhqlqdq, 0x6644/0x01, VPCLMULQDQ&(AVX|AVX512F), Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vpclmullqhqdq, 0x6644/0x10, VPCLMULQDQ&(AVX|AVX512F), Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vpclmulhqhqdq, 0x6644/0x11, VPCLMULQDQ&(AVX|AVX512F), Modrm|Space0F3A|Vex|EVexDYN|VexWIG|VexVVVV|Disp8ShiftVL|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } + + // VPCLMULQDQ instructions end + + // AVX512F instructions. + + // is used for EVEX instructions with x/y suffixes. ++// NOTE: The order of the "unnamed" ($-prefixed) entries here needs to remain ++// in sync with , for match_template()'s EVEX-to-VEX lowering to ++// continue to work. + , 0x45, , Modrm|Vex256|Space0F|VexVVVV|VexW0|NoSuf, { R + kxnor, 0x46, , Modrm|Vex256|Space0F|VexVVVV|VexW0|NoSuf, { RegMask, RegMask, RegMask } + kxor, 0x47, , Modrm|Vex256|Space0F|VexVVVV|VexW0|NoSuf, { RegMask, RegMask, RegMask } + +-kmov, 0x90, , Modrm|Vex128|Space0F|VexW0|NoSuf, { RegMask||Unspecified|BaseIndex, RegMask } +-kmov, 0x91, , Modrm|Vex128|Space0F|VexW0|NoSuf, { RegMask, |Unspecified|BaseIndex } +-kmov, 0x92, , D|Modrm|Vex128|Space0F|VexW0|NoSuf, { Reg32, RegMask } ++kmov, 0x90, APX_F(), Modrm|Vex128|EVex128|Space0F|VexW0|NoSuf, { RegMask||Unspecified|BaseIndex, RegMask } ++kmov, 0x91, APX_F(), Modrm|Vex128|EVex128|Space0F|VexW0|NoSuf, { RegMask, |Unspecified|BaseIndex } ++kmov, 0x92, APX_F(), D|Modrm|Vex128|EVex128|Space0F|VexW0|NoSuf, { Reg32, RegMask } + + knot, 0x44, , Modrm|Vex128|Space0F|VexW0|NoSuf, { RegMask, RegMask } + kortest, 0x98, , Modrm|Vex128|Space0F|VexW0|NoSuf, { RegMask, RegMask } +@@ -2188,11 +2243,11 @@ vcvtudq2pd, 0xF37A, AVX512F, Modrm|EVex=1|Masking|Space0F|VexW=1|Broadcast|Disp8 + vcvtdq2ps, 0x5B, AVX512F, Modrm|Masking|Space0F|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + vcvtps2udq, 0x79, AVX512F, Modrm|Masking|Space0F|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + +-vcvtpd2dq, 0xf2e6, AVX512F|, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } ++vcvtpd2dq, 0xf2e6, AVX512F&, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } + +-vcvtpd2ps, 0x665a, AVX512F|, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } ++vcvtpd2ps, 0x665a, AVX512F&, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } + +-vcvtpd2udq, 0x79, AVX512F|, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } ++vcvtpd2udq, 0x79, AVX512F&, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } + + vcvtph2ps, 0x6613, AVX512F, Modrm|EVex512|Masking|Space0F38|VexW0|Disp8MemShift=5|NoSuf|SAE, { RegYMM|Unspecified|BaseIndex, RegZMM } + +@@ -2223,8 +2278,8 @@ vcvtusi2ss, 0xF37B, AVX512F, Modrm|EVexLIG|Space0F|VexVVVV|Disp8ShiftVL|No_bSuf| + + vcvtss2sd, 0xF35A, AVX512F, Modrm|EVexLIG|Masking|Space0F|VexVVVV|VexW0|Disp8MemShift=2|NoSuf|SAE, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM, RegXMM } + +-vcvttpd2dq, 0x66e6, AVX512F|, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } +-vcvttpd2udq, 0x78, AVX512F|, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } ++vcvttpd2dq, 0x66e6, AVX512F&, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } ++vcvttpd2udq, 0x78, AVX512F&, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } + + vcvttps2dq, 0xF35B, AVX512F, Modrm|Masking|Space0F|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { RegXMM|RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + vcvttps2udq, 0x78, AVX512F, Modrm|Masking|Space0F|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { RegXMM|RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } +@@ -2272,8 +2327,8 @@ vmovntdqa, 0x662A, AVX512F, Modrm|Space0F38|VexW=1|Disp8ShiftVL|CheckOperandSize + vgetexpp, 0x6642, , Modrm|Masking|||Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { RegXMM|RegYMM|RegZMM||Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + vgetexps, 0x6643, , Modrm|EVexLIG|Masking||VexVVVV||Disp8MemShift|NoSuf|SAE, { RegXMM||Unspecified|BaseIndex, RegXMM, RegXMM } + +-vinsertf32x4, 0x6618, AVX512F, Modrm|Masking|Space0F3A|VexVVVV|VexW0|Disp8MemShift=4|CheckOperandSize|NoSuf, { Imm8, RegXMM|XMMword|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM } +-vinserti32x4, 0x6638, AVX512F, Modrm|Masking|Space0F3A|VexVVVV|VexW0|Disp8MemShift=4|CheckOperandSize|NoSuf, { Imm8, RegXMM|XMMword|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM } ++vinsertf32x4, 0x6618, AVX512F, Modrm|Masking|Space0F3A|VexVVVV|VexW0|Disp8MemShift=4|CheckOperandSize|NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM } ++vinserti32x4, 0x6638, AVX512F, Modrm|Masking|Space0F3A|VexVVVV|VexW0|Disp8MemShift=4|CheckOperandSize|NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM } + + vinsertf64x4, 0x661A, AVX512F, Modrm|EVex=1|Masking|Space0F3A|VexVVVV|VexW1|Disp8MemShift=5|NoSuf, { Imm8, RegYMM|Unspecified|BaseIndex, RegZMM, RegZMM } + vinserti64x4, 0x663A, AVX512F, Modrm|EVex=1|Masking|Space0F3A|VexVVVV|VexW1|Disp8MemShift=5|NoSuf, { Imm8, RegYMM|Unspecified|BaseIndex, RegZMM, RegZMM } +@@ -2470,17 +2525,17 @@ clflushopt, 0x660fae/7, ClflushOpt, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex + + // XSAVES/XRSTORS instructions. + +-xrstors, 0xfc7/3, XSAVES, Modrm|NoSuf, { Unspecified|BaseIndex } +-xrstors64, 0xfc7/3, XSAVES|x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } +-xsaves, 0xfc7/5, XSAVES, Modrm|NoSuf, { Unspecified|BaseIndex } +-xsaves64, 0xfc7/5, XSAVES|x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } ++xrstors, 0xfc7/3, XSAVES, Modrm|NoSuf|NoEgpr, { Unspecified|BaseIndex } ++xrstors64, 0xfc7/3, XSAVES&x64, Modrm|NoSuf|Size64|NoEgpr, { Unspecified|BaseIndex } ++xsaves, 0xfc7/5, XSAVES, Modrm|NoSuf|NoEgpr, { Unspecified|BaseIndex } ++xsaves64, 0xfc7/5, XSAVES&x64, Modrm|NoSuf|Size64|NoEgpr, { Unspecified|BaseIndex } + + // XSAVES instructions end. + + // XSAVEC instructions. + +-xsavec, 0xfc7/4, XSAVEC, Modrm|NoSuf, { Unspecified|BaseIndex } +-xsavec64, 0xfc7/4, XSAVEC|x64, Modrm|NoSuf|Size64, { Unspecified|BaseIndex } ++xsavec, 0xfc7/4, XSAVEC, Modrm|NoSuf|NoEgpr, { Unspecified|BaseIndex } ++xsavec64, 0xfc7/4, XSAVEC&x64, Modrm|NoSuf|Size64|NoEgpr, { Unspecified|BaseIndex } + + // XSAVEC instructions end. + +@@ -2494,108 +2549,108 @@ enclv, 0xf01c0, SE1, NoSuf, {} + + // AVX512VL instructions. + +-vgatherdpd, 0x6692, AVX512F|AVX512VL, Modrm|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB128|NoSuf, { Qword|Unspecified|BaseIndex, RegXMM|RegYMM } +-vgatherdps, 0x6692, AVX512F|AVX512VL, Modrm|EVex=2|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB128|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM } +-vgatherdps, 0x6692, AVX512F|AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { Dword|Unspecified|BaseIndex, RegYMM } +-vgatherqp, 0x6693, AVX512F|AVX512VL, Modrm|EVex128|Masking|NoDefMask|Space0F38||Disp8MemShift|VecSIB128|NoSuf, { |Unspecified|BaseIndex, RegXMM } +-vgatherqpd, 0x6693, AVX512F|AVX512VL, Modrm|EVex256|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB256|NoSuf, { Qword|Unspecified|BaseIndex, RegYMM } +-vgatherqps, 0x6693, AVX512F|AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM } +-vpgatherdd, 0x6690, AVX512F|AVX512VL, Modrm|EVex=2|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB128|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM } +-vpgatherdd, 0x6690, AVX512F|AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { Dword|Unspecified|BaseIndex, RegYMM } +-vpgatherdq, 0x6690, AVX512F|AVX512VL, Modrm|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB128|NoSuf, { Qword|Unspecified|BaseIndex, RegXMM|RegYMM } +-vpgatherq, 0x6691, AVX512F|AVX512VL, Modrm|EVex128|Masking|NoDefMask|Space0F38||Disp8MemShift|VecSIB128|NoSuf, { |Unspecified|BaseIndex, RegXMM } +-vpgatherqd, 0x6691, AVX512F|AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM } +-vpgatherqq, 0x6691, AVX512F|AVX512VL, Modrm|EVex256|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB256|NoSuf, { Qword|Unspecified|BaseIndex, RegYMM } +- +-vpscatterdd, 0x66A0, AVX512F|AVX512VL, Modrm|EVex=2|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB128|NoSuf, { RegXMM, Dword|Unspecified|BaseIndex } +-vpscatterdd, 0x66A0, AVX512F|AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { RegYMM, Dword|Unspecified|BaseIndex } +-vpscatterdq, 0x66A0, AVX512F|AVX512VL, Modrm|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB128|NoSuf, { RegXMM|RegYMM, Qword|Unspecified|BaseIndex } +-vpscatterq, 0x66A1, AVX512F|AVX512VL, Modrm|EVex128|Masking|NoDefMask|Space0F38||Disp8MemShift|VecSIB128|NoSuf, { RegXMM, |Unspecified|BaseIndex } +-vpscatterqd, 0x66A1, AVX512F|AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { RegXMM, Dword|Unspecified|BaseIndex } +-vpscatterqq, 0x66A1, AVX512F|AVX512VL, Modrm|EVex256|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB256|NoSuf, { RegYMM, Qword|Unspecified|BaseIndex } +-vscatterdpd, 0x66A2, AVX512F|AVX512VL, Modrm|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB128|NoSuf, { RegXMM|RegYMM, Qword|Unspecified|BaseIndex } +-vscatterdps, 0x66A2, AVX512F|AVX512VL, Modrm|EVex=2|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB128|NoSuf, { RegXMM, Dword|Unspecified|BaseIndex } +-vscatterdps, 0x66A2, AVX512F|AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { RegYMM, Dword|Unspecified|BaseIndex } +-vscatterqp, 0x66A3, AVX512F|AVX512VL, Modrm|EVex128|Masking|NoDefMask|Space0F38||Disp8MemShift|VecSIB128|NoSuf, { RegXMM, |Unspecified|BaseIndex } +-vscatterqpd, 0x66A3, AVX512F|AVX512VL, Modrm|EVex256|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB256|NoSuf, { RegYMM, Qword|Unspecified|BaseIndex } +-vscatterqps, 0x66A3, AVX512F|AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { RegXMM, Dword|Unspecified|BaseIndex } +- +-vcvtdq2pd, 0xF3E6, AVX512F|AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtdq2pd, 0xF3E6, AVX512F|AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } +-vcvtudq2pd, 0xF37A, AVX512F|AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtudq2pd, 0xF37A, AVX512F|AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } +- +-vcvtph2ps, 0x6613, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtph2ps, 0x6613, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } +- +-vcvtps2pd, 0x5A, AVX512F|AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtps2pd, 0x5A, AVX512F|AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } +- +-vcvtps2ph, 0x661D, AVX512F|AVX512VL, Modrm|EVex128|Masking|Space0F3A|VexW0|Disp8MemShift=3|NoSuf, { Imm8, RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vcvtps2ph, 0x661D, AVX512F|AVX512VL, Modrm|EVex256|Masking|Space0F3A|VexW0|Disp8MemShift=4|NoSuf, { Imm8, RegYMM, RegXMM|Unspecified|BaseIndex } +- +-vmovddup, 0xF212, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F|VexW1|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } +- +-vpmovdb, 0xF331, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } +-vpmovdb, 0xF331, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovsdb, 0xF321, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } +-vpmovsdb, 0xF321, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovusdb, 0xF311, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } +-vpmovusdb, 0xF311, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } +- +-vpmovdw, 0xF333, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovdw, 0xF333, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } +-vpmovsdw, 0xF323, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovsdw, 0xF323, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } +-vpmovusdw, 0xF313, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovusdw, 0xF313, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } +- +-vpmovqb, 0xF332, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=1|NoSuf, { RegXMM, RegXMM|Word|Unspecified|BaseIndex } +-vpmovqb, 0xF332, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegYMM, RegXMM|Dword|Unspecified|BaseIndex } +-vpmovsqb, 0xF322, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=1|NoSuf, { RegXMM, RegXMM|Word|Unspecified|BaseIndex } +-vpmovsqb, 0xF322, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegYMM, RegXMM|Dword|Unspecified|BaseIndex } +-vpmovusqb, 0xF312, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=1|NoSuf, { RegXMM, RegXMM|Word|Unspecified|BaseIndex } +-vpmovusqb, 0xF312, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegYMM, RegXMM|Dword|Unspecified|BaseIndex } +- +-vpmovqd, 0xF335, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovqd, 0xF335, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } +-vpmovsqd, 0xF325, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovsqd, 0xF325, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } +-vpmovusqd, 0xF315, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovusqd, 0xF315, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } +- +-vpmovqw, 0xF334, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } +-vpmovqw, 0xF334, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovsqw, 0xF324, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } +-vpmovsqw, 0xF324, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovusqw, 0xF314, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } +-vpmovusqw, 0xF314, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } +- +-vpmovsxdq, 0x6625, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } +-vpmovsxdq, 0x6625, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } +-vpmovzxdq, 0x6635, AVX512F|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } +-vpmovzxdq, 0x6635, AVX512F|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } ++vgatherdpd, 0x6692, AVX512VL, Modrm|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB128|NoSuf, { Qword|Unspecified|BaseIndex, RegXMM|RegYMM } ++vgatherdps, 0x6692, AVX512VL, Modrm|EVex=2|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB128|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM } ++vgatherdps, 0x6692, AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { Dword|Unspecified|BaseIndex, RegYMM } ++vgatherqp, 0x6693, AVX512VL, Modrm|EVex128|Masking|NoDefMask|Space0F38||Disp8MemShift|VecSIB128|NoSuf, { |Unspecified|BaseIndex, RegXMM } ++vgatherqpd, 0x6693, AVX512VL, Modrm|EVex256|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB256|NoSuf, { Qword|Unspecified|BaseIndex, RegYMM } ++vgatherqps, 0x6693, AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM } ++vpgatherdd, 0x6690, AVX512VL, Modrm|EVex=2|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB128|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM } ++vpgatherdd, 0x6690, AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { Dword|Unspecified|BaseIndex, RegYMM } ++vpgatherdq, 0x6690, AVX512VL, Modrm|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB128|NoSuf, { Qword|Unspecified|BaseIndex, RegXMM|RegYMM } ++vpgatherq, 0x6691, AVX512VL, Modrm|EVex128|Masking|NoDefMask|Space0F38||Disp8MemShift|VecSIB128|NoSuf, { |Unspecified|BaseIndex, RegXMM } ++vpgatherqd, 0x6691, AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { Dword|Unspecified|BaseIndex, RegXMM } ++vpgatherqq, 0x6691, AVX512VL, Modrm|EVex256|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB256|NoSuf, { Qword|Unspecified|BaseIndex, RegYMM } ++ ++vpscatterdd, 0x66A0, AVX512VL, Modrm|EVex=2|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB128|NoSuf, { RegXMM, Dword|Unspecified|BaseIndex } ++vpscatterdd, 0x66A0, AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { RegYMM, Dword|Unspecified|BaseIndex } ++vpscatterdq, 0x66A0, AVX512VL, Modrm|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB128|NoSuf, { RegXMM|RegYMM, Qword|Unspecified|BaseIndex } ++vpscatterq, 0x66A1, AVX512VL, Modrm|EVex128|Masking|NoDefMask|Space0F38||Disp8MemShift|VecSIB128|NoSuf, { RegXMM, |Unspecified|BaseIndex } ++vpscatterqd, 0x66A1, AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { RegXMM, Dword|Unspecified|BaseIndex } ++vpscatterqq, 0x66A1, AVX512VL, Modrm|EVex256|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB256|NoSuf, { RegYMM, Qword|Unspecified|BaseIndex } ++vscatterdpd, 0x66A2, AVX512VL, Modrm|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB128|NoSuf, { RegXMM|RegYMM, Qword|Unspecified|BaseIndex } ++vscatterdps, 0x66A2, AVX512VL, Modrm|EVex=2|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB128|NoSuf, { RegXMM, Dword|Unspecified|BaseIndex } ++vscatterdps, 0x66A2, AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { RegYMM, Dword|Unspecified|BaseIndex } ++vscatterqp, 0x66A3, AVX512VL, Modrm|EVex128|Masking|NoDefMask|Space0F38||Disp8MemShift|VecSIB128|NoSuf, { RegXMM, |Unspecified|BaseIndex } ++vscatterqpd, 0x66A3, AVX512VL, Modrm|EVex256|Masking|NoDefMask|Space0F38|VexW1|Disp8MemShift=3|VecSIB256|NoSuf, { RegYMM, Qword|Unspecified|BaseIndex } ++vscatterqps, 0x66A3, AVX512VL, Modrm|EVex=3|Masking|NoDefMask|Space0F38|VexW0|Disp8MemShift=2|VecSIB256|NoSuf, { RegXMM, Dword|Unspecified|BaseIndex } ++ ++vcvtdq2pd, 0xF3E6, AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtdq2pd, 0xF3E6, AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++vcvtudq2pd, 0xF37A, AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtudq2pd, 0xF37A, AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++ ++vcvtph2ps, 0x6613, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtph2ps, 0x6613, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } ++ ++vcvtps2pd, 0x5A, AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtps2pd, 0x5A, AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++ ++vcvtps2ph, 0x661D, AVX512VL, Modrm|EVex128|Masking|Space0F3A|VexW0|Disp8MemShift=3|NoSuf, { Imm8, RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vcvtps2ph, 0x661D, AVX512VL, Modrm|EVex256|Masking|Space0F3A|VexW0|Disp8MemShift=4|NoSuf, { Imm8, RegYMM, RegXMM|Unspecified|BaseIndex } ++ ++vmovddup, 0xF212, AVX512VL, Modrm|EVex=2|Masking|Space0F|VexW1|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } ++ ++vpmovdb, 0xF331, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } ++vpmovdb, 0xF331, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovsdb, 0xF321, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } ++vpmovsdb, 0xF321, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovusdb, 0xF311, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } ++vpmovusdb, 0xF311, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } ++ ++vpmovdw, 0xF333, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovdw, 0xF333, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++vpmovsdw, 0xF323, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovsdw, 0xF323, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++vpmovusdw, 0xF313, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovusdw, 0xF313, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++ ++vpmovqb, 0xF332, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=1|NoSuf, { RegXMM, RegXMM|Word|Unspecified|BaseIndex } ++vpmovqb, 0xF332, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegYMM, RegXMM|Dword|Unspecified|BaseIndex } ++vpmovsqb, 0xF322, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=1|NoSuf, { RegXMM, RegXMM|Word|Unspecified|BaseIndex } ++vpmovsqb, 0xF322, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegYMM, RegXMM|Dword|Unspecified|BaseIndex } ++vpmovusqb, 0xF312, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=1|NoSuf, { RegXMM, RegXMM|Word|Unspecified|BaseIndex } ++vpmovusqb, 0xF312, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegYMM, RegXMM|Dword|Unspecified|BaseIndex } ++ ++vpmovqd, 0xF335, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovqd, 0xF335, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++vpmovsqd, 0xF325, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovsqd, 0xF325, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++vpmovusqd, 0xF315, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovusqd, 0xF315, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++ ++vpmovqw, 0xF334, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } ++vpmovqw, 0xF334, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovsqw, 0xF324, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } ++vpmovsqw, 0xF324, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovusqw, 0xF314, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex } ++vpmovusqw, 0xF314, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex } ++ ++vpmovsxdq, 0x6625, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } ++vpmovsxdq, 0x6625, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } ++vpmovzxdq, 0x6635, AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } ++vpmovzxdq, 0x6635, AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } + + // AVX512VL instructions end. + + // AVX512BW instructions. + +-kadd, 0x4a, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1||NoSuf, { RegMask, RegMask, RegMask } +-kand, 0x41, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1||NoSuf, { RegMask, RegMask, RegMask } +-kandn, 0x42, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1||NoSuf|Optimize, { RegMask, RegMask, RegMask } +-kmov, 0x90, AVX512BW, Modrm|Vex128|Space0F|VexW1||NoSuf, { RegMask||Unspecified|BaseIndex, RegMask } +-kmov, 0x91, AVX512BW, Modrm|Vex128|Space0F|VexW1||NoSuf, { RegMask, |Unspecified|BaseIndex } +-kmov, 0xf292, AVX512BW, D|Modrm|Vex128|Space0F|||NoSuf, { , RegMask } +-knot, 0x44, AVX512BW, Modrm|Vex128|Space0F|VexW1||NoSuf, { RegMask, RegMask } +-kor, 0x45, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1||NoSuf, { RegMask, RegMask, RegMask } +-kortest, 0x98, AVX512BW, Modrm|Vex128|Space0F|VexW1||NoSuf, { RegMask, RegMask } +-ktest, 0x99, AVX512BW, Modrm|Vex128|Space0F|VexW1||NoSuf, { RegMask, RegMask } +-kxnor, 0x46, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1||NoSuf, { RegMask, RegMask, RegMask } +-kxor, 0x47, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1||NoSuf|Optimize, { RegMask, RegMask, RegMask } +-kunpckdq, 0x4B, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1|Vsz512|NoSuf, { RegMask, RegMask, RegMask } +-kunpckwd, 0x4B, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW0|Vsz256|NoSuf, { RegMask, RegMask, RegMask } +-kshiftl, 0x6633, AVX512BW, Modrm|Vex128|Space0F3A|||NoSuf, { Imm8, RegMask, RegMask } +-kshiftr, 0x6631, AVX512BW, Modrm|Vex128|Space0F3A|||NoSuf, { Imm8, RegMask, RegMask } ++kadd, 0x4a, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1|NoSuf, { RegMask, RegMask, RegMask } ++kand, 0x41, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1|NoSuf, { RegMask, RegMask, RegMask } ++kandn, 0x42, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1|NoSuf|Optimize, { RegMask, RegMask, RegMask } ++kmov, 0x90, APX_F(AVX512BW), Modrm|Vex128|EVex128|Space0F|VexW1|NoSuf, { RegMask||Unspecified|BaseIndex, RegMask } ++kmov, 0x91, APX_F(AVX512BW), Modrm|Vex128|EVex128|Space0F|VexW1|NoSuf, { RegMask, |Unspecified|BaseIndex } ++kmov, 0xf292, APX_F(AVX512BW), D|Modrm|Vex128|EVex128|Space0F||NoSuf, { , RegMask } ++knot, 0x44, AVX512BW, Modrm|Vex128|Space0F|VexW1|NoSuf, { RegMask, RegMask } ++kor, 0x45, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1|NoSuf, { RegMask, RegMask, RegMask } ++kortest, 0x98, AVX512BW, Modrm|Vex128|Space0F|VexW1|NoSuf, { RegMask, RegMask } ++ktest, 0x99, AVX512BW, Modrm|Vex128|Space0F|VexW1|NoSuf, { RegMask, RegMask } ++kxnor, 0x46, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1|NoSuf, { RegMask, RegMask, RegMask } ++kxor, 0x47, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1|NoSuf|Optimize, { RegMask, RegMask, RegMask } ++kunpckdq, 0x4B, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW1|NoSuf, { RegMask, RegMask, RegMask } ++kunpckwd, 0x4B, AVX512BW, Modrm|Vex256|Space0F|VexVVVV|VexW0|NoSuf, { RegMask, RegMask, RegMask } ++kshiftl, 0x6633, AVX512BW, Modrm|Vex128|Space0F3A||NoSuf, { Imm8, RegMask, RegMask } ++kshiftr, 0x6631, AVX512BW, Modrm|Vex128|Space0F3A||NoSuf, { Imm8, RegMask, RegMask } + + vdbpsadbw, 0x6642, AVX512BW, Modrm|Masking|Space0F3A|VexVVVV|VexW0|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } + +@@ -2681,23 +2736,23 @@ vpmov2m, 0xf329, AVX512BW, Modrm|EVexDYN|Space0F38||NoSuf, { RegXMM + vpmovm2, 0xf328, AVX512BW, Modrm|EVexDYN|Space0F38||NoSuf, { RegMask, RegXMM|RegYMM|RegZMM } + + vpmovswb, 0xF320, AVX512BW, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex } +-vpmovswb, 0xF320, AVX512BW|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovswb, 0xF320, AVX512BW|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++vpmovswb, 0xF320, AVX512BW&AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovswb, 0xF320, AVX512BW&AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } + + vpmovuswb, 0xF310, AVX512BW, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex } +-vpmovuswb, 0xF310, AVX512BW|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovuswb, 0xF310, AVX512BW|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++vpmovuswb, 0xF310, AVX512BW&AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovuswb, 0xF310, AVX512BW&AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } + + vpmovwb, 0xF330, AVX512BW, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex } +-vpmovwb, 0xF330, AVX512BW|AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } +-vpmovwb, 0xF330, AVX512BW|AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } ++vpmovwb, 0xF330, AVX512BW&AVX512VL, Modrm|EVex=2|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex } ++vpmovwb, 0xF330, AVX512BW&AVX512VL, Modrm|EVex=3|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex } + + vpmovsxbw, 0x6620, AVX512BW, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM } +-vpmovsxbw, 0x6620, AVX512BW|AVX512VL, Modrm|EVex=2|Masking|VexWIG|Space0F38|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } +-vpmovsxbw, 0x6620, AVX512BW|AVX512VL, Modrm|EVex=3|Masking|VexWIG|Space0F38|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } ++vpmovsxbw, 0x6620, AVX512BW&AVX512VL, Modrm|EVex=2|Masking|VexWIG|Space0F38|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } ++vpmovsxbw, 0x6620, AVX512BW&AVX512VL, Modrm|EVex=3|Masking|VexWIG|Space0F38|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } + vpmovzxbw, 0x6630, AVX512BW, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM } +-vpmovzxbw, 0x6630, AVX512BW|AVX512VL, Modrm|EVex=2|Masking|VexWIG|Space0F38|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } +-vpmovzxbw, 0x6630, AVX512BW|AVX512VL, Modrm|EVex=3|Masking|VexWIG|Space0F38|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } ++vpmovzxbw, 0x6630, AVX512BW&AVX512VL, Modrm|EVex=2|Masking|VexWIG|Space0F38|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM } ++vpmovzxbw, 0x6630, AVX512BW&AVX512VL, Modrm|EVex=3|Masking|VexWIG|Space0F38|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM } + + vpsadbw, 0x66F6, AVX512BW, Modrm|Space0F|VexVVVV|VexWIG|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } + +@@ -2738,36 +2793,36 @@ vcvtpd2qq, 0x667B, AVX512DQ, Modrm|Masking|Space0F|VexW1|Broadcast|Disp8ShiftVL| + vcvtpd2uqq, 0x6679, AVX512DQ, Modrm|Masking|Space0F|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + + vcvtps2qq, 0x667B, AVX512DQ, Modrm|EVex512|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=5|NoSuf|StaticRounding|SAE, { RegYMM|Dword|Unspecified|BaseIndex, RegZMM } +-vcvtps2qq, 0x667B, AVX512DQ|AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtps2qq, 0x667B, AVX512DQ|AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++vcvtps2qq, 0x667B, AVX512DQ&AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtps2qq, 0x667B, AVX512DQ&AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } + vcvtps2uqq, 0x6679, AVX512DQ, Modrm|EVex512|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=5|NoSuf|StaticRounding|SAE, { RegYMM|Dword|Unspecified|BaseIndex, RegZMM } +-vcvtps2uqq, 0x6679, AVX512DQ|AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtps2uqq, 0x6679, AVX512DQ|AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++vcvtps2uqq, 0x6679, AVX512DQ&AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtps2uqq, 0x6679, AVX512DQ&AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|RegXMM|Dword|Unspecified|BaseIndex, RegYMM } + + vcvtqq2pd, 0xF3E6, AVX512DQ, Modrm|Masking|Space0F|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + vcvtuqq2pd, 0xF37A, AVX512DQ, Modrm|Masking|Space0F|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + +-vcvtqq2ps, 0x5b, AVX512DQ|, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } ++vcvtqq2ps, 0x5b, AVX512DQ&, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } + + vcvttpd2qq, 0x667A, AVX512DQ, Modrm|Masking|Space0F|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + vcvttpd2uqq, 0x6678, AVX512DQ, Modrm|Masking|Space0F|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + + vcvttps2qq, 0x667A, AVX512DQ, Modrm|EVex512|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=5|NoSuf|SAE, { RegYMM|Dword|Unspecified|BaseIndex, RegZMM } +-vcvttps2qq, 0x667A, AVX512DQ|AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-vcvttps2qq, 0x667A, AVX512DQ|AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++vcvttps2qq, 0x667A, AVX512DQ&AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++vcvttps2qq, 0x667A, AVX512DQ&AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } + vcvttps2uqq, 0x6678, AVX512DQ, Modrm|EVex512|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=5|NoSuf|SAE, { RegYMM|Dword|Unspecified|BaseIndex, RegZMM } +-vcvttps2uqq, 0x6678, AVX512DQ|AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } +-vcvttps2uqq, 0x6678, AVX512DQ|AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } ++vcvttps2uqq, 0x6678, AVX512DQ&AVX512VL, Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } ++vcvttps2uqq, 0x6678, AVX512DQ&AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM } + +-vcvtuqq2ps, 0xf27a, AVX512DQ|, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } ++vcvtuqq2ps, 0xf27a, AVX512DQ&, Modrm||Masking|Space0F|VexW1|Broadcast|NoSuf|, { |Qword, } + + vextractf32x8, 0x661B, AVX512DQ, Modrm|EVex=1|Masking|Space0F3A|VexW=1|Disp8MemShift=5|NoSuf, { Imm8, RegZMM, RegYMM|Unspecified|BaseIndex } + vextracti32x8, 0x663B, AVX512DQ, Modrm|EVex=1|Masking|Space0F3A|VexW=1|Disp8MemShift=5|NoSuf, { Imm8, RegZMM, RegYMM|Unspecified|BaseIndex } + vinsertf32x8, 0x661A, AVX512DQ, Modrm|EVex512|Masking|Space0F3A|VexVVVV|VexW0|Disp8MemShift=5|NoSuf, { Imm8, RegYMM|Unspecified|BaseIndex, RegZMM, RegZMM } + vinserti32x8, 0x663A, AVX512DQ, Modrm|EVex512|Masking|Space0F3A|VexVVVV|VexW0|Disp8MemShift=5|NoSuf, { Imm8, RegYMM|Unspecified|BaseIndex, RegZMM, RegZMM } + +-vpextr, 0x6616, AVX512DQ|, Modrm|EVex128|Space0F3A||Disp8MemShift|NoSuf, { Imm8, RegXMM, |Unspecified|BaseIndex } +-vpinsr, 0x6622, AVX512DQ|, Modrm|EVex128|Space0F3A|VexVVVV||Disp8MemShift|NoSuf, { Imm8, |Unspecified|BaseIndex, RegXMM, RegXMM } ++vpextr, 0x6616, AVX512DQ&, Modrm|EVex128|Space0F3A||Disp8MemShift|NoSuf, { Imm8, RegXMM, |Unspecified|BaseIndex } ++vpinsr, 0x6622, AVX512DQ&, Modrm|EVex128|Space0F3A|VexVVVV||Disp8MemShift|NoSuf, { Imm8, |Unspecified|BaseIndex, RegXMM, RegXMM } + + vextractf64x2, 0x6619, AVX512DQ, Modrm|Masking|Space0F3A|VexW=2|Disp8MemShift=4|NoSuf, { Imm8, RegYMM|RegZMM, RegXMM|Unspecified|BaseIndex } + vextracti64x2, 0x6639, AVX512DQ, Modrm|Masking|Space0F3A|VexW=2|Disp8MemShift=4|NoSuf, { Imm8, RegYMM|RegZMM, RegXMM|Unspecified|BaseIndex } +@@ -2777,8 +2832,8 @@ vinserti64x2, 0x6638, AVX512DQ, Modrm|Masking|Space0F3A|VexVVVV|VexW1|Disp8MemSh + vfpclassp, 0x6666, AVX512DQ, Modrm|Masking|Space0F3A||Broadcast|Disp8ShiftVL|NoSuf|IntelSyntax, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM||Unspecified|BaseIndex, RegMask } + vfpclassp, 0x6666, AVX512DQ, Modrm|Masking|Space0F3A||Broadcast|Disp8ShiftVL|NoSuf|ATTSyntax, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM||BaseIndex, RegMask } + vfpclasspz, 0x6666, AVX512DQ, Modrm|EVex512|Masking|Space0F3A||Broadcast|Disp8MemShift=6|NoSuf, { Imm8|Imm8S, RegZMM||Unspecified|BaseIndex, RegMask } +-vfpclasspx, 0x6666, AVX512DQ|AVX512VL, Modrm|EVex128|Masking|Space0F3A||Broadcast|Disp8MemShift=4|NoSuf, { Imm8|Imm8S, RegXMM||Unspecified|BaseIndex, RegMask } +-vfpclasspy, 0x6666, AVX512DQ|AVX512VL, Modrm|EVex256|Masking|Space0F3A||Broadcast|Disp8MemShift=5|NoSuf, { Imm8|Imm8S, RegYMM||Unspecified|BaseIndex, RegMask } ++vfpclasspx, 0x6666, AVX512DQ&AVX512VL, Modrm|EVex128|Masking|Space0F3A||Broadcast|Disp8MemShift=4|NoSuf, { Imm8|Imm8S, RegXMM||Unspecified|BaseIndex, RegMask } ++vfpclasspy, 0x6666, AVX512DQ&AVX512VL, Modrm|EVex256|Masking|Space0F3A||Broadcast|Disp8MemShift=5|NoSuf, { Imm8|Imm8S, RegYMM||Unspecified|BaseIndex, RegMask } + vfpclasss, 0x67, , Modrm|EVexLIG|Masking|Space0F3A||Disp8MemShift|NoSuf, { Imm8|Imm8S, RegXMM||Unspecified|BaseIndex, RegMask } + + vpmov2m, 0xf339, AVX512DQ, Modrm|EVexDYN|Space0F38||NoSuf, { RegXMM|RegYMM|RegZMM, RegMask } +@@ -2916,8 +2971,8 @@ vpshufbitqmb, 0x668f, AVX512_BITALG, Modrm|Masking|Space0F38|VexVVVV|VexW0|Disp8 + + // AVX512 + GFNI instructions + +-vgf2p8affineinvqb, 0x66cf, GFNI|AVX512F, Modrm|Masking|Space0F3A|VexVVVV|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } +-vgf2p8affineqb, 0x66ce, GFNI|AVX512F, Modrm|Masking|Space0F3A|VexVVVV|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vgf2p8affineinvqb, 0x66cf, GFNI&AVX512F, Modrm|Masking|Space0F3A|VexVVVV|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } ++vgf2p8affineqb, 0x66ce, GFNI&AVX512F, Modrm|Masking|Space0F3A|VexVVVV|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, RegXMM|RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } + + // AVX512 + GFNI instructions end + +@@ -2946,7 +3001,7 @@ clzero, 0xf01fc, CLZERO, AddrPrefixOpReg|NoSuf, { Acc|Word|Dword|Qword } + monitorx, 0xf01fa, MWAITX, NoSuf, {} + monitorx, 0xf01fa, MWAITX, AddrPrefixOpReg|NoSuf, { Acc|Word|Dword|Qword, RegC|Dword, RegD|Dword } + // The 64-bit form exists only for compatibility with older gas. +-monitorx, 0xf01fa, MWAITX|x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword, RegD|Qword } ++monitorx, 0xf01fa, MWAITX&x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword, RegD|Qword } + + mwaitx, 0xf01fb, MWAITX, NoSuf, {} + // The 64-bit form exists only for compatibility with older gas. +@@ -2963,30 +3018,34 @@ wrpkru, 0xf01ef, OSPKE, NoSuf, {} + + // RDPID instructions. + +-rdpid, 0xf30fc7/7, RDPID|No64, Modrm|IgnoreSize|NoSuf, { Reg32 } +-rdpid, 0xf30fc7/7, RDPID|x64, Modrm|NoSuf|NoRex64, { Reg64 } ++rdpid, 0xf30fc7/7, RDPID&No64, Modrm|IgnoreSize|NoSuf, { Reg32 } ++rdpid, 0xf30fc7/7, RDPID&x64, Modrm|NoSuf|NoRex64, { Reg64 } + + // RDPID instructions end. + + // PTWRITE instructions. + +-ptwrite, 0xf30fae/4, PTWRITE|No64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Reg32|Unspecified|BaseIndex } +-ptwrite, 0xf30fae/4, PTWRITE|x64, Modrm|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex } ++ptwrite, 0xf30fae/4, PTWRITE&No64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf, { Reg32|Unspecified|BaseIndex } ++ptwrite, 0xf30fae/4, PTWRITE&x64, Modrm|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64|Unspecified|BaseIndex } + + // PTWRITE instructions end. + + // CET instructions. + + incsspd, 0xf30fae/5, SHSTK, Modrm|IgnoreSize|NoSuf, { Reg32 } +-incsspq, 0xf30fae/5, SHSTK|x64, Modrm|NoSuf, { Reg64 } ++incsspq, 0xf30fae/5, SHSTK&x64, Modrm|NoSuf, { Reg64 } + rdsspd, 0xf30f1e/1, SHSTK, Modrm|IgnoreSize|NoSuf, { Reg32 } +-rdsspq, 0xf30f1e/1, SHSTK|x64, Modrm|NoSuf, { Reg64 } ++rdsspq, 0xf30f1e/1, SHSTK&x64, Modrm|NoSuf, { Reg64 } + saveprevssp, 0xf30f01ea, SHSTK, NoSuf, {} + rstorssp, 0xf30f01/5, SHSTK, Modrm|NoSuf, { Qword|Unspecified|BaseIndex } + wrssd, 0x0f38f6, SHSTK, Modrm|IgnoreSize|NoSuf, { Reg32, Dword|Unspecified|BaseIndex } +-wrssq, 0x0f38f6, SHSTK|x64, Modrm|NoSuf|Size64, { Reg64, Qword|Unspecified|BaseIndex } ++wrssd, 0x66, SHSTK&APX_F, Modrm|NoSuf|EVexMap4, { Reg32, Dword|Unspecified|BaseIndex } ++wrssq, 0x0f38f6, SHSTK&x64, Modrm|NoSuf, { Reg64, Qword|Unspecified|BaseIndex } ++wrssq, 0x66, SHSTK&APX_F, Modrm|NoSuf|EVexMap4, { Reg64, Qword|Unspecified|BaseIndex } + wrussd, 0x660f38f5, SHSTK, Modrm|IgnoreSize|NoSuf, { Reg32, Dword|Unspecified|BaseIndex } +-wrussq, 0x660f38f5, SHSTK|x64, Modrm|NoSuf, { Reg64, Qword|Unspecified|BaseIndex } ++wrussd, 0x6665, SHSTK&APX_F, Modrm|NoSuf|EVexMap4, { Reg32, Dword|Unspecified|BaseIndex } ++wrussq, 0x660f38f5, SHSTK&x64, Modrm|NoSuf, { Reg64, Qword|Unspecified|BaseIndex } ++wrussq, 0x6665, SHSTK&APX_F, Modrm|NoSuf|EVexMap4, { Reg64, Qword|Unspecified|BaseIndex } + setssbsy, 0xf30f01e8, SHSTK, NoSuf, {} + clrssbsy, 0xf30fae/6, SHSTK, Modrm|NoSuf, { Qword|Unspecified|BaseIndex } + endbr64, 0xf30f1efa, IBT, NoSuf, {} +@@ -3011,7 +3070,7 @@ pconfig, 0x0f01c5, PCONFIG, NoSuf, {} + + // PBNDKB instruction. + +-pbndkb, 0x0f01c7, PBNDKB|x64, NoSuf, {} ++pbndkb, 0x0f01c7, PBNDKB, NoSuf, {} + + // PBNDKB instruction end. + +@@ -3034,7 +3093,9 @@ cldemote, 0x0f1c/0, CLDEMOTE, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex } + // MOVDIR[I,64B] instructions. + + movdiri, 0xf38f9, MOVDIRI, Modrm|CheckOperandSize|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } ++movdiri, 0xf9, MOVDIRI&APX_F, Modrm|CheckOperandSize|No_bSuf|No_wSuf|No_sSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } + movdir64b, 0x660f38f8, MOVDIR64B, Modrm|AddrPrefixOpReg|NoSuf, { Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++movdir64b, 0x66f8, MOVDIR64B&APX_F, Modrm|AddrPrefixOpReg|NoSuf|EVexMap4, { Unspecified|BaseIndex, Reg32|Reg64 } + + // MOVEDIR instructions end. + +@@ -3042,7 +3103,7 @@ movdir64b, 0x660f38f8, MOVDIR64B, Modrm|AddrPrefixOpReg|NoSuf, { Unspecified|Bas + + vcvtne2ps2bf16, 0xf272, AVX512_BF16, Modrm|Space0F38|VexVVVV|Masking|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } + +-vcvtneps2bf16, 0xf372, AVX512_BF16|, Modrm|Space0F38||Masking|VexW0|Broadcast|NoSuf, { |Dword, } ++vcvtneps2bf16, 0xf372, AVX512_BF16&, Modrm|Space0F38||Masking|VexW0|Broadcast|NoSuf, { |Dword, } + + vdpbf16ps, 0xf352, AVX512_BF16, Modrm|Space0F38|VexVVVV|Masking|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Dword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM } + +@@ -3063,7 +3124,9 @@ vcvtneps2bf16, 0xf372, AVX_NE_CONVERT, Modrm||Space0F38|VexW0|NoSu + // ENQCMD instructions. + + enqcmd, 0xf20f38f8, ENQCMD, Modrm|AddrPrefixOpReg|NoSuf, { Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++enqcmd, 0xf2f8, APX_F(ENQCMD), Modrm|AddrPrefixOpReg|NoSuf|EVexMap4, { Unspecified|BaseIndex, Reg32|Reg64 } + enqcmds, 0xf30f38f8, ENQCMD, Modrm|AddrPrefixOpReg|NoSuf, { Unspecified|BaseIndex, Reg16|Reg32|Reg64 } ++enqcmds, 0xf3f8, APX_F(ENQCMD), Modrm|AddrPrefixOpReg|NoSuf|EVexMap4, { Unspecified|BaseIndex, Reg32|Reg64 } + + // ENQCMD instructions end. + +@@ -3081,25 +3144,25 @@ mcommit, 0xf30f01fa, MCOMMIT, NoSuf, {} + + // SNP instructions + +-psmash, 0xf30f01ff, SNP|x64, NoSuf, {} +-psmash, 0xf30f01ff, SNP|x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword } ++psmash, 0xf30f01ff, SNP&x64, NoSuf, {} ++psmash, 0xf30f01ff, SNP&x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword } + pvalidate, 0xf20f01ff, SNP, NoSuf, {} + pvalidate, 0xf20f01ff, SNP, AddrPrefixOpReg|NoSuf, { Acc|Word|Dword|Qword, RegC|Dword, RegD|Dword } +-rmpupdate, 0xf20f01fe, SNP|x64, NoSuf, {} +-rmpupdate, 0xf20f01fe, SNP|x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword } +-rmpadjust, 0xf30f01fe, SNP|x64, NoSuf, {} +-rmpadjust, 0xf30f01fe, SNP|x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword, RegD|Qword } ++rmpupdate, 0xf20f01fe, SNP&x64, NoSuf, {} ++rmpupdate, 0xf20f01fe, SNP&x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword } ++rmpadjust, 0xf30f01fe, SNP&x64, NoSuf, {} ++rmpadjust, 0xf30f01fe, SNP&x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword, RegD|Qword } + // The single-operand forms exist only for compatibility with older gas. + pvalidate, 0xf20f01ff, SNP, AddrPrefixOpReg|NoSuf, { Acc|Word|Dword|Qword } +-rmpupdate, 0xf20f01fe, SNP|x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword } +-rmpadjust, 0xf30f01fe, SNP|x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword } ++rmpupdate, 0xf20f01fe, SNP&x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword } ++rmpadjust, 0xf30f01fe, SNP&x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword } + + // SNP instructions end + + // RMPQUERY instruction + +-rmpquery, 0xf30f01fd, RMPQUERY|x64, NoSuf, {} +-rmpquery, 0xf30f01fd, RMPQUERY|x64, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword, RegD|Qword } ++rmpquery, 0xf30f01fd, RMPQUERY, NoSuf, {} ++rmpquery, 0xf30f01fd, RMPQUERY, AddrPrefixOpReg|NoSuf, { Acc|Dword|Qword, RegC|Qword, RegD|Qword } + + // RMPQUERY instruction end + +@@ -3124,26 +3187,26 @@ xresldtrk, 0xf20f01e9, TSXLDTRK, NoSuf, {} + + // AMX instructions. + +-ldtilecfg, 0x49/0, AMX_TILE|x64, Modrm|Vex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex } +-sttilecfg, 0x6649/0, AMX_TILE|x64, Modrm|Vex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex } ++ldtilecfg, 0x49/0, APX_F(AMX_TILE), Modrm|Vex128|EVex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex } ++sttilecfg, 0x6649/0, APX_F(AMX_TILE), Modrm|Vex128|EVex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex } + +-tcmmimfp16ps, 0x666c, AMX_COMPLEX|x64, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } +-tcmmrlfp16ps, 0x6c, AMX_COMPLEX|x64, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } ++tcmmimfp16ps, 0x666c, AMX_COMPLEX, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } ++tcmmrlfp16ps, 0x6c, AMX_COMPLEX, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } + +-tdpbf16ps, 0xf35c, AMX_BF16|x64, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } +-tdpfp16ps, 0xf25c, AMX_FP16|x64, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } +-tdpbssd, 0xf25e, AMX_INT8|x64, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } +-tdpbuud, 0x5e, AMX_INT8|x64, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } +-tdpbusd, 0x665e, AMX_INT8|x64, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } +-tdpbsud, 0xf35e, AMX_INT8|x64, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } ++tdpbf16ps, 0xf35c, AMX_BF16, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } ++tdpfp16ps, 0xf25c, AMX_FP16, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } ++tdpbssd, 0xf25e, AMX_INT8, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } ++tdpbuud, 0x5e, AMX_INT8, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } ++tdpbusd, 0x665e, AMX_INT8, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } ++tdpbsud, 0xf35e, AMX_INT8, Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf, { RegTMM, RegTMM, RegTMM } + +-tileloadd, 0xf24b, AMX_TILE|x64, Sibmem|Vex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex, RegTMM } +-tileloaddt1, 0x664b, AMX_TILE|x64, Sibmem|Vex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex, RegTMM } +-tilestored, 0xf34b, AMX_TILE|x64, Sibmem|Vex128|Space0F38|VexW0|NoSuf, { RegTMM, Unspecified|BaseIndex } ++tileloadd, 0xf24b, APX_F(AMX_TILE), Sibmem|Vex128|EVex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex, RegTMM } ++tileloaddt1, 0x664b, APX_F(AMX_TILE), Sibmem|Vex128|EVex128|Space0F38|VexW0|NoSuf, { Unspecified|BaseIndex, RegTMM } ++tilestored, 0xf34b, APX_F(AMX_TILE), Sibmem|Vex128|EVex128|Space0F38|VexW0|NoSuf, { RegTMM, Unspecified|BaseIndex } + +-tilerelease, 0x49c0, AMX_TILE|x64, Vex128|Space0F38|VexW0|NoSuf, {} ++tilerelease, 0x49c0, AMX_TILE, Vex128|Space0F38|VexW0|NoSuf, {} + +-tilezero, 0xf249, AMX_TILE|x64, Modrm|Vex128|Space0F38|VexW0|NoSuf, { RegTMM } ++tilezero, 0xf249, AMX_TILE, Modrm|Vex128|Space0F38|VexW0|NoSuf, { RegTMM } + + // AMX instructions end. + +@@ -3166,19 +3229,19 @@ aesdecwide256kl, 0xf30f38d8/3, WideKL, Modrm|NoSuf, { Unspecified|BaseIndex } + // TDX instructions. + + tdcall, 0x660f01cc, TDX, NoSuf, {} +-seamret, 0x660f01cd, TDX|x64, NoSuf, {} +-seamops, 0x660f01ce, TDX|x64, NoSuf, {} +-seamcall, 0x660f01cf, TDX|x64, NoSuf, {} ++seamret, 0x660f01cd, TDX&x64, NoSuf, {} ++seamops, 0x660f01ce, TDX&x64, NoSuf, {} ++seamcall, 0x660f01cf, TDX&x64, NoSuf, {} + + // TDX instructions end. + + // UINTR instructions. + +-uiret, 0xf30f01ec, UINTR|x64, NoSuf, {} +-clui, 0xf30f01ee, UINTR|x64, NoSuf, {} +-stui, 0xf30f01ef, UINTR|x64, NoSuf, {} +-testui, 0xf30f01ed, UINTR|x64, NoSuf, {} +-senduipi, 0xf30fc7/6, UINTR|x64, Modrm|NoSuf|NoRex64, { Reg64 } ++uiret, 0xf30f01ec, UINTR, NoSuf, {} ++clui, 0xf30f01ee, UINTR, NoSuf, {} ++stui, 0xf30f01ef, UINTR, NoSuf, {} ++testui, 0xf30f01ed, UINTR, NoSuf, {} ++senduipi, 0xf30fc7/6, UINTR, Modrm|NoSuf|NoRex64, { Reg64 } + + // UINTR instructions end. + +@@ -3208,37 +3271,37 @@ vcmpph, 0xc2, AVX512_FP16, Modrm|Masking|Space0F3A|VexVVVV|VexW0|Broadcast|Disp8 + vcmpsh, 0xf3c2/0x, AVX512_FP16, Modrm|EVexLIG|Masking|Space0F3A|VexVVVV|VexW0|Disp8MemShift=1|NoSuf|ImmExt|SAE, { RegXMM|Word|Unspecified|BaseIndex, RegXMM, RegMask } + vcmpsh, 0xf3c2, AVX512_FP16, Modrm|EVexLIG|Masking|Space0F3A|VexVVVV|VexW0|Disp8MemShift=1|NoSuf|SAE, { Imm8, RegXMM|Word|Unspecified|BaseIndex, RegXMM, RegMask } + +-vcvtdq2ph, 0x5b, AVX512_FP16|, Modrm||Masking|EVexMap5|VexW0|Broadcast|NoSuf|, { |Dword, } +-vcvtudq2ph, 0xf27a, AVX512_FP16|, Modrm||Masking|EVexMap5|VexW0|Broadcast|NoSuf|, { |Dword, } ++vcvtdq2ph, 0x5b, AVX512_FP16&, Modrm||Masking|EVexMap5|VexW0|Broadcast|NoSuf|, { |Dword, } ++vcvtudq2ph, 0xf27a, AVX512_FP16&, Modrm||Masking|EVexMap5|VexW0|Broadcast|NoSuf|, { |Dword, } + +-vcvtqq2ph, 0x5b, AVX512_FP16|, Modrm||Masking|EVexMap5|VexW1|Broadcast|NoSuf||, { |Qword, RegXMM } +-vcvtuqq2ph, 0xf27a, AVX512_FP16|, Modrm||Masking|EVexMap5|VexW1|Broadcast|NoSuf||, { |Qword, RegXMM } ++vcvtqq2ph, 0x5b, AVX512_FP16&, Modrm||Masking|EVexMap5|VexW1|Broadcast|NoSuf||, { |Qword, RegXMM } ++vcvtuqq2ph, 0xf27a, AVX512_FP16&, Modrm||Masking|EVexMap5|VexW1|Broadcast|NoSuf||, { |Qword, RegXMM } + +-vcvtpd2ph, 0x665a, AVX512_FP16|, Modrm||Masking|EVexMap5|VexW1|Broadcast|NoSuf||, { |Qword, RegXMM } ++vcvtpd2ph, 0x665a, AVX512_FP16&, Modrm||Masking|EVexMap5|VexW1|Broadcast|NoSuf||, { |Qword, RegXMM } + +-vcvtps2phx, 0x661d, AVX512_FP16|, Modrm||Masking|EVexMap5|VexW0|Broadcast|NoSuf|, { |Dword, } ++vcvtps2phx, 0x661d, AVX512_FP16&, Modrm||Masking|EVexMap5|VexW0|Broadcast|NoSuf|, { |Dword, } + + vcvtw2ph, 0xf37d, AVX512_FP16, Modrm|Masking|EVexMap5|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|Word|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + vcvtuw2ph, 0xf27d, AVX512_FP16, Modrm|Masking|EVexMap5|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|Word|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } + +-vcvtph2dq, 0x665b, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtph2dq, 0x665b, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } ++vcvtph2dq, 0x665b, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtph2dq, 0x665b, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } + vcvtph2dq, 0x665b, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=5|NoSuf|StaticRounding|SAE, { RegYMM|Word|Unspecified|BaseIndex, RegZMM } + +-vcvtph2udq, 0x79, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtph2udq, 0x79, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } ++vcvtph2udq, 0x79, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtph2udq, 0x79, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } + vcvtph2udq, 0x79, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=5|NoSuf|StaticRounding|SAE, { RegYMM|Word|Unspecified|BaseIndex, RegZMM } + +-vcvtph2qq, 0x667b, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } +-vcvtph2qq, 0x667b, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } ++vcvtph2qq, 0x667b, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } ++vcvtph2qq, 0x667b, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } + vcvtph2qq, 0x667b, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf|StaticRounding|SAE, { RegXMM|Word|Unspecified|BaseIndex, RegZMM } + +-vcvtph2uqq, 0x6679, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } +-vcvtph2uqq, 0x6679, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } ++vcvtph2uqq, 0x6679, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } ++vcvtph2uqq, 0x6679, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } + vcvtph2uqq, 0x6679, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf|StaticRounding|SAE, { RegXMM|Word|Unspecified|BaseIndex, RegZMM } + +-vcvtph2pd, 0x5a, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } +-vcvtph2pd, 0x5a, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } ++vcvtph2pd, 0x5a, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } ++vcvtph2pd, 0x5a, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } + vcvtph2pd, 0x5a, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf|SAE, { RegXMM|Word|Unspecified|BaseIndex, RegZMM } + + vcvtph2w, 0x667d, AVX512_FP16, Modrm|Masking|EVexMap5|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|Word|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } +@@ -3258,24 +3321,24 @@ vcvtsh2ss, 0x13, AVX512_FP16, Modrm|EVexLIG|Masking|EVexMap6|VexVVVV|VexW0|Disp8 + + vcvtsh2si, 0xf32d, AVX512_FP16, Modrm|EVexLIG|EVexMap5|Disp8MemShift=1|NoSuf|StaticRounding|SAE, { RegXMM|Word|Unspecified|BaseIndex, Reg32|Reg64 } + +-vcvttph2dq, 0xf35b, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } +-vcvttph2dq, 0xf35b, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } ++vcvttph2dq, 0xf35b, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } ++vcvttph2dq, 0xf35b, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } + vcvttph2dq, 0xf35b, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=5|NoSuf|SAE, { RegYMM|Word|Unspecified|BaseIndex, RegZMM } + +-vcvttph2udq, 0x78, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } +-vcvttph2udq, 0x78, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } ++vcvttph2udq, 0x78, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } ++vcvttph2udq, 0x78, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } + vcvttph2udq, 0x78, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=5|NoSuf|SAE, { RegYMM|Word|Unspecified|BaseIndex, RegZMM } + +-vcvttph2qq, 0x667a, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } +-vcvttph2qq, 0x667a, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } ++vcvttph2qq, 0x667a, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } ++vcvttph2qq, 0x667a, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } + vcvttph2qq, 0x667a, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf|SAE, { RegXMM|Word|Unspecified|BaseIndex, RegZMM } + +-vcvttph2uqq, 0x6678, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } +-vcvttph2uqq, 0x6678, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } ++vcvttph2uqq, 0x6678, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=2|NoSuf, { RegXMM|Word|Dword|Unspecified|BaseIndex, RegXMM } ++vcvttph2uqq, 0x6678, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegYMM } + vcvttph2uqq, 0x6678, AVX512_FP16, Modrm|EVex512|Masking|EVexMap5|VexW0|Broadcast|Disp8MemShift=4|NoSuf|SAE, { RegXMM|Word|Unspecified|BaseIndex, RegZMM } + +-vcvtph2psx, 0x6613, AVX512_FP16|AVX512VL, Modrm|EVex128|Masking|EVexMap6|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } +-vcvtph2psx, 0x6613, AVX512_FP16|AVX512VL, Modrm|EVex256|Masking|EVexMap6|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } ++vcvtph2psx, 0x6613, AVX512_FP16&AVX512VL, Modrm|EVex128|Masking|EVexMap6|VexW0|Broadcast|Disp8MemShift=3|NoSuf, { RegXMM|Word|Qword|Unspecified|BaseIndex, RegXMM } ++vcvtph2psx, 0x6613, AVX512_FP16&AVX512VL, Modrm|EVex256|Masking|EVexMap6|VexW0|Broadcast|Disp8MemShift=4|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegYMM } + vcvtph2psx, 0x6613, AVX512_FP16, Modrm|EVex512|Masking|EVexMap6|VexW0|Broadcast|Disp8MemShift=5|NoSuf|SAE, { RegYMM|Word|Unspecified|BaseIndex, RegZMM } + + vcvttph2w, 0x667c, AVX512_FP16, Modrm|Masking|EVexMap5|VexW0|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { RegXMM|RegYMM|RegZMM|Word|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM } +@@ -3283,7 +3346,7 @@ vcvttph2uw, 0x7c, AVX512_FP16, Modrm|Masking|EVexMap5|VexW0|Broadcast|Disp8Shift + + vcvttsh2si, 0xf32c, AVX512_FP16, Modrm|EVexLIG|EVexMap5|Disp8MemShift=1|NoSuf|SAE, { RegXMM|Word|Unspecified|BaseIndex, Reg32|Reg64 } + +-vfpclassph, 0x66, AVX512_FP16|, Modrm||Masking|Space0F3A|VexW0|Broadcast|NoSuf|, { Imm8|Imm8S, |Word, RegMask } ++vfpclassph, 0x66, AVX512_FP16&, Modrm||Masking|Space0F3A|VexW0|Broadcast|NoSuf|, { Imm8|Imm8S, |Word, RegMask } + + vmovw, 0x666e, AVX512_FP16, D|Modrm|EVex128|VexWIG|EVexMap5|Disp8MemShift=1|NoSuf, { Word|Unspecified|BaseIndex, RegXMM } + vmovw, 0x667e, AVX512_FP16, D|RegMem|EVex128|VexWIG|EVexMap5|NoSuf, { RegXMM, Reg32 } +@@ -3300,14 +3363,14 @@ vrsqrtsh, 0x664f, AVX512_FP16, Modrm|EVexLIG|Masking|EVexMap6|VexVVVV|VexW0|Disp + + // PREFETCHI instructions. + +-prefetchit0, 0xf18/7, PREFETCHI|x64, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex } +-prefetchit1, 0xf18/6, PREFETCHI|x64, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex } ++prefetchit0, 0xf18/7, PREFETCHI, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex } ++prefetchit1, 0xf18/6, PREFETCHI, Modrm|Anysize|IgnoreSize|NoSuf, { BaseIndex } + + // PREFETCHI instructions end. + + // CMPCCXADD instructions. + +-cmpxadd, 0x66e, CMPCCXADD|x64, Modrm|Vex|Space0F38|VexVVVV|SwapSources|CheckOperandSize|NoSuf, { Reg32|Reg64, Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } ++cmpxadd, 0x66e, APX_F(CMPCCXADD), Modrm|Vex|EVex128|Space0F38|VexVVVV|SwapSources|CheckOperandSize|NoSuf, { Reg32|Reg64, Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } + + // CMPCCXADD instructions end. + +@@ -3319,30 +3382,52 @@ wrmsrns, 0x0f01c6, WRMSRNS, NoSuf, {} + + // MSRLIST instructions. + +-rdmsrlist, 0xf20f01c6, MSRLIST|x64, NoSuf, {} +-wrmsrlist, 0xf30f01c6, MSRLIST|x64, NoSuf, {} ++rdmsrlist, 0xf20f01c6, MSRLIST, NoSuf, {} ++wrmsrlist, 0xf30f01c6, MSRLIST, NoSuf, {} + + // MSRLIST instructions end. + + // RAO-INT instructions. + +-aadd, 0xf38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } +-aand, 0x660f38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } +-aor, 0xf20f38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } +-axor, 0xf30f38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } ++ ++a, 0x0f38fc, RAO_INT, Modrm|IgnoreSize|CheckOperandSize|NoSuf, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } ++a, 0xfc, RAO_INT&APX_F, Modrm|CheckOperandSize|NoSuf|EVexMap4, { Reg32|Reg64, Dword|Qword|Unspecified|BaseIndex } ++ + + // RAO-INT instructions end. + + // LKGS instruction. + +-lkgs, 0xf20f00/6, LKGS|x64, Modrm|IgnoreSize|No_bSuf|No_sSuf|NoRex64, { Reg16|Reg32|Reg64 } +-lkgs, 0xf20f00/6, LKGS|x64, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf, { Word|Unspecified|BaseIndex } ++lkgs, 0xf20f00/6, LKGS, Modrm|IgnoreSize|No_bSuf|No_sSuf|NoRex64, { Reg16|Reg32|Reg64 } ++lkgs, 0xf20f00/6, LKGS, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf, { Word|Unspecified|BaseIndex } + + // LKGS instruction end. + + // FRED instructions. + +-erets, 0xf20f01ca, FRED|x64, NoSuf, {} +-eretu, 0xf30f01ca, FRED|x64, NoSuf, {} ++erets, 0xf20f01ca, FRED, NoSuf, {} ++eretu, 0xf30f01ca, FRED, NoSuf, {} + + // FRED instructions end. ++ ++// USER_MSR instructions. ++ ++urdmsr, 0xf20f38f8, USER_MSR, RegMem|NoSuf|NoRex64, { Reg64, Reg64 } ++urdmsr, 0xf2f8, USER_MSR&APX_F, RegMem|EVexMap4|VexW0|NoSuf, { Reg64, Reg64 } ++urdmsr, 0xf2f8/0, APX_F(USER_MSR), Modrm|Vex128|VexMap7|EVex128|VexW0|NoSuf, { Imm32, Reg64 } ++uwrmsr, 0xf30f38f8, USER_MSR, Modrm|NoSuf|NoRex64, { Reg64, Reg64 } ++uwrmsr, 0xf3f8, USER_MSR&APX_F, Modrm|EVexMap4|VexW0|NoSuf, { Reg64, Reg64 } ++// Immediates want to be first; md_assemble() takes care of swapping operands ++// accordingly. ++uwrmsr, 0xf3f8/0, APX_F(USER_MSR), Modrm|Vex128|VexMap7|EVex128|VexW0|NoSuf, { Imm32, Reg64 } ++ ++// USER_MSR instructions end. ++ ++// APX Push2/Pop2 instructions. ++ ++push2, 0xff/6, APX_F, Modrm|VexW0|EVexMap4|VexVVVV|ImplicitStackOp|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Reg64, Reg64 } ++push2p, 0xff/6, APX_F, Modrm|VexW1|EVexMap4|VexVVVV|ImplicitStackOp|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Reg64, Reg64 } ++pop2, 0x8f/0, APX_F, Modrm|VexW0|EVexMap4|VexVVVV|ImplicitStackOp|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Reg64, Reg64 } ++pop2p, 0x8f/0, APX_F, Modrm|VexW1|EVexMap4|VexVVVV|ImplicitStackOp|No_bSuf|No_wSuf|No_lSuf|No_sSuf, { Reg64, Reg64 } ++ ++// APX Push2/Pop2 instructions end. diff --git a/SOURCES/gdb-simultaneous-step-resume-breakpoint-test.patch b/SOURCES/gdb-simultaneous-step-resume-breakpoint-test.patch new file mode 100644 index 0000000..5e1315b --- /dev/null +++ b/SOURCES/gdb-simultaneous-step-resume-breakpoint-test.patch @@ -0,0 +1,162 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-simultaneous-step-resume-breakpoint-test.patch + +;; New test for step-resume breakpoint placed in multiple threads at once. +;;=fedoratest + +diff --git a/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.c b/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.c +@@ -0,0 +1,79 @@ ++/* Copyright 2009 Free Software Foundation, Inc. ++ ++ Written by Fred Fish of Cygnus Support ++ Contributed by Cygnus Support ++ ++ This file is part of GDB. ++ ++ 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 multiple threads stepping into a .debug_line-less function with ++ a breakpoint placed on its return-to-caller point. */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#define THREADS 3 ++ ++static void * ++func (void *unused) ++{ ++ int i; ++ ++ errno = 0; ++ i = 0xdeadf00d; ++ i = sleep (THREADS); /* sleep-call */ ++ if (errno != 0) /* sleep-after */ ++ perror ("sleep"); ++ ++ /* The GDB bug with forgotten step-resume breakpoint could leave stale ++ breakpoint on the I assignment making it a nop. */ ++ if (i == 0xdeadf00d) ++ assert (0); ++ ++ assert (i == 0); ++ ++ pthread_exit (NULL); ++} ++ ++int ++main (void) ++{ ++ pthread_t threads[THREADS]; ++ int threadi; ++ ++ for (threadi = 0; threadi < THREADS; threadi++) ++ { ++ int i; ++ ++ i = pthread_create (&threads[threadi], NULL, func, NULL); ++ assert (i == 0); ++ ++ i = sleep (1); ++ assert (i == 0); ++ } ++ ++ for (threadi = 0; threadi < THREADS; threadi++) ++ { ++ int i; ++ ++ i = pthread_join (threads[threadi], NULL); ++ assert (i == 0); ++ } ++ ++ return 0; /* final-exit */ ++} +diff --git a/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.exp b/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.exp +@@ -0,0 +1,65 @@ ++# Copyright (C) 2009 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . */ ++ ++# Test multiple threads stepping into a .debug_line-less function with ++# a breakpoint placed on its return-to-caller point. ++ ++set testfile simultaneous-step-resume-breakpoint ++set srcfile ${testfile}.c ++set binfile [standard_output_file ${testfile}] ++ ++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { ++ return -1 ++} ++ ++gdb_exit ++gdb_start ++gdb_reinitialize_dir $srcdir/$subdir ++ ++# Ensure we have no debuginfo for the `sleep' call itself (=for libc). ++gdb_test "set debug-file-directory /DoesNotExist" ++ ++gdb_load ${binfile} ++if ![runto_main] { ++ return -1 ++} ++ ++# Red Hat vendor patch does set it to "step" by default. ++gdb_test "set scheduler-locking off" ++ ++gdb_breakpoint [gdb_get_line_number "final-exit"] ++ ++gdb_breakpoint [gdb_get_line_number "sleep-call"] ++gdb_continue_to_breakpoint "sleep-call" ++ ++gdb_test "step" "sleep-call.*" "step thread 1" ++gdb_test "step" "sleep-call.*" "step thread 2" ++gdb_test "step" "sleep-after.*" "step thread 3" ++ ++set test "first continue" ++gdb_test_multiple "continue" $test { ++ -re "final-exit.*$gdb_prompt $" { ++ # gdb-7.0. ++ pass $test ++ return ++ } ++ -re "sleep-after.*$gdb_prompt $" { ++ # Fedora/RHEL branch. ++ pass $test ++ } ++} ++ ++gdb_test "continue" "sleep-after.*" "second continue" ++gdb_test "continue" "final-exit.*" "third continue" diff --git a/SOURCES/gdb-test-bt-cfi-without-die.patch b/SOURCES/gdb-test-bt-cfi-without-die.patch new file mode 100644 index 0000000..6167c14 --- /dev/null +++ b/SOURCES/gdb-test-bt-cfi-without-die.patch @@ -0,0 +1,214 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-test-bt-cfi-without-die.patch + +;; [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). +;;=fedoratest + +http://sourceware.org/ml/archer/2010-q3/msg00028.html + +On Wed, 25 Feb 2009 00:14:29 +0100, Jan Kratochvil wrote: +> commit 6a37c2b9962258ecf9299cc34a650e64a06acaa5 +> +> There was a regression on gdb.base/savedregs.exp. +> +> quick_addrmap/require_partial_symbols should be used even for the unwind debug +> info checking as its load has been also delayed by this branch. +[...] +> --- a/gdb/dwarf2-frame.c +> +++ b/gdb/dwarf2-frame.c +[...] +> @@ -1499,6 +1500,14 @@ dwarf2_frame_find_fde (CORE_ADDR *pc) +> struct dwarf2_fde *fde; +> CORE_ADDR offset; +> +> + if (objfile->quick_addrmap) +> + { +> + if (!addrmap_find (objfile->quick_addrmap, *pc)) +> + continue; +> + } +> + /* FIXME: Read-in only .debug_frame/.eh_frame without .debug_info? */ +> + require_partial_symbols (objfile); +> + + +but this has caused a different regression (as discussed in the confcall). + +QUICK_ADDRMAP is built only from .debug_aranges. But we can have existing +built .debug_aranges for CUs in OBJFILE but still some CUs do not need to have +DWARF at all while they can feature CFIs (.eh_frame or .debug_frame). +It has been described by Daniel Jacobowitz at: + Re: [2/4] RFC: check psymtabs_addrmap before reading FDEs + http://sourceware.org/ml/gdb-patches/2010-07/msg00012.html + +Sorry for this regression by me (in that fix of a different regression). + +Fixed it the "slow way" as this branch is now obsoleted by .gdb-index. + +No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu. + +Checked-in. + +Thanks, +Jan + +eb8df8566acc1ed963e3e9b77c13b9c2c3db03fb + +Test CFI is parsed even for range (function) not described by any DIE. + +https://bugzilla.redhat.com/show_bug.cgi?id=614028 + +gdb/ + * dwarf2-frame.c (dwarf2_frame_find_fde): Remove the + OBJFILE->QUICK_ADDRMAP check. New comment why. + +gdb/testsuite/ + * gdb.base/cfi-without-die.exp, gdb.base/cfi-without-die-main.c, + gdb.base/cfi-without-die-caller.c: New files. + +diff --git a/gdb/testsuite/gdb.base/cfi-without-die-caller.c b/gdb/testsuite/gdb.base/cfi-without-die-caller.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/cfi-without-die-caller.c +@@ -0,0 +1,28 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 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 . */ ++ ++typedef int (*callback_t) (void); ++ ++int ++caller (callback_t callback) ++{ ++ /* Ensure some frame content to push away the return address. */ ++ volatile const long one = 1; ++ ++ /* Modify the return value to prevent any tail-call optimization. */ ++ return (*callback) () - one; ++} +diff --git a/gdb/testsuite/gdb.base/cfi-without-die-main.c b/gdb/testsuite/gdb.base/cfi-without-die-main.c +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/cfi-without-die-main.c +@@ -0,0 +1,32 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 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 . */ ++ ++typedef int (*callback_t) (void); ++ ++extern int caller (callback_t callback); ++ ++int ++callback (void) ++{ ++ return 1; ++} ++ ++int ++main (void) ++{ ++ return caller (callback); ++} +diff --git a/gdb/testsuite/gdb.base/cfi-without-die.exp b/gdb/testsuite/gdb.base/cfi-without-die.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.base/cfi-without-die.exp +@@ -0,0 +1,71 @@ ++# Copyright 2010 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 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 CFI is parsed even for range (function) not described by any DIE. ++ ++set testfile cfi-without-die ++set srcmainfile ${testfile}-main.c ++set srccallerfile ${testfile}-caller.c ++set executable ${testfile} ++set objmainfile [standard_output_file ${testfile}-main.o] ++set objcallerfile [standard_output_file ${testfile}-caller.o] ++set binfile [standard_output_file ${executable}] ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srccallerfile}" ${objcallerfile} \ ++ object [list {additional_flags=-fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables}]] != "" ++ || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" ${objmainfile} object {debug}] != "" ++ || [gdb_compile "${objmainfile} ${objcallerfile}" ${binfile} executable {}] != "" } { ++ untested ${testfile}.exp ++ return -1 ++} ++ ++clean_restart $executable ++ ++if ![runto callback] then { ++ fail "verify unwinding: Can't run to callback" ++ return 0 ++} ++set test "verify unwinding breaks without CFI" ++gdb_test_multiple "bt" $test { ++ -re " in \[?\]\[?\] .*\r\n$gdb_prompt $" { ++ # It may backtrace through some random frames even to main(). ++ pass $test ++ } ++ -re " in main .*\r\n$gdb_prompt $" { ++ fail $test ++ } ++ -re "\r\n$gdb_prompt $" { ++ pass $test ++ } ++} ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srccallerfile}" ${objcallerfile} \ ++ object [list {additional_flags=-fomit-frame-pointer -funwind-tables -fasynchronous-unwind-tables}]] != "" ++ || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" ${objmainfile} object {debug}] != "" ++ || [gdb_compile "${objmainfile} ${objcallerfile}" ${binfile} executable {}] != "" } { ++ untested ${testfile}.exp ++ return -1 ++} ++ ++clean_restart $executable ++ ++if ![runto callback] then { ++ fail "test CFI without DIEs: Can't run to callback" ++ return 0 ++} ++# #0 callback () at ... ++# #1 0x00000000004004e9 in caller () ++# #2 0x00000000004004cd in main () at ... ++gdb_test "bt" "#0 +callback \[^\r\n\]+\r\n#1 \[^\r\n\]+ in caller \[^\r\n\]+\r\n#2 \[^\r\n\]+ in main \[^\r\n\]+" "verify unwindin works for CFI without DIEs" diff --git a/SOURCES/gdb-test-dw2-aranges.patch b/SOURCES/gdb-test-dw2-aranges.patch new file mode 100644 index 0000000..458e8ba --- /dev/null +++ b/SOURCES/gdb-test-dw2-aranges.patch @@ -0,0 +1,220 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Fedora GDB patches +Date: Fri, 27 Oct 2017 21:07:50 +0200 +Subject: gdb-test-dw2-aranges.patch + +;; [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. +;;=fedoratest + +[archer-tromey-delayed-symfile] + +commit 77fa7778a37b0d28a7e4e5235f074a10ecf1815d +Author: Jan Kratochvil +Date: Sat Aug 15 15:05:54 2009 +0200 + + Test for "handle incorrect aranges". + + readelf: + Contents of the .debug_aranges section: + + Length: 8 + Version: 2 + Offset into .debug_info: 0x0 + Pointer Size: 0 + Segment Size: 0 + + Address Length + Floating point exception + + * gdb.dwarf2/dw2-aranges.exp, gdb.dwarf2/dw2-aranges.S: New files. + +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-aranges.S b/gdb/testsuite/gdb.dwarf2/dw2-aranges.S +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-aranges.S +@@ -0,0 +1,140 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2004, 2007, 2008, 2009 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++/* Test .debug_aranges containing zero address_size. */ ++ ++/* Dummy function to provide debug information for. */ ++ ++ .text ++.Lbegin_text1: ++ .globl main ++ .type main, %function ++main: ++.Lbegin_main: ++ .int 0 ++.Lend_main: ++ .size main, .-main ++.Lend_text1: ++ ++/* Debug information */ ++ ++ .section .debug_info ++.Lcu1_begin: ++ /* CU header */ ++ .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */ ++.Lcu1_start: ++ .2byte 2 /* DWARF Version */ ++ .4byte .Labbrev1_begin /* Offset into abbrev section */ ++ .byte 4 /* Pointer size */ ++ ++ /* CU die */ ++ .uleb128 1 /* Abbrev: DW_TAG_compile_unit */ ++ .4byte .Lend_text1 /* DW_AT_high_pc */ ++ .4byte .Lbegin_text1 /* DW_AT_low_pc */ ++ .ascii "file1.txt\0" /* DW_AT_name */ ++ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */ ++ .byte 1 /* DW_AT_language (C) */ ++ ++ /* main */ ++ .uleb128 2 /* Abbrev: DW_TAG_subprogram */ ++ .byte 1 /* DW_AT_external */ ++ .byte 1 /* DW_AT_decl_file */ ++ .byte 2 /* DW_AT_decl_line */ ++ .ascii "main\0" /* DW_AT_name */ ++ .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */ ++ .4byte .Lbegin_main /* DW_AT_low_pc */ ++ .4byte .Lend_main /* DW_AT_high_pc */ ++ .byte 1 /* DW_AT_frame_base: length */ ++ .byte 0x55 /* DW_AT_frame_base: DW_OP_reg5 */ ++ ++.Ltype_int: ++ .uleb128 3 /* Abbrev: DW_TAG_base_type */ ++ .ascii "int\0" /* DW_AT_name */ ++ .byte 4 /* DW_AT_byte_size */ ++ .byte 5 /* DW_AT_encoding */ ++ ++ .byte 0 /* End of children of CU */ ++ ++.Lcu1_end: ++ ++/* Abbrev table */ ++ .section .debug_abbrev ++.Labbrev1_begin: ++ .uleb128 1 /* Abbrev code */ ++ .uleb128 0x11 /* DW_TAG_compile_unit */ ++ .byte 1 /* has_children */ ++ .uleb128 0x12 /* DW_AT_high_pc */ ++ .uleb128 0x1 /* DW_FORM_addr */ ++ .uleb128 0x11 /* DW_AT_low_pc */ ++ .uleb128 0x1 /* DW_FORM_addr */ ++ .uleb128 0x3 /* DW_AT_name */ ++ .uleb128 0x8 /* DW_FORM_string */ ++ .uleb128 0x25 /* DW_AT_producer */ ++ .uleb128 0x8 /* DW_FORM_string */ ++ .uleb128 0x13 /* DW_AT_language */ ++ .uleb128 0xb /* DW_FORM_data1 */ ++ .byte 0x0 /* Terminator */ ++ .byte 0x0 /* Terminator */ ++ ++ .uleb128 2 /* Abbrev code */ ++ .uleb128 0x2e /* DW_TAG_subprogram */ ++ .byte 0 /* has_children */ ++ .uleb128 0x3f /* DW_AT_external */ ++ .uleb128 0xc /* DW_FORM_flag */ ++ .uleb128 0x3a /* DW_AT_decl_file */ ++ .uleb128 0xb /* DW_FORM_data1 */ ++ .uleb128 0x3b /* DW_AT_decl_line */ ++ .uleb128 0xb /* DW_FORM_data1 */ ++ .uleb128 0x3 /* DW_AT_name */ ++ .uleb128 0x8 /* DW_FORM_string */ ++ .uleb128 0x49 /* DW_AT_type */ ++ .uleb128 0x13 /* DW_FORM_ref4 */ ++ .uleb128 0x11 /* DW_AT_low_pc */ ++ .uleb128 0x1 /* DW_FORM_addr */ ++ .uleb128 0x12 /* DW_AT_high_pc */ ++ .uleb128 0x1 /* DW_FORM_addr */ ++ .uleb128 0x40 /* DW_AT_frame_base */ ++ .uleb128 0xa /* DW_FORM_block1 */ ++ .byte 0x0 /* Terminator */ ++ .byte 0x0 /* Terminator */ ++ ++ .uleb128 3 /* Abbrev code */ ++ .uleb128 0x24 /* DW_TAG_base_type */ ++ .byte 0 /* has_children */ ++ .uleb128 0x3 /* DW_AT_name */ ++ .uleb128 0x8 /* DW_FORM_string */ ++ .uleb128 0xb /* DW_AT_byte_size */ ++ .uleb128 0xb /* DW_FORM_data1 */ ++ .uleb128 0x3e /* DW_AT_encoding */ ++ .uleb128 0xb /* DW_FORM_data1 */ ++ .byte 0x0 /* Terminator */ ++ .byte 0x0 /* Terminator */ ++ ++ .byte 0x0 /* Terminator */ ++ .byte 0x0 /* Terminator */ ++ ++/* aranges table */ ++ .section .debug_aranges ++ .long .Laranges_end - 1f ++1: ++ .2byte 2 /* aranges Version */ ++ .4byte .Lcu1_begin - .debug_info /* Offset into .debug_info section */ ++ /* The GDB crasher is this zero value. */ ++ .byte 0 /* aranges address_size */ ++ .byte 0 /* aranges segment_size */ ++ ++.Laranges_end: +diff --git a/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp +new file mode 100644 +--- /dev/null ++++ b/gdb/testsuite/gdb.dwarf2/dw2-aranges.exp +@@ -0,0 +1,40 @@ ++# Copyright 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++# Test .debug_aranges containing zero address_size. ++ ++# This test can only be run on targets which support DWARF-2 and use gas. ++# For now pick a sampling of likely targets. ++if {![istarget *-*-linux*] ++ && ![istarget *-*-gnu*] ++ && ![istarget *-*-elf*] ++ && ![istarget *-*-openbsd*] ++ && ![istarget arm-*-eabi*] ++ && ![istarget powerpc-*-eabi*]} { ++ return 0 ++} ++ ++set testfile "dw2-aranges" ++set srcfile ${testfile}.S ++set binfile [standard_output_file ${testfile}] ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {nodebug}] != "" } { ++ return -1 ++} ++ ++clean_restart $testfile ++ ++# Failed gdb_load would abort the testcase execution earlier. ++pass "file loaded" diff --git a/SOURCES/gdbinit b/SOURCES/gdbinit new file mode 100644 index 0000000..b59fb0d --- /dev/null +++ b/SOURCES/gdbinit @@ -0,0 +1,9 @@ +# System-wide GDB initialization file. +python +import glob +# glob.iglob is not available in python-2.4 (RHEL-5). +for f in glob.glob('%{_sysconfdir}/gdbinit.d/*.gdb'): + gdb.execute('source %s' % f) +for f in glob.glob('%{_sysconfdir}/gdbinit.d/*.py'): + gdb.execute('source %s' % f) +end diff --git a/SOURCES/gdbtui b/SOURCES/gdbtui new file mode 100755 index 0000000..88f9d55 --- /dev/null +++ b/SOURCES/gdbtui @@ -0,0 +1,2 @@ +#! /bin/sh +exec gdb -tui "$@" diff --git a/SPECS/gdb.spec b/SPECS/gdb.spec new file mode 100644 index 0000000..d5485ab --- /dev/null +++ b/SPECS/gdb.spec @@ -0,0 +1,6476 @@ +# rpmbuild parameters: +# --with testsuite: Run the testsuite (biarch if possible). Default is without. +# --with buildisa: Use %%{?_isa} for BuildRequires +# --with asan: gcc -fsanitize=address +# --without python: No python support. +# --with profile: gcc -fprofile-generate / -fprofile-use: Before better +# workload gets run it decreases the general performance now. +# --define 'scl somepkgname': Independent packages by scl-utils-build. +# --define 'tests "TEST1 ... TESTN": Limit testing to specified tests. + +# Turn off the brp-python-bytecompile automagic +%global _python_bytecompile_extra 0 + +# Disable LTO until upstream fixes GDB's ODR woes. +%define _lto_cflags %{nil} + +# GTS magic sauce. On GTS N (N >= 13), we always build using +# the system compiler and elfutils. +# +# For testing, we use the GTS (N-1) compiler and the system valgrind/elfutils. + +%{?scl_package:%global scl gcc-toolset-14} +%global scl_prefix gcc-toolset-14- +%global scl_testing_prefix gcc-toolset-13- +BuildRequires: scl-utils-build + +# Only build on x86 for RHEL6 SCL, defining missing parallel make macros. +%if 0%{?scl:1} && 0%{?el6:1} +ExclusiveArch: %{ix86} x86_64 +%global make_build make %{?_smp_mflags} +%global make_install make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT +%endif + +# Exclude aarch64 on RHEL7. +%if 0%{?scl:1} && 0%{?el7:1} +ExcludeArch: aarch64 +%endif + +%{?scl:%scl_package gdb} +%{!?scl: + %global pkg_name %{name} + %global _root_prefix %{_prefix} + %global _root_datadir %{_datadir} + %global _root_libdir %{_libdir} +} + +# If we're on Fedora or RHEL 9+, we will build the gdb-minimal package. +# Never build the -minimal package on SCLs, since it's unneeded there. +%if 0%{?fedora} || (0%{?rhel} > 8 && 0%{!?scl:1}) +%global _build_minimal 1 +%endif + +# Include support for Guile? This is enabled on RHEL 8 and +# Fedora < 38. +%if (0%{?fedora:1} && 0%{?fedora} < 38) || (0%{?rhel:1} && 0%{?rhel} == 8) +%define use_guile 1 +%endif + +Name: %{?scl_prefix}gdb + +# Freeze it when GDB gets branched +%global snapsrc 20220501 +# See timestamp of source gnulib installed into gnulib/ . +%global snapgnulib 20220501 +%global tarname gdb-%{version} +Version: 14.2 + +# The release always contains a leading reserved number, start it at 1. +# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. +Release: 3%{?dist} + +License: GPL-3.0-or-later AND BSD-3-Clause AND FSFAP AND LGPL-2.1-or-later AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later AND LGPL-2.0-or-later WITH GCC-exception-2.0 AND GPL-3.0-or-later WITH GCC-exception-3.1 AND GPL-2.0-or-later WITH GNU-compiler-exception +# Do not provide URL for snapshots as the file lasts there only for 2 days. +# ftp://sourceware.org/pub/gdb/releases/FIXME{tarname}.tar.xz +#Source: %{tarname}.tar.xz +Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz +URL: https://gnu.org/software/gdb/ + +# For our convenience +%global gdb_src %{tarname} +%global gdb_build build-%{_target_platform} +%if 0%{?_build_minimal} +%global gdb_build_minimal %{gdb_build}-minimal +%endif # 0%{?_build_minimal} + +# error: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/bin/gdb-gdb.py +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/PBOJDOFMWTRV3ZOKNV5HN7IBX5EPHDHF/ +%undefine _debuginfo_subpackages + +# For DTS RHEL<=7 GDB it is better to use none than a Requires dependency. +%if 0%{!?rhel:1} +Recommends: dnf-command(debuginfo-install) +%endif + +%if 0%{!?scl:1} +# when manpages were moved from -headless to main +# https://bugzilla.redhat.com/show_bug.cgi?id=1402554 +# theoretically should not be required due to versioned dependeny +# below, but it cannot hurt either -- rdieter +Conflicts: gdb-headless < 7.12-29 + +Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages +Requires: gdb-headless%{?_isa} = %{version}-%{release} + +%description +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Fortran, Go, and other languages, by executing them in a controlled +fashion and printing their data. + +If you want to use GDB for development purposes, you should install +the 'gdb' package which will install 'gdb-headless' and possibly other +useful packages too. + +%package headless +%endif + +Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages + +# Make sure we get rid of the old package gdb64, now that we have unified +# support for 32-64 bits in one single 64-bit gdb. +%ifarch ppc64 +Obsoletes: gdb64 < 5.3.91 +%endif + +%ifarch %{arm} riscv64 +%global have_inproctrace 0 +%else +%global have_inproctrace 1 +%endif + +# gdb-add-index cannot be run even for SCL package on RHEL<=6. +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +# eu-strip: -g recognizes .gdb_index as a debugging section. (#631997) +Conflicts: elfutils < 0.149 +%endif + +# https://fedorahosted.org/fpc/ticket/43 https://fedorahosted.org/fpc/ticket/109 +Provides: bundled(libiberty) = %{snapsrc} +Provides: bundled(gnulib) = %{snapgnulib} +# The libraries in the top-level directory (libbfd, libopcodes, +# libctf) are covered by the "bundled(binutils)" below. See ticket +# #109, as mentioned above. +Provides: bundled(binutils) = %{snapsrc} +# https://fedorahosted.org/fpc/ticket/130 +Provides: bundled(md5-gcc) = %{snapsrc} + +# https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRequires_and_.25.7B_isa.7D +%if 0%{?_with_buildisa:1} || 0%{?_with_testsuite:1} +%global buildisa %{?_isa} +%else +%global buildisa %{nil} +%endif + +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +# https://bugzilla.redhat.com/show_bug.cgi?id=1209492 +Recommends: default-yama-scope +%endif + +%if 0%{?el6:1} +%global librpmver 1 +%else +# FIXME: %elif does not work. +%if 0%{?el7:1} +%global librpmver 3 +%else +%if 0%{?fedora} >= 27 || 0%{?rhel} > 7 +%global librpmver 8 +%else +%global librpmver 7 +%endif +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 +%global librpmver 9 +%endif +%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10 +%global librpmver 10 +%endif +%endif +%endif +%if 0%{?__isa_bits} == 64 +%global librpmname librpm.so.%{librpmver}()(64bit) +%else +%global librpmname librpm.so.%{librpmver} +%endif +BuildRequires: rpm-libs%{buildisa} +%if 0%{?_with_buildisa:1} +BuildRequires: %{librpmname} +%endif +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +Recommends: %{librpmname} +%endif + +%if 0%{?el6:1} || 0%{?el7:1} +# GDB C++11 requires devtoolset gcc. +BuildRequires: %{?scl_prefix}gcc-c++ +%else +BuildRequires: gcc-c++ +%endif + +# GDB patches have the format `gdb--bz-.patch'. +# They should be created using patch level 1: diff -up ./gdb (or gdb-6.3/gdb). + +#= +#push=Should be pushed upstream. +#fedora=Should stay as a Fedora patch. +#fedoratest=Keep it in Fedora only as a regression test safety. + +# Cleanup any leftover testsuite processes as it may stuck mock(1) builds. +#=push+jan +Source2: gdb-orphanripper.c + +# Man page for gstack(1). +#=push+jan +Source3: gdb-gstack.man + +# /etc/gdbinit (from Debian but with Fedora compliant location). +#=fedora +Source4: gdbinit + +# libstdc++ pretty printers from GCC SVN. +%global libstdcxxpython gdb-libstdc++-v3-python-8.1.1-20180626 +#=fedora +Source5: %{libstdcxxpython}.tar.xz + +# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). +#=fedora +Source6: gdbtui + +# libipt: Intel Processor Trace Decoder Library +%global libipt_version 2.0.5 +#=fedora +Source7: v%{libipt_version}.tar.gz + +# Include the auto-generated file containing the "Patch:" directives. +# See README.local-patches for more details. +Patch9998: _gdb.spec.Patch.include +Patch9999: _gdb.spec.patch.include +%include %{PATCH9998} + +# System readline is too old prior to RHEL8. +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +%global use_system_readline 1 +BuildRequires: readline-devel%{buildisa} >= 7.0 +%else +%global use_system_readline 0 +%endif + +BuildRequires: ncurses-devel%{buildisa} texinfo gettext flex bison +BuildRequires: expat-devel%{buildisa} +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +BuildRequires: xz-devel%{buildisa} +%endif +# dlopen() no longer makes rpm-libsFIXME{?_isa} (it's .so) a mandatory dependency. +BuildRequires: rpm-devel%{buildisa} +BuildRequires: zlib-devel%{buildisa} libselinux-devel%{buildisa} +%if 0%{!?_without_python:1} +%if 0%{?rhel:1} && 0%{?rhel} <= 7 +BuildRequires: python-devel%{buildisa} +%global __python /usr/bin/python2 +%else +%global __python %{__python3} +BuildRequires: python3-devel%{buildisa} +%endif +%if 0%{?rhel:1} && 0%{?rhel} <= 7 +# Temporarily before python files get moved to libstdc++.rpm +# libstdc++%{bits_other} is not present in Koji, the .spec script generating +# gdb/python/libstdcxx/ also does not depend on the %{bits_other} files. +BuildRequires: libstdc++%{buildisa} +%endif # 0%{?rhel:1} && 0%{?rhel} <= 7 +%endif # 0%{!?_without_python:1} +# gdb-doc in PDF, see: https://bugzilla.redhat.com/show_bug.cgi?id=919891#c10 +BuildRequires: texinfo-tex +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +BuildRequires: texlive-collection-latexrecommended +%endif +# Permit rebuilding *.[0-9] files even if they are distributed in gdb-*.tar: +BuildRequires: /usr/bin/pod2man +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +BuildRequires: libbabeltrace-devel%{buildisa} + %if %{defined use_guile} + %if 0%{!?rhel:1} +BuildRequires: guile22-devel%{buildisa} + %endif + # Guile is only supported prior to RHEL9, where it was called "guile". + %if 0%{?rhel:1} && 0%{?rhel} < 9 +BuildRequires: guile-devel%{buildisa} + %endif + %endif +%endif + +%global have_libipt 0 +%if 0%{!?rhel:1} || 0%{?rhel} > 7 || (0%{?rhel} == 7 && 0%{?scl:1}) +%ifarch %{ix86} x86_64 +%global have_libipt 1 +%if 0%{?el7:1} && 0%{?scl:1} +BuildRequires: cmake +%else +BuildRequires: libipt-devel%{buildisa} +%endif +%endif +%endif +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +# See https://bugzilla.redhat.com/show_bug.cgi?id=1593280 +# DTS RHEL-6 has mpfr-2 while GDB requires mpfr-3 on RHEL-7, RHEL-8, and +# Fedora < 32, and mpfr-4 on Fedora 32+ and RHEL-9+. +BuildRequires: mpfr-devel%{buildisa} +%endif +# RHEL6 doesn't have source-highlight. +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +BuildRequires: source-highlight-devel +%endif +%if 0%{!?rhel:1} +BuildRequires: xxhash-devel +%endif + +# Special case: on RHEL8+, we simply require the system debuginfod. +# Otherwise, we require the SCL version. Except on RHEL6, where debuginfod +# is not supported at all. +%global have_debuginfod 0 +%global use_scl_for_debuginfod 0 +%if 0%{!?rhel:1} || 0%{?rhel} >= 8 +%global have_debuginfod 1 +BuildRequires: elfutils-debuginfod-client-devel +%else +%if 0%{!?el6:1} && 0%{?scl:1} +%global have_debuginfod 1 +%global use_scl_for_debuginfod 1 +BuildRequires: elfutils-debuginfod-client-devel +%endif +%endif + +# Workaround for missing boost-devel dependency (rhbz 1718480) +BuildRequires: boost-devel + +%if 0%{?_with_testsuite:1} + +# Ensure the devel libraries are installed for both multilib arches. +%global bits_local %{?_isa} +%global bits_other %{?_isa} +%ifarch s390x +%if 0%{?rhel:1} && 0%{?rhel} < 8 +%global bits_other (%{__isa_name}-32) +%endif +%else #!s390x +%ifarch ppc +%global bits_other (%{__isa_name}-64) +%else #!ppc +%ifarch sparc64 ppc64 s390x x86_64 +%global bits_other (%{__isa_name}-32) +%endif #sparc64 ppc64 s390x x86_64 +%endif #!ppc +%endif #!s390x + +BuildRequires: sharutils dejagnu +# gcc-objc++ is not covered by the GDB testsuite. +# Test supported SCL toolchain components. +BuildRequires: %{?scl_testing_prefix}gcc %{?scl_testing_prefix}gcc-c++ %{?scl_testing_prefix}gcc-gfortran + +%if 0%{!?rhel:1} || 0%{?rhel} < 8 +BuildRequires: gcc-objc +%endif +# We don't support gcc-gdb-plugin on RHEL anymore. +%if 0%{!?rhel:1} +BuildRequires: %{?scl_prefix}gcc-gdb-plugin%{?_isa} +%endif +%if 0%{?rhel:1} && 0%{?rhel} < 7 +BuildRequires: gcc-java libgcj%{bits_local} libgcj%{bits_other} +# for gcc-java linkage: +BuildRequires: zlib-devel%{bits_local} zlib-devel%{bits_other} +%endif +# Exception for RHEL<=7 +%ifarch aarch64 +%if 0%{!?rhel:1} +BuildRequires: gcc-go +BuildRequires: libgo-devel%{bits_local} libgo-devel%{bits_other} +%endif +%else +%if 0%{!?rhel:1} || 0%{?rhel} == 7 +BuildRequires: gcc-go +BuildRequires: libgo-devel%{bits_local} libgo-devel%{bits_other} +%endif +%endif +# archer-sergiodj-stap-patch-split +BuildRequires: systemtap-sdt-devel +%if 0%{?rhel:1} && 0%{?rhel} <= 7 +# Copied from prelink-0.4.2-3.fc13. +# Prelink is not yet ported to ppc64le. +%ifarch %{ix86} alpha sparc sparcv9 sparc64 s390 s390x x86_64 ppc ppc64 +# Prelink is broken on sparcv9/sparc64. +%ifnarch sparc sparcv9 sparc64 +BuildRequires: prelink +%endif +%endif +%endif +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +BuildRequires: opencl-headers ocl-icd-devel%{bits_local} ocl-icd-devel%{bits_other} +%endif +%if 0%{!?rhel:1} +# Fedora arm+ppc64le+s390x do not yet have fpc built. +%ifnarch %{arm} ppc64le s390x +BuildRequires: fpc +%endif +%endif +# Copied from: gcc-6.2.1-1.fc26 +# Exception for RHEL<=7 +%ifarch s390x +%if 0%{!?rhel:1} +BuildRequires: gcc-gnat +BuildRequires: libgnat%{bits_local} libgnat%{bits_other} +%endif +%else +%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 riscv64 +%if 0%{!?rhel:1} +BuildRequires: gcc-gnat +BuildRequires: libgnat%{bits_local} libgnat%{bits_other} +%endif +%endif +%endif +BuildRequires: glibc-devel%{bits_local} glibc-devel%{bits_other} +BuildRequires: libgcc%{bits_local} libgcc%{bits_other} +BuildRequires: libgfortran%{bits_local} libgfortran%{bits_other} +# libstdc++-devel of matching bits is required only for g++ -static. +BuildRequires: libstdc++%{bits_local} libstdc++%{bits_other} +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +%ifarch %{ix86} x86_64 +BuildRequires: libquadmath%{bits_local} libquadmath%{bits_other} +%endif +%endif +# multilib glibc-static is open Bug 488472: +%if 0%{?rhel} > 6 +BuildRequires: glibc-static%{bits_other} +%endif +%ifarch s390x +BuildRequires: valgrind%{bits_local} +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +BuildRequires: valgrind%{bits_local} valgrind%{bits_other} +%endif +%else +BuildRequires:valgrind%{bits_local} valgrind%{bits_other} +%endif +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +BuildRequires: xz +%endif +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +BuildRequires: rust +%endif +%if 0%{!?el6:1} +BuildRequires: elfutils-debuginfod +%endif +%endif # 0%{?_with_testsuite:1} +BuildRequires: make gmp-devel + +%{?scl:Requires:%scl_runtime} + +# FIXME: The text needs to be duplicated to prevent 2 empty heading lines. +%if 0%{!?scl:1} +%description headless +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Java, and other languages, by executing them in a controlled fashion +and printing their data. +%else +%description +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Java, and other languages, by executing them in a controlled fashion +and printing their data. +%endif + +%if 0%{?_build_minimal} +%package minimal +Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages (minimal version) +# gdb-add-index is shared with gdb-headless and it must be from same version +Conflicts: %{name}-headless < %{version}-%{release} +Conflicts: %{name}-headless > %{version}-%{release} + +%description minimal +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Fortran, Go, and other languages, by executing them in a controlled +fashion and printing their data. + +This package provides a minimal version of GDB, tailored to be used by +the Fedora buildroot. It should probably not be used by end users. +%endif # 0%{?_build_minimal} + +%package gdbserver +Summary: A standalone server for GDB (the GNU source-level debugger) + +%description gdbserver +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Fortran, Go, and other languages, by executing them in a controlled +fashion and printing their data. + +This package provides a program that allows you to run GDB on a different +machine than the one which is running the program being debugged. + +%package doc +Summary: Documentation for GDB (the GNU source-level debugger) +License: GFDL +BuildArch: noarch +%if 0%{?scl:1} +# As of F-28, packages won't need to call /sbin/install-info by hand +# anymore. We make an exception for DTS here. +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/MP2QVJZBOJZEOQO2G7UB2HLXKXYPF2G5/ +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info +%endif + +%description doc +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Java, and other languages, by executing them in a controlled fashion +and printing their data. + +This package provides INFO, HTML and PDF user manual for GDB. + +%prep +%setup -q -n %{gdb_src} + +%if 0%{?rhel:1} && 0%{?rhel} <= 7 +# libstdc++ pretty printers. +tar xJf %{SOURCE5} +%endif # 0%{?rhel:1} && 0%{?rhel} <= 7 + +%if 0%{have_libipt} && 0%{?el7:1} && 0%{?scl:1} +tar xzf %{SOURCE7} +%endif + +# Files have `# ' statements breaking VPATH / find-debuginfo.sh . +(cd gdb;rm -fv $(perl -pe 's/\\\n/ /' gdb/version.in << _FOO +%{?version_prefix:%version_prefix }%{version}-%{release} +_FOO + +# Remove the info and other generated files added by the FSF release +# process. +rm -f libdecnumber/gstdint.h +rm -f bfd/doc/*.info +rm -f bfd/doc/*.info-* +rm -f gdb/doc/*.info +rm -f gdb/doc/*.info-* + +%if 0%{use_system_readline} +mv -f readline/readline/doc readline-doc +rm -rf readline/readline/* +mv -f readline-doc readline/readline/doc +%endif + +rm -rf zlib texinfo + +%build +rm -rf %{buildroot} + +test -e %{_root_libdir}/librpm.so.%{librpmver} + +%if 0%{?el6:1} +# GDB C++11 requires devtoolset gcc. +%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}} +%endif + +# A set of common GDB configure flags, which are used for both minimal +# and non-minimal compilations. +COMMON_GDB_CONFIGURE_FLAGS="\ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --sysconfdir=%{_sysconfdir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --with-gdb-datadir=%{_datadir}/gdb \ + --enable-gdb-build-warnings=,-Wno-unused,-Wno-deprecated-declarations,-Wno-unused-function,-Wno-stringop-overflow\ +%ifarch %{ix86} +,-Wno-format-overflow\ +%endif + --enable-build-with-cxx \ +%ifnarch %{ix86} alpha ppc s390 s390x x86_64 ppc64 ppc64le sparc sparcv9 sparc64 %{arm} aarch64 riscv64 + --disable-werror \ +%else + --enable-werror \ +%endif + --with-separate-debug-dir=/usr/lib/debug \ + --disable-sim \ + --disable-rpath \ + --without-stage1-ldflags \ + --disable-libmcheck \ +%if 0%{use_system_readline} + --with-system-readline \ +%else + --without-system-readline \ +%endif + --without-libunwind \ +%ifarch sparc sparcv9 sparc64 + --without-mmap \ +%endif + --enable-64-bit-bfd \ +%if 0%{?rhel:1} && 0%{?rhel} <= 6 + --without-mpfr \ +%endif + --with-system-zlib \ +%if 0%{!?rhel:1} || 0%{?rhel} > 6 + --with-lzma \ +%else + --without-lzma \ +%endif +%if 0%{!?rhel:1} || 0%{?have_debuginfod} + --with-debuginfod \ +%endif +%if 0%{?rhel:1} + --disable-libctf +%endif +" + +# Identify the build directory with the version of gdb as well as the +# architecture, to allow for mutliple versions to be installed and +# built. +# Initially we're in the %{gdb_src} directory. + +for fprofile in %{?_with_profile:-fprofile} "" +do + +# We will first build the minimal version of GDB. +%if 0%{?_build_minimal} +mkdir %{gdb_build_minimal}$fprofile +cd %{gdb_build_minimal}$fprofile + +# The configure flags we will use when building gdb-minimal. +GDB_MINIMAL_CONFIGURE_FLAGS="\ + --without-babeltrace \ + --without-expat \ + --disable-tui \ + --without-python \ + --without-guile \ + --disable-inprocess-agent \ + --without-intel-pt \ + --disable-unit-tests \ + --disable-source-highlight" + +# Populate CFLAGS, LDFLAGS, CC, CXX, etc. +%set_build_flags +CFLAGS="$CFLAGS %{?_with_asan:-fsanitize=address}" +LDFLAGS="$LDFLAGS %{?_with_asan:-fsanitize=address}" +CXXFLAGS="$CXXFLAGS %{?_with_asan:-fsanitize=address}" + +# If using an SCL for debuginfod, add path to SCL's pkgconfig directory. +%if 0%{?have_debuginfod} && 0%{?use_scl_for_debuginfod} +export PKG_CONFIG_PATH=%{_libdir}/pkgconfig +%endif + +# --htmldir and --pdfdir are not used as they are used from %{gdb_build}. +../configure \ + ${COMMON_GDB_CONFIGURE_FLAGS} \ + ${GDB_MINIMAL_CONFIGURE_FLAGS} \ +%if 0%{?pkgversion_configure_flag:1} + "%{pkgversion_configure_flag}" \ +%endif + --with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ + --with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ +%ifarch sparc sparcv9 + sparc-%{_vendor}-%{_target_os}%{?_gnu} +%else + --enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu \ + %{_target_platform} +%endif + +# Prepare gdb/config.h first. +%make_build CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" V=1 maybe-configure-gdb +perl -i.relocatable -pe 's/^(D\[".*_RELOCATABLE"\]=" )1(")$/${1}0$2/' gdb/config.status + +%make_build CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" V=1 + +cd .. +%endif # 0%{?_build_minimal} + +# Now we build the full GDB. +mkdir %{gdb_build}$fprofile +cd %{gdb_build}$fprofile + +export CFLAGS="$RPM_OPT_FLAGS %{?_with_asan:-fsanitize=address}" +export LDFLAGS="%{?__global_ldflags} %{?_with_asan:-fsanitize=address}" + +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL" +%endif + +%if 0%{have_libipt} && 0%{?el7:1} && 0%{?scl:1} +( + mkdir libipt-%{libipt_version}-root + mkdir libipt-%{libipt_version}-build + cd libipt-%{libipt_version}-build + # -DPTUNIT:BOOL=ON has no effect on ctest. + %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DPTUNIT:BOOL=OFF \ + -DDEVBUILD:BOOL=ON \ + -DBUILD_SHARED_LIBS=OFF \ + ../../libipt-%{libipt_version} + make VERBOSE=1 %{?_smp_mflags} + ctest -V %{?_smp_mflags} + make install DESTDIR=../libipt-%{libipt_version}-root +) +# There is also: --with-libipt-prefix +CFLAGS="$CFLAGS -I$PWD/libipt-%{libipt_version}-root%{_includedir}" +LDFLAGS="$LDFLAGS -L$PWD/libipt-%{libipt_version}-root%{_libdir}" +%endif + +export CXXFLAGS="$CFLAGS" + +# For DTS11+, gcc defaults to c++17, causing issues with system-installed +# headers, e.g., python. Force to c++11. We coerce all builds to use c++11 +# to facilitate testing. +%if 0%{?rhel:1} && 0%{?rhel} < 8 +export CXXFLAGS="$CXXFLAGS -std=gnu++11" +%endif + +# The configure flags we will use when building the full GDB. +GDB_FULL_CONFIGURE_FLAGS="\ + --with-system-gdbinit=%{_sysconfdir}/gdbinit \ +%if 0%{!?rhel:1} || 0%{?rhel} > 7 + --with-babeltrace \ +%else + --without-babeltrace \ +%endif + --with-expat \ +$(: ppc64 host build crashes on ppc variant of libexpat.so ) \ + --without-libexpat-prefix \ + --enable-tui \ +%if 0%{!?_without_python:1} + --with-python=%{__python} \ +%else + --without-python \ +%endif +%if %{defined use_guile} + --with-guile \ +%else + --without-guile \ +%endif +%if %{have_inproctrace} + --enable-inprocess-agent \ +%else + --disable-inprocess-agent \ +%endif +%if %{have_libipt} + --with-intel-pt \ +%else + --without-intel-pt \ +%endif +%if 0%{!?rhel:1} + --with-xxhash \ +%endif + --with-rpm=librpm.so.%{librpmver} \ + --enable-unit-tests" + +# --htmldir and --pdfdir are not used as they are used from %{gdb_build}. +../configure \ + ${COMMON_GDB_CONFIGURE_FLAGS} \ + ${GDB_FULL_CONFIGURE_FLAGS} \ +%if 0%{?pkgversion_configure_flag:1} + "%{pkgversion_configure_flag}" \ +%endif + --with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ + --with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ +%ifarch sparc sparcv9 + sparc-%{_vendor}-%{_target_os}%{?_gnu} +%else + --enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu \ + %{_target_platform} +%endif + +if [ -z "%{!?_with_profile:no}" ] +then + # Run all the configure tests being incompatible with $FPROFILE_CFLAGS. + %make_build configure-host configure-target + %make_build clean + + # Workaround -fprofile-use: + # linux-x86-low.c:2225: Error: symbol `start_i386_goto' is already defined + %make_build -C gdb/gdbserver linux-x86-low.o +fi + +# Global CFLAGS would fail on: +# conftest.c:1:1: error: coverage mismatch for function 'main' while reading counter 'arcs' +if [ "$fprofile" = "-fprofile" ] +then + FPROFILE_CFLAGS='-fprofile-generate' +elif [ -z "%{!?_with_profile:no}" ] +then + FPROFILE_CFLAGS='-fprofile-use' + # We cannot use -fprofile-dir as the bare filenames clash. + (cd ../${builddir}-fprofile; + # It was 333 on x86_64. + test $(find -name "*.gcda"|wc -l) -gt 300 + find -name "*.gcda" | while read -r i + do + ln $i ../${builddir}/$i + done + ) +else + FPROFILE_CFLAGS="" +fi + +# Prepare gdb/config.h first. +%make_build CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" V=1 maybe-configure-gdb +perl -i.relocatable -pe 's/^(D\[".*_RELOCATABLE"\]=" )1(")$/${1}0$2/' gdb/config.status + +%make_build CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" V=1 + +! grep '_RELOCATABLE.*1' gdb/config.h + +if [ "$fprofile" = "-fprofile" ] +then + cd gdb + cp -p gdb gdb-withindex + PATH="$PWD:$PATH" sh ../../gdb/gdb-add-index $PWD/gdb-withindex + ./gdb -nx -ex q ./gdb-withindex + ./gdb -nx -readnow -ex q ./gdb-withindex + cd .. +fi + +cd .. + +done # fprofile + +cd %{gdb_build} + +%make_build \ + -C gdb/doc {gdb,annotate}{.info,/index.html,.pdf} MAKEHTMLFLAGS=--no-split MAKEINFOFLAGS=--no-split V=1 + +# Copy the /gdb/NEWS file to the directory above it. +cp $RPM_BUILD_DIR/%{gdb_src}/gdb/NEWS $RPM_BUILD_DIR/%{gdb_src} + +%check +# Initially we're in the %{gdb_src} directory. +cd %{gdb_build} + +# We always run the unittests. +(cd gdb; make run GDBFLAGS='-batch -ex "maintenance selftest"') + +%if 0%{!?_with_testsuite:1} +echo ====================TESTSUITE DISABLED========================= +%else +echo ====================TESTING========================= +cd gdb +gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2 +# Need to use a single --ignore option, second use overrides first. +# No `%{?_smp_mflags}' here as it may race. +# WARNING: can't generate a core file - core tests suppressed - check ulimit +# "readline-overflow.exp" - Testcase is broken, functionality is OK. +( + # ULIMIT required for `gdb.base/auxv.exp'. + ulimit -H -c + ulimit -c unlimited || : + + # Setup $CHECK as `check//unix/' or `check//unix/-m64' for explicit bitsize. + # Never use two different bitsizes as it fails on ppc64. + echo 'int main (void) { return 0; }' >biarch.c + CHECK="" + for BI in -m64 -m32 -m31 "" + do + # Do not use size-less options if any of the sizes works. + # On ia64 there is no -m64 flag while we must not leave a bare `check' here + # as it would switch over some testing scripts to the backward compatibility + # mode: when `make check' was executed from inside the testsuite/ directory. + if [ -z "$BI" -a -n "$CHECK" ];then + continue + fi + # Do not use $RPM_OPT_FLAGS as the other non-size options will not be used + # in the real run of the testsuite. + if ! gcc $BI -o biarch biarch.c + then + continue + fi + CHECK="$CHECK check//unix/$BI check//native-gdbserver/$BI check//native-extended-gdbserver/$BI" + done + # Do not try -m64 inferiors for -m32 GDB as it cannot handle inferiors larger + # than itself. + # s390 -m31 still uses the standard ELF32 binary format. + gcc $RPM_OPT_FLAGS -o biarch biarch.c + RPM_SIZE="$(file ./biarch|sed -n 's/^.*: ELF \(32\|64\)-bit .*$/\1/p')" + if [ "$RPM_SIZE" != "64" ] + then + CHECK="$(echo " $CHECK "|sed 's#check//unix/-m64 check//native-gdbserver/-m64 check//native-extended-gdbserver/-m64# #')" + fi + + # Disable some problematic testcases. + # RUNTESTFLAGS='--ignore ...' is not used below as it gets separated by the + # `check//...' target spawn and too much escaping there would be dense. + for test in \ + gdb.base/readline-overflow.exp \ + gdb.base/bigcore.exp \ +%if 0%{?rhel} < 7 + gdb.base/gnu-debugdata.exp \ + gdb.base/access-mem-running.exp \ + gdb.threads/access-mem-running-thread-exit.exp \ +%endif + ; do + mv -f ../../gdb/testsuite/$test ../gdb/testsuite/$test-DISABLED || : + done + + # Run all the scheduled testsuite runs also in the PIE mode. + # See also: gdb-runtest-pie-override.exp + ###CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIC/-pie#g')" + +TESTS="" +%if 0%{?tests:1} + for test in %{tests}; do + TESTS="${TESTS:+$TESTS }$test" + done +%endif + ./orphanripper make %{?_smp_mflags} -k $CHECK TESTS="$TESTS" || : +) +for t in sum log +do + for file in testsuite*/gdb.$t + do + suffix="${file#testsuite}" + suffix="${suffix%/gdb.$t}" + ln $file gdb-%{_target_platform}$suffix.$t || : + done +done +# `tar | bzip2 | uuencode' may have some piping problems in Brew. +tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}*.{sum,log} +uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2 +cd ../.. +echo ====================TESTING END===================== +%endif + +%install +# Initially we're in the %{gdb_src} directory. +%if 0%{?_build_minimal} +cd %{gdb_build_minimal} +rm -rf $RPM_BUILD_ROOT + +%make_install %{?_smp_mflags} + +# Delete everything except the 'gdb' binary, and then rename it to +# 'gdb.minimal'. +rm -rfv $RPM_BUILD_ROOT%{_prefix}/{include,lib*,share} +rm -fv $RPM_BUILD_ROOT%{_bindir}/{gcore,gdbserver,gstack,gdb-add-index} +mv $RPM_BUILD_ROOT%{_bindir}/gdb $RPM_BUILD_ROOT%{_bindir}/gdb.minimal + +cd .. +%endif # 0%{?_build_minimal} + +# Install the full build. + +cd %{gdb_build} + +# We must remove the $RPM_BUILD_ROOT directory ourselves if we're not +# building gdb-minimal. +%if 0%{!?_build_minimal} +rm -rf $RPM_BUILD_ROOT +%endif # 0%{!?_build_minimal} + +%if 0%{?el6:1} +# GDB C++11 requires devtoolset gcc. +%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}} +%endif + +%make_install %{?_smp_mflags} + +%if 0%{!?scl:1} +mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec +mv -f $RPM_BUILD_ROOT%{_bindir}/gdb $RPM_BUILD_ROOT%{_prefix}/libexec/gdb +%if 0%{?rhel:1} && 0%{?rhel} <= 6 +# RHEL-6: ln: invalid option -- 'r': https://bugzilla.redhat.com/show_bug.cgi?id=1384947 +# RHEL-6 also does not have: /usr/bin/realpath +ln -s $( + perl -le 'sub x{$_=$_[0];s{/+}{/}g;s{/$}{};return split "/";}@a=x shift;@b=x shift;while($a[0] eq $b[0]){shift @a;shift @b;}print join "/",map("..",@a),@b;' \ + $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_prefix}/libexec/gdb +) $RPM_BUILD_ROOT%{_bindir}/gdb +%else +ln -s -r $RPM_BUILD_ROOT%{_prefix}/libexec/gdb $RPM_BUILD_ROOT%{_bindir}/gdb +%endif +%endif + +# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). +%if 0%{?rhel:1} && 0%{?rhel} <= 6 +test ! -e $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui +install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui +ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/man1/gdbtui.1 +%endif # 0%{?rhel:1} && 0%{?rhel} <= 6 + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d +touch -r %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d +sed 's#%%{_sysconfdir}#%{_sysconfdir}#g' <%{SOURCE4} >$RPM_BUILD_ROOT%{_sysconfdir}/gdbinit +touch -r %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit + +for i in `find $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb -name "*.py"` +do + # Files could be also patched getting the current time. + touch -r $RPM_BUILD_DIR/%{gdb_src}/gdb/version.in $i +done + +%if 0%{?_enable_debug_packages:1} && 0%{!?_without_python:1} +mkdir -p $RPM_BUILD_ROOT/usr/lib/debug%{_bindir} +cp -p ./gdb/gdb-gdb.py $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}/ +for pyo in "" "-O";do + # RHEL-5: AttributeError: 'module' object has no attribute 'compile_file' + %{__python} $pyo -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT/usr/lib/debug%{_bindir}"'", 1, "'"/usr/lib/debug%{_bindir}"'"))' +done +%endif # 0%{?_enable_debug_packages:1} && 0%{!?_without_python:1} + +# Compile python files +%if 0%{!?_without_python:1} && (0%{!?rhel:1} || 0%{?rhel} > 7) +%py_byte_compile %{__python3} %{buildroot}%{_datadir}/gdb/python/gdb +%endif + +%if 0%{!?_without_python:1} +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +# BZ 999645: /usr/share/gdb/auto-load/ needs filesystem symlinks +for i in $(echo bin lib $(basename %{_libdir}) sbin|tr ' ' '\n'|sort -u);do + # mkdir to satisfy dangling symlinks build check. + mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load/%{_root_prefix}/$i + ln -s $(echo %{_root_prefix}|sed 's#^/*##')/$i \ + $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load/$i +done +%endif # 0%{!?rhel:1} || 0%{?rhel} > 6 +%if 0%{?rhel:1} && 0%{?rhel} <= 7 +# Temporarily now: +for LIB in $(echo lib $(basename %{_libdir})|tr ' ' '\n'|sort -u);do + LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_root_prefix}/$LIB" + mkdir -p $LIBPATH + # basename is being run only for the native (non-biarch) file. + sed -e 's,@pythondir@,%{_datadir}/gdb/python,' \ + -e 's,@toolexeclibdir@,%{_root_prefix}/'"$LIB," \ + < $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/hook.in \ + > $LIBPATH/$(basename %{_root_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py + # Test the filename 'libstdc++.so.6.*' has matched. + test -f $LIBPATH/libstdc++.so.6.[0-9]*-gdb.py +done +test ! -e $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx +cp -a $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/libstdcxx \ + $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx +%endif # 0%{?rhel:1} && 0%{?rhel} <= 7 +for i in `find $RPM_BUILD_ROOT%{_datadir}/gdb -name "*.py"`; do + # Files are installed by install(1) not preserving the timestamps. + touch -r $RPM_BUILD_DIR/%{gdb_src}/gdb/version.in $i +done +%endif # 0%{!?_without_python:1} + +# gdb-add-index cannot be run even for SCL package on RHEL<=6. +%if 0%{?rhel:1} && 0%{?rhel} <= 6 +rm -f $RPM_BUILD_ROOT%{_bindir}/gdb-add-index +rm -f $RPM_BUILD_ROOT%{_mandir}/*/gdb-add-index.1* +%endif + +# Remove the files that are part of a gdb build but that are owned and +# provided by other packages. +# These are part of binutils + +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ +rm -f $RPM_BUILD_ROOT%{_infodir}/bfd* +rm -f $RPM_BUILD_ROOT%{_infodir}/standard* +rm -f $RPM_BUILD_ROOT%{_infodir}/configure* +rm -f $RPM_BUILD_ROOT%{_infodir}/sframe-spec* +# Just exclude the header files in the top directory, and don't exclude +# the gdb/ directory, as it contains jit-reader.h. +rm -rf $RPM_BUILD_ROOT%{_includedir}/*.h +rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib{bfd*,opcodes*,iberty*,ctf*,sframe*} + +# pstack obsoletion + +cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1/gstack.1 +ln -s gstack.1 $RPM_BUILD_ROOT%{_mandir}/man1/pstack.1 +ln -s gstack $RPM_BUILD_ROOT%{_bindir}/pstack + +# Packaged GDB is not a cross-target one. +(cd $RPM_BUILD_ROOT%{_datadir}/gdb/syscalls + rm -f mips*.xml +%ifnarch sparc sparcv9 sparc64 + rm -f sparc*.xml +%endif +%ifnarch x86_64 + rm -f amd64-linux.xml +%endif +%ifnarch %{ix86} x86_64 + rm -f i386-linux.xml +%endif +) + +# Documentation only for development. +rm -f $RPM_BUILD_ROOT%{_infodir}/gdbint* +rm -f $RPM_BUILD_ROOT%{_infodir}/stabs* +rm -f $RPM_BUILD_ROOT%{_infodir}/ctf-spec* + +# Delete this too because the dir file will be updated at rpm install time. +# We don't want a gdb specific one overwriting the system wide one. + +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + +%if 0%{?rhel:1} && 0%{?rhel} <= 7 +# /usr/share/gdb/guile/ gets installed even --without-guile +# https://sourceware.org/bugzilla/show_bug.cgi?id=17105 +rm -rf $RPM_BUILD_ROOT%{_datadir}/gdb/guile +%endif + +# These files are unrelated to Fedora Linux. +rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit/elinos.py +rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit/wrs-linux.py +rmdir $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit + +%files +# File must begin with "/": {GFDL,COPYING3,COPYING,COPYING.LIB,COPYING3.LIB} +%if 0%{!?el6:1} +%license COPYING3 COPYING COPYING.LIB COPYING3.LIB +%else +%doc COPYING3 COPYING COPYING.LIB COPYING3.LIB +%endif +%doc README NEWS +%{_bindir}/gdb +%{_bindir}/gcore +%{_mandir}/*/gcore.1* +%{_bindir}/gstack +%{_mandir}/*/gstack.1* +%{_bindir}/pstack +%{_mandir}/*/pstack.1* +# Provide gdb/jit-reader.h so that users are able to write their own GDB JIT +# plugins. +%{_includedir}/gdb +%if 0%{!?scl:1} +%files headless +%{_prefix}/libexec/gdb +%endif +%config(noreplace) %{_sysconfdir}/gdbinit +%{_mandir}/*/gdb.1* +%{_sysconfdir}/gdbinit.d +%{_mandir}/*/gdbinit.5* +# gdb-add-index cannot be run even for SCL package on RHEL<=6. +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +%{_bindir}/gdb-add-index +%{_mandir}/*/gdb-add-index.1* +%endif +# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). +%if 0%{?rhel:1} && 0%{?rhel} <= 6 +%{_bindir}/gdbtui +%{_mandir}/*/gdbtui.1* +%endif # 0%{?rhel:1} && 0%{?rhel} <= 6 +%{_datadir}/gdb + +# don't include the files in include, they are part of binutils + +%if 0%{?_build_minimal} +%files minimal +%{_bindir}/gdb.minimal +%{_bindir}/gdb-add-index +%endif # 0%{?_build_minimal} + +%ifnarch sparc sparcv9 +%files gdbserver +%{_bindir}/gdbserver +%{_mandir}/*/gdbserver.1* +%if %{have_inproctrace} +%{_libdir}/libinproctrace.so +%endif # %{have_inproctrace} +%endif + +%if 0%{!?_without_python:1} +# [rhel] Do not migrate /usr/share/gdb/auto-load/ with symlinks on RHELs. +%if 0%{!?rhel:1} +%pre +for i in $(echo bin lib $(basename %{_libdir}) sbin|tr ' ' '\n'|sort -u);do + src="%{_datadir}/gdb/auto-load/$i" + dst="%{_datadir}/gdb/auto-load/%{_root_prefix}/$i" + if test -d $src -a ! -L $src;then + if ! rmdir 2>/dev/null $src;then + mv -n $src/* $dst/ + rmdir $src + fi + fi +done +%endif # 0%{!?rhel:1} +%endif # 0%{!?_without_python:1} + +%files doc +%doc %{gdb_build}/gdb/doc/{gdb,annotate}.{html,pdf} +%{_infodir}/annotate.info* +%{_infodir}/gdb.info* + +%if 0%{?scl:1} +# As of F-28, packages won't need to call /sbin/install-info by hand +# anymore. We make an exception for DTS here. +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/MP2QVJZBOJZEOQO2G7UB2HLXKXYPF2G5/ + +%post doc +# This step is part of the installation of the RPM. Not to be confused +# with the 'make install ' of the build (rpmbuild) process. + +# For --excludedocs: +if [ -e %{_infodir}/gdb.info.gz ] +then + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || : + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || : +fi + +%preun doc +if [ $1 = 0 ] +then + # For --excludedocs: + if [ -e %{_infodir}/gdb.info.gz ] + then + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || : + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || : + fi +fi +%endif + +%changelog +* Wed May 29 2024 Guinevere Larsen - 14.2-3.el8 +- Remove riscv64-linux-gnu target. It was never meant to be added. + +* Thu May 16 2024 Guinevere Larsen - 14.2-2.el8 +- Backport "better support for $pc not saved" + (Andrew Burgess, RHEL-19390) + +* Mon May 13 2024 Guinevere Larsen +- Backport series Infcalls from B/P conditions in multi-threaded inferiors + (Andrew Burgess, RHEL-13298) + +* Mon May 13 2024 Keith Seitz +- Backport "gdb: s390: Add arch14 record/replay support" + (Andreas Arnez, RHEL-36225) +- Backport "Add support for Power11 options" + (Peter Bergner, RHEL-36518) +- Backport "Sync x86 disassembler with (proposed) gdb-15.1 release." + (many authors, RHEL-36527) + +* Tue Apr 23 2024 Guinevere Larsen - 14.2-1.el8 +- Initial import for GTS14. + +* Tue Mar 12 2024 Alexandra Hájková - 14.2-1 +- Rebase to FSF GDB 14.2. + +* Wed Feb 21 2024 Richard W.M. Jones +- Bump and rebuild for riscv64 + +* Mon Jan 29 2024 Kevin Buettner - 14.1-8 +- Backport upstream workaround for GCC 14 problem which is causing + GDB internal errors (RHBZ 261580, Tom de Vries). + +* Thu Jan 25 2024 Guinevere Larsen +- Remove gdb-6.5-BEA-testsuite.patch, as it was upstreamed and + will make its way back with the next rebase. + +* Thu Jan 25 2024 Guinevere Larsen - 14.1-7 +- Backport "gdb: fix list . related crash" + +* Wed Jan 24 2024 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Jan 16 2024 Kevin Buettner - 14.1-4 +- Backport upstream commit bc23ea51f8a83e9524dfb553baa8baacb29e68a9, + potentially fixing RHBZ 2257562. + +* Thu Jan 11 2024 Alexandra Hájková - 14.1-3 +- Fix typo in gdb.spec. + +* Mon Jan 8 2024 Alexandra Hájková - 14.1-2 +- Backport upstream commits 7ae9ecfd801 and 8170efad364 to avoid + using _PyOS_ReadlineTState (RHBZ 2250652). + +* Fri Dec 8 2023 Kevin Buettner - 14.1-1 +- Rebase to FSF GDB 14.1. +- Update local patches: + gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch + gdb-6.6-buildid-locate-rpm.patch + gdb-6.6-buildid-locate.patch + gdb-container-rh-pkg.patch + gdb-core-open-vdso-warning.patch + gdb-fedora-libncursesw.patch + gdb-linux_perf-bundle.patch +- Update backported patches which didn't make it into 14.1: + gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch + gdb-rhbz-2232086-generate-gdb-index-consistently.patch +- Drop upstreamed local patches: + gdb-6.5-sharedlibrary-path.patch +- Drop gdb-13.2 backports (which are now in gdb-14.1): + gdb-binutils29988-read_indexed_address.patch + gdb-bz2196395-debuginfod-legacy-openssl-crash.patch + gdb-bz2237392-dwarf-obstack-allocation.patch + gdb-bz2237515-debuginfod-double-free.patch + gdb-rhbz2192105-ftbs-dangling-pointer + gdb-rhbz2233961-CVE-2022-4806.patch + gdb-rhbz2233965-memory-leak.patch +- Adjust gdb.spec so that --with-mpfr is no longer passed to + configure; doing so, combined with some configury changes triggered + a latent build problem. + +* Mon Dec 4 2023 Kevin Buettner +- Remove gdb-6.5-missed-trap-on-step-test.patch. Testing what happens + when stepping over/through a statement which triggers a watchpoint + is being added, upstream, to gdb.base/watchpoint.exp. + +* Tue Nov 28 2023 Andrew Burgess +- Backport upstream commits 1f0fab7ff86, aa19bc1d259, acc117b57f7, + aff250145af, and 3644f41dc80. These commits reduce the size of the + generated gdb-index file, and also ensure that the gdb-index and + dwarf-5 index are generated consistently even as the number of + worker threads that GDB uses changes (RHBZ 2232086). + +* Thu Oct 19 2023 Alexandra Hájková +- Remove gdb-6.5-ia64-libunwind-leak-test.patch. + The patch doesn't include any actual fixes, the architecture + is end of life and the kernel is planning to drop IA64 support. + +* Wed Oct 11 2023 Guinevere Larsen +- Remove gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch + as it was upstreamed back in 2010 with a different test name. + +* Mon Oct 2 2023 Kevin Buettner - 13.2-11 +- Backport upstream commit which prevents internal error when + generating an overly large gdb-index file. (RHBZ 1773651, Kevin + Buettner.) + +* Sun Oct 1 2023 Alexandra Hájková - 13.2-10 +- Backport upstream commit d28fbc7197b which fixes RHBZ 2233965 ( + CVE-2022-48065). + +* Thu Sep 28 2023 Kevin Buettner +- Remove gdb-6.5-sharedlibrary-path.patch, which was upstreamed in + commit 3ec033fab4a. + +* Tue Sep 19 2023 Keith Seitz +- Remove gdb-rhbz1553104-s390x-arch12-test.patch, which is more thoroughly tested + by binutils. + +* Mon Sep 18 2023 Alexandra Hájková - 13.2-8 +- Bump release to 13.2-9. + +* Sun Sep 17 2023 Alexandra Hájková - 13.2-8 +- Backport upstream commit 8f2c64de86b which fixes RHBZ 2233961, + CVE-2022-48064, (Alan Modra). + +* Fri Sep 15 2023 Keith Seitz - 13.2-8 +- migrated to SPDX license + +* Fri Sep 15 2023 Andrew Burgess +- Bump release to 13.2-8. + +* Thu Sep 14 2023 Andrew Burgess +- Backport upstream commit 54392c4df604f20, which fixes RHBZ 2237392. + +* Wed Sep 13 2023 Andrew Burgess +- Backport upstream commit f96328accde1e63, which fixes RHBZ 2237515. + +* Wed Aug 9 2023 Guinevere Larsen +- Remove gdb-6.7-testsuite-stable-results.patch, it only made the test + fail more. + +* Mon Aug 7 2023 Kevin Buettner - 13.2-7 +- Bump release. + +* Thu Aug 3 2023 Andrew Burgess +- Backport upstream commit f3eee586174, which fixes RHBZ 2196395. + +* Wed Jul 19 2023 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 07 2023 Python Maint +- Rebuilt for Python 3.12 + +* Tue Jul 4 2023 Andrew Burgess +- Remove gdb-test-pid0-core.patch. This work has been upstreamed in + commit 8bcead69665. + +* Sat Jul 1 2023 Mark Wielaard - 13.2-4 +- Adjust gdb-add-index.patch to be silent about which gdb. + +* Fri Jun 30 2023 Kevin Buettner - 13.2-3 +- Backport upstream changes which prevent repeated warnings from being + printed when loading a core file (RHBZ 2160211, Lancelot SIX). + +* Wed Jun 28 2023 Python Maint - 13.2-2 +- Rebuilt for Python 3.12 + +* Sun Jun 25 2023 Alexandra Hájková - 13.2-1 +- Rebase to FSF GDB 13.22. +- Remove gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch. +- Remove gdb-rhbz2183595-rustc-inside_main.patch. + +* Tue Jun 13 2023 Python Maint +- Rebuilt for Python 3.12 + +* Tue Jun 13 2023 Python Maint +- Bootstrap for Python 3.12 + +* Sat May 20 2023 Andrew Burgess +- Remove gdb-lineno-makeup-test.patch. An equivalent test has now + been merged to upstream binutils-gdb in commit ef56b006501. + +* Tue May 16 2023 Andrew Burgess +- Remove gdb-ccache-workaround.patch. This patch works around + problems when using older versions of ccache, however, upstream GDB + now disables ccache during testing, see upstream commit 49b4de64242d. + +* Tue May 16 2023 Andrew Burgess +- Remove gdb-ppc-power7-test.patch, this patch is already covered by + upstream tests gdb.arch/powerpc-*.exp. + +* Sat May 6 2023 Alexandra Hájková +- Remove gdb-rhel5.9-testcase-xlf-var-inside-mod.patch, the patch adds + gdb.fortran/xlf-variable.exp test, the test can only be run on + PPC64 machines which are not supported anymore. + +* Thu May 4 2023 Kevin Buettner +- Fix C89-isms in gdb-6.6-buildid-locate-rpm.patch. (Florian Weimer, + RHBZ 2143992)'. This change merely restores changes introduced by + Keith's Nov 30 2022 commit, but which were inadvertently lost during + the GDB 13.1 backport. + +* Thu May 4 2023 Andrew Burgess +- Rewrite the changes to gdb-add-index.sh. If the user has set the + GDB environment variable then use that value, otherwise find a + suitable GDB executable by looking in various places. + +* Wed May 3 2023 Kevin Buettner 13.1-5 +- Backport "Pass const frame_info_ptr reference for + skip_[language_]trampoline". (Mark Wielaard, RHBZ 2192105, build/30413) + +* Tue May 2 2023 Andrew Burgess +- Remove gdb-opcodes-clflushopt-test.patch. This patch tests that GDB + can disassemble the clflushopt instruction correctly. Such + disassembly is a feature of libopcode and is covered by the gas + tests i386/x86-64-clflushopt.s and i386/clflushopt.s. Lets remove + this test from GDB and just rely on the gas tests instead. + +* Sat Apr 29 2023 Kevin Buettner +- Remove gdb-6.7-charsign-test.patch. This patch originally contained + some changes to GDB which were rejected by upstream maintainers. All + that remained was a testcase which had a number of failures due to + the rest of the work not being present in GDB. + +* Tue Apr 25 2023 Bruno Larsen +- Remove gdb-6.5-bz109921-DW_AT_decl_file-test.patch. That patch was + only a test for basic DWARF-2 support, ensuring that GDB found a + variable in a .h file; tests such as gdb.linespec/linespec.exp already + tests for it. + +* Mon Apr 24 2023 Bruno Larsen +- Remove gdb-6.5-last-address-space-byte-test.patch. It was used to + test for a regression in target_xfer_memory, a function that has + been removed from upstream back in 2006. + +* Thu Apr 13 2023 Alexandra Hájková +- Remove gdb-6.3-bz140532-ppc-unwinding-test.patch, it adds + powerpc-bcl-prologue.exp test which seems to be a subset of + upstream powerpc-prologue.exp + +* Tue Apr 11 2023 Keith Seitz +- Backport "Fix a potential illegal memory access in the BFD library..." + (Nick Clifton, binutils/29988) + +* Fri Mar 31 2023 Keith Seitz - 13.1-4 +- Backport "Fix crash in inside_main_func" + (Tom Tromey, RHBZ 2183595) + +* Thu Mar 30 2023 Alexandra Hájková - 12.1-3 +- Update gdb-6.6-buildid-locate.patch to fix RHBZ 2181221. + +* Wed Mar 29 2023 Andrew Burgess +- Used --with-pkgversion to place the distribution name in the version + string rather than placing the string directly into the version.in + file. + +* Fri Mar 24 2023 Kevin Buettner - 13.1-2 +- Backport fix for RHBZ 2177655. (Luis Machado) + +* Mon Mar 20 2023 Bruno Larsen +- Remove gdb-rhbz1350436-type-printers-error.patch since it is upstreamed. + +* Wed Mar 8 2023 Kevin Buettner - 13.1-1 +- Rebase to FSF GDB 13.1. +- Update gdb-6.3-rh-testversion-20041202.patch. +- Update gdb-6.3-bz140532-ppc-unwinding-test.patch. +- Update gdb-6.6-buildid-locate.patch. +- Update gdb-6.6-buildid-locate-rpm.patch. +- Remove 'Recommends: ' line for gcc-gdb-plugin for BZ2149246. +- Add 'define _lto_cflags %{nil}' to avoid ODR violations. +- Add -Wno-stringop-overflow to --enable-gdb-build-warnings to work around + gcc problem. + +* Fri Jan 27 2023 Kevin Buettner - 12.1-16 +- Tweak gdb-6.3-rh-testversion-20041202.patch so that $_gdb_major + and $_gdb_minor will be obtained correctly. + +* Thu Jan 26 2023 Bruno Larsen +- Remove gdb-rhbz1398387-tab-crash-test.patch as that test didn't + work anymore. + +* Tue Jan 24 2023 Keith Seitz - 12.1-15 +- NVR bump for failed build. + +* Mon Jan 23 2023 Kevin Buettner +- More tweaks to gdb-6.6-buildid-locate-rpm.patch, in which rpmTag + is replaced with rpmDbiTagVal. + +* Mon Jan 23 2023 Keith Seitz - 12.1-14 + From Sergey Mende: +- Backport upstream patch "gdb: call check_typedef at beginning of + dwarf_expr_context::fetch_result". (Simon Marchi) + + +* Fri Jan 20 2023 Kevin Buettner - 12.1-13 +- Backport fix for problems associated with GCC 13's self-move warning. + (Jan-Benedict Glaw) +- Tweak gdb-6.6-buildid-locate-rpm.patch so that running GDB's configure + script will not error out due to GCC 13's warnings. + +* Thu Jan 19 2023 Alexandra Hájková - 12.1-12 +- Backport replace deprecated distutils.sysconfig in python-config. + (Lancelot SIX) + +* Thu Jan 19 2023 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Dec 19 2022 Andrew Burgess +- Backport upstream commits 38665d717a3 and c3efaf0afd9 to fix RHBZ + 2152431. + +* Fri Dec 16 2022 Keith Seitz +- Remove gdb-6.6-buildid-locate-rpm-scl.patch and + gdb-bz601887-dwarf4-rh-test.patch. + +* Fri Dec 9 2022 Andrew Burgess +- Remove gdb-fortran-frame-string.patch, a version of this test has + now been upstreamed. + +* Fri Dec 9 2022 Andrew Burgess +- Remove gdb-bfd-aliasing.patch. + +* Fri Dec 9 2022 Andrew Burgess +- Remove gdb-entryval-crash-1of3.patch, gdb-entryval-crash-2of3.patch, + and gdb-entryval-crash-3of3.patch. + +* Wed Dec 7 2022 Keith Seitz - 12.1-10 +- Disable Guile support for F38+, RHBZ 2151328. + +* Mon Dec 5 2022 Keith Seitz +- Remove gdb-physname-pr11734-test.patch, + gdb-physname-pr12273-test.patch, gdb-runtest-pie-override.patch, + gdb-test-expr-cumulative-archer.patch. + +* Thu Dec 1 2022 Kevin Buettner +- Remove gdb-6.3-threaded-watchpoints2-20050225.patch. The test in this + patch is a tweaked version of upstream test gdb.threads/watchthreads.exp + from 2004. It doesn't actually test anything new. + +* Thu Dec 1 2022 Bruno Larsen +- Remove gdb-rhbz1325795-framefilters-test.patch. This test doesn't + pass in the curret state, and the code that introduced the original + problem has been changed beyong recognition at this point. + +* Wed Nov 30 2022 Keith Seitz +- Backport "libiberty: Fix C89-isms in configure tests" and do likewise in + gdb-6.6-buildid-locate-rpm.patch. + (Florian Weimer, RHBZ 2143992) + +* Wed Nov 23 2022 Kevin Buettner +- Remove gdb-6.3-inheritancetest-20050726.patch. Upstream testcase + gdb.cp/impl-this.exp tests the printing of an instance variable from + an inherited class in the "print c" test. + +* Fri Nov 18 2022 Kevin Buettner +- Remove gdb-6.3-test-movedir-20050125.patch. Upstream test + gdb.base/fullname.exp provides coverage for this case and more. + +* Thu Nov 3 2022 Keith Seitz - 12.1-9 +- Add patch to fix ODR violations on powerpc and + enable LTO builds. (Keith Seitz, sw build/23395) + +* Tue Oct 18 2022 Bruno Larsen - 12.1-8 +- Backport fix to gdb.base/break-main-file-remove-fail.exp + (Tom de Vries) + +* Tue Oct 18 2022 Bruno Larsen - 12.1-7 +- Remove patch gdb-6.3-test-dtorfix. + Was upstreamed, will be back in the next rebase. + +* Thu Oct 13 2022 Alexandra Hájková - 12.1-7 +- Bump the release number. + +* Tue Oct 11 2022 Alexandra Hájková - 12.1-6 +- Backport upstream patch "Add support for readline 8.2". (Andreas Schwab) + +* Fri Oct 7 2022 Alexandra Hájková - 12.1-6 +- Update gdb-6.6-buildid-locate.patch to fix RHBZ 2122947. + +* Thu Jul 28 2022 Amit Shah +- Use the dist_name macro to identify the distribution + +* Thu Jul 21 2022 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint +- Rebuilt for Python 3.11 + +* Mon Jun 13 2022 Python Maint - 12.1-2 +- Bootstrap for Python 3.11 + +* Thu May 12 2022 Kevin Buettner - 12.1-1 +- Rebase to FSF GDB 12.1. +- Update gdb-6.6-buildid-locate.patch. +- Update gdb-6.6-buildid-locate-rpm.patch. +- Dropped backported patches from GDB 11.1 and 11.2. + +* Wed Mar 30 2022 Kevin Buettner - 11.2-3 +- Backport upstream patch which removes sizes from debuginfod download + messages when the size is not available (RHBZ 2068280, Aaron Merey). + +* Wed Feb 9 2022 Kevin Buettner - 11.2-2 +- On ix86, add -Wno-format-overflow to --enable-gdb-build-warnings. + (This is a workaround for the bogus warning/error that we now see + on i686 regarding a "may write a terminating nul past the end of + the destination" message for the sprintf() call in + global_symbol_searcher::search() in gdb/symtab.c.) + +* Wed Feb 9 2022 Kevin Buettner - 11.2-1 +- Rebase to FSF GDB 11.2. + +* Mon Jan 31 2022 Kevin Buettner - 11.1-12 +- Fix "sect_index_data not initialized" internal error. (RHBZ 2042664, + Kevin Buettner). + +* Mon Jan 31 2022 Keith Seitz - 11.1-11 +- Fix buld issues. (RHBZ 2042257, Keith Seitz, Andrew Burgess) +- Update libipt to 2.0.5. + +* Thu Jan 20 2022 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jan 12 2022 Alexandra Hájková - 11.1-9 +- Remove gdb-6.3-inferior-notification-20050721.patch + which adds problematic attach-32 test. + +* Tue Jan 11 2022 Alexandra Hájková - 11.1-8 +- Backport upstream patch "[PR gdb/27026] CTRL-C is ignored + when debug info is downloaded" (RHBZ 2024875, Aaron Merey). + +* Tue Jan 11 2022 Alexandra Hájková - 11.1-8 +- Backport upstream patch "rework "set debuginfod" commands" + (RHBZ 2024875, Simon Marchi). + +* Tue Jan 11 2022 Alexandra Hájková - 11.1-8 +- Backport upstream patch "Fix unittest.exp failure due to 'set debuginfod' addition" + (RHBZ 2024875, Tom Tromey). + +* Mon Jan 10 2022 Alexandra Hájková - 11.1-8 +- Add -Wno-unused-function to --enable-gdb-build-warnings to prevent the build failure: + "../../gdb/c-exp.y:3455:1: error: 'void c_print_token(FILE*, int, YYSTYPE)' + defined but not used [-Werror=unused-function]" + +* Mon Jan 10 2022 Alexandra Hájková - 11.1-8 +- Backport upstream patch "gdb: add set/show commands for managing debuginfod" + (RHBZ 2024875, Aaron Merey). + +* Mon Jan 10 2022 Alexandra Hájková - 11.1-8 +- Backport upstream patch "gdb.texinfo: Expand documentation for debuginfod" + (RHBZ 2024875, Aaron Merey). + +* Mon Dec 6 2021 Kevin Buettner - 11.1-7 +- Add -Wno-deprecated-declarations to --enable-gdb-build-warnings to work + around the python 3.11 deprecation of Py_SetProgramName. + +* Fri Nov 12 2021 Timm Bäder - 11.1-6 +- Use %%set_build_flags to populate all relevant build flags + +* Wed Nov 10 2021 Kevin Buettner - 11.1-5 +- Backport upstream fix and test case for a dprintf bug (RHBZ 2022177, Kevin + Buettner). + +* Tue Nov 9 2021 Bruno Larsen - 11.1-4 +- Backport manpage update to be closer to -help (RHBZ 853071) + +* Wed Nov 3 2021 Kevin Buettner - 11.1-3 +- Make adjustments to gdb-6.6-buildid-locate.patch, provided by Tom de Vries. + +* Mon Oct 11 2021 Kevin Buettner - 11.1-2 +- Backport upstream patch which papers over Fortran lexical analyzer + bug (RHBZ 2012976, Tom de Vries). + +* Mon Oct 04 2021 Kevin Buettner - 11.1-1 +- Rebase to FSF GDB 11.1. +- Adjust build-id related patches. +- Drop backported patches which are no longer relevant. +- Bump 'snapgnulib' date. + +* Thu Sep 30 2021 Alexandra Hájková - 10.2-9 +- Backport test for RHBZ 1976887 (Kevin Buettner). + +* Thu Sep 30 2021 Alexandra Hájková - 10.2-9 +- Backport upstream patch which fixes internal-error: Unexpected + type field location kind (RHBZ 1976887, Alexandra Hájková). + +* Wed Sep 22 2021 Bruno Larsen - 10.2-8 +- Backport "[gdb] Improve early exits for env var in debuginfod-support.c" + (Tom de Vries) + +* Wed Sep 22 2021 Bruno Larsen - 10.2-8 +- Backport "[gdb/cli] Don't assert on empty string for core-file" + (Tom de Vries) + +* Tue Sep 21 2021 Peter Robinson 10.2-7 +- Use guile 2.2 (rhbz #1901353) + +* Wed Jul 21 2021 Fedora Release Engineering 10.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jul 20 2021 Kevin Buettner - 10.2-5 +- Remove autoconf invocations from spec file. +- Remove BuildRequires: autoconf. + +* Mon Jun 14 2021 Kevin Buettner - 10.2-4 +- Backport upstream patches which fix multi-threaded debugging for + glibc-2.34 (RHBZ 1971096, Simon Marchi, Kevin Buettner). + +* Fri Jun 11 2021 Keith Seitz - 10.2-3 +- Backport "Exclude debuginfo files from 'outside ELF segments' warning". + (Keith Seitz, RH BZ 1898252) +- Backport "Fix crash when expanding partial symtab..." + (Tom Tromey. gdb/27743) +- Backport "[gdb/server] Don't overwrite fs/gs_base with -m32" +- (Tom de Vries) + +* Sun Jun 06 2021 Python Maint +- Rebuilt for Python 3.10 + +* Thu Jun 03 2021 Kevin Buettner - 10.2-1 +- Rebase to FSF GDB 10.2. +- Drop gdb-6.3-test-pie-20050107.patch. +- Drop gdb-6.3-test-self-20050110.patch. +- Drop gdb-6.5-bz218379-ppc-solib-trampoline-test.patch. +- Drop gdb-6.6-buildid-locate-core-as-arg.patch. +- Drop gdb-6.8-quit-never-aborts.patch. +- Drop gdb-archer-pie-addons-keep-disabled.patch. +- Drop gdb-archer-pie-addons.patch. +- Drop gdb-archer-vla-tests.patch. +- Drop gdb-archer.patch. +- Drop gdb-attach-fail-reasons-5of5.patch. +- Drop gdb-btrobust.patch. +- Drop gdb-bz1219747-attach-kills.patch. +- Drop gdb-bz533176-fortran-omp-step.patch. +- Drop gdb-dts-rhel6-python-compat.patch. +- Drop gdb-gnat-dwarf-crash-3of3.patch. +- Drop gdb-jit-reader-multilib.patch. +- Drop gdb-moribund-utrace-workaround.patch. +- Drop gdb-rhbz1930528-fix-gnulib-build-error.patch. +- Drop gdb-rhbz1932645-aarch64-ptrace-header-order.patch. +- Drop gdb-vla-intel-fix-print-char-array.patch. +- Drop gdb-vla-intel-fortran-strides.patch. +- Drop gdb-vla-intel-stringbt-fix.patch. +- Drop gdb-vla-intel-tests.patch. +- Drop process_psymtab_comp_unit-type-unit.patch. +- Drop gdb-testsuite-readline63-sigint-revert.patch. +- Drop gdb-config.patch. +- Add following upstream patches for Fortran stride / slice support: + gdb-rhbz1964167-convert-enum-range_type.patch + gdb-rhbz1964167-fortran-array-slices-at-prompt.patch + gdb-rhbz1964167-fortran-array-strides-in-expressions.patch + gdb-rhbz1964167-fortran-clean-up-array-expression-evaluation.patch + gdb-rhbz1964167-fortran-range_type-to-range_flag.patch + gdb-rhbz1964167-fortran-whitespace_array.patch + gdb-rhbz1964167-move-fortran-expr-handling.patch + +* Tue Jun 01 2021 Python Maint +- Bootstrap for Python 3.10 + +* Wed Mar 31 2021 Keith Seitz - 10.1-18 +- Backport "Save/restore file offset while reading notes in core file" + (Keith Seitz, RHBZ 1931344) + +* Wed Mar 31 2021 Jonathan Wakely - 10.1-17 +- Rebuilt for removed libstdc++ symbols (#1937698) + +* Tue Mar 23 2021 Kevin Buettner +- Remove spec file workaround for RHBZ 1912913. + +* Fri Mar 19 2021 Kevin Buettner - 10.1-16 +- Fix potential hang during gdbserver testing (RHBZ 1941080, Kevin Buettner). + +* Thu Mar 18 2021 Keith Seitz +- Disable libctf on RHEL (RHBZ 1935517). + +* Thu Mar 11 2021 Kevin Buettner - 10.1-15 +- Update libipt to version 2.0.4. + +* Fri Mar 05 2021 Kevin Buettner - 10.1-14 +- Backport patches which fix frame_id_p assertion failure (RHBZ 1909902, + Pedro Alves). + +* Fri Mar 5 2021 Jan Kratochvil - 10.1-13 +- Drop gdb-vla-intel-fortran-vla-strings.patch as it was still regressing the + testsuite. + +* Thu Mar 4 2021 Jan Kratochvil - 10.1-12 +- Fix gdb-vla-intel-fortran-vla-strings.patch to no longer modify cached + inferior types. + +* Thu Mar 4 2021 Jan Kratochvil - 10.1-11 +- Align gdb-vla-intel-fortran-vla-strings.patch more to upstream + fixing whitespaces in Fortran types printing. + +* Thu Mar 4 2021 Jan Kratochvil - 10.1-10 +- Reapply 10.1-8 after it has been accidentally reverted by 10.1-9. + +* Wed Feb 24 2021 Kevin Buettner - 10.1-9 +- Fix aarch64 build problem (RHBZ 1932645, Kevin Buettner). + +* Fri Feb 19 2021 Jan Kratochvil - 10.1-8 +- Fix gdb-vla-intel-fortran-vla-strings.patch for compatiblity with GraalVM. + +* Thu Feb 18 2021 Kevin Buettner - 10.1-7 +- Fix gnulib related build problem (RHBZ 1930528, Kevin Buettner). + +* Wed Feb 17 2021 Kevin Buettner - 10.1-6 +- Fix libstdc++ assert when performing tab completion; build must be made + with -D_GLIBCXX_DEBUG flag in order to trigger assert (RHBZ 1912985, + Kevin Buettner). + +* Thu Feb 11 2021 Keith Seitz +- Disable Guile support for RHEL9+. + +* Tue Jan 26 2021 Stephen Gallagher - 10.1-5 +- Build gdb-minimal for ELN + +* Tue Jan 26 2021 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Jan 23 2021 Kevin Buettner +- Add -Wno-stringop-overread to CFLAGS to work around gcc + bug (RH BZ 1912913) + +* Tue Jan 12 2021 Keith Seitz - 10.1-3 +- Disable xxhash support for RHEL. + +* Wed Dec 09 2020 Kevin Buettner - 10.1-2 +- Fix off-by-one error in ada_fold_name. (RHBZ 1905996, Kevin Buettner) + +* Wed Nov 04 2020 Kevin Buettner - 10.1-1 +- Rebase to FSF GDB 10.1. +- Bump 'snapgnulib' date. +- Drop gdb-rhbz1818011-bfd-gcc10-error.patch. +- Drop gdb-rhbz1822715-fix-python-deprecation.patch. +- Drop gdb-rhbz1829702-fix-python39.patch. +- Drop gdb-rhbz1838777-debuginfod.patch. +- Drop gdb-rhbz1844458-use-fputX_unfiltered.patch. +- Drop gdb-rhbz1869484-deleted-working-directory. +- Adjust build-id related patches. +- Ajust VLA patches. + +* Mon Nov 2 2020 Kevin Buettner - 9.2-8 +- Backport patches fixing abort when working directory is deleted. + (RHBZ 1869484, Sergio Durigan Junior) + +* Mon Nov 2 2020 Keith Seitz - 9.2-7 +- Fix missing debuginfo messages. (RH BZ 1887025) + +* Mon Aug 10 2020 Keith Seitz +- Disable LTO until upstream sorts out ODR problems. + +* Tue Aug 04 2020 Keith Seitz +- Update libipt to v2.0.2. + +* Sat Aug 01 2020 Fedora Release Engineering +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 22 2020 Tom Stellard +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Mon Jul 20 2020 Jeff Law - 9.2-3 +- Fix broken configure tests compromised by LTO +- Add BuildRequires: autoconf + +* Wed Jun 17 2020 Keith Seitz - 9.2-2 +- Backport debuginfod support. + +* Tue Jun 9 2020 Keith Seitz - 9.2-1 +- Rebase to FSF GDB 9.2. +- Add explicit python bytecode compilation. +- Change included files to patches to quell error from rpminspect. +- Fix attach-32.exp from gdb-6.3-inferior-notification-20050721.patch. + +* Fri Jun 5 2020 Keith Seitz - 9.1-8 +- Add patch for Python 3.9 and re-enable python. +- Update generate-*.sh to include stgit support. + +* Thu May 21 2020 Miro Hrončok - 9.1-7 +- Disable Python support to workaround problems with Python 3.9 (RHBZ 1829702) + +* Thu Apr 16 2020 Kevin Buettner - 9.1-6 +- Fix build breakage of gdb/python/python.c due to use of deprecated + Python function (RHBZ 1822715, Kevin Buettner) + +* Wed Apr 08 2020 Kevin Buettner - 9.1-5 +- Fix build breakage when compiling bfd/elf.c with gcc 10. (RHBZ 1818011, + H.J. Lu) + +* Mon Mar 2 2020 Sergio Durigan Junior - 9.1-4 +- Add '--without-guile' to GDB_MINIMAL_CONFIGURE_FLAGS. + +* Thu Feb 13 2020 Sergio Durigan Junior - 9.1-3 +- Fix 'Recursive call to 'missing_rpm_list_print' when pagination is + on and missing RPM list is big' (RHBZ 1801974, Sergio Durigan + Junior). + +* Mon Feb 10 2020 Sergio Durigan Junior - 9.1-2 +- Enable libxxhash during build. + +* Sat Feb 8 2020 Sergio Durigan Junior - 9.1-1 +- Rebase to FSF GDB 9.1. + +* Tue Feb 4 2020 Dan Čermák - 9.0.90.20200203-5 +- Re-enable guile support. + +* Mon Feb 3 2020 Sergio Durigan Junior - 9.0.90.20200203-4 +- Rebase to FSF GDB 9.0.90.20200203 (9.1pre). +- Bump 'snapgnulib' date. +- Update URL to 'https'. +- Adjust build-id patchset. +- Adjust VLA patchset. +- Drop 'gdb-6.8-bz436037-reg-no-longer-active.patch'. +- Drop 'gdb-6.6-scheduler_locking-step-is-default.patch'. + +* Tue Jan 28 2020 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Nov 19 2019 Sergio Durigan Junior - 9.0.50.20191119-2 +- Rebase to FSF GDB 9.0.50.20191119 (9.1pre). +- Drop 'gdb-readline62-ask-more-rh.patch'. +- Drop 'gdb-6.5-bz216711-clone-is-outermost.patch'. +- Adjust 'gdb-archer-pie-addons-keep-disabled.patch'. + +* Fri Oct 18 2019 Sergio Durigan Junior - 9.0.50.20191018-1 +- Rebase to FSF GDB 9.0.50.20191018 (9.1pre). +- Expand comment on "bundled(binutils)". +- Remove libctf's files from RPM_BUILD_ROOT. + +* Wed Oct 9 2019 Jerry James - 8.3.50.20190924-28 +- Rebuild for mpfr 4 + +* Wed Sep 25 2019 Sergio Durigan Junior - 8.3.50.20190924-27 +- Rebase to FSF GDB 8.3.50.20190924 (8.4pre). +- Update 'gdb-6.6-buildid-locate.patch'. + +* Sat Aug 24 2019 Sergio Durigan Junior - 8.3.50.20190824-26 +- Rebase to FSF GDB 8.3.50.20190824 (8.4pre). +- Update 'v1.5-libipt-static.patch'. + +* Wed Aug 21 2019 Miro Hrončok +- Rebuilt for Python 3.8 + +* Sun Aug 18 2019 Sergio Durigan Junior - 8.3.50.20190816-24 +- Update bundled libipt copy to v2.0.1. + +* Fri Aug 16 2019 Sergio Durigan Junior - 8.3.50.20190816-23 +- Rebase to FSF GDB 8.3.50.20190816 (8.4pre). +- Drop 'gdb-testsuite-readline63-sigint.patch'. +- Cleanup 'gdb-archer.patch' and remove several things, like the '-P' feature. + +* Wed Aug 14 2019 Miro Hrončok +- Rebuilt for Python 3.8 + +* Fri Aug 2 2019 Sergio Durigan Junior - 8.3.50.20190802-21 +- Rebase to FSF GDB 8.3.50.20190802 (8.4pre). + +* Thu Jul 25 2019 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 2 2019 Sergio Durigan Junior - 8.3.50.20190702-19 +- Rebase to FSF GDB 8.3.50.20190702 (8.4pre). +- Remove gdb-bz568248-oom-is-error.patch. + +* Tue Jun 25 2019 Sergio Durigan Junior - 8.3.50.20190625-18 +- Rebase to FSF GDB 8.3.50.20190625 (8.4pre). + +* Fri Jun 21 2019 Sergio Durigan Junior - 8.3.50.20190610-17 +- Rebuild for librpm9 (RH BZ 1720305). + +* Mon Jun 10 2019 Sergio Durigan Junior - 8.3.50.20190610-16 +- Rebase to FSF GDB 8.3.50.20190610 (8.4pre). + +* Sat Jun 1 2019 Sergio Durigan Junior - 8.3.50.20190601-15 +- Rebase to FSF GDB 8.3.50.20190601 (8.4pre). + +* Tue May 28 2019 Sergio Durigan Junior - 8.3.50.20190528-14 +- Rebase to FSF GDB 8.3.50.20190528 (8.4pre). + +* Fri May 17 2019 Sergio Durigan Junior - 8.3.50.20190517-13 +- Rebase to FSF GDB 8.3.50.20190517 (8.4pre). + +* Fri May 10 2019 Sergio Durigan Junior - 8.3.50.20190510-12 +- Rebase to FSF GDB 8.3.50.20190510 (8.4pre). + +* Wed May 1 2019 Sergio Durigan Junior - 8.3.50.20190501-11 +- Rebase to FSF GDB 8.3.50.20190501 (8.4pre). +- Adjust VLA testcases. +- Fix "gcore does not support COREFILTER_ELF_HEADERS" (RH BZ 1371380, + Sergio Durigan Junior). + +* Mon Apr 29 2019 Sergio Durigan Junior - 8.3.50.20190425-10 +- Share '/usr/bin/gdb-add-index' between gdb-minimal and gdb-headless + (Igor Gnatenko, RHBZ 1695015). + +* Mon Apr 29 2019 Sergio Durigan Junior - 8.3.50.20190425-9 +- Provide 'gdb-minimal' package, specific for the buildroot (RHBZ 1695015). +- Adjust 'gdb-libexec-add-index.patch' for the gdb-minimal case. + +* Thu Apr 25 2019 Sergio Durigan Junior - 8.3.50.20190425-8 +- Rebase to FSF GDB 8.3.50.20190425 (8.4pre), and fix build breakage. + +* Wed Apr 24 2019 Sergio Durigan Junior - 8.3.50.20190424-7 +- Rebase to FSF GDB 8.3.50.20190424 (8.4pre). + +* Fri Apr 12 2019 Sergio Durigan Junior - 8.3.50.20190412-6 +- Remove 'gdb-x86_64-i386-syscall-restart.patch'. + +* Fri Apr 12 2019 Sergio Durigan Junior - 8.3.50.20190412-5 +- Rebase to FSF GDB 8.3.50.20190412 (8.4pre). +- Adjust 'gdb-6.3-rh-testversion-20041202.patch'. +- Remove 'gdb-follow-child-stale-parent.patch'. +- Remove 'gdb-rhbz795424-bitpos-20of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-21of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-22of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-23of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-25of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-25of25-test.patch'. +- Remove 'gdb-rhbz795424-bitpos-arrayview.patch'. +- Remove 'gdb-rhbz795424-bitpos-lazyvalue.patch'. +- Remove 'gdb-bz541866-rwatch-before-run.patch'. + +* Fri Mar 29 2019 Sergio Durigan Junior - 8.3.50.20190321-4 +- Fix 'gdb-8.3.50.20190321-3.fc31.x86_64: crashing' (by fixing + gdb-6.6-buildid-locate-rpm.patch) (RH BZ 1694091). + +* Thu Mar 21 2019 Sergio Durigan Junior - 8.3.50.20190321-3 +- Rebase to FSF GDB 8.3.50.20190321 (8.4pre). +- Remove gdb-temporary-fix-arm-build-error.patch. +- Fix "GDB crashes when using Python xmethods" (RH BZ 1690120). + +* Tue Mar 19 2019 Sergio Durigan Junior - 8.3.50.20190319-2 +- Rebase to FSF GDB 8.3.50.20190319 (8.4pre). +- Temporarily add gdb-temporary-fix-arm-build-error.patch. + +* Mon Mar 4 2019 Sergio Durigan Junior - 8.3.50.20190304-1 +- Rebase to FSF GDB 8.3.50.20190304 (8.4pre). +- Rewrite gdb-6.6-buildid-locate.patch. +- Remove gdb-python-gil.patch. + +* Fri Feb 22 2019 Sergio Durigan Junior - 8.2.50.20190222-19 +- Rebase to FSF GDB 8.2.50.20190222 (8.3pre). + +* Tue Feb 19 2019 Sergio Durigan Junior - 8.2.50.20190219-18 +- Rebase to FSF GDB 8.2.50.20190219 (8.3pre). +- BuildRequire on 'source-highlight-devel' and enable styled output. + +* Sun Feb 17 2019 Igor Gnatenko - 8.2.50.20190120-17 +- Disable temporarily guile support + +* Sun Feb 17 2019 Igor Gnatenko - 8.2.50.20190120-16 +- Rebuild for readline 8.0 + +* Tue Feb 5 2019 Sergio Durigan Junior - 8.2.50.20190120-15 +- Remove libmpx dependency when using '--with testsuite', since GCC9 + has dropped support for it. + +* Thu Jan 31 2019 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 21 2019 Sergio Durigan Junior - 8.2.50.20190120-13.fc30 +- Rebase to FSF GDB 8.2.50.20190120 (8.3pre). +- Fix 'gdb does crash randomly on loading symbols or setting a breakpoint' + (RHBZ 1638798, Keith Seitz). + +* Thu Dec 20 2018 Sergio Durigan Junior - 8.2.50.20181220-12.fc30 +- Rebase to FSF GDB 8.2.50.20181220 (8.3pre). + +* Tue Dec 11 2018 Sergio Durigan Junior - 8.2.50.20181130-11.fc30 +- Update gdb-6.3-gstack-20050411.patch (Pedro Alves). +- Update gdb-archer-next-over-throw-cxx-exec.patch (Pedro Alves). +- Update gdb-glibc-strstr-workaround.patch (Pedro Alves). + +* Fri Nov 30 2018 Sergio Durigan Junior - 8.2.50.20181130-10.fc30 +- Rebase to FSF GDB 8.2.50.20181130 (8.3pre). + +* Tue Nov 20 2018 Sergio Durigan Junior - 8.2.50.20181114-9.fc30 +- Declare _python_bytecompile_extra. +- Fix typo on gdb-x86_64-i386-syscall-restart.patch. + +* Wed Nov 14 2018 Sergio Durigan Junior - 8.2.50.20181114-8.fc30 +- Rebase to FSF GDB 8.2.50.20181114 (8.3pre). +- Drop gdb-6.3-ppc64syscall-20040622.patch. +- Drop gdb-6.3-ppc64displaysymbol-20041124.patch. +- Drop gdb-6.8-watchpoint-conditionals-test.patch. + +* Thu Oct 18 2018 Sergio Durigan Junior - 8.2.50.20181016-7.fc30 +- Use "--enable-unit-tests" flag when compiling GDB. + +* Tue Oct 16 2018 Sergio Durigan Junior - 8.2.50.20181016-6.fc30 +- Rebase to FSF GDB 8.2.50.20181016 (8.3pre). +- Enable and always run the unittests when building the package. + +* Wed Oct 10 2018 Sergio Durigan Junior - 8.2.50.20181010-5.fc30 +- Rebase to FSF GDB 8.2.50.20181010 (8.3pre). +- Remove 'gdb-6.8-sparc64-silence-memcpy-check.patch'. +- Remove 'gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch'. + +* Sat Oct 6 2018 Sergio Durigan Junior - 8.2.50.20181006-4.fc30 +- Rebase to FSF GDB 8.2.50.20181006 (8.3pre). + +* Thu Oct 4 2018 Jan Kratochvil - 8.2.50.20180917-3.fc30 +- Fix annobin complaints (RH BZ 1630564): + --without-stage1-ldflags: Disable static libstdc++ and libgcc linking. + --disable-libmcheck: That is a distro-level decision, not package decision. + +* Wed Sep 19 2018 Sergio Durigan Junior - 8.2.50.20180917-2.fc30 +- Remove 'gdb-6.5-bz203661-emit-relocs.patch'. +- Update changelog entry for last release. + +* Mon Sep 17 2018 Sergio Durigan Junior - 8.2.50.20180917-1.fc30 +- Rebase to FSF GDB 8.2.50.20180917 (8.3pre). +- Add 'gdb-rhbz795424-bitpos-arrayview.patch'. +- Remove 'gdb-rhbz881849-ipv6-1of3.patch'. +- Remove 'gdb-rhbz881849-ipv6-2of3.patch'. +- Remove 'gdb-rhbz881849-ipv6-3of3.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-1of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-2of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-3of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-4of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-5of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-6of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-7of7.patch'. + +* Tue Aug 21 2018 Sergio Durigan Junior - 8.1.90.20180727-45.fc30 +- Enable verbose output when running "make". + +* Thu Aug 9 2018 Jan Kratochvil - 8.1.90.20180727-44.fc29 +- Add GDB support to access/display POWER8 registers (IBM, RH BZ 1187581). + +* Thu Aug 9 2018 Sergio Durigan Junior - 8.1.90.20180727-43.fc29 +- Reenable libipt. + +* Wed Aug 8 2018 Sergio Durigan Junior - 8.1.90.20180727-42.fc29 +- Again, temporarily disable libipt (needed to upgrade libipt to 2.0). + +* Wed Aug 8 2018 Sergio Durigan Junior - 8.1.90.20180727-41.fc29 +- Reenable libipt. +- Rebuild due to new libipt release. +- Adjust bundled libipt; remove unnecessary patch. +- Sync IPv6 patch with F-28 GDB. + +* Wed Aug 8 2018 Sergio Durigan Junior - 8.1.90.20180727-40.fc29 +- Temporarily disable libipt (needed to upgrade libipt to 2.0). + +* Wed Aug 8 2018 Jan Kratochvil - 8.1.90.20180727-39.fc29 +- [dts] Fix build by removing a patch for already removed pahole.py . +- [dts rhel6] Fix build by updating gdb-gnat-dwarf-crash-3of3.patch . + +* Mon Jul 30 2018 Sergio Durigan Junior - 8.1.90.20180727-38.fc29 +- Recompile to fix RH BZ 1609504 (due to RH BZ 1609577). + +* Sat Jul 28 2018 Sergio Durigan Junior - 8.1.90.20180727-37.fc29 +- Rebase to FSF GDB 8.1.90.20180727 (8.2pre). + +* Wed Jul 25 2018 Sergio Durigan Junior - 8.1.90.20180724-36.fc29 +- Rebase to FSF GDB 8.1.90.20180724 (8.2pre). + +* Sat Jul 14 2018 Sergio Durigan Junior - 8.1.90.20180714-35.fc29 +- Rebase to FSF GDB 8.1.90.20180714 (8.2pre). +- Backport IPv6 patch (RH BZ 881849, Sergio Durigan Junior). + +* Fri Jul 13 2018 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jul 12 2018 Jan Kratochvil - 8.1.90.20180708-33.fc29 +- [dts] [rhel6] Do not use mpfr as rhel6 has mpfr-2 while GDB requires mpfr-3. + +* Thu Jul 12 2018 Jan Kratochvil - 8.1.90.20180708-32.fc29 +- Remove as no longer needed: + Workaround gcc-8.0: -Wno-error=cast-function-type,stringop-truncation + +* Thu Jul 12 2018 Jan Kratochvil - 8.1.90.20180708-31.fc29 +- [dts] Upgrade libstdc++-v3-python to 8.1.1-20180626. + +* Thu Jul 12 2018 Sergio Durigan Junior - 8.1.90.20180708-30.fc29 +- Rebuild due to GCC ABI change. + +* Sun Jul 8 2018 Sergio Durigan Junior - 8.1.90.20180708-29.fc29 +- Rebase to FSF GDB 8.1.90.20180708 (8.2pre). + +* Wed Jul 4 2018 Sergio Durigan Junior - 8.1.50.20180704-28.fc29 +- Rebase to FSF GDB 8.1.50.20180704 (8.2pre). +- Remove defattr directives from specfile. + +* Mon Jul 02 2018 Miro Hrončok +- Rebuilt for Python 3.7 + +* Fri Jun 29 2018 Sergio Durigan Junior - 8.1.50.20180629-26.fc29 +- Rebase to FSF GDB 8.1.50.20180629 (8.2pre). +- Remove pahole.py. +- Adjust handling of gdb-gdb.py. + +* Sun Jun 24 2018 Sergio Durigan Junior - 8.1.50.20180624-25.fc29 +- Rebase to FSF GDB 8.1.50.20180624 (8.2pre). + +* Wed Jun 20 2018 Sergio Durigan Junior - 8.1.50.20180618-24.fc29 +- Add BuildRequires: mpfr-devel (RH BZ 1593280). + +* Mon Jun 18 2018 Sergio Durigan Junior - 8.1.50.20180618-23.fc29 +- Rebase to FSF GDB 8.1.50.20180618 (8.2pre). + +* Mon Jun 18 2018 Sergio Durigan Junior - 8.1.50.20180613-22.fc29 +- Do not run /sbin/install-info when installing the documentation + (except for DTS). + +* Wed Jun 13 2018 Sergio Durigan Junior - 8.1.50.20180613-21.fc29 +- Rebase to FSF GDB 8.1.50.20180613 (8.2pre). + +* Wed Jun 13 2018 Miro Hrončok +- Rebuilt for Python 3.7 + +* Wed Jun 13 2018 Miro Hrončok +- Bootstrap for Python 3.7 + +* Fri Jun 8 2018 Sergio Durigan Junior - 8.1.50.20180605-18.fc29 +- Fix Python 3.7 breakage (RH BZ 1577396). + +* Tue Jun 5 2018 Sergio Durigan Junior - 8.1.50.20180605-17.fc29 +- Rebase to FSF GDB 8.1.50.20180605 (8.2pre). + +* Sat Jun 2 2018 Sergio Durigan Junior - 8.1.50.20180522-16.fc29 +- Rebase to FSF GDB 8.1.50.20180529 (8.2pre). + +* Wed May 30 2018 Sergio Durigan Junior - 8.1.50.20180522-15.fc28 +- Rebase to FSF GDB 8.1.50.20180522 (8.2pre). + +* Mon Apr 2 2018 Jan Kratochvil - 8.1-14.fc28 +- Revert 'Fix PDF build on Rawhide/F-29', rm -rf texinfo/ (from RH BZ 1562580). + +* Sat Mar 31 2018 Jan Kratochvil - 8.1-13.fc28 +- Fix PDF build on Rawhide/F-29. + +* Fri Mar 23 2018 Jan Kratochvil - 8.1-12.fc28 +- Add test: [s390x] Backport arch12 instructions decoding (RH BZ 1553104). + +* Sat Mar 3 2018 Jan Kratochvil - 8.1-11.fc28 +- Add: BuildRequires: gcc-c++ + https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires + +* Tue Feb 20 2018 Rex Dieter - 8.1-10.fc28 +- rebuild (guile) + +* Sat Feb 17 2018 Jan Kratochvil - 8.1-9.fc28 +- [testsuite] Revert disable of BuildRequires: gcc-go (for RH BZ 1541639). + +* Fri Feb 09 2018 Igor Gnatenko - 8.1-8.fc28 +- Escape macros in %%changelog + +* Wed Feb 07 2018 Fedora Release Engineering - 8.1-7.fc28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Feb 6 2018 Jan Kratochvil - 8.1-6.fc28 +- Fix .spec build compatibility with <=F-27 and <=RHEL-7. +- [testsuite] Temporarily disable BuildRequires: gcc-go (for RH BZ 1541639). + +* Sun Feb 4 2018 Jan Kratochvil - 8.1-5.fc28 +- Workaround gcc-8.0: -Wno-error=cast-function-type,stringop-truncation +- Fix ppc64 stwux encoding as found by gcc-8.0 -Werror=tautological-compare. + +* Sun Feb 4 2018 Jan Kratochvil - 8.1-4.fc28 +- Fix -D_GLIBCXX_DEBUG gdb-add-index regression (RH BZ 1540559). + +* Wed Jan 31 2018 Sergio Durigan Junior - 8.1-3.fc26 +- Rebase to FSF GDB 8.1. + +* Fri Jan 19 2018 Sergio Durigan Junior - 8.0.90.20180109-2.fc26 +- Remove gdb-6.3-rh-dummykfail-20041202.patch (RH BZ 1535228). +- Remove gdb-glibc-vdso-workaround.patch (RH BZ 1535244). + +* Wed Jan 10 2018 Sergio Durigan Junior - 8.0.90.20180109-1.fc26 +- Rebase to pre-FSF GDB 8.1 (8.1.90.20180109). + +* Sat Dec 16 2017 Sergio Durigan Junior - 8.0.50.20171204-35.fc26 +- Rebase to FSF GDB 8.0.50.20171213 (8.1pre). + +* Sun Dec 10 2017 Sergio Durigan Junior - 8.0.50.20171204-34.fc26 +- chmod +x on the generate-*.sh script.s +- Remove references to gdb-8.0.1 from 'sources' and '.gitignore'. +- Regenerate first line of the patches (remove commit hash). +- Fix empty Source line. + +* Thu Dec 7 2017 Sergio Durigan Junior - 8.0.50.20171204-33.fc26 +- Rebase to FSF GDB 8.0.50.20171204 (8.1pre). +- Implemented new method for dealing with local patches. + +* Mon Dec 4 2017 Sergio Durigan Junior - 8.0.1-32.fc26 +- Convert all the patches to 'git-am' format. + +* Sat Dec 2 2017 Jan Kratochvil - 8.0.1-31.fc26 +- [testsuite] Fix BuildRequires for non-x86* arches. + +* Fri Oct 27 2017 Jan Kratochvil - 8.0.1-30.fc26 +- Use inlined func name for printing breakpoints (RH BZ 1228556, Keith Seitz). + +* Sat Oct 7 2017 Jan Kratochvil - 8.0.1-29.fc26 +- [s390x] Backport arch14 guarded-storage register support (RH BZ 1498758). + +* Thu Sep 28 2017 Jan Kratochvil - 8.0.1-28.fc26 +- Performance fix of gcore to use --readnever (for RH BZ 1493675). + +* Tue Sep 26 2017 Troy Dawson - 8.0.1-27.fc26 +- Cleanup spec file conditionals + +* Tue Sep 12 2017 Jan Kratochvil - 8.0.1-26.fc26 +- Rebase to FSF GDB 8.0.1 (8.0 stable branch). + +* Wed Aug 30 2017 Jan Kratochvil - 8.0-25.fc26 +- [rhel6] Fix T-stopping of processes after their detachment (RH BZ 1486223). + +* Thu Aug 24 2017 Jan Kratochvil - 8.0-24.fc26 +- Backport DWARF-5 and breakpoint fixes from upstream stable branch 8.0. + +* Sat Aug 19 2017 Jan Kratochvil - 8.0-23.fc26 +- [s390x] Backport arch12 support and other s390x fixes (RH BZ 1420304). + +* Fri Aug 18 2017 Jan Kratochvil - 8.0-22.fc26 +- Backport a fix for clang && -gsplit-dwarf debuggees (RH BZ 1482892). + +* Sun Aug 13 2017 Jan Kratochvil - 8.0-21.fc26 +- Fix compatibility with F-27 debuginfo packaging. +- Fix compatibility with F-27 librpm version 8. + +* Thu Aug 3 2017 Jan Kratochvil - 8.0-20.fc26 +- Two fixes from upstream stable branch 8.0. + +* Wed Aug 2 2017 Fedora Release Engineering - 8.0-19.fc26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 8.0-18.fc26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 12 2017 Jan Kratochvil - 8.0-17.fc26 +- [rhel6 dts] Use devtoolset gcc for GDB being now in C++11. + +* Sat Jun 10 2017 Jan Kratochvil - 8.0-16.fc26 +- [dts] Upgrade libstdc++-v3-python to 7.1.1-20170526. + +* Fri Jun 9 2017 Jan Kratochvil - 8.0-15.fc26 +- [rhel dts libipt] Fix#2 [-Werror=implicit-fallthrough=] with gcc-7.1.1. + +* Fri Jun 9 2017 Jan Kratochvil - 8.0-14.fc26 +- [rhel dts libipt] Fix [-Werror=implicit-fallthrough=] with gcc-7.1.1. + +* Fri Jun 9 2017 Jan Kratochvil - 8.0-13.fc26 +- Rebase to FSF GDB 8.0 final. +- [rhel7 dts] Rebase bundled libipt to 1.6.1. + +* Sat May 20 2017 Jan Kratochvil - 7.99.90.20170420-12.fc26 +- Move 'dnf-command(debuginfo-install)' gdb-headless -> gdb (RH BZ 1452335). + +* Mon May 15 2017 Fedora Release Engineering - 7.99.90.20170420-11.fc26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild + +* Mon May 8 2017 Jan Kratochvil - 7.99.90.20170420-10.fc26 +- [.spec] Update patches categorization. + +* Fri Apr 21 2017 Jan Kratochvil - 7.99.90.20170420-9.fc26 +- [ppc*] Fix gdb.arch/powerpc-power7.exp testcase regression (RH BZ 1440044). + +* Fri Apr 21 2017 Jan Kratochvil - 7.99.90.20170420-8.fc26 +- Rebase to FSF GDB 7.99.90.20170420 (pre-8.0 stable branch). + +* Wed Apr 19 2017 Jan Kratochvil - 7.12.50.20170309-7.fc26 +- Fix reported gdb-vla-intel-stringbt-fix.patch regression (SuSE). +- Remove gcc-7 compilation compatibility hack. + +* Fri Mar 10 2017 Jan Kratochvil - 7.12.50.20170309-6.fc26 +- [testsuite] [ppc*,s390*] Do not FAIL rhbz1261564-aarch64-watchpoint.exp + (RH BZ 1352563). + +* Thu Mar 9 2017 Jan Kratochvil - 7.12.50.20170309-5.fc26 +- Rebase to pre-7.13 FSF GDB trunk. + +* Thu Mar 2 2017 Jan Kratochvil - 7.12.50.20170226-4.fc26 +- Fix gdb-vla-intel-fortran-strides.patch rebase regression. + +* Tue Feb 28 2017 Jan Kratochvil - 7.12.50.20170226-3.fc26 +- Fix gdb.arch/amd64-entry-value-paramref.exp rebase regression. + +* Tue Feb 28 2017 Jan Kratochvil - 7.12.50.20170226-2.fc26 +- [testsuite] [rhel] Fix py-gil-mthread.exp for Python 2 compat (RH BZ 1427487). + +* Mon Feb 27 2017 Jan Kratochvil - 7.12.50.20170226-1.fc26 +- Rebase to pre-7.13 FSF GDB trunk. +- Dropped gdb-6.7-bz426600-DW_TAG_interface_type-test.patch as GCJ is no more. + +* Fri Feb 24 2017 Jan Kratochvil - 7.12.1-47.fc26 +- New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387). +- [testsuite] Use more standard_output_file. + +* Wed Feb 15 2017 Jan Kratochvil - 7.12.1-46.fc26 +- Fix -completion crash (Gary Benson, RH BZ 1398387). + +* Tue Feb 14 2017 Jan Kratochvil - 7.12.1-45.fc26 +- Release bump. + +* Sun Feb 12 2017 Jan Kratochvil - 7.12.1-44.fc26 +- [dts] Upgrade libstdc++-v3-python to 6.3.1-20170212. + +* Wed Feb 8 2017 Jan Kratochvil - 7.12.1-43.fc26 +- Fix build compatibility with gcc-7. + +* Wed Feb 8 2017 Stephen Gallagher - 7.12.1-42.fc26 +- Add missing %%license macro + +* Sat Jan 21 2017 Jan Kratochvil - 7.12.1-41.fc26 +- Rebase to released FSF GDB 7.12.1. + +* Tue Jan 17 2017 Jan Kratochvil - 7.12-40.fc26 +- Enable libinproctrace.so on all archs except arm32. + +* Thu Jan 12 2017 Jan Kratochvil - 7.12-39.fc26 +- Fix gdb-readline62-ask-more-rh.patch for Rawhide readline-7.0. + +* Thu Jan 12 2017 Igor Gnatenko - 7.12-38.fc26 +- Rebuild for readline 7.x + +* Thu Jan 12 2017 Jan Kratochvil - 7.12-37.fc25 +- [rhel6] Fix missing /usr/bin/realpath. + +* Wed Jan 11 2017 Jan Kratochvil - 7.12-36.fc25 +- Update from FSF GDB 7.12 stable branch to snapshot: gdb-7.12.0.20170111 + +* Sun Jan 8 2017 Jan Kratochvil - 7.12-35.fc25 +- Fix Python backtraces for 32-bit inferiors (Tom Tromey, RH BZ 1411094). + +* Fri Jan 6 2017 Jan Kratochvil - 7.12-34.fc25 +- Fix gdb-add-index for 444 *.debug files. + +* Mon Jan 02 2017 Rex Dieter - 7.12-33.fc25 +- fix logic of prior Conflicts + +* Mon Jan 02 2017 Rex Dieter - 7.12-32.fc25 +- Conflicts: gdb-headless < 7.12-29 (#1402554) + +* Fri Dec 09 2016 Charalampos Stratakis - 7.12-31.fc25 +- Python 3.6 rebuild: Rebuild with python3 support. + +* Fri Dec 09 2016 Charalampos Stratakis - 7.12-30.fc25 +- Python 3.6 rebuild: Rebuild without python3 support. + +* Mon Oct 31 2016 Jan Kratochvil - 7.12-29.fc25 +- Fix gdb-headless /usr/bin/ executables (BZ 1390251). + +* Mon Oct 24 2016 Jan Kratochvil - 7.12-28.fc25 +- Fix testcase: gdb.base/gdb-rhbz1156192-recursive-dlopen.exp + +* Sun Oct 23 2016 Jan Kratochvil - 7.12-27.fc25 +- More work on missing testcases present in rhel6 GDB; some still FAIL. + +* Thu Oct 20 2016 Jan Kratochvil - 7.12-26.fc25 +- Add missing testcases present in rhel6 GDB; some still FAIL. + +* Fri Oct 14 2016 Jan Kratochvil - 7.12-25.fc25 +- [rhel6] Fix .spec without devtoolset-6-build installed (RH BZ 1384947). + +* Wed Oct 12 2016 Jan Kratochvil - 7.12-24.fc25 +- Fix TLS (such as 'errno') regression. + +* Wed Oct 12 2016 Jan Kratochvil - 7.12-23.fc25 +- [testsuite] Various testsuite fixes. +- [aarch64] Fix gdb.cp/nextoverthrow.exp regression (Yao Qi). + +* Fri Oct 7 2016 Jan Kratochvil - 7.12-22.fc25 +- Fix .spec build: error: Macro %%buildisa has empty body + +* Fri Oct 7 2016 Jan Kratochvil - 7.12-21.fc25 +- Rebase to FSF GDB 7.12. + +* Thu Oct 6 2016 Jan Kratochvil - 7.12-0.20.20161006.fc25 +- Rebase to FSF GDB 7.11.90.20161006 (pre-7.12 branch snapshot). + +* Thu Sep 29 2016 Jan Kratochvil - 7.12-0.19.20160929.fc25 +- Rebase to FSF GDB 7.11.90.20160929 (pre-7.12 branch snapshot). + - Fixes GDB crashes on inf. function call scripts (RH BZ 1378147, Pedro Alves). + +* Wed Sep 28 2016 Jan Kratochvil - 7.12-0.18.20160928.fc25 +- Fix attachment of JIT-debug-enabled inf. (7.11.1 regression, RH BZ 1375553). +- Rebase to FSF GDB 7.11.90.20160928 (pre-7.12 branch snapshot). + +* Wed Sep 14 2016 Jan Kratochvil - 7.12-0.17.20160907.fc25 +- Fix description empty lines. + +* Wed Sep 14 2016 Jan Kratochvil - 7.12-0.16.20160907.fc25 +- Provide gdb-headless package (RH BZ 1195005). + +* Mon Sep 12 2016 Jan Kratochvil - 7.12-0.15.20160907.fc25 +- [testsuite] More testsuite fixes. + +* Mon Sep 12 2016 Jan Kratochvil - 7.12-0.14.20160907.fc25 +- Various mostly testsuite compatibility and regression fixes. + +* Wed Sep 7 2016 Jan Kratochvil - 7.12-0.13.20160907.fc25 +- Rebase to FSF GDB 7.11.90.20160907 (pre-7.12 branch snapshot). +- Rebase Intel VLA patchset. + +* Wed Sep 7 2016 Jan Kratochvil - 7.12-0.12.20160904.fc25 +- [rhel6+7] Fix compatibility of bison <3.1 and gcc >=6. + +* Sun Sep 4 2016 Jan Kratochvil - 7.12-0.11.20160904.fc25 +- Release bump for a mistaken build. + +* Sun Sep 4 2016 Jan Kratochvil - 7.12-0.10.20160904.fc25 +- Fix libipt bundling in 7.12. + +* Sun Sep 4 2016 Jan Kratochvil - 7.12-0.9.20160904.fc25 +- Rebase to FSF GDB 7.11.90.20160904 (pre-7.12 branch snapshot). +- Make Version tag 7.12; but it is still a pre-release. + +* Mon Aug 29 2016 Jan Kratochvil - 7.11.90.20160829-8.fc25 +- Rebase to FSF GDB 7.11.90.20160829 (pre-7.12 branch snapshot). + +* Fri Aug 26 2016 Jan Kratochvil - 7.11.90.20160807-7.fc25 +- Fix Intel VLA patchset regression: dynamic.exp: p varw filled + +* Tue Aug 23 2016 Jan Kratochvil - 7.11.90.20160807-6.fc25 +- Merge Fedora packaging changes from Fedora 24 gdb-7.11.1-83.fc24: + +* Tue Aug 23 2016 Jan Kratochvil - 7.11.1-83.fc24 +- [dts+el7] [x86*] Bundle libipt - fix#3 its initialization (RH BZ 1256513). + +* Tue Aug 23 2016 Jan Kratochvil - 7.11.1-82.fc24 +- [dts+el7] [x86*] Bundle libipt - fix#2 its initialization (RH BZ 1256513). + +* Tue Aug 23 2016 Jan Kratochvil - 7.11.1-81.fc24 +- [dts+el7] [x86*] Bundle libipt - fix its initialization (RH BZ 1256513). + +* Mon Aug 22 2016 Jan Kratochvil - 7.11.1-80.fc24 +- [dts] Upgrade libstdc++-v3-python to 6.1.1-20160817. + +* Fri Aug 19 2016 Jan Kratochvil - 7.11.1-79.fc24 +- [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). + +* Wed Aug 17 2016 Jan Kratochvil - 7.11.1-78.fc24 +- [dts+el7] [x86*] Bundle libipt (RH BZ 1256513). + +* Sun Aug 7 2016 Jan Kratochvil - 7.11.90.20160807-5.fc25 +- Rebase to FSF GDB 7.11.90.20160807 (pre-7.12 branch snapshot). + +* Sun Jul 31 2016 Jan Kratochvil - 7.11.50.20160721-4.fc25 +- Testcase for: Load strictly build-id-checked core files only if no executable + is specified (Jan Kratochvil, RH BZ 1339862). + +* Thu Jul 28 2016 Jan Kratochvil - 7.11.50.20160721-3.fc25 +- Do not apply RHEL-6 patches on non-RHEL-6 even for testsuite. + +* Thu Jul 21 2016 Jan Kratochvil - 7.11.50.20160721-2.fc25 +- Rebase to FSF GDB 7.11.50.20160721 (pre-7.12 trunk snapshot). + +* Sun Jul 17 2016 Jan Kratochvil - 7.11.50.20160716-1.fc25 +- Rebase to FSF GDB 7.11.50.20160716 (pre-7.12 trunk snapshot). + +* Mon Jun 27 2016 Jan Kratochvil - 7.11.1-76.fc24 +- Test 'info type-printers' Python error (RH BZ 1350436). + +* Mon Jun 6 2016 Jan Kratochvil - 7.11.1-75.fc24 +- Rebase to released FSF GDB 7.11.1. + +* Mon May 30 2016 Jan Kratochvil - 7.11-74.fc24 +- Import bare DW_TAG_lexical_block (RH BZ 1325396). + +* Tue May 3 2016 Jan Kratochvil - 7.11-73.fc24 +- Fix compilation error by upstream symfile.c fix. + +* Tue May 3 2016 Jan Kratochvil - 7.11-72.fc24 +- Fix messages suggesting more recent RHEL gdbserver (RH BZ 1321114). + +* Wed Apr 27 2016 Jan Kratochvil - 7.11-71.fc24 +- Import upstream 7.11 branch stable fixes. + +* Sat Apr 23 2016 Jan Kratochvil - 7.11-70.fc24 +- New test for Python "Cannot locate object file for block" (for RH BZ 1325795). + +* Tue Apr 12 2016 Jan Kratochvil - 7.11-69.fc24 +- Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747). + +* Fri Apr 8 2016 Jan Kratochvil - 7.11-68.fc24 +- [--with testsuite] Add two more BuildRequires. + +* Fri Apr 8 2016 Jan Kratochvil - 7.11-67.fc24 +- [testsuite] Fix several false FAILs. + +* Wed Apr 6 2016 Jan Kratochvil - 7.11-66.fc24 +- Import upstream 7.11 branch stable fixes. + +* Wed Apr 6 2016 Jan Kratochvil - 7.11-65.fc24 +- Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). + +* Wed Apr 6 2016 Jan Kratochvil - 7.11-64.fc24 +- Fix non-stop gdb -p : internal error (Pedro Alves, RH BZ 1318049). + +* Sat Mar 19 2016 Jan Kratochvil - 7.11-63.fc24 +- .spec cleanup: Drop strict-aliasing GCC bug workaround (from RH BZ 1315191). + +* Fri Mar 18 2016 Jan Kratochvil - 7.11-62.fc24 +- .spec cleanup: Drop SCL obsoletes of devtoolset-1.1*: *-1.0* + +* Thu Mar 17 2016 Jan Kratochvil - 7.11-61.fc24 +- Add message suggesting gdbserver for non-matching PID namespaces. + +* Tue Mar 15 2016 Jan Kratochvil - 7.11-60.fc24 +- New Fedora GDB testfile: rhbz1261564-aarch64-watchpoint.exp +- Backport gdb-7.11 stable branch PR gdb/19676 fix (Pedro Alves). + +* Tue Mar 8 2016 Jan Kratochvil - 7.11-59.fc24 +- Fix strict-aliasing rules compilation error (RH BZ 1315191). + +* Fri Feb 26 2016 Jan Kratochvil - 7.11-58.fc24 +- Rebase VLA (Fortran dynamic arrays) strides (multi-dim. subarrays) from Intel. + +* Thu Feb 25 2016 Jan Kratochvil - 7.11-57.fc24 +- Release bump only. + +* Wed Feb 24 2016 Jan Kratochvil - 7.11-56.fc24 +- Release bump only. + +* Wed Feb 24 2016 Jan Kratochvil - 7.11-55.fc24 +- Rebase to released FSF GDB 7.11. + +* Tue Feb 16 2016 Jan Kratochvil - 7.10.90.20160216-54.fc24 +- Rebase to FSF GDB 7.10.90.20160216 (pre-7.11 branch snapshot). + +* Tue Feb 16 2016 Jan Kratochvil - 7.10.90.20160211-53.fc24 +- Drop gdb-testsuite-subdirs-revert.patch. + +* Sat Feb 13 2016 Jan Kratochvil - 7.10.90.20160211-52.fc24 +- Rebase to FSF GDB 7.10.90.20160211 (pre-7.11 branch snapshot). + +* Wed Feb 03 2016 Fedora Release Engineering - 7.10.50.20160131-51.fc24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160131-50.fc24 +- Rebase to FSF GDB 7.10.50.20160131 (trunk snapshot). + +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160121-49.fc24 +- Fix another false gcc6 compilation warning (Mark Wielaard). + +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160121-48.fc24 +- Fix false gcc6 compilation warning for: bfd/elf64-s390.c + +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160121-47.fc24 +- [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). + +* Fri Jan 22 2016 Jan Kratochvil - 7.10.50.20160121-46.fc24 +- Fix gdb.gdb/selftest.exp false FAIL. + +* Fri Jan 22 2016 Jan Kratochvil - 7.10.50.20160121-45.fc24 +- Rebase to FSF GDB 7.10.50.20160121 (trunk snapshot). + +* Wed Jan 20 2016 Jan Kratochvil - 7.10.50.20160106-44.fc24 +- Suppress librpm non-absolute filename warnings for /^remote:/ filenames. + +* Sat Jan 16 2016 Jan Kratochvil - 7.10.50.20160106-43.fc24 +- Test clflushopt instruction decode (for RH BZ 1262471). + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-42.fc24 +- Simplify .spec: Remove conditional revert of: gdb-pahole-python2.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-41.fc24 +- Simplify .spec: Remove conditional revert of: gdb-6.8-attach-signalled-detach-stopped.patch +- Simplify .spec: Remove conditional revert of: gdb-6.8-quit-never-aborts.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-40.fc24 +- Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-39.fc24 +- Simplify .spec: Remove conditional revert of: gdb-readline62-ask-more-rh.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-38.fc24 +- Simplify .spec: Remove conditional revert of: gdb-6.6-buildid-locate-rpm-scl.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-37.fc24 +- Simplify .spec: Remove conditional revert of: gdb-dts-rhel6-python-compat.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-36.fc24 +- VLA (Fortran dynamic arrays) strides (multi-dimensional subarrays) from Intel. + +* Fri Jan 8 2016 Jan Kratochvil - 7.10.50.20160106-35.fc24 +- Fix false FAILs on too long base directory. + +* Fri Jan 8 2016 Jan Kratochvil - 7.10.50.20160106-34.fc24 +- Rebase to FSF GDB 7.10.50.20160106 (trunk snapshot). + +* Sat Nov 14 2015 Jan Kratochvil - 7.10.50.20151113-33.fc24 +- Rebase to FSF GDB 7.10.50.20151113 (trunk snapshot). +- [testsuite] BuildRequire libmpx for --with testsuite. +- Force libncursesw over libncurses to match the includes (RH BZ 1270534). + +* Thu Nov 12 2015 Fedora Release Engineering - 7.10.50.20151027-32.fc24 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Sun Nov 8 2015 Jan Kratochvil - 7.10.50.20151027-31.fc24 +- [aarch64] Fix build regression (RH BZ 1278902, bugreport by Peter Robinson). + +* Tue Nov 3 2015 Jan Kratochvil - 7.10.50.20151027-30.fc24 +- Rebase to FSF GDB 7.10.50.20151027 (trunk snapshot). + +* Mon Oct 12 2015 Jan Kratochvil - 7.10-29.fc23 +- Fix internal error on DW_OP_bregx(-1) (RH BZ 1270564). + +* Mon Sep 28 2015 Jan Kratochvil - 7.10-28.fc23 +- Add --with buildisa, remove %%{?_isa} from BuildRequires by default: + https://github.com/msimacek/koschei/issues/54 + +* Thu Sep 24 2015 Jan Kratochvil - 7.10-27.fc23 +- [rhel6,rhel7] Keep pahole.py and make it Python2 compatible. + +* Wed Sep 23 2015 Jan Kratochvil - 7.10-26.fc23 +- [rhel7] Provide libstdc++-v3-python with C++11 even on RHEL-7 (RH BZ 1239290). +- Do not provide libstdc++-v3-python lib64 files on 32-bit archs. +- [rhel6,rhel7] Delete pahole.py on Python2 systems. + +* Wed Sep 23 2015 Robert Kuska - 7.10-25.fc23 +- Python3.5 Rebuild: Rebuild wit python3 support + +* Wed Sep 23 2015 Robert Kuska - 7.10-24.fc23 +- Python3.5 Rebuild: Rebuild without python3 support + +* Fri Sep 18 2015 Jan Kratochvil - 7.10-23.fc23 +- Fix the pahole command breakage due to its Python3 port (RH BZ 1264532). + +* Sun Sep 13 2015 Jan Kratochvil - 7.10-22.fc23 +- Fix gstack to use gdb from $PATH (bugreport by Frank Hirtz, RH BZ 1262589). + +* Fri Sep 11 2015 Jan Kratochvil - 7.10-21.fc23 +- [testsuite] Fix gcc-gdb-plugin and gcc-go BuildRequires for --with testsuite. + +* Thu Sep 10 2015 Jan Kratochvil - 7.10-20.fc23 +- [ppc64le] Use skip_entrypoint for skip_trampoline_code (RH BZ 1260558). + +* Thu Sep 10 2015 Jan Kratochvil - 7.10-19.fc23 +- Add changelog entry and fix librpm dependency broken by Peter Robinson. + +* Thu Sep 3 2015 Jan Kratochvil - 7.10-18.fc23 +- Enable libipt (Intel Processor Trace Decoder Library). + +* Wed Sep 2 2015 Sergio Durigan Junior - 7.10-17.fc23 +- Fix 'Make the probes-based dynamic linker interface more robust to + errors' (Sergio Durigan Junior, RH BZ 1259132). + +* Tue Sep 1 2015 Jan Kratochvil - 7.10-16.fc23 +- [RHEL] Fix librpm Recommends compatibility. + +* Sat Aug 29 2015 Jan Kratochvil - 7.10-15.fc23 +- Rebase to FSF GDB 7.10 final. + +* Sat Aug 22 2015 Jan Kratochvil - 7.10-14.fc23 +- Re-enable --with testsuite BuildRequires: prelink for RHELs. + +* Sat Aug 22 2015 Jan Kratochvil - 7.10-13.fc23 +- Rebase to FSF GDB 7.9.90.20150822 (7.10 branch snapshot). +- Remove --with testsuite BuildRequires: prelink (prelink is orphaned in F-23+). + +* Thu Aug 6 2015 Sergio Durigan Junior - 7.9.90.20150717-12.fc23 +- Add "Recommends: default-yama-scope" (for RH BZ 1209492). + +* Thu Aug 6 2015 Jan Kratochvil - 7.9.90.20150717-11.fc23 +- Fix librpm version for f23. + +* Sun Aug 2 2015 Jan Kratochvil - 7.9.90.20150717-10.fc23 +- Fix unpackaged d-exp.c source for the debuginfo rpm. +- Fix librpm version dependency Koji build failure (for RH BZ 1249325). + +* Sun Aug 2 2015 Jan Kratochvil - 7.9.90.20150717-9.fc23 +- Fix librpm version dependency (for RH BZ 1249325, from Igor Gnatenko). + +* Sat Aug 1 2015 Jan Kratochvil - 7.9.90.20150717-8.fc23 +- Fix librpm version 3->7 for Rawhide + (RH BZ 1249325, bugreport by Zbigniew Jędrzejewski-Szmek). +- Fix yum vs. dnf message suggestion for Rawhide + (RH BZ 1249326, bugreport by Zbigniew Jędrzejewski-Szmek). + +* Fri Jul 17 2015 Jan Kratochvil - 7.9.90.20150717-7.fc23 +- Rebase to FSF GDB 7.9.90.20150717 (7.10 branch snapshot). + +* Fri Jul 10 2015 Jan Kratochvil - 7.9.90.20150709-6.fc23 +- Rebase to FSF GDB 7.9.90.20150709 (7.10 branch snapshot). + +* Tue Jul 7 2015 Jan Kratochvil - 7.9.50.20150531-5.fc23 +- Upgrade libstdc++-v3-python to r225521 (RH BZ 1239290). + +* Thu Jul 2 2015 Jan Kratochvil - 7.9.50.20150531-4.fc23 +- [RHEL] Use Python2, disable Guile. + +* Fri Jun 26 2015 Jan Kratochvil - 7.9.50.20150531-3.fc23 +- Fix 'info type-printers' Python error (Clem Dickey, RH BZ 1085576). + +* Tue Jun 16 2015 Jan Kratochvil - 7.9.50.20150531-2.fc23 +- Fix enum e e 'Attempt to use a type name as an expr.' (Keith Seitz, PR 16253). + +* Sun May 31 2015 Jan Kratochvil - 7.9.50.20150531-1.fc23 +- Rebase to FSF GDB 7.9.50.20150531 (pre-7.10 trunk snapshot). + +* Fri May 15 2015 Jan Kratochvil - 7.9.1-14.fc22 +- Fix ignored Requires for gdb-doc (RH BZ 1221814). + +* Thu May 14 2015 Jan Kratochvil - 7.9.1-13.fc22 +- Change 'Recommends: dnf-plugins-core' to 'dnf-command(debuginfo-install)'. + +* Wed May 13 2015 Jan Kratochvil - 7.9.1-12.fc22 +- Rebase to FSF GDB 7.9.1 (7.9 stable branch). +- Add 'Recommends: dnf-plugins-core' for 'dnf debuginfo-install'. + +* Thu Apr 2 2015 Jan Kratochvil - 7.9-11.fc22 +- Suggest s/debuginfo-install/dnf debuginfo-install/ (BZ 1208650, Omair Majid). + +* Sun Feb 22 2015 Jan Kratochvil - 7.9-10.fc22 +- Rebase to the final 7.9 release. + +* Sun Feb 22 2015 Jan Kratochvil - 7.8.90.20150202-9.fc22 +- Change Require->Recommends for gcc-gdb-plugin (RH BZ 1195005). + +* Sat Feb 21 2015 Till Maas - 7.8.90.20150214-8 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Mon Feb 16 2015 Jan Kratochvil - 7.8.90.20150214-7.fc22 +- Switch Python 2->3 (RH BZ 1014549). + +* Sat Feb 14 2015 Jan Kratochvil - 7.8.90.20150214-6.fc22 +- Rebase to 7.9-branch snapshot 7.8.90.20150214. + +* Wed Feb 11 2015 Jan Kratochvil - 7.8.90.20150202-5.fc22 +- Enable guile support. + +* Wed Feb 11 2015 Jan Kratochvil - 7.8.90.20150202-4.fc22 +- Fix gcc5 compilation errors (RH BZ 1190649). + +* Mon Feb 9 2015 Jan Kratochvil - 7.8.90.20150202-3.fc22 +- Require gcc-gdb-plugin. + +* Mon Feb 2 2015 Jan Kratochvil - 7.8.90.20150202-2.fc22 +- Rebase to 7.9-branch snapshot 7.8.90.20150202. +- Temporarily disable dg-extract-results.py to fix gdb.sum sorting. + +* Thu Jan 8 2015 Jan Kratochvil - 7.8.50.20150108-1.fc22 +- Rebase to pre-7.9 snapshot 7.8.50.20150108. +- Fix jit-reader.h for multi-lib. + +* Sun Dec 28 2014 Jan Kratochvil - 7.8.1-36.fc21 +- Rebase to 7.8.1.20141228 for a performance fix (PR binutils/17677). + +* Sat Dec 13 2014 Jan Kratochvil - 7.8.1-35.fc21 +- Fix resolve_dynamic_struct: Assertion `TYPE_NFIELDS (type) > 0' (PR 17642). + +* Sat Nov 22 2014 Jan Kratochvil - 7.8.1-34.fc21 +- [ppc64] Fix compatibility of Fedora errno workaround (for RH BZ 1166549). + +* Fri Nov 21 2014 Jan Kratochvil - 7.8.1-33.fc21 +- Fix regression accessing errno from a core file (RH BZ 1166549). + +* Thu Nov 20 2014 Sergio Durigan Junior - 7.8.1-32.fc21 +- Fix 'Unowned dir /usr/include/gdb/' (RH BZ 1164991). + +* Sat Nov 15 2014 Jan Kratochvil - 7.8.1-31.fc21 +- Fix '[RFE] please add add-auto-load-scripts-directory command' (RH + BZ 1163339, Jan Kratochvil). + +* Thu Oct 30 2014 Jan Kratochvil - 7.8.1-30.fc21 +- Rebase to FSF GDB 7.8.1. + +* Mon Oct 27 2014 Jan Kratochvil - 7.8-29.fc21 +- Backport vDSO regression. +- Revert the makeinfo workaround from 7.8-27.fc21. +- Further 1.75x improvement of the interactive symbols lookup (Doug Evans). + +* Mon Oct 20 2014 Jan Kratochvil - 7.8-28.fc21 +- Accelerate interactive symbols lookup 15x. + +* Sun Oct 19 2014 Jan Kratochvil - 7.8-27.fc21 +- Workaround makeinfo F-22 Bug 1154436. + +* Sun Oct 19 2014 Jan Kratochvil - 7.8-26.fc21 +- Import 5 upstream gdb-7.8 branch fixes (async fix by Pedro Alves). + +* Fri Oct 03 2014 Sergio Durigan Junior - 7.8-25.fc21 +- Fix 'Slow gstack performance' (RH BZ 1103894, Jan Kratochvil). + +* Fri Oct 3 2014 Jan Kratochvil - 7.8-24.fc21 +- Fix "save breakpoints" for signal catchpoints and disabled breakpoints + (BZ 1146170, Miroslav Franc). + +* Mon Sep 15 2014 Sergio Durigan Junior - 7.8-23.fc21 +- Install gdb/jit-reader.h on include directory (BZ 1141968). + +* Sun Sep 14 2014 Jan Kratochvil - 7.8-22.fc21 +- [testsuite] Fix runaway gdb.base/attach processes. + +* Sun Sep 7 2014 Jan Kratochvil - 7.8-21.fc21 +- Fix GDB SIGTT* Stopped when using the PID argument (BZ 1136704, Pedro Alves). + +* Wed Aug 20 2014 Jan Kratochvil - 7.8-20.fc21 +- Fix babeltrace errors (Yao Qi). +- Fix crash on Python frame filters with unreadable arg (BZ 1126177). + +* Sat Aug 16 2014 Fedora Release Engineering - 7.8-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Aug 14 2014 Jan Kratochvil - 7.8-18.fc21 +- [rhel] Adjust the previous patch for compilation on older GCCs. + +* Wed Aug 13 2014 Jan Kratochvil - 7.8-17.fc21 +- Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957). + +* Mon Aug 4 2014 Jan Kratochvil - 7.8-16.fc21 +- Enable babeltrace compile-time feature. + +* Sat Aug 2 2014 Jan Kratochvil - 7.8-15.fc21 +- Rebase to FSF GDB 7.8. +- Display Fortran strings in backtraces. + +* Thu Jul 24 2014 Jan Kratochvil - 7.8-14.fc21 +- Rebase to FSF GDB 7.7.91.20140724 (pre-7.8 snapshot). +- Import TUI regression fix (Pedro Alves, BZ 1123003). + +* Tue Jul 22 2014 Jan Kratochvil - 7.8-13.fc21 +- Bump the package version number to final 7.8; still using 7.7.91.20140721.tar. + +* Tue Jul 22 2014 Jan Kratochvil - 7.7.91.20140721-12.fc21 +- Rebase to FSF GDB 7.7.91.20140721 (pre-7.8 snapshot). +- Rebase the Intel VLA patchset. +- New fix of the optimized-out entry data values crash (BZ 1111910). +- [testsuite] Fix paginate-*.exp race for "read1". + +* Fri Jul 11 2014 Jan Kratochvil - 7.7.90.20140711-11.fc21 +- Fix regression#2 of the optimized-out entry data values fix (of BZ 1111910). +- Rebase to FSF GDB 7.7.90.20140711 (pre-7.8 snapshot). +- [testsuite] Disable --with testsuite PIE testing, it has too many false FAILs. + +* Wed Jul 9 2014 Jan Kratochvil - 7.7.90.20140627-10.fc21 +- Fix regression of the optimized-out entry data values fix (of BZ 1111910). + +* Tue Jul 8 2014 Jan Kratochvil - 7.7.90.20140627-9.fc21 +- Rebase the Intel VLA patchset. +- Python completion w/overriden completer (Sergio Durigan Junior, BZ 1075199). +- Remove %%{_bindir}/mono-gdb.py workaround of mono BZ 815501. + +* Tue Jul 1 2014 Jan Kratochvil - 7.7.90.20140627-8.fc21 +- Do not remove %%{_datadir}/gdb/syscalls/ppc*.xml as it is secondary target. +- Remove: %%{_datadir}/gdb/guile +- Remove: %%{_datadir}/gdb/system-gdbinit + +* Mon Jun 30 2014 Jan Kratochvil - 7.7.90.20140627-7.fc21 +- Fix crash on optimized-out entry data values (BZ 1111910). + +* Fri Jun 27 2014 Jan Kratochvil - 7.7.90.20140627-6.fc21 +- Rebase to FSF GDB 7.7.90.20140627 (pre-7.8 snapshot). + +* Fri Jun 27 2014 Jan Kratochvil - 7.7.90.20140613-5.fc21 +- Continue backtrace even if a frame filter throws an exception (Phil Muldoon). + +* Tue Jun 24 2014 Jan Kratochvil - 7.7.90.20140613-4.fc21 +- [aarch64] Fix compilation error. + +* Fri Jun 20 2014 Jan Kratochvil - 7.7.90.20140613-3.fc21 +- Fix --with-system-readline with readline-6.3 patch 5. + - Use --enable-werror again. + +* Thu Jun 19 2014 Jan Kratochvil - 7.7.90.20140613-2.fc21 +- Temporarily use --disable-werror for readline-6.3's deprecated 'VFunction'. + +* Thu Jun 19 2014 Jan Kratochvil - 7.7.90.20140613-1.fc21 +- Rebase to FSF GDB 7.7.90.20140613 (pre-7.8 snapshot). + +* Sat Jun 07 2014 Fedora Release Engineering - 7.7.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Jun 3 2014 Jan Kratochvil - 7.7.1-20.fc21 +- Fix#2 /usr/share/gdb/system-gdbinit/ timestamps causing non-matching *.py[oc]. + +* Tue Jun 3 2014 Jan Kratochvil - 7.7.1-19.fc21 +- Fix /usr/share/gdb/auto-load/ (safely) dangling symlinks. +- Fix /usr/share/gdb/system-gdbinit/ timestamps causing non-matching *.py[oc]. + +* Tue Jun 3 2014 Jan Kratochvil - 7.7.1-18.fc21 +- [ppc64le testsuite] Add comments about prelink+valgrind not yet ported. + +* Fri May 30 2014 Jan Kratochvil - 7.7.1-17.fc21 +- [arm*,aarch64] Turn on --enable-werror, fix aarch64 for it. + +* Fri May 30 2014 Jan Kratochvil - 7.7.1-16.fc21 +- [aarch64] Fix signal frame unwinding (BZ 1086894, upstream). + +* Mon May 26 2014 Jan Kratochvil - 7.7.1-15.fc21 +- [testsuite] Drop BuildRequires: gcc-java+libgcj on Fedora (no longer in F21+). + +* Fri May 16 2014 Jan Kratochvil - 7.7.1-14.fc21 +- [rhel5] Drop the RHEL-5 support - simplify this .spec file. + +* Wed May 14 2014 Jan Kratochvil - 7.7.1-13.fc21 +- [s390*] Import upstream fix for 64->32 debugging. + +* Mon May 12 2014 Jan Kratochvil - 7.7.1-12.fc21 +- [s390*] Fix compilation error. + +* Fri May 9 2014 Jan Kratochvil - 7.7.1-11.fc21 +- [ppc*] Import ppc64le support (BZ 1096303, Ulrich Weigand). + +* Tue May 6 2014 Jan Kratochvil - 7.7.1-10.fc21 +- Rebase to FSF GDB 7.7.1. + +* Mon May 5 2014 Sergio Durigan Junior - 7.7-9.fc21 +- Improve testcase message for RH BZ 981154. + +* Mon May 5 2014 Jan Kratochvil - 7.7-8.fc21 +- Fix TLS access for -static -pthread (BZ 1080660). + +* Mon May 5 2014 Jan Kratochvil - 7.7-7.fc21 +- Add GFDL License to the main package (man pages are generated from .texinfo). + +* Thu Apr 24 2014 Sergio Durigan Junior - 7.7-6.fc21 +- Fix build failures for GCC 4.9 (Nick Clifton). + +* Thu Apr 24 2014 Sergio Durigan Junior - 7.7-5.fc21 +- Fix 'gdb gives highly misleading error when debuginfo pkg is present, + but not corresponding binary pkg' (RH BZ 981154). + +* Mon Feb 24 2014 Jan Kratochvil - 7.7-4.fc21 +- Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211). + +* Sun Feb 23 2014 Jan Kratochvil - 7.7-3.fc21 +- [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon). +- [rhel6] Do not install its man page if gdb-add-index is not installed. +- [rhel] Do not migrate /usr/share/gdb/auto-load/ with symlinks on RHELs. +- Fix gdb-7.7 auto-load from /usr/share/gdb/auto-load/ regression. + +* Sun Feb 9 2014 Jan Kratochvil - 7.7-2.fc21 +- [rhel] Fix rebase build regression on RHEL systems (Tobias Burnus). + +* Fri Feb 7 2014 Jan Kratochvil - 7.7-1.fc21 +- Rebase to FSF GDB 7.7. +- New rpmbuild option: --with asan + +* Thu Jan 23 2014 Jan Kratochvil - 7.6.50.20140119-20.fc20 +- [s390*,ppc*] Enable secondary targets s390* and ppc* (BZ 1056259). + +* Sun Jan 19 2014 Jan Kratochvil - 7.6.50.20140119-19.fc20 +- Backport several gdb-7.6.x stable branch fixes (BZ 1055155). + +* Wed Dec 25 2013 Jan Kratochvil - 7.6.50.20130731-18.fc20 +- [aarch64] Backport two breakpoint/watchpoint fixes. + +* Mon Nov 18 2013 Jan Kratochvil - 7.6.50.20130731-17.fc20 +- [rhel7] [--with testsuite] Remove gcc-java&co. BuildRequires. + +* Sat Nov 9 2013 Jan Kratochvil - 7.6.50.20130731-16.fc20 +- Fix explicit Class:: inside class scope (BZ 874817, Keith Seitz). + +* Tue Nov 5 2013 Jan Kratochvil - 7.6.50.20130731-15.fc20 +- [aarch64] Backport two fixes (BZ 1026484). + +* Sun Nov 3 2013 Jan Kratochvil - 7.6.50.20130731-14.fc20 +- Fix %%{_bindir}gdb-add-index to also use -iex 'set auto-load no'. + +* Wed Oct 30 2013 Jan Kratochvil - 7.6.50.20130731-13.fc20 +- [rhel5] Fix /etc/gdbinit compatibility with python-2.4. + +* Mon Sep 30 2013 Sergio Durigan Junior - 7.6.50.20130731-12.fc20 +- Fix the case when GDB leaks memory because value_struct_elt does not call + check_typedef. (Doug Evans, BZ 15695, filed as RH BZ 1013453). + +* Wed Sep 25 2013 Jan Kratochvil - 7.6.50.20130731-11.fc20 +- Enable arm-linux-gnu and aarch64-linux-gnu targets on all archs (BZ 1011647). + +* Mon Sep 9 2013 Jan Kratochvil - 7.6.50.20130731-10.fc20 +- Fix the version string to be GNU standards compliant (BZ 1004949). + +* Fri Aug 30 2013 Jan Kratochvil - 7.6.50.20130731-9.fc20 +- Load /etc/gdbinit.d/*.{gdb,py} files automatically (BZ 981520). + +* Fri Aug 30 2013 Jan Kratochvil - 7.6.50.20130731-8.fc20 +- New %%pre to fix failed upgrade of the previous commit (BZ 999645). +- Fix false warnings of new %%pre during future upgrades (BZ 999645). + +* Wed Aug 28 2013 Jan Kratochvil - 7.6.50.20130731-7.fc20 +- Fix /usr/share/gdb/auto-load/ need of filesystem symlinks (BZ 999645). + It needs: yum remove gdb-heap; yum reinstall gdb; yum install gdb-heap + +* Thu Aug 8 2013 Jan Kratochvil - 7.6.50.20130731-6.fc20 +- [rhel5] tps-srpmtest does not set %%{rhel} (BZ 1002198, Miroslav Franc). + +* Thu Aug 8 2013 Jan Kratochvil - 7.6.50.20130731-5.fc20 +- Simplify BuildRequires by texlive-collection-latexrecommended (see BZ 919891). + +* Tue Aug 6 2013 Jan Kratochvil - 7.6.50.20130731-4.fc20 +- Revert the texlive-collection-latexrecommended change (see BZ 919891). + +* Tue Aug 6 2013 Jan Kratochvil - 7.6.50.20130731-3.fc20 +- Simplify BuildRequires by texlive-collection-latexrecommended (see BZ 919891). +- Fix crash on 'enable count' (Simon Marchi, BZ 993118). + +* Fri Aug 2 2013 Jan Kratochvil - 7.6.50.20130731-2.fc20 +- Drop ia64 patches and .spec support. + +* Fri Aug 2 2013 Jan Kratochvil - 7.6.50.20130731-1.fc20 +- Rebase to FSF GDB 7.6.50.20130731 (snapshot between 7.6 and future 7.7). + +* Mon Jul 29 2013 Jan Kratochvil - 7.6-36.fc20 +- Remove %%{gdb_docdir}, rebuild for unversioned docdirs (for BZ 986871). + +* Wed Jul 24 2013 Jan Kratochvil - 7.6-35.fc20 +- [ppc] Support Power8 CPU (IBM, BZ 731875). + +* Wed Jul 17 2013 Jan Kratochvil - 7.6-34.fc20 +- Remove --disablerepo='*' from BZ 554152 as it conflicts with BZ 981154. + +* Wed Jul 17 2013 Jan Kratochvil - 7.6-33.fc20 +- Fix yum install command output when the binary RPM is missing (BZ 981154). +- Fix the changlog entry formatting for 6.3.0.0-0.1. + +* Mon Jun 10 2013 Jan Kratochvil - 7.6-32.fc19 +- [scl] Disable Python frame filters on scl. +- Update libraries opening performance fix from upstream. +- Fix C++ lookups performance regression (Doug Evans, BZ 972677). + +* Tue May 28 2013 Jan Kratochvil - 7.6-31.fc19 +- [ppc] Backport hardware watchpoints fix (Edjunior Machado, BZ 967915). + +* Tue May 21 2013 Jan Kratochvil - 7.6-30.fc19 +- Backported Python frame filters (Phil Muldoon). +- Backported breakpoint conditions crash fix (Sergio Durigan Junior). + +* Sun May 19 2013 Jan Kratochvil - 7.6-29.fc19 +- Fix performance regression opening many libraries (Gary Benson, BZ 965106). + +* Thu May 9 2013 Jan Kratochvil - 7.6-28.fc19 +- Fix needless expansion of non-gdbindex symtabs (Doug Evans). + +* Mon May 6 2013 Jan Kratochvil - 7.6-27.fc19 +- [testsuite] [RHEL-5] Fix gdb-orphanripper.c runtime error. + +* Fri May 3 2013 Jan Kratochvil - 7.6-26.fc19 +- Fix gcore for vDSO (on ppc64). + +* Sat Apr 27 2013 Jan Kratochvil - 7.6-25.fc19 +- Fix false "Unknown error 512" on x32 (H.J. Lu, BZ 956883). + +* Fri Apr 26 2013 Jan Kratochvil - 7.6-24.fc19 +- Rebase to FSF GDB 7.6. + +* Wed Apr 24 2013 Jan Kratochvil - 7.5.91.20130423-23.fc19 +- Fix man page BuildRequires (for BZ 881892). + +* Tue Apr 23 2013 Jan Kratochvil - 7.5.91.20130423-22.fc19 +- [spec] Fix virtual bundles after GDB has been branched. + +* Tue Apr 23 2013 Jan Kratochvil - 7.5.91.20130423-21.fc19 +- Rebase to FSF GDB 7.5.91.20130423 (pre-7.6 snapshot). + +* Mon Apr 22 2013 Jan Kratochvil - 7.5.91.20130407-20.fc19 +- [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585). + +* Mon Apr 22 2013 Sergio Durigan Junior - 7.5.91.20130407-19.fc19 +- [RHEL-6] Regression test for RH BZ 947564. + +* Thu Apr 11 2013 Jan Kratochvil - 7.5.91.20130407-18.fc19 +- Provide man page for gcore.1 and gdb-add-index.1 (BZ 881892). + +* Sun Apr 7 2013 Jan Kratochvil - 7.5.91.20130407-17.fc19 +- [RHEL-5] Fix noarch doc build. + +* Sun Apr 7 2013 Jan Kratochvil - 7.5.91.20130407-16.fc19 +- Rebase to FSF GDB 7.5.91.20130407 (pre-7.6 snapshot). +- [SCL] Remove BuildRequires of gcc-go on SCL (Miroslav Franc, BZ 948982). +- Provide man page for gdbinit.5 (BZ 881892), document gdb -p in man (BZ 659000). + +* Tue Apr 2 2013 Jan Kratochvil - 7.5.91.20130402-15.fc19 +- Rebase to FSF GDB 7.5.91.20130402 (pre-7.6 snapshot). + +* Sat Mar 23 2013 Jan Kratochvil - 7.5.91.20130323-14.fc19 +- Rebase to FSF GDB 7.5.91.20130310 (pre-7.6 snapshot). +- Fix crash regression from the dlopen of libpthread.so fix (BZ 911712). + +* Mon Mar 11 2013 Jan Kratochvil - 7.5.50.20130310-13.fc19 +- [RHEL-5] Import build regression fix. + +* Sun Mar 10 2013 Jan Kratochvil - 7.5.50.20130310-12.fc19 +- Add workaround of PDF gdb-doc build (filed as RH BZ 919891). + +* Sun Mar 10 2013 Jan Kratochvil - 7.5.50.20130310-11.fc19 +- Re-enable (again) PDF in gdb-doc after texinfo RH BZ 876710 has been fixed. + +* Sun Mar 10 2013 Jan Kratochvil - 7.5.50.20130310-10.fc19 +- Rebase to FSF GDB 7.5.50.20130310 (pre-7.6 snapshot). +- Fix various entry-values sub-optimal results. + +* Mon Feb 25 2013 Jan Kratochvil - 7.5.50.20130215-9.fc19 +- testsuite: Fix gdb.arch/powerpc-power6.exp testcase (IBM, RH BZ 890900). + +* Tue Feb 19 2013 Jan Kratochvil - 7.5.50.20130215-8.fc19 +- Temporarily disable PDF in gdb-doc for still unavailable texinfo RH BZ 876710. + +* Mon Feb 18 2013 Jan Kratochvil - 7.5.50.20130215-7.fc19 +- Rebase to FSF GDB 7.5.50.20130215 (pre-7.6 snapshot). + +* Fri Feb 8 2013 Jan Kratochvil - 7.5.50.20130118-6.fc19 +- Re-enable PDF in gdb-doc after texinfo RH BZ 876710 has been fixed. + +* Mon Feb 4 2013 Jan Kratochvil - 7.5.50.20130118-5.fc19 +- Release bump only. + +* Fri Feb 1 2013 Jan Kratochvil - 7.5.50.20130118-4.fc19 +- Fix assert crashes with minidebuginfo (BZ 903522). + +* Fri Jan 25 2013 Jan Kratochvil - 7.5.50.20130118-3.fc19 +- Release bump only. + +* Mon Jan 21 2013 Jan Kratochvil - 7.5.50.20130118-2.fc19 +- [RHEL] Reintroduce gdb-6.8-quit-never-aborts.patch. + +* Sat Jan 19 2013 Jan Kratochvil - 7.5.50.20130118-1.fc19 +- Rebase to FSF GDB 7.5.50.20130118 (pre-7.6 snapshot). + +* Sun Jan 13 2013 Jan Kratochvil - 7.5.1-35.fc18 +- [testsuite] Fix gdb-orphanripper.c lockup on F-17 (/dev/pts/* glibc chown). + +* Tue Jan 8 2013 Jan Kratochvil - 7.5.1-34.fc18 +- Update dlopen to support map_failed probe of glibc (Gary Benson, BZ 886516). + +* Thu Jan 3 2013 Jan Kratochvil - 7.5.1-33.fc18 +- [ppc*] Fix PowerPC disassembly regression (Alan Modra, Edjunior Machado). + +* Thu Dec 13 2012 Jan Kratochvil - 7.5.1-32.fc18 +- 'dwz -m' parsing fix (Tom Tromey). + +* Mon Dec 3 2012 Jan Kratochvil - 7.5.1-31.fc18 +- Fix DW_OP_GNU_implicit_pointer offset bug (Tom Tromey). + +* Sun Dec 2 2012 Jan Kratochvil - 7.5.1-30.fc18 +- Temporarily disable PDF in gdb-doc before texinfo RH BZ 876710 gets fixed. + +* Thu Nov 29 2012 Jan Kratochvil - 7.5.1-29.fc18 +- Provide Source URL when it is a release. + +* Thu Nov 29 2012 Jan Kratochvil - 7.5.1-28.fc18 +- Fix (unsplit) split info doc. + +* Thu Nov 29 2012 Jan Kratochvil - 7.5.1-27.fc18 +- Rebase to FSF GDB 7.5.1 (7.5 stable branch). + +* Fri Nov 9 2012 Jan Kratochvil - 7.5.0.20120926-26.fc18 +- Fix `GDB cannot access struct member whose offset is larger than 256MB' + (RH BZ 871066). + +* Fri Oct 5 2012 Jan Kratochvil - 7.5.0.20120926-25.fc18 +- entry values: Fix resolving in inlined frames. + +* Thu Sep 27 2012 Jan Kratochvil - 7.5.0.20120926-24.fc18 +- Permit passing pointers as address number even for C++ methods (Keith Seitz). + +* Thu Sep 27 2012 Jan Kratochvil - 7.5.0.20120926-23.fc18 +- Fix crash printing classes (BZ 849357, Tom Tromey). + +* Wed Sep 26 2012 Jan Kratochvil - 7.5.0.20120926-22.fc18 +- Fix .spec 'bundled' Provides for the stable branch rebase. + +* Wed Sep 26 2012 Jan Kratochvil - 7.5.0.20120926-21.fc18 +- [ppc32] Fix stepping over symbol-less code crash regression (BZ 860696). +- Rebase to FSF GDB 7.5.0.20120926 (7.5 stable branch). + - Remove the .spec Source keyword URL as not valid now. + +* Fri Sep 14 2012 Jan Kratochvil - 7.5-20.fc18 +- [RHEL-6] Disable no longer valid workaround of man pages .gz suffix. + +* Sat Aug 18 2012 Jan Kratochvil - 7.5-19.fc18 +- Rebase to FSF GDB 7.5. +- Update dlopen to support two variants of glibc (Gary Benson, BZ 669432). + +* Fri Aug 17 2012 Jan Kratochvil - 7.4.91.20120801-18.fc18 +- Drop Source URL for snapshots. +- Separate %%{snapgnulib} from %%{snap}. +- Fix %%{libstdcxxpython} to be %%{name}-prefixed. +- Fix debug info for go-exp.y and go-exp.c. +- Include RHEL-5 compatible %%{buildroot} cleanup. +- Use %%__global_ldflags. + +* Wed Aug 1 2012 Jan Kratochvil - 7.4.91.20120801-17.fc18 +- Rebase to FSF GDB 7.4.91.20120801. +- [dwz] Rebase it from FSF GDB HEAD. + +* Thu Jul 19 2012 Fedora Release Engineering - 7.4.50.20120714-16.fc18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 16 2012 Jan Kratochvil - 7.4.50.20120714-15.fc18 +- [devtoolset] Include Obsoletes of devtoolset-1.0-* by devtoolset-1.1-*. + +* Sun Jul 15 2012 Jan Kratochvil - 7.4.50.20120714-14.fc18 +- Rebase to FSF GDB 7.4.50.20120714. + - Fix entryval feature crash on some .debug files optimized by dwz (BZ 839596). +- Fix another stale frame_info * (PR 11914, like PR 13866). + +* Fri Jul 6 2012 Jan Kratochvil - 7.4.50.20120703-13.fc18 +- [RHEL] Disable MiniDebugInfo F-18 feature on RHEL <= 6 (BZ 834068). + +* Fri Jul 6 2012 Jan Kratochvil - 7.4.50.20120703-12.fc18 +- Fix .spec metadata for the MiniDebugInfo F-18 feature (BZ 834068). + +* Fri Jul 6 2012 Jan Kratochvil - 7.4.50.20120703-11.fc18 +- [archer-tromey-dwz-multifile-rebase] Fix DWARF files reading (Tom Tromey). + +* Fri Jul 6 2012 Jan Kratochvil - 7.4.50.20120703-10.fc18 +- Fix build-id-core-loads internal error (BZ 837870). + +* Thu Jul 5 2012 Jan Kratochvil - 7.4.50.20120703-9.fc18 +- Implement MiniDebugInfo F-18 Feature consumer (Alexander Larsson, BZ 834068). + +* Tue Jul 3 2012 Jan Kratochvil - 7.4.50.20120703-8.fc18 +- Rebase to FSF GDB 7.4.50.20120703. +- [archer-tromey-dwz-multifile-rebase] Merge new branch (Tom Tromey). +- [arm] <--with testsuite>: Disable fpc BuildRequires as it is not yet built. +- Revert function returning pointer fix (PR 9514) regressing Fedora errno patch. + +* Thu Jun 21 2012 Sergio Durigan Junior - 7.4.50.20120603-7.fc18 +- Include testcase for BZ 818343. + +* Tue Jun 19 2012 Jan Kratochvil - 7.4.50.20120603-6.fc18 +- Fix regression of undisplayed missing shared libraries caused by a fix for: + GNU/Linux core open: Can't read pathname for load map: Input/output error. + +* Sun Jun 17 2012 Sergio Durigan Junior - 7.4.50.20120603-5.fc18 +- Include testcase for BZ 823789. + +* Thu Jun 14 2012 Jan Kratochvil - 7.4.50.20120603-4.fc18 +- Support DW_OP_GNU_parameter_ref for -O2 -g inferiors (BZ 827375). + +* Wed Jun 6 2012 Jan Kratochvil - 7.4.50.20120603-3.fc18 +- Disable -lmcheck in the development builds. +- Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans). + +* Sun Jun 3 2012 Jan Kratochvil - 7.4.50.20120603-2.fc18 +- Fix Release. +- Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg. + +* Sun Jun 3 2012 Jan Kratochvil - 7.4.50.20120602-1.fc18 +- Rebase to FSF GDB 7.4.50.20120602. +- [testsuite] BuildRequire gcc-go. +- Drop printing 2D C++ vectors as matrices which no longer worked (BZ 562763). +- Fix dejagnu-1.5-4.fc17 compatibility for Go (for BZ 635651). +- Use librpm.so.3 for rpm-4.10.0 in Fedora 18. +- Revert recent breakage of UNIX objfiles order for symbols lookup. + +* Sat Jun 2 2012 Jan Kratochvil - 7.4.50.20120120-48.fc17 +- [ppc] Fix hardware watchpoints on PowerPC (BZ 827600, Edjunior Machado). + +* Mon May 28 2012 Jan Kratochvil - 7.4.50.20120120-47.fc17 +- Workaround PR libc/14166 for inferior calls of strstr. + +* Mon May 14 2012 Jan Kratochvil - 7.4.50.20120120-46.fc17 +- [RHEL5] Workaround doc build race. + +* Mon May 14 2012 Jan Kratochvil - 7.4.50.20120120-45.fc17 +- Rename "set auto-load" patchset variable $ddir to $datadir. + +* Wed May 9 2012 Jan Kratochvil - 7.4.50.20120120-44.fc17 +- Fix in "set auto-load" patchset for SCL scripts inheritance (BZ 815910). + +* Wed Apr 25 2012 Jan Kratochvil - 7.4.50.20120120-43.fc17 +- [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382). + +* Tue Apr 24 2012 Jan Kratochvil - 7.4.50.20120120-42.fc17 +- Update "set auto-load" patchset and the --with-auto-load-safe-path setting. +- [RHEL] Disable gdb-add-index even on RHEL-6 as RHEL-6.0 had too old elfutils. + +* Wed Apr 18 2012 Jan Kratochvil - 7.4.50.20120120-41.fc17 +- [RHEL] Fix --with-auto-load-safe-path systems prior to /usr move. + +* Wed Apr 18 2012 Jan Kratochvil - 7.4.50.20120120-40.fc17 +- Security fix for loading untrusted inferiors, see "set auto-load" (BZ 756117). + +* Fri Apr 13 2012 Jan Kratochvil - 7.4.50.20120120-39.fc17 +- [RHEL7] Fix/remove readline-devel BuildRequires redundant distro suffic .fc17. + +* Wed Apr 4 2012 Jan Kratochvil - 7.4.50.20120120-38.fc17 +- Workaround crashes from stale frame_info pointer (BZ 804256). + +* Wed Apr 4 2012 Jan Kratochvil - 7.4.50.20120120-37.fc17 +- testsuite: Fix break-interp.exp expections for updated glibc (BZ 752834). + +* Wed Apr 4 2012 Jan Kratochvil - 7.4.50.20120120-36.fc17 +- [RHEL5,RHEL6] Reintroduce fix attaching to stopped processes. + +* Fri Mar 30 2012 Jan Kratochvil - 7.4.50.20120120-35.fc17 +- Fix performance regressions with .gdb_index (Tom Tromey, BZ 805274). + +* Fri Mar 30 2012 Jan Kratochvil - 7.4.50.20120120-34.fc17 +- Fixup %%{_datadir}/gdb timestamps for multilib conflicts on RHELs. + +* Mon Mar 26 2012 Jan Kratochvil - 7.4.50.20120120-33.fc17 +- [vla] Fix regression on no type for subrange from IBM XLF Fortran (BZ 806920). + +* Sat Mar 17 2012 Jan Kratochvil - 7.4.50.20120120-32.fc17 +- Fix loading of core files without build-ids but with build-ids in executables. + +* Fri Mar 9 2012 Jan Kratochvil - 7.4.50.20120120-31.fc17 +- Fix an implied regression by the inferior calls fix below (BZ 799531). + +* Fri Mar 9 2012 Jan Kratochvil - 7.4.50.20120120-30.fc17 +- Fix SELinux deny_ptrace .spec build rules (BZ 786878). + +* Tue Mar 6 2012 Jan Kratochvil - 7.4.50.20120120-29.fc17 +- Fix inferior calls, particularly uncaught thrown exceptions (BZ 799531). +- Fix DWARF DIEs CU vs. section relative offsets (Joel Brobecker, me). + +* Tue Mar 6 2012 Jan Kratochvil - 7.4.50.20120120-28.fc17 +- Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878). + +* Sun Mar 4 2012 Jan Kratochvil - 7.4.50.20120120-27.fc17 +- [rhel5] Fix up the previous commit (BZ 799318). + +* Sun Mar 4 2012 Jan Kratochvil - 7.4.50.20120120-26.fc17 +- [rhel5] Fix up the previous commit (BZ 799318). + +* Sun Mar 4 2012 Jan Kratochvil - 7.4.50.20120120-25.fc17 +- [rhel5] Workaround rpmbuild to make the doc subpkg noarch again (BZ 799318). + +* Fri Mar 2 2012 Jan Kratochvil - 7.4.50.20120120-24.fc17 +- [vla] Fix crash for dynamic.exp with gcc-gfortran-4.1.2-51.el5.x86_64. +- Reintroduce RHEL-5 glibc workaround for bt-clone-stop.exp. +- testsuite: Update/fix rh634108-solib_address.exp for the upstreamed API. + +* Wed Feb 29 2012 Jan Kratochvil - 7.4.50.20120120-23.fc17 +- Add kernel vDSO workaround (`no loadable ...') on RHEL-5 (kernel BZ 765875). +- Fix skipping of prologues on RHEL-5 gcc-4.1 -O2 -g code (BZ 797889). +- Fix breakpoint warning during 'next' over exit() (Tom Tromey, BZ 797892). + +* Tue Feb 28 2012 Jan Kratochvil - 7.4.50.20120120-22.fc17 +- testsuite: Fix gdb.base/macscp.exp ccache workaround in SCL mode. +- Adjust the RHEL/F version string automatically (BZ 797651, BZ 797646). +- Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). + +* Fri Feb 24 2012 Jan Kratochvil - 7.4.50.20120120-21.fc17 +- testsuite: Do not use gcc44/gfortran44 on RHEL-5 if in SCL mode. + +* Wed Feb 22 2012 Jan Kratochvil - 7.4.50.20120120-20.fc17 +- Fix libinproctrace.so build on RHEL-5 i386 (disable it on RHEL-5). + +* Wed Feb 22 2012 Jan Kratochvil - 7.4.50.20120120-19.fc17 +- Implement SCL (scl-utils-build) macros. + +* Tue Feb 21 2012 Jan Kratochvil - 7.4.50.20120120-18.fc17 +- Fix debuginfo gdb-gdb.py build without redhat-rpm-config and on RHEL-5. +- Provide precompiled variants of gdb-gdb.py. + +* Mon Feb 13 2012 Jan Kratochvil - 7.4.50.20120120-17.fc17 +- gstack: Turn off --readnever (suggested by Oliver Henshaw). + +* Fri Feb 10 2012 Jan Kratochvil - 7.4.50.20120120-16.fc17 +- [RHELs] Drop simulation of legacy behavior - new GDB should behave as new GDB. + +* Fri Feb 10 2012 Jan Kratochvil - 7.4.50.20120120-15.fc17 +- Simplify %%setup .spec rule. + +* Fri Feb 10 2012 Jan Kratochvil - 7.4.50.20120120-14.fc17 +- Drop --with upstream .spec rules. + +* Fri Feb 10 2012 Jan Kratochvil - 7.4.50.20120120-13.fc17 +- Drop --with debug .spec rules. + +* Thu Feb 9 2012 Jan Kratochvil - 7.4.50.20120120-12.fc17 +- Improve performance for C++ symbols expansion (Tom Tromey, BZ 787487). +- Install also gdb-gdb.py pretty printers. + +* Thu Feb 9 2012 Jan Kratochvil - 7.4.50.20120120-11.fc17 +- Fix possible NULL crash in find_charset_names (Tom Tromey, BZ 786091). +- [ppc*] Fix build failure due to GCC aliasing warning (BZ 786504). + +* Sat Jan 21 2012 Jan Kratochvil - 7.4.50.20120120-10.fc17 +- Rebase to FSF GDB 7.4.50.20120120. +- Drop the g77 .spec provisioning as it has been fixed in FSF GDB. + +* Thu Jan 19 2012 Jan Kratochvil - 7.4.50.20120103-9.fc17 +- Enable smaller %%{_bindir}/gdb in future by no longer using -rdynamic. +- Make --enablerepo to use '*-debug*' for RHEL compatibility (BZ 781571). +- On older RHELs make readline bundled again (BZ 701131). +- Fix build compatibility with RHEL-5 due to false noarch build. + +* Wed Jan 11 2012 Jan Kratochvil - 7.4.50.20120103-8.fc17 +- Disable unexpected GDB directories relocatability. + +* Wed Jan 11 2012 Jan Kratochvil - 7.4.50.20120103-7.fc17 +- Fix BuildRequires for RHEL compatibility (BZ 701131). + +* Wed Jan 11 2012 Jan Kratochvil - 7.4.50.20120103-6.fc17 +- Provide %%snap timestamp for: Provides: bundled(librarypackage) +- Replace %%define by %%global. +- Replace Java in Summary with Fortran (only GCC-compiled Java is supported). +- Unbundle readline-6.2 with a workaround of skipped "ask" (BZ 701131). +- Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131). + +* Sat Jan 7 2012 Jan Kratochvil - 7.4.50.20120103-5.fc17 +- Mark %%{_sysconfdir}/gdbinit as %%config(noreplace). +- Add appropriate: Provides: bundled(librarypackage). +- Remove excessive explicit Requires: librarypackage. + +* Thu Jan 5 2012 Jan Kratochvil - 7.4.50.20120103-4.fc17 +- Fix linking on non-x86* (such as s390*) after libgdb.a removal. + +* Wed Jan 4 2012 Jan Kratochvil - 7.4.50.20120103-3.fc17 +- Reinclude gdb-dlopen-stap-probe.patch (missing in Fedora glibc - BZ 752476). + +* Tue Jan 3 2012 Jan Kratochvil - 7.4.50.20120103-2.fc17 +- Fix SystemTap support regression on i686 (Sergio Durigan Junior). + +* Tue Jan 3 2012 Jan Kratochvil - 7.4.50.20120103-1.fc17 +- Rebase to FSF GDB 7.4.50.20120103. + +* Mon Nov 28 2011 Jan Kratochvil - 7.3.50.20110722-11.fc17 +- No longer build bundled libstdc++ pretty printers on RHELs >= 7. + +* Sat Nov 5 2011 Sergio Durigan Junior - 7.3.50.20110722-10.fc16 +- Backport fix for crash in cp_scan_for_anonymous_namespace + (Aleksandar Ristovski, BZ 750341). + +* Fri Oct 14 2011 Jan Kratochvil - 7.3.50.20110722-9.fc16 +- Backport `info os processes' crash fix - for Eclipse (Pedro Alves, BZ 746294). + +* Tue Oct 11 2011 Jan Kratochvil - 7.3.50.20110722-8.fc16 +- Fix PIE testsuite run; new lib/future.exp hack and use -fPIC instead of -fPIE. + +* Mon Sep 26 2011 Jan Kratochvil - 7.3.50.20110722-7.fc16 +- [vla] Fix VLA arrays displayed in `bt full' (BZ 738482). +- Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches. +- Fix internal error on some optimized-out values. + +* Tue Aug 16 2011 Jan Kratochvil - 7.3.50.20110722-6.fc16 +- Python command/function auto-loading (Phil Muldoon, BZ 730976). +- Work around PR libc/13097 "linux-vdso.so.1" warning message. +- [TUI] Fix stepi on stripped code. +- Add BuildRequires: systemtap-sdt-devel for archer-sergiodj-stap-patch-split. + +* Wed Aug 10 2011 Jan Kratochvil - 7.3.50.20110722-5.fc16 +- Fix dlopen of libpthread.so, patched glibc required (Gary Benson, BZ 669432). + +* Tue Aug 9 2011 Jan Kratochvil - 7.3.50.20110722-4.fc16 +- Improve GDB performance on inferior dlopen calls (Gary Benson, BZ 698001). +- [python] Fix crash when pretty printer fails (Phil Muldoon, BZ 712715). +- Fix crash on invalid C++ mangled names (BZ 729283). + +* Fri Jul 29 2011 Jan Kratochvil - 7.3.50.20110722-3.fc16 +- Fix regression from VLA merge affecting -O0 -g watchpoints. + +* Fri Jul 29 2011 Jan Kratochvil - 7.3.50.20110722-2.fc16 +- Include gcc -g3 .debug_macro implementation by Tom Tromey. + +* Sat Jul 23 2011 Jan Kratochvil - 7.3.50.20110722-1.fc16 +- Rebase to FSF GDB 7.3.50.20110722. +- Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471). + +* Sun Jul 3 2011 Jan Kratochvil - 7.2.90.20110703-40.fc15 +- Rebase to FSF GDB 7.2.90.20110703 (which is a 7.3 pre-release). + - Adjust the `print errno' patch due to the DW_AT_linkage_name following again. + +* Fri Jun 24 2011 Jan Kratochvil - 7.2.90.20110525-39.fc15 +- Fix install-info for the gdb-doc subpackage (BZ 715228). + +* Wed May 25 2011 Jan Kratochvil - 7.2.90.20110525-38.fc15 +- Rebase to FSF GDB 7.2.90.20110525 (which is a 7.3 pre-release). +- [stap] Fix double free (Sergio Durigan Junior). + +* Tue May 3 2011 Jan Kratochvil - 7.2.90.20110429-37.fc15 +- Search also for . files in /usr/lib/debug/.build-id (BZ 641377). + +* Mon May 2 2011 Jan Kratochvil - 7.2.90.20110429-36.fc15 +- Bundle readline-6.2 with a workaround of skipped "ask" (BZ 701131). + - Use --without-system-readline, disable Requires and BuildRequires of readline. + - Drop gdb-6.5-readline-long-line-crash.patch and gdb-readline-6.0-signal.patch. + +* Fri Apr 29 2011 Jan Kratochvil - 7.2.90.20110429-35.fc15 +- Rebase to FSF GDB 7.2.90.20110429 (which is a 7.3 pre-release). +- Fix -O2 -g breakpoints internal error + prologue skipping (BZ 612253). +- Fix case insensitive symbols for Fortran by iFort (BZ 645773). +- Fix physname-related CU expansion issue for C++ (PR 12708). +- Fix Python access to inlined frames (BZ 694824). + +* Mon Apr 11 2011 Jan Kratochvil - 7.2.90.20110411-34.fc15 +- Rebase to FSF GDB 7.2.90.20110411 (which is a 7.3 pre-release). +- Include the proper fix for anonymous struct typedefs (Tom Tromey, BZ 672230). + +* Wed Mar 30 2011 Fabio M. Di Nitto - 7.2.50.20110328-33.fc15 +- Cleanup spec file to add sparc|sparcv9|sparc64. +- Add sparc specific workarounds to toolchain badness: + - disable mmap in bdf/ via --without-mmap configure option. + - add patch to not build mmap support on sparc for gdb/. + - gdb code is NOT at fault, but we need a working gdb while we sort out + the toolchain and rebuild all packages. this workaround is NOT for upstream. + +* Tue Mar 29 2011 Jan Kratochvil - 7.2.50.20110328-32.fc15 +- Fix occasional crash on `print errno' with no -pthread and no -g3 (BZ 690908). + +* Mon Mar 28 2011 Jan Kratochvil - 7.2.50.20110328-31.fc15 +- Rebase to FSF GDB 7.2.50.20110328 (which is a 7.3 pre-release). +- Bundle %%{libstdcxxpython}.tar.bz2 unconditionally - for rebulds on RHELs. + +* Sun Mar 20 2011 Jan Kratochvil - 7.2.50.20110320-30.fc15 +- Fix threading internal error on corrupted memory (BZ 677654). +- Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866). + +* Sun Mar 20 2011 Jan Kratochvil - 7.2.50.20110320-29.fc15 +- Rebase to FSF GDB 7.2.50.20110320 (which is a 7.3 pre-release). +- Merge archer-sergiodj-stap, the SystemTap probes breakpoints feature. + - [stap] Fix -O2 warnings. +- Fix Ada support crash on uninitialized gdbarch. + +* Sat Mar 5 2011 Jan Kratochvil - 7.2.50.20110305-28.fc15 +- Rebase to FSF GDB 7.2.50.20110305 (which is a 7.3 pre-release). + +* Fri Feb 25 2011 Jan Kratochvil - 7.2.50.20110222-27.fc15 +- Include doc also in the PDF form; new BuildRequires: texinfo-tex. + +* Wed Feb 23 2011 Jan Kratochvil - 7.2.50.20110222-26.fc15 +- Rebase to FSF GDB 7.2.50.20110222 (which is a 7.3 pre-release). +- Fix attach/core-load of {,un}prelinked i386 libs (bugreport by Michal Toman). + +* Mon Feb 21 2011 Jan Kratochvil - 7.2.50.20110218-25.fc15 +- Drop %%{_datadir}/gdb/syscalls/* for unsupported arches. + +* Fri Feb 18 2011 Jan Kratochvil - 7.2.50.20110218-24.fc15 +- Rebase to FSF GDB 7.2.50.20110218 (which is a 7.3 pre-release). +- [vla] Fox Fortran vector slices for allocated arrays (for BZ 609782). + +* Tue Feb 15 2011 Jan Kratochvil - 7.2.50.20110213-23.fc15 +- Move the GFDL License to gdb-doc. + +* Tue Feb 15 2011 Jan Kratochvil - 7.2.50.20110213-22.fc15 +- Fix gdb-doc Group to be Documentation, also provide it as noarch. + +* Tue Feb 15 2011 Jan Kratochvil - 7.2.50.20110213-21.fc15 +- Drop non-user (gdbint) and obsolete (stabs) documentation. +- Install also HTML files besides the INFO file. +- Create new subpackage gdb-doc for both INFO and HTML files. + +* Sun Feb 13 2011 Jan Kratochvil - 7.2.50.20110213-20.fc15 +- Rebase to FSF GDB 7.2.50.20110213 (which is a 7.3 pre-release). +- Fix occasionall unfound source lines (affecting at least glibc debugging). +- Fix const/volatile qualifiers of C++ types (PR c++/12328). +- Be backward compatible for --rebuild with <=fc14 librpm.so.1. + +* Tue Feb 08 2011 Fedora Release Engineering - 7.2.50.20110206-19.fc15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Feb 6 2011 Jan Kratochvil - 7.2.50.20110206-18.fc15 +- Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). + +* Sun Feb 6 2011 Jan Kratochvil - 7.2.50.20110206-17.fc15 +- Rebase to FSF GDB 7.2.50.20110206 (which is a 7.3 pre-release). + +* Thu Jan 27 2011 Jan Kratochvil - 7.2.50.20110125-16.fc15 +- Fix Python new-backtrace command (BZ 672235, Phil Muldoon). + +* Wed Jan 26 2011 Jan Kratochvil - 7.2.50.20110125-15.fc15 +- Temporary fix of F15 gcc-4.6 child DIEs of DW_TAG_typedef (BZ 672230). +- Workaround gcc-4.6 stdarg false prologue end (GDB PR 12435 + GCC PR 47471). + +* Tue Jan 25 2011 Jan Kratochvil - 7.2.50.20110125-14.fc15 +- Rebase to FSF GDB 7.2.50.20110125 (which is a 7.3 pre-release). +- Fix discontiguous address ranges in .gdb_index - v3->v4 (BZ 672281). +- Fix DWARF-3+ DW_AT_accessibility default assumption for F15 gcc-4.6. + +* Thu Jan 20 2011 Jan Kratochvil - 7.2.50.20110117-13.fc15 +- Use librpm.so.2 for rpm-4.9.0 in Fedora 15. + +* Mon Jan 17 2011 Jan Kratochvil - 7.2.50.20110117-12.fc15 +- Use %%{?dist} for sanity checking tools compliance (suggested by Petr Muller). + +* Mon Jan 17 2011 Jan Kratochvil - 7.2.50.20110117-11.fc15 +- Rebase to FSF GDB 7.2.50.20110117 (which is a 7.3 pre-release). +- Fix callback-mode readline-6.0 regression for CTRL-C (for RHEL-6.0). + - Fix occasional NULL dereference of the readline-6.0 workaround (BZ 575516). + +* Sat Jan 15 2011 Jan Kratochvil - 7.2.50.20110107-10.fc15 +- [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). +- [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. +- [archer-keiths-expr-cumulative+upstream] Import C++ testcases. + - testsuite: Fix gdb-test-expr-cumulative-archer.patch compatibility. + +* Fri Jan 7 2011 Jan Kratochvil - 7.2.50.20110107-9.fc15 +- Remove --with-pythondir as no longer valid. +- Provide %%{_bindir}gdb-add-index even on RHEL-5. +- Provide again libstdc++ pretty printers for any RHEL. + +* Fri Jan 7 2011 Jan Kratochvil - 7.2.50.20110107-8.fc15 +- Rebase to FSF GDB 7.2.50.20110107 (which is a 7.3 pre-release). +- Import archer-tromey-python (BZ 666177, branch update by Phil Muldoon). + +* Tue Jan 4 2011 Jan Kratochvil - 7.2.50.20110104-7.fc15 +- Rebase to FSF GDB 7.2.50.20110104 (which is a 7.3 pre-release). +- New testcase py-prettyprint.exp:print hint_error (for BZ 611569, BZ 629236). +- New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435). + +* Sat Jan 1 2011 Jan Kratochvil - 7.2.50.20101231-6.fc15 +- Fix --with-system-readline doc build upstream regression. + +* Sat Jan 1 2011 Jan Kratochvil - 7.2.50.20101231-5.fc15 +- Rebase to FSF GDB 7.2.50.20101231 (which is a 7.3 pre-release). +- Remove gdb-6.3-bt-past-zero-20051201.patch, gdb-archer-ada.patch and + gdb-6.3-framepczero-20040927.patch already removed from .spec before. +- Remove gdb-6.5-dwarf-stack-overflow.patch, upstreamed (Tom Tromey). +- Remove gdb-6.6-bz225783-gdb-debuginfo-paths.patch, upstreamed (Tom Tromey). +- Remove gdb-6.6-readline-system.patch, reimplemented upstream (Tom Tromey). +- Remove gdb-bz642879-elfread-sigint-stale.patch, upstreamed (Jan Kratochvil). +- Remove gdb-next-over-throw.patch, upstreamed (Tom Tromey). + +* Mon Dec 27 2010 Jan Kratochvil - 7.2.50.20101117-4.fc15 +- Provide stub %%{_sysconfdir}/gdbinit (BZ 651232). + +* Mon Dec 27 2010 Jan Kratochvil - 7.2.50.20101117-3.fc15 +- Fix ppc* compilation of PRPSINFO in the core files (BZ 662995, for BZ 254229). +- Fix (disable) non-x86* compilation of libinproctrace.so (for BZ 662995). + +* Thu Nov 18 2010 Jan Kratochvil - 7.2.50.20101117-2.fc15 +- Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey). +- Drop gdb-6.3-terminal-fix-20050214.patch: The bug is not reproducible. +- Drop gdb-6.7-kernel-headers-compat.patch: kernel-headers seem to be fixed. +- Drop gdb-archer-ada.patch: No longer needed for Ada (Keith Seitz). +- New PR backtrace/12237, drop gdb-6.3-framepczero-20040927.patch + gdb-6.3-bt-past-zero-20051201.patch as they already had no effect. +- Drop gdb-6.8-gcc35998-ada-memory-trash.patch as a different fix is upstream. +- Drop gdb-6.3-inheritance-20050324.patch: the call is redundent (Tom Tromey). +- Drop gdb-6.3-large-core-20051206.patch: obsoleted by MAX_COPY_BYTES. + +* Thu Nov 18 2010 Jan Kratochvil - 7.2.50.20101117-1.fc15 +- Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release). + +* Sun Nov 7 2010 Jan Kratochvil - 7.2-25.fc14 +- iFort compat. - case insensitive DWARF not in lowercase (BZ 645773). + +* Thu Oct 14 2010 Jan Kratochvil - 7.2-24.fc14 +- Add gdb.spec comments on the *.patch files upstream merge status. + +* Thu Oct 14 2010 Jan Kratochvil - 7.2-23.fc14 +- Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). +- Fix crash on CTRL-C while reading an ELF symbol file (BZ 642879). + +* Tue Oct 12 2010 Jan Kratochvil - 7.2-22.fc14 +- testsuite: Provide missing lib/gdb-python.exp (for BZ 639089). + +* Tue Oct 12 2010 Jan Kratochvil - 7.2-21.fc14 +- Fix python stale error state, also fix its save/restore (BZ 639089). +- Fix inferior exec of new PIE x86_64 (BZ 638979). + +* Tue Oct 12 2010 Jan Kratochvil - 7.2-20.fc14 +- Fixup Release for 20.fc14. + +* Tue Oct 12 2010 Jan Kratochvil - 7.2-19.fc14 +- Use .gdb_index v3 to fix excessive resources rqmnts (BZ 640634, Tom Tromey). + +* Wed Oct 6 2010 Jan Kratochvil - 7.2-18.fc14 +- Fix false warning: non-absolute filename: (BZ 640648). + +* Thu Sep 30 2010 Jan Kratochvil - 7.2-17.fc14 +- New Conflicts: elfutils < 0.149 due to the .gdb_index .debug support. + +* Wed Sep 29 2010 Jan Kratochvil - 7.2-16.fc14 +- [ifunc] Fix crash on deleting watchpoint of an autovariable (BZ 637770). + +* Mon Sep 27 2010 Jan Kratochvil - 7.2-15.fc14 +- Revert the -O0 switch formerly to workaround GCC BZ 634757 (cmove bug). +- Remove no longer used BuildRequires: libstdc++. +- Remove commented out python libstdc++ .spec code. + +* Sat Sep 25 2010 Jan Kratochvil - 7.2-14.fc14 +- Fixup %%{_datadir}/gdb/python/gdb timestamps for multilib conflicts. + +* Sat Sep 25 2010 Jan Kratochvil - 7.2-13.fc14 +- Fix .gdb_index for big-endian hosts (Tom Tromey). + +* Sat Sep 25 2010 Jan Kratochvil - 7.2-12.fc14 +- Fix lost siginfo_t in linux-nat (BZ 592031). + +* Sat Sep 25 2010 Jan Kratochvil - 7.2-11.fc14 +- Fix infinite loop crash on self-referencing class (BZ 627432). + +* Thu Sep 23 2010 Jan Kratochvil - 7.2-10.fc14 +- gcore/-Wl,-z,relro: Always write out all the pages until kernel gets a fix. + +* Wed Sep 22 2010 Jan Kratochvil - 7.2-9.fc14 +- Fix gcore writer for -Wl,-z,relro (PR corefiles/11804). + +* Wed Sep 22 2010 Jan Kratochvil - 7.2-8.fc14 +- Enable python by default even in Brew and on all the arches (BZ 609157). + +* Wed Sep 22 2010 Jan Kratochvil - 7.2-7.fc14 +- python: load *-gdb.py for shlibs during attach (BZ 634660). +- Fix double free crash during overload resolution (PR 12028, Sami Wagiaalla). + +* Sat Sep 18 2010 Jan Kratochvil - 7.2-6.fc14 +- Fix python gdb.solib_address (BZ 634108, fix by Phil Muldoon). +- Temporarily build with -O0 to workaround GCC BZ 634757 (cmove bug). + +* Tue Sep 14 2010 Jan Kratochvil - 7.2-5.fc14 +- Fix Ada regression when any .gdb_index library is present. + +* Sat Sep 11 2010 Jan Kratochvil - 7.2-4.fc14 +- Fix symbol lookup misses methods of current class (BZ 631158, Sami Wagiaalla). +- Fix python gdb.execute-to_string redirection (BZ 627506, with Paul Bolle). + +* Wed Sep 8 2010 Jan Kratochvil - 7.2-3.fc14 +- Do not crash on broken separate debuginfo due to old elfutils (BZ 631575). + +* Sat Sep 04 2010 Dennis Gilmore - 7.2-2.fc14 +- libinproctrace doesnt exist on sparc arches + +* Fri Sep 3 2010 Jan Kratochvil - 7.2-1.fc14 +- Formal update to the final FSF GDB release. + +* Tue Aug 24 2010 Dan Horák - 7.1.90.20100806-12.fc14 +- libinproctrace doesn't exist on s390(x) + +* Thu Aug 19 2010 Jan Kratochvil - 7.1.90.20100806-11.fc14 +- Fix crash on MI variable calling inferior function (BZ 610986). + +* Tue Aug 10 2010 Jan Kratochvil - 7.1.90.20100806-10.fc14 +- Fix /usr/bin/gdb-add-index missing -nx for gdb. +- New option --with profile (disabled by default - missing workload, BZ 615603). + +* Sat Aug 7 2010 Jan Kratochvil - 7.1.90.20100806-9.fc14 +- Fix python gdb.execute to_string pagination (BZ 620930). + +* Fri Aug 6 2010 Jan Kratochvil - 7.1.90.20100806-8.fc14 +- Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248). + +* Fri Aug 6 2010 Jan Kratochvil - 7.1.90.20100806-7.fc14 +- Fix gcore from very small terminal windows (BZ 555076). +- Fix false `filesystem' debuginfo rpm request (BZ 599598). + +* Wed Jul 28 2010 Mamoru Tasaka - 7.1.90.20100721-6.fc14 +- Rebuild against python 2.7 + +* Thu Jul 22 2010 Jan Kratochvil - 7.1.90.20100721-5.fc14 +- Fix /usr/bin/gdb-add-index $d -> $dir typo. + +* Thu Jul 22 2010 Jan Kratochvil - 7.1.90.20100721-4.fc14 +- Import archer-tromey-python. +- Import archer-tromey-optional-psymtab (as present in FSF GDB post-7.2). + - Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey). + +* Thu Jul 22 2010 David Malcolm - 7.1.90.20100721-3.fc14 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Jul 21 2010 Jan Kratochvil - 7.1.90.20100721-2.fc14 +- Fix prelinked executables with sepdebug and copy relocations (BZ 614659). + +* Wed Jul 21 2010 Jan Kratochvil - 7.1.90.20100721-1.fc14 +- Rebase to FSF GDB 7.1.90.20100721 (which is 7.2 pre-release). + +* Tue Jul 13 2010 Jan Kratochvil - 7.1-29.fc14 +- Disable temporarily Python files before the new rebase is done (BZ 613710). + +* Sun Jul 11 2010 Jan Kratochvil - 7.1-28.fc14 +- Rebuild for Fedora 14. + +* Wed Jun 30 2010 Jan Kratochvil - 7.1-28.fc13 +- Print 2D C++ vectors as matrices (BZ 562763, sourceware10659, Chris Moller). + +* Wed Jun 30 2010 Jan Kratochvil - 7.1-27.fc13 +- Fix obstack corruptions on C++ (BZ 606185, Chris Moller, Jan Kratochvil). +- Improve support for typedefs in classes (BZ 602314). +- Fix `set print object on' for some non-dynamic classes (BZ 606660). + +* Wed Jun 9 2010 Jan Kratochvil - 7.1-26.fc13 +- Backport DWARF-4 support (BZ 601887, Tom Tromey). + +* Wed Jun 9 2010 Jan Kratochvil - 7.1-25.fc13 +- Fix ADL anonymous type crash (BZ 600746, Sami Wagiaalla). + +* Tue Jun 1 2010 Jan Kratochvil - 7.1-24.fc13 +- Fix crash on /proc/PID/stat race during inferior exit (BZ 596751). +- testsuite: gdb.threads/watchthreads-reorder.exp kernel-2.6.33 compat. fix. + +* Sun May 30 2010 Jan Kratochvil - 7.1-23.fc13 +- Fix and support DW_OP_*piece (Tom Tromey, BZ 589467). +- Fix follow-exec for C++ programs (bugreported by Martin Stransky). + +* Mon May 24 2010 Jan Kratochvil - 7.1-22.fc13 +- Remove core file when starting a process (BZ 594560). +- Fix lock up on loops in the solib chain (BZ 593926). +- Import fix of TUI layout internal error (BZ 595475). + +* Sun May 16 2010 Jan Kratochvil - 7.1-21.fc13 +- Make gdb-6.8-bz254229-gcore-prpsinfo.patch RHEL-5 /usr/bin/patch compatible + (bugreported by Jonas Maebe). + +* Thu May 13 2010 Jan Kratochvil - 7.1-20.fc13 +- Fix crash on VLA bound referencing an optimized-out variable (BZ 591879). +- Re-enable the BZ 575292 and BZ 585445 C++ fix using an updated patch. + +* Wed May 12 2010 Jan Kratochvil - 7.1-19.fc13 +- Backport -completion bug on anonymous structure fields (BZ 590648). +- testsuite: Fix gdb.base/vla-overflow.exp FAILing on s390x (BZ 590635). +- Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623). + +* Thu Apr 29 2010 Jan Kratochvil - 7.1-18.fc13 +- Make _Unwind_DebugHook independent from step-resume breakpoint (Tom Tromey). + +* Tue Apr 27 2010 Jan Kratochvil - 7.1-17.fc13 +- Fail gracefully if the _Unwind_DebugHook arg. is optimized out (Tom Tromey). + +* Tue Apr 27 2010 Jan Kratochvil - 7.1-16.fc13 +- Temporarily workaround the crash of BZ 575292 as there was now BZ 585445. + +* Mon Apr 26 2010 Jan Kratochvil - 7.1-15.fc13 +- Fix crash when using GNU IFUNC call from breakpoint condition. +- Avoid internal error by disabling the previous BZ 575292 fix (BZ 585445). + +* Thu Apr 22 2010 Jan Kratochvil - 7.1-14.fc13 +- Fix crash on C++ types in some debug info files (BZ 575292, Keith Seitz). +- Pretty printers not well documented (BZ 570635, Tom Tromey, Jan Kratochvil). + +* Fri Apr 16 2010 Jan Kratochvil - 7.1-13.fc13 +- archer-jankratochvil-fedora13 commit: 39998c496988faaa1509cc6ab76b5c4777659bf4 +- [vla] Fix boundaries for arrays on -O2 -g (support bound-ref->var->loclist). +- [vla] Fix copy_type_recursive for unavailable variables (Joost van der Sluis). + +* Sun Apr 11 2010 Jan Kratochvil - 7.1-12.fc13 +- Fix crash on trying to load invalid executable (BZ 581215). + +* Thu Apr 8 2010 Jan Kratochvil - 7.1-11.fc13 +- testsuite: Fix gdb.base/gstack.exp also for ppc64 inferiors (for BZ 579793). + +* Thu Apr 8 2010 Jan Kratochvil - 7.1-10.fc13 +- Fix s390 --with testsuite Buildrequiers to be (s390-32) (BZ 580347, Cai Qian). + +* Wed Apr 7 2010 Jan Kratochvil - 7.1-9.fc13 +- Fix gstack to print even the frame #0. New gdb.base/gstack.exp. (BZ 579793) +- Merge gdb-6.3-gstack-without-path-20060414.p* into gdb-6.3-gstack-20050411.p*, + no real code change. + +* Mon Apr 5 2010 Jan Kratochvil - 7.1-8.fc13 +- Fix breakpoint at *_start (BZ 162775, bugreport by John Reiser). + +* Sat Apr 3 2010 Jan Kratochvil - 7.1-7.fc13 +- Fix ppc build of the AVX registers support (for BZ 578250). + +* Sat Apr 3 2010 Jan Kratochvil - 7.1-6.fc13 +- Support AVX registers (BZ 578250). + +* Sat Apr 3 2010 Jan Kratochvil - 7.1-5.fc13 +- Fix dangling displays in separate debuginfo (BZ 574483). + +* Wed Mar 31 2010 Jan Kratochvil - 7.1-4.fc13 +- Remove gdb-readline-6.0-signal.patch with a bug causing crash while no longer + required with F-13 readline-6.1 (BZ 575516) + +* Mon Mar 29 2010 Jan Kratochvil - 7.1-3.fc13 +- [expr-cumulative] using-directive: Fix memory leak (Sami Wagiaalla). + +* Mon Mar 29 2010 Jan Kratochvil - 7.1-2.fc13 +- Drop obsoleted `gdb-archer-pie-0315-breakpoint_address_match.patch'. +- Do not consider memory error on reading _r_debug->r_map as fatal (BZ 576742). + - PIE: Attach binary even after re-prelinked underneath. + - PIE: Attach binary even after ld.so re-prelinked underneath. + - PIE: Fix occasional error attaching i686 binary (BZ 576742). +- testsuite: Fix unstable results of gdb.base/prelink.exp. + +* Thu Mar 25 2010 Jan Kratochvil - 7.1-1.fc13 +- Update to new FSF GDB release. + +* Mon Mar 15 2010 Jan Kratochvil - 7.0.90.20100312-24.fc13 +- Drop gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch having false symbols + resolving (related to BZ 573277). + +* Fri Mar 12 2010 Jan Kratochvil - 7.0.90.20100312-23.fc13 +- Update to new FSF GDB snapshot. +- Fix double-free on std::terminate handler (Tom Tromey, BZ 562975). + +* Wed Mar 10 2010 Jan Kratochvil - 7.0.90.20100306-22.fc13 +- Another License update. + +* Wed Mar 10 2010 Jan Kratochvil - 7.0.90.20100306-21.fc13 +- Update License for all the licenses contained in .src.rpm. + +* Mon Mar 8 2010 Jan Kratochvil - 7.0.90.20100306-20.fc13 +- Remove unapplied: gdb-6.8-inlining-addon.patch gdb-6.8-inlining-by-name.patch + +* Mon Mar 8 2010 Jan Kratochvil - 7.0.90.20100306-19.fc13 +- Include also %%doc COPYING3 (review by Petr Machata). +- Remove URL for Source (review by Matej Cepl). + +* Sun Mar 7 2010 Jan Kratochvil - 7.0.90.20100306-18.fc13 +- archer-jankratochvil-fedora13 commit: 59c35a31f0981a0f0b884b32c91ae6325b2126cd + +* Sun Feb 28 2010 Jan Kratochvil - 7.0.50.20100203-17.fc13 +- Fix false warning: section .gnu.liblist not found in ... +- Fix crash on stale addrinfo->sectindex (more sensitive due to the PIE patch). + +* Fri Feb 26 2010 Jan Kratochvil - 7.0.50.20100203-16.fc13 +- Fix ia64 part of the bt-clone-stop.exp fix. +- Fix gdb.ada/* regressions (Keith Seitz). +- Remove false gdb_assert on $sp underflow. + +* Mon Feb 8 2010 Jan Kratochvil - 7.0.50.20100203-15.fc13 +- Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866). + +* Wed Feb 3 2010 Jan Kratochvil - 7.0.50.20100203-14.fc13 +- Rediff gdb-6.8-bz254229-gcore-prpsinfo.patch for older patch(1) compatibility. + +* Wed Feb 3 2010 Jan Kratochvil - 7.0.50.20100203-13.fc13 +- archer-jankratochvil-fedora13 commit: 59c35a31f0981a0f0b884b32c91ae6325b2126cd +- Fortran: Fix regression on setting breakpoint at toplevel symbols (BZ 559291; + David Moore, Intel). + +* Mon Feb 1 2010 Jan Kratochvil - 7.0.50.20100128-12.fc13 +- archer-jankratochvil-fedora13 commit: 5a573e8b26a2f0a6947d4c0249e43e5456610860 +- Remove ExcludeArch on ia64 as it is now fixed up. + +* Sun Jan 31 2010 Jan Kratochvil - 7.0.50.20100128-11.fc13 +- Fix failed gdb_assert due to the PIE patchset (BZ 559414). + +* Thu Jan 28 2010 Jan Kratochvil - 7.0.50.20100128-10.fc13 +- Upgrade to the FSF GDB snapshot: 7.0.50.20100128 +- archer-jankratochvil-fedora13 commit: 39c5a8b75fad3acd7204903db5dee025055a4594 + - Fix a regression on "AAA::ALPHA" test due to a merge from FSF GDB. +- Fix a regression of previous release due to false identification as core file. +- Move ifunc .patch into the GIT-managed archer-jankratochvil-fedora13 branch. +- Update gdb.pie/corefile.exp from 2007-01-26 FSF GDB commit by Andreas Schwab. + +* Mon Jan 25 2010 Jan Kratochvil - 7.0.50.20100121-9.fc13 +- Enable loading a core file just as a single argument to /usr/bin/gdb. + +* Sun Jan 24 2010 Jan Kratochvil - 7.0.50.20100121-8.fc13 +- testsuite: Fix gdb.arch/i386-bp_permanent.exp regression + +* Sun Jan 24 2010 Jan Kratochvil - 7.0.50.20100121-7.fc13 +- Update gdb.arch/powerpc-power7.exp for current binutils HEAD. + +* Fri Jan 22 2010 Jan Kratochvil - 7.0.50.20100121-6.fc13 +- Disable addon (finish) due to inline-cmds.exp: up from outer_inline2 assert. +- Fix gdb.arch/powerpc-power7.exp compatibility. + +* Fri Jan 22 2010 Jan Kratochvil - 7.0.50.20100121-5.fc13 +- Disable break-by-name on inlined functions due to a regression on parameters + of inlined functions falsely (BZ 556975 Comment 8). + +* Fri Jan 22 2010 Jan Kratochvil - 7.0.50.20100121-4.fc13 +- Adjust BuildRequires for RHELs, add ExcludeArch on ia64. +- Disable one PIE-introduced assertion on RHELs. + +* Thu Jan 21 2010 Jan Kratochvil - 7.0.50.20100121-3.fc13 +- Revert FSF GDB gdbserver tracepoints as incomplete now. + +* Thu Jan 21 2010 Jan Kratochvil - 7.0.50.20100121-2.fc13 +- archer-jankratochvil-fedora13 commit: 21e418c04290aa5d2e75543d31fe3fe5d70d6d41 +- [expr-cumulative] Fix "break expr if (cond)" regression. + +* Thu Jan 21 2010 Jan Kratochvil - 7.0.50.20100121-1.fc13 +- Upgrade to the FSF GDB snapshot: 7.0.50.20100121 +- archer-jankratochvil-fedora13 commit: ccde1530479cc966374351038057b9dda90aa251 +- [expr-cumulative] Archer branch is now included. + +* Tue Jan 19 2010 Jan Kratochvil - 7.0.50.20100118-2.fc13 +- Fix false PASS->FAIL of gdb.arch/i386-biarch-core.exp. + +* Tue Jan 19 2010 Jan Kratochvil - 7.0.50.20100118-1.fc13 +- Upgrade to the FSF GDB snapshot: 7.0.50.20100118 +- Upgrade libstdc++-v3-python to r155978 (Phil Muldoon). + +* Sat Jan 16 2010 Jan Kratochvil - 7.0.50.20100116-1.fc13 +- Upgrade to the FSF GDB snapshot: 7.0.50.20100116 +- archer-jankratochvil-fedora13 commit: 81810a20b2d2c3bf18e151de3cddfc96445b3c46 +- [expr-cumulative] Archer branch is missing in this release. +- Update rpm.org#76 workaround for rpm-4.8 using librpm.so.1. +- Dissect archer-jankratochvil-misc into Patch403...Patch408. +- Some regressions exist in this release. + +* Tue Jan 12 2010 Jan Kratochvil - 7.0.1-25.fc12 +- non-librpm missing debuginfo yumcommand now prints also --disablerepo='*' + to save some bandwidth by yum (Robin Green, BZ 554152). + +* Sun Jan 10 2010 Jan Kratochvil - 7.0.1-24.fc12 +- testsuite: BuildRequires also valgrind. + +* Fri Jan 8 2010 Jan Kratochvil - 7.0.1-23.fc12 +- Workaround missing libstdc++%%{bits_other} in Koji. + +* Fri Jan 8 2010 Jan Kratochvil - 7.0.1-22.fc12 +- Comply with new package review: + - Fix .spec Source as this is not a snapshot now. + - Convert all spaces to tabs. + - Fix missing %%defattr at %%files for gdbserver. + - Replace all hardcoded-library-path by variants of %%{_isa}. +- Include %%{_isa} for appropriate Requires and BuildRequires. + +* Thu Jan 7 2010 Jan Kratochvil - 7.0.1-21.fc12 +- [vla] Fix regression on fields of structs in internal vars (BZ 553338). +- archer-jankratochvil-fedora12 commit: 6e73988f653ba986e8742f208f17ec084292cbd5 + +* Thu Jan 7 2010 Jan Kratochvil - 7.0.1-20.fc12 +- Fix crash reading broken stabs (it377671). + +* Sun Jan 3 2010 Jan Kratochvil - 7.0.1-19.fc12 +- testsuite: Fixup false FAILs for gdb.cp/constructortest.exp. + +* Sat Jan 2 2010 Jan Kratochvil - 7.0.1-18.fc12 +- Fix regression of gdb-7.0 (from 6.8) crashing on typedefed bitfields. +- Fix related_breakpoint stale ref crash. + +* Fri Jan 1 2010 Jan Kratochvil - 7.0.1-17.fc12 +- Formal upgrade to the FSF GDB release gdb-7.0.1. + - Fix regression of gdb-7.0.1 not preserving typedef of a field. + +* Fri Jan 1 2010 Jan Kratochvil - 7.0-16.fc12 +- More RHEL-5 compatibility updates. + - Disable the build-id support by default. + - Bundle back gdbserver to the base gdb package. + - Remove bundled pstack. + - Drop the BuildRequires of rpm-devel. + +* Fri Jan 1 2010 Jan Kratochvil - 7.0-15.fc12 +- Fix error on a sw watchpoint active at function epilogue (hit on s390x). +- testsuite: Fix false MI "unknown output after running" regression. +- testsuite: Update ia64-sigtramp.exp for recent GDB. +- Implement bt-clone-stop.exp fix also for ia64. +- testsuite: Upstream condbreak.exp results stability fix (Daniel Jacobowitz). + +* Thu Dec 24 2009 Jan Kratochvil - 7.0-14.fc12 +- testsuite: Fix constructortest.exp and expand-sals.exp for gcc-4.4.2-20.fc12. + +* Mon Dec 21 2009 Jan Kratochvil - 7.0-13.fc12 +- [pie] Fix a race in testcase gdb.base/valgrind-db-attach.exp. +- Fix regression by python on ia64 due to stale current frame. +- Disable python iff RHEL-5 && (Brew || ppc64). + +* Mon Dec 21 2009 Jan Kratochvil - 7.0-12.fc12 +- Workaround build on native ppc64 host. +- More RHEL-5 compatibility updates. + - Disable warning messages new for gdb-6.8+ for RHEL-5 backward compatibility. + - Workaround RHEL-5 kernels for detaching SIGSTOPped processes (BZ 498595). + - Serialize the testsuite output to keep the order for regression checks. + - Re-enable python for all non-ppc* arches. + - More gcc44 stack exceptions when running the testsuite on RHEL-5. +- Fix backward compatibility with G++ 4.1 namespaces "::". +- Fix regression on re-setting the single ppc watchpoint slot. +- Update snapshot of FSF gdb-7.0.x branch. + - Backport fix of dcache invalidation locking up GDB on ppc64 targets. + +* Fri Dec 18 2009 Jan Kratochvil - 7.0-11.fc12 +- [pie] Fix general ppc64 regression due to a function descriptors bug. +- [pie] Fix also keeping breakpoints disabled in PIE mode. +- Import upstream -completion crash fix. +- Drop some unused patches from the repository. +- More RHEL-5 build compatibility updates. + - Use gfortran44 when running the testsuite on RHEL-5. + - Disable python there due to insufficient ppc multilib. +- Fix orphanripper hangs and thus enable it again. + +* Mon Dec 14 2009 Jan Kratochvil - 7.0-10.fc12 +- Make gdb-6.3-rh-testversion-20041202.patch to accept both RHEL and Fedora GDB. +- Adjust BuildRequires for Fedora-12, RHEL-6 and RHEL-5 builds. +- [vla] Fix compatibility of dynamic arrays with iFort (BZ 514287). +- Fix stepping through OMP parallel Fortran sections (BZ 533176). +- New fix of bp conditionals [bp_location-accel] regression (BZ 538626). + +* Mon Dec 7 2009 Jan Kratochvil - 7.0-9.fc12 +- Replace the PIE (Position Indepdent Executable) support patch by a new one. +- Drop gdb-6.3-nonthreaded-wp-20050117.patch as fuzzy + redundant. +- Fix callback-mode readline-6.0 regression for CTRL-C. +- Fix syscall restarts for amd64->i386 biarch. +- Various testsuite results stability fixes. +- Fix crash on reading stabs on 64bit (BZ 537837). +- archer-jankratochvil-fedora12 commit: 16276c1aad1366b92e687c72cab30192280e1906 +- archer-jankratochvil-pie-fedora12 ct: 2ae60b5156d43aabfe5757940eaf7b4370fb05d2 + +* Thu Dec 3 2009 Jan Kratochvil - 7.0-8.fc12 +- Fix slowness/hang when printing some variables (Sami Wagiaalla, BZ 541093). +- archer-jankratochvil-fedora12 commit: 6817a81cd411acc9579f04dcc105e9bce72859ff + +* Wed Nov 25 2009 Jan Kratochvil - 7.0-7.fc12 +- Support GNU IFUNCs - indirect functions (BZ 539590). +- Fix bp conditionals [bp_location-accel] regression (Phil Muldoon, BZ 538626). +- Fix missed breakpoint location [bp_location-accel] regression (upstream). + +* Fri Oct 30 2009 Jan Kratochvil - 7.0-6 +- Fix missing zlib-devel BuildRequires to support compressed DWARF sections. +- Include post-7.0 FSF GDB fixes. + +* Fri Oct 23 2009 Jan Kratochvil - 7.0-5 +- Make the package buildable on RHEL-5/CentOS-5 (without librpm there). +- archer-jankratochvil-fedora12 commit: 5b73ea6a0f74e63db3b504792fc1d37f548bdf5c + +* Fri Oct 23 2009 Jan Kratochvil - 7.0-4 +- Fix rpm --excludedocs (BZ 515998). + +* Thu Oct 22 2009 Jan Kratochvil - 7.0-3 +- Support multiple directories for `set debug-file-directory' (BZ 528668). + +* Mon Oct 19 2009 Jan Kratochvil - 7.0-2 +- Sync the .spec with RHEL/CentOS without EPEL, do not BuildRequires: fpc there. + +* Wed Oct 7 2009 Jan Kratochvil - 7.0-1 +- Formal upgrade to the final FSF GDB release gdb-7.0. +- Fix GNU/Linux core open: Can't read pathname for load map: Input/output error. +- archer-jankratochvil-fedora12 commit: ce4ead356654b951a49ca78d81ebfff95e758bf5 + +* Wed Sep 30 2009 Jan Kratochvil - 6.8.91.20090930-2 +- Bump release. + +* Wed Sep 30 2009 Jan Kratochvil - 6.8.91.20090930-1 +- Fix broken python "help()" command "modules" (BZ 526552). +- Upgrade to the FSF GDB gdb-7.0 snapshot: 6.8.91.20090930 +- archer-jankratochvil-fedora12 commit: 7cb860f03e2437c97239334ebe240d06f45723e0 + +* Sun Sep 27 2009 Jan Kratochvil - 6.8.91.20090925-3 +- New test for step-resume breakpoint placed in multiple threads at once. + +* Fri Sep 25 2009 Jan Kratochvil - 6.8.91.20090925-2 +- Fix buildid-loading libs w/matching name but different build-id (BZ 524572). + +* Fri Sep 25 2009 Jan Kratochvil - 6.8.91.20090925-1 +- Upgrade to the FSF GDB gdb-7.0 snapshot: 6.8.91.20090925 +- archer-jankratochvil-fedora12 commit: 4338ea85c798007c32594032f602db9fd230eba9 + - [python] Don't directly reference self.frame (Tom Tromey). + - [expr] Updates from branch (Keith Seitz). + +* Mon Sep 21 2009 Jan Kratochvil - 6.8.91.20090921-1 +- Upgrade to the FSF GDB gdb-7.0 snapshot: 6.8.91.20090921 +- archer-jankratochvil-fedora12 commit: 0d5c38dd89050c0ee1cf049656f177c170d675d4 + - [expr] Check has_stack_frames before calling find_pc_line (Sami Wagiaalla). + +* Thu Sep 17 2009 Jan Kratochvil - 6.8.91.20090917-2 +- Include bundled libstdc++ python; it will be in libstdc++-devel since gcc-4.5. + +* Thu Sep 17 2009 Jan Kratochvil - 6.8.91.20090917-1 +- Upgrade to the FSF GDB gdb-7.0 branch and snapshot: 6.8.91.20090917 +- archer-jankratochvil-fedora12 commit: 16f3f01cc2cbc15283462eaabdfcde92cf42cdc6 +- Drop the qsort_cmp workaround as resolved in FSF GDB now (BZ 515434). + +* Thu Sep 10 2009 Jan Kratochvil - 6.8.50.20090910-1 +- Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090910 +- archer-jankratochvil-fedora12 commit: 941eb487a42933e442cb4d11344cda96ecb8a04d + - [next-over-throw] Fix exceptions thrown during next (Tom Tromey). + - [bp_location-accel] Do not (much) slow down on 500+ breakpoints (me). + +* Thu Sep 3 2009 Jan Kratochvil - 6.8.50.20090818-8 +- archer-jankratochvil-fedora12 commit: a081d2f12945e9468edd5f4341d3e945bd0fefe9 + - [expr] Fix too slow lookups in large C++ programs (Sami Wagiaalla). + - [python] Fix varobj changed values reporting (GDB PR 10584, Tom Tromey). + +* Tue Sep 1 2009 Jan Kratochvil - 6.8.50.20090818-7 +- archer-jankratochvil-fedora12 commit: d25596676e8811b03f8c9aba6bbd04ebaa9ff5db + - [call-frame-cfa] Fix parsing CFA-relative frames (BZ 516627, Tom Tromey). + - [vla] variable length Fortran strings for -O -g code (part of BZ 508406, me). + - [python] varobj + general fixes (Tom Tromey). + +* Fri Aug 28 2009 Jan Kratochvil - 6.8.50.20090818-6 +- Real upstream fixup of qsort_cmp (BZ 515434). +- Revert bitfields regression (BZ 520129). + +* Tue Aug 25 2009 Jan Kratochvil - 6.8.50.20090818-5 +- Temporarily disable assertion checks crashing in qsort_cmp (BZ 515434). + +* Wed Aug 19 2009 Jan Kratochvil - 6.8.50.20090818-4 +- Fixup "bad type" internal error, import from FSF GDB. +- archer-jankratochvil-fedora12 commit: 2ba2bc451eb832182ef84c3934115de7a329da7c + +* Tue Aug 18 2009 Jan Kratochvil - 6.8.50.20090818-3 +- archer-jankratochvil-fedora12 commit: 850e3cb38a25cb7fdfa4cef667626ffbde51bcac +- Fix the hardware watchpoints. + +* Tue Aug 18 2009 Jan Kratochvil - 6.8.50.20090818-2 +- Fix patch fuzz 0. + +* Tue Aug 18 2009 Jan Kratochvil - 6.8.50.20090818-1 +- Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090818 +- archer-jankratochvil-fedora12 commit: 5e0d1cc74f119391a2c3ae25ef5749fc28674f06 + +* Wed Aug 12 2009 Jan Kratochvil - 6.8.50.20090811-4 +- Fix minor regressions introduced by the rebase from F-11 (6.8.50.20090302). + +* Tue Aug 11 2009 Jan Kratochvil - 6.8.50.20090811-3 +- archer-jankratochvil-fedora12 commit: 2888fafe63889757c6fd27ccc2f25661d43fd1a4 +- Drop archer-jankratochvil-vla VAROBJ invalidate/revalidate split to fix + regressions against FSF GDB HEAD. + +* Tue Aug 11 2009 Jan Kratochvil - 6.8.50.20090811-2 +- archer-jankratochvil-fedora12 commit: 93f5e942bdcdcc376ece452c309bedabae71def9 +- Fix "can't compute CFA for this frame" (by Tom Tromey, BZ 516627). + +* Tue Aug 11 2009 Jan Kratochvil - 6.8.50.20090811-1 +- Support constant DW_AT_data_member_location by GCC PR debug/40659 (BZ 515377). +- Fix .spec URL. +- archer-jankratochvil-fedora12 commit: 81de3c6abae4f7e3738aa9bcc0ab2f8725cce252 + +* Mon Aug 10 2009 Jan Kratochvil - 6.8.50.20090810-2 +- Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090810 +- archer-jankratochvil-fedora12 commit: 93ec16e6f5000dd64d433d86674e820ed0f35b72 + +* Tue Aug 4 2009 Jan Kratochvil - 6.8.50.20090803-2 +- Drop the bundled libstdc++ python - it should be packaged on its own now. + +* Tue Aug 4 2009 Jan Kratochvil - 6.8.50.20090803-1 +- Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090803 +- archer-jankratochvil-fedora12 commit: 0222cb1f4ddd1eda32965e464cb60b1e44e110b2 + +* Fri Jul 31 2009 Jan Kratochvil - 6.8.50.20090302-42 +- Release bump only. + +* Fri Jul 31 2009 Jan Kratochvil - 6.8.50.20090302-41 +- Fix compatibility of --with-system-readline and readline-6.0+. +- Temporarily disabled orphanripper on Fedora 12. + +* Fri Jul 24 2009 Fedora Release Engineering - 6.8.50.20090302-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jul 6 2009 Jan Kratochvil - 6.8.50.20090302-39 +- testsuite: Fix multiple runs in parallel on a single host. +- testsuite: Remove the rpmbuild option: --with parallel +- testsuite: Run the testsuite with default rpm _smp_mflags. + +* Mon Jul 6 2009 Jan Kratochvil - 6.8.50.20090302-38 +- Archer update to the snapshot: 17bfc0488f54aeeb7a9e20ef3caa7e31e8e985fb +- Archer backport: de9c5190034b84b0a5fb4b98b05b304cda187700 + - [vla] Fix a crash regression on constant DW_AT_data_member_location. + +* Mon Jun 29 2009 Jan Kratochvil - 6.8.50.20090302-37 +- Replace the fix of cloned-TIDs with no pthread from upstream (BZ 471819). +- Fix a parallel testsuite runs incompatibility in gdb.base/gcore-shmid0.exp. + +* Mon Jun 29 2009 Jan Kratochvil - 6.8.50.20090302-36 +- Fix GDB crash on cloned-TIDs with no associated pthread (BZ 471819). +- Workaround rpm.org#76 rpm-devel requirement for debuginfo names (BZ 508193). + +* Mon Jun 22 2009 Jan Kratochvil - 6.8.50.20090302-35 +- Accelerate sorting blocks on reading a file (found on WebKit) (BZ 507267). + +* Mon Jun 22 2009 Jan Kratochvil - 6.8.50.20090302-34 +- Fix backtraces from core files with the executable found+loaded via build-id. + - Due to F-11 GCC no longer needlessly duplicating .eh_frame as .debug_frame. + +* Tue Jun 16 2009 Jan Kratochvil - 6.8.50.20090302-33 +- Archer update to the snapshot: 05c402a02716177c4ddd272a6e312cbd2908ed68 +- Archer backport: 05c402a02716177c4ddd272a6e312cbd2908ed68 + - Remove the [archer-pmuldoon-exception-rewind-master] branch. + - Include this functionality as a FSF GDB accepted patchset. + +* Mon Jun 15 2009 Jan Kratochvil - 6.8.50.20090302-32 +- Fix crash on pending breakpoints with PIE (position-indep.-exec.) (BZ 505943). + +* Fri Jun 12 2009 Jan Kratochvil - 6.8.50.20090302-31 +- Fix an occasional crash during printing of missing debuginfo rpms (BZ 505401). + +* Fri Jun 12 2009 Jan Kratochvil - 6.8.50.20090302-30 +- Implement DW_OP_call_frame_cfa (for recent GCC). + +* Thu Jun 11 2009 Jan Kratochvil - 6.8.50.20090302-29 +- Archer update to the snapshot: 30c13da4efe18f43ee34aa4b29bc86e1a53de548 +- Archer backport: 30c13da4efe18f43ee34aa4b29bc86e1a53de548 + - Fix dereferencing unbound C arrays (BZ 505163). + +* Wed Jun 10 2009 Jan Kratochvil - 6.8.50.20090302-28 +- Archer update to the snapshot: 000db8b7bfef8581ef099ccca8689cfddfea1be8 +- Archer backport: b8d3bea36b137effc929e02c4dadf73716cb330b + - Ignore explicit die representing global scope '::' (gcc 4.1 bug). +- Archer backport: c2d5c4a39b10994d86d8f2f90dfed769e8f216f3 + - Fix parsing DW_AT_const_value using DW_FORM_string +- Archer backport: 8d9ab68fc0955c9de6320bec2821a21e3244600d + + db41e11ae0a3aec7120ad6ce86450d838af74dd6 + - Fix Fortran modules/namespaces parsing (but no change was visible in F11). +- Archer backport: 000db8b7bfef8581ef099ccca8689cfddfea1be8 + - Fix "some Python error when displaying some C++ objects" (BZ 504356). +- testsuite: Support new rpmbuild option: --with parallel +- testsuite: gdb-orphanripper.c: Fix uninitialized `termios.c_line'. +- Fix crashes due to (missing) varobj revalidation, for VLA (for BZ 377541). +- Archer backport: 58dcda94ac5d6398f47382505e9d3d9d866d79bf + + f3de7bbd655337fe6705aeaafcc970deff3dd5d5 + - Implement Fortran modules namespaces (BZ 466118). +- Fix crash in the charset support. + +* Thu Apr 30 2009 Jan Kratochvil - 6.8.50.20090302-27 +- Fix race in the ia64 testcase `gdb-6.3-rh-testlibunwind-20041202.patch'. + +* Mon Apr 27 2009 Jan Kratochvil - 6.8.50.20090302-26 +- Support a new rpmbuild option: --without python + +* Mon Apr 27 2009 Jan Kratochvil - 6.8.50.20090302-25 +- The Koji build failures may have been by forgotten check-in of the Patch360. + +* Mon Apr 27 2009 Jan Kratochvil - 6.8.50.20090302-24 +- Another new Koji build fix attempt now by: BuildPreReq: python + +* Mon Apr 27 2009 Jan Kratochvil - 6.8.50.20090302-23 +- Fix BuildRequires for new Koji. + +* Mon Apr 27 2009 Jan Kratochvil - 6.8.50.20090302-22 +- Fix pstack/gstack cutting very long lines (BZ 497849). + +* Sun Apr 19 2009 Jan Kratochvil - 6.8.50.20090302-21 +- New test for parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187). + +* Thu Apr 16 2009 Jan Kratochvil - 6.8.50.20090302-20 +- Fix crash in the charset support. + +* Wed Apr 15 2009 Jan Kratochvil - 6.8.50.20090302-19 +- Fix crash on pretty-printer reading uninitialized std::string (BZ 495781). + +* Mon Apr 13 2009 Jan Kratochvil - 6.8.50.20090302-18 +- Archer update to the snapshot: d1fee5066408a09423621d1ebc64e6d3e248ed08 +- Archer backport: 4854339f75bdaf4b228fc35579bddbb2a1fecdc1 + - Fix Python FrameIterator. + +* Mon Apr 13 2009 Jan Kratochvil - 6.8.50.20090302-17 +- Archer update to the snapshot: 7c250ce99c90cf6097e2ec55ea0f205830979cee +- Archer backport: c14d9ab7eef43281b2052c885f89d2db96fb5f8e + - Revert a change regressing: gdb.objc/basicclass.exp +- Archer backport: ebd649b96e61a1fb481801b65d827bca998c6633 + + 1f080e897996d60ab7fde20423e2947512115667 + + 1948198702b51b31d79793fc49434b529b4e245f + + e107fb9687bb1e7f74170aa3d19c4a8f6edbb10f + + 1e012c996e121cb35053d239a46bd5dc65b0ce60 + - Update the Python API from upstream. +- Archer backport: d3c83ad5ec9f7672b87af9ad29279f459e53da11 + - Fix a Python branch crash. + +* Mon Apr 13 2009 Dennis Gilmore - 6.8.50.20090302-16 +- enable gdbserver package on sparc64 + +* Sun Apr 5 2009 Jan Kratochvil - 6.8.50.20090302-15 +- Archer update to the snapshot: 7c7c77576669d17ad5072daa47ea3a4fd954483d +- Archer backport: 7c7c77576669d17ad5072daa47ea3a4fd954483d (Peter Bergner) + - Disassemble Power7 instructions right in the default/only -Many GDB mode. + +* Sun Apr 5 2009 Jan Kratochvil - 6.8.50.20090302-14 +- Archer update to the snapshot: f6273d446ff87e50976600ba3f71b88d61043e20 +- Archer backport: f6273d446ff87e50976600ba3f71b88d61043e20 + - Use pretty-printers to print base classes inside a derived class. + +* Mon Mar 30 2009 Jan Kratochvil - 6.8.50.20090302-13 +- Archer update to the snapshot: d144a3633454046aaeae3e2c369c271834431d36 +- Archer backport: a2c49b7640ebe7ce1376902d48d5bbbee600996b + - Fixup compilation older GCCs. +- Archer backport: fe48224ce1bd22f37a7fa6d111d54c1a340392bf + - KFAIL 4 cases of: gdb.arch/powerpc-power7.exp +- Archer backport: d144a3633454046aaeae3e2c369c271834431d36 + - Fix C local extern variables (requires gcc-4.4.0-0.30). + +* Fri Mar 27 2009 Jan Kratochvil - 6.8.50.20090302-12 +- Archer update to the snapshot: 837d9879980148af05eae540d92caeb7200f1813 +- Archer backport: 8340d06295c8db80c544503458305197891e0348 + - Fixes [master] regression for Eclipse CDT testsuite. +- Archer backport: 16328456d5740917ade0a49bcecc14c4564b9a99 + - Fixes #2 [expr] compatibility with gcc-4.4 on gdb.cp/namespace-using.exp. +- Rebase [expr] on the Keith Seitz's sync with FSF GDB fixing the former merge. + +* Sun Mar 22 2009 Jan Kratochvil - 6.8.50.20090302-11 +- Archer update to the snapshot: e734ed95d296a3342d4147873c4641cea6c4d7fe +- Archer backport: 1e1d73cda98b1adda884b80e07c7b4929c175628 + - Fixes [expr] compatibility with gcc-4.4 on gdb.cp/namespace-using.exp. + +* Sun Mar 15 2009 Jan Kratochvil - 6.8.50.20090302-10 +- Archer update to the snapshot: 935f217d3367a642374bc56c6b146d376fc3edab +- Archer backport: 281278326412f9d6a3fabb8adc1d419fd7ddc7d7 + - Fix [expr] crash reading invalid DWARF C++ symbol "" (BZ 490319). + +* Thu Mar 12 2009 Jan Kratochvil - 6.8.50.20090302-9 +- Archer backport: aafe933b497eee8cfab736a10bae1a90d4bceb18 + - [python] Remove duplicate target-wide-charset parameter + +* Mon Mar 9 2009 Jan Kratochvil - 6.8.50.20090302-8 +- Archer update to the snapshot: a99e30d08ade4a2df0f943b036cd653bcd12b04d +- Fixes internal error on breaking at a multi-locations C++ caller (BZ 488572). + +* Mon Mar 9 2009 Jan Kratochvil - 6.8.50.20090302-7 +- Archer update to the snapshot: ec29855686f2a78d90ebcc63765681249bbbe808 +- Temporarily place libstdc++ pretty printers in this gdb.rpm. + +* Sat Mar 7 2009 Jan Kratochvil - 6.8.50.20090302-6 +- Archer update to the snapshot: 543fb2154d3bd551344b990b911be5c6cc703504 + - Fixes [delayed-symfile] excessive `(no debugging symbols found)' messages. + +* Sat Mar 7 2009 Jan Kratochvil - 6.8.50.20090302-5 +- Improve `gdb-6.6-buildid-locate-rpm.patch' by dlopen() (+pkg-config compat.). + +* Sat Mar 7 2009 Jan Kratochvil - 6.8.50.20090302-4 +- Split `gdb-6.6-buildid-locate.patch' to `gdb-6.6-buildid-locate-rpm.patch'. + +* Sat Mar 7 2009 Jan Kratochvil - 6.8.50.20090302-3 +- Archer update to the snapshot: 6cf16c0711e844094ab694b3d929f7bd30b49f61 +- Fix crash on the inlined functions support. +- Fix crash from the PIE support, its varobj_refresh() was called only before + varobj_invalidate() which is sufficient. +- Fix BuildRequires for the `--with testsuite' runs. +- Use the newly introduced `--with-pythondir' option. +- Remove libstdcxx [python] pretty printers (as included in libstdc++ rpm now). + +* Fri Mar 06 2009 Jesse Keating - 6.8.50.20090302-2 +- Rebuild for new rpm libs + +* Mon Mar 2 2009 Jan Kratochvil - 6.8.50.20090302-1 +- Include the Archer Project: http://sourceware.org/gdb/wiki/ProjectArcher + snapshot: 8cc3753a9aad85bf53bef54c04334c60d16cb251 + * [python] Python scripting support: http://sourceware.org/gdb/wiki/PythonGdb + * [catch-syscall] Trap and display syscalls. + * [delayed-symfile] Improve startup performance by lazily read psymtabs. + * [exception-rewind] Fix fatal C++ exceptions in an inferior function call. + * [expr] Expressions, single-quote elimination, C++ input canonicalization. + * [using-directive] C++ namespaces. + * [vla] C variable length arrays / DW_FORM_block / Fortran dynamic arrays. + * [misc] Fix debuginfoless `return' (BZ 365111), fix command-line macros for + expected GCC (BZ 479914), new testcase for valgrind (for BZ 483262), + implement `info common' for Fortran, fix Fortran logical-kind=8 (BZ 465310), + fix static variable in C++ constructors (BZ 445912), fix power7 (BZ 485319). +- Upgrade to the FSF GDB gdb-6.8.50 snapshot. +- Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187). + - Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE. + +* Tue Feb 24 2009 Fedora Release Engineering - 6.8.50.20090210-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 11 2009 Jan Kratochvil - 6.8.50.20090210-1 +- Upgrade to the FSF GDB gdb-6.8.50 snapshot. + +* Wed Feb 11 2009 Jan Kratochvil - 6.8.50.20090209-1 +- Upgrade to the FSF GDB gdb-6.8.50 snapshot. + +* Mon Feb 9 2009 Jan Kratochvil - 6.8.50.20081214-2 +- Fix crash / implement `finish' into inlined functions (BZ 479781). +- Drop the gdb.threads/attach-into-signal.exp change as obsolete. + +* Sun Dec 14 2008 Jan Kratochvil - 6.8.50.20081214-1 +- Upgrade to the upstream gdb-6.8.50 snapshot. + +* Mon Dec 1 2008 Jan Kratochvil - 6.8-33 +- Make `--with testsuite' BuildRequires properly conditional. + +* Mon Dec 1 2008 Stepan Kasal - 6.8-32 +- Remove trivial BuildRequires, use rpm macros in a few remaining places. + +* Tue Nov 18 2008 Jan Kratochvil - 6.8-31 +- Enable ia64 hardware watchpoints if created before starting inferior. + +* Sun Nov 9 2008 Jan Kratochvil - 6.8-30 +- Fix a race in the testcase `gdb.threads/step-thread-exit.exp'. + +* Sun Nov 9 2008 Jan Kratochvil - 6.8-29 +- Fix more the variable-length-arrays support (BZ 468266, feature BZ 377541). +- Integrate the `bt full' protection (for BZ 466901) into the VLA patch. + +* Thu Nov 6 2008 Jan Kratochvil - 6.8-28 +- Fix the "never terminate `bt full'" patch false GCC warning / build error. + +* Thu Nov 6 2008 Jan Kratochvil - 6.8-27 +- Fix resolving of variables at locations lists in prelinked libs (BZ 466901), + bugreported by Michal Babej. +- Never terminate `bt full' on a problem of variable resolving (for BZ 466901). + +* Thu Nov 6 2008 Jan Kratochvil - 6.8-26 +- Fix more the variable-length-arrays support (BZ 468266, feature BZ 377541). +- Fix the watchpoints conditionals. +- Fix on PPC spurious SIGTRAPs on active watchpoints. +- Fix occasional stepping lockup on many threads, seen on ia64. + +* Mon Nov 3 2008 Jan Kratochvil - 6.8-25 +- Fix the variable-length-arrays support (BZ 468266, feature BZ 377541). +- Fix the debuginfo-install suggestions for missing base packages (BZ 467901), + also update the rpm/yum code to no longer require _RPM_4_4_COMPAT. + +* Tue Sep 2 2008 Jan Kratochvil - 6.8-24 +- Fix PIE patch regression for loading binaries from valgrind (BZ 460319). + +* Thu Aug 28 2008 Jan Kratochvil - 6.8-23 +- Fix attaching to stopped processes, based on the upstream version now. + - Just kernel-2.6.25 neither upstream nor utrace work with it; 2.6.9 works. +- Fix occasional crash on a removed watchpoint. +- Fix false testcase FAILs for `gdb.pie/break.exp'. +- Fix a false warning (+a testcase FAIL) on s390x watchpoints. +- Fix a false FAIL on s390x `gdb.base/dump.exp'. + +* Wed Aug 27 2008 Jan Kratochvil - 6.8-22 +- Remove `gdb-6.3-nonthreaded-wp-20050117.patch' as obsoleted + regressing now. +- Make the GDB quit processing non-abortable to cleanup everything properly. +- Support DW_TAG_constant for Fortran in recent Fedora/RH GCCs. +- Fix crash on DW_TAG_module for Fortran in recent Fedora/RH GCCs. +- Readd resolving of bare names of constructors and destructors. +- Include various vendor testcases: + - Leftover zombie process (BZ 243845). + - Multithreaded watchpoints (`gdb.threads/watchthreads2.exp'). + - PIE testcases (`gdb.pie/*'). + - C++ contructors/destructors (`gdb.cp/constructortest.exp'). + +* Sat Aug 23 2008 Jan Kratochvil - 6.8-21 +- Fix MI debuginfo print on reloaded exec, found by Denys Vlasenko (BZ 459414). +- Extend the Fortran dynamic variables patch also for dynamic Fortran strings. + +* Wed Aug 13 2008 Jan Kratochvil - 6.8-20 +- Temporarily disable attaching to a stopped process (BZ 453688) + - To be reintroduced after a fix of the kernel BZ 454404. + +* Mon Aug 4 2008 Jan Kratochvil - 6.8-19 +- Fix `errno' printing on nonthreaded non-g3 inferiors (TLS minsym is absolute). + +* Fri Aug 1 2008 Jan Kratochvil - 6.8-18 +- Fix powerpc recent secure PLTs handling (shared library calls) (BZ 452960). +- Fix the testsuite .spec runner to run biarch also on ppc. +- Reenable testcases threadcrash.exp, chng-syms.exp, checkpoint.exp (BZ 207002). +- Fix PRPSINFO in the core files dumped by gcore (BZ 254229), reformatted patch + from Denys Vlasenko. +- Fix register assignments with no GDB stack frames, Denys Vlasenko (BZ 436037). + +* Mon Jul 14 2008 Jan Kratochvil - 6.8-17 +- Refresh the patchset with fuzz 0 (for new rpmbuild). + +* Mon Jul 14 2008 Jan Kratochvil - 6.8-16 +- Rebuild with the new rpm-4.5.90 in the buildroot. + +* Sat Jul 12 2008 Jan Kratochvil - 6.8-15 +- Temporary rpm-4.5.90 compatibility workaround by Panu Matilainen. +- Fix a regression in the constant watchpoints fix, found by Daniel Jacobowitz. +- Fix the prelink testcase for false FAILs on i386. + +* Tue Jul 8 2008 Jan Kratochvil - 6.8-14 +- Fix crash due to calling an inferior function right after a watchpoint stop. + +* Thu Jul 3 2008 Jan Kratochvil - 6.8-13 +- Support transparent debugging of inlined functions for an optimized code. + +* Fri Jun 20 2008 Jan Kratochvil - 6.8-12 +- Remove the gdb/gdbtui binaries duplicity. + +* Tue Jun 17 2008 Jan Kratochvil - 6.8-11 +- Fix the testsuite run for ia64 (where no -m64 is present). +- Test a crash on libraries missing the .text section. +- Protect development in the build tree by automatic Makefile dependencies. +- Refuse creating watchpoints of an address value, suggested by Martin Stransky. +- Disable randomization (such as by setarch -R), suggested by Jakub Jelinek. +- Fix compatibility with recent glibc headers. + +* Sun Jun 1 2008 Jan Kratochvil - 6.8-10 +- Fix crash on a watchpoint update on an inferior stop. +- Fix the s390x part of the hardware watchpoints after a fork. + +* Thu May 22 2008 Jan Kratochvil - 6.8-9 +- Fix memory trashing on binaries from GNAT/Ada (workaround GCC PR 35998). + +* Thu May 15 2008 Tom "spot" Callaway - 6.8-8 +- Silence memcpy check which returns false positive (sparc64) + +* Thu May 15 2008 Tom "spot" Callaway - 6.8-7 +- patch from DaveM for sparc/sparc64 +- touch up spec to enable sparcv9/sparc64 + +* Sat May 3 2008 Jan Kratochvil - 6.8-6 +- Fix gdb.base/gcore-shmid0.exp to be unresolved on recent kernels. +- Make the testsuite results of dfp-test.exp more stable. + +* Sun Apr 27 2008 Jan Kratochvil - 6.8-5 +- Remove the kernel VDSO workaround (`no loadable ...') (kernel BZ 312011). + +* Wed Apr 23 2008 Jan Kratochvil - 6.8-4 +- Backport fix on various forms of threads tracking across exec() (BZ 442765). +- Testsuite: Include more biarch libraries on %%{multilib_64_archs}. +- Disable the build-id warnings for the testsuite run as they cause some FAILs. +- Fix PIE support for 32bit inferiors on 64bit debugger. +- Fix trashing memory on one ada/gnat testcase. +- Make the testsuite results on ada more stable. + +* Wed Apr 16 2008 Jan Kratochvil - 6.8-3 +- Fix ia64 compilation errors (Yi Zhan, BZ 442684). +- Fix build on non-standard rpm-devel includes (Robert Scheck, BZ 442449). +- Do not run the PIE mode for the testsuite during `--with upstream'. +- Fix test of the crash on a sw watchpoint condition getting out of the scope. + +* Fri Apr 11 2008 Jan Kratochvil - 6.8-2 +- Fix a regression due to PIE of reloading a changed exec file (BZ 433410). +- Include also biarch libgcc on %%{multilib_64_archs} for the testsuite. +- Cosmetic fix of a testcase sanity breakpoint setting (part of BZ 233852). +- New test of hiding unexpected breakpoints on intentional step commands. +- New test of GCORE for shmid 0 shared memory mappings. +- New test of a crash on `focus cmd', `focus prev' commands. +- Fix a minor test race of the hardware watchpoints after the fork call. +- Test crash on a sw watchpoint condition getting out of the scope. + +* Fri Mar 28 2008 Jan Kratochvil - 6.8-1 +- Upgrade to the latest upstream final release gdb-6.8. + +* Mon Mar 10 2008 Jan Kratochvil - 6.7.50.20080227-3 +- build-id warnings integrated more with rpm and the lists of the warnings got + replaced usually by a single-line `debuginfo-install' advice. + - FIXME: Testsuite needs an update for the new pre-prompt messages. +- Fix the `--with upstream' compilation - gstack/pstack are now omitted. + +* Tue Mar 4 2008 Jan Kratochvil - 6.7.50.20080227-2 +- Drop the unused `ChangeLog.RedHat' file stubs. +- New rpm option `--with upstream' to drop the Fedora patches for testing. +- Drop some no longer valid .spec file comments. +- Include the Fortran dynamic arrays entry for changelog of 6.7.50.20080227-1. + +* Mon Mar 3 2008 Jan Kratochvil - 6.7.50.20080227-1 +- Upgrade to the upstream gdb-6.8 prerelease. +- Cleanup the leftover `.orig' files during %%prep. +- Add expat-devel check by the configure script (for the other-arch builds). +- `--with testsuite' now also BuildRequires: fpc +- Backport fix of a segfault + PIE regression since 6.7.1 on PIE executables. +- Update the printed GDB version string to be Fedora specific. +- Fix/implement the Fortran dynamic arrays support (BZ 377541). + +* Sat Mar 1 2008 Jan Kratochvil - 6.7.1-16 +- Run the full testsuite also in the `-fPIE -pie' mode. + +* Mon Feb 25 2008 Jan Kratochvil - 6.7.1-15 +- New --with parameters `testsuite' and `debug'. + - Testsuite is now run during the build only on explicit `--with testsuite'. +- Testsuite now possibly produces two outputs for the two GDB target arches. + +* Thu Feb 21 2008 Jan Kratochvil - 6.7.1-14 +- Rename `set debug build-id' as `set build-id-verbose', former level 1 moved + to level 2, default value is now 1, use `set build-id-verbose 0' now to + disable the missing separate debug filenames messages (BZ 432164). + +* Wed Feb 20 2008 Jan Kratochvil - 6.7.1-13 +- ia64 build fixes from Doug Chapman (BZ 428882). +- gdbserver separated into an extra package (BZ 405791). +- pstack obsoleted by included gstack (BZ 197020). +- Fix #include on kernel-headers-2.6.25-0.40.rc1.git2.fc9.x86_64. +- Drop the PowerPC simulator as no longer being compatible with Fedora binaries. + +* Thu Feb 7 2008 Jan Kratochvil - 6.7.1-12 +- build-id debug messages print now the library names unconditionally. + +* Thu Jan 24 2008 Jan Kratochvil - 6.7.1-11 +- Improve the text UI messages for the build-id debug files locating. + - Require now the rpm libraries. +- Fix false `(no debugging symbols found)' on `-readnever' runs. +- Extend the testcase `gdb.arch/powerpc-prologue.exp' for ppc64. + +* Sat Jan 12 2008 Jan Kratochvil - 6.7.1-10 +- Compilation fixup (-9 was never released). + +* Sat Jan 12 2008 Jan Kratochvil - 6.7.1-9 +- Fix also threaded inferiors for hardware watchpoints after the fork call. +- Test debugging statically linked threaded inferiors (BZ 239652). + - It requires recent glibc to work in this case properly. +- Testcase cleanup fixup of the gcore memory and time requirements of 6.7.1-8. + +* Thu Jan 10 2008 Jan Kratochvil - 6.7.1-8 +- Fix detaching from a threaded formerly stopped process with non-primary + thread currently active (general BZ 233852). + - Enable back again the testcases named `attachstop.exp' (no such exist now). + - Rename the testcase `gdb.threads/attachstop' to `gdb.threads/attachstop-mt'. +- Test ia64 memory leaks of the code using libunwind. +- Testcase delay increase (for BZ 247354). +- Test gcore memory and time requirements for large inferiors. + +* Mon Jan 7 2008 Jan Kratochvil - 6.7.1-7 +- Backport the gcc-4.3 compatibility -Werror fixes. +- Fix documentation on hardware watchpoints wrt multiple threads. +- Rename the patch file for BZ 235197 from its former name 234468. +- Fix the vendora testcase `attach-32.exp' affecting the other tests results. +- Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ 426600). + +* Mon Dec 10 2007 Jan Kratochvil - 6.7.1-6 +- Testsuite fixes for more stable/comparable results. + +* Sat Nov 24 2007 Jan Kratochvil - 6.7.1-5 +- Reduce the excessive gcc-* packages dependencies outside of mock/koji. + +* Fri Nov 16 2007 Jan Kratochvil - 6.7.1-4 +- Fix `errno' resolving across separate debuginfo files. +- Fix segfault on no file loaded, `set debug solib 1', `info sharedlibrary'. +- Extend the testsuite run for all the languages if %%{dist} is defined. +- Support gdb.fortran/ tests by substituting the g77 compiler by gfortran. + +* Sun Nov 4 2007 Jan Kratochvil - 6.7.1-3 +- Fix `errno' resolving on recent glibc with broken DW_AT_MIPS_linkage_name. +- Imported new test for 6.7 PPC hiding of call-volatile parameter register. + +* Sat Nov 3 2007 Jan Kratochvil - 6.7.1-2 +- Backport `Breakpoints at multiple locations' patch primarily for C++. + +* Thu Nov 1 2007 Jan Kratochvil - 6.7.1-1 +- Upgrade to GDB 6.7.1. Drop redundant patches, forward-port remaining ones. + +* Thu Nov 1 2007 Jan Kratochvil - 6.7-1 +- Upgrade to GDB 6.7. Drop redundant patches, forward-port remaining ones. +- Fix rereading of the main executable on its change. + +* Fri Oct 19 2007 Jan Kratochvil - 6.6-37 +- Fix hiding unexpected breakpoints on intentional step/next commands. +- Fix s390 compilation warning/failure due to a wrongly sized type-cast. + +* Sun Oct 14 2007 Jan Kratochvil - 6.6-36 +- Fix hardware watchpoints after inferior forks-off some process. + +* Sat Oct 13 2007 Jan Kratochvil - 6.6-35 +- Fix non-threaded watchpoints CTRL-C regression on `set follow child'. + +* Fri Oct 12 2007 Jan Kratochvil - 6.6-34 +- Fix gdbserver for threaded applications and recent glibc (BZ 328021). + +* Tue Oct 9 2007 Jan Kratochvil - 6.6-33 +- Fix debug load for sparse assembler files (such as vDSO32 for i386-on-x86_64). + +* Mon Oct 8 2007 Jan Kratochvil - 6.6-32 +- Set the breakpoints always to all the ctors/dtors variants (BZ 301701). +- Fix a TUI visual corruption due to the build-id warnings (BZ 320061). +- Fixed the kernel i386-on-x86_64 VDSO loading (producing `Lowest section in'). + +* Fri Oct 5 2007 Jan Kratochvil - 6.6-31 +- Fix address changes of the ctors/dtors breakpoints w/multiple PCs (BZ 301701). +- Delete an info doc file on `rpmbuild -bp' later rebuilt during `rpmbuild -bc'. + +* Tue Sep 25 2007 Jan Kratochvil - 6.6-30 +- Fix re-setting of the ctors/dtors breakpoints with multiple PCs (BZ 301701). +- Avoid one useless user question in the core files locator (build-id). + +* Sun Sep 23 2007 Jan Kratochvil - 6.6-29 +- Fixed the kernel VDSO loading (`warning: no loadable sections found in ...'). +- Fix the testcase for pending signals (from BZ 233852). + +* Sat Sep 22 2007 Jan Kratochvil - 6.6-28 +- Support also the `$allocate' and `$delete' ctor/dtor variants (BZ 301701). +- Fix the build compatibility with texinfo >= 4.10. +- Fix the testcase for pending signals (from BZ 233852). + +* Sun Sep 16 2007 Jan Kratochvil - 6.6-27 +- Fix attaching to stopped processes and/or pending signals. + +* Tue Aug 28 2007 Jan Kratochvil - 6.6-26 +- New fast verification whether the .debug file matches its peer (build-id). +- New locating of the matching binaries from the pure core file (build-id). + +* Fri Aug 17 2007 Jan Kratochvil - 6.6-25 +- Fixed excessive RPATH (related to BZ 228891). + +* Wed Aug 8 2007 Jan Kratochvil - 6.6-24 +- Fixed compatibility with the Rawhide glibc open(2) syscall sanity checking. +- Update the core_dump_elf_headers=1 compatibility code to the upstream variant. + +* Mon Aug 6 2007 Jan Kratochvil - 6.6-23 +- Update PPC unwinding patches to their upstream variants (BZ 140532). + +* Wed Jul 25 2007 Jesse Keating - 6.6-22 +- Rebuild for RH #249435 + +* Mon Jul 23 2007 Jan Kratochvil - 6.6-21 +- Fixed compatibility with Rawhide kernel fs.binfmt_elf.core_dump_elf_headers=1. +- .spec file updates to mostly pass RPMLINT - Fedora merge review (BZ 225783). +- Fixed testcase of the exit of a thread group leader (of BZ 247354). +- Cleanup any leftover testsuite processes as it may stuck mock(1) builds. + +* Sun Jul 8 2007 Jan Kratochvil - 6.6-20 +- Do not hang on exit of a thread group leader (BZ 247354). +- New test for upstream fix of VDSO decoding while attaching to an i386 process. +- Fixed BZ # 232014 -> 232015. + +* Thu Jul 5 2007 Jan Kratochvil - 6.6-19 +- Link with libreadline provided by the operating system. + +* Tue Jun 26 2007 Jan Kratochvil - 6.6-18 +- Fix PPC software watchpoints active while stepping atomic instr. (BZ 237572). + +* Thu Jun 21 2007 Jan Kratochvil - 6.6-17 +- Support for stepping over PPC atomic instruction sequences (BZ 237572). +- `set scheduler-locking step' is no longer enforced but it is now default. + +* Wed Jun 20 2007 Jan Kratochvil - 6.6-16 +- Fix attaching a stopped process on expected + upstream kernels (BZ 233852). + - Fix attaching during a pending signal being delivered. + +* Thu Jun 7 2007 Jan Kratochvil - 6.6-15 +- Testcase update to cover PPC Power6/DFP instructions disassembly (BZ 230000). +- Disable some known timeouting/failing testcases to reduce the build time. +- Fix crash on missing filenames debug info (BZ 242155). + +* Sat Apr 28 2007 Jan Kratochvil - 6.6-14 +- Fixup for the PPC Power6/DFP instructions disassembly (BZ 230000). +- New testcase for the GCORE buffer overflow (for BZ 238285, formerly 235753). + +* Wed Apr 25 2007 Jan Kratochvil - 6.6-13 +- Fix `gcore' command for 32bit PPC inferiors on 64bit PPC hosts (BZ 232015). + +* Wed Apr 25 2007 Jan Kratochvil - 6.6-12 +- Enable PowerPC to print 128-bit long double variables (BZ 237872). +- New testcase for gcore of 32bit inferiors on 64bit hosts. + +* Tue Apr 24 2007 Jan Kratochvil - 6.6-11 +- Package review, analysed by Ralf Corsepius (BZ 225783). + - Fix prelink(8) testcase for non-root $PATH missing `/usr/sbin' (BZ 225783). + - Fix debugging GDB itself - the compiled in source files paths (BZ 225783). + - Fix harmless GCORE stack buffer overflow, by _FORTIFY_SOURCE=2 (BZ 238285). + - Fix XML support - the build was missing `expat-devel'. + - Updated the `info' files handling by the spec file. + - Building now with the standard Fedora code protections - _FORTIFY_SOURCE=2. + - Use multiple CPUs for the build (%%{?_smp_mflags}). + - Separate testsuite run to its %%check section. + - Fix (remove) non-ASCII spec file characters. + - Remove system tools versions dumping - already present in mock build logs. + +* Sun Apr 22 2007 Jan Kratochvil - 6.6-10 +- Notify user of a child forked process being detached (BZ 235197). + +* Sun Apr 22 2007 Jan Kratochvil - 6.6-9 +- Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517). +- Fix testcase for watchpoints in threads (for BZ 237096). +- BuildRequires now `libunwind-devel' instead of the former `libunwind'. +- Use the runtime libunwind .so.7, it requires now >= 0.99-0.1.frysk20070405cvs. + +* Sat Mar 24 2007 Jan Kratochvil - 6.6-8 +- Use definition of an empty structure as it is not an opaque type (BZ 233716). +- Fixed the gdb.base/attachstop.exp testcase false 2 FAILs. + +* Thu Mar 15 2007 Jan Kratochvil - 6.6-7 +- Suggest SELinux permissions problem; no assertion failure anymore (BZ 232371). + +* Wed Mar 14 2007 Jan Kratochvil - 6.6-6 +- Fix occasional dwarf2_read_address: Corrupted DWARF expression (BZ 232353). + +* Mon Mar 12 2007 Jan Kratochvil - 6.6-5 +- Temporary support for shared libraries >2GB on 64bit hosts. (BZ 231832) + +* Sun Feb 25 2007 Jan Kratochvil - 6.6-4 +- Backport + testcase for PPC Power6/DFP instructions disassembly (BZ 230000). + +* Mon Feb 5 2007 Jan Kratochvil - 6.6-3 +- Fix a race during attaching to dying threads; backport (BZ 209445). +- Testcase of unwinding has now marked its unsolvable cases (for BZ 140532). + +* Fri Jan 26 2007 Jan Kratochvil - 6.6-2 +- Backported post gdb-6.6 release PPC `show endian' fixup. +- Fix displaying of numeric char arrays as strings (BZ 224128). +- Simplified patches by merging upstream accepted ones into a single file. + +* Sat Jan 20 2007 Jan Kratochvil - 6.6-1 +- Upgrade to GDB 6.6. Drop redundant patches, forward-port remaining ones. +- Backported post gdb-6.6 release ia64 unwinding fixups. +- Testcase for exec() from threaded program (BZ 202689). + +* Mon Jan 15 2007 Jan Kratochvil - 6.5-27 +- Fix the testsuite results broken in 6.5-26, stop invalid testsuite runs. + +* Sat Jan 13 2007 Jan Kratochvil - 6.5-26 +- Fix unwinding of non-debug (.eh_frame) PPC code, Andreas Schwab (BZ 140532). +- Fix unwinding of debug (.debug_frame) PPC code, workaround GCC (BZ 140532). +- Fix missing testsuite .log output of testcases using get_compiler_info(). + +* Fri Jan 12 2007 Jan Kratochvil - 6.5-25 +- Fix unwinding of non-CFI (w/o debuginfo) PPC code by recent GCC (BZ 140532). + +* Thu Jan 11 2007 Jan Kratochvil - 6.5-24 +- Backport readline history for input mode commands like `command' (BZ 215816). + +* Tue Jan 9 2007 Jan Kratochvil - 6.5-23 +- Find symbols properly at their original (included) file (BZ 109921). +- Remove the stuck mock(1) builds disfunctional workaround (-> mock BZ 221351). + +* Sat Dec 30 2006 Jan Kratochvil - 6.5-22 +- Fix unwinding crash on older gcj(1) code (extended CFI support) (BZ 165025). +- Include testcase for the readline history of input mode commands (BZ 215816). + +* Sat Dec 23 2006 Jan Kratochvil - 6.5-21 +- Try to reduce sideeffects of skipping ppc .so libs trampolines (BZ 218379). +- Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379). + +* Tue Dec 19 2006 Jan Kratochvil - 6.5-20 +- Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711). +- Testcase for readline segfault on excessively long hand-typed lines. + +* Tue Dec 12 2006 Jan Kratochvil - 6.5-19 +- Fix attachment also to a threaded stopped process (BZ 219118). +- Cleanup any leftover testsuite processes as it may stuck mock(1) builds. + +* Sat Nov 25 2006 Jan Kratochvil - 6.5-18 +- Fix readline history for input mode commands like `command' (BZ 215816). + +* Thu Nov 16 2006 Jan Kratochvil - 6.5-17 +- Bugfix testcase typo of gdb-6.5-16. + +* Thu Nov 16 2006 Jan Kratochvil - 6.5-16 +- Provide testcase for accessing the last address space byte. + +* Thu Nov 9 2006 Jan Kratochvil - 6.5-15 +- Fix readline segfault on excessively long hand-typed lines. + +* Thu Nov 2 2006 Jan Kratochvil - 6.5-14 +- Fix "??" resolving of symbols from (non-prelinked) debuginfo packages. +- Fix "??" resolving of symbols from overlapping functions (nanosleep(3)). +- Also disable testcase "checkpoint.exp" for a possible kernel Bug 207002. +- Provided (disabled during build) threading testsuite from BEA. + +* Sat Oct 14 2006 Jan Kratochvil - 6.5-13 +- Fix deadlock accessing last address space byte; for corrupted backtraces. + +* Sun Oct 8 2006 Jan Kratochvil - 6.5-12 +- Disabled IPv6 until its user visible syntax gets stable upstream. + +* Sun Oct 1 2006 Jan Kratochvil - 6.5-11 +- No longer disassemble invalid i386 opcodes of movQ/movA (BZ 172034). +- Simplify the IPv6 patch for gdbserver (BZ 198365). +- Suggest fixing your target architecture for gdbserver(1) (BZ 190810). +- Fix dereferencing registers for 32bit inferiors on 64bit hosts (BZ 181390). +- Fix `gcore' command for 32bit inferiors on 64bit hosts. + +* Wed Sep 27 2006 Jan Kratochvil - 6.5-10 +- Support IPv6 for gdbserver (BZ 198365). +- Temporarily disable testcase "chng-syms.exp" for a possible kernel Bug 207002. + +* Thu Sep 21 2006 Jan Kratochvil - 6.5-9 +- Fix crash on C++ symbol failing to be demangled (BZ 206813). +- Fix attach to stopped process, supersede `gdb-6.3-attach-stop-20051011.patch'. +- Fix TLS symbols resolving for objects with separate .debug file (-debuginfo). +- Fix TLS symbols resolving for shared libraries with a relative pathname. +- Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337). + +* Mon Sep 11 2006 Jan Kratochvil - 6.5-8 +- Fix gdb printf command argument using "%%p" (BZ 205551). + +* Mon Sep 4 2006 Alexandre Oliva - 6.5-7 +- Fix bug in patch for CVE-2006-4146. (BZ 203873, BZ 203880) + +* Thu Aug 24 2006 Alexandre Oliva - 6.5-6 +- Avoid overflows and underflows in dwarf expression computation stack. +(BZ 203873) + +* Thu Aug 24 2006 Alexandre Oliva - 6.5-5 +- Backport support for i386 nop memory instructions. +- Fix debuginfo addresses resolving for --emit-relocs Linux kernels +(BZ 203661, from Jan Kratochvil, like the remaining changes). +- Bugfix segv on the source display by ^X 1 (fixes Patch130, BZ +200048). +- Do not step into the PPC solib trampolines (BZ 200533). +- Fix exec() from threaded program, partial CVS backport (BZ 182116). +- Fix occasional failure to load shared libraries (BZ 146810). +- Bugfix object names completion (fixes Patch116, BZ 193763). +- Avoid crash of 'info threads' if stale threads exist (BZ 195429). +- Handle corrupted or missing location list information (BZ 196439). + +* Thu Jul 13 2006 Alexandre Oliva - 6.5-3 +- Add missing definition of multilib_64_archs for glibc-devel buildreqs. +- Backport support for .gnu.hash sections. + +* Wed Jul 12 2006 Alexandre Oliva - 6.5-2 +- BuildReq sharutils, prelink and, on multilib systems, 32-bit glibc-devel. +- Drop obsolete attach-stop patch. +- Fix testcases in threaded-watchpoints2 and step-thread-exit patches. +- Re-enable attach-pie.exp, asm-source.exp and sigstep.exp tests. + +* Tue Jul 11 2006 Alexandre Oliva - 6.5-1 +- Upgrade to GDB 6.5. Drop redundant patches, forward-port remaining +ones. Re-enable ada and objc testsuites. + +* Thu Jun 15 2006 Alexandre Oliva - 6.3.0.0-1.132 +- Require flex and bison at build time. +- Additional patch for BZ 175083, to cope with waitpid setting status +even when returning zero. + +* Wed May 31 2006 Alexandre Oliva - 6.3.0.0-1.131 +- Require gettext at build time. (BZ193366) + +* Sat May 27 2006 Alexandre Oliva - 6.3.0.0-1.130 +- Rewrite patch for BZ 175270, BZ 175083 so as to catch the exception +earlier. +- Remove too-fragile testcases from patches for CFA value and "S" +augmentation. + +* Wed May 17 2006 Alexandre Oliva - 6.3.0.0-1.129 +- Add not-automatically-generated file to fopen64 patch (BZ 191948). + +* Fri Apr 14 2006 Alexandre Oliva - 6.3.0.0-1.128 +- Avoid race conditions caused by exceptions messing with signal masks. +(BZ 175270, BZ 175083, maybe BZ 172938). +- Hardcode /bin and /usr/bin paths into gstack (BZ 179829, BZ 190548). +- Build in a subdir of the source tree instead of in a sibling directory. +- Switch to versioning scheme that uses the same base revision number +for all OSes, and uses a suffix to tell the builds apart and ensure +upgradability. + +* Thu Apr 13 2006 Stepan Kasal - 6.3.0.0-1.127 +- Bump up release number. + +* Thu Apr 13 2006 Stepan Kasal - 6.3.0.0-1.123 +- Use fopen64 where available. Fixes BZ 178796, BZ 190547. +- Use bigger numbers than int. Fixes BZ 171783, BZ 179096. + +* Wed Mar 8 2006 Alexandre Oliva - 6.3.0.0-1.122 +- Bump up release number. + +* Wed Mar 8 2006 Alexandre Oliva - 6.3.0.0-1.119 +- Fix regression in PIE debugging (BZ 133944) (re?)introduced by the +prelink fix (BZ 175075, BZ 190545). Improve testcase for the prelink +fix. +- Revert dwarf2 frame identifier change. + +* Tue Mar 7 2006 Alexandre Oliva - 6.3.0.0-1.118 +- Bump up release number. + +* Tue Mar 7 2006 Alexandre Oliva - 6.3.0.0-1.115 +- Change dwarf2 frame identifiers to use the actual PC instead of the +function's entry point. +- Fix FSF and GDB contact addresses in new testcases. +- Do not try to compile x86_64-only CFA testcase on 32-bit x86. +- Change prelink test to issue untested instead of warning message if +system libraries are not prelinked. + +* Fri Mar 3 2006 Alexandre Oliva - 6.3.0.0-1.114 +- Bump up release number. + +* Fri Mar 3 2006 Alexandre Oliva - 6.3.0.0-1.111 +- Add support for "S" augmentation for signal stack frames. +- Add support for CFA value expressions and encodings. +- Various improvements to the prelink test. + +* Thu Feb 23 2006 Alexandre Oliva - 6.3.0.0-1.110 +- Bump up release number. + +* Thu Feb 23 2006 Alexandre Oliva - 6.3.0.0-1.107 +- Enable gdb to debug core files and executables with mismatched +prelink base addresses. Fixes BZ 175075, BZ 190545. + +* Tue Feb 14 2006 Alexandre Oliva - 6.3.0.0-1.106 +- Bump up release number. + +* Tue Feb 14 2006 Alexandre Oliva - 6.3.0.0-1.103 +- Adjust type-punning patch to include fix not needed upstream. + +* Tue Feb 14 2006 Alexandre Oliva - 6.3.0.0-1.102 +- Bump up release number. + +* Tue Feb 14 2006 Alexandre Oliva - 6.3.0.0-1.99 +- Use type-punning warning fixes as accepted upstream. + +* Fri Feb 10 2006 Jesse Keating - 6.3.0.0-1.98.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 6.3.0.0-1.98.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Mon Jan 16 2006 Alexandre Oliva - 6.3.0.0-1.98 +- Bump up release number. + +* Mon Dec 19 2005 Alexandre Oliva - 6.3.0.0-1.94 +- Fix type-punning warnings issued by GCC 4.1. + +* Fri Dec 16 2005 Jesse Keating +- rebuilt for new gcj + +* Thu Dec 01 2005 Jeff Johnston - 6.3.0.0-1.93 +- Bump up release number. + +* Thu Dec 01 2005 Jeff Johnston - 6.3.0.0-1.90 +- Add option to allow backtracing past zero pc value. +- Bugzilla 170275 + +* Tue Nov 15 2005 Jeff Johnston - 6.3.0.0-1.89 +- Bump up release number. + +* Tue Nov 15 2005 Jeff Johnston - 6.3.0.0-1.86 +- Fix ia64 user-specified SIGILL handling error. +- Bugzilla 165038. + +* Tue Oct 18 2005 Jeff Johnston - 6.3.0.0-1.85 +- Bump up release number. + +* Tue Oct 18 2005 Jeff Johnston - 6.3.0.0-1.82 +- Modify attach patch to add missing fclose. +- Bugzilla 166712 + +* Tue Oct 11 2005 Jeff Johnston - 6.3.0.0-1.81 +- Bump up release number. + +* Tue Oct 11 2005 Jeff Johnston - 6.3.0.0-1.78 +- Support gdb attaching to a stopped process. + +* Thu Sep 29 2005 Jeff Johnston - 6.3.0.0-1.77 +- Bump up release number. + +* Thu Sep 29 2005 Jeff Johnston - 6.3.0.0-1.74 +- Fix up DSO read logic when process is attached. + +* Mon Sep 26 2005 Jeff Johnston - 6.3.0.0-1.73 +- Bump up release number. + +* Mon Sep 26 2005 Jeff Johnston - 6.3.0.0-1.70 +- Fix frame pointer calculation for ia64 sigtramp frame. + +* Thu Sep 22 2005 Jeff Johnston - 6.3.0.0-1.69 +- Bump up release number. + +* Thu Sep 22 2005 Jeff Johnston - 6.3.0.0-1.66 +- Remove extraneous xfree. + +* Wed Sep 07 2005 Jeff Johnston - 6.3.0.0-1.65 +- Bump up release number. + +* Wed Sep 07 2005 Jeff Johnston - 6.3.0.0-1.62 +- Readd readnever option + +* Wed Jul 27 2005 Jeff Johnston - 6.3.0.0-1.61 +- Bump up release number. + +* Tue Jul 26 2005 Jeff Johnston - 6.3.0.0-1.57 +- Bump up release number. + +* Tue Jul 26 2005 Jeff Johnston - 6.3.0.0-1.54 +- Add testcase to verify printing of inherited members +- Bugzilla 146835 + +* Mon Jul 25 2005 Jeff Johnston - 6.3.0.0-1.53 +- Bump up release number. + +* Mon Jul 25 2005 Jeff Johnston - 6.3.0.0-1.50 +- Fix bug with info frame and cursor address on ia64. +- Add testcase to verify pseudo-registers calculated for ia64 sigtramp. +- Bugzilla 160339 + +* Fri Jul 22 2005 Jeff Johnston - 6.3.0.0-1.49 +- Bump up release number. + +* Fri Jul 22 2005 Jeff Johnston - 6.3.0.0-1.46 +- Fix attaching to 32-bit processes on 64-bit systems. +- Bugzilla 160254 + +* Thu Jul 14 2005 Jeff Johnston - 6.3.0.0-1.45 +- Bump up release number. + +* Thu Jul 14 2005 Jeff Johnston - 6.3.0.0-1.42 +- Add work-around to make ia64 gcore work faster. +- Bugzilla 147436 + +* Thu Jul 14 2005 Jeff Johnston - 6.3.0.0-1.41 +- Bump up release number. + +* Mon Jul 11 2005 Jeff Johnston - 6.3.0.0-1.38 +- Fix backtracing across sigaltstack for ia64 +- Bugzilla 151741 + +* Fri Jul 08 2005 Jeff Johnston - 6.3.0.0-1.37 +- Bump up release number. + +* Fri Jul 08 2005 Jeff Johnston - 6.3.0.0-1.35 +- Build pseudo-registers properly for sigtramp frame. +- Bugzilla 160339 + +* Fri Jul 08 2005 Jeff Johnston - 6.3.0.0-1.34 +- Bump up release number. + +* Thu Jul 07 2005 Jeff Johnston - 6.3.0.0-1.31 +- Modify security errata to include additional bfd robustness updates +- Bugzilla 158680 + +* Fri Jun 10 2005 Jeff Johnston - 6.3.0.0-1.30 +- Bump up release number. + +* Fri Jun 10 2005 Jeff Johnston - 6.3.0.0-1.28 +- Security errata for bfd and .gdbinit file usage +- Bugzilla 158680 + +* Wed May 18 2005 Jeff Johnston - 6.3.0.0-1.24 +- Bump up release number. + +* Wed May 18 2005 Jeff Johnston - 6.3.0.0-1.23 +- Bump up release number. + +* Wed May 18 2005 Jeff Johnston - 6.3.0.0-1.22 +- Specify SA_RESTART for linux-nat.c handlers and use my_waitpid + which handles EINTR. + +* Tue May 03 2005 Jeff Johnston - 6.3.0.0-1.21 +- Bump up release number. + +* Tue May 03 2005 Jeff Johnston - 6.3.0.0-1.20 +- Bump up release number. + +* Tue May 03 2005 Jeff Johnston - 6.3.0.0-1.19 +- Fix for partial die in cache error +- Bugzilla 137904 + +* Wed Apr 27 2005 Jeff Johnston - 6.3.0.0-1.18 +- Bump up release number. + +* Wed Apr 27 2005 Jeff Johnston - 6.3.0.0-1.17 +- Bump up release number. + +* Wed Apr 27 2005 Jeff Johnston - 6.3.0.0-1.16 +- Update ia64 sigtramp support to use libunwind and fix top-level + rse register reads to also use libunwind. +- Bugzilla 151741 + +* Thu Apr 21 2005 Jeff Johnston - 6.3.0.0-1.15 +- Bump up release number. + +* Thu Apr 21 2005 Jeff Johnston - 6.3.0.0-1.14 +- Bump up release number. + +* Thu Apr 21 2005 Jeff Johnston - 6.3.0.0-1.13 +- Do not issue warning message for gcore under ia64 +- Bugzilla 146416 + +* Mon Apr 11 2005 Andrew Cagney - 6.3.0.0-1.12 +- Update gstack patch, handle systems that lack /proc//tasks. + +* Fri Apr 8 2005 Andrew Cagney - 6.3.0.0-1.11 +- Replace patch warning about DW_OP_piece with a patch that implements + the DW_OP_piece read path. + +* Sat Apr 2 2005 Andrew Cagney - 6.3.0.0-1.10 +- Print a warning when the separate debug info's CRC doen't match; + test. + +* Wed Mar 30 2005 Jeff Johnston - 6.3.0.0-1.9 +- Bump up release number. + +* Wed Mar 30 2005 Jeff Johnston - 6.3.0.0-1.7 +- Add proper vsyscall page support for ia64. + +* Thu Mar 24 2005 Jeff Johnston - 6.3.0.0-1.6 +- Bump up release number. + +* Thu Mar 24 2005 Jeff Johnston - 6.3.0.0-1.4 +- Fix printing of inherited members of C++ classes. +- Fix for Bugzilla 146835. + +* Tue Mar 22 2005 Jeff Johnston - 6.3.0.0-1.3 +- Bump up release number. + +* Thu Mar 17 2005 Jeff Johnston - 6.3.0.0-1.1 +- Remove warnings that cause errors when compiled with gcc4 and -Werror. + +* Wed Mar 16 2005 Elliot Lee +- rebuilt + +* Fri Mar 04 2005 Jeff Johnston - 6.3.0.0-0.37 +- Bump up release number. + +* Thu Mar 03 2005 Jeff Johnston - 6.3.0.0-0.35 +- Add follow-fork fix from mainline sources. + +* Thu Mar 03 2005 Jeff Johnston - 6.3.0.0-0.34 +- Bump up release number. + +* Mon Feb 28 2005 Jeff Johnston - 6.3.0.0-0.32 +- Modify debug register handling for x86, x86-64 to be thread-specific. +- Modify threaded watchpoint code for x86, x86-64 to properly insert + and remove watchpoints on all threads. + +* Tue Feb 22 2005 Andrew Cagney - 6.3.0.0-0.31 +- Bump version number. + +* Tue Feb 22 2005 Andrew Cagney - 6.3.0.0-0.30 +- Bump version number. + +* Tue Feb 22 2005 Andrew Cagney - 6.3.0.0-0.29 +- Modify gdb-6.3-dwattype0-20050201.patch to check for a zero address + and not zero unsnd. Fix BE 32- vs 64-bit problem. + +* Mon Feb 21 2005 Andrew Cagney - 6.3.0.0-0.28 +- Back port patch adding symfile-mem.o to all GNU/Linux builds. + Fix BZ 146087. + +* Wed Feb 16 2005 Jeff Johnston - 6.3.0.0-0.27 +- Bump up release number. + +* Wed Feb 16 2005 Jeff Johnston - 6.3.0.0-0.26 +- Fix unload.exp testcase. + +* Mon Feb 14 2005 Jeff Johnston - 6.3.0.0-0.25 +- Bump up release number. + +* Mon Feb 14 2005 Jeff Johnston - 6.3.0.0-0.24 +- Fix gdb to always grab the terminal before a readline call. +- Bugzilla 147880 + +* Fri Feb 11 2005 Jeff Johnston - 6.3.0.0-0.23 +- Bump up release number. + +* Fri Feb 11 2005 Jeff Johnston - 6.3.0.0-0.21 +- Fix gdb to handle stepping over the end of an exiting thread. +- Bugzilla 146848 + +* Thu Feb 10 2005 Jeff Johnston - 6.3.0.0-0.20 +- Bump up release number. + +* Tue Feb 08 2005 Jeff Johnston - 6.3.0.0-0.18 +- Modify previous gcore patch to not use linux_proc_xfer_memory even + for main thread. + +* Mon Feb 07 2005 Jeff Johnston - 6.3.0.0-0.17 +- Modify previous gcore patch to only apply to ia64. + +* Fri Feb 04 2005 Jeff Johnston - 6.3.0.0-0.16 +- Fix gcore to work properly for threaded applications +- Bugzilla 145309, 145092 + +* Fri Feb 04 2005 Jeff Johnston - 6.3.0.0-0.15 +- Tolerate DW_AT_type referencing <0> and instead of generating an + error, treat as unknown type. +- Bugzilla 144852. + +* Thu Feb 3 2005 Andrew Cagney - 6.3.0.0-0.14 +- Separate out test patches. + +* Thu Jan 27 2005 Jeff Johnston - 6.3.0.0-0.13 +- Fix to allow ia64 gdb to backtrace from syscalls in a corefile. +- Bugzilla 145092. + +* Wed Jan 26 2005 Jeff Johnston - 6.3.0.0-0.12 +- Fix to support examining files even when the executable moves +- Bugzilla 142122 + +* Wed Jan 26 2005 Andrew Cagney - 6.3.0.0-0.11 +- gdb-6.3-ppcdotsyms-20050126.patch: Backport BFD changes for reading + synthetic symbols. Rewrite code reading elf minimal symbols so that + it includes synthetics. + +* Fri Jan 21 2005 Jeff Johnston - 6.3.0.0-0.10 +- Fix to prevent resetting unwind kernel table size to invalid value + when debugging a core file +- Bugzilla 145309 + +* Fri Jan 21 2005 Andrew Cagney - 6.3.0.0-0.9 +- When single stepping handle both back-to-back and nested signals. +- Disable .symbol patch, results in BFD errors. + +* Fri Jan 21 2005 Jeff Johnston - 6.3.0.0-0.8 +- Support listing both in-charge and not-in-charge dtors when + just the dtor name is given. +- Add new test case for newly added ctor/dtor functionality. + +* Thu Jan 20 2005 Jeff Johnston - 6.3.0.0-0.7 +- Fix to allow breaking by line in both the in-charge and + not-in-charge ctor/dtor. +- Bugzilla 117826 + +* Thu Jan 20 2005 Andrew Cagney - 6.3.0.0-0.6 +- Rebuild. + +* Thu Jan 20 2005 Andrew Cagney - 6.3.0.0-0.5 +- Use bfd_get_synthetic_symtab to read in any synthetic symbols + such as 64-bit PPC's ".symbol"s. + +* Tue Jan 18 2005 Jeff Johnston - 6.3.0.0-0.4 +- Modify non-threaded watchpoint patch to use new observer. + +* Mon Jan 17 2005 Jeff Johnston - 6.3.0.0-0.3 +- Fix for non-threaded watchpoints. + +* Mon Jan 17 2005 Andrew Cagney - 6.3.0.0-0.2 +- Enable PPC CFI, remove merged ppc patches. + +* Wed Jan 12 2005 Elena Zannoni - 6.3.0.0-0.1 +- commit co-authors Andrew Cagney and + Jeff Johnston . +- Various fixes to complete the import and merge. + +* Wed Dec 01 2004 Andrew Cagney - 6.3.0.0 +- Import GDB 6.3, get building, add all patches. + +* Tue Nov 30 2004 Jeff Johnston - 1.200400607.63 +- When removing breakpoints, continue removing breakpoints even if an + error occurs on the list. + +* Sun Nov 28 2004 Andrew Cagney - 1.200400607.62 +- Bump version for RHEL4 build. + +* Wed Nov 24 2004 Andrew Cagney - 1.200400607.61 +- For PPC-64, fix search for a symbol (wasn't specifying the section). + +* Wed Nov 24 2004 Andrew Cagney - 1.200400607.60 +- For PPC-64, do not set malloc name to ".malloc"; no longer needed. +- For all, only define kfail when not already defined. + +* Wed Nov 24 2004 Andrew Cagney - 1.200400607.59 +- Bump version. + +* Wed Nov 24 2004 Andrew Cagney - 1.200400607.58 +- Add rs6000 reggroups; fixes problem of PS register being trashed + causing mysterious branch breakpoints. + +* Tue Nov 23 2004 Andrew Cagney - 1.200400607.57 +- Backport i386 prolog parser - better backtraces out of semop(). +- Add option --readnever to suppress the reading of symbolic debug + information. +- Add script gstack.sh, installed as gstack. + Bugzilla 136584, 137121 +- Add missing files gdb.pie/attach2.c, gdb.pie/break1.c and + gdb.pie/Makefile.in along with testsuite/configure stuff for pie. + +* Tue Nov 23 2004 Andrew Cagney - 1.200400607.57 +- Backport i386 prolog parser - better backtraces out of semop(). +- Add option --readnever to suppress the reading of symbolic debug + information. +- Add script gstack.sh, installed as gstack. + Bugzilla 136584, 137121 + +* Mon Nov 22 2004 Jeff Johnston - 1.200400607.56 +- Bump up release number. + +* Mon Nov 22 2004 Jeff Johnston - 1.200400607.55 +- Multiple ia64 backtrace fixes. Bugzilla 125157 + +* Thu Nov 11 2004 Elena Zannoni - 1.200400607.54 +- Bump up release number + +* Thu Nov 11 2004 Elena Zannoni - 1.200400607.51 +- Modify configure line to not use absolute paths. This was + creating problems with makeinfo/texinfo. +- Get rid of makeinfo hack. +Bugzilla 135633 + +* Tue Nov 09 2004 Jeff Johnston - 1.200400607.50 +- Bump up release number + +* Tue Nov 09 2004 Jeff Johnston - 1.200400607.49 +- Bump up release number + +* Tue Nov 09 2004 Jeff Johnston - 1.200400607.48 +- Expose $base, $allocate constructors and $delete, $base destructors + for breakpoints. + +* Tue Nov 09 2004 Andrew Cagney - 1.200400607.47 +- Enable PPC CFI. + +* Mon Nov 08 2004 Jeff Johnston - 1.200400607.46 +- Bump up release number + +* Mon Nov 08 2004 Jeff Johnston - 1.200400607.45 +- Bump up release number + +* Fri Nov 05 2004 Jeff Johnston - 1.200400607.44 +- Allow macros to continue past a backtrace error + +* Tue Oct 26 2004 Andrew Cagney - 1.200400607.43 +- Hack around broken PT_FPSCR defined in headers. +- Import latest s390 fixes. +- Disable sigstep.exp - s390 has problems. +- Use PC's symtab when looking for a symbol. +- Work around DW_OP_piece. + +* Fri Oct 22 2004 Andrew Cagney - 1.200400607.42 +- For 64-bit PPC, convert _dl_debug_state descriptor into a code address. +- Fix --ignore option. + +* Sun Oct 10 2004 Andrew Cagney - 1.200400607.40 +- Disable attach-pie.exp test, hangs on amd64 without auxv. +- Move pie tests to pie. + +* Sun Oct 10 2004 Andrew Cagney - 1.200400607.39 +- Fix comment bug in sigstep.exp. + +* Thu Oct 07 2004 Jeff Johnston - 1.200400607.38 +- Do not invalidate cached thread info when resuming threads. +- Bump up release number. + +* Fri Oct 01 2004 Jeff Johnston - 1.200400607.35 +- Fix S/390 watchpoint support to work better under threading. + +* Fri Oct 01 2004 Jeff Johnston - 1.200400607.34 +- Fix thread_db_get_lwp to handle 2nd format ptids. + +* Mon Sep 27 2004 Andrew Cagney - 1.200400607.33 +- Don't unwind past a zero PC (when normal frames). + +* Mon Sep 27 2004 Jeff Johnston - 1.200400607.32 +- Add threaded watchpoint support for x86, x86-64, and ia64. + +* Mon Sep 27 2004 Andrew Cagney - 1.200400607.31 +- Instead of deleting bigcore.exp, use runtest --ignore. + +* Thu Sep 23 2004 Andrew Cagney - 1.200400607.30 +- Merge in mainline testsuite up to 2004-09-23, pick up sig*.exp tests. + Merge in mainline infrun.c, pick up all infrun.c fixes. + Generate bigcore's corefile from the running inferior. + Limit bigcore's corefile to max file-size. + +* Thu Sep 02 2004 Jeff Johnston - 1.200400607.29 +- Fix low-level lin-lwp code to wait specifically for any stepping + LWP (bugzilla 130896) + +* Tue Aug 31 2004 Jeff Johnston - 1.200400607.28 +- Add test case for bugzilla 128618 fix. + +* Mon Aug 30 2004 Jeff Johnston - 1.200400607.27 +- Add support for breakpoints in manually loaded/unloaded shared libs. + (bugzilla 128618) + +* Mon Aug 30 2004 Jeff Johnston - 1.200400607.26 +- Add java inferior call support. + +* Mon Aug 30 2004 Andrew Cagney - 1.200400607.25 +- Convert "main" the function descriptor, into an address. + +* Mon Aug 30 2004 Andrew Cagney - 1.200400607.24 +- Fix single-stepping when a signal is pending, was exiting program. + -- needs kernel fix so that ptrace(PT_STEP,SIG) doesn't do a PT_CONT. + -- sigstep.exp tests pass with this fix applied. + +* Mon Aug 30 2004 Elena Zannoni - 1.200400607.23 +- Delete some part of gdb-6.1post-test-rh.patch, to avoid confusing + gdb when testing itself, and loading separate debug info. + +* Fri Aug 13 2004 Jeff Johnston - 1.200400607.22 +- Check in gdb mainline fix for applications calling clone directly. + +* Tue Aug 10 2004 Jeff Johnston - 1.200400607.21 +- Alter libunwind frame code to allow using libunwind 0.97 and up. + +* Tue Aug 03 2004 Jeff Johnston - 1.200400607.20 +- Fix the ia64 libunwind test to match current output. + +* Fri Jul 30 2004 Elena Zannoni - 1.200400607.19 +- Fix the tests where gdb debugs itself, as to not copy + the executable to xgdb. + +* Mon Jul 26 2004 Elena Zannoni - 1.200400607.18 +- Add Pie patches back in. + +* Fri Jul 16 2004 Andrew Cagney - 1.200400607.17 +- Fix stepping over a no-debug shared-library function. +- Fix patch vsyscall patch name. + +* Thu Jul 8 2004 Jeff Johnston - 1.200400607.16 +- Update thread code with fix from gdb HEAD + +* Wed Jul 7 2004 Andrew Cagney - 1.200400607.15 +- disable vsyscall +- import Bob's crasher fix +- disable bigcore.exp + +* Mon Jul 5 2004 Andrew Cagney - 1.200400607.14 +- Make large corefiles work on systems that require O_LARGEFILE. + +* Tue Jun 29 2004 Elena Zannoni - 1.200400607.13 +- Fix BuildRequires for libunwind on ia64. + +* Mon Jun 28 2004 Andrew Cagney - 1.200400607.12 +- Import wild frame ID patch. Stops GDB incorrectly matching invalid + frame IDs. +- Disable bigcore on ia64 and amd64. + +* Fri Jun 25 2004 Andrew Cagney - 1.200400607.11 +- Fix testsuite to kill attach process (from corrinna/mainline). +- Fix build problems with vsyscall patch. + +* Fri Jun 25 2004 Andrew Cagney - 1.200400607.10 +- Fix annotate test messages. +- Recognize VSYSCALL pages. + +* Thu Jun 24 2004 Jeff Johnston - 1.200400607.9 +- Fix ia64 watchpoint support. + +* Wed Jun 23 2004 Andrew Cagney - 1.200400607.8 +- Do not xfail signals on i387, convert KFAIL to FAIL and not XFAIL. + +* Wed Jun 23 2004 Andrew Cagney - 1.200400607.7 +- Fix to ppc64 unwinder - handle glibcs function within syscall + function hack. +- Update sigbpt.exp, ena-dis-br.exp observer.exp signull.exp, + step-test.exp and sizeof.exp, so that test names are architecture + clean. +- Disable bigcore.exp on PowerPC 64. + +* Tue Jun 22 2004 Andrew Cagney - 1.200400607.6 +- Merge in mainline testsuite changes up to 2004-06-21. +- Re-implement 32 and 64-bit PPC signal trampolines. +- Check i386 and amd64 signal trampolines before dwarf2. +- Allow tramp-frame when there is a symbol. +- Test interaction between single-step, breakpoint and signal. +- ABI: Fix PPC64 function parameters, sizeof long-double, and enum + return values. + +* Mon Jun 21 2004 Elena Zannoni - 1.200400607.5 +- Fix sed line for gz info files. + +* Mon Jun 21 2004 Andrew Cagney - 1.200400607.4 +- Tar/uuencode both the .sum and .log test results. + +* Tue Jun 15 2004 Elena Zannoni - 0.200400607.3 +- Remove installation of mmalloc, and its info files. +- Add hack to deal with differring info files generated by makeinfo. +- Restore release number convention. + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Thu Jun 10 2004 Elena Zannoni - 0.200400607.2 +- Fix Requires and BuildRequires for libunwind dependencies. +- Add patch to silence gcc3.4 warnings. + +* Wed Jun 09 2004 Elena Zannoni - 0.200400607.1 +- New import: revamp everything. Remove all patches for now. +- Update the Requires and BuildRequires sections. +- Removed stupid Ada testcases (there is no ada support in gdb yet). + +* Mon May 10 2004 Elena Zannoni - 0.20040223.20 +- Disable PIE again. +- obsolete gdb64 only if on ppc64. + +* Mon May 03 2004 Jeff Johnston - 0.20040223.19 +- Add -u parameter to build ChangeLog patch. + +* Mon May 03 2004 Jeff Johnston - 0.20040223.18 +- Update thread fix made for .6 release to FSF version. + +* Thu Apr 22 2004 Elena Zannoni - 0.20040223.17 +- Disable PIE again. + +* Thu Apr 22 2004 Jeff Johnston - 0.20040223.16 +- Bump version number. + +* Wed Apr 21 2004 Jeff Johnston - 0.20040223.15 +- fix ia64 info frame command +- also fix ia64 tdep file for which elf header file to include + +* Tue Mar 30 2004 Elena Zannoni - 0.20040223.14 +- re-enable pie. + +* Tue Mar 30 2004 Elena Zannoni - 0.20040223.13 +- Fix testsuite glitches. + +* Wed Mar 24 2004 Elena Zannoni - 0.20040223.12 +- Fix typo. + +* Wed Mar 24 2004 Elena Zannoni - 0.20040223.11 +- Make gdb compile w/o warnings with gcc-3.4. +- Reenable PIE support code. + +* Tue Mar 23 2004 Elena Zannoni - 0.20040223.10 +- Bump version number + +* Tue Mar 23 2004 Elena Zannoni - 0.20040223.9 +- temporarily disable PIE support. +- Add section to obsolete gdb64 package. + +* Sun Mar 21 2004 Elena Zannoni - 0.20040223.8 +- Add support for debugging of PIE executables. + +* Tue Mar 09 2004 Elena Zannoni - 0.20040223.7 +- Bump version number. + +* Mon Mar 08 2004 Jeff Johnston - 0.20040223.6 +- Fix thread support to recognize new threads even when they reuse + tids of expired threads. Also ensure that terminal is held by gdb + while determining if a thread-create event has occurred. + +* Mon Mar 08 2004 Andrew Cagney - 0.20040223.5 +- Sync with 6.1 branch; eliminate all amd64 patches; + add more robust 32x64 PPC64 patches. + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Tue Mar 2 2004 Andrew Cagney - 0.20040223.4 +- 32x64 fixes that work with threads, replaced old + non-thread 32x64 patch, add nat patch. + +* Wed Feb 25 2004 Elena Zannoni - 0.20040223.3 +- Add patch for x86_64 in 32 bit mode. + +* Wed Feb 25 2004 Elena Zannoni - 0.20040223.2 +- Remove ppc64 hacks. +- Refresh some patches. + +* Wed Feb 25 2004 Elena Zannoni - 0.20040223.1 +- Import new gdb snapshot from mainline FSF. +- Update patch list. + +* Tue Feb 17 2004 Jeff Johnston - 1.20031117.8 +- Switch ia64-tdep.c to use new abi used by libunwind-0.95 and up. +- Fix gate area specification for ia64-linux-tdep.c. +- Fix long double support for ia64. + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Thu Jan 08 2004 Elena Zannoni - 0.20031117.7 +- Add fixes for ppc32 support on ppc64 platform, from Andrew Cagney. + +* Tue Jan 06 2004 Elena Zannoni - 0.20031117.6 +- Add patch to have unique binary names in the testsuite. +- Disable s390/s390x pthread.exp test (FIXME) +- Don't install any info files for the ppc platform. Let's take them + from the ppc64 one (or we get install conflicts). +- Remove generated info files from the source tree. They are generated + as part of the FSF snapshot process. + +* Mon Nov 24 2003 Elena Zannoni - 0.20031117.5 +- Add patches from old rpm for i386 support on x86_64. +- Add build dependency on libunwind for ia64. + +* Fri Nov 21 2003 Jeremy Katz - 0.20031117.4 +- more rpm tricks to get the gdb64 package happier + +* Thu Nov 20 2003 Elena Zannoni - 0.20031117.3 +- Add sick and twisted workaround for ppc64 architecture. + +* Wed Nov 19 2003 Elena Zannoni - 0.20031117.2 +- Fix typo in libunwind test. + +* Tue Nov 18 2003 Elena Zannoni - 0.20031117.1 +- Import new gdb snapshot from mainline FSF. +- Fix some testfiles. +- Add fixes for gcore, and patch for libunwind support on ia64. +- Add tests to see what versions of gcc, binutils, glibc and kernel we + are running with. + +* Wed Oct 15 2003 Elena Zannoni - 0.20030710.41 +- Bump up version number. + +* Wed Sep 24 2003 Elena Zannoni - 0.20030710.40 +- Fix problem with gcore and single threaded programs. (bugzilla 103531) + +* Mon Sep 22 2003 Jeff Johnston - 0.20030710.39 +- Fix call to quit_target from quit_force. + +* Sun Sep 21 2003 Andrew Cagney - 0.20030710.38 +- Fix PPC64 push dummy call. +- Re-fix PPC64 return value (had wrong / old patch). + +* Sat Sep 20 2003 Andrew Cagney - 0.20030710.37 +- Fix PPC32 return values. + +* Sat Sep 20 2003 Andrew Cagney - 0.20030710.36 +- Rewrite ppc64 retun value methods so that they (hopefully) +match the SysV spec. +- Enable ppc64 testsuite. + +* Thu Sep 18 2003 Andrew Cagney - 0.20030710.35 +- Hack around problem "break main" vs "break .main" when there is +only a minimal ppc64 symbol table. The former is a function descriptor +and not where you want the breakpoint to go. Only convert descriptors +to pointers when the address is in the ".opd" section. + +* Wed Sep 17 2003 Andrew Cagney - 0.20030710.34 +- Fix ppc32 push_dummy_call. + +* Tue Sep 16 2003 Andrew Cagney - 0.20030710.33 +- Pack gdb.sum and gdb.log using uuencode and bzip. + +* Tue Sep 16 2003 Jeff Johnston - 0.20030710.32 +- Catch errors when quitting so exit of gdb still occurs. + +* Mon Sep 15 2003 Andrew Cagney - 0.20030710.31 +- Fix ppc32 use_struct_convention. + +* Thu Sep 11 2003 Andrew Cagney - 0.20030710.30 +- Mods to dwarf2-frame.c to work around a lack of GCC/CFI info. + +* Thu Sep 11 2003 Elena Zannoni - 0.20030710.29 +- Bump up version number. + +* Wed Sep 10 2003 Elena Zannoni - 0.20030710.28 +- Fix a core dump with MI. +- Add new ChangeLog patch for mi changes. + +* Thu Sep 04 2003 Elena Zannoni - 0.20030710.27 +- Change the name of the package to gdb64 in ppc64 case. + +* Tue Aug 26 2003 Elena Zannoni - 0.20030710.26 +- Add testcase for separate debug info. + +* Tue Aug 26 2003 Andrew Cagney - 0.20030710.25 +- fix i386 on x86-64 TLS +- add "base-aug2003" suffix to older x86i386 patch + +* Tue Aug 26 2003 Andrew Cagney - 0.20030710.24 +- skip the ppc64 and x86-64 frame redzone. + +* Fri Aug 22 2003 Elena Zannoni - 0.20030710.23 +- Relax one testcase in selftest.exp a bit. +- Accept different output as well in thread bt (platform dependent). +- Enable testsuite run for ia64, ppc, s390 and s390x. They are in + reasonably good shape. + +* Thu Aug 21 2003 Jeff Johnston - 0.20030710.22 +- Multiple ia64 fixes. +- Fix ia64 printing of function pointers. +- Fix ia64 prologue examination to ignore predicated insns if we + haven't found the return address yet. +- Skip dump.exp testcase for ia64 + +* Thu Aug 21 2003 Elena Zannoni - 0.20030710.21 +- Bump release number. + +* Wed Aug 20 2003 Elena Zannoni - 0.20030710.20 +- Relax pattern in annota2.exp test. + +* Wed Aug 20 2003 Elena Zannoni - 0.20030710.19 +- rename gdb binary to gdb64 for ppc64 platform. + +* Tue Aug 19 2003 Jeff Johnston - 0.20030710.18 +- Fix ia64 pc unwinding to include psr slot. + +* Mon Aug 18 2003 Elena Zannoni - 0.20030710.17 +- Fix info installation for annotate.texi. (Bugzilla 102521) + +* Fri Aug 15 2003 Elena Zannoni - 0.20030710.16 +- revamp tls tests a bit. +- Handle new output from gdb in relocate.exp + +* Wed Aug 13 2003 Elena Zannoni - 0.20030710.15 +- Fix problem for processing of separate debug info files. + +* Wed Aug 13 2003 Jeff Johnston - 0.20030710.14 +- add ia64.inc file for testing ia64 in gdb.asm testsuite + +* Fri Aug 8 2003 Andrew Cagney - 0.20030710.13 +- print the libthread_db library path, print when threads are enabled + +* Thu Aug 7 2003 Andrew Cagney - 0.20030710.12 +- "cat" the test log into the build log + +* Wed Aug 06 2003 Jeff Johnston - 0.20030710.11 +- modernize ia64 gdb to use new frame model +- remove/replace deprecated interfaces used by ia64 gdb + +* Wed Aug 06 2003 Andrew Cagney - 0.20030710.10 +- Sync to gdb-5.3.90-sync-20030806.patch. + +* Tue Jul 29 2003 Andrew Cagney - 0.20030710.9 +- add x86-64 i386 fixes + +* Tue Jul 29 2003 Elena Zannoni - 0.20030710.8 +- Fix some tests by xfailing the correct target triplet for RedHat. +- Remove include of config.h from pthreads.c testcases. + +* Mon Jul 28 2003 Elena Zannoni - 0.20030710.7 +- Fix some test failures, by escaping correctly. + +* Thu Jul 24 2003 Elena Zannoni - 0.20030710.6 +- Remove one testcase that is redundant. + +* Wed Jul 23 2003 Elena Zannoni - 0.20030710.5 +- Bump up release number. + +* Wed Jul 23 2003 Elena Zannoni - 0.20030710.4 +- Bring in sync with current head of gdb-6 branch. +- Remove linespec patch, because included in the new sync patch. + +* Fri Jul 18 2003 Elena Zannoni - 0.20030710.3 +- Add patch to avoid gdb segfault with bad debug info. +- Change location of build tree to avoid conflicts with older versions + possibly installed. + +* Thu Jul 17 2003 Elena Zannoni - 0.20030710.2 +- Add patch to synchronize the current snapshot with the gdb-6 branch head. +- Remove some patches that are includd in such diff. +- Enable tests on AMD64 as well. + +* Fri Jul 11 2003 Elena Zannoni - 0.20030710.1 +- Import new gdb snapshot. +- Revamp gdb.spec. Get rid of patches that apply to older versions. +- Add patches for ppc64 support, kfail and make gdb more robust in copingi + with bad debug info. + +* Wed Jul 02 2003 Jeff Johnston - 1.20021129.39 +- Fix bug with ia64 checking of hardware breakpoints. + +* Mon Jun 30 2003 Elena Zannoni - 1.20021129.38 +- Add necessary function for NPTL support on x86-64. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Jun 04 2003 Elena Zannoni - 0.20021129.37 +* Tue Jun 03 2003 Elena Zannoni - 0.20021129.36 +- Enable warnings for x86_64, not x86-64. +- Fix warnings from infptrace.c and dwarfread.c. +- Print error message only when reading separate debug info really + doesn't work (jimb@redhat.com). + +* Fri May 23 2003 Elena Zannoni - 0.20021129.35 +- Fixes for fetching and storing access registers on s390x (jimb@redhat.com). + Bugzilla 91455. + +* Wed May 21 2003 Jeff Johnston - 0.20021129.34 +- Do not generate error on detach failure. Bugzilla 90900. + +* Thu May 8 2003 Elena Zannoni - 0.20021129.33 +- New tests for asm on s390x (jimb@redhat.com). Bugzilla 90503. +- Fixes for prologue analysis on s390x (jimb@redhat.com). Bugzilla 90506. +- bfd fix for 64-bit platforms (jimb@redhat.com). +- Disable ppc64 builds until we have a port. + +* Thu May 1 2003 Jeff Johnston - 0.20021129.32 +- Add ia64 support to the float.exp testcase. + +* Thu May 1 2003 Elena Zannoni - 0.20021129.31 +- Clean up the tls tests some more. +- Fix problem with non US-eng locale. Bugzilla bug 88823. + +* Wed Apr 30 2003 Jeff Johnston - 0.20021129.30 +- Fix ia64 prologue skipping. +- Fix ia64 line table. +- Fix setting of prev_pc in infrun.c. + +* Mon Mar 31 2003 Elena Zannoni - 0.20021129.29 +- Include the gcore script, as gdb_gcore.sh and install it in + /usr/bin as gcore. +- One more disassembly fix for core files. Added to + gdb-5.3post-disasm-mar2003.patch. Bugzilla 87677. +- Enable build warnings for x86-64. + +* Mon Mar 31 2003 Elena Zannoni - 0.20021129.28 +- Fix Java strings printing. +- Fix memory corruption in disassembly code. Bugzilla 85644. +- Testsuite fixes (jimb@redhat.com). Bugzilla 85457. +- Fixes for s390 stack handling (jimb@redhat.com). Bugzilla 85039. +- Fixes for s390 struct return (jimb@redhat.com). + +* Wed Mar 26 2003 Elena Zannoni - 0.20021129.27 +- Fixes for disassembly of code in threaded applications. Bugzilla 87495. +- Fixes for s390 prologue analysis. (jimb@redhat.com). + Bugzilla bugs 85251, 85214. + +* Thu Mar 20 2003 Elena Zannoni - 0.20021129.26 +- Fix inferior function calls with void return on x86-64. Bugzilla bug 83197. +- Fix for upstream PR/699. +- Fix some problems with gdb-5.3post-thrtst-feb2003.patch. + +* Wed Mar 19 2003 Jeff Johnston - 0.20021129.25 +- Fix for thread-db.c: check_event() - Bugzilla bug 86231. + +* Fri Mar 14 2003 Elena Zannoni - 0.20021129.24 +- Fix some problems with inferior function calls on x86-64. + +* Fri Mar 07 2003 Elena Zannoni - 0.20021129.23 +- testsuite patches. Bugzilla 85215 85028 85335. + +* Thu Mar 06 2003 Elena Zannoni - 0.20021129.22 +- Fix testsuite problems related to having '+' in the directory name. + Bugzilla 85031. + +* Mon Mar 03 2003 Elena Zannoni - 0.20021129.21 +- Fix a few inferior function call problems. + +* Mon Mar 03 2003 Elena Zannoni - 0.20021129.20 +- Split the changelog patches in two. Cleanup messy patch section. + +* Thu Feb 27 2003 Jeff Johnston - 0.20021129.19 +- Perform run-time check for tkill syscall in lin-lwp.c. + +* Mon Feb 24 2003 Elena Zannoni - 0.20021129.18 +- Update copyright year printed in version. + +* Mon Feb 24 2003 Elena Zannoni - 0.20021129.17 +- Refresh build. + +* Mon Feb 24 2003 Elena Zannoni - 0.20021129.16 +- Add some testsuite cleanups, to avoid spurious test failures. + +* Fri Feb 21 2003 Jeff Johnston - 0.20021129.15 +- Add patch to handle thread exiting when LD_ASSUME_KERNEL=2.4.1 which + fixes Bugzilla bug 84217. + +* Fri Feb 21 2003 Elena Zannoni - 0.20021129.14 +- New patch to fix disassembly on s390. Bugzilla bug 84286. +- New patch for attach/ptrace fix. Bugzilla bug 84220. +- Reenable tests for x86. + +* Thu Feb 20 2003 Jeff Johnston - 0.20021129.13 +- Add patch for mixed stabs with dwarf2 - bugzilla bug 84253. + +* Wed Feb 12 2003 Elena Zannoni - 0.20021129.12 +- Disable tests also for x86. + +* Tue Feb 11 2003 Elena Zannoni - 0.20021129.11 +- Add patch for mi threads tests. +- Add patch for dwarf2 debug_ranges section. +- Add patch for detach bug. + +* Mon Feb 10 2003 Elena Zannoni - 0.20021129.10 +- Add patch for testsuite auto answering internal error queries. +- Add new TLS tests. +- Add cleanup patches for thread tests. + +* Mon Feb 03 2003 Elena Zannoni - 0.20021129.9 +- Add new patch for thread support. Apply on all arches. +- Do not apply old patches, but leave them around for now. +- Add new patch for dwarf2 debug info reading. +- Add new patch for dwarf2 cfi engine cleanup. +- Add new patch for uiout problems. +- Add new patch for s390 build. +- Disable tests on all platforms but x86. + +* Mon Jan 27 2003 Elena Zannoni - 0.20021129.8 +- Move all the changelog entries to a single patch. +- Add tests to the args patch. +- Add new patch for until command fix (bugzilla Bug 19890). +- s390 and s390x can be built with -Werror. +- Run make check for s390 and s390x too. +- Include an updated version of the thread nptl patch (still WIP). + +* Wed Jan 15 2003 Phil Knirsch - 0.20021129.7 +- Apply the 2nd misc patch for s390 and s390x, too. + +* Tue Jan 14 2003 Elena Zannoni - 0.20021129.6 +- Add patches for NPTL support, to be applied on i386 only. + (this is still WIP) +- Split old misc patch in two parts. +- Temporarily disable testsuite run on alpha. + +* Sun Jan 12 2003 Elena Zannoni - 0.20021129.5 +- Add patch for --args with zero-length arguments. Fix for bug 79833. + +* Tue Dec 17 2002 Elliot Lee - 0.20021129.4 +- The define directive to rpm is significant even if the line it is + in happens to start with a '#' character. Fixed. + +* Fri Dec 13 2002 Elena Zannoni - 0.20021129.3 +- Merge previous patches for warnings into a single one. +- Add changelogs to patches. +- Add, but don't use, a macro to avoid stripping. + +* Fri Dec 6 2002 Elena Zannoni +- Add patch to allow debugging of executables with debug info stored + in separate files. +- Add patch for Makefile dependencies and disable warnings for + building thread-db.c. +- Re-enable building with -Werror for alpha, ia64, ppc. + +* Mon Dec 2 2002 Elena Zannoni +- Don't pass to gdb an empty build warnings flag, or that will disable warnings + completely. We want to build using gdb's standard warnings instead. + +* Mon Dec 2 2002 Elena Zannoni +- Don't do testing for x86_64. + +* Sun Dec 1 2002 Elena Zannoni +- x86_64 doesn't build with Werror yet. +- Add patch for alpha. +- Alpha doesn't build with -Werror either. +- Add patch for ia64. +- Add patch for ppc. +- Drop ia64 from -Werror list. +- Drop ppc from -Werror list. + +* Sun Dec 1 2002 Elena Zannoni +- Add dejagnu to the build requirements. +- Enable make check. +- Add enable-gdb-build-warnings to the configure flags. + +* Fri Nov 29 2002 Elena Zannoni +- Import new upstream sources. +- Change version and release strings. +- Upgrade patches. +- Build gdb/gdbserver as well. +- Define and use 'cvsdate'. +- Do %%setup specifying the source directory name. +- Don't cd up one dir before removing tcl and friends. +- Change the configure command to allow for the new source tree name. +- Ditto for the copy of NEWS. +- Add some comments. + +* Mon Nov 25 2002 Elena Zannoni 5.2.1-5 +General revamp. +- Add patch for gdb/doc/Makefile.in. Part of fix for bug 77615. +- Add patch for mmalloc/Makefile.in. Part of fix for bug 77615. +- Change string printed in version.in to -rh. +- Move the deletion of dejagnu, expect, tcl to the prep section, + from the build section. +- Add build directory housekeeping to build section. +- Use macros for configure parameters. +- Do the build in a separate directory. +- Prepare for testing, but not enable it yet. +- Correctly copy the NEWS file to the top level directory, for the doc + section to find it. +- Cd to build directory before doing install. +- Use makeinstall macro, w/o options. +- Remove workaround for broken gdb info files. Part of fix for bug 77615. +- Remove share/locale directory, it is in binutils. +- Remove info/dir file. +- Clarify meaning of post-install section. +- Add gdbint info files to post-install, pre-uninstall and files sections. + Part of fix for bugs 77615, 76423. +- Add libmmalloc.a to package. + +* Fri Aug 23 2002 Florian La Roche +- added mainframe patch from developerworks + +* Wed Aug 21 2002 Trond Eivind Glomsrod 5.2.1-3 +- Add changelogs to the previous patch + +* Wed Aug 14 2002 Trond Eivind Glomsrod 5.2.1-2 +- Add some patches from Elena Zannoni + +* Tue Jul 23 2002 Trond Eivind Glomsrod 5.2.1-1 +- 5.2.1 + +* Mon Jul 22 2002 Florian La Roche +- compile on mainframe + +* Mon Jul 8 2002 Trond Eivind Glomsrod 5.2-3 +- Rebuild + +* Tue May 7 2002 Trond Eivind Glomsrod 5.2-2 +- Rebuild + +* Mon Apr 29 2002 Trond Eivind Glomsrod 5.2-1 +- 5.2 + +* Mon Apr 29 2002 Trond Eivind Glomsrod 5.1.92-1 +- 5.1.92. Hopefully identical to 5.2 final + +* Mon Apr 22 2002 Trond Eivind Glomsrod 5.1.91-1 +- 5.1.91. 5.2 expected in a week + +* Thu Mar 28 2002 Trond Eivind Glomsrod 5.1.90CVS-5 +- Update to current + +* Thu Mar 28 2002 Trond Eivind Glomsrod 5.1.90CVS-4 +- Update to current + +* Thu Mar 28 2002 Trond Eivind Glomsrod 5.1.90CVS-3 +- Update to current + +* Wed Mar 20 2002 Trond Eivind Glomsrod 5.1.90CVS-2 +- Update to current + +* Wed Mar 13 2002 Trond Eivind Glomsrod 5.1.90CVS-1 +- Update to current 5.2 branch + +* Thu Jan 24 2002 Trond Eivind Glomsrod 5.1.1-1 +- 5.1.1 +- add URL + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Mon Dec 10 2001 Trond Eivind Glomsrod 5.1-2 +- Fix some thread+fpu problems + +* Mon Nov 26 2001 Trond Eivind Glomsrod 5.1-1 +- 5.1 + +* Mon Nov 19 2001 Trond Eivind Glomsrod 5.0.94-0.71 +- 5.0.94. Almost there.... + +* Mon Nov 12 2001 Trond Eivind Glomsrod 5.0.93-2 +- Add patch from jakub@redhat.com to improve handling of DWARF + +* Mon Nov 12 2001 Trond Eivind Glomsrod 5.0.93-1 +- 5.0.93 +- handle missing info pages in post/pre scripts + +* Wed Oct 31 2001 Trond Eivind Glomsrod 5.0.92-1 +- 5.0.92 + +* Fri Oct 26 2001 Trond Eivind Glomsrod 5.0.91rh-1 +- New snapshot +- Use the 5.0.91 versioning from the snapshot + +* Wed Oct 17 2001 Trond Eivind Glomsrod 5.0rh-17 +- New snapshot + +* Thu Sep 27 2001 Trond Eivind Glomsrod +- New snapshot + +* Wed Sep 12 2001 Trond Eivind Glomsrod 5.0rh-16 +- New snapshot + +* Mon Aug 13 2001 Trond Eivind Glomsrod 5.0rh-15 +- Don't buildrequire compat-glibc (#51690) + +* Thu Aug 9 2001 Trond Eivind Glomsrod +- New snapshot, from the stable branch eventually leading to gdb 5.1 + +* Mon Jul 30 2001 Trond Eivind Glomsrod +- s/Copyright/License/ +- Add texinfo to BuildRequires + +* Mon Jun 25 2001 Trond Eivind Glomsrod +- New snapshot + +* Fri Jun 15 2001 Trond Eivind Glomsrod +- New snapshot +- Add ncurses-devel to buildprereq +- Remove perl from buildprereq, as gdb changed the way + version strings are generated + +* Thu Jun 14 2001 Trond Eivind Glomsrod +- New snapshot + +* Wed May 16 2001 Trond Eivind Glomsrod +- New snapshot - this had thread fixes for curing #39070 +- New way of specifying version + +* Tue May 1 2001 Trond Eivind Glomsrod +- New tarball +- Kevin's patch is now part of gdb + +* Mon Apr 9 2001 Trond Eivind Glomsrod +- Add patch from kevinb@redhat.com to fix floating point + thread + problem (#24310) +- remove old workarounds +- new snapshot + +* Thu Apr 5 2001 Trond Eivind Glomsrod +- New snapshot + +* Sat Mar 17 2001 Bill Nottingham +- on ia64, there are no old headers :) + +* Fri Mar 16 2001 Trond Eivind Glomsrod +- build with old headers, new compiler + +* Fri Mar 16 2001 Trond Eivind Glomsrod +- new snapshot + +* Mon Feb 26 2001 Trond Eivind Glomsrod +- new snapshot which should fix some more IA64 problems (#29151) +- remove IA64 patch, it's now integrated + +* Wed Feb 21 2001 Trond Eivind Glomsrod +- add IA64 and Alpha patches from Kevin Buettner +- use perl instead of patch for fixing the version string + +* Tue Feb 20 2001 Trond Eivind Glomsrod +- don't use kgcc anymore +- mark it as our own version +- new snapshot + +* Mon Jan 22 2001 Bernhard Rosenkraenzer +- Link with ncurses 5.x even though we're using kgcc. + No need to drag in requirements on ncurses4 (Bug #24445) + +* Fri Jan 19 2001 Trond Eivind Glomsrod +- new snapshot + +* Wed Dec 20 2000 Trond Eivind Glomsrod +- new snapshot + +* Mon Dec 04 2000 Trond Eivind Glomsrod +- new snapshot +- new alpha patch - it now compiles everywhere. Finally. + +* Fri Dec 01 2000 Trond Eivind Glomsrod +- new snapshot + +* Mon Nov 20 2000 Trond Eivind Glomsrod +- new CVS snapshot +- disable the patches +- don't use %%configure, as it confuses the autoconf script +- enable SPARC, disable Alpha + + +* Wed Aug 09 2000 Trond Eivind Glomsrod +- added patch from GDB team for C++ symbol handling + +* Tue Jul 25 2000 Trond Eivind Glomsrod +- upgrade to CVS snapshot +- excludearch SPARC, build on IA61 + +* Wed Jul 19 2000 Trond Eivind Glomsrod +- rebuild + +* Thu Jul 13 2000 Prospector +- automatic rebuild + +* Sun Jul 02 2000 Trond Eivind Glomsrod +- rebuild + +* Thu Jun 08 2000 Trond Eivind Glomsrod +- use %%configure, %%makeinstall, %%{_infodir}, %%{_mandir}, + and %%{_tmppath} +- the install scripts for info are broken(they don't care about + you specify in the installstep), work around that. +- don't build for IA64 + +* Mon May 22 2000 Trond Eivind Glomsrod +- upgraded to 5.0 - dump all patches. Reapply later if needed. +- added the NEWS file to the %%doc files +- don't delete files which doesn't get installed (readline, texinfo) +- let build system handle stripping and gzipping +- don't delete libmmalloc +- apply patch from jakub@redhat.com to make it build on SPARC + +* Fri Apr 28 2000 Matt Wilson +- rebuilt against new ncurses + +* Tue Mar 7 2000 Jeff Johnson +- rebuild for sparc baud rates > 38400. + +* Tue Feb 8 2000 Jakub Jelinek +- fix core file handling on i386 with glibc 2.1.3 headers + +* Fri Jan 14 2000 Jakub Jelinek +- fix reading registers from core on sparc. +- hack around build problems on i386 with glibc 2.1.3 headers + +* Thu Oct 7 1999 Jim Kingdon +- List files to install in /usr/info specifically (so we don't pick up +things like info.info from GDB snapshots). + +* Thu Oct 7 1999 Jim Kingdon +- Update GDB to 19991004 snapshot. This eliminates the need for the +sigtramp, sparc, xref, and threads patches. Update sparcmin patch. + +* Mon Aug 23 1999 Jim Kingdon +- Omit readline manpage. + +* Sat Aug 7 1999 Jim Kingdon +- Remove H.J. Lu's patches (they had been commented out). +- Add sigtramp patch (from gdb.cygnus.com) and threads patch (adapted +from code fusion CD-ROM). + +* Wed Apr 14 1999 Jeff Johnson +- merge H.J. Lu's patches into 4.18. + +* Mon Apr 05 1999 Cristian Gafton +- updated the kern22 patch with stuff from davem + +* Thu Apr 1 1999 Jeff Johnson +- sparc with 2.2 kernels no longer uses sunos ptrace (davem) + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 3) + +* Mon Mar 8 1999 Jeff Johnson +- Sparc fiddles for Red Hat 6.0.