aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/Makefile.in2
-rw-r--r--bfd/bfd-in2.h5
-rw-r--r--bfd/coffgen.c22
-rw-r--r--bfd/doc/local.mk2
-rw-r--r--bfd/ecoff.c8
-rw-r--r--bfd/elf.c57
-rw-r--r--bfd/elf32-arm.c7
-rw-r--r--bfd/elf32-i386.c2
-rw-r--r--bfd/elf32-v850.c7
-rw-r--r--bfd/elflink.c24
-rw-r--r--bfd/elfnn-loongarch.c10
-rw-r--r--bfd/elfnn-riscv.c2
-rw-r--r--bfd/elfxx-riscv.c5
-rw-r--r--bfd/libbfd.c2
-rw-r--r--bfd/pef.c8
-rw-r--r--bfd/peicode.h166
-rw-r--r--bfd/plugin.c6
-rw-r--r--bfd/syms.c12
-rw-r--r--bfd/version.h2
-rw-r--r--binutils/MAINTAINERS6
-rw-r--r--binutils/dlltool.c158
-rw-r--r--binutils/nm.c6
-rw-r--r--binutils/objcopy.c10
-rw-r--r--binutils/testsuite/binutils-all/debuginfod.exp12
-rw-r--r--binutils/testsuite/binutils-all/dlltool.exp57
-rw-r--r--binutils/testsuite/lib/binutils-common.exp21
-rw-r--r--gas/Makefile.am3
-rw-r--r--gas/Makefile.in12
-rw-r--r--gas/NEWS6
-rw-r--r--gas/app.c73
-rw-r--r--gas/as.c11
-rw-r--r--gas/config.in3
-rw-r--r--gas/config/e-crisaout.c10
-rw-r--r--gas/config/e-criself.c10
-rw-r--r--gas/config/e-i386aout.c38
-rw-r--r--gas/config/e-i386coff.c38
-rw-r--r--gas/config/e-i386elf.c38
-rw-r--r--gas/config/e-mipself.c10
-rw-r--r--gas/config/loongarch-parse.y24
-rw-r--r--gas/config/obj-aout.c12
-rw-r--r--gas/config/obj-aout.h5
-rw-r--r--gas/config/obj-coff.c21
-rw-r--r--gas/config/obj-coff.h16
-rw-r--r--gas/config/obj-ecoff.c54
-rw-r--r--gas/config/obj-elf.c169
-rw-r--r--gas/config/obj-elf.h3
-rw-r--r--gas/config/obj-multi.h5
-rw-r--r--gas/config/tc-i386-intel.c2
-rw-r--r--gas/config/tc-i386.c992
-rw-r--r--gas/config/tc-i386.h10
-rw-r--r--gas/config/tc-mips.c5
-rw-r--r--gas/config/tc-riscv.c80
-rw-r--r--gas/config/tc-riscv.h5
-rw-r--r--gas/config/tc-s390.c9
-rwxr-xr-xgas/configure67
-rw-r--r--gas/configure.ac59
-rw-r--r--gas/doc/as.texi2
-rw-r--r--gas/doc/c-i386.texi10
-rw-r--r--gas/doc/c-s390.texi12
-rw-r--r--gas/dw2gencfi.c11
-rw-r--r--gas/emul-target.h6
-rw-r--r--gas/emul.h6
-rw-r--r--gas/listing.c23
-rw-r--r--gas/obj.h4
-rw-r--r--gas/po/POTFILES.in3
-rw-r--r--gas/read.c6
-rw-r--r--gas/testsuite/gas/all/end-no-dot.l3
-rw-r--r--gas/testsuite/gas/all/end-no-dot.s11
-rw-r--r--gas/testsuite/gas/all/end.l3
-rw-r--r--gas/testsuite/gas/all/end.s11
-rw-r--r--gas/testsuite/gas/all/gas.exp24
-rw-r--r--gas/testsuite/gas/arm/ccs-symver.d10
-rw-r--r--gas/testsuite/gas/arm/ccs-symver.s7
-rw-r--r--gas/testsuite/gas/i386/avx10_2-rounding-intel.d4
-rw-r--r--gas/testsuite/gas/i386/avx10_2-rounding.s1
-rw-r--r--gas/testsuite/gas/i386/i386.exp3
-rw-r--r--gas/testsuite/gas/i386/ilp32/ilp32.exp3
-rw-r--r--gas/testsuite/gas/i386/ilp32/reloc64.d2
-rw-r--r--gas/testsuite/gas/i386/ilp32/x32-inval-tls.l38
-rw-r--r--gas/testsuite/gas/i386/ilp32/x32-inval-tls.s1
-rw-r--r--gas/testsuite/gas/i386/ilp32/x32-tls.d1
-rw-r--r--gas/testsuite/gas/i386/ilp32/x86-64-tls.d4
-rw-r--r--gas/testsuite/gas/i386/inval-tls.l72
-rw-r--r--gas/testsuite/gas/i386/inval-tls.s82
-rw-r--r--gas/testsuite/gas/i386/optimize-1.d30
-rw-r--r--gas/testsuite/gas/i386/optimize-1.s38
-rw-r--r--gas/testsuite/gas/i386/optimize-1a.d30
-rw-r--r--gas/testsuite/gas/i386/optimize-4.d30
-rw-r--r--gas/testsuite/gas/i386/optimize-5.d30
-rw-r--r--gas/testsuite/gas/i386/reloc32.d3
-rw-r--r--gas/testsuite/gas/i386/reloc32.s7
-rw-r--r--gas/testsuite/gas/i386/reloc64.d10
-rw-r--r--gas/testsuite/gas/i386/reloc64.s11
-rw-r--r--gas/testsuite/gas/i386/solaris/reloc64.d10
-rw-r--r--gas/testsuite/gas/i386/tls.d25
-rw-r--r--gas/testsuite/gas/i386/tls.s31
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l8
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l6
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s8
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d10
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d10
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d10
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s10
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval-tls.l36
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval-tls.s46
-rw-r--r--gas/testsuite/gas/i386/x86-64-optimize-extractps.d20
-rw-r--r--gas/testsuite/gas/i386/x86-64-optimize-extractps.l21
-rw-r--r--gas/testsuite/gas/i386/x86-64-optimize-extractps.s14
-rw-r--r--gas/testsuite/gas/i386/x86-64-optimize-insertps.d26
-rw-r--r--gas/testsuite/gas/i386/x86-64-optimize-insertps.l26
-rw-r--r--gas/testsuite/gas/i386/x86-64-optimize-insertps.s20
-rw-r--r--gas/testsuite/gas/i386/x86-64-optimize-vextractNN.d59
-rw-r--r--gas/testsuite/gas/i386/x86-64-optimize-vextractNN.s57
-rw-r--r--gas/testsuite/gas/i386/x86-64-tls.d25
-rw-r--r--gas/testsuite/gas/i386/x86-64-tls.s27
-rw-r--r--gas/testsuite/gas/i386/x86-64.exp8
-rw-r--r--gas/testsuite/gas/loongarch/insn_expr.d10
-rw-r--r--gas/testsuite/gas/loongarch/insn_expr.s1
-rw-r--r--gas/testsuite/gas/mips/allegrex@div-trap.d2
-rw-r--r--gas/testsuite/gas/mips/div.d166
-rw-r--r--gas/testsuite/gas/mips/div64-trap.d3
-rw-r--r--gas/testsuite/gas/mips/div64.d41
-rw-r--r--gas/testsuite/gas/mips/micromips-compact.d3
-rw-r--r--gas/testsuite/gas/mips/micromips-insn32.d3
-rw-r--r--gas/testsuite/gas/mips/micromips-noinsn32.d3
-rw-r--r--gas/testsuite/gas/mips/micromips-trap.d3
-rw-r--r--gas/testsuite/gas/mips/micromips.d3
-rw-r--r--gas/testsuite/gas/mips/micromips@div64-trap.d1
-rw-r--r--gas/testsuite/gas/mips/micromips@div64.d1
-rw-r--r--gas/testsuite/gas/mips/mips1@div-trap.d2
-rw-r--r--gas/testsuite/gas/mips/mips1@div.d196
-rw-r--r--gas/testsuite/gas/mips/mips2@div-trap.d2
-rw-r--r--gas/testsuite/gas/mips/mips2@div.d2
-rw-r--r--gas/testsuite/gas/mips/mips3@div.d2
-rw-r--r--gas/testsuite/gas/mips/mips3@div64-trap.d3
-rw-r--r--gas/testsuite/gas/mips/mips3@div64.d51
-rw-r--r--gas/testsuite/gas/mips/mips4@div.d2
-rw-r--r--gas/testsuite/gas/mips/mips4@div64.d2
-rw-r--r--gas/testsuite/gas/mips/mips5@div.d2
-rw-r--r--gas/testsuite/gas/mips/mips5@div64.d2
-rw-r--r--gas/testsuite/gas/mips/r3000@div-trap.d2
-rw-r--r--gas/testsuite/gas/mips/r3000@div.d2
-rw-r--r--gas/testsuite/gas/mips/r3900@div-trap.d2
-rw-r--r--gas/testsuite/gas/mips/r3900@div.d2
-rw-r--r--gas/testsuite/gas/mips/r4000@div.d2
-rw-r--r--gas/testsuite/gas/mips/r4000@div64.d2
-rw-r--r--gas/testsuite/gas/mips/vr5400@div.d2
-rw-r--r--gas/testsuite/gas/mips/vr5400@div64.d2
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p10.d8
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p10.l16
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p11.d8
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p11.l16
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p12.d8
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p12.l16
-rw-r--r--gas/testsuite/gas/riscv/csr.s6
-rw-r--r--gas/testsuite/gas/riscv/imply.d4
-rw-r--r--gas/testsuite/gas/riscv/march-help.l1
-rw-r--r--gas/testsuite/gas/riscv/odd-padding.d17
-rw-r--r--gas/testsuite/gas/riscv/odd-padding.s8
-rw-r--r--gas/testsuite/gas/riscv/relax-align-2.d52
-rw-r--r--gas/testsuite/gas/riscv/relax-align-2.s50
-rw-r--r--gas/testsuite/gas/riscv/relax-align.d34
-rw-r--r--gas/testsuite/gas/riscv/relax-align.s27
-rw-r--r--gas/testsuite/gas/s390/s390.exp1
-rw-r--r--gas/testsuite/gas/s390/zarch-arch15.d102
-rw-r--r--gas/testsuite/gas/s390/zarch-arch15.s96
-rw-r--r--gas/testsuite/gas/s390/zarch-z10.d12
-rw-r--r--gas/testsuite/gas/s390/zarch-z10.s12
-rw-r--r--gdb/MAINTAINERS12
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/NEWS58
-rw-r--r--gdb/ada-exp.y2
-rw-r--r--gdb/ada-lang.c63
-rw-r--r--gdb/ada-lex.l2
-rw-r--r--gdb/ada-tasks.c2
-rw-r--r--gdb/addrmap.c18
-rw-r--r--gdb/addrmap.h9
-rw-r--r--gdb/alpha-tdep.h2
-rw-r--r--gdb/amd-dbgapi-target.c4
-rw-r--r--gdb/amd64-linux-nat.c2
-rw-r--r--gdb/amd64-linux-tdep.c5
-rw-r--r--gdb/amd64-tdep.c22
-rw-r--r--gdb/amd64-tdep.h2
-rw-r--r--gdb/amd64-windows-tdep.c2
-rw-r--r--gdb/arc-linux-tdep.c2
-rw-r--r--gdb/arc-tdep.c4
-rw-r--r--gdb/arch/amd64.c11
-rw-r--r--gdb/arch/i386.c7
-rw-r--r--gdb/arch/tic6x.c3
-rw-r--r--gdb/arch/x86-linux-tdesc-features.c7
-rw-r--r--gdb/arm-tdep.c8
-rw-r--r--gdb/auxv.c2
-rw-r--r--gdb/break-cond-parse.c11
-rw-r--r--gdb/breakpoint.c174
-rw-r--r--gdb/btrace.c328
-rw-r--r--gdb/btrace.h10
-rw-r--r--gdb/c-exp.y6
-rw-r--r--gdb/cli-out.c5
-rw-r--r--gdb/cli-out.h3
-rw-r--r--gdb/cli/cli-cmds.c49
-rw-r--r--gdb/cli/cli-interp.c2
-rw-r--r--gdb/cli/cli-style.c12
-rw-r--r--gdb/cli/cli-style.h3
-rw-r--r--gdb/coff-pe-read.c3
-rw-r--r--gdb/coffread.c97
-rw-r--r--gdb/completer.c32
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure10
-rw-r--r--gdb/configure.ac7
-rwxr-xr-xgdb/contrib/ari/gdb_ari.sh2
-rw-r--r--gdb/contrib/common-misspellings.txt18
-rwxr-xr-xgdb/contrib/gdb-add-index.sh39
-rwxr-xr-xgdb/contrib/spellcheck.sh353
-rw-r--r--gdb/corelow.c59
-rw-r--r--gdb/cris-tdep.c6
-rw-r--r--gdb/ctfread.c2
-rw-r--r--gdb/data-directory/Makefile.in3
-rw-r--r--gdb/dbxread.c2896
-rw-r--r--gdb/dictionary.h2
-rw-r--r--gdb/disasm.c5
-rw-r--r--gdb/doc/gdb.texinfo185
-rw-r--r--gdb/doc/python.texi2
-rw-r--r--gdb/dtrace-probe.c2
-rw-r--r--gdb/dwarf2/abbrev.c3
-rw-r--r--gdb/dwarf2/cooked-index.c23
-rw-r--r--gdb/dwarf2/cooked-index.h17
-rw-r--r--gdb/dwarf2/expr.c3
-rw-r--r--gdb/dwarf2/frame.c4
-rw-r--r--gdb/dwarf2/loc.c11
-rw-r--r--gdb/dwarf2/parent-map.h6
-rw-r--r--gdb/dwarf2/read-gdb-index.c20
-rw-r--r--gdb/dwarf2/read.c320
-rw-r--r--gdb/dwarf2/read.h31
-rw-r--r--gdb/dwarf2/tag.h1
-rw-r--r--gdb/elfread.c135
-rw-r--r--gdb/eval.c13
-rw-r--r--gdb/exec.h2
-rw-r--r--gdb/expop.h20
-rw-r--r--gdb/expression.h10
-rw-r--r--gdb/extension.c2
-rw-r--r--gdb/fbsd-tdep.c1
-rw-r--r--gdb/features/Makefile2
-rw-r--r--gdb/features/btrace-conf.dtd1
-rw-r--r--gdb/features/i386/32bit-mpx.c51
-rw-r--r--gdb/features/i386/32bit-mpx.xml45
-rw-r--r--gdb/features/i386/64bit-mpx.c51
-rw-r--r--gdb/features/i386/64bit-mpx.xml44
-rw-r--r--gdb/features/mips-dsp-linux.c2
-rw-r--r--gdb/features/mips-linux.c2
-rw-r--r--gdb/features/or1k-linux.c2
-rw-r--r--gdb/features/sparc/sparc32-solaris.c2
-rw-r--r--gdb/features/sparc/sparc64-solaris.c2
-rw-r--r--gdb/gdb-stabs.h98
-rw-r--r--gdb/gdbtypes.c8
-rw-r--r--gdb/i386-fbsd-nat.c2
-rw-r--r--gdb/i386-linux-nat.c2
-rw-r--r--gdb/i386-linux-tdep.c67
-rw-r--r--gdb/i386-linux-tdep.h9
-rw-r--r--gdb/i386-tdep.c511
-rw-r--r--gdb/i386-tdep.h24
-rw-r--r--gdb/i387-tdep.c219
-rw-r--r--gdb/i387-tdep.h12
-rw-r--r--gdb/ia64-tdep.h2
-rw-r--r--gdb/inf-ptrace.c2
-rw-r--r--gdb/infcmd.c4
-rw-r--r--gdb/linespec.c8
-rw-r--r--gdb/linux-tdep.c124
-rw-r--r--gdb/m2-exp.y10
-rw-r--r--gdb/m2-typeprint.c1
-rw-r--r--gdb/m68k-linux-nat.c2
-rw-r--r--gdb/mdebugread.c28
-rw-r--r--gdb/memattr.c2
-rw-r--r--gdb/mi/mi-cmd-disas.c3
-rw-r--r--gdb/mi/mi-out.c13
-rw-r--r--gdb/mi/mi-out.h3
-rw-r--r--gdb/mi/mi-symbol-cmds.c2
-rw-r--r--gdb/microblaze-tdep.c2
-rw-r--r--gdb/minsyms.c3
-rw-r--r--gdb/mips-tdep.c32
-rw-r--r--gdb/nat/linux-btrace.c11
-rw-r--r--gdb/nat/x86-linux-tdesc.c6
-rw-r--r--gdb/nat/x86-xstate.c2
-rw-r--r--gdb/objc-lang.c8
-rw-r--r--gdb/objfiles.h4
-rw-r--r--gdb/osabi.c120
-rw-r--r--gdb/osabi.h45
-rw-r--r--gdb/p-exp.y4
-rw-r--r--gdb/ppc-linux-tdep.c2
-rw-r--r--gdb/ppc-netbsd-tdep.c1
-rw-r--r--gdb/procfs.c2
-rw-r--r--gdb/progspace.h4
-rw-r--r--gdb/psymtab.c6
-rw-r--r--gdb/psymtab.h6
-rw-r--r--gdb/python/lib/gdb/dap/breakpoint.py6
-rw-r--r--gdb/python/lib/gdb/dap/launch.py20
-rw-r--r--gdb/python/lib/gdb/dap/varref.py1
-rw-r--r--gdb/python/lib/gdb/disassembler.py2
-rw-r--r--gdb/python/lib/gdb/missing_debug.py30
-rw-r--r--gdb/python/lib/gdb/printer/bound_registers.py39
-rw-r--r--gdb/python/py-arch.c8
-rw-r--r--gdb/python/py-block.c11
-rw-r--r--gdb/python/py-breakpoint.c33
-rw-r--r--gdb/python/py-cmd.c8
-rw-r--r--gdb/python/py-connection.c14
-rw-r--r--gdb/python/py-disasm.c38
-rw-r--r--gdb/python/py-event.c18
-rw-r--r--gdb/python/py-event.h2
-rw-r--r--gdb/python/py-evtregistry.c6
-rw-r--r--gdb/python/py-finishbreakpoint.c10
-rw-r--r--gdb/python/py-frame.c47
-rw-r--r--gdb/python/py-framefilter.c2
-rw-r--r--gdb/python/py-function.c6
-rw-r--r--gdb/python/py-gdb-readline.c2
-rw-r--r--gdb/python/py-inferior.c16
-rw-r--r--gdb/python/py-infthread.c14
-rw-r--r--gdb/python/py-instruction.c2
-rw-r--r--gdb/python/py-lazy-string.c10
-rw-r--r--gdb/python/py-linetable.c24
-rw-r--r--gdb/python/py-membuf.c6
-rw-r--r--gdb/python/py-mi.c5
-rw-r--r--gdb/python/py-micmd.c7
-rw-r--r--gdb/python/py-objfile.c14
-rw-r--r--gdb/python/py-param.c7
-rw-r--r--gdb/python/py-prettyprint.c5
-rw-r--r--gdb/python/py-progspace.c9
-rw-r--r--gdb/python/py-record-btrace.c16
-rw-r--r--gdb/python/py-record.c14
-rw-r--r--gdb/python/py-registers.c25
-rw-r--r--gdb/python/py-stopevent.c2
-rw-r--r--gdb/python/py-symbol.c19
-rw-r--r--gdb/python/py-symtab.c11
-rw-r--r--gdb/python/py-tui.c4
-rw-r--r--gdb/python/py-type.c57
-rw-r--r--gdb/python/py-uiout.h3
-rw-r--r--gdb/python/py-unwind.c34
-rw-r--r--gdb/python/py-utils.c31
-rw-r--r--gdb/python/py-value.c73
-rw-r--r--gdb/python/python-internal.h58
-rw-r--r--gdb/python/python.c12
-rw-r--r--gdb/quick-symbol.h13
-rw-r--r--gdb/record-btrace.c44
-rw-r--r--gdb/regcache-dump.c19
-rw-r--r--gdb/remote.c97
-rw-r--r--gdb/remote.h5
-rw-r--r--gdb/rs6000-aix-tdep.c2
-rw-r--r--gdb/rs6000-lynx178-tdep.c2
-rw-r--r--gdb/rs6000-tdep.c4
-rw-r--r--gdb/run-on-main-thread.c15
-rw-r--r--gdb/rust-lang.h2
-rw-r--r--gdb/s390-tdep.c2
-rw-r--r--gdb/ser-base.c4
-rw-r--r--gdb/sh-tdep.c4
-rw-r--r--gdb/solib-aix.c14
-rw-r--r--gdb/solib-darwin.c13
-rw-r--r--gdb/solib-dsbt.c13
-rw-r--r--gdb/solib-frv.c14
-rw-r--r--gdb/solib-rocm.c20
-rw-r--r--gdb/solib-svr4.c51
-rw-r--r--gdb/solib-target.c15
-rw-r--r--gdb/solib.c23
-rw-r--r--gdb/solist.h4
-rw-r--r--gdb/source-cache.c6
-rw-r--r--gdb/source.c35
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/stabsread.c2487
-rw-r--r--gdb/stabsread.h101
-rw-r--r--gdb/stack.c3
-rw-r--r--gdb/stubs/ia64vms-stub.c4
-rw-r--r--gdb/stubs/m32r-stub.c4
-rw-r--r--gdb/symfile-debug.c6
-rw-r--r--gdb/symfile.c6
-rw-r--r--gdb/symfile.h4
-rw-r--r--gdb/symmisc.c32
-rw-r--r--gdb/symtab.c45
-rw-r--r--gdb/symtab.h22
-rw-r--r--gdb/target-debug.h2
-rw-r--r--gdb/target-descriptions.c11
-rw-r--r--gdb/target-descriptions.h1
-rw-r--r--gdb/target.c20
-rw-r--r--gdb/target.h8
-rw-r--r--gdb/testsuite/gdb.ada/call_pn.exp15
-rw-r--r--gdb/testsuite/gdb.ada/complete.exp4
-rw-r--r--gdb/testsuite/gdb.ada/exec_changed.exp2
-rw-r--r--gdb/testsuite/gdb.ada/tagged-lookup.exp8
-rw-r--r--gdb/testsuite/gdb.ada/task_switch_in_core.exp2
-rw-r--r--gdb/testsuite/gdb.arch/e500-prologue.exp2
-rw-r--r--gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp1
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-call.c105
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-call.exp398
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-map.c61
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-map.exp56
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-sigsegv.c92
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp64
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp124
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx.c59
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx.exp123
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp2
-rw-r--r--gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp2
-rw-r--r--gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp2
-rw-r--r--gdb/testsuite/gdb.arch/sparc64-adi.c1
-rw-r--r--gdb/testsuite/gdb.base/attach-deleted-exec.exp24
-rw-r--r--gdb/testsuite/gdb.base/bp-cond-failure.c14
-rw-r--r--gdb/testsuite/gdb.base/bp-cond-failure.exp46
-rw-r--r--gdb/testsuite/gdb.base/break-interp.exp22
-rw-r--r--gdb/testsuite/gdb.base/call-sc.exp2
-rw-r--r--gdb/testsuite/gdb.base/checkpoint.exp50
-rw-r--r--gdb/testsuite/gdb.base/completion.exp2
-rw-r--r--gdb/testsuite/gdb.base/corefile-buildid.exp7
-rw-r--r--gdb/testsuite/gdb.base/empty-host-env-vars.exp32
-rw-r--r--gdb/testsuite/gdb.base/filename-completion.exp387
-rw-r--r--gdb/testsuite/gdb.base/gnu-ifunc.exp2
-rw-r--r--gdb/testsuite/gdb.base/hbreak-unmapped.exp3
-rw-r--r--gdb/testsuite/gdb.base/info_sources_2.exp2
-rw-r--r--gdb/testsuite/gdb.base/killed-outside.exp2
-rw-r--r--gdb/testsuite/gdb.base/lineinc.exp2
-rw-r--r--gdb/testsuite/gdb.base/overlays.exp2
-rw-r--r--gdb/testsuite/gdb.base/reggroups.exp28
-rw-r--r--gdb/testsuite/gdb.base/remote.exp2
-rw-r--r--gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c1
-rw-r--r--gdb/testsuite/gdb.base/return.exp4
-rw-r--r--gdb/testsuite/gdb.base/scope-hw-watch-disable.exp18
-rw-r--r--gdb/testsuite/gdb.base/sigbpt.exp2
-rw-r--r--gdb/testsuite/gdb.base/signals.exp2
-rw-r--r--gdb/testsuite/gdb.base/sigrepeat.c2
-rw-r--r--gdb/testsuite/gdb.base/store.exp2
-rw-r--r--gdb/testsuite/gdb.base/structs.exp2
-rw-r--r--gdb/testsuite/gdb.base/style-logging.exp3
-rw-r--r--gdb/testsuite/gdb.base/style.exp13
-rw-r--r--gdb/testsuite/gdb.base/testenv.exp2
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp2
-rw-r--r--gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp2
-rw-r--r--gdb/testsuite/gdb.base/wrap-line.exp28
-rw-r--r--gdb/testsuite/gdb.btrace/event-tracing-gap.c (renamed from gdb/testsuite/gdb.arch/i386-mpx-simple_segv.c)24
-rw-r--r--gdb/testsuite/gdb.btrace/event-tracing-gap.exp75
-rw-r--r--gdb/testsuite/gdb.btrace/event-tracing.exp52
-rw-r--r--gdb/testsuite/gdb.btrace/null-deref.c26
-rw-r--r--gdb/testsuite/gdb.cp/rtti.exp2
-rw-r--r--gdb/testsuite/gdb.cp/step-and-next-inline.exp2
-rw-r--r--gdb/testsuite/gdb.cp/virtfunc.exp2
-rw-r--r--gdb/testsuite/gdb.dap/memory.exp3
-rw-r--r--gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c1
-rw-r--r--gdb/testsuite/gdb.debuginfod/corefile-mapped-file.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp3
-rw-r--r--gdb/testsuite/gdb.dwarf2/count.exp18
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp51
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp75
-rw-r--r--gdb/testsuite/gdb.dwarf2/enum-type-c++.cc35
-rw-r--r--gdb/testsuite/gdb.dwarf2/enum-type-c++.exp67
-rw-r--r--gdb/testsuite/gdb.dwarf2/enum-type.exp50
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-reread.S2
-rw-r--r--gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp3
-rw-r--r--gdb/testsuite/gdb.dwarf2/forward-spec.exp40
-rw-r--r--gdb/testsuite/gdb.dwarf2/gdb-index.exp8
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrconst.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrpiece.exp9
-rw-r--r--gdb/testsuite/gdb.dwarf2/multidictionary.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/pr13961.S4
-rw-r--r--gdb/testsuite/gdb.dwarf2/pr13961.exp3
-rw-r--r--gdb/testsuite/gdb.dwarf2/self-spec.exp4
-rw-r--r--gdb/testsuite/gdb.fortran/info-types.exp6
-rw-r--r--gdb/testsuite/gdb.fortran/types.exp2
-rw-r--r--gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp10
-rw-r--r--gdb/testsuite/gdb.gdb/python-helper.exp2
-rw-r--r--gdb/testsuite/gdb.go/integers.exp2
-rw-r--r--gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.exp2
-rw-r--r--gdb/testsuite/gdb.linespec/cpcompletion.exp2
-rw-r--r--gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp10
-rw-r--r--gdb/testsuite/gdb.mi/mi-break-qualified.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-break.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc6
-rw-r--r--gdb/testsuite/gdb.mi/mi-complete.exp3
-rw-r--r--gdb/testsuite/gdb.mi/mi-multi-commands.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-nsmoribund.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-nsthrexec.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-pending.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi-sym-info.exp3
-rw-r--r--gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cp.cc3
-rw-r--r--gdb/testsuite/gdb.mi/mi-vla-c99.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-vla-fortran.exp16
-rw-r--r--gdb/testsuite/gdb.modula2/builtin-procedure-adr.exp32
-rw-r--r--gdb/testsuite/gdb.multi/bp-thread-specific.exp24
-rw-r--r--gdb/testsuite/gdb.multi/inferior-specific-bp-1.c2
-rw-r--r--gdb/testsuite/gdb.multi/inferior-specific-bp-2.c2
-rw-r--r--gdb/testsuite/gdb.multi/inferior-specific-bp.exp67
-rw-r--r--gdb/testsuite/gdb.multi/multi-term-settings.c1
-rw-r--r--gdb/testsuite/gdb.multi/multi-term-settings.exp2
-rw-r--r--gdb/testsuite/gdb.opt/break-on-_exit.exp2
-rw-r--r--gdb/testsuite/gdb.pascal/floats.exp2
-rw-r--r--gdb/testsuite/gdb.pascal/integers.exp2
-rw-r--r--gdb/testsuite/gdb.pascal/types.exp2
-rw-r--r--gdb/testsuite/gdb.python/py-arch.exp2
-rw-r--r--gdb/testsuite/gdb.python/py-format-string.exp2
-rw-r--r--gdb/testsuite/gdb.python/py-inferior.exp3
-rw-r--r--gdb/testsuite/gdb.python/py-pp-cast.py2
-rw-r--r--gdb/testsuite/gdb.python/py-pp-maint.exp8
-rw-r--r--gdb/testsuite/gdb.python/py-pp-re-notag.py1
-rw-r--r--gdb/testsuite/gdb.python/py-prettyprint-stub.py2
-rw-r--r--gdb/testsuite/gdb.python/py-read-memory-leak.c27
-rw-r--r--gdb/testsuite/gdb.python/py-read-memory-leak.exp44
-rw-r--r--gdb/testsuite/gdb.python/py-read-memory-leak.py93
-rw-r--r--gdb/testsuite/gdb.python/python.exp9
-rw-r--r--gdb/testsuite/gdb.python/sys-exit.exp69
-rw-r--r--gdb/testsuite/gdb.reverse/func-map-to-same-line.exp4
-rw-r--r--gdb/testsuite/gdb.reverse/step-precsave.exp6
-rw-r--r--gdb/testsuite/gdb.reverse/step-reverse.exp6
-rw-r--r--gdb/testsuite/gdb.server/exit-multiple-threads.c1
-rw-r--r--gdb/testsuite/gdb.server/server-run.exp33
-rw-r--r--gdb/testsuite/gdb.testsuite/parse_options_args.exp2
-rw-r--r--gdb/testsuite/gdb.threads/create-fail.c2
-rw-r--r--gdb/testsuite/gdb.threads/fork-thread-pending.c1
-rw-r--r--gdb/testsuite/gdb.threads/interrupt-while-step-over.exp2
-rw-r--r--gdb/testsuite/gdb.threads/signal-command-handle-nopass.c19
-rw-r--r--gdb/testsuite/gdb.threads/signal-sigtrap.c17
-rw-r--r--gdb/testsuite/gdb.threads/thread-bp-deleted.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread_check.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls-sepdebug.exp13
-rw-r--r--gdb/testsuite/gdb.threads/watchpoint-fork-mt.c1
-rw-r--r--gdb/testsuite/gdb.trace/basic-libipa.exp6
-rw-r--r--gdb/testsuite/gdb.trace/change-loc.exp1
-rw-r--r--gdb/testsuite/gdb.trace/collection.exp4
-rw-r--r--gdb/testsuite/gdb.trace/entry-values.exp2
-rw-r--r--gdb/testsuite/gdb.trace/ftrace-lock.exp1
-rw-r--r--gdb/testsuite/gdb.trace/ftrace.exp1
-rw-r--r--gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp2
-rw-r--r--gdb/testsuite/gdb.trace/pending.exp1
-rw-r--r--gdb/testsuite/gdb.trace/range-stepping.exp1
-rw-r--r--gdb/testsuite/gdb.trace/strace.exp1
-rw-r--r--gdb/testsuite/gdb.trace/trace-break.exp1
-rw-r--r--gdb/testsuite/gdb.trace/trace-condition.exp1
-rw-r--r--gdb/testsuite/gdb.trace/trace-enable-disable.exp1
-rw-r--r--gdb/testsuite/gdb.trace/trace-mt.exp1
-rw-r--r--gdb/testsuite/gdb.trace/tspeed.exp1
-rw-r--r--gdb/testsuite/gdb.tui/info-win.exp2
-rw-r--r--gdb/testsuite/gdb.xml/tdesc-regs.exp35
-rw-r--r--gdb/testsuite/lib/dwarf.exp2
-rw-r--r--gdb/testsuite/lib/gdb-utils.exp3
-rw-r--r--gdb/testsuite/lib/gdb.exp248
-rw-r--r--gdb/testsuite/lib/mi-support.exp2
-rw-r--r--gdb/testsuite/lib/prelink-support.exp2
-rw-r--r--gdb/testsuite/lib/selftest-support.exp2
-rw-r--r--gdb/testsuite/lib/trace-support.exp14
-rw-r--r--gdb/tilegx-linux-nat.c2
-rw-r--r--gdb/top.c19
-rw-r--r--gdb/tracepoint.c16
-rw-r--r--gdb/tui/tui-source.c16
-rw-r--r--gdb/tui/tui-source.h6
-rw-r--r--gdb/tui/tui-winsource.h8
-rw-r--r--gdb/typeprint.c2
-rw-r--r--gdb/ui-out.c8
-rw-r--r--gdb/ui-out.h6
-rw-r--r--gdb/ui.c2
-rw-r--r--gdb/unittests/intrusive_list-selftests.c937
-rw-r--r--gdb/user-regs.c14
-rw-r--r--gdb/utils.c52
-rw-r--r--gdb/v850-tdep.c4
-rw-r--r--gdb/valops.c3
-rw-r--r--gdb/varobj.c5
-rw-r--r--gdbserver/i387-fp.cc89
-rw-r--r--gdbserver/linux-aarch32-tdesc.cc2
-rw-r--r--gdbserver/linux-aarch64-low.cc2
-rw-r--r--gdbserver/linux-aarch64-tdesc.cc3
-rw-r--r--gdbserver/linux-arc-low.cc4
-rw-r--r--gdbserver/linux-arm-low.cc2
-rw-r--r--gdbserver/linux-arm-tdesc.cc2
-rw-r--r--gdbserver/linux-csky-low.cc2
-rw-r--r--gdbserver/linux-loongarch-low.cc2
-rw-r--r--gdbserver/linux-low.cc2
-rw-r--r--gdbserver/linux-riscv-low.cc2
-rw-r--r--gdbserver/linux-tic6x-low.cc2
-rw-r--r--gdbserver/linux-x86-low.cc2
-rw-r--r--gdbserver/linux-x86-tdesc.cc15
-rw-r--r--gdbserver/netbsd-aarch64-low.cc2
-rw-r--r--gdbserver/netbsd-amd64-low.cc4
-rw-r--r--gdbserver/netbsd-i386-low.cc2
-rw-r--r--gdbserver/server.cc16
-rw-r--r--gdbserver/tdesc.cc24
-rw-r--r--gdbserver/tdesc.h11
-rw-r--r--gdbserver/win32-i386-low.cc4
-rw-r--r--gdbserver/win32-low.h7
-rw-r--r--gdbsupport/Makefile.am1
-rw-r--r--gdbsupport/Makefile.in15
-rw-r--r--gdbsupport/btrace-common.h3
-rw-r--r--gdbsupport/gdb_signals.h4
-rw-r--r--gdbsupport/intrusive_list.h105
-rw-r--r--gdbsupport/offset-type.h2
-rw-r--r--gdbsupport/osabi.cc98
-rw-r--r--gdbsupport/osabi.def57
-rw-r--r--gdbsupport/osabi.h54
-rw-r--r--gdbsupport/owning_intrusive_list.h168
-rw-r--r--gdbsupport/scope-exit.h3
-rw-r--r--gdbsupport/tdesc.h6
-rw-r--r--gdbsupport/x86-xstate.h17
-rw-r--r--gprof/po/pt_BR.po117
-rw-r--r--gprofng/common/hwc_cpus.h2
-rw-r--r--gprofng/common/hwctable.c8
-rw-r--r--gprofng/doc/Makefile.am9
-rw-r--r--gprofng/doc/Makefile.in12
-rw-r--r--gprofng/gp-display-html/gp-display-html.in766
-rw-r--r--gprofng/libcollector/unwind.c4
-rw-r--r--gprofng/src/BaseMetric.cc4
-rw-r--r--gprofng/src/BaseMetric.h2
-rw-r--r--gprofng/src/CallStack.cc33
-rw-r--r--gprofng/src/Emsg.h1
-rw-r--r--gprofng/src/Experiment.cc60
-rw-r--r--gprofng/src/Experiment.h2
-rw-r--r--gprofng/src/Table.h3
-rw-r--r--gprofng/src/collctrl.cc2
-rw-r--r--gprofng/src/hwc_arm_ampere_1.h419
-rw-r--r--gprofng/src/hwc_arm_neoverse_n1.h220
-rw-r--r--gprofng/testsuite/lib/Makefile.skel2
-rw-r--r--include/coff/i386.h34
-rw-r--r--include/coff/pe.h1
-rw-r--r--include/coff/x86.h59
-rw-r--r--include/coff/x86_64.h35
-rw-r--r--include/opcode/mips.h802
-rw-r--r--include/opcode/riscv-opc.h10
-rw-r--r--include/opcode/s390.h5
-rw-r--r--ld/NEWS5
-rw-r--r--ld/config.in3
-rwxr-xr-xld/configure46
-rw-r--r--ld/configure.ac22
-rw-r--r--ld/emultempl/elf.em2
-rwxr-xr-xld/genscripts.sh60
-rw-r--r--ld/ld.texi29
-rw-r--r--ld/ldbuildid.c48
-rw-r--r--ld/ldelf.c15
-rw-r--r--ld/ldlang.c19
-rw-r--r--ld/lexsup.c9
-rw-r--r--ld/pdb.c84
-rw-r--r--ld/pdb.h3
-rw-r--r--ld/pe-dll.c34
-rw-r--r--ld/scripttempl/arclinux.sc1
-rw-r--r--ld/scripttempl/elf.sc39
-rw-r--r--ld/scripttempl/elf32cr16.sc2
-rw-r--r--ld/scripttempl/elf32crx.sc2
-rw-r--r--ld/scripttempl/elfd10v.sc6
-rw-r--r--ld/scripttempl/elfxtensa.sc5
-rw-r--r--ld/scripttempl/mep.sc5
-rw-r--r--ld/scripttempl/misc-sections.sc28
-rw-r--r--ld/scripttempl/nds32elf.sc3
-rw-r--r--ld/scripttempl/v850.sc4
-rw-r--r--ld/scripttempl/v850_rh850.sc4
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp1
-rw-r--r--ld/testsuite/ld-arm/farcall-missing-type-main-undefweak.s10
-rw-r--r--ld/testsuite/ld-arm/farcall-missing-type-undefweak.d11
-rw-r--r--ld/testsuite/ld-elf/build-id.exp107
-rw-r--r--ld/testsuite/ld-elf/pr22393-1e.d2
-rw-r--r--ld/testsuite/ld-elf/pr22393-1f.d2
-rw-r--r--ld/testsuite/ld-elf/pr22393-2a.rd2
-rw-r--r--ld/testsuite/ld-elf/pr22393-2b.rd2
-rw-r--r--ld/testsuite/ld-elf/pr23658-1a.d6
-rw-r--r--ld/testsuite/ld-elf/pr23658-1c.d2
-rw-r--r--ld/testsuite/ld-elf/pr23658-1e.d24
-rw-r--r--ld/testsuite/ld-elf/pr23658-1f.d17
-rw-r--r--ld/testsuite/ld-elf/pr28639e.rd6
-rw-r--r--ld/testsuite/ld-elf/pr30508.d2
-rw-r--r--ld/testsuite/ld-elf/shared.exp10
-rw-r--r--ld/testsuite/ld-i386/i386.exp1
-rw-r--r--ld/testsuite/ld-i386/pr32191.d9
-rw-r--r--ld/testsuite/ld-i386/tlsgdesc1.d2
-rw-r--r--ld/testsuite/ld-i386/tlsgdesc2.d2
-rw-r--r--ld/testsuite/ld-i386/tlsgdesc3.d2
-rw-r--r--ld/testsuite/ld-i386/tlsie2.d2
-rw-r--r--ld/testsuite/ld-i386/tlsie3.d2
-rw-r--r--ld/testsuite/ld-i386/tlsie4.d2
-rw-r--r--ld/testsuite/ld-i386/tlsie5.d2
-rw-r--r--ld/testsuite/ld-pe/pdb-inlineelines1-c13-info2.d10
-rw-r--r--ld/testsuite/ld-pe/pdb-inlineelines1a.s20
-rw-r--r--ld/testsuite/ld-pe/pdb-inlineelines1b.s160
-rw-r--r--ld/testsuite/ld-pe/pdb.exp116
-rw-r--r--ld/testsuite/ld-pe/pdb2-section-contrib.d4
-rw-r--r--ld/testsuite/ld-pe/pe.exp30
-rw-r--r--ld/testsuite/ld-pe/secidx-reloc.d5
-rw-r--r--ld/testsuite/ld-pe/secrel-reloc.d5
-rw-r--r--ld/testsuite/ld-x86-64/lam-u48.rd1
-rw-r--r--ld/testsuite/ld-x86-64/lam-u57.rd1
-rw-r--r--ld/testsuite/ld-x86-64/plt3.s27
-rw-r--r--ld/testsuite/ld-x86-64/pr22393-3a.rd2
-rw-r--r--ld/testsuite/ld-x86-64/pr22393-3b.rd2
-rw-r--r--ld/testsuite/ld-x86-64/pr32189.s35
-rw-r--r--ld/testsuite/ld-x86-64/pr32191-x32.d9
-rw-r--r--ld/testsuite/ld-x86-64/pr32191.d9
-rw-r--r--ld/testsuite/ld-x86-64/pr32191.s5
-rw-r--r--ld/testsuite/ld-x86-64/tlsdesc3.d2
-rw-r--r--ld/testsuite/ld-x86-64/tlsdesc4.d2
-rw-r--r--ld/testsuite/ld-x86-64/tlsdesc5.d2
-rw-r--r--ld/testsuite/ld-x86-64/tlsie2.d2
-rw-r--r--ld/testsuite/ld-x86-64/tlsie3.d2
-rw-r--r--ld/testsuite/ld-x86-64/tlsie5.d2
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp28
-rw-r--r--ld/testsuite/lib/ld-lib.exp9
-rw-r--r--libctf/testsuite/lib/ctf-lib.exp15
-rw-r--r--libctf/testsuite/libctf-regression/libctf-repeat-cu.exp2
-rw-r--r--ltmain.sh46
-rw-r--r--opcodes/i386-dis.c5
-rw-r--r--opcodes/i386-opc.tbl341
-rw-r--r--opcodes/i386-tbl.h4116
-rw-r--r--opcodes/m68k-dis.c27
-rw-r--r--opcodes/riscv-dis.c2
-rw-r--r--opcodes/s390-dis.c14
-rw-r--r--opcodes/s390-mkopc.c2
-rw-r--r--opcodes/s390-opc.c68
-rw-r--r--opcodes/s390-opc.txt112
707 files changed, 16796 insertions, 12212 deletions
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index b3d97d4..e9b479a 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1322,7 +1322,7 @@ REGEN_TEXI = \
$(MKDOC) -f $(srcdir)/doc/doc.str < $< > $@.tmp; \
texi=$@; \
texi=$${texi%.stamp}.texi; \
- test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \
+ test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi $$texi; \
$(SHELL) $(srcdir)/../move-if-change $@.tmp $$texi; \
touch $@; \
)
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 40ec416..3b047d9 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1260,6 +1260,11 @@ typedef struct _symbol_info
const char *stab_name; /* String for stab type. */
} symbol_info;
+/* An empty string that will not match the address of any other
+ symbol name, even unnamed local symbols which will also have empty
+ string names. This can be used to flag a symbol as corrupt if its
+ name uses an out of range string table index. */
+extern const char bfd_symbol_error_name[];
#define bfd_get_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index cc1c655..5754dbb 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1928,7 +1928,7 @@ coff_get_normalized_symtab (bfd *abfd)
if ((bfd_size_type) aux->u.auxent.x_file.x_n.x_n.x_offset
>= obj_coff_strings_len (abfd))
sym->u.syment._n._n_n._n_offset =
- (uintptr_t) _("<corrupt>");
+ (uintptr_t) bfd_symbol_error_name;
else
sym->u.syment._n._n_n._n_offset =
(uintptr_t) (string_table
@@ -1978,7 +1978,7 @@ coff_get_normalized_symtab (bfd *abfd)
if ((bfd_size_type) aux->u.auxent.x_file.x_n.x_n.x_offset
>= obj_coff_strings_len (abfd))
aux->u.auxent.x_file.x_n.x_n.x_offset =
- (uintptr_t) _("<corrupt>");
+ (uintptr_t) bfd_symbol_error_name;
else
aux->u.auxent.x_file.x_n.x_n.x_offset =
(uintptr_t) (string_table
@@ -2028,7 +2028,7 @@ coff_get_normalized_symtab (bfd *abfd)
}
if (sym->u.syment._n._n_n._n_offset >= obj_coff_strings_len (abfd))
sym->u.syment._n._n_n._n_offset =
- (uintptr_t) _("<corrupt>");
+ (uintptr_t) bfd_symbol_error_name;
else
sym->u.syment._n._n_n._n_offset =
(uintptr_t) (string_table
@@ -2047,7 +2047,7 @@ coff_get_normalized_symtab (bfd *abfd)
the debug data. */
if (sym->u.syment._n._n_n._n_offset >= debug_sec->size)
sym->u.syment._n._n_n._n_offset =
- (uintptr_t) _("<corrupt>");
+ (uintptr_t) bfd_symbol_error_name;
else
sym->u.syment._n._n_n._n_offset =
(uintptr_t) (debug_sec_data
@@ -2161,11 +2161,13 @@ coff_print_symbol (bfd *abfd,
bfd_print_symbol_type how)
{
FILE * file = (FILE *) filep;
+ const char *symname = (symbol->name != bfd_symbol_error_name
+ ? symbol->name : _("<corrupt>"));
switch (how)
{
case bfd_print_symbol_name:
- fprintf (file, "%s", symbol->name);
+ fprintf (file, "%s", symname);
break;
case bfd_print_symbol_more:
@@ -2189,7 +2191,7 @@ coff_print_symbol (bfd *abfd,
if (combined < obj_raw_syments (abfd)
|| combined >= obj_raw_syments (abfd) + obj_raw_syment_count (abfd))
{
- fprintf (file, _("<corrupt info> %s"), symbol->name);
+ fprintf (file, _("<corrupt info> %s"), symname);
break;
}
@@ -2207,7 +2209,7 @@ coff_print_symbol (bfd *abfd,
combined->u.syment.n_sclass,
combined->u.syment.n_numaux);
bfd_fprintf_vma (abfd, file, val);
- fprintf (file, " %s", symbol->name);
+ fprintf (file, " %s", symname);
for (aux = 0; aux < combined->u.syment.n_numaux; aux++)
{
@@ -2297,7 +2299,9 @@ coff_print_symbol (bfd *abfd,
if (l)
{
- fprintf (file, "\n%s :", l->u.sym->name);
+ fprintf (file, "\n%s :",
+ l->u.sym->name != bfd_symbol_error_name
+ ? l->u.sym->name : _("<corrupt>"));
l++;
while (l->line_number)
{
@@ -2317,7 +2321,7 @@ coff_print_symbol (bfd *abfd,
symbol->section->name,
coffsymbol (symbol)->native ? "n" : "g",
coffsymbol (symbol)->lineno ? "l" : " ",
- symbol->name);
+ symname);
}
}
}
diff --git a/bfd/doc/local.mk b/bfd/doc/local.mk
index 5e8f486..9767e58 100644
--- a/bfd/doc/local.mk
+++ b/bfd/doc/local.mk
@@ -101,7 +101,7 @@ REGEN_TEXI = \
$(MKDOC) -f $(srcdir)/%D%/doc.str < $< > $@.tmp; \
texi=$@; \
texi=$${texi%.stamp}.texi; \
- test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \
+ test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi $$texi; \
$(SHELL) $(srcdir)/../move-if-change $@.tmp $$texi; \
touch $@; \
)
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 0450176..d0cb9e1 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -1452,11 +1452,13 @@ _bfd_ecoff_print_symbol (bfd *abfd,
const struct ecoff_debug_swap * const debug_swap
= &ecoff_backend (abfd)->debug_swap;
FILE *file = (FILE *)filep;
+ const char *symname = (symbol->name != bfd_symbol_error_name
+ ? symbol->name : _("<corrupt>"));
switch (how)
{
case bfd_print_symbol_name:
- fprintf (file, "%s", symbol->name);
+ fprintf (file, "%s", symname);
break;
case bfd_print_symbol_more:
if (ecoffsymbol (symbol)->local)
@@ -1526,7 +1528,7 @@ _bfd_ecoff_print_symbol (bfd *abfd,
(unsigned) ecoff_ext.asym.sc,
(unsigned) ecoff_ext.asym.index,
jmptbl, cobol_main, weakext,
- symbol->name);
+ symname);
if (ecoffsymbol (symbol)->fdr != NULL
&& ecoff_ext.asym.index != indexNil)
@@ -3278,8 +3280,8 @@ ecoff_link_hash_newfunc (struct bfd_hash_entry *entry,
ret->abfd = NULL;
ret->written = 0;
ret->small = 0;
+ memset ((void *) &ret->esym, 0, sizeof ret->esym);
}
- memset ((void *) &ret->esym, 0, sizeof ret->esym);
return (struct bfd_hash_entry *) ret;
}
diff --git a/bfd/elf.c b/bfd/elf.c
index 9fe031d..997befd 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -301,7 +301,8 @@ bfd_elf_get_str_section (bfd *abfd, unsigned int shindex)
_bfd_error_handler
/* xgettext:c-format */
(_("%pB: string table [%u] is corrupt"), abfd, shindex);
- shstrtab[shstrtabsize - 1] = 0;
+ shstrtab = NULL;
+ i_shdrp[shindex]->sh_size = 0;
}
i_shdrp[shindex]->contents = shstrtab;
}
@@ -529,13 +530,11 @@ bfd_elf_get_elf_syms (bfd *ibfd,
}
/* Look up a symbol name. */
-const char *
-bfd_elf_sym_name (bfd *abfd,
- Elf_Internal_Shdr *symtab_hdr,
- Elf_Internal_Sym *isym,
- asection *sym_sec)
+static const char *
+bfd_elf_sym_name_raw (bfd *abfd,
+ Elf_Internal_Shdr *symtab_hdr,
+ Elf_Internal_Sym *isym)
{
- const char *name;
unsigned int iname = isym->st_name;
unsigned int shindex = symtab_hdr->sh_link;
@@ -547,9 +546,18 @@ bfd_elf_sym_name (bfd *abfd,
shindex = elf_elfheader (abfd)->e_shstrndx;
}
- name = bfd_elf_string_from_elf_section (abfd, shindex, iname);
+ return bfd_elf_string_from_elf_section (abfd, shindex, iname);
+}
+
+const char *
+bfd_elf_sym_name (bfd *abfd,
+ Elf_Internal_Shdr *symtab_hdr,
+ Elf_Internal_Sym *isym,
+ asection *sym_sec)
+{
+ const char *name = bfd_elf_sym_name_raw (abfd, symtab_hdr, isym);
if (name == NULL)
- name = "(null)";
+ name = bfd_symbol_error_name;
else if (sym_sec && *name == '\0')
name = bfd_section_name (sym_sec);
@@ -582,7 +590,7 @@ group_signature (bfd *abfd, Elf_Internal_Shdr *ghdr)
&isym, esym, &eshndx) == NULL)
return NULL;
- return bfd_elf_sym_name (abfd, hdr, &isym, NULL);
+ return bfd_elf_sym_name_raw (abfd, hdr, &isym);
}
static bool
@@ -2313,10 +2321,13 @@ bfd_elf_print_symbol (bfd *abfd,
bfd_print_symbol_type how)
{
FILE *file = (FILE *) filep;
+ const char *symname = (symbol->name != bfd_symbol_error_name
+ ? symbol->name : _("<corrupt>"));
+
switch (how)
{
case bfd_print_symbol_name:
- fprintf (file, "%s", symbol->name);
+ fprintf (file, "%s", symname);
break;
case bfd_print_symbol_more:
fprintf (file, "elf ");
@@ -2339,11 +2350,10 @@ bfd_elf_print_symbol (bfd *abfd,
if (bed->elf_backend_print_symbol_all)
name = (*bed->elf_backend_print_symbol_all) (abfd, filep, symbol);
- if (name == NULL)
- {
- name = symbol->name;
- bfd_print_symbol_vandf (abfd, file, symbol);
- }
+ if (name != NULL)
+ symname = name;
+ else
+ bfd_print_symbol_vandf (abfd, file, symbol);
fprintf (file, " %s\t", section_name);
/* Print the "other" value for a symbol. For common symbols,
@@ -2390,7 +2400,7 @@ bfd_elf_print_symbol (bfd *abfd,
fprintf (file, " 0x%02x", (unsigned int) st_other);
}
- fprintf (file, " %s", name);
+ fprintf (file, " %s", symname);
}
break;
}
@@ -8729,17 +8739,16 @@ swap_out_syms (bfd *abfd,
&& (flags & (BSF_SECTION_SYM | BSF_GLOBAL)) == BSF_SECTION_SYM)
{
/* Local section symbols have no name. */
- sym.st_name = (unsigned long) -1;
+ sym.st_name = 0;
}
else
{
/* Call _bfd_elf_strtab_offset after _bfd_elf_strtab_finalize
to get the final offset for st_name. */
- sym.st_name
- = (unsigned long) _bfd_elf_strtab_add (stt, syms[idx]->name,
- false);
- if (sym.st_name == (unsigned long) -1)
+ size_t stridx = _bfd_elf_strtab_add (stt, syms[idx]->name, false);
+ if (stridx == (size_t) -1)
goto error_return;
+ sym.st_name = stridx;
}
bfd_vma value = syms[idx]->value;
@@ -8950,9 +8959,7 @@ Unable to handle section index %x in ELF symbol. Using ABS instead."),
for (idx = 0; idx < outbound_syms_index; idx++)
{
struct elf_sym_strtab *elfsym = &symstrtab[idx];
- if (elfsym->sym.st_name == (unsigned long) -1)
- elfsym->sym.st_name = 0;
- else
+ if (elfsym->sym.st_name != 0)
elfsym->sym.st_name = _bfd_elf_strtab_offset (stt,
elfsym->sym.st_name);
if (info && info->callbacks->ctf_new_symbol)
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 7441ee2..17df8b3 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -10512,7 +10512,12 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
if (using_thumb_only (globals)
&& (r_type == R_ARM_THM_CALL
|| r_type == R_ARM_THM_JUMP24)
- && branch_type == ST_BRANCH_UNKNOWN)
+ && branch_type == ST_BRANCH_UNKNOWN
+ /* Exception to the rule above: a branch to an undefined weak
+ symbol is turned into a jump to the next instruction unless a
+ PLT entry will be created (see below). */
+ && !(h && h->root.type == bfd_link_hash_undefweak
+ && plt_offset == (bfd_vma) -1))
{
if (sym_sec != NULL
&& sym_sec->owner != NULL)
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index f27c062..2e8d595 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1723,7 +1723,7 @@ elf_i386_scan_relocs (bfd *abfd,
name = h->root.root.string;
else
name = bfd_elf_sym_name (abfd, symtab_hdr, isym,
- NULL);
+ NULL);
_bfd_error_handler
/* xgettext:c-format */
(_("%pB: `%s' accessed both as normal and "
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 85cbcbc..bb3ce8d 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1933,8 +1933,11 @@ v850_elf_info_to_howto_rela (bfd *abfd,
static bool
v850_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name)
{
- return ( (name[0] == '.' && (name[1] == 'L' || name[1] == '.'))
- || (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_'));
+ if (name[0] == '.' && (name[1] == 'L' || name[1] == '.'))
+ return true;
+ if (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_')
+ return true;
+ return false;
}
static bool
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 9eb1122..a498dbb 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -8819,6 +8819,8 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2,
symp->name = bfd_elf_string_from_elf_section (bfd1,
hdr1->sh_link,
ssym->st_name);
+ if (symp->name == NULL)
+ goto done;
symp++;
}
@@ -8832,6 +8834,8 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2,
symp->name = bfd_elf_string_from_elf_section (bfd2,
hdr2->sh_link,
ssym->st_name);
+ if (symp->name == NULL)
+ goto done;
symp++;
}
@@ -8878,14 +8882,22 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2,
goto done;
for (i = 0; i < count1; i++)
- symtable1[i].name
- = bfd_elf_string_from_elf_section (bfd1, hdr1->sh_link,
- symtable1[i].u.isym->st_name);
+ {
+ symtable1[i].name
+ = bfd_elf_string_from_elf_section (bfd1, hdr1->sh_link,
+ symtable1[i].u.isym->st_name);
+ if (symtable1[i].name == NULL)
+ goto done;
+ }
for (i = 0; i < count2; i++)
- symtable2[i].name
- = bfd_elf_string_from_elf_section (bfd2, hdr2->sh_link,
- symtable2[i].u.isym->st_name);
+ {
+ symtable2[i].name
+ = bfd_elf_string_from_elf_section (bfd2, hdr2->sh_link,
+ symtable2[i].u.isym->st_name);
+ if (symtable2[i].name == NULL)
+ goto done;
+ }
/* Sort symbol by name. */
qsort (symtable1, count1, sizeof (struct elf_symbol),
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index 5d7495c..63c6fdf 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -84,6 +84,14 @@ struct _bfd_loongarch_elf_obj_tdata
&& elf_tdata (bfd) != NULL \
&& elf_object_id (bfd) == LARCH_ELF_DATA)
+static bool
+elfNN_loongarch_object (bfd *abfd)
+{
+ return bfd_elf_allocate_object (abfd,
+ sizeof (struct _bfd_loongarch_elf_obj_tdata),
+ LARCH_ELF_DATA);
+}
+
struct relr_entry
{
asection *sec;
@@ -6159,6 +6167,8 @@ elf_loongarch64_hash_symbol (struct elf_link_hash_entry *h)
#define bfd_elfNN_bfd_reloc_name_lookup loongarch_reloc_name_lookup
#define elf_info_to_howto_rel NULL /* Fall through to elf_info_to_howto. */
#define elf_info_to_howto loongarch_info_to_howto_rela
+#define bfd_elfNN_mkobject \
+ elfNN_loongarch_object
#define bfd_elfNN_bfd_merge_private_bfd_data \
elfNN_loongarch_merge_private_bfd_data
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 90ecc27..c8bf45f 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -5612,7 +5612,7 @@ riscv_elf_is_target_special_symbol (bfd *abfd, asymbol *sym)
{
/* PR27584, local and empty symbols. Since they are usually
generated for pcrel relocations. */
- return (!strcmp (sym->name, "")
+ return (!sym->name[0]
|| _bfd_elf_is_local_label_name (abfd, sym->name)
/* PR27916, mapping symbols. */
|| riscv_elf_is_mapping_symbols (sym->name));
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index 64b7d71..4b48d8e 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1182,8 +1182,8 @@ static struct riscv_implicit_subset riscv_implicit_subsets[] =
{"m", "+zmmul", check_implicit_always},
- {"zabha", "+a", check_implicit_always},
- {"zacas", "+a", check_implicit_always},
+ {"zabha", "+zaamo", check_implicit_always},
+ {"zacas", "+zaamo", check_implicit_always},
{"a", "+zaamo,+zalrsc", check_implicit_always},
{"xsfvcp", "+zve32x", check_implicit_always},
@@ -1439,6 +1439,7 @@ static struct riscv_supported_ext riscv_supported_std_s_ext[] =
{"smcsrind", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"smcntrpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
+ {"smrnmi", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"ssaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"ssccptr", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 5386847..4da842e 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -1126,7 +1126,7 @@ _bfd_munmap_readonly_temporary (void *ptr, size_t rsize)
{
/* NB: Since _bfd_munmap_readonly_temporary is called like free, PTR
may be NULL. Otherwise, PTR and RSIZE must be valid. If RSIZE is
- 0, _bfd_malloc_and_read is called. */
+ 0, free is called. */
if (ptr == NULL)
return;
if (rsize != 0)
diff --git a/bfd/pef.c b/bfd/pef.c
index f330b92..2d2f559 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -210,16 +210,18 @@ bfd_pef_print_symbol (bfd *abfd,
bfd_print_symbol_type how)
{
FILE *file = (FILE *) afile;
+ const char *symname = (symbol->name != bfd_symbol_error_name
+ ? symbol->name : _("<corrupt>"));
switch (how)
{
case bfd_print_symbol_name:
- fprintf (file, "%s", symbol->name);
+ fprintf (file, "%s", symname);
break;
default:
bfd_print_symbol_vandf (abfd, (void *) file, symbol);
- fprintf (file, " %-5s %s", symbol->section->name, symbol->name);
- if (startswith (symbol->name, "__traceback_"))
+ fprintf (file, " %-5s %s", symbol->section->name, symname);
+ if (startswith (symname, "__traceback_"))
{
unsigned char *buf;
size_t offset = symbol->value + 4;
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 11807ef..eb5d6da 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -127,7 +127,7 @@ bfd_cleanup coff_real_object_p
#ifndef NO_COFF_RELOCS
static void
-coff_swap_reloc_in (bfd * abfd, void * src, void * dst)
+coff_swap_reloc_in (bfd *abfd, void *src, void *dst)
{
RELOC *reloc_src = (RELOC *) src;
struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
@@ -141,7 +141,7 @@ coff_swap_reloc_in (bfd * abfd, void * src, void * dst)
}
static unsigned int
-coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
+coff_swap_reloc_out (bfd *abfd, void *src, void *dst)
{
struct internal_reloc *reloc_src = (struct internal_reloc *) src;
struct external_reloc *reloc_dst = (struct external_reloc *) dst;
@@ -166,7 +166,7 @@ coff_swap_reloc_out (bfd * abfd, void * src, void * dst)
#endif
static void
-coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
+coff_swap_filehdr_in (bfd *abfd, void *src, void *dst)
{
FILHDR *filehdr_src = (FILHDR *) src;
struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
@@ -202,7 +202,7 @@ coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
#endif
static void
-coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
+coff_swap_scnhdr_in (bfd *abfd, void *ext, void *in)
{
SCNHDR *scnhdr_ext = (SCNHDR *) ext;
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
@@ -233,7 +233,8 @@ coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
{
scnhdr_int->s_vaddr += pe_data (abfd)->pe_opthdr.ImageBase;
/* Do not cut upper 32-bits for 64-bit vma. */
-#if !defined(COFF_WITH_pex64) && !defined(COFF_WITH_peAArch64) && !defined(COFF_WITH_peLoongArch64) && !defined(COFF_WITH_peRiscV64)
+#if (!defined(COFF_WITH_pex64) && !defined(COFF_WITH_peAArch64) \
+ && !defined(COFF_WITH_peLoongArch64) && !defined(COFF_WITH_peRiscV64))
scnhdr_int->s_vaddr &= 0xffffffff;
#endif
}
@@ -256,7 +257,7 @@ coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
}
static bool
-pe_mkobject (bfd * abfd)
+pe_mkobject (bfd *abfd)
{
/* Some x86 code followed by an ascii string. */
static const char default_dos_message[64] = {
@@ -290,9 +291,9 @@ pe_mkobject (bfd * abfd)
/* Create the COFF backend specific information. */
static void *
-pe_mkobject_hook (bfd * abfd,
- void * filehdr,
- void * aouthdr ATTRIBUTE_UNUSED)
+pe_mkobject_hook (bfd *abfd,
+ void *filehdr,
+ void *aouthdr ATTRIBUTE_UNUSED)
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
pe_data_type *pe;
@@ -344,7 +345,7 @@ pe_mkobject_hook (bfd * abfd,
}
static bool
-pe_print_private_bfd_data (bfd *abfd, void * vfile)
+pe_print_private_bfd_data (bfd *abfd, void *vfile)
{
FILE *file = (FILE *) vfile;
@@ -409,7 +410,7 @@ pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
There will be two symbols for the imported value, one the symbol name
and one with _imp__ prefixed. Allowing for the terminating nul's this
- is strlen (symbol_name) * 2 + 8 + 21 + strlen (source_dll).
+ is strlen (import_name) * 2 + 8 + 21 + strlen (source_dll).
The strings in the string table must start STRING__SIZE_SIZE bytes into
the table in order to for the string lookup code in coffgen/coffcode to
@@ -418,17 +419,17 @@ pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
#define NUM_ILF_SECTIONS 6
#define NUM_ILF_SYMS (2 + NUM_ILF_SECTIONS)
-#define SIZEOF_ILF_SYMS (NUM_ILF_SYMS * sizeof (* vars.sym_cache))
-#define SIZEOF_ILF_SYM_TABLE (NUM_ILF_SYMS * sizeof (* vars.sym_table))
-#define SIZEOF_ILF_NATIVE_SYMS (NUM_ILF_SYMS * sizeof (* vars.native_syms))
-#define SIZEOF_ILF_SYM_PTR_TABLE (NUM_ILF_SYMS * sizeof (* vars.sym_ptr_table))
-#define SIZEOF_ILF_EXT_SYMS (NUM_ILF_SYMS * sizeof (* vars.esym_table))
-#define SIZEOF_ILF_RELOCS (NUM_ILF_RELOCS * sizeof (* vars.reltab))
-#define SIZEOF_ILF_INT_RELOCS (NUM_ILF_RELOCS * sizeof (* vars.int_reltab))
-#define SIZEOF_ILF_STRINGS (strlen (symbol_name) * 2 + 8 \
- + 21 + strlen (source_dll) \
- + NUM_ILF_SECTIONS * 9 \
- + STRING_SIZE_SIZE)
+#define SIZEOF_ILF_SYMS (NUM_ILF_SYMS * sizeof (*vars.sym_cache))
+#define SIZEOF_ILF_SYM_TABLE (NUM_ILF_SYMS * sizeof (*vars.sym_table))
+#define SIZEOF_ILF_NATIVE_SYMS (NUM_ILF_SYMS * sizeof (*vars.native_syms))
+#define SIZEOF_ILF_SYM_PTR_TABLE (NUM_ILF_SYMS * sizeof (*vars.sym_ptr_table))
+#define SIZEOF_ILF_EXT_SYMS (NUM_ILF_SYMS * sizeof (*vars.esym_table))
+#define SIZEOF_ILF_RELOCS (NUM_ILF_RELOCS * sizeof (*vars.reltab))
+#define SIZEOF_ILF_INT_RELOCS (NUM_ILF_RELOCS * sizeof (*vars.int_reltab))
+#define SIZEOF_ILF_STRINGS (strlen (import_name) * 2 + 8 \
+ + 21 + strlen (source_dll) \
+ + NUM_ILF_SECTIONS * 9 \
+ + STRING_SIZE_SIZE)
#define SIZEOF_IDATA2 (5 * 4)
/* For PEx64 idata4 & 5 have thumb size of 8 bytes. */
@@ -440,9 +441,10 @@ pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
#define SIZEOF_IDATA5 (1 * 4)
#endif
-#define SIZEOF_IDATA6 (2 + strlen (symbol_name) + 1 + 1)
+#define SIZEOF_IDATA6 (2 + strlen (import_name) + 1 + 1)
#define SIZEOF_IDATA7 (strlen (source_dll) + 1 + 1)
-#define SIZEOF_ILF_SECTIONS (NUM_ILF_SECTIONS * sizeof (struct coff_section_tdata))
+#define SIZEOF_ILF_SECTIONS (NUM_ILF_SECTIONS \
+ * sizeof (struct coff_section_tdata))
#define ILF_DATA_SIZE \
+ SIZEOF_ILF_SYMS \
@@ -470,8 +472,8 @@ pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
struct bfd_symbol ** sym,
unsigned int sym_index)
{
- arelent * entry;
- struct internal_reloc * internal;
+ arelent *entry;
+ struct internal_reloc *internal;
entry = vars->reltab + vars->relcount;
internal = vars->int_reltab + vars->relcount;
@@ -505,8 +507,8 @@ pe_ILF_make_a_reloc (pe_ILF_vars * vars,
/* Move the queued relocs into the given section. */
static void
-pe_ILF_save_relocs (pe_ILF_vars * vars,
- asection_ptr sec)
+pe_ILF_save_relocs (pe_ILF_vars *vars,
+ asection_ptr sec)
{
/* Make sure that there is somewhere to store the internal relocs. */
if (coff_section_data (vars->abfd, sec) == NULL)
@@ -535,9 +537,9 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
asection_ptr section,
flagword extra_flags)
{
- coff_symbol_type * sym;
- combined_entry_type * ent;
- SYMENT * esym;
+ coff_symbol_type *sym;
+ combined_entry_type *ent;
+ SYMENT *esym;
unsigned short sclass;
if (extra_flags & BSF_LOCAL)
@@ -590,8 +592,8 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars,
sym->symbol.section = section;
sym->native = ent;
- * vars->table_ptr = vars->sym_index;
- * vars->sym_ptr_ptr = sym;
+ *vars->table_ptr = vars->sym_index;
+ *vars->sym_ptr_ptr = sym;
/* Adjust pointers for the next symbol. */
vars->sym_index ++;
@@ -792,7 +794,8 @@ pe_ILF_build_a_bfd (bfd * abfd,
char * symbol_name,
char * source_dll,
unsigned int ordinal,
- unsigned int types)
+ unsigned int types,
+ char * import_name)
{
bfd_byte * ptr;
pe_ILF_vars vars;
@@ -834,6 +837,17 @@ pe_ILF_build_a_bfd (bfd * abfd,
case IMPORT_NAME:
case IMPORT_NAME_NOPREFIX:
case IMPORT_NAME_UNDECORATE:
+ import_name = symbol_name;
+ break;
+
+ case IMPORT_NAME_EXPORTAS:
+ if (!import_name || !import_name[0])
+ {
+ _bfd_error_handler (_("%pB: missing import name for "
+ "IMPORT_NAME_EXPORTAS for %s"),
+ abfd, symbol_name);
+ return false;
+ }
break;
default:
@@ -922,8 +936,8 @@ pe_ILF_build_a_bfd (bfd * abfd,
Note we do not create a .idata$3 section as this is
created for us by the linker script. */
- id4 = pe_ILF_make_a_section (& vars, ".idata$4", SIZEOF_IDATA4, 0);
- id5 = pe_ILF_make_a_section (& vars, ".idata$5", SIZEOF_IDATA5, 0);
+ id4 = pe_ILF_make_a_section (&vars, ".idata$4", SIZEOF_IDATA4, 0);
+ id5 = pe_ILF_make_a_section (&vars, ".idata$5", SIZEOF_IDATA5, 0);
if (id4 == NULL || id5 == NULL)
goto error_return;
@@ -934,28 +948,29 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* See PR 20907 for a reproducer. */
goto error_return;
-#if defined(COFF_WITH_pex64) || defined(COFF_WITH_peAArch64) || defined(COFF_WITH_peLoongArch64) || defined (COFF_WITH_peRiscV64)
+#if (defined(COFF_WITH_pex64) || defined(COFF_WITH_peAArch64) \
+ || defined(COFF_WITH_peLoongArch64) || defined (COFF_WITH_peRiscV64))
((unsigned int *) id4->contents)[0] = ordinal;
((unsigned int *) id4->contents)[1] = 0x80000000;
((unsigned int *) id5->contents)[0] = ordinal;
((unsigned int *) id5->contents)[1] = 0x80000000;
#else
- * (unsigned int *) id4->contents = ordinal | 0x80000000;
- * (unsigned int *) id5->contents = ordinal | 0x80000000;
+ ((unsigned int *) id4->contents)[0] = ordinal | 0x80000000;
+ ((unsigned int *) id5->contents)[0] = ordinal | 0x80000000;
#endif
}
else
{
- char * symbol;
+ char *symbol;
unsigned int len;
/* Create .idata$6 - the Hint Name Table. */
- id6 = pe_ILF_make_a_section (& vars, ".idata$6", SIZEOF_IDATA6, 0);
+ id6 = pe_ILF_make_a_section (&vars, ".idata$6", SIZEOF_IDATA6, 0);
if (id6 == NULL)
goto error_return;
/* If necessary, trim the import symbol name. */
- symbol = symbol_name;
+ symbol = import_name;
/* As used by MS compiler, '_', '@', and '?' are alternative
forms of USER_LABEL_PREFIX, with '?' for c++ mangled names,
@@ -964,7 +979,8 @@ pe_ILF_build_a_bfd (bfd * abfd,
IMPORT_NAME_NOPREFIX and IMPORT_NAME_UNDECORATE as per the
PE COFF 6.0 spec (section 8.3, Import Name Type). */
- if (import_name_type != IMPORT_NAME)
+ if (import_name_type != IMPORT_NAME
+ && import_name_type != IMPORT_NAME_EXPORTAS)
{
char c = symbol[0];
@@ -1002,11 +1018,12 @@ pe_ILF_build_a_bfd (bfd * abfd,
}
/* Create an import symbol. */
- pe_ILF_make_a_symbol (& vars, "__imp_", symbol_name, id5, 0);
+ pe_ILF_make_a_symbol (&vars, "__imp_", symbol_name, id5, 0);
imp_sym = vars.sym_ptr_ptr - 1;
imp_index = vars.sym_index - 1;
- /* Create extra sections depending upon the type of import we are dealing with. */
+ /* Create extra sections depending upon the type of import we are
+ dealing with. */
switch (import_type)
{
int i;
@@ -1027,7 +1044,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
abort ();
/* Create the .text section. */
- text = pe_ILF_make_a_section (& vars, ".text", jtab[i].size, SEC_CODE);
+ text = pe_ILF_make_a_section (&vars, ".text", jtab[i].size, SEC_CODE);
if (text == NULL)
goto error_return;
@@ -1061,7 +1078,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
BFD_RELOC_32, (asymbol **) imp_sym,
imp_index);
- pe_ILF_save_relocs (& vars, text);
+ pe_ILF_save_relocs (&vars, text);
break;
case IMPORT_DATA:
@@ -1076,7 +1093,7 @@ pe_ILF_build_a_bfd (bfd * abfd,
switch (import_type)
{
case IMPORT_CODE:
- pe_ILF_make_a_symbol (& vars, "", symbol_name, text,
+ pe_ILF_make_a_symbol (&vars, "", symbol_name, text,
BSF_NOT_AT_END | BSF_FUNCTION);
break;
@@ -1093,30 +1110,31 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* Create an import symbol for the DLL, without the .dll suffix. */
ptr = (bfd_byte *) strrchr (source_dll, '.');
if (ptr)
- * ptr = 0;
- pe_ILF_make_a_symbol (& vars, "__IMPORT_DESCRIPTOR_", source_dll, NULL, 0);
+ *ptr = 0;
+ pe_ILF_make_a_symbol (&vars, "__IMPORT_DESCRIPTOR_", source_dll, NULL, 0);
if (ptr)
- * ptr = '.';
+ *ptr = '.';
/* Initialise the bfd. */
- memset (& internal_f, 0, sizeof (internal_f));
+ memset (&internal_f, 0, sizeof (internal_f));
internal_f.f_magic = magic;
internal_f.f_symptr = 0;
internal_f.f_nsyms = 0;
internal_f.f_flags = F_AR32WR | F_LNNO; /* XXX is this correct ? */
- if ( ! bfd_set_start_address (abfd, (bfd_vma) 0)
- || ! bfd_coff_set_arch_mach_hook (abfd, & internal_f))
+ if (!bfd_set_start_address (abfd, (bfd_vma) 0)
+ || !bfd_coff_set_arch_mach_hook (abfd, &internal_f))
goto error_return;
- if (bfd_coff_mkobject_hook (abfd, (void *) & internal_f, NULL) == NULL)
+ if (bfd_coff_mkobject_hook (abfd, (void *) &internal_f, NULL) == NULL)
goto error_return;
obj_pe (abfd) = true;
#ifdef THUMBPEMAGIC
if (vars.magic == THUMBPEMAGIC)
- /* Stop some linker warnings about thumb code not supporting interworking. */
+ /* Stop some linker warnings about thumb code not supporting
+ interworking. */
coff_data (abfd)->flags |= F_INTERWORK | F_INTERWORK_SET;
#endif
@@ -1173,12 +1191,13 @@ pe_ILF_cleanup (bfd *abfd)
Decode the element and return the appropriate target. */
static bfd_cleanup
-pe_ILF_object_p (bfd * abfd)
+pe_ILF_object_p (bfd *abfd)
{
bfd_byte buffer[14];
bfd_byte * ptr;
char * symbol_name;
char * source_dll;
+ char * import_name;
unsigned int machine;
bfd_size_type size;
unsigned int ordinal;
@@ -1266,7 +1285,7 @@ pe_ILF_object_p (bfd * abfd)
{
extern const bfd_target TARGET_LITTLE_SYM;
- if (abfd->xvec == & TARGET_LITTLE_SYM)
+ if (abfd->xvec == &TARGET_LITTLE_SYM)
magic = THUMBPEMAGIC;
}
#endif
@@ -1340,9 +1359,24 @@ pe_ILF_object_p (bfd * abfd)
return NULL;
}
+ /* An ILF file may contain a third string, after source_dll; this is
+ used for IMPORT_NAME_EXPORTAS. We know from above that the whole
+ block of data is null terminated, ptr[size-1]==0, but we don't
+ know how many individual null terminated strings we have in there.
+
+ First find the end of source_dll. */
+ import_name = source_dll + strlen (source_dll) + 1;
+ if ((bfd_byte *) import_name >= ptr + size)
+ {
+ /* If this points at the end of the ptr+size block, we only had
+ two strings. */
+ import_name = NULL;
+ }
+
/* Now construct the bfd. */
if (! pe_ILF_build_a_bfd (abfd, magic, symbol_name,
- source_dll, ordinal, types))
+ source_dll, ordinal, types,
+ import_name))
{
bfd_release (abfd, ptr);
return NULL;
@@ -1424,12 +1458,14 @@ pe_bfd_read_buildid (bfd *abfd)
(file_ptr) idd.PointerToRawData,
idd.SizeOfData, cvinfo, NULL))
{
- struct bfd_build_id* build_id = bfd_alloc (abfd,
- sizeof (struct bfd_build_id) + cvinfo->SignatureLength);
+ struct bfd_build_id *build_id;
+ size_t bidlen = sizeof (*build_id) + cvinfo->SignatureLength;
+
+ build_id = bfd_alloc (abfd, bidlen);
if (build_id)
{
build_id->size = cvinfo->SignatureLength;
- memcpy(build_id->data, cvinfo->Signature,
+ memcpy(build_id->data, cvinfo->Signature,
cvinfo->SignatureLength);
abfd->build_id = build_id;
}
@@ -1442,7 +1478,7 @@ pe_bfd_read_buildid (bfd *abfd)
}
static bfd_cleanup
-pe_bfd_object_p (bfd * abfd)
+pe_bfd_object_p (bfd *abfd)
{
bfd_byte buffer[6];
struct external_DOS_hdr dos_hdr;
@@ -1527,7 +1563,7 @@ pe_bfd_object_p (bfd * abfd)
if (opt_hdr_size != 0)
{
bfd_size_type amt = opt_hdr_size;
- bfd_byte * opthdr;
+ bfd_byte *opthdr;
/* PR 17521 file: 230-131433-0.004. */
if (amt < sizeof (PEAOUTHDR))
@@ -1561,7 +1597,7 @@ pe_bfd_object_p (bfd * abfd)
|| a->SectionAlignment >= 0x80000000)
{
_bfd_error_handler (_("%pB: adjusting invalid SectionAlignment"),
- abfd);
+ abfd);
a->SectionAlignment &= -a->SectionAlignment;
if (a->SectionAlignment >= 0x80000000)
a->SectionAlignment = 0x40000000;
diff --git a/bfd/plugin.c b/bfd/plugin.c
index f6c6fdb..de2137f 100644
--- a/bfd/plugin.c
+++ b/bfd/plugin.c
@@ -596,8 +596,12 @@ load_plugin (bfd *abfd)
static bfd_cleanup
bfd_plugin_object_p (bfd *abfd)
{
+ /* Since ld_plugin_object_p is called only for linker command-line input
+ objects, pass true to ld_plugin_object_p so that the same input IR
+ file won't be included twice if the LDPT_REGISTER_CLAIM_FILE_HOOK_V2
+ isn't used. */
if (ld_plugin_object_p)
- return ld_plugin_object_p (abfd, false);
+ return ld_plugin_object_p (abfd, true);
if (abfd->plugin_format == bfd_plugin_unknown && !load_plugin (abfd))
return NULL;
diff --git a/bfd/syms.c b/bfd/syms.c
index b370a33..68f0730 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -342,6 +342,11 @@ EXTERNAL
. const char *stab_name; {* String for stab type. *}
.} symbol_info;
.
+.{* An empty string that will not match the address of any other
+. symbol name, even unnamed local symbols which will also have empty
+. string names. This can be used to flag a symbol as corrupt if its
+. name uses an out of range string table index. *}
+.extern const char bfd_symbol_error_name[];
*/
#include "sysdep.h"
@@ -351,6 +356,8 @@ EXTERNAL
#include "bfdlink.h"
#include "aout/stab_gnu.h"
+const char bfd_symbol_error_name[] = { 0 };
+
/*
DOCDD
INODE
@@ -394,7 +401,7 @@ bfd_is_local_label (bfd *abfd, asymbol *sym)
if we didn't reject them here. */
if ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_FILE | BSF_SECTION_SYM)) != 0)
return false;
- if (sym->name == NULL)
+ if (sym->name == NULL || sym->name == bfd_symbol_error_name)
return false;
return bfd_is_local_label_name (abfd, sym->name);
}
@@ -777,7 +784,8 @@ bfd_symbol_info (asymbol *symbol, symbol_info *ret)
else
ret->value = symbol->value + symbol->section->vma;
- ret->name = symbol->name;
+ ret->name = (symbol->name != bfd_symbol_error_name
+ ? symbol->name : _("<corrupt>"));
}
/*
diff --git a/bfd/version.h b/bfd/version.h
index 6500259..7ef9515 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -16,7 +16,7 @@
In releases, the date is not included in either version strings or
sonames. */
-#define BFD_VERSION_DATE 20240907
+#define BFD_VERSION_DATE 20241011
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@
diff --git a/binutils/MAINTAINERS b/binutils/MAINTAINERS
index d69f546..6a584b5 100644
--- a/binutils/MAINTAINERS
+++ b/binutils/MAINTAINERS
@@ -73,9 +73,7 @@ responsibility among the other maintainers.
BFIN Jie Zhang <jzhang918@gmail.com>
BFIN Mike Frysinger <vapier@gentoo.org>
BPF Jose E. Marchesi <jose.marchesi@oracle.com>
- CR16 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
CRIS Hans-Peter Nilsson <hp@axis.com>
- CRX M R Swami Reddy <MR.Swami.Reddy@nsc.com>
CTF Nick Alcock <nick.alcock@oracle.com>
C-SKY Lifang Xia <lifang_xia@linux.alibaba.com>
C-SKY Yunhai Shang <yunhai@linux.alibaba.com>
@@ -119,7 +117,6 @@ responsibility among the other maintainers.
Moxie Anthony Green <green@moxielogic.com>
NDS32 Kuan-Lin Chen <kuanlinchentw@gmail.com>
NDS32 Wei-Cheng Wang <cole945@gmail.com>
- NetBSD support Matt Thomas <matt@netbsd.org>
Nios II Sandra Loosemore <sloosemore@baylibre.com>
Nios II Andrew Jenner <andrew@codesourcery.com>
OR1K Christian Svensson <blue@cmd.nu>
@@ -140,7 +137,6 @@ responsibility among the other maintainers.
SPU Alan Modra <amodra@gmail.com>
TIC54X Timothy Wall <twall@alum.mit.edu>
TIC6X Joseph Myers <josmyers@redhat.com>
- VAX Matt Thomas <matt@netbsd.org>
VAX Jan-Benedict Glaw <jbglaw@lug-owl.de>
Visium Eric Botcazou <ebotcazou@libertysurf.fr>
VMS Tristan Gingold <tgingold@free.fr>
@@ -171,7 +167,9 @@ goes with them.
Mark Mitchell
Bernd Schmidt
Svein Seldal
+ M R Swami Reddy
Martin Schwidefsky
+ Matt Thomas
--------- CGEN Maintainers -------------
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 6dc16a9..17e9416 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -271,16 +271,8 @@
#define PAGE_MASK ((bfd_vma) (- COFF_PAGE_SIZE))
#endif
-/* Get current BFD error message. */
-#define bfd_get_errmsg() (bfd_errmsg (bfd_get_error ()))
-
-/* Forward references. */
-static char *look_for_prog (const char *, const char *, int);
-static char *deduce_name (const char *);
-
-#ifdef DLLTOOL_MCORE_ELF
-static void mcore_elf_cache_filename (const char *);
-static void mcore_elf_gen_out_file (void);
+#ifndef NAME_MAX
+#define NAME_MAX 255
#endif
#ifdef HAVE_SYS_WAIT_H
@@ -402,11 +394,7 @@ static int dll_name_set_by_exp_name;
static int add_indirect = 0;
static int add_underscore = 0;
static int add_stdcall_underscore = 0;
-/* This variable can hold three different values. The value
- -1 (default) means that default underscoring should be used,
- zero means that no underscoring should be done, and one
- indicates that underscoring should be done. */
-static int leading_underscore = -1;
+static char *leading_underscore = NULL;
static int dontdeltemps = 0;
/* TRUE if we should export all symbols. Otherwise, we only export
@@ -487,9 +475,6 @@ static char * mcore_elf_linker_flags = NULL;
#define DRECTVE_SECTION_NAME ".drectve"
#endif
-/* What's the right name for this ? */
-#define PATHMAX 250
-
/* External name alias numbering starts here. */
#define PREFIX_ALIAS_BASE 20000
@@ -505,7 +490,7 @@ static char *tmp_stub_buf;
#define TMP_HEAD_O dlltmp (&tmp_head_o_buf, "%sh.o")
#define TMP_TAIL_S dlltmp (&tmp_tail_s_buf, "%st.s")
#define TMP_TAIL_O dlltmp (&tmp_tail_o_buf, "%st.o")
-#define TMP_STUB dlltmp (&tmp_stub_buf, "%ss")
+#define TMP_STUB dlltmp (&tmp_stub_buf, "%ssnnnnn.o")
/* This bit of assembly does jmp * .... */
static const unsigned char i386_jtab[] =
@@ -809,8 +794,9 @@ struct string_list
static struct string_list *excludes;
+/* Forward references. */
+static char *deduce_name (const char *);
static const char *xlate (const char *);
-static bfd *make_delay_head (void);
static void dll_name_list_free_contents (dll_name_list_node_type *);
static void identify_search_archive
(bfd *, void (*) (bfd *, bfd *, void *), void *);
@@ -818,6 +804,18 @@ static void identify_search_member (bfd *, bfd *, void *);
static void identify_search_section (bfd *, asection *, void *);
static void inform (const char *, ...) ATTRIBUTE_PRINTF_1;
+#ifdef DLLTOOL_MCORE_ELF
+static void mcore_elf_cache_filename (const char *);
+static void mcore_elf_gen_out_file (void);
+#endif
+
+/* Get current BFD error message. */
+static inline const char *
+bfd_get_errmsg (void)
+{
+ return bfd_errmsg (bfd_get_error ());
+}
+
static char *
prefix_encode (char *start, unsigned code)
{
@@ -907,33 +905,12 @@ rvabefore (int mach)
}
static const char *
-asm_prefix (int mach, const char *name)
+asm_prefix (const char *name)
{
- switch (mach)
- {
- case MARM:
- case MTHUMB:
- case MARM_INTERWORK:
- case MMCORE_BE:
- case MMCORE_LE:
- case MMCORE_ELF:
- case MMCORE_ELF_LE:
- case MARM_WINCE:
- case MAARCH64:
- break;
- case M386:
- case MX86:
- /* Symbol names starting with ? do not have a leading underscore. */
- if ((name && *name == '?') || leading_underscore == 0)
- break;
- else
- return "_";
- default:
- /* xgettext:c-format */
- fatal (_("Internal error: Unknown machine type: %d"), mach);
- break;
- }
- return "";
+ /* Symbol names starting with ? do not have a leading underscore. */
+ if (name && *name == '?')
+ return "";
+ return leading_underscore;
}
#define ASM_BYTE mtable[machine].how_byte
@@ -947,7 +924,7 @@ asm_prefix (int mach, const char *name)
#define ASM_ALIGN_SHORT mtable[machine].how_align_short
#define ASM_RVA_BEFORE rvabefore (machine)
#define ASM_RVA_AFTER rvaafter (machine)
-#define ASM_PREFIX(NAME) asm_prefix (machine, (NAME))
+#define ASM_PREFIX(NAME) asm_prefix (NAME)
#define ASM_ALIGN_LONG mtable[machine].how_align_long
#define HOW_BFD_READ_TARGET 0 /* Always default. */
#define HOW_BFD_WRITE_TARGET mtable[machine].how_bfd_target
@@ -1500,7 +1477,7 @@ add_excludes (const char *new_excludes)
if (*exclude_string == '@')
sprintf (new_exclude->string, "%s", exclude_string);
else
- sprintf (new_exclude->string, "%s%s", !leading_underscore ? "" : "_",
+ sprintf (new_exclude->string, "%s%s", leading_underscore,
exclude_string);
new_exclude->next = excludes;
excludes = new_exclude;
@@ -2150,11 +2127,10 @@ gen_exp_file (void)
if (create_compat_implib)
fprintf (f, "\t%s\t__imp_%s\n", ASM_GLOBAL, exp->name);
fprintf (f, "\t%s\t_imp_%s%s\n", ASM_GLOBAL,
- !leading_underscore ? "" : "_", exp->name);
+ leading_underscore, exp->name);
if (create_compat_implib)
fprintf (f, "__imp_%s:\n", exp->name);
- fprintf (f, "_imp_%s%s:\n",
- !leading_underscore ? "" : "_", exp->name);
+ fprintf (f, "_imp_%s%s:\n", leading_underscore, exp->name);
fprintf (f, "\t%s\t%s\n", ASM_LONG, exp->name);
}
}
@@ -2365,26 +2341,11 @@ make_imp_label (const char *prefix, const char *name)
static bfd *
make_one_lib_file (export_type *exp, int i, int delay)
{
- bfd * abfd;
- asymbol * exp_label;
- asymbol * iname = 0;
- asymbol * iname2;
- asymbol * iname_lab;
- asymbol ** iname_lab_pp;
- asymbol ** iname_pp;
-#ifndef EXTRA
-#define EXTRA 0
-#endif
- asymbol * ptrs[NSECS + 4 + EXTRA + 1];
- flagword applicable;
- char * outname = xmalloc (strlen (TMP_STUB) + 10);
- int oidx = 0;
-
-
- sprintf (outname, "%s%05d.o", TMP_STUB, i);
-
- abfd = bfd_openw (outname, HOW_BFD_WRITE_TARGET);
+ char *outname = TMP_STUB;
+ size_t name_len = strlen (outname);
+ sprintf (outname + name_len - 7, "%05d.o", i);
+ bfd *abfd = bfd_openw (outname, HOW_BFD_WRITE_TARGET);
if (!abfd)
/* xgettext:c-format */
fatal (_("bfd_open failed open stub file: %s: %s"),
@@ -2401,9 +2362,13 @@ make_one_lib_file (export_type *exp, int i, int delay)
bfd_set_private_flags (abfd, F_INTERWORK);
#endif
- applicable = bfd_applicable_section_flags (abfd);
-
/* First make symbols for the sections. */
+ flagword applicable = bfd_applicable_section_flags (abfd);
+#ifndef EXTRA
+#define EXTRA 0
+#endif
+ asymbol *ptrs[NSECS + 4 + EXTRA + 1];
+ int oidx = 0;
for (i = 0; i < NSECS; i++)
{
sinfo *si = secdata + i;
@@ -2430,7 +2395,7 @@ make_one_lib_file (export_type *exp, int i, int delay)
if (! exp->data)
{
- exp_label = bfd_make_empty_symbol (abfd);
+ asymbol *exp_label = bfd_make_empty_symbol (abfd);
exp_label->name = make_imp_label ("", exp->name);
exp_label->section = secdata[TEXT].sec;
exp_label->flags = BSF_GLOBAL;
@@ -2446,6 +2411,7 @@ make_one_lib_file (export_type *exp, int i, int delay)
/* Generate imp symbols with one underscore for Microsoft
compatibility, and with two underscores for backward
compatibility with old versions of cygwin. */
+ asymbol *iname = NULL;
if (create_compat_implib)
{
iname = bfd_make_empty_symbol (abfd);
@@ -2455,25 +2421,24 @@ make_one_lib_file (export_type *exp, int i, int delay)
iname->value = 0;
}
- iname2 = bfd_make_empty_symbol (abfd);
+ asymbol *iname2 = bfd_make_empty_symbol (abfd);
iname2->name = make_imp_label ("__imp_", exp->name);
iname2->section = secdata[IDATA5].sec;
iname2->flags = BSF_GLOBAL;
iname2->value = 0;
- iname_lab = bfd_make_empty_symbol (abfd);
-
+ asymbol *iname_lab = bfd_make_empty_symbol (abfd);
iname_lab->name = head_label;
iname_lab->section = bfd_und_section_ptr;
iname_lab->flags = 0;
iname_lab->value = 0;
- iname_pp = ptrs + oidx;
+ asymbol **iname_pp = ptrs + oidx;
if (create_compat_implib)
ptrs[oidx++] = iname;
ptrs[oidx++] = iname2;
- iname_lab_pp = ptrs + oidx;
+ asymbol **iname_lab_pp = ptrs + oidx;
ptrs[oidx++] = iname_lab;
ptrs[oidx] = 0;
@@ -2815,7 +2780,7 @@ make_head (void)
return abfd;
}
-bfd *
+static bfd *
make_delay_head (void)
{
FILE *f = fopen (TMP_HEAD_S, FOPEN_WT);
@@ -3056,29 +3021,26 @@ gen_lib_file (int delay)
if (dontdeltemps < 2)
{
- char *name;
- size_t stub_len = strlen (TMP_STUB);
+ char *name = TMP_STUB;
+ size_t name_len = strlen (name);
- name = xmalloc (stub_len + 10);
- memcpy (name, TMP_STUB, stub_len);
for (i = 0; (exp = d_exports_lexically[i]); i++)
{
/* Don't delete non-existent stubs for PRIVATE entries. */
if (exp->private)
continue;
- sprintf (name + stub_len, "%05d.o", i);
+ sprintf (name + name_len - 7, "%05d.o", i);
if (unlink (name) < 0)
/* xgettext:c-format */
non_fatal (_("cannot delete %s: %s"), name, strerror (errno));
if (ext_prefix_alias)
{
- sprintf (name + stub_len, "%05d.o", i + PREFIX_ALIAS_BASE);
+ sprintf (name + name_len - 7, "%05d.o", i + PREFIX_ALIAS_BASE);
if (unlink (name) < 0)
/* xgettext:c-format */
non_fatal (_("cannot delete %s: %s"), name, strerror (errno));
}
}
- free (name);
}
inform (_("Created lib file"));
@@ -3888,10 +3850,10 @@ main (int ac, char **av)
add_stdcall_underscore = 1;
break;
case OPTION_NO_LEADING_UNDERSCORE:
- leading_underscore = 0;
+ leading_underscore = "";
break;
case OPTION_LEADING_UNDERSCORE:
- leading_underscore = 1;
+ leading_underscore = "_";
break;
case OPTION_IDENTIFY_STRICT:
identify_strict = 1;
@@ -4022,12 +3984,18 @@ main (int ac, char **av)
|| strcmp (mname, "arm64") == 0);
/* Check the default underscore */
- int u = leading_underscore; /* Underscoring mode. -1 for use default. */
- if (u == -1)
- bfd_get_target_info (mtable[machine].how_bfd_target, NULL,
- NULL, &u, NULL);
- if (u != -1)
- leading_underscore = u != 0;
+ if (leading_underscore == NULL)
+ {
+ int u;
+ static char underscore[2];
+ bfd_get_target_info (mtable[machine].how_bfd_target, NULL,
+ NULL, &u, NULL);
+ if (u == -1)
+ u = 0;
+ underscore[0] = u;
+ underscore[1] = 0;
+ leading_underscore = underscore;
+ }
if (!dll_name && exp_name)
{
@@ -4069,7 +4037,7 @@ main (int ac, char **av)
{
/* If possible use a deterministic prefix. */
const char *input = imp_name ? imp_name : delayimp_name;
- if (input && strlen (input) + 2 <= NAME_MAX)
+ if (input && strlen (input) + sizeof ("_snnnnn.o") - 1 <= NAME_MAX)
{
tmp_prefix = xmalloc (strlen (input) + 2);
sprintf (tmp_prefix, "%s_", input);
diff --git a/binutils/nm.c b/binutils/nm.c
index faf27c5..7acf9a2 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -1227,7 +1227,8 @@ print_symbol (bfd * abfd,
format->print_symbol_info (&info, abfd);
- if (line_numbers)
+ const char *symname = bfd_asymbol_name (sym);
+ if (line_numbers && symname != NULL && symname[0] != 0)
{
struct lineno_cache *lc = bfd_usrdata (abfd);
const char *filename, *functionname;
@@ -1258,7 +1259,6 @@ print_symbol (bfd * abfd,
else if (bfd_is_und_section (bfd_asymbol_section (sym)))
{
unsigned int i;
- const char *symname;
/* For an undefined symbol, we try to find a reloc for the
symbol, and print the line number of the reloc. */
@@ -1274,7 +1274,6 @@ print_symbol (bfd * abfd,
bfd_map_over_sections (abfd, get_relocs, &rinfo);
}
- symname = bfd_asymbol_name (sym);
for (i = 0; i < lc->seccount; i++)
{
long j;
@@ -1287,6 +1286,7 @@ print_symbol (bfd * abfd,
if (r->sym_ptr_ptr != NULL
&& (*r->sym_ptr_ptr)->section == sym->section
&& (*r->sym_ptr_ptr)->value == sym->value
+ && bfd_asymbol_name (*r->sym_ptr_ptr) != NULL
&& strcmp (symname,
bfd_asymbol_name (*r->sym_ptr_ptr)) == 0
&& bfd_find_nearest_line (abfd, lc->secs[i], lc->syms,
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 24e31cc..3782850 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1590,14 +1590,14 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
{
char *new_name;
- if (name != NULL
- && name[0] == '_'
+ if (name[0] == '_'
&& name[1] == '_'
&& strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0)
{
- fatal (_("redefining symbols does not work on LTO-compiled object files"));
+ fatal (_("redefining symbols does not work"
+ " on LTO-compiled object files"));
}
-
+
new_name = (char *) lookup_sym_redefinition (name);
if (new_name == name
&& (flags & BSF_SECTION_SYM) != 0)
@@ -2956,7 +2956,7 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
pset = find_section_list (padd->name, false,
SECTION_CONTEXT_SET_FLAGS);
if (pset != NULL)
- {
+ {
flags = pset->flags | SEC_HAS_CONTENTS;
flags = check_new_section_flags (flags, obfd, padd->name);
}
diff --git a/binutils/testsuite/binutils-all/debuginfod.exp b/binutils/testsuite/binutils-all/debuginfod.exp
index 2f74644..af0dc09 100644
--- a/binutils/testsuite/binutils-all/debuginfod.exp
+++ b/binutils/testsuite/binutils-all/debuginfod.exp
@@ -34,12 +34,12 @@ if { ![is_elf_format] || ![isnative] } {
}
if { [which $OBJDUMP] == 0} {
- perror "$test $OBJDUMP (does not exist)"
+ perror "$test [file tail $OBJDUMP] (does not exist)"
return
}
if { [which $READELF] == 0} {
- perror "$test $READELF (does not exist)"
+ perror "$test [file tail $READELF] (does not exist)"
return
}
@@ -162,9 +162,9 @@ proc test_fetch_debuglink { prog progargs } {
set got [binutils_run $prog "$progargs tmpdir/testprog"]
if { [regexp ".*Found separate debug info file.*Contents\[^\n\]*loaded from\[^\n\]*" $got] } {
- pass "$test ($prog debuglink)"
+ pass "$test ([file tail $prog] debuglink)"
} else {
- fail "$test ($prog did not find debuglink to cache $cache)"
+ fail "$test ([file tail $prog] did not find debuglink to cache)"
}
}
@@ -178,9 +178,9 @@ proc test_fetch_debugaltlink { prog progargs } {
set buildid "00112233445566778899aabbccddeeff0123456789abcdef"
if { [regexp ".*Found separate debug info file\[^\n\]*$cache/$buildid" $got] } {
- pass "$test ($prog debugaltlink)"
+ pass "$test ([file tail $prog] debugaltlink)"
} else {
- fail "$test ($prog could not load debugaltlink)"
+ fail "$test ([file tail $prog] could not load debugaltlink)"
}
}
diff --git a/binutils/testsuite/binutils-all/dlltool.exp b/binutils/testsuite/binutils-all/dlltool.exp
index ac1306b..7bae86b 100644
--- a/binutils/testsuite/binutils-all/dlltool.exp
+++ b/binutils/testsuite/binutils-all/dlltool.exp
@@ -14,29 +14,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-if {![istarget "i*86-*-*"]
- && ![istarget "x86_64-*-mingw*"]
- && ![istarget "arm-*-pe*"]} {
+if { ![is_pecoff_format] } {
return
}
-if {![istarget "i*86-*-*pe*"] \
- && ![istarget "i*86-*-cygwin*"] \
- && ![istarget "i*86-*-mingw32*"] \
- && ![istarget "arm-*-pe*"] \
- && ![istarget "x86_64-*-mingw*"] } {
- set target_xfail "yes"
-} else {
- set target_xfail "no"
-}
-
-# PR 19459: The ARM does not support inserting a leading underscore.
-if { [istarget "arm-*-pe*"] } {
- set target_no_leading_underscore "yes"
-} else {
- set target_no_leading_underscore "no"
-}
-
if {![info exists DLLTOOL]} then {
return
}
@@ -56,10 +37,6 @@ if ![string match "" $err] then {
pass "dlltool (fastcall export)"
}
-if { "$target_xfail" == "yes" } {
- setup_xfail *-*
-}
-
verbose "$DLLTOOL -l libversion.a --def $srcdir/$subdir/version.def $dlltool_gas_flag" 1
catch "exec $DLLTOOL -l libersion.a --def $srcdir/$subdir/version.def $dlltool_gas_flag" err
@@ -71,10 +48,6 @@ if ![string match "" $err] then {
pass "dlltool (version.dll)"
}
-if { "$target_xfail" == "yes" } {
- setup_xfail *-*
-}
-
verbose "$DLLTOOL -p prefix --leading-underscore -l tmpdir/libalias.a -d $srcdir/$subdir/alias.def $dlltool_gas_flag" 1
catch "exec $DLLTOOL -p prefix --leading-underscore -l tmpdir/libalias.a -d $srcdir/$subdir/alias.def $dlltool_gas_flag" err
@@ -88,11 +61,7 @@ if ![string match "" $err] then {
pass "dlltool -p (execution)"
set got [binutils_run $NM "tmpdir/libalias.a"]
-if { "$target_no_leading_underscore" == "yes" } {
- set want "00000000 I __imp_prefixsymbol.*00000000 T prefixsymbol.*00000000 I __imp_symbol.*00000000 T symbol"
-} else {
- set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
-}
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
if [regexp $want $got] then {
pass "dlltool -p (symbol names)"
@@ -122,11 +91,7 @@ if ![string match "" $err] then {
pass "dlltool -p (execution) alias-2.def"
set got [binutils_run $NM "tmpdir/libalias2.a"]
-if { "$target_no_leading_underscore" == "yes" } {
- set want "00000000 I __imp_prefixsymbol.*00000000 T prefixsymbol.*00000000 I __imp_symbol.*00000000 T symbol"
-} else {
- set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
-}
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
if [regexp $want $got] then {
pass "dlltool -p (symbol names) alias-2.def"
@@ -241,15 +206,7 @@ if ![string match "" $err] then {
pass "dlltool -p (execution leading-underscore)"
set got [binutils_run $NM "tmpdir/libalias_u.a"]
-if { "$target_no_leading_underscore" == "yes" } {
- set want "00000000 I __imp_prefixsymbol.*00000000 T prefixsymbol.*00000000 I __imp_symbol.*00000000 T symbol"
-} else {
- set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
-}
-
-if { "$target_xfail" == "yes" } {
- setup_xfail *-*
-}
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
if [regexp $want $got] then {
pass "dlltool -p (symbol names leading underscore)"
@@ -279,11 +236,7 @@ if ![string match "" $err] then {
pass "dlltool -p (execution leading underscore) alias-2.def"
set got [binutils_run $NM "tmpdir/libalias_u2.a"]
-if { "$target_no_leading_underscore" == "yes" } {
- set want "00000000 I __imp_prefixsymbol.*00000000 T prefixsymbol.*00000000 I __imp_symbol.*00000000 T symbol"
-} else {
- set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
-}
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
if [regexp $want $got] then {
pass "dlltool -p (symbol names leading underscore) alias-2.def"
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 8d28407..403103d 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -275,27 +275,6 @@ proc is_generic { } {
return 0
}
-# Return true if target uses elf.em.
-proc uses_elf_em { } {
- if { ![is_elf_format] || [is_generic] } {
- return 0
- }
-
- # These targets don't use elf.em.
- if { [istarget "fr30-*-*"]
- || [istarget "frv-*-elf"]
- || [istarget "ft32-*-*"]
- || [istarget "iq2000-*-*"]
- || [istarget "mn10200-*-*"]
- || [istarget "moxie-*-moxiebox*"]
- || [istarget "msp430-*-*"]
- || [istarget "mt-*-*"] } {
- return 0
- }
-
- return 1
-}
-
# True if the object format is ELF with unused section symbols.
proc is_elf_unused_section_symbols {} {
global AS ASFLAGS READELF
diff --git a/gas/Makefile.am b/gas/Makefile.am
index b9b9e18..d025b75 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -362,9 +362,6 @@ TARG_ENV_CFILES = \
MULTI_CFILES = \
config/e-crisaout.c \
config/e-criself.c \
- config/e-i386aout.c \
- config/e-i386coff.c \
- config/e-i386elf.c \
config/e-mipself.c
CONFIG_ATOF_CFILES = \
diff --git a/gas/Makefile.in b/gas/Makefile.in
index b575163..fde7aa7 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -861,9 +861,6 @@ TARG_ENV_CFILES = \
MULTI_CFILES = \
config/e-crisaout.c \
config/e-criself.c \
- config/e-i386aout.c \
- config/e-i386coff.c \
- config/e-i386elf.c \
config/e-mipself.c
CONFIG_ATOF_CFILES = \
@@ -1284,12 +1281,6 @@ config/e-crisaout.$(OBJEXT): config/$(am__dirstamp) \
config/$(DEPDIR)/$(am__dirstamp)
config/e-criself.$(OBJEXT): config/$(am__dirstamp) \
config/$(DEPDIR)/$(am__dirstamp)
-config/e-i386aout.$(OBJEXT): config/$(am__dirstamp) \
- config/$(DEPDIR)/$(am__dirstamp)
-config/e-i386coff.$(OBJEXT): config/$(am__dirstamp) \
- config/$(DEPDIR)/$(am__dirstamp)
-config/e-i386elf.$(OBJEXT): config/$(am__dirstamp) \
- config/$(DEPDIR)/$(am__dirstamp)
config/e-mipself.$(OBJEXT): config/$(am__dirstamp) \
config/$(DEPDIR)/$(am__dirstamp)
config/m68k-parse.$(OBJEXT): config/$(am__dirstamp) \
@@ -1369,9 +1360,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/bfin-parse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/e-crisaout.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/e-criself.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/e-i386aout.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/e-i386coff.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/e-i386elf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/e-mipself.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/kvx-parse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@config/$(DEPDIR)/loongarch-lex.Po@am__quote@
diff --git a/gas/NEWS b/gas/NEWS
index 24055d2..d643301 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,7 +1,9 @@
-*- text -*-
-* Add support for RISC-V Zcmp (cm.mva01s, cm.mvsa01) and CORE-V (xcvbitmanip,
- xcvsimd) extensions with version 1.0.
+* On x86 emulation support (for secondary targets) was dropped.
+
+* Add support for RISC-V Zcmp (cm.mva01s, cm.mvsa01), Smrnmi and CORE-V
+ (xcvbitmanip, xcvsimd) extensions with version 1.0.
Changes in 2.43:
diff --git a/gas/app.c b/gas/app.c
index 41ba416..8dc69ff 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -45,6 +45,8 @@ static int scrub_m68k_mri;
/* The pseudo-op which switches in and out of MRI mode. See the
comment in do_scrub_chars. */
static const char mri_pseudo[] = ".mri 0";
+static const char *mri_state;
+static char mri_last_ch;
#else
#define scrub_m68k_mri 0
#endif
@@ -56,6 +58,15 @@ static const char symver_pseudo[] = ".symver";
static const char * symver_state;
#endif
+/* The pseudo-op (without leading dot) at which we want to (perhaps just
+ temporarily) stop processing. See the comments in do_scrub_chars(). */
+static const char end_pseudo[] = "end ";
+static const char * end_state;
+
+/* Whether, considering the state at start of assembly, NO_PSEUDO_DOT is
+ active. */
+static bool no_pseudo_dot;
+
static char last_char;
#define LEX_IS_SYMBOL_COMPONENT 1
@@ -159,6 +170,12 @@ do_scrub_begin (int m68k_mri ATTRIBUTE_UNUSED)
{
const char *p;
+ /* Latch this once at start. xtensa uses a hook function, yet context isn't
+ meaningful for scrubbing (or else we'd need to sync scrubber behavior as
+ state changes). */
+ if (lex['/'] == 0)
+ no_pseudo_dot = NO_PSEUDO_DOT;
+
#ifdef TC_M68K
scrub_m68k_mri = m68k_mri;
@@ -265,8 +282,6 @@ static int add_newlines;
static char *saved_input;
static size_t saved_input_len;
static char input_buffer[32 * 1024];
-static const char *mri_state;
-static char mri_last_ch;
/* Data structure for saving the state of app across #include's. Note that
app is called asynchronously to the parsing of the .include's, so our
@@ -282,11 +297,12 @@ struct app_save
int add_newlines;
char * saved_input;
size_t saved_input_len;
+ const char * end_state;
#ifdef TC_M68K
int scrub_m68k_mri;
-#endif
const char * mri_state;
char mri_last_ch;
+#endif
#if defined TC_ARM && defined OBJ_ELF
const char * symver_state;
#endif
@@ -312,11 +328,12 @@ app_push (void)
memcpy (saved->saved_input, saved_input, saved_input_len);
saved->saved_input_len = saved_input_len;
}
+ saved->end_state = end_state;
#ifdef TC_M68K
saved->scrub_m68k_mri = scrub_m68k_mri;
-#endif
saved->mri_state = mri_state;
saved->mri_last_ch = mri_last_ch;
+#endif
#if defined TC_ARM && defined OBJ_ELF
saved->symver_state = symver_state;
#endif
@@ -352,11 +369,12 @@ app_pop (char *arg)
saved_input_len = saved->saved_input_len;
free (saved->saved_input);
}
+ end_state = saved->end_state;
#ifdef TC_M68K
scrub_m68k_mri = saved->scrub_m68k_mri;
-#endif
mri_state = saved->mri_state;
mri_last_ch = saved->mri_last_ch;
+#endif
#if defined TC_ARM && defined OBJ_ELF
symver_state = saved->symver_state;
#endif
@@ -800,12 +818,51 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen,
recycle:
+ /* We need to watch out for .end directives: We should in particular not
+ issue diagnostics for anything after an active one. */
+ if (end_state == NULL)
+ {
+ if ((state == 0 || state == 1)
+ && (ch == '.'
+ || (no_pseudo_dot && ch == end_pseudo[0])))
+ end_state = end_pseudo + (ch != '.');
+ }
+ else if (ch != '\0'
+ && (*end_state == ch
+ /* Avoid triggering on directives like .endif or .endr. */
+ || (*end_state == ' ' && !IS_SYMBOL_COMPONENT (ch))))
+ {
+ if (IS_NEWLINE (ch) || IS_LINE_SEPARATOR (ch))
+ goto end_end;
+ ++end_state;
+ }
+ else if (*end_state != '\0')
+ /* We did not get the expected character, or we didn't
+ get a valid terminating character after seeing the
+ entire pseudo-op, so we must go back to the beginning. */
+ end_state = NULL;
+ else if (IS_NEWLINE (ch) || IS_LINE_SEPARATOR (ch))
+ {
+ end_end:
+ /* We've read the entire pseudo-op. If this is the end of the line,
+ bail out now by (ab)using the output-full path. This allows the
+ caller to process input up to here and terminate processing if this
+ directive is actually active (not on the false branch of a
+ conditional and not in a macro definition). */
+ end_state = NULL;
+ state = 0;
+ PUT (ch);
+ goto tofull;
+ }
+
#if defined TC_ARM && defined OBJ_ELF
/* We need to watch out for .symver directives. See the comment later
in this function. */
if (symver_state == NULL)
{
- if ((state == 0 || state == 1) && ch == symver_pseudo[0])
+ if ((state == 0 || state == 1)
+ && strchr (tc_comment_chars, '@') != NULL
+ && ch == symver_pseudo[0])
symver_state = symver_pseudo + 1;
}
else
@@ -1432,11 +1489,13 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen,
/* This is a common case. Quickly copy CH and all the
following symbol component or normal characters. */
if (to + 1 < toend
+#ifdef TC_M68K
&& mri_state == NULL
+#endif
#if defined TC_ARM && defined OBJ_ELF
&& symver_state == NULL
#endif
- )
+ && end_state == NULL)
{
char *s;
ptrdiff_t len;
diff --git a/gas/as.c b/gas/as.c
index 1b506f2..030da2e 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -130,10 +130,6 @@ static long start_time;
#ifdef USE_EMULATIONS
#define EMULATION_ENVIRON "AS_EMULATION"
-extern struct emulation mipsbelf, mipslelf, mipself;
-extern struct emulation i386coff, i386elf, i386aout;
-extern struct emulation crisaout, criself;
-
static struct emulation *const emulations[] = { EMULATIONS };
static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]);
@@ -182,13 +178,6 @@ select_emulation_mode (int argc, char **argv)
this_emulation->init ();
}
-const char *
-default_emul_bfd_name (void)
-{
- abort ();
- return NULL;
-}
-
void
common_emul_init (void)
{
diff --git a/gas/config.in b/gas/config.in
index a1f8349..c32b46b 100644
--- a/gas/config.in
+++ b/gas/config.in
@@ -60,6 +60,9 @@
/* Define default value for RISC-V -mpriv-spec */
#undef DEFAULT_RISCV_PRIV_SPEC
+/* Define to 1 if you want to check x86 TLS relocation by default. */
+#undef DEFAULT_X86_TLS_CHECK
+
/* Define to 1 if you want to generate GNU x86 used ISA and feature properties
by default. */
#undef DEFAULT_X86_USED_NOTE
diff --git a/gas/config/e-crisaout.c b/gas/config/e-crisaout.c
index 4bd97ae..be2d1b0 100644
--- a/gas/config/e-crisaout.c
+++ b/gas/config/e-crisaout.c
@@ -20,16 +20,6 @@
#include "as.h"
#include "emul.h"
-static const char *crisaout_bfd_name (void);
-
-static const char *
-crisaout_bfd_name (void)
-{
- abort ();
- return NULL;
-}
-
-#define emul_bfd_name crisaout_bfd_name
#define emul_format &aout_format_ops
#define emul_name "crisaout"
diff --git a/gas/config/e-criself.c b/gas/config/e-criself.c
index 6998bee..713d851 100644
--- a/gas/config/e-criself.c
+++ b/gas/config/e-criself.c
@@ -20,16 +20,6 @@
#include "as.h"
#include "emul.h"
-static const char *criself_bfd_name (void);
-
-static const char *
-criself_bfd_name (void)
-{
- abort ();
- return NULL;
-}
-
-#define emul_bfd_name criself_bfd_name
#define emul_format &elf_format_ops
#define emul_name "criself"
diff --git a/gas/config/e-i386aout.c b/gas/config/e-i386aout.c
deleted file mode 100644
index 723a5ac..0000000
--- a/gas/config/e-i386aout.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2007-2024 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS 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, or (at your option)
- any later version.
-
- GAS 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 GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "as.h"
-#include "emul.h"
-
-static const char *i386aout_bfd_name (void);
-
-static const char *
-i386aout_bfd_name (void)
-{
- abort ();
- return NULL;
-}
-
-#define emul_bfd_name i386aout_bfd_name
-#define emul_format &aout_format_ops
-
-#define emul_name "i386aout"
-#define emul_struct_name i386aout
-#define emul_default_endian 0
-#include "emul-target.h"
diff --git a/gas/config/e-i386coff.c b/gas/config/e-i386coff.c
deleted file mode 100644
index 62e8631..0000000
--- a/gas/config/e-i386coff.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2007-2024 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS 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, or (at your option)
- any later version.
-
- GAS 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 GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "as.h"
-#include "emul.h"
-
-static const char *i386coff_bfd_name (void);
-
-static const char *
-i386coff_bfd_name (void)
-{
- abort ();
- return NULL;
-}
-
-#define emul_bfd_name i386coff_bfd_name
-#define emul_format &coff_format_ops
-
-#define emul_name "i386coff"
-#define emul_struct_name i386coff
-#define emul_default_endian 0
-#include "emul-target.h"
diff --git a/gas/config/e-i386elf.c b/gas/config/e-i386elf.c
deleted file mode 100644
index 99850e3..0000000
--- a/gas/config/e-i386elf.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2007-2024 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS 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, or (at your option)
- any later version.
-
- GAS 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 GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "as.h"
-#include "emul.h"
-
-static const char *i386elf_bfd_name (void);
-
-static const char *
-i386elf_bfd_name (void)
-{
- abort ();
- return NULL;
-}
-
-#define emul_bfd_name i386elf_bfd_name
-#define emul_format &elf_format_ops
-
-#define emul_name "i386elf"
-#define emul_struct_name i386elf
-#define emul_default_endian 0
-#include "emul-target.h"
diff --git a/gas/config/e-mipself.c b/gas/config/e-mipself.c
index 42c9e7c..ed38444 100644
--- a/gas/config/e-mipself.c
+++ b/gas/config/e-mipself.c
@@ -20,16 +20,6 @@
#include "as.h"
#include "emul.h"
-static const char *mipself_bfd_name (void);
-
-static const char *
-mipself_bfd_name (void)
-{
- abort ();
- return NULL;
-}
-
-#define emul_bfd_name mipself_bfd_name
#define emul_format &elf_format_ops
#define emul_name "mipsbelf"
diff --git a/gas/config/loongarch-parse.y b/gas/config/loongarch-parse.y
index 63a4fcf..0607248 100644
--- a/gas/config/loongarch-parse.y
+++ b/gas/config/loongarch-parse.y
@@ -368,24 +368,24 @@ multiplicative_expression
| multiplicative_expression '%' unary_expression {emit_bin ('%');}
;
-additive_expression
+shift_expression
: multiplicative_expression
- | additive_expression '+' multiplicative_expression {emit_bin ('+');}
- | additive_expression '-' multiplicative_expression {emit_bin ('-');}
+ | shift_expression LEFT_OP multiplicative_expression {emit_bin (LEFT_OP);}
+ | shift_expression RIGHT_OP multiplicative_expression {emit_bin (RIGHT_OP);}
;
-shift_expression
- : additive_expression
- | shift_expression LEFT_OP additive_expression {emit_bin (LEFT_OP);}
- | shift_expression RIGHT_OP additive_expression {emit_bin (RIGHT_OP);}
+additive_expression
+ : shift_expression
+ | additive_expression '+' shift_expression {emit_bin ('+');}
+ | additive_expression '-' shift_expression {emit_bin ('-');}
;
relational_expression
- : shift_expression
- | relational_expression '<' shift_expression {emit_bin ('<');}
- | relational_expression '>' shift_expression {emit_bin ('>');}
- | relational_expression LE_OP shift_expression {emit_bin (LE_OP);}
- | relational_expression GE_OP shift_expression {emit_bin (GE_OP);}
+ : additive_expression
+ | relational_expression '<' additive_expression {emit_bin ('<');}
+ | relational_expression '>' additive_expression {emit_bin ('>');}
+ | relational_expression LE_OP additive_expression {emit_bin (LE_OP);}
+ | relational_expression GE_OP additive_expression {emit_bin (GE_OP);}
;
equality_expression
diff --git a/gas/config/obj-aout.c b/gas/config/obj-aout.c
index 318520c..5237400 100644
--- a/gas/config/obj-aout.c
+++ b/gas/config/obj-aout.c
@@ -221,14 +221,16 @@ obj_aout_type (int ignore ATTRIBUTE_UNUSED)
s_ignore (0);
}
-/* Support for an AOUT emulation. */
+static const pseudo_typeS aout_pseudo_table[];
-static void
+void
aout_pop_insert (void)
{
pop_insert (aout_pseudo_table);
}
+#ifdef USE_EMULATIONS /* Support for an AOUT emulation. */
+
static int
obj_aout_s_get_other (symbolS *sym)
{
@@ -298,6 +300,7 @@ const struct format_ops aout_format_ops =
0, /* begin. */
0, /* end. */
0, /* app_file. */
+ NULL, /* assign_symbol */
obj_aout_frob_symbol,
0, /* frob_file. */
0, /* frob_file_before_adjust. */
@@ -314,7 +317,6 @@ const struct format_ops aout_format_ops =
obj_aout_s_get_type,
obj_aout_s_set_type,
0, /* copy_symbol_attributes. */
- 0, /* generate_asm_lineno. */
obj_aout_process_stab,
obj_aout_separate_stab_sections,
0, /* init_stab_section. */
@@ -327,7 +329,9 @@ const struct format_ops aout_format_ops =
0 /* adjust_symtab. */
};
-const pseudo_typeS aout_pseudo_table[] =
+#endif /* USE_EMULATIONS */
+
+static const pseudo_typeS aout_pseudo_table[] =
{
{"line", obj_aout_line, 0}, /* Source code line number. */
{"ln", obj_aout_line, 0}, /* COFF line number that we use anyway. */
diff --git a/gas/config/obj-aout.h b/gas/config/obj-aout.h
index 9f5e7dd..dd25d14 100644
--- a/gas/config/obj-aout.h
+++ b/gas/config/obj-aout.h
@@ -27,10 +27,9 @@
#define OUTPUT_FLAVOR bfd_target_aout_flavour
-extern const pseudo_typeS aout_pseudo_table[];
-
+extern void aout_pop_insert (void);
#ifndef obj_pop_insert
-#define obj_pop_insert() pop_insert (aout_pseudo_table)
+#define obj_pop_insert() aout_pop_insert ()
#endif
/* Symbol table entry data type. */
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index 13dc4ff..845fcc8 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -1177,6 +1177,15 @@ coff_obj_read_begin_hook (void)
tag_init ();
}
+void
+coff_assign_symbol (symbolS *symp ATTRIBUTE_UNUSED)
+{
+#ifndef TE_PE
+ /* "set" symbols are local unless otherwise specified. */
+ SF_SET_LOCAL (symp);
+#endif
+}
+
symbolS *coff_last_function;
#ifndef OBJ_XCOFF
static symbolS *coff_last_bf;
@@ -1847,7 +1856,7 @@ symbol_dump (void)
#endif /* DEBUG */
-const pseudo_typeS coff_pseudo_table[] =
+static const pseudo_typeS coff_pseudo_table[] =
{
{"ABORT", s_abort, 0},
/* We accept the .bss directive for backward compatibility with
@@ -1888,14 +1897,14 @@ const pseudo_typeS coff_pseudo_table[] =
};
-/* Support for a COFF emulation. */
-
-static void
+void
coff_pop_insert (void)
{
pop_insert (coff_pseudo_table);
}
+#ifdef USE_EMULATIONS /* Support for a COFF emulation. */
+
static int
coff_separate_stab_sections (void)
{
@@ -1910,6 +1919,7 @@ const struct format_ops coff_format_ops =
0, /* begin */
0, /* end. */
c_dot_file_symbol,
+ coff_assign_symbol,
coff_frob_symbol,
0, /* frob_file */
0, /* frob_file_before_adjust */
@@ -1926,7 +1936,6 @@ const struct format_ops coff_format_ops =
0, /* s_get_type */
0, /* s_set_type */
0, /* copy_symbol_attributes */
- 0, /* generate_asm_lineno */
0, /* process_stab */
coff_separate_stab_sections,
obj_coff_init_stab_section,
@@ -1938,3 +1947,5 @@ const struct format_ops coff_format_ops =
coff_obj_symbol_clone_hook,
coff_adjust_symtab
};
+
+#endif /* USE_EMULATIONS */
diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h
index 9b8e492..23f54ff 100644
--- a/gas/config/obj-coff.h
+++ b/gas/config/obj-coff.h
@@ -49,12 +49,7 @@
#endif
#ifdef TC_I386
-#ifdef TE_PEP
-#include "coff/x86_64.h"
-#else
-#include "coff/i386.h"
-#endif
-
+#include "coff/x86.h"
#ifndef TARGET_FORMAT
#ifdef TE_PEP
#define TARGET_FORMAT "coff-x86-64"
@@ -251,6 +246,7 @@ extern symbolS *coff_last_function;
#define obj_emit_lineno(WHERE, LINE, FILE_START) abort ()
#define obj_app_file(name) c_dot_file_symbol (name)
+#define obj_assign_symbol(S) coff_assign_symbol (S)
#define obj_frob_symbol(S,P) coff_frob_symbol (S, & P)
#define obj_frob_section(S) coff_frob_section (S)
#define obj_frob_file_after_relocs() coff_frob_file_after_relocs ()
@@ -274,12 +270,9 @@ extern symbolS *coff_last_function;
#endif
#endif
-/* Sanity check. */
-
-extern const pseudo_typeS coff_pseudo_table[];
-
+extern void coff_pop_insert (void);
#ifndef obj_pop_insert
-#define obj_pop_insert() pop_insert (coff_pseudo_table)
+#define obj_pop_insert() coff_pop_insert ()
#endif
/* In COFF, if a symbol is defined using .def/.val SYM/.endef, it's OK
@@ -322,6 +315,7 @@ extern int S_GET_STORAGE_CLASS (symbolS *);
extern void SA_SET_SYM_ENDNDX (symbolS *, symbolS *);
extern void coff_add_linesym (symbolS *);
extern void c_dot_file_symbol (const char *);
+extern void coff_assign_symbol (symbolS *);
extern void coff_frob_symbol (symbolS *, int *);
extern void coff_adjust_symtab (void);
extern void coff_frob_section (segT);
diff --git a/gas/config/obj-ecoff.c b/gas/config/obj-ecoff.c
index 11f42a4..c79d57d 100644
--- a/gas/config/obj-ecoff.c
+++ b/gas/config/obj-ecoff.c
@@ -195,30 +195,6 @@ obj_ecoff_set_ext (symbolS *sym, EXTR *ext)
(*debug_swap->swap_ext_out) (stdoutput, ext, esym->native);
}
-static int
-ecoff_sec_sym_ok_for_reloc (asection *sec ATTRIBUTE_UNUSED)
-{
- return 1;
-}
-
-static void
-obj_ecoff_frob_symbol (symbolS *sym, int *puntp ATTRIBUTE_UNUSED)
-{
- ecoff_frob_symbol (sym);
-}
-
-static void
-ecoff_pop_insert (void)
-{
- pop_insert (obj_pseudo_table);
-}
-
-static int
-ecoff_separate_stab_sections (void)
-{
- return 0;
-}
-
/* These are the pseudo-ops we support in this file. Only those
relating to debugging information are supported here.
@@ -282,6 +258,32 @@ const pseudo_typeS obj_pseudo_table[] =
{ NULL, s_ignore, 0 }
};
+#ifdef USE_EMULATIONS
+
+static int
+ecoff_sec_sym_ok_for_reloc (asection *sec ATTRIBUTE_UNUSED)
+{
+ return 1;
+}
+
+static void
+obj_ecoff_frob_symbol (symbolS *sym, int *puntp ATTRIBUTE_UNUSED)
+{
+ ecoff_frob_symbol (sym);
+}
+
+static void
+ecoff_pop_insert (void)
+{
+ pop_insert (obj_pseudo_table);
+}
+
+static int
+ecoff_separate_stab_sections (void)
+{
+ return 0;
+}
+
const struct format_ops ecoff_format_ops =
{
bfd_target_ecoff_flavour,
@@ -293,6 +295,7 @@ const struct format_ops ecoff_format_ops =
0, /* begin. */
0, /* end. */
ecoff_new_file,
+ NULL, /* assign_symbol */
obj_ecoff_frob_symbol,
ecoff_frob_file,
0, /* frob_file_before_adjust. */
@@ -309,7 +312,6 @@ const struct format_ops ecoff_format_ops =
0, /* s_get_type. */
0, /* s_set_type. */
0, /* copy_symbol_attributes. */
- ecoff_generate_asm_lineno,
ecoff_stab,
ecoff_separate_stab_sections,
0, /* init_stab_section. */
@@ -321,3 +323,5 @@ const struct format_ops ecoff_format_ops =
ecoff_symbol_clone_hook,
0 /* adjust_symtab. */
};
+
+#endif /* USE_EMULATIONS */
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index e28ba0a..b9aaca9 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -199,48 +199,6 @@ elf_pop_insert (void)
pop_insert (ecoff_debug_pseudo_table);
}
-static bfd_vma
-elf_s_get_size (symbolS *sym)
-{
- return S_GET_SIZE (sym);
-}
-
-static void
-elf_s_set_size (symbolS *sym, bfd_vma sz)
-{
- S_SET_SIZE (sym, sz);
-}
-
-static bfd_vma
-elf_s_get_align (symbolS *sym)
-{
- return S_GET_ALIGN (sym);
-}
-
-static void
-elf_s_set_align (symbolS *sym, bfd_vma align)
-{
- S_SET_ALIGN (sym, align);
-}
-
-int
-elf_s_get_other (symbolS *sym)
-{
- return elf_symbol (symbol_get_bfdsym (sym))->internal_elf_sym.st_other;
-}
-
-static void
-elf_s_set_other (symbolS *sym, int other)
-{
- S_SET_OTHER (sym, other);
-}
-
-static int
-elf_sec_sym_ok_for_reloc (asection *sec)
-{
- return obj_sec_sym_ok_for_reloc (sec);
-}
-
void
elf_file_symbol (const char *s)
{
@@ -3190,47 +3148,6 @@ elf_frob_file_after_relocs (void)
#endif /* NEED_ECOFF_DEBUG */
}
-static void
-elf_generate_asm_lineno (void)
-{
-#ifdef NEED_ECOFF_DEBUG
- if (ECOFF_DEBUGGING)
- ecoff_generate_asm_lineno ();
-#endif
-}
-
-static void
-elf_process_stab (int what ATTRIBUTE_UNUSED,
- const char *string ATTRIBUTE_UNUSED,
- int type ATTRIBUTE_UNUSED,
- int other ATTRIBUTE_UNUSED,
- int desc ATTRIBUTE_UNUSED)
-{
-#ifdef NEED_ECOFF_DEBUG
- if (ECOFF_DEBUGGING)
- ecoff_stab (what, string, type, other, desc);
-#endif
-}
-
-static int
-elf_separate_stab_sections (void)
-{
-#ifdef NEED_ECOFF_DEBUG
- return (!ECOFF_DEBUGGING);
-#else
- return 1;
-#endif
-}
-
-static void
-elf_init_stab_section (segT stab, segT stabstr)
-{
-#ifdef NEED_ECOFF_DEBUG
- if (!ECOFF_DEBUGGING)
-#endif
- obj_elf_init_stab_section (stab, stabstr);
-}
-
/* This is called when the assembler starts. */
void
@@ -3274,6 +3191,84 @@ elf_end (void)
}
}
+#ifdef USE_EMULATIONS
+
+static bfd_vma
+elf_s_get_size (symbolS *sym)
+{
+ return S_GET_SIZE (sym);
+}
+
+static void
+elf_s_set_size (symbolS *sym, bfd_vma sz)
+{
+ S_SET_SIZE (sym, sz);
+}
+
+static bfd_vma
+elf_s_get_align (symbolS *sym)
+{
+ return S_GET_ALIGN (sym);
+}
+
+static void
+elf_s_set_align (symbolS *sym, bfd_vma align)
+{
+ S_SET_ALIGN (sym, align);
+}
+
+int
+elf_s_get_other (symbolS *sym)
+{
+ return elf_symbol (symbol_get_bfdsym (sym))->internal_elf_sym.st_other;
+}
+
+static void
+elf_s_set_other (symbolS *sym, int other)
+{
+ S_SET_OTHER (sym, other);
+}
+
+static int
+elf_sec_sym_ok_for_reloc (asection *sec)
+{
+ return obj_sec_sym_ok_for_reloc (sec);
+}
+
+#ifdef NEED_ECOFF_DEBUG
+static void
+elf_process_stab (int what ATTRIBUTE_UNUSED,
+ const char *string ATTRIBUTE_UNUSED,
+ int type ATTRIBUTE_UNUSED,
+ int other ATTRIBUTE_UNUSED,
+ int desc ATTRIBUTE_UNUSED)
+{
+ if (ECOFF_DEBUGGING)
+ ecoff_stab (what, string, type, other, desc);
+}
+#else
+# define elf_process_stab NULL
+#endif
+
+static int
+elf_separate_stab_sections (void)
+{
+#ifdef NEED_ECOFF_DEBUG
+ return (!ECOFF_DEBUGGING);
+#else
+ return 1;
+#endif
+}
+
+#ifdef NEED_ECOFF_DEBUG
+static void
+elf_init_stab_section (segT stab, segT stabstr)
+{
+ if (!ECOFF_DEBUGGING)
+ obj_elf_init_stab_section (stab, stabstr);
+}
+#endif
+
const struct format_ops elf_format_ops =
{
bfd_target_elf_flavour,
@@ -3282,6 +3277,7 @@ const struct format_ops elf_format_ops =
elf_begin,
elf_end,
elf_file_symbol,
+ NULL, /* assign_symbol */
elf_frob_symbol,
elf_frob_file,
elf_frob_file_before_adjust,
@@ -3296,10 +3292,13 @@ const struct format_ops elf_format_ops =
0, /* s_get_type */
0, /* s_set_type */
elf_copy_symbol_attributes,
- elf_generate_asm_lineno,
elf_process_stab,
elf_separate_stab_sections,
+#ifdef NEED_ECOFF_DEBUG
elf_init_stab_section,
+#else
+ obj_elf_init_stab_section,
+#endif
elf_sec_sym_ok_for_reloc,
elf_pop_insert,
#ifdef NEED_ECOFF_DEBUG
@@ -3312,3 +3311,5 @@ const struct format_ops elf_format_ops =
elf_obj_symbol_clone_hook,
elf_adjust_symtab
};
+
+#endif /* USE_EMULATIONS */
diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h
index 7b5d2fe..179711e 100644
--- a/gas/config/obj-elf.h
+++ b/gas/config/obj-elf.h
@@ -150,7 +150,8 @@ extern void elf_end (void);
int elf_s_get_other (symbolS *);
#ifndef S_GET_OTHER
-#define S_GET_OTHER(S) (elf_s_get_other (S))
+#define S_GET_OTHER(S) \
+ (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_other)
#endif
#ifndef S_SET_OTHER
#define S_SET_OTHER(S,V) \
diff --git a/gas/config/obj-multi.h b/gas/config/obj-multi.h
index 6700fe5..4069ce6 100644
--- a/gas/config/obj-multi.h
+++ b/gas/config/obj-multi.h
@@ -46,6 +46,11 @@
? (*this_format->app_file) (NAME) \
: (void) 0)
+#define obj_assign_symbol(S) \
+ (this_format->assign_symbol \
+ ? (*this_format->assign_symbol) (S) \
+ : (void) 0)
+
#define obj_frob_symbol(S,P) \
(*this_format->frob_symbol) (S, &(P))
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index 0949e94..21675f6 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -1126,7 +1126,7 @@ i386_intel_operand (char *operand_string, int got_a_float)
else
i.types[this_operand].bitfield.disp16 = 1;
-#if defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)
+#ifdef OBJ_AOUT
/*
* exp_seg is used only for verification in
* i386_finalize_displacement, and we can end up seeing reg_section
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 6cd57d9..ab249ce 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -193,7 +193,7 @@ static void output_disp (fragS *, offsetT);
#ifdef OBJ_AOUT
static void s_bss (int);
#endif
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
static void handle_large_common (int small ATTRIBUTE_UNUSED);
/* GNU_PROPERTY_X86_ISA_1_USED. */
@@ -274,6 +274,32 @@ enum i386_error
internal_error,
};
+#ifdef OBJ_ELF
+enum x86_tls_error_type
+{
+ x86_tls_error_continue,
+ x86_tls_error_none,
+ x86_tls_error_insn,
+ x86_tls_error_opcode,
+ x86_tls_error_sib,
+ x86_tls_error_no_base_reg,
+ x86_tls_error_require_no_base_index_reg,
+ x86_tls_error_base_reg,
+ x86_tls_error_index_ebx,
+ x86_tls_error_eax,
+ x86_tls_error_RegA,
+ x86_tls_error_ebx,
+ x86_tls_error_rip,
+ x86_tls_error_dest_eax,
+ x86_tls_error_dest_rdi,
+ x86_tls_error_scale_factor,
+ x86_tls_error_base_reg_size,
+ x86_tls_error_dest_32bit_reg_size,
+ x86_tls_error_dest_64bit_reg_size,
+ x86_tls_error_dest_32bit_or_64bit_reg_size
+};
+#endif
+
struct _i386_insn
{
/* TM holds the template for the insn were currently assembling. */
@@ -365,6 +391,9 @@ struct _i386_insn
/* Has GOTPC or TLS relocation. */
bool has_gotpc_tls_reloc;
+ /* Has relocation entry from the gotrel array. */
+ bool has_gotrel;
+
/* RM and SIB are the modrm byte and the sib byte where the
addressing modes of this insn are encoded. */
modrm_byte rm;
@@ -535,7 +564,7 @@ const char extra_symbol_chars[] = "*%-(["
#endif
;
-#if ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
+#if (defined (OBJ_ELF) \
&& !defined (TE_GNU) \
&& !defined (TE_LINUX) \
&& !defined (TE_Haiku) \
@@ -624,7 +653,7 @@ static int use_rela_relocations = 0;
/* __tls_get_addr/___tls_get_addr symbol for TLS. */
static const char *tls_get_addr;
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
/* The ELF ABI to use. */
enum x86_elf_abi
@@ -642,7 +671,7 @@ static enum x86_elf_abi x86_elf_abi = I386_ABI;
static int use_big_obj = 0;
#endif
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
/* 1 if generating code for a shared library. */
static int shared = 0;
@@ -717,6 +746,9 @@ lfence_before_ret;
static int generate_relax_relocations
= DEFAULT_GENERATE_X86_RELAX_RELOCATIONS;
+/* 1 if the assembler should check tls relocation. */
+static bool tls_check = DEFAULT_X86_TLS_CHECK;
+
static enum check_kind
{
check_none = 0,
@@ -1272,7 +1304,7 @@ const pseudo_typeS md_pseudo_table[] =
{"disallow_index_reg", set_allow_index_reg, 0},
{"sse_check", set_check, 0},
{"operand_check", set_check, 1},
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
{"largecomm", handle_large_common, 0},
#else
{"file", dwarf2_directive_file, 0},
@@ -1295,6 +1327,7 @@ static htab_t op_hash;
/* Hash table for register lookup. */
static htab_t reg_hash;
+#if (defined (OBJ_ELF) || defined (OBJ_MACH_O) || defined (TE_PE))
static const struct
{
const char *str;
@@ -1315,7 +1348,7 @@ gotrel[] =
{ .imm64 = 1, .disp64 = 1 } }
#ifndef TE_PE
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
{ STRING_COMMA_LEN ("SIZE"), { BFD_RELOC_SIZE32,
BFD_RELOC_SIZE32 },
{ .bitfield = { .imm32 = 1, .imm64 = 1 } }, false },
@@ -1382,6 +1415,7 @@ gotrel[] =
#undef OPERAND_TYPE_IMM32_32S_64_DISP32_64
#undef OPERAND_TYPE_IMM64_DISP64
};
+#endif
/* Various efficient no-op patterns for aligning code labels.
Note: Don't try to assemble the instructions in the comments.
@@ -3042,12 +3076,9 @@ static void
check_cpu_arch_compatible (const char *name ATTRIBUTE_UNUSED,
i386_cpu_flags new_flag ATTRIBUTE_UNUSED)
{
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- static const char *arch;
-
/* Intel MCU is only supported on ELF. */
- if (!IS_ELF)
- return;
+#ifdef OBJ_ELF
+ static const char *arch;
if (!arch)
{
@@ -3169,9 +3200,16 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
const arch_stack_entry *top = arch_stack_top;
if (!top)
- as_bad (_(".arch stack is empty"));
- else if (top->flag_code != flag_code
- || top->stackop_size != stackop_size)
+ {
+ as_bad (_(".arch stack is empty"));
+ restore_bad:
+ (void) restore_line_pointer (e);
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (top->flag_code != flag_code
+ || top->stackop_size != stackop_size)
{
static const unsigned int bits[] = {
[CODE_16BIT] = 16,
@@ -3182,22 +3220,21 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
as_bad (_("this `.arch pop' requires `.code%u%s' to be in effect"),
bits[top->flag_code],
top->stackop_size == LONG_MNEM_SUFFIX ? "gcc" : "");
+ goto restore_bad;
}
- else
- {
- arch_stack_top = top->prev;
- cpu_arch_name = top->name;
- free (cpu_sub_arch_name);
- cpu_sub_arch_name = top->sub_name;
- cpu_arch_flags = top->flags;
- cpu_arch_isa = top->isa;
- cpu_arch_isa_flags = top->isa_flags;
- vector_size = top->vector_size;
- no_cond_jump_promotion = top->no_cond_jump_promotion;
+ arch_stack_top = top->prev;
- XDELETE (top);
- }
+ cpu_arch_name = top->name;
+ free (cpu_sub_arch_name);
+ cpu_sub_arch_name = top->sub_name;
+ cpu_arch_flags = top->flags;
+ cpu_arch_isa = top->isa;
+ cpu_arch_isa_flags = top->isa_flags;
+ vector_size = top->vector_size;
+ no_cond_jump_promotion = top->no_cond_jump_promotion;
+
+ XDELETE (top);
(void) restore_line_pointer (e);
demand_empty_rest_of_line ();
@@ -3240,18 +3277,14 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
{
as_bad (_("64bit mode not supported on `%s'."),
cpu_arch[j].name);
- (void) restore_line_pointer (e);
- ignore_rest_of_line ();
- return;
+ goto restore_bad;
}
if (flag_code == CODE_32BIT && !cpu_arch[j].enable.bitfield.cpui386)
{
as_bad (_("32bit mode not supported on `%s'."),
cpu_arch[j].name);
- (void) restore_line_pointer (e);
- ignore_rest_of_line ();
- return;
+ goto restore_bad;
}
cpu_arch_name = cpu_arch[j].name;
@@ -3331,12 +3364,13 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
}
if (j == ARRAY_SIZE (cpu_arch))
- as_bad (_("no such architecture: `%s'"), string);
-
- *input_line_pointer = e;
+ {
+ as_bad (_("no such architecture: `%s'"), string);
+ goto restore_bad;
+ }
no_cond_jump_promotion = 0;
- if (*input_line_pointer == ','
+ if (restore_line_pointer (e) == ','
&& !is_end_of_line[(unsigned char) input_line_pointer[1]])
{
++input_line_pointer;
@@ -3345,10 +3379,11 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
if (strcmp (string, "nojumps") == 0)
no_cond_jump_promotion = 1;
- else if (strcmp (string, "jumps") == 0)
- ;
- else
- as_bad (_("no such architecture modifier: `%s'"), string);
+ else if (strcmp (string, "jumps") != 0)
+ {
+ as_bad (_("no such architecture modifier: `%s'"), string);
+ goto restore_bad;
+ }
(void) restore_line_pointer (e);
}
@@ -3516,13 +3551,12 @@ md_begin (void)
if (object_64bit)
{
#if defined (OBJ_COFF) && defined (TE_PE)
- x86_dwarf2_return_column = (OUTPUT_FLAVOR == bfd_target_coff_flavour
- ? 32 : 16);
+ x86_dwarf2_return_column = 32;
#else
x86_dwarf2_return_column = 16;
#endif
x86_cie_data_alignment = -8;
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
x86_sframe_cfa_sp_reg = REG_SP;
x86_sframe_cfa_fp_reg = REG_FP;
#endif
@@ -3761,7 +3795,7 @@ reloc (unsigned int size,
break;
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
if (other == BFD_RELOC_SIZE32)
{
if (size == 8)
@@ -3832,7 +3866,7 @@ reloc (unsigned int size,
return NO_RELOC;
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
/* Here we decide which fixups can be adjusted to make them relative to
the beginning of the section instead of the symbol. Basically we need
to make sure that the dynamic relocations are done correctly, so in
@@ -3841,9 +3875,6 @@ reloc (unsigned int size,
int
tc_i386_fix_adjustable (fixS *fixP)
{
- if (!IS_ELF)
- return 1;
-
/* Don't adjust pc-relative references to merge sections in 64-bit
mode. */
if (use_rela_relocations
@@ -3889,12 +3920,18 @@ tc_i386_fix_adjustable (fixS *fixP)
|| fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF32
|| fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF64
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTOFF64
+ || fixP->fx_r_type == BFD_RELOC_X86_64_GOT64
|| fixP->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC
|| fixP->fx_r_type == BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC
|| fixP->fx_r_type == BFD_RELOC_X86_64_TLSDESC_CALL
|| fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
+ /* Resolve PLT32 relocation against local symbol to section only for
+ PC-relative relocations. */
+ if (fixP->fx_r_type == BFD_RELOC_386_PLT32
+ || fixP->fx_r_type == BFD_RELOC_X86_64_PLT32)
+ return fixP->fx_pcrel;
return 1;
}
#endif
@@ -5500,11 +5537,218 @@ optimize_encoding (void)
i.op[1].regs = i.op[2].regs;
i.types[1] = i.types[2];
i.flags[1] = i.flags[2];
+ i.reloc[1] = i.reloc[2];
+ i.tm.operand_types[1] = i.tm.operand_types[2];
+
+ i.operands = 2;
+ i.imm_operands = 0;
+ }
+ else if (i.tm.base_opcode == 0x17
+ && i.tm.opcode_space == SPACE_0F3A
+ && i.op[0].imms->X_op == O_constant
+ && i.op[0].imms->X_add_number == 0)
+ {
+ /* Optimize: -O:
+ extractps $0, %xmmN, %rM -> movd %xmmN, %rM
+ extractps $0, %xmmN, mem -> movss %xmmN, mem
+ vextractps $0, %xmmN, %rM -> vmovd %xmmN, %rM
+ vextractps $0, %xmmN, mem -> vmovss %xmmN, mem
+ */
+ i.tm.opcode_space = SPACE_0F;
+ i.tm.opcode_modifier.vexw = VEXW0;
+
+ if (!i.mem_operands)
+ i.tm.base_opcode = 0x7e;
+ else
+ {
+ i.tm.base_opcode = 0x11;
+ i.tm.opcode_modifier.opcodeprefix = PREFIX_0XF3;
+ }
+
+ i.op[0].regs = i.op[1].regs;
+ i.types[0] = i.types[1];
+ i.flags[0] = i.flags[1];
+ i.tm.operand_types[0] = i.tm.operand_types[1];
+
+ i.op[1].regs = i.op[2].regs;
+ i.types[1] = i.types[2];
+ i.flags[1] = i.flags[2];
+ i.reloc[1] = i.reloc[2];
i.tm.operand_types[1] = i.tm.operand_types[2];
i.operands = 2;
i.imm_operands = 0;
}
+ else if ((i.tm.base_opcode | 0x22) == 0x3b
+ && i.tm.opcode_space == SPACE_0F3A
+ && i.op[0].imms->X_op == O_constant
+ && i.op[0].imms->X_add_number == 0)
+ {
+ /* Optimize: -O:
+ vextractf128 $0, %ymmN, %xmmM -> vmovaps %xmmN, %xmmM
+ vextractf128 $0, %ymmN, mem -> vmovups %xmmN, mem
+ vextractf32x4 $0, %[yz]mmN, %xmmM -> vmovaps %xmmN, %xmmM
+ vextractf32x4 $0, %[yz]mmN, mem -> vmovups %xmmN, mem
+ vextractf64x2 $0, %[yz]mmN, %xmmM -> vmovapd %xmmN, %xmmM
+ vextractf64x2 $0, %[yz]mmN, mem -> vmovupd %xmmN, mem
+ vextractf32x8 $0, %zmmN, %ymmM -> vmovaps %ymmN, %ymmM
+ vextractf32x8 $0, %zmmN, mem -> vmovups %ymmN, mem
+ vextractf64x4 $0, %zmmN, %ymmM -> vmovapd %ymmN, %ymmM
+ vextractf64x4 $0, %zmmN, mem -> vmovupd %ymmN, mem
+ vextracti128 $0, %ymmN, %xmmM -> vmovdqa %xmmN, %xmmM
+ vextracti128 $0, %ymmN, mem -> vmovdqu %xmmN, mem
+ vextracti32x4 $0, %[yz]mmN, %xmmM -> vmovdqa{,32} %xmmN, %xmmM
+ vextracti32x4 $0, %[yz]mmN, mem -> vmovdqu{,32} %xmmN, mem
+ vextracti64x2 $0, %[yz]mmN, %xmmM -> vmovdqa{,64} %xmmN, %xmmM
+ vextracti64x2 $0, %[yz]mmN, mem -> vmovdqu{,64} %xmmN, mem
+ vextracti32x8 $0, %zmmN, %ymmM -> vmovdqa{,32} %ymmN, %ymmM
+ vextracti32x8 $0, %zmmN, mem -> vmovdqu{,32} %ymmN, mem
+ vextracti64x4 $0, %zmmN, %ymmM -> vmovdqa{,64} %ymmN, %ymmM
+ vextracti64x4 $0, %zmmN, mem -> vmovdqu{,64} %ymmN, mem
+ */
+ i.tm.opcode_space = SPACE_0F;
+
+ if (!i.mask.reg
+ && (pp.encoding <= encoding_vex3
+ || (pp.encoding == encoding_evex512
+ && (!i.base_reg || !(i.base_reg->reg_flags & RegRex2))
+ && (!i.index_reg || !(i.index_reg->reg_flags & RegRex2)))))
+ {
+ i.tm.opcode_modifier.vex = i.tm.base_opcode & 2 ? VEX256 : VEX128;
+ i.tm.opcode_modifier.evex = 0;
+ }
+ else
+ i.tm.opcode_modifier.evex = i.tm.base_opcode & 2 ? EVEX256 : EVEX128;
+
+ if (i.tm.base_opcode & 0x20)
+ {
+ i.tm.base_opcode = 0x7f;
+ if (i.reg_operands != 2)
+ i.tm.opcode_modifier.opcodeprefix = PREFIX_0XF3;
+ }
+ else
+ {
+ if (i.reg_operands == 2)
+ i.tm.base_opcode = 0x29;
+ else
+ i.tm.base_opcode = 0x11;
+ if (i.tm.opcode_modifier.vexw != VEXW1)
+ i.tm.opcode_modifier.opcodeprefix = PREFIX_NONE;
+ }
+
+ if (i.tm.opcode_modifier.vex)
+ i.tm.opcode_modifier.vexw = VEXWIG;
+
+ i.op[0].regs = i.op[1].regs;
+ i.types[0] = i.types[1];
+ i.flags[0] = i.flags[1];
+ i.tm.operand_types[0] = i.tm.operand_types[1];
+
+ i.op[1].regs = i.op[2].regs;
+ i.types[1] = i.types[2];
+ i.flags[1] = i.flags[2];
+ i.reloc[1] = i.reloc[2];
+ i.tm.operand_types[1] = i.tm.operand_types[2];
+
+ i.operands = 2;
+ i.imm_operands = 0;
+ }
+ else if (i.tm.base_opcode == 0x21
+ && i.tm.opcode_space == SPACE_0F3A
+ && i.op[0].imms->X_op == O_constant
+ && (i.operands == i.reg_operands + 1
+ ? i.op[0].imms->X_add_number == 0
+ || (i.op[0].imms->X_add_number & 0xf) == 0xf
+ : (i.op[0].imms->X_add_number & 0x3f) == 0x0e
+ && (i.reg_operands == 1 || i.op[2].regs == i.op[3].regs)))
+ {
+ /* Optimize: -O:
+ insertps $0b....1111, %xmmN, %xmmM -> xorps %xmmM, %xmmM
+ insertps $0b00000000, %xmmN, %xmmM -> movss %xmmN, %xmmM
+ insertps $0b..001110, mem, %xmmN -> movss mem, %xmmN
+ vinsertps $0b....1111, %xmmN, %xmmM, %xmmK -> vxorps %xmm?, %xmm?, %xmmK
+ vinsertps $0b00000000, %xmmN, %xmmM, %xmmK -> vmovss %xmmN, %xmmM, %xmmK
+ vinsertps $0b..001110, mem, %xmmN, %xmmN -> vmovss mem, %xmmN
+ */
+ i.tm.opcode_space = SPACE_0F;
+ if ((i.op[0].imms->X_add_number & 0xf) == 0xf)
+ {
+ i.tm.base_opcode = 0x57;
+ i.tm.opcode_modifier.opcodeprefix = PREFIX_NONE;
+
+ --i.operands;
+
+ i.op[i.operands - 1].regs = i.op[i.operands].regs;
+ i.types[i.operands - 1] = i.types[i.operands];
+ i.flags[i.operands - 1] = i.flags[i.operands];
+ i.tm.operand_types[i.operands - 1] = i.tm.operand_types[i.operands];
+
+ i.op[1].regs = i.op[i.operands - 1].regs;
+ i.types[1] = i.types[i.operands - 1];
+ i.flags[1] = i.flags[i.operands - 1];
+ i.tm.operand_types[1] = i.tm.operand_types[i.operands - 1];
+
+ i.op[0].regs = i.op[1].regs;
+ i.types[0] = i.types[1];
+ i.flags[0] = i.flags[1];
+ i.tm.operand_types[0] = i.tm.operand_types[1];
+
+ /* Switch from EVEX to VEX encoding if possible. Sadly we can't
+ (always) tell use of the {evex} pseudo-prefix (which otherwise
+ we'd like to respect) from use of %xmm16-%xmm31. */
+ if (pp.encoding == encoding_evex)
+ pp.encoding = encoding_default;
+ if (i.tm.opcode_modifier.evex
+ && pp.encoding <= encoding_vex3
+ && !(i.op[0].regs->reg_flags & RegVRex))
+ {
+ i.tm.opcode_modifier.evex = 0;
+ i.tm.opcode_modifier.vex = VEX128;
+ }
+
+ /* Switch from VEX3 to VEX2 encoding if possible. */
+ if (i.tm.opcode_modifier.vex
+ && pp.encoding <= encoding_vex
+ && (i.op[0].regs->reg_flags & RegRex))
+ {
+ i.op[0].regs -= 8;
+ i.op[1].regs = i.op[0].regs;
+ }
+ }
+ else
+ {
+ i.tm.base_opcode = 0x10;
+ i.tm.opcode_modifier.opcodeprefix = PREFIX_0XF3;
+
+ if (i.op[0].imms->X_add_number == 0)
+ {
+ i.op[0].regs = i.op[1].regs;
+ --i.operands;
+ }
+ else
+ {
+ i.op[0].disps = i.op[1].disps;
+ i.reloc[0] = i.reloc[1];
+ i.operands = 2;
+ i.tm.opcode_modifier.vexvvvv = 0;
+ }
+ i.types[0] = i.types[1];
+ i.flags[0] = i.flags[1];
+ i.tm.operand_types[0] = i.tm.operand_types[1];
+
+ i.op[1].regs = i.op[2].regs;
+ i.types[1] = i.types[2];
+ i.flags[1] = i.flags[2];
+ i.tm.operand_types[1] = i.tm.operand_types[2];
+
+ i.op[2].regs = i.op[3].regs;
+ i.types[2] = i.types[3];
+ i.flags[2] = i.flags[3];
+ i.tm.operand_types[2] = i.tm.operand_types[3];
+ }
+
+ i.imm_operands = 0;
+ }
}
/* Check whether the promoted (to address size) register is usable as index
@@ -6353,6 +6597,358 @@ static INLINE bool may_need_pass2 (const insn_template *t)
&& (t->base_opcode | 8) == 0x2c);
}
+#ifdef OBJ_ELF
+static enum x86_tls_error_type
+x86_check_tls_relocation (enum bfd_reloc_code_real r_type)
+{
+ switch (r_type)
+ {
+ case BFD_RELOC_386_TLS_GOTDESC:
+ /* Check GDesc access model:
+
+ leal x@tlsdesc(%ebx), %reg32 --> Memory reg must be %ebx and
+ SIB is not supported.
+ */
+ if (i.tm.mnem_off != MN_lea)
+ return x86_tls_error_insn;
+ if (i.index_reg)
+ return x86_tls_error_sib;
+ if (!i.base_reg)
+ return x86_tls_error_no_base_reg;
+ if (i.base_reg->reg_type.bitfield.instance != RegB)
+ return x86_tls_error_ebx;
+ if (!i.op[1].regs->reg_type.bitfield.dword)
+ return x86_tls_error_dest_32bit_reg_size;
+ break;
+
+ case BFD_RELOC_386_TLS_GD:
+ /* Check GD access model:
+
+ leal foo@tlsgd(,%ebx,1), %eax --> Only this fixed format is supported.
+ leal foo@tlsgd(%reg32), %eax --> Dest reg must be '%eax'
+ Memory reg can't be %eax.
+ */
+ if (i.tm.mnem_off != MN_lea)
+ return x86_tls_error_insn;
+ if (i.op[1].regs->reg_type.bitfield.instance != Accum)
+ return x86_tls_error_dest_eax;
+ if (!i.op[1].regs->reg_type.bitfield.dword)
+ return x86_tls_error_dest_32bit_reg_size;
+ if (i.index_reg)
+ {
+ if (i.base_reg)
+ return x86_tls_error_base_reg;
+ if (i.index_reg->reg_type.bitfield.instance != RegB)
+ return x86_tls_error_index_ebx;
+ if (i.log2_scale_factor)
+ return x86_tls_error_scale_factor;
+ }
+ else
+ {
+ if (!i.base_reg)
+ return x86_tls_error_no_base_reg;
+ if (i.base_reg->reg_type.bitfield.instance == Accum)
+ return x86_tls_error_eax;
+ }
+ break;
+
+ case BFD_RELOC_386_TLS_LDM:
+ /* Check LDM access model:
+
+ leal foo@tlsldm(%reg32), %eax --> Dest reg must be '%eax'
+ Memory reg can't be %eax and SIB
+ is not supported.
+ */
+ if (i.tm.mnem_off != MN_lea)
+ return x86_tls_error_insn;
+ if (i.index_reg)
+ return x86_tls_error_sib;
+ if (!i.base_reg)
+ return x86_tls_error_no_base_reg;
+ if (i.base_reg->reg_type.bitfield.instance == Accum)
+ return x86_tls_error_eax;
+ if (i.op[1].regs->reg_type.bitfield.instance != Accum)
+ return x86_tls_error_dest_eax;
+ if (!i.op[1].regs->reg_type.bitfield.dword)
+ return x86_tls_error_dest_32bit_reg_size;
+ break;
+
+ case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
+ /* Check GOTPC32 TLSDESC access model:
+
+ --- LP64 mode ---
+ leaq x@tlsdesc(%rip), %reg64 --> Memory reg must be %rip.
+
+ --- X32 mode ---
+ rex/rex2 leal x@tlsdesc(%rip), %reg32 --> Memory reg must be %rip.
+
+ In X32 mode, gas will add rex/rex2 for it later, no need to check
+ here.
+ */
+ if (i.tm.mnem_off != MN_lea)
+ return x86_tls_error_insn;
+ if (!i.base_reg)
+ return x86_tls_error_no_base_reg;
+ if (i.base_reg->reg_num != RegIP
+ || !i.base_reg->reg_type.bitfield.qword)
+ return x86_tls_error_rip;
+ if (x86_elf_abi == X86_64_ABI)
+ {
+ if (!i.op[1].regs->reg_type.bitfield.qword)
+ return x86_tls_error_dest_64bit_reg_size;
+ }
+ else if (!i.op[1].regs->reg_type.bitfield.dword
+ && !i.op[1].regs->reg_type.bitfield.qword)
+ return x86_tls_error_dest_32bit_or_64bit_reg_size;
+ break;
+
+ case BFD_RELOC_X86_64_TLSGD:
+ /* Check GD access model:
+
+ leaq foo@tlsgd(%rip), %rdi --> Only this fixed format is supported.
+ */
+ case BFD_RELOC_X86_64_TLSLD:
+ /* Check LD access model:
+
+ leaq foo@tlsld(%rip), %rdi --> Only this fixed format is supported.
+ */
+ if (i.tm.mnem_off != MN_lea)
+ return x86_tls_error_insn;
+ if (!i.base_reg)
+ return x86_tls_error_no_base_reg;
+ if (i.base_reg->reg_num != RegIP
+ || !i.base_reg->reg_type.bitfield.qword)
+ return x86_tls_error_rip;
+ if (!i.op[1].regs->reg_type.bitfield.qword
+ || i.op[1].regs->reg_num != EDI_REG_NUM
+ || i.op[1].regs->reg_flags)
+ return x86_tls_error_dest_rdi;
+ break;
+
+ case BFD_RELOC_386_TLS_GOTIE:
+ /* Check GOTIE access model:
+
+ subl foo@gotntpoff(%reg1), %reg2
+ movl foo@gotntpoff(%reg1), %reg2
+ addl foo@gotntpoff(%reg1), %reg2
+
+ Memory operand: SIB is not supported.
+ */
+ case BFD_RELOC_386_TLS_IE_32:
+ /* Check IE_32 access model:
+
+ subl foo@gottpoff(%reg1), %reg2
+ movl foo@gottpoff(%reg1), %reg2
+ addl foo@gottpoff(%reg1), %reg2
+
+ Memory operand: SIB is not supported.
+ */
+ if (i.tm.mnem_off != MN_sub
+ && i.tm.mnem_off != MN_add
+ && i.tm.mnem_off != MN_mov)
+ return x86_tls_error_insn;
+ if (i.op[1].regs->reg_type.bitfield.class != Reg
+ || i.op[0].regs->reg_type.bitfield.class
+ || i.imm_operands)
+ return x86_tls_error_opcode;
+ if (!i.base_reg)
+ return x86_tls_error_no_base_reg;
+ if (i.index_reg)
+ return x86_tls_error_sib;
+ if (!i.base_reg->reg_type.bitfield.dword)
+ return x86_tls_error_base_reg_size;
+ if (!i.op[1].regs->reg_type.bitfield.dword)
+ return x86_tls_error_dest_32bit_reg_size;
+ break;
+
+ case BFD_RELOC_386_TLS_IE:
+ /* Check IE access model:
+
+ movl foo@indntpoff, %reg32 --> Mod == 00 && r/m == 5
+ addl foo@indntpoff, %reg32 --> Mod == 00 && r/m == 5
+ */
+ if (i.tm.mnem_off != MN_add && i.tm.mnem_off != MN_mov)
+ return x86_tls_error_insn;
+ if (i.op[1].regs->reg_type.bitfield.class != Reg
+ || i.op[0].regs->reg_type.bitfield.class
+ || i.imm_operands)
+ return x86_tls_error_opcode;
+ if (i.base_reg || i.index_reg)
+ return x86_tls_error_require_no_base_index_reg;
+ if (!i.op[1].regs->reg_type.bitfield.dword)
+ return x86_tls_error_dest_32bit_reg_size;
+ break;
+
+ case BFD_RELOC_X86_64_GOTTPOFF:
+ /* Check GOTTPOFF access model:
+
+ mov foo@gottpoff(%rip), %reg --> Memory Reg must be %rip.
+ add foo@gottpoff(%rip), %reg --> Memory Reg must be %rip.
+ add %reg1, foo@gottpoff(%rip), %reg2 --> Memory Reg must be %rip.
+ add foo@gottpoff(%rip), %reg1, %reg2 --> Memory Reg must be %rip.
+ */
+ if (i.tm.mnem_off != MN_add && i.tm.mnem_off != MN_mov)
+ return x86_tls_error_insn;
+ if (i.op[i.operands - 1].regs->reg_type.bitfield.class != Reg
+ || (i.op[0].regs->reg_type.bitfield.class
+ && i.tm.opcode_modifier.vexvvvv != VexVVVV_DST)
+ || i.imm_operands)
+ return x86_tls_error_opcode;
+ if (!i.base_reg)
+ return x86_tls_error_no_base_reg;
+ if (i.base_reg->reg_num != RegIP
+ || !i.base_reg->reg_type.bitfield.qword)
+ return x86_tls_error_rip;
+ if (x86_elf_abi == X86_64_ABI)
+ {
+ if (!i.op[i.operands - 1].regs->reg_type.bitfield.qword)
+ return x86_tls_error_dest_64bit_reg_size;
+ }
+ else if (!i.op[i.operands - 1].regs->reg_type.bitfield.dword
+ && !i.op[i.operands - 1].regs->reg_type.bitfield.qword)
+ return x86_tls_error_dest_32bit_or_64bit_reg_size;
+ break;
+
+ case BFD_RELOC_386_TLS_DESC_CALL:
+ /* Check GDesc access model:
+
+ call *x@tlscall(%eax) --> Memory reg must be %eax and
+ SIB is not supported.
+ */
+ case BFD_RELOC_X86_64_TLSDESC_CALL:
+ /* Check GDesc access model:
+
+ call *x@tlscall(%rax) <--- LP64 mode.
+ call *x@tlscall(%eax) <--- X32 mode.
+
+ Only these fixed formats are supported.
+ */
+ if (i.tm.mnem_off != MN_call)
+ return x86_tls_error_insn;
+ if (i.index_reg)
+ return x86_tls_error_sib;
+ if (!i.base_reg)
+ return x86_tls_error_no_base_reg;
+ if (i.base_reg->reg_type.bitfield.instance != Accum)
+ return x86_tls_error_RegA;
+ break;
+
+ case BFD_RELOC_NONE:
+ /* This isn't a relocation. */
+ return x86_tls_error_continue;
+
+ default:
+ break;
+ }
+
+ /* This relocation is OK. */
+ return x86_tls_error_none;
+}
+
+static void
+x86_report_tls_error (enum x86_tls_error_type tls_error,
+ enum bfd_reloc_code_real r_type)
+{
+ unsigned int k;
+ for (k = 0; k < ARRAY_SIZE (gotrel); k++)
+ if (gotrel[k].rel[object_64bit] == r_type)
+ break;
+
+ switch (tls_error)
+ {
+ case x86_tls_error_insn:
+ as_bad (_("@%s operator cannot be used with `%s'"),
+ gotrel[k].str, insn_name (&i.tm));
+ return;
+
+ case x86_tls_error_opcode:
+ as_bad (_("@%s operator can be used with `%s', but format is wrong"),
+ gotrel[k].str, insn_name (&i.tm));
+ return;
+
+ case x86_tls_error_sib:
+ as_bad (_("@%s operator requires no SIB"), gotrel[k].str);
+ return;
+
+ case x86_tls_error_no_base_reg:
+ as_bad (_("@%s operator requires base register"), gotrel[k].str);
+ return;
+
+ case x86_tls_error_require_no_base_index_reg:
+ as_bad (_("@%s operator requires no base/index register"),
+ gotrel[k].str);
+ return;
+
+ case x86_tls_error_base_reg:
+ as_bad (_("@%s operator requires no base register"), gotrel[k].str);
+ return;
+
+ case x86_tls_error_index_ebx:
+ as_bad (_("@%s operator requires `%sebx' as index register"),
+ gotrel[k].str, register_prefix);
+ return;
+
+ case x86_tls_error_eax:
+ as_bad (_("@%s operator requires `%seax' as base register"),
+ gotrel[k].str, register_prefix);
+ return;
+
+ case x86_tls_error_RegA:
+ as_bad (_("@%s operator requires `%seax/%srax' as base register"),
+ gotrel[k].str, register_prefix, register_prefix);
+ return;
+
+ case x86_tls_error_ebx:
+ as_bad (_("@%s operator requires `%sebx' as base register"),
+ gotrel[k].str, register_prefix);
+ return;
+
+ case x86_tls_error_rip:
+ as_bad (_("@%s operator requires `%srip' as base register"),
+ gotrel[k].str, register_prefix);
+ return;
+
+ case x86_tls_error_dest_eax:
+ as_bad (_("@%s operator requires `%seax' as dest register"),
+ gotrel[k].str, register_prefix);
+ return;
+
+ case x86_tls_error_dest_rdi:
+ as_bad (_("@%s operator requires `%srdi' as dest register"),
+ gotrel[k].str, register_prefix);
+ return;
+
+ case x86_tls_error_scale_factor:
+ as_bad (_("@%s operator requires scale factor of 1"),
+ gotrel[k].str);
+ return;
+
+ case x86_tls_error_base_reg_size:
+ as_bad (_("@%s operator requires 32-bit base register"),
+ gotrel[k].str);
+ return;
+
+ case x86_tls_error_dest_32bit_reg_size:
+ as_bad (_("@%s operator requires 32-bit dest register"),
+ gotrel[k].str);
+ return;
+
+ case x86_tls_error_dest_64bit_reg_size:
+ as_bad (_("@%s operator requires 64-bit dest register"),
+ gotrel[k].str);
+ return;
+
+ case x86_tls_error_dest_32bit_or_64bit_reg_size:
+ as_bad (_("@%s operator requires 32-bit or 64-bit dest register"),
+ gotrel[k].str);
+ return;
+
+ default:
+ abort ();
+ }
+}
+#endif
+
/* This is the guts of the machine-dependent assembler. LINE points to a
machine dependent instruction. This function is supposed to emit
the frags/bytes it assembles to. */
@@ -6691,6 +7287,23 @@ i386_assemble (char *line)
i.prefix[LOCK_PREFIX] = 0;
}
+#ifdef OBJ_ELF
+ if (i.has_gotrel && tls_check)
+ {
+ enum x86_tls_error_type tls_error;
+ for (j = 0; j < i.operands; ++j)
+ {
+ tls_error = x86_check_tls_relocation (i.reloc[j]);
+ if (tls_error == x86_tls_error_continue)
+ continue;
+
+ if (tls_error != x86_tls_error_none)
+ x86_report_tls_error (tls_error, i.reloc[j]);
+ break;
+ }
+ }
+#endif
+
if ((is_any_vex_encoding (&i.tm) && i.tm.opcode_space != SPACE_EVEXMAP4)
|| i.tm.operand_types[i.imm_operands].bitfield.class >= RegMMX
|| i.tm.operand_types[i.imm_operands + 1].bitfield.class >= RegMMX)
@@ -6701,28 +7314,6 @@ i386_assemble (char *line)
as_bad (_("data size prefix invalid with `%s'"), insn_name (&i.tm));
return;
}
-
- /* Don't allow e.g. KMOV in TLS code sequences which will trigger
- linker error later. */
- for (j = i.imm_operands; j < i.operands; ++j)
- switch (i.reloc[j])
- {
- case BFD_RELOC_X86_64_GOTTPOFF:
- case BFD_RELOC_386_TLS_GOTIE:
- case BFD_RELOC_X86_64_TLSLD:
- for (unsigned int k = 0; k < ARRAY_SIZE (gotrel); k++)
- {
- if (gotrel[k].rel[object_64bit] == i.reloc[j])
- {
- as_bad (_("@%s operator cannot be used with `%s'"),
- gotrel[k].str, insn_name (&i.tm));
- return;
- }
- }
- abort ();
- default:
- break;
- }
}
/* Check if HLE prefix is OK. */
@@ -6931,10 +7522,10 @@ i386_assemble (char *line)
/* We are ready to output the insn. */
output_insn (last_insn);
-#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
+#ifdef OBJ_ELF
/* PS: SCFI is enabled only for System V AMD64 ABI. The ABI check has been
performed in i386_target_format. */
- if (IS_ELF && flag_synth_cfi)
+ if (flag_synth_cfi)
{
ginsnS *ginsn;
ginsn = x86_ginsn_new (symbol_temp_new_now (), frch_ginsn_gen_mode ());
@@ -9703,7 +10294,7 @@ process_suffix (const insn_template *t)
? i.op[1].regs->reg_type.bitfield.word
: i.op[1].regs->reg_type.bitfield.dword)
&& ((i.base_reg == NULL && i.index_reg == NULL)
-#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
+#ifdef OBJ_ELF
|| (x86_elf_abi == X86_64_X32_ABI
&& i.base_reg
&& i.base_reg->reg_num == RegIP
@@ -10849,17 +11440,14 @@ output_branch (void)
frag_var (rs_machine_dependent, 5, i.reloc[0], subtype, sym, off, p);
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+/* PLT32 relocation is ELF only. */
+#ifdef OBJ_ELF
/* Return TRUE iff PLT32 relocation should be used for branching to
symbol S. */
static bool
need_plt32_p (symbolS *s)
{
- /* PLT32 relocation is ELF only. */
- if (!IS_ELF)
- return false;
-
#ifdef TE_SOLARIS
/* Don't emit PLT32 relocation on Solaris: neither native linker nor
krtld support it. */
@@ -10971,7 +11559,7 @@ output_jump (void)
abort ();
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
if (flag_code == CODE_64BIT && size == 4
&& jump_reloc == NO_RELOC && i.op[0].disps->X_add_number == 0
&& need_plt32_p (i.op[0].disps->X_add_symbol))
@@ -11134,7 +11722,7 @@ i386_unrecognized_line (int ch)
return 1;
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
void
x86_cleanup (void)
{
@@ -11147,7 +11735,7 @@ x86_cleanup (void)
unsigned int isa_1_descsz_raw, feature_2_descsz_raw;
unsigned int padding;
- if (!IS_ELF || !x86_used_note)
+ if (!x86_used_note)
return;
x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_X86;
@@ -11556,8 +12144,8 @@ output_insn (const struct last_insn *last_insn)
or never be used. */
enum mf_jcc_kind mf_jcc = mf_jcc_jo;
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (IS_ELF && x86_used_note && now_seg != absolute_section)
+#ifdef OBJ_ELF
+ if (x86_used_note && now_seg != absolute_section)
{
if ((i.xstate & xstate_tmm) == xstate_tmm
|| is_cpu (&i.tm, CpuAMX_TILE))
@@ -11832,7 +12420,7 @@ output_insn (const struct last_insn *last_insn)
abort ();
}
-#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
+#ifdef OBJ_ELF
/* For x32, add a dummy REX_OPCODE prefix for mov/add with
R_X86_64_GOTTPOFF relocation so that linker can safely
perform IE->LE optimization. A dummy REX_OPCODE prefix
@@ -12447,10 +13035,7 @@ x86_address_bytes (void)
return stdoutput->arch_info->bits_per_address / 8;
}
-#if (!(defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (OBJ_MACH_O)) \
- || defined (LEX_AT)) && !defined (TE_PE)
-# define lex_got(reloc, adjust, types) NULL
-#else
+#if (defined (OBJ_ELF) || defined (OBJ_MACH_O) || defined (TE_PE))
/* Parse operands of the form
<symbol>@GOTOFF+<nnn>
and similar .plt or .got references.
@@ -12473,11 +13058,6 @@ lex_got (enum bfd_reloc_code_real *rel,
char *cp;
unsigned int j;
-#if defined (OBJ_MAYBE_ELF) && !defined (TE_PE)
- if (!IS_ELF)
- return NULL;
-#endif
-
for (cp = input_line_pointer; *cp != '@'; cp++)
if (is_end_of_line[(unsigned char) *cp] || *cp == ',')
return NULL;
@@ -12492,6 +13072,7 @@ lex_got (enum bfd_reloc_code_real *rel,
int first, second;
char *tmpbuf, *past_reloc;
+ i.has_gotrel = true;
*rel = gotrel[j].rel[object_64bit];
if (types)
@@ -12547,6 +13128,8 @@ lex_got (enum bfd_reloc_code_real *rel,
/* Might be a symbol version string. Don't as_bad here. */
return NULL;
}
+#else
+# define lex_got(reloc, adjust, types) NULL
#endif
bfd_reloc_code_real_type
@@ -12558,9 +13141,7 @@ x86_cons (expressionS *exp, int size)
exp->X_md = 0;
expr_mode = expr_operator_none;
-#if ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
- && !defined (LEX_AT)) \
- || defined (TE_PE)
+#if defined (OBJ_ELF) || defined (TE_PE)
if (size == 4 || (object_64bit && size == 8))
{
/* Handle @GOTOFF and the like in an expression. */
@@ -13431,10 +14012,10 @@ s_insn (int dummy ATTRIBUTE_UNUSED)
last_insn->name = ".insn directive";
last_insn->file = as_where (&last_insn->line);
-#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
+#ifdef OBJ_ELF
/* PS: SCFI is enabled only for System V AMD64 ABI. The ABI check has been
performed in i386_target_format. */
- if (IS_ELF && flag_synth_cfi)
+ if (flag_synth_cfi)
as_bad (_("SCFI: hand-crafting instructions not supported"));
#endif
@@ -13840,9 +14421,8 @@ i386_finalize_immediate (segT exp_seg ATTRIBUTE_UNUSED, expressionS *exp,
&& flag_code != CODE_64BIT && !object_64bit)
exp->X_add_number = extend_to_32bit_address (exp->X_add_number);
}
-#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
- else if (OUTPUT_FLAVOR == bfd_target_aout_flavour
- && exp_seg != absolute_section
+#ifdef OBJ_AOUT
+ else if (exp_seg != absolute_section
&& exp_seg != text_section
&& exp_seg != data_section
&& exp_seg != bss_section
@@ -14129,9 +14709,8 @@ i386_finalize_displacement (segT exp_seg ATTRIBUTE_UNUSED, expressionS *exp,
exp->X_add_number = extend_to_32bit_address (exp->X_add_number);
}
-#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
- else if (OUTPUT_FLAVOR == bfd_target_aout_flavour
- && exp_seg != absolute_section
+#ifdef OBJ_AOUT
+ else if (exp_seg != absolute_section
&& exp_seg != text_section
&& exp_seg != data_section
&& exp_seg != bss_section
@@ -14812,7 +15391,7 @@ i386_frag_max_var (fragS *frag)
return TYPE_FROM_RELAX_STATE (frag->fr_subtype) == UNCOND_JUMP ? 4 : 5;
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
static int
elf_symbol_resolved_in_segment_p (symbolS *fr_symbol, offsetT fr_var)
{
@@ -15270,14 +15849,12 @@ md_estimate_size_before_relax (fragS *fragP, segT segment)
an externally visible symbol, because it may be overridden by a
shared library. */
if (S_GET_SEGMENT (fragP->fr_symbol) != segment
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- || (IS_ELF
- && !elf_symbol_resolved_in_segment_p (fragP->fr_symbol,
- fragP->fr_var))
+#ifdef OBJ_ELF
+ || !elf_symbol_resolved_in_segment_p (fragP->fr_symbol,
+ fragP->fr_var)
#endif
#if defined (OBJ_COFF) && defined (TE_PE)
- || (OUTPUT_FLAVOR == bfd_target_coff_flavour
- && S_IS_WEAK (fragP->fr_symbol))
+ || S_IS_WEAK (fragP->fr_symbol)
#endif
)
{
@@ -15293,7 +15870,7 @@ md_estimate_size_before_relax (fragS *fragP, segT segment)
reloc_type = (enum bfd_reloc_code_real) fragP->fr_var;
else if (size == 2)
reloc_type = BFD_RELOC_16_PCREL;
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
else if (fragP->tc_frag_data.code == CODE_64BIT
&& fragP->fr_offset == 0
&& need_plt32_p (fragP->fr_symbol))
@@ -15644,30 +16221,22 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
This covers for the fact that bfd_install_relocation will
subtract the current location (for partial_inplace, PC relative
relocations); see more below. */
-#ifndef OBJ_AOUT
- if (IS_ELF
-#ifdef TE_PE
- || OUTPUT_FLAVOR == bfd_target_coff_flavour
+#if defined (OBJ_ELF) || defined (TE_PE)
+ value += fixP->fx_where + fixP->fx_frag->fr_address;
#endif
- )
- value += fixP->fx_where + fixP->fx_frag->fr_address;
-#endif
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (IS_ELF)
- {
- segT sym_seg = S_GET_SEGMENT (fixP->fx_addsy);
+#ifdef OBJ_ELF
+ segT sym_seg = S_GET_SEGMENT (fixP->fx_addsy);
- if ((sym_seg == seg
- || (symbol_section_p (fixP->fx_addsy)
- && sym_seg != absolute_section))
- && !generic_force_reloc (fixP))
- {
- /* Yes, we add the values in twice. This is because
- bfd_install_relocation subtracts them out again. I think
- bfd_install_relocation is broken, but I don't dare change
- it. FIXME. */
- value += fixP->fx_where + fixP->fx_frag->fr_address;
- }
+ if ((sym_seg == seg
+ || (symbol_section_p (fixP->fx_addsy)
+ && sym_seg != absolute_section))
+ && !generic_force_reloc (fixP))
+ {
+ /* Yes, we add the values in twice. This is because
+ bfd_install_relocation subtracts them out again. I think
+ bfd_install_relocation is broken, but I don't dare change
+ it. FIXME. */
+ value += fixP->fx_where + fixP->fx_frag->fr_address;
}
#endif
#if defined (OBJ_COFF) && defined (TE_PE)
@@ -15700,8 +16269,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
/* Fix a few things - the dynamic linker expects certain values here,
and we must not disappoint it. */
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (IS_ELF && fixP->fx_addsy)
+#ifdef OBJ_ELF
+ if (fixP->fx_addsy)
switch (fixP->fx_r_type)
{
case BFD_RELOC_386_PLT32:
@@ -15753,7 +16322,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
default:
break;
}
-#endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */
+#endif /* OBJ_ELF */
/* If not 64bit, massage value, to account for wraparound when !BFD64. */
if (!object_64bit)
@@ -16184,7 +16753,7 @@ bool i386_record_operator (operatorT op,
}
#endif
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
const char *md_shortopts = "kVQ:sqnO::";
#else
const char *md_shortopts = "qnO::";
@@ -16225,15 +16794,15 @@ const char *md_shortopts = "qnO::";
#define OPTION_MLFENCE_BEFORE_INDIRECT_BRANCH (OPTION_MD_BASE + 32)
#define OPTION_MLFENCE_BEFORE_RET (OPTION_MD_BASE + 33)
#define OPTION_MUSE_UNALIGNED_VECTOR_MOVE (OPTION_MD_BASE + 34)
+#define OPTION_MTLS_CHECK (OPTION_MD_BASE + 35)
struct option md_longopts[] =
{
{"32", no_argument, NULL, OPTION_32},
-#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
- || defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O))
+#if (defined (OBJ_ELF) || defined (TE_PE) || defined (OBJ_MACH_O))
{"64", no_argument, NULL, OPTION_64},
#endif
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
{"x32", no_argument, NULL, OPTION_X32},
{"mshared", no_argument, NULL, OPTION_MSHARED},
{"mx86-used-note", required_argument, NULL, OPTION_X86_USED_NOTE},
@@ -16271,6 +16840,7 @@ struct option md_longopts[] =
{"mlfence-before-ret", required_argument, NULL, OPTION_MLFENCE_BEFORE_RET},
{"mamd64", no_argument, NULL, OPTION_MAMD64},
{"mintel64", no_argument, NULL, OPTION_MINTEL64},
+ {"mtls-check", required_argument, NULL, OPTION_MTLS_CHECK},
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
@@ -16291,7 +16861,7 @@ md_parse_option (int c, const char *arg)
quiet_warnings = 1;
break;
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
/* -Qy, -Qn: SVR4 arguments controlling whether a .comment section
should be emitted or not. FIXME: Not implemented. */
case 'Q':
@@ -16328,8 +16898,7 @@ md_parse_option (int c, const char *arg)
#endif
-#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
- || defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O))
+#if (defined (OBJ_ELF) || defined (TE_PE) || defined (OBJ_MACH_O))
case OPTION_64:
{
const char **list, **l;
@@ -16352,25 +16921,22 @@ md_parse_option (int c, const char *arg)
break;
#endif
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
case OPTION_X32:
- if (IS_ELF)
- {
- const char **list, **l;
+ {
+ const char **list, **l;
- list = bfd_target_list ();
- for (l = list; *l != NULL; l++)
- if (startswith (*l, "elf32-x86-64"))
- {
- default_arch = "x86_64:32";
- break;
- }
- if (*l == NULL)
- as_fatal (_("no compiled in support for 32bit x86_64"));
- free (list);
- }
- else
- as_fatal (_("32bit x86_64 is only supported for ELF"));
+ list = bfd_target_list ();
+ for (l = list; *l != NULL; l++)
+ if (startswith (*l, "elf32-x86-64"))
+ {
+ default_arch = "x86_64:32";
+ break;
+ }
+ if (*l == NULL)
+ as_fatal (_("no compiled in support for 32bit x86_64"));
+ free (list);
+ }
break;
#endif
@@ -16827,6 +17393,14 @@ md_parse_option (int c, const char *arg)
optimize_for_space = 0;
}
break;
+ case OPTION_MTLS_CHECK:
+ if (strcasecmp (arg, "yes") == 0)
+ tls_check = true;
+ else if (strcasecmp (arg, "no") == 0)
+ tls_check = false;
+ else
+ as_fatal (_("invalid -mtls-check= option: `%s'"), arg);
+ break;
default:
return 0;
@@ -16950,7 +17524,7 @@ show_arch (FILE *stream, int ext, int check)
void
md_show_usage (FILE *stream)
{
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
fprintf (stream, _("\
-Qy, -Qn ignored\n\
-V print assembler version number\n\
@@ -16960,12 +17534,12 @@ md_show_usage (FILE *stream)
-n do not optimize code alignment\n\
-O{012s} attempt some code optimizations\n\
-q quieten some warnings\n"));
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
fprintf (stream, _("\
-s ignored\n"));
#endif
#ifdef BFD64
-# if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+# ifdef OBJ_ELF
fprintf (stream, _("\
--32/--64/--x32 generate 32bit/64bit/x32 object\n"));
# elif defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O)
@@ -17038,7 +17612,7 @@ md_show_usage (FILE *stream)
-mnaked-reg don't require `%%' prefix for registers\n"));
fprintf (stream, _("\
-madd-bnd-prefix add BND prefix for all valid branches\n"));
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
fprintf (stream, _("\
-mshared disable branch optimization for shared code\n"));
fprintf (stream, _("\
@@ -17069,6 +17643,16 @@ md_show_usage (FILE *stream)
fprintf (stream, _("(default: no)\n"));
fprintf (stream, _("\
generate relax relocations\n"));
+#ifdef OBJ_ELF
+ fprintf (stream, _("\
+ -mtls-check=[no|yes] "));
+ if (DEFAULT_X86_TLS_CHECK)
+ fprintf (stream, _("(default: yes)\n"));
+ else
+ fprintf (stream, _("(default: no)\n"));
+ fprintf (stream, _("\
+ check TLS relocation\n"));
+#endif
fprintf (stream, _("\
-malign-branch-boundary=NUM (default: 0)\n\
align branches within NUM byte boundary\n"));
@@ -17098,9 +17682,7 @@ md_show_usage (FILE *stream)
-mintel64 accept only Intel64 ISA\n"));
}
-#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
- || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
- || defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O))
+#if (defined (OBJ_ELF) || defined (TE_PE) || defined (OBJ_MACH_O))
/* Pick the target format to use. */
@@ -17110,7 +17692,7 @@ i386_target_format (void)
if (startswith (default_arch, "x86_64"))
{
update_code_flag (CODE_64BIT, 1);
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
if (default_arch[6] == '\0')
x86_elf_abi = X86_64_ABI;
else
@@ -17141,8 +17723,8 @@ i386_target_format (void)
else
as_fatal (_("unknown architecture"));
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (IS_ELF && flag_synth_cfi && x86_elf_abi != X86_64_ABI)
+#ifdef OBJ_ELF
+ if (flag_synth_cfi && x86_elf_abi != X86_64_ABI)
as_fatal (_("SCFI is not supported for this ABI"));
#endif
@@ -17151,12 +17733,7 @@ i386_target_format (void)
switch (OUTPUT_FLAVOR)
{
-#if defined (OBJ_MAYBE_AOUT) || defined (OBJ_AOUT)
- case bfd_target_aout_flavour:
- return AOUT_TARGET_FORMAT;
-#endif
-#if defined (OBJ_MAYBE_COFF) || defined (OBJ_COFF)
-# if defined (TE_PE) || defined (TE_PEP)
+#ifdef TE_PE
case bfd_target_coff_flavour:
if (flag_code == CODE_64BIT)
{
@@ -17164,15 +17741,8 @@ i386_target_format (void)
return use_big_obj ? "pe-bigobj-x86-64" : "pe-x86-64";
}
return use_big_obj ? "pe-bigobj-i386" : "pe-i386";
-# elif defined (TE_GO32)
- case bfd_target_coff_flavour:
- return "coff-go32";
-# else
- case bfd_target_coff_flavour:
- return "coff-i386";
-# endif
#endif
-#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
+#ifdef OBJ_ELF
case bfd_target_elf_flavour:
{
const char *format;
@@ -17230,7 +17800,7 @@ i386_target_format (void)
}
}
-#endif /* OBJ_MAYBE_ more than one */
+#endif /* ELF / PE / MACH_O */
symbolS *
md_undefined_symbol (char *name)
@@ -17252,26 +17822,20 @@ md_undefined_symbol (char *name)
return 0;
}
-#if defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)
+#ifdef OBJ_AOUT
/* Round up a section size to the appropriate boundary. */
valueT
md_section_align (segT segment, valueT size)
{
- if (OUTPUT_FLAVOR == bfd_target_aout_flavour)
- {
- /* For a.out, force the section size to be aligned. If we don't do
- this, BFD will align it for us, but it will not write out the
- final bytes of the section. This may be a bug in BFD, but it is
- easier to fix it here since that is how the other a.out targets
- work. */
- int align;
-
- align = bfd_section_alignment (segment);
- size = ((size + (1 << align) - 1) & (-((valueT) 1 << align)));
- }
-
- return size;
+ /* For a.out, force the section size to be aligned. If we don't do
+ this, BFD will align it for us, but it will not write out the
+ final bytes of the section. This may be a bug in BFD, but it is
+ easier to fix it here since that is how the other a.out targets
+ work. */
+ int align = bfd_section_alignment (segment);
+
+ return ((size + (1 << align) - 1) & (-((valueT) 1 << align)));
}
#endif
@@ -17329,10 +17893,10 @@ i386_validate_fix (fixS *fixp)
return 0;
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
if (fixp->fx_r_type == BFD_RELOC_SIZE32
|| fixp->fx_r_type == BFD_RELOC_SIZE64)
- return IS_ELF && fixp->fx_addsy
+ return fixp->fx_addsy
&& (!S_IS_DEFINED (fixp->fx_addsy)
|| S_IS_EXTERNAL (fixp->fx_addsy));
@@ -17367,7 +17931,7 @@ i386_validate_fix (fixS *fixp)
{
if (!object_64bit)
abort ();
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
if (fixp->fx_tcbit)
fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCRELX;
else if (fixp->fx_tcbit2)
@@ -17388,13 +17952,17 @@ i386_validate_fix (fixS *fixp)
fixp->fx_subsy = 0;
}
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
else
{
/* NB: Commit 292676c1 resolved PLT32 reloc aganst local symbol
to section. Since PLT32 relocation must be against symbols,
- turn such PLT32 relocation into PC32 relocation. */
+ turn such PLT32 relocation into PC32 relocation. NB: We can
+ turn PLT32 relocation into PC32 relocation only for PC-relative
+ relocations since non-PC-relative relocations need PLT entries.
+ */
if (fixp->fx_addsy
+ && fixp->fx_pcrel
&& (fixp->fx_r_type == BFD_RELOC_386_PLT32
|| fixp->fx_r_type == BFD_RELOC_X86_64_PLT32)
&& symbol_section_p (fixp->fx_addsy))
@@ -17419,7 +17987,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
switch (fixp->fx_r_type)
{
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
symbolS *sym;
case BFD_RELOC_SIZE32:
@@ -17436,7 +18004,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
sym = fixp->fx_subsy;
else
sym = NULL;
- if (IS_ELF && sym && S_IS_DEFINED (sym) && !S_IS_EXTERNAL (sym))
+ if (sym && S_IS_DEFINED (sym) && !S_IS_EXTERNAL (sym))
{
/* Resolve size relocation against local symbol to size of
the symbol plus addend. */
@@ -17714,7 +18282,7 @@ tc_x86_frame_initial_instructions (void)
int
x86_dwarf2_addr_size (void)
{
-#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
+#ifdef OBJ_ELF
if (x86_elf_abi == X86_64_X32_ABI)
return 4;
#endif
@@ -17734,7 +18302,7 @@ tc_pe_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
}
#endif
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
int
i386_elf_section_type (const char *str, size_t len)
{
@@ -17843,4 +18411,4 @@ handle_large_common (int small ATTRIBUTE_UNUSED)
bss_section = saved_bss_section;
}
}
-#endif /* OBJ_ELF || OBJ_MAYBE_ELF */
+#endif /* OBJ_ELF */
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index cda7166..5ee6694 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -84,9 +84,7 @@ extern unsigned long i386_mach (void);
#define ELF_TARGET_IAMCU_FORMAT "elf32-iamcu"
#endif
-#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
- || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
- || defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O))
+#if (defined (OBJ_ELF) || defined (TE_PE) || defined (OBJ_MACH_O))
extern const char *i386_target_format (void);
#define TARGET_FORMAT i386_target_format ()
#else
@@ -141,7 +139,7 @@ int i386_validate_fix (struct fix *);
if (!i386_validate_fix(FIX)) goto SKIP; \
} while (0)
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
#define tc_fix_adjustable(X) tc_i386_fix_adjustable(X)
extern int tc_i386_fix_adjustable (struct fix *);
#else
@@ -233,7 +231,7 @@ if ((n) \
extern void i386_cons_align (int);
#define md_cons_align(nbytes) i386_cons_align (nbytes)
-#if !defined (OBJ_AOUT) && !defined (OBJ_MAYBE_AOUT)
+#ifndef OBJ_AOUT
#define md_section_align(seg, value) ((void)(seg), (value))
#endif
@@ -426,7 +424,7 @@ extern void i386_solaris_fix_up_eh_frame (segT);
extern bfd_vma x86_64_section_letter (int, const char **);
#define md_elf_section_letter(LETTER, PTR_MSG) x86_64_section_letter (LETTER, PTR_MSG)
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#ifdef OBJ_ELF
extern void x86_cleanup (void);
#define md_cleanup() x86_cleanup ()
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 28d3ed8..576ef1f 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -10831,13 +10831,10 @@ macro (struct mips_cl_insn *ip, char *str)
if (mips_opts.micromips)
micromips_label_expr (&label_expr);
else
- label_expr.X_add_number = (mips_use_trap ()
- ? (dbl ? 12 : 8) : (dbl ? 20 : 16));
+ label_expr.X_add_number = mips_use_trap () ? 8 : 16;
macro_build (&label_expr, "bne", "s,t,p", op[2], AT);
if (dbl)
{
- expr1.X_add_number = 1;
- load_register (AT, &expr1, dbl);
macro_build (NULL, "dsll32", SHFT_FMT, AT, AT, 31);
}
else
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index bf2020d..ef455e4 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -81,6 +81,7 @@ enum riscv_csr_class
CSR_CLASS_SMCSRIND, /* Smcsrind */
CSR_CLASS_SMCNTRPMF, /* Smcntrpmf */
CSR_CLASS_SMCNTRPMF_32, /* Smcntrpmf, rv32 only */
+ CSR_CLASS_SMRNMI, /* Smrnmi */
CSR_CLASS_SMSTATEEN, /* Smstateen only */
CSR_CLASS_SMSTATEEN_32, /* Smstateen RV32 only */
CSR_CLASS_SSAIA, /* Ssaia */
@@ -184,6 +185,9 @@ static enum float_abi float_abi = FLOAT_ABI_DEFAULT;
static unsigned elf_flags = 0;
+/* Indicate whether we are already assembling any instructions. */
+static bool start_assemble = false;
+
static bool probing_insn_operands;
/* Set the default_isa_spec. Return 0 if the spec isn't supported.
@@ -281,6 +285,16 @@ riscv_set_rvc (bool rvc_value)
if (rvc_value)
elf_flags |= EF_RISCV_RVC;
+ if (start_assemble && subseg_text_p (now_seg)
+ && riscv_opts.rvc && !rvc_value)
+ {
+ struct riscv_segment_info_type *info
+ = &seg_info(now_seg)->tc_segment_info_data;
+
+ info->last_insn16 = true;
+ info->rvc = rvc_value;
+ }
+
riscv_opts.rvc = rvc_value;
}
@@ -353,10 +367,8 @@ riscv_set_arch (const char *s)
riscv_set_arch_str (&file_arch_str);
riscv_set_arch_str (&riscv_rps_as.subset_list->arch_str);
- riscv_set_rvc (false);
- if (riscv_subset_supports (&riscv_rps_as, "c")
- || riscv_subset_supports (&riscv_rps_as, "zca"))
- riscv_set_rvc (true);
+ riscv_set_rvc (riscv_subset_supports (&riscv_rps_as, "c")
+ || riscv_subset_supports (&riscv_rps_as, "zca"));
if (riscv_subset_supports (&riscv_rps_as, "ztso"))
riscv_set_tso ();
@@ -456,9 +468,6 @@ const char EXP_CHARS[] = "eE";
As in 0f12.456 or 0d1.2345e12. */
const char FLT_CHARS[] = "rRsSfFdDxXpPhH";
-/* Indicate we are already assemble any instructions or not. */
-static bool start_assemble = false;
-
/* Indicate ELF attributes are explicitly set. */
static bool explicit_attr = false;
@@ -570,19 +579,19 @@ make_mapping_symbol (enum riscv_seg_mstate state,
}
frag->tc_frag_data.last_map_symbol = symbol;
- if (removed == NULL)
- return;
-
if (odd_data_padding)
{
/* If the removed mapping symbol is $x+arch, then add it back to
the next $x. */
- const char *str = strncmp (S_GET_NAME (removed), "$xrv", 4) == 0
+ const char *str = removed != NULL
+ && strncmp (S_GET_NAME (removed), "$xrv", 4) == 0
? S_GET_NAME (removed) + 2 : NULL;
make_mapping_symbol (MAP_INSN, frag->fr_fix + 1, frag, str,
false/* odd_data_padding */);
}
- symbol_remove (removed, &symbol_rootP, &symbol_lastP);
+
+ if (removed != NULL)
+ symbol_remove (removed, &symbol_rootP, &symbol_lastP);
}
/* Set the mapping state for frag_now. */
@@ -626,6 +635,7 @@ riscv_mapping_state (enum riscv_seg_mstate to_state,
valueT value = (valueT) (frag_now_fix () - max_chars);
seg_info (now_seg)->tc_segment_info_data.map_state = to_state;
+ seg_info (now_seg)->tc_segment_info_data.last_insn16 = false;
const char *arch_str = reset_seg_arch_str
? riscv_rps_as.subset_list->arch_str : NULL;
make_mapping_symbol (to_state, value, frag_now, arch_str,
@@ -1082,6 +1092,9 @@ riscv_csr_address (const char *csr_name,
need_check_version = true;
extension = "smcntrpmf";
break;
+ case CSR_CLASS_SMRNMI:
+ extension = "smrnmi";
+ break;
case CSR_CLASS_SMSTATEEN_32:
is_rv32_only = true;
/* Fall through. */
@@ -4233,12 +4246,13 @@ riscv_ip_hardcode (char *str,
generic_bignum[num],
llen);
memset(ip->insn_long_opcode + repr_bytes, 0, bytes - repr_bytes);
- return NULL;
}
-
- if (bytes < sizeof(values[0]) && values[num - 1] >> (8 * bytes) != 0)
+ else if (bytes < sizeof(values[0]) && values[num - 1] >> (8 * bytes) != 0)
return _("value conflicts with instruction length");
+ if (!riscv_opts.rvc && (bytes & 2))
+ seg_info (now_seg)->tc_segment_info_data.last_insn16 = true;
+
return NULL;
}
@@ -4925,10 +4939,8 @@ s_riscv_option (int x ATTRIBUTE_UNUSED)
riscv_update_subset (&riscv_rps_as, name);
riscv_set_arch_str (&riscv_rps_as.subset_list->arch_str);
- riscv_set_rvc (false);
- if (riscv_subset_supports (&riscv_rps_as, "c")
- || riscv_subset_supports (&riscv_rps_as, "zca"))
- riscv_set_rvc (true);
+ riscv_set_rvc (riscv_subset_supports (&riscv_rps_as, "c")
+ || riscv_subset_supports (&riscv_rps_as, "zca"));
if (riscv_subset_supports (&riscv_rps_as, "ztso"))
riscv_set_tso ();
@@ -5036,15 +5048,27 @@ riscv_frag_align_code (int n)
char *nops;
expressionS ex;
- /* If we are moving to a smaller alignment than the instruction size, then no
- alignment is required. */
+ /* If we are moving to alignment no larger than the instruction size, then
+ no special alignment handling is required. */
if (bytes <= insn_alignment)
- return true;
+ {
+ if (bytes == insn_alignment)
+ seg_info (now_seg)->tc_segment_info_data.last_insn16 = false;
+ return false;
+ }
/* When not relaxing, riscv_handle_align handles code alignment. */
if (!riscv_opts.relax)
return false;
+ /* If the last item emitted was not an ordinary insn, first align back to
+ insn granularity. Don't do this unconditionally, to avoid altering frags
+ when that's not actually needed. */
+ if (seg_info (now_seg)->tc_segment_info_data.map_state != MAP_INSN
+ || seg_info (now_seg)->tc_segment_info_data.last_insn16)
+ frag_align_code (riscv_opts.rvc ? 1 : 2, 0);
+ seg_info (now_seg)->tc_segment_info_data.last_insn16 = false;
+
/* Maybe we should use frag_var to create a new rs_align_code fragment,
rather than just use frag_more to handle an alignment here? So that we
don't need to call riscv_mapping_state again later, and then only need
@@ -5362,6 +5386,18 @@ tc_riscv_regname_to_dw2regnum (char *regname)
}
void
+riscv_elf_section_change_hook (void)
+{
+ struct riscv_segment_info_type *info
+ = &seg_info(now_seg)->tc_segment_info_data;
+
+ if (info->rvc && !riscv_opts.rvc)
+ info->last_insn16 = true;
+
+ info->rvc = riscv_opts.rvc;
+}
+
+void
riscv_elf_final_processing (void)
{
riscv_set_abi_by_arch ();
diff --git a/gas/config/tc-riscv.h b/gas/config/tc-riscv.h
index 07a00b6..05594cf 100644
--- a/gas/config/tc-riscv.h
+++ b/gas/config/tc-riscv.h
@@ -128,6 +128,9 @@ extern int tc_riscv_regname_to_dw2regnum (char *);
/* Even on RV64, use 4-byte alignment, as F registers may be only 32 bits. */
#define DWARF2_CIE_DATA_ALIGNMENT -4
+#define md_elf_section_change_hook riscv_elf_section_change_hook
+extern void riscv_elf_section_change_hook (void);
+
#define elf_tc_final_processing riscv_elf_final_processing
extern void riscv_elf_final_processing (void);
@@ -153,6 +156,8 @@ void riscv_mapping_state (enum riscv_seg_mstate, int, bool);
struct riscv_segment_info_type
{
enum riscv_seg_mstate map_state;
+ bool rvc;
+ bool last_insn16;
/* The current mapping symbol with architecture string. */
symbolS *arch_map_symbol;
};
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 659c6af..055b694 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -342,6 +342,8 @@ s390_parse_cpu (const char *arg,
{ STRING_COMMA_LEN ("z15"), STRING_COMMA_LEN ("arch13"),
S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX },
{ STRING_COMMA_LEN ("z16"), STRING_COMMA_LEN ("arch14"),
+ S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX },
+ { STRING_COMMA_LEN (""), STRING_COMMA_LEN ("arch15"),
S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }
};
static struct
@@ -795,13 +797,6 @@ s390_insert_operand (unsigned char *insn,
uval &= 0xf;
}
- if (operand->flags & S390_OPERAND_OR1)
- uval |= 1;
- if (operand->flags & S390_OPERAND_OR2)
- uval |= 2;
- if (operand->flags & S390_OPERAND_OR8)
- uval |= 8;
-
/* Duplicate the GPR/VR operand at bit pos 12 to 16. */
if (operand->flags & S390_OPERAND_CP16)
{
diff --git a/gas/configure b/gas/configure
index 6b96d3a..47c43c0 100755
--- a/gas/configure
+++ b/gas/configure
@@ -818,6 +818,7 @@ enable_checking
enable_compressed_debug_sections
enable_default_compressed_debug_sections_algorithm
enable_x86_relax_relocations
+enable_x86_tls_check
enable_elf_stt_common
enable_generate_build_notes
enable_mips_fix_loongson3_llsc
@@ -1493,6 +1494,7 @@ Optional Features:
--enable-compressed-debug-sections.
--enable-x86-relax-relocations
generate x86 relax relocations by default
+ --enable-x86-tls-check check x86 TLS relocation by default
--enable-elf-stt-common generate ELF common symbols with STT_COMMON type by
default
--enable-generate-build-notes
@@ -10775,7 +10777,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10778 "configure"
+#line 10780 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10881,7 +10883,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10884 "configure"
+#line 10886 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11575,6 +11577,17 @@ if test "${enable_x86_relax_relocations+set}" = set; then :
esac
fi
+# PR gas/32022
+# Decide if x86 assembler should check TLS relocation.
+ac_default_x86_tls_check=unset
+# Provide a configure time option to override our default.
+# Check whether --enable-x86_tls_check was given.
+if test "${enable_x86_tls_check+set}" = set; then :
+ enableval=$enable_x86_tls_check; case "${enableval}" in
+ no) ac_default_x86_tls_check=0 ;;
+esac
+fi
+
# Decide if ELF assembler should generate common symbols with the
# STT_COMMON type.
ac_default_elf_stt_common=unset
@@ -12670,15 +12683,6 @@ $as_echo "$with_priv_spec" >&6; }
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
esac ;;
- # i386-pc-pe-coff != i386-pc-coff.
- i386-*-pe-coff) ;;
- # Uncommenting the next line will turn on support for i386 AOUT
- # for the default linux configuration
- # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
- #
- i386-*-aout) emulation="i386aout" ;;
- i386-*-coff) emulation="i386coff" ;;
- i386-*-elf) emulation="i386elf" ;;
# Always all formats. The first stated emulation becomes the default.
cris-*-*aout*) emulation="crisaout criself" ;;
@@ -12698,6 +12702,15 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+if test ${ac_default_x86_tls_check} = unset; then
+ ac_default_x86_tls_check=1
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_X86_TLS_CHECK $ac_default_x86_tls_check
+_ACEOF
+
+
if test ${ac_default_elf_stt_common} = unset; then
ac_default_elf_stt_common=0
fi
@@ -12753,38 +12766,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-# Turn on all targets if possible
-if test ${all_targets} = "yes"; then
- case ${target_cpu_type} in
- i386)
- case ${obj_format} in
- aout)
- emulations="$emulations i386coff i386elf"
- ;;
- coff)
- emulations="$emulations i386aout i386elf"
- ;;
- elf)
- emulations="$emulations i386aout i386coff"
- ;;
- esac
- ;;
- x86_64)
- case ${obj_format} in
- aout)
- emulations="$emulations i386coff i386elf"
- ;;
- coff)
- emulations="$emulations i386aout i386elf"
- ;;
- elf)
- emulations="$emulations i386aout i386coff"
- ;;
- esac
- ;;
- esac
-fi
-
# PE code has way too many macros tweaking behaviour
case ${te_file} in
pe*) emulations="" ;;
diff --git a/gas/configure.ac b/gas/configure.ac
index 6b978aa..ab1d0e0 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -95,6 +95,17 @@ AC_ARG_ENABLE(x86_relax_relocations,
no) ac_default_x86_relax_relocations=0 ;;
esac])dnl
+# PR gas/32022
+# Decide if x86 assembler should check TLS relocation.
+ac_default_x86_tls_check=unset
+# Provide a configure time option to override our default.
+AC_ARG_ENABLE(x86_tls_check,
+ AS_HELP_STRING([--enable-x86-tls-check],
+ [check x86 TLS relocation by default]),
+[case "${enableval}" in
+ no) ac_default_x86_tls_check=0 ;;
+esac])dnl
+
# Decide if ELF assembler should generate common symbols with the
# STT_COMMON type.
ac_default_elf_stt_common=unset
@@ -711,15 +722,6 @@ changequote([,])dnl
big) emulation="mipsbelf mipslelf mipself" ;;
*) emulation="mipslelf mipsbelf mipself" ;;
esac ;;
- # i386-pc-pe-coff != i386-pc-coff.
- i386-*-pe-coff) ;;
- # Uncommenting the next line will turn on support for i386 AOUT
- # for the default linux configuration
- # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
- #
- i386-*-aout) emulation="i386aout" ;;
- i386-*-coff) emulation="i386coff" ;;
- i386-*-elf) emulation="i386elf" ;;
# Always all formats. The first stated emulation becomes the default.
cris-*-*aout*) emulation="crisaout criself" ;;
@@ -737,6 +739,13 @@ AC_DEFINE_UNQUOTED(DEFAULT_GENERATE_X86_RELAX_RELOCATIONS,
$ac_default_x86_relax_relocations,
[Define to 1 if you want to generate x86 relax relocations by default.])
+if test ${ac_default_x86_tls_check} = unset; then
+ ac_default_x86_tls_check=1
+fi
+AC_DEFINE_UNQUOTED(DEFAULT_X86_TLS_CHECK,
+ $ac_default_x86_tls_check,
+ [Define to 1 if you want to check x86 TLS relocation by default.])
+
if test ${ac_default_elf_stt_common} = unset; then
ac_default_elf_stt_common=0
fi
@@ -780,38 +789,6 @@ fi
AC_DEFINE_UNQUOTED(DEFAULT_COMPRESSED_DEBUG_ALGORITHM, $ac_default_compressed_debug_sections_algorithm,
[Default compression algorithm for --enable-compressed-debug-sections.])
-# Turn on all targets if possible
-if test ${all_targets} = "yes"; then
- case ${target_cpu_type} in
- i386)
- case ${obj_format} in
- aout)
- emulations="$emulations i386coff i386elf"
- ;;
- coff)
- emulations="$emulations i386aout i386elf"
- ;;
- elf)
- emulations="$emulations i386aout i386coff"
- ;;
- esac
- ;;
- x86_64)
- case ${obj_format} in
- aout)
- emulations="$emulations i386coff i386elf"
- ;;
- coff)
- emulations="$emulations i386aout i386elf"
- ;;
- elf)
- emulations="$emulations i386aout i386coff"
- ;;
- esac
- ;;
- esac
-fi
-
# PE code has way too many macros tweaking behaviour
case ${te_file} in
pe*) emulations="" ;;
diff --git a/gas/doc/as.texi b/gas/doc/as.texi
index 0b4109e..4c7799a 100644
--- a/gas/doc/as.texi
+++ b/gas/doc/as.texi
@@ -1961,7 +1961,7 @@ Specify which s390 processor variant is the target, @samp{g5} (or
@samp{arch6}), @samp{z9-109}, @samp{z9-ec} (or @samp{arch7}), @samp{z10} (or
@samp{arch8}), @samp{z196} (or @samp{arch9}), @samp{zEC12} (or @samp{arch10}),
@samp{z13} (or @samp{arch11}), @samp{z14} (or @samp{arch12}), @samp{z15}
-(or @samp{arch13}), or @samp{z16} (or @samp{arch14}).
+(or @samp{arch13}), @samp{z16} (or @samp{arch14}), or @samp{arch15}.
@item -mregnames
@itemx -mno-regnames
Allow or disallow symbolic names for registers.
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index a9e4356..9667061 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -467,6 +467,16 @@ R_X86_64_REX_GOTPCRELX, in 64-bit mode.
relocations. The default can be controlled by a configure option
@option{--enable-x86-relax-relocations}.
+@cindex @samp{-mtls-check=} option, i386
+@cindex @samp{-mtls-check=} option, x86-64
+@item -mtls-check=@var{no}
+@itemx -mtls-check=@var{yes}
+These options control whether the assembler check tls relocation.
+@option{-mtls-check=@var{yes}} will check tls relocation.
+@option{-mtls-check=@var{no}} will not check tls relocation
+The default can be controlled by a configure option
+@option{--enable-x86-tls-check}.
+
@cindex @samp{-malign-branch-boundary=} option, i386
@cindex @samp{-malign-branch-boundary=} option, x86-64
@item -malign-branch-boundary=@var{NUM}
diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi
index f73dfde..9a4fdfe 100644
--- a/gas/doc/c-s390.texi
+++ b/gas/doc/c-s390.texi
@@ -18,7 +18,7 @@ and eleven chip levels. The architecture modes are the Enterprise System
Architecture (ESA) and the newer z/Architecture mode. The chip levels
are g5 (or arch3), g6, z900 (or arch5), z990 (or arch6), z9-109, z9-ec
(or arch7), z10 (or arch8), z196 (or arch9), zEC12 (or arch10), z13
-(or arch11), z14 (or arch12), z15 (or arch13), or z16 (or arch14).
+(or arch11), z14 (or arch12), z15 (or arch13), z16 (or arch14), or arch15.
@menu
* s390 Options:: Command-line Options.
@@ -71,8 +71,9 @@ are recognized:
@code{zEC12} (or @code{arch10}),
@code{z13} (or @code{arch11}),
@code{z14} (or @code{arch12}),
-@code{z15} (or @code{arch13}), and
-@code{z16} (or @code{arch14}).
+@code{z15} (or @code{arch13}),
+@code{z16} (or @code{arch14}), and
+@code{arch15}.
Assembling an instruction that is not supported on the target
processor results in an error message.
@@ -300,10 +301,11 @@ field. The notation changes as follows:
@display
@multitable @columnfractions 0.30 0.30
@headitem full notation @tab short notation
-@item Dn(0,Bn) @tab Dn(Bn)
+@item Dn(Xn,0) @tab Dn(Xn,)
+@item Dn(0,Bn) @tab Dn(,Bn) or Dn(Bn)
@item Dn(0,0) @tab Dn
@item Dn(0) @tab Dn
-@item Dn(Ln,0) @tab Dn(Ln)
+@item Dn(Ln,0) @tab Dn(Ln,) or Dn(Ln)
@end multitable
@end display
diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c
index db0261d..ca7605e 100644
--- a/gas/dw2gencfi.c
+++ b/gas/dw2gencfi.c
@@ -2498,16 +2498,15 @@ cfi_finish (void)
- .sframe in the .cfi_sections directive. */
if (flag_gen_sframe || (all_cfi_sections & CFI_EMIT_sframe) != 0)
{
- if (support_sframe_p ())
+ if (support_sframe_p () && !SUPPORT_FRAME_LINKONCE)
{
segT sframe_seg;
int alignment = ffs (DWARF2_ADDR_SIZE (stdoutput)) - 1;
- if (!SUPPORT_FRAME_LINKONCE)
- sframe_seg = get_cfi_seg (NULL, ".sframe",
- (SEC_ALLOC | SEC_LOAD | SEC_DATA
- | DWARF2_EH_FRAME_READ_ONLY),
- alignment);
+ sframe_seg = get_cfi_seg (NULL, ".sframe",
+ (SEC_ALLOC | SEC_LOAD | SEC_DATA
+ | DWARF2_EH_FRAME_READ_ONLY),
+ alignment);
output_sframe (sframe_seg);
}
else
diff --git a/gas/emul-target.h b/gas/emul-target.h
index d38e121..6b6064a 100644
--- a/gas/emul-target.h
+++ b/gas/emul-target.h
@@ -22,10 +22,6 @@
#define emul_init common_emul_init
#endif
-#ifndef emul_bfd_name
-#define emul_bfd_name default_emul_bfd_name
-#endif
-
#ifndef emul_local_labels_fb
#define emul_local_labels_fb 0
#endif
@@ -48,10 +44,8 @@
struct emulation emul_struct_name =
{
- 0,
emul_name,
emul_init,
- emul_bfd_name,
emul_local_labels_fb, emul_local_labels_dollar,
emul_leading_underscore,
emul_default_endian,
diff --git a/gas/emul.h b/gas/emul.h
index 635dbfd..355a700 100644
--- a/gas/emul.h
+++ b/gas/emul.h
@@ -23,10 +23,8 @@
struct emulation
{
- void (* match) (const char *);
const char * name;
void (* init) (void);
- const char *(* bfd_name) (void);
unsigned local_labels_fb : 1;
unsigned local_labels_dollar : 1;
unsigned leading_underscore : 2;
@@ -37,7 +35,9 @@ struct emulation
COMMON struct emulation * this_emulation;
-extern const char * default_emul_bfd_name (void);
+extern struct emulation mipsbelf, mipslelf, mipself;
+extern struct emulation crisaout, criself;
+
extern void common_emul_init (void);
#endif
diff --git a/gas/listing.c b/gas/listing.c
index ef17980..23f76a7 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -1026,12 +1026,25 @@ list_symbol_table (void)
typedef struct cached_line
{
- file_info_type * file;
- unsigned int line;
- char buffer [LISTING_RHS_WIDTH];
+ file_info_type *file;
+ unsigned int line;
+ unsigned int bufsize;
+ char *buffer;
} cached_line;
static void
+alloc_cache (cached_line *cache, unsigned int width)
+{
+ if (cache->bufsize < width)
+ {
+ cache->bufsize = width;
+ free (cache->buffer);
+ cache->buffer = xmalloc (width);
+ }
+ cache->buffer[0] = 0;
+}
+
+static void
print_source (file_info_type * current_file,
list_info_type * list,
unsigned int width)
@@ -1080,7 +1093,7 @@ print_source (file_info_type * current_file,
cache->file = current_file;
cache->line = list->hll_line;
- cache->buffer[0] = 0;
+ alloc_cache (cache, width);
rebuffer_line (current_file, cache->line, cache->buffer, width);
}
@@ -1101,7 +1114,7 @@ print_source (file_info_type * current_file,
cache = cached_lines + next_free_line;
cache->file = current_file;
cache->line = current_file->linenum + 1;
- cache->buffer[0] = 0;
+ alloc_cache (cache, width);
p = buffer_line (current_file, cache->buffer, width);
/* Cache optimization: If printing a group of lines
diff --git a/gas/obj.h b/gas/obj.h
index 4676d07..972fa92 100644
--- a/gas/obj.h
+++ b/gas/obj.h
@@ -46,6 +46,7 @@ struct format_ops {
void (*begin) (void);
void (*end) (void);
void (*app_file) (const char *);
+ void (*assign_symbol) (symbolS *);
void (*frob_symbol) (symbolS *, int *);
void (*frob_file) (void);
void (*frob_file_before_adjust) (void);
@@ -62,7 +63,6 @@ struct format_ops {
int (*s_get_type) (symbolS *);
void (*s_set_type) (symbolS *, int);
void (*copy_symbol_attributes) (symbolS *, symbolS *);
- void (*generate_asm_lineno) (void);
void (*process_stab) (int, const char *, int, int, int);
int (*separate_stab_sections) (void);
void (*init_stab_section) (segT, segT);
@@ -82,7 +82,7 @@ extern const struct format_ops ecoff_format_ops;
extern const struct format_ops coff_format_ops;
extern const struct format_ops aout_format_ops;
-#ifndef this_format
+#ifdef USE_EMULATIONS
COMMON const struct format_ops *this_format;
#endif
diff --git a/gas/po/POTFILES.in b/gas/po/POTFILES.in
index 5281cbb..820b7cd 100644
--- a/gas/po/POTFILES.in
+++ b/gas/po/POTFILES.in
@@ -17,9 +17,6 @@ config/atof-vax.c
config/bfin-lex-wrapper.c
config/e-crisaout.c
config/e-criself.c
-config/e-i386aout.c
-config/e-i386coff.c
-config/e-i386elf.c
config/e-mipself.c
config/kvx-parse.c
config/kvx-parse.h
diff --git a/gas/read.c b/gas/read.c
index 71915ee..bf57787 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1397,6 +1397,7 @@ read_a_source_file (const char *name)
if (next_char && strchr (line_comment_chars, next_char))
{
/* Its a comment, ignore it. Note: Not ignore_rest_of_line ()! */
+ s = input_line_pointer;
while (s <= buffer_limit)
if (is_end_of_line (*s++))
break;
@@ -3289,9 +3290,8 @@ assign_symbol (char *name, int mode)
symbol_set_frag (symbolP, dummy_frag);
}
#endif
-#if defined (OBJ_COFF) && !defined (TE_PE)
- /* "set" symbols are local unless otherwise specified. */
- SF_SET_LOCAL (symbolP);
+#ifdef obj_assign_symbol
+ obj_assign_symbol (symbolP);
#endif
}
diff --git a/gas/testsuite/gas/all/end-no-dot.l b/gas/testsuite/gas/all/end-no-dot.l
new file mode 100644
index 0000000..fa47ae3
--- /dev/null
+++ b/gas/testsuite/gas/all/end-no-dot.l
@@ -0,0 +1,3 @@
+# No diagnostics should appear for anything past "end".
+>3<
+>4<
diff --git a/gas/testsuite/gas/all/end-no-dot.s b/gas/testsuite/gas/all/end-no-dot.s
new file mode 100644
index 0000000..bee10c8
--- /dev/null
+++ b/gas/testsuite/gas/all/end-no-dot.s
@@ -0,0 +1,11 @@
+ if 0
+ end a b c
+ endif
+
+ irpc n,34
+ print ">\n<"
+ endr
+
+ end q r, s
+ "\z"
+ äöü'\ \ No newline at end of file
diff --git a/gas/testsuite/gas/all/end.l b/gas/testsuite/gas/all/end.l
new file mode 100644
index 0000000..e18518d
--- /dev/null
+++ b/gas/testsuite/gas/all/end.l
@@ -0,0 +1,3 @@
+# No diagnostics should appear for anything past .end.
+>1<
+>2<
diff --git a/gas/testsuite/gas/all/end.s b/gas/testsuite/gas/all/end.s
new file mode 100644
index 0000000..3090792
--- /dev/null
+++ b/gas/testsuite/gas/all/end.s
@@ -0,0 +1,11 @@
+ .if 0
+ .end a b c
+ .endif
+
+ .irpc n,12
+ .print ">\n<"
+ .endr
+
+ .end q r, s
+ "\z"
+ äöü'\ \ No newline at end of file
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index 45d037c..5fff61f 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -464,6 +464,30 @@ switch -glob $target_triplet {
run_dump_test weakref1w
}
}
+
+# .end works differently on some targets. Also make sure to test the dot-less
+# form on targets setting NO_PSEUDO_DOT (and not overriding the directive).
+switch -glob $target_triplet {
+ alpha*-*-* { }
+ hppa*-*-* { }
+ iq2000-*-* { }
+ microblaze-*-* { }
+ mips*-*-* { }
+ score*-*-* { }
+ xtensa*-*-* { }
+ m68hc1*-*-* -
+ s12z-*-* -
+ spu-*-* -
+ xgate-*-* -
+ z80-*-* {
+ run_list_test "end"
+ run_list_test "end-no-dot"
+ }
+ default {
+ run_list_test "end"
+ }
+}
+
gas_test_error "weakref2.s" "" "e: would close weakref loop: e => a => b => c => d => e"
gas_test_error "weakref3.s" "" "a: would close weakref loop: a => b => c => d => e => a"
gas_test_error "weakref4.s" "" "is already defined"
diff --git a/gas/testsuite/gas/arm/ccs-symver.d b/gas/testsuite/gas/arm/ccs-symver.d
new file mode 100644
index 0000000..c1255ab
--- /dev/null
+++ b/gas/testsuite/gas/arm/ccs-symver.d
@@ -0,0 +1,10 @@
+#name: .symver in CCS mode
+#as: -mccs
+#readelf: -sW
+# This test is only valid on ELF based ports.
+#notarget: *-*-pe *-*-wince
+
+#...
+ +[0-9]+: +0+ +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo
+ +[0-9]+: +0+ +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo@version1
+#pass
diff --git a/gas/testsuite/gas/arm/ccs-symver.s b/gas/testsuite/gas/arm/ccs-symver.s
new file mode 100644
index 0000000..00a96f5
--- /dev/null
+++ b/gas/testsuite/gas/arm/ccs-symver.s
@@ -0,0 +1,7 @@
+ .data
+ .globl foo
+ .type foo,@object
+foo:
+ .byte 0
+ .size foo,.-foo
+ .symver foo,foo@version1;remove
diff --git a/gas/testsuite/gas/i386/avx10_2-rounding-intel.d b/gas/testsuite/gas/i386/avx10_2-rounding-intel.d
index 09535f6..f40c296 100644
--- a/gas/testsuite/gas/i386/avx10_2-rounding-intel.d
+++ b/gas/testsuite/gas/i386/avx10_2-rounding-intel.d
@@ -6,9 +6,9 @@
Disassembly of section \.text:
-0+ <_start>:
#...
-\s*a83:\s*62 f1 d1 18 c2 ec 7b\s+vcmppd k5,ymm5,ymm4\{sae\},0x7b
+[a-f0-9]+ <_intel>:
+\s*[a-f0-9]+:\s*62 f1 d1 18 c2 ec 7b\s+vcmppd k5,ymm5,ymm4\{sae\},0x7b
\s*[a-f0-9]+:\s*62 f1 d1 1f c2 ec 7b\s+vcmppd k5\{k7\},ymm5,ymm4\{sae\},0x7b
\s*[a-f0-9]+:\s*62 f2 f9 18 42 f5\s+vgetexppd ymm6,ymm5\{sae\}
\s*[a-f0-9]+:\s*62 f2 f9 1f 42 f5\s+vgetexppd ymm6\{k7\},ymm5\{sae\}
diff --git a/gas/testsuite/gas/i386/avx10_2-rounding.s b/gas/testsuite/gas/i386/avx10_2-rounding.s
index cb0a6b9..048e715 100644
--- a/gas/testsuite/gas/i386/avx10_2-rounding.s
+++ b/gas/testsuite/gas/i386/avx10_2-rounding.s
@@ -175,6 +175,7 @@ _start:
vcvt\n\()2ph {rz-sae}, %ymm5, %ymm6{%k7}{z}
.endr
+_intel:
.intel_syntax noprefix
.irp m, pd, ph, ps
vcmp\m k5, ymm5, ymm4{sae}, 123
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 75ad061..6710a56 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -699,10 +699,11 @@ if [gas_32_check] then {
run_dump_test "tlsd"
run_dump_test "tlspic"
run_dump_test "tlsnopic"
+ run_dump_test "tls"
run_list_test "inval-tls"
run_dump_test "bss"
run_dump_test "reloc32"
- run_list_test "reloc32" "--defsym _bad_=1"
+ run_list_test "reloc32" "--defsym _bad_=1 -mtls-check=no"
run_dump_test "intel-got32"
run_dump_test "intel-movs32"
run_dump_test "intel-movs16"
diff --git a/gas/testsuite/gas/i386/ilp32/ilp32.exp b/gas/testsuite/gas/i386/ilp32/ilp32.exp
index a301738..18befcc 100644
--- a/gas/testsuite/gas/i386/ilp32/ilp32.exp
+++ b/gas/testsuite/gas/i386/ilp32/ilp32.exp
@@ -37,8 +37,9 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_x32_check] &
}
}
- run_list_test "reloc64" "--defsym _bad_=1"
+ run_list_test "reloc64" "--defsym _bad_=1 -mtls-check=no"
run_list_test "reloc-2"
+ run_list_test "x32-inval-tls" "-I${srcdir}/$subdir"
set ASFLAGS "$old_ASFLAGS"
}
diff --git a/gas/testsuite/gas/i386/ilp32/reloc64.d b/gas/testsuite/gas/i386/ilp32/reloc64.d
index e2c461f..84b6aac 100644
--- a/gas/testsuite/gas/i386/ilp32/reloc64.d
+++ b/gas/testsuite/gas/i386/ilp32/reloc64.d
@@ -1,4 +1,4 @@
-#as: -mx86-used-note=no --generate-missing-build-notes=no
+#as: -mx86-used-note=no --generate-missing-build-notes=no -mtls-check=no
#objdump: -Drw
#name: x86-64 (ILP32) relocs
diff --git a/gas/testsuite/gas/i386/ilp32/x32-inval-tls.l b/gas/testsuite/gas/i386/ilp32/x32-inval-tls.l
new file mode 100644
index 0000000..f3807c8
--- /dev/null
+++ b/gas/testsuite/gas/i386/ilp32/x32-inval-tls.l
@@ -0,0 +1,38 @@
+.*: Assembler messages:
+.*:3: Error: @GOTTPOFF operator cannot be used with `kmovq'
+.*:4: Error: @TLSLD operator cannot be used with `kmovq'
+.*:7: Error: @TLSGD operator cannot be used with `add'
+.*:8: Error: @TLSGD operator requires `%rdi' as dest register
+.*:9: Error: @TLSGD operator requires `%rip' as base register
+.*:10: Error: @TLSGD operator requires base register
+.*:11: Error: @TLSGD operator requires `%rip' as base register
+.*:12: Error: @TLSGD operator requires `%rdi' as dest register
+.*:15: Error: @TLSLD operator cannot be used with `add'
+.*:16: Error: @TLSLD operator requires `%rdi' as dest register
+.*:17: Error: @TLSLD operator requires `%rip' as base register
+.*:18: Error: @TLSLD operator requires base register
+.*:19: Error: @TLSLD operator requires `%rip' as base register
+.*:20: Error: @TLSLD operator requires `%rdi' as dest register
+.*:23: Error: @TLSDESC operator cannot be used with `add'
+.*:24: Error: @TLSDESC operator requires `%rip' as base register
+.*:25: Error: @TLSDESC operator requires `%rip' as base register
+.*:27: Error: @TLSDESC operator requires 32-bit or 64-bit dest register
+.*:30: Error: @GOTTPOFF operator cannot be used with `sub'
+.*:31: Error: @GOTTPOFF operator cannot be used with `xor'
+.*:32: Error: @GOTTPOFF operator requires `%rip' as base register
+.*:33: Error: @GOTTPOFF operator requires `%rip' as base register
+.*:34: Error: @GOTTPOFF operator requires 32-bit or 64-bit dest register
+.*:35: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*:36: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*:37: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*:38: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*:39: Error: @GOTTPOFF operator requires `%rip' as base register
+.*:40: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:41: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:42: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:43: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:44: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:48: Error: @TLSCALL operator cannot be used with `lea'
+.*:49: Error: @TLSCALL operator requires `%eax/%rax' as base register
+.*:49: Error: 0-byte relocation cannot be applied to 4-byte field
+.*:50: Error: `\*foo@tlscall\(%ax\)' is not a valid base/index expression
diff --git a/gas/testsuite/gas/i386/ilp32/x32-inval-tls.s b/gas/testsuite/gas/i386/ilp32/x32-inval-tls.s
new file mode 100644
index 0000000..b1d967f
--- /dev/null
+++ b/gas/testsuite/gas/i386/ilp32/x32-inval-tls.s
@@ -0,0 +1 @@
+.include "../x86-64-inval-tls.s"
diff --git a/gas/testsuite/gas/i386/ilp32/x32-tls.d b/gas/testsuite/gas/i386/ilp32/x32-tls.d
index ab4da5c..ac7d136 100644
--- a/gas/testsuite/gas/i386/ilp32/x32-tls.d
+++ b/gas/testsuite/gas/i386/ilp32/x32-tls.d
@@ -1,3 +1,4 @@
+#as: -mtls-check=no
#objdump: -dw
#name: x86-64 (ILP32) TLS
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-tls.d b/gas/testsuite/gas/i386/ilp32/x86-64-tls.d
new file mode 100644
index 0000000..a2261f5
--- /dev/null
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-tls.d
@@ -0,0 +1,4 @@
+#source: ../x86-64-tls.s
+#objdump: -drw
+#name: x86-64 (ILP32) TLS
+#dump: ../x86-64-tls.d
diff --git a/gas/testsuite/gas/i386/inval-tls.l b/gas/testsuite/gas/i386/inval-tls.l
index 98f7a29..e20ba7a 100644
--- a/gas/testsuite/gas/i386/inval-tls.l
+++ b/gas/testsuite/gas/i386/inval-tls.l
@@ -1,2 +1,70 @@
-.*: Assembler messages:
-.*:3: Error: @GOTNTPOFF operator cannot be used with `kmovd'
+.*ssembler messages:
+.* Error: @GOTNTPOFF operator cannot be used with `kmovd'
+.* Error: @TLSGD operator cannot be used with `add'
+.* Error: @TLSGD operator requires `%ebx' as index register
+.* Error: @TLSGD operator requires scale factor of 1
+.* Error: @TLSGD operator requires no base register
+.*: Error: @TLSGD operator requires `%eax' as dest register
+.*: Error: @TLSGD operator requires `%eax' as dest register
+.*: Error: @TLSGD operator requires `%eax' as base register
+.*: Error: @TLSGD operator requires 32-bit dest register
+.*: Error: @TLSLDM operator cannot be used with `add'
+.*: Error: @TLSLDM operator requires `%eax' as dest register
+.*: Error: @TLSLDM operator requires `%eax' as base register
+.*: Error: @TLSLDM operator requires no SIB
+.*: Error: @TLSLDM operator requires 32-bit dest register
+.*: Error: @TLSDESC operator cannot be used with `add'
+.*: Error: @TLSDESC operator requires `%ebx' as base register
+.*: Error: @TLSDESC operator requires no SIB
+.*: Error: @TLSDESC operator requires 32-bit dest register
+.*: Error: @INDNTPOFF operator cannot be used with `sub'
+.*: Error: @INDNTPOFF operator requires no base/index register
+.*: Error: @INDNTPOFF operator requires no base/index register
+.*: Error: @INDNTPOFF operator requires 32-bit dest register
+.*: Error: @INDNTPOFF operator can be used with `add', but format is wrong
+.*: Error: @INDNTPOFF operator can be used with `add', but format is wrong
+.*: Error: @INDNTPOFF operator can be used with `add', but format is wrong
+.*: Error: @INDNTPOFF operator can be used with `add', but format is wrong
+.*: Error: @INDNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @INDNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @INDNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @INDNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @INDNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTNTPOFF operator cannot be used with `lea'
+.*: Error: @GOTNTPOFF operator requires base register
+.*: Error: @GOTNTPOFF operator cannot be used with `lea'
+.*: Error: @GOTNTPOFF operator can be used with `sub', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `sub', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `sub', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `sub', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `add', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `add', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `add', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `add', but format is wrong
+.*: Error: @GOTNTPOFF operator requires base register
+.*: Error: @GOTNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTNTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTTPOFF operator cannot be used with `lea'
+.*: Error: @GOTTPOFF operator requires base register
+.*: Error: @GOTTPOFF operator requires 32-bit dest register
+.*: Error: @GOTTPOFF operator can be used with `sub', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `sub', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `sub', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `sub', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*: Error: @GOTTPOFF operator requires base register
+.*: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*: Error: @TLSCALL operator cannot be used with `lea'
+.*: Error: @TLSCALL operator requires `%eax/%rax' as base register
+.*: Error: @TLSCALL operator requires no SIB
+.*: Error: 0-byte relocation cannot be applied to 4-byte field
+.*: Error: @TLSCALL operator requires `%eax/%rax' as base register
diff --git a/gas/testsuite/gas/i386/inval-tls.s b/gas/testsuite/gas/i386/inval-tls.s
index ba0e1b8..067e9b4 100644
--- a/gas/testsuite/gas/i386/inval-tls.s
+++ b/gas/testsuite/gas/i386/inval-tls.s
@@ -1,3 +1,85 @@
.text
# All the following should be illegal
kmovd foo@gotntpoff(%eax), %k0
+
+ /* Invalid testcase for R_386_TLS_GD. */
+ addl foo@tlsgd(,%ebx,1), %eax
+ leal foo@tlsgd(,%ecx,1), %eax
+ leal foo@tlsgd(,%ebx,2), %eax
+ leal foo@tlsgd(%ecx,%ebx,1), %eax
+ leal foo@tlsgd(,%ebx,1), %ecx
+ leal foo@tlsgd(%ebx), %ecx
+ leal foo@tlsgd(%eax), %eax
+ lea foo@tlsgd(%ebx), %ax
+
+ /* Invalid testcase for R_386_TLS_LDM. */
+ addl foo@tlsldm(%ebx), %eax
+ leal foo@tlsldm(%ebx), %ecx
+ leal foo@tlsldm(%eax), %eax
+ leal foo@tlsldm(,%ebx,1), %eax
+ lea foo@tlsldm(%ebx), %ax
+
+ /* Invalid testcase for R_386_TLS_GOTDESC. */
+ addl x@tlsdesc(%ebx), %eax
+ leal x@tlsdesc(%ecx), %eax
+ leal x@tlsdesc(,%ecx,1), %eax
+ lea x@tlsdesc(%ebx), %ax
+
+ /* Invalid testcase for R_386_TLS_IE. */
+ subl foo@indntpoff, %ecx
+ addl foo@indntpoff(%ebx), %ecx
+ movl foo@indntpoff(%ebx), %ecx
+ add foo@indntpoff, %cx
+ addl $foo@indntpoff, %eax
+ addl %ecx, foo@indntpoff
+ addl $0x9090,foo@indntpoff
+ addl $0x90909090,foo@indntpoff
+ movl foo@indntpoff,%eax
+ movl %edx,foo@indntpoff(%eax)
+ movw %ss,foo@indntpoff(%eax)
+ movw foo@indntpoff(%eax),%ss
+ movl $0x90909090,foo@indntpoff(%eax)
+ movl $foo@indntpoff, %eax
+
+ /* Invalid testcase for R_386_TLS_GOTIE. */
+ leal foo@gotntpoff(%ebx), %ecx
+ subl foo@gotntpoff(,%ebx,1), %ecx
+ lea foo@gotntpoff(%ebx), %cx
+ subl %ecx, foo@gotntpoff(%ebx)
+ subl $0x9090,foo@gotntpoff(%ebx)
+ subl $0x90909090,foo@gotntpoff(%eax)
+ subl $foo@gotntpoff, %eax
+ addl %ecx, foo@gotntpoff(%ebx)
+ addl $0x9090,foo@gotntpoff(%ebx)
+ addl $0x90909090,foo@gotntpoff(%eax)
+ addl $foo@gotntpoff, %eax
+ movl foo@gotntpoff,%eax
+ movl %edx,foo@gotntpoff(%eax)
+ movw %ss,foo@gotntpoff(%eax)
+ movw foo@gotntpoff(%eax),%ss
+ movl $0x90909090,foo@gotntpoff(%eax)
+ movl $foo@gotntpoff, %eax
+
+ /* Invalid testcase for R_386_TLS_IE_32. */
+ leal foo@gottpoff(%ebx), %ecx
+ subl foo@gottpoff(,%ebx,1), %ecx
+ add foo@gottpoff(%ebx), %cx
+ subl %ecx, foo@gottpoff(%ebx)
+ subl $0x9090,foo@gottpoff(%ebx)
+ subl $0x90909090,foo@gottpoff(%eax)
+ subl $foo@gottpoff, %eax
+ addl %ecx, foo@gottpoff(%ebx)
+ addl $0x9090,foo@gottpoff(%ebx)
+ addl $0x90909090,foo@gottpoff(%eax)
+ movl foo@gottpoff,%eax
+ movl %edx,foo@gottpoff(%eax)
+ movw %ss,foo@gottpoff(%eax)
+ movw foo@gottpoff(%eax),%ss
+ movl $0x90909090,foo@gottpoff(%eax)
+ movl $foo@gottpoff, %eax
+
+ /* Invalid testcase for R_386_TLS_DESC_CALL. */
+ leal foo@tlscall(%eax), %ebx
+ call *x@tlscall(%ebx)
+ call *x@tlscall(,%eax,1)
+ call *x@tlscall(%bx)
diff --git a/gas/testsuite/gas/i386/optimize-1.d b/gas/testsuite/gas/i386/optimize-1.d
index f496846..d50814d 100644
--- a/gas/testsuite/gas/i386/optimize-1.d
+++ b/gas/testsuite/gas/i386/optimize-1.d
@@ -166,6 +166,36 @@ Disassembly of section .text:
+[a-f0-9]+: 66 .* movd %xmm1,\(%edx\)
+[a-f0-9]+: c5 .* vmovd %xmm1,%edx
+[a-f0-9]+: c5 .* vmovd %xmm1,\(%edx\)
+ +[a-f0-9]+: 66 .* movd %xmm1,%edx
+ +[a-f0-9]+: f3 .* movss %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovd %xmm1,%edx
+ +[a-f0-9]+: c5 .* vmovss %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovups %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovups %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovapd %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovupd %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovups %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovdqu %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovapd %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovupd %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovdqu %ymm1,\(%edx\)
+ +[a-f0-9]+: f3 .* movss %xmm1,%xmm2
+ +[a-f0-9]+: f3 .* movss \(%ecx\),%xmm2
+ +[a-f0-9]+: 0f .* xorps %xmm2,%xmm2
+ +[a-f0-9]+: c5 .* vmovss %xmm1,%xmm2,%xmm3
+ +[a-f0-9]+: c5 .* vmovss \(%ecx\),%xmm2
+ +[a-f0-9]+: c5 .* vxorps %xmm3,%xmm3,%xmm3
+[a-f0-9]+: 0f ba e0 0f bt \$0xf,%eax
+[a-f0-9]+: 66 0f ba e0 10 bt \$0x10,%ax
+[a-f0-9]+: 0f ba f8 0f btc \$0xf,%eax
diff --git a/gas/testsuite/gas/i386/optimize-1.s b/gas/testsuite/gas/i386/optimize-1.s
index ce53758..fad6393 100644
--- a/gas/testsuite/gas/i386/optimize-1.s
+++ b/gas/testsuite/gas/i386/optimize-1.s
@@ -194,6 +194,44 @@ _start:
vpextrd $0, %xmm1, %edx
vpextrd $0, %xmm1, (%edx)
+ extractps $0, %xmm1, %edx
+ extractps $0, %xmm1, (%edx)
+ vextractps $0, %xmm1, %edx
+ vextractps $0, %xmm1, (%edx)
+
+ vextractf128 $0, %ymm1, %xmm2
+ vextractf128 $0, %ymm1, (%edx)
+ vextracti128 $0, %ymm1, %xmm2
+ vextracti128 $0, %ymm1, (%edx)
+
+ vextractf32x4 $0, %ymm1, %xmm2
+ vextractf32x4 $0, %ymm1, (%edx)
+ vextracti32x4 $0, %ymm1, %xmm2
+ vextracti32x4 $0, %ymm1, (%edx)
+
+ vextractf64x2 $0, %ymm1, %xmm2
+ vextractf64x2 $0, %ymm1, (%edx)
+ vextracti64x2 $0, %ymm1, %xmm2
+ vextracti64x2 $0, %ymm1, (%edx)
+
+ vextractf32x8 $0, %zmm1, %ymm2
+ vextractf32x8 $0, %zmm1, (%edx)
+ vextracti32x8 $0, %zmm1, %ymm2
+ vextracti32x8 $0, %zmm1, (%edx)
+
+ vextractf64x4 $0, %zmm1, %ymm2
+ vextractf64x4 $0, %zmm1, (%edx)
+ vextracti64x4 $0, %zmm1, %ymm2
+ vextracti64x4 $0, %zmm1, (%edx)
+
+ insertps $0, %xmm1, %xmm2
+ insertps $0xce, (%ecx), %xmm2
+ insertps $0xff, %xmm1, %xmm2
+
+ vinsertps $0, %xmm1, %xmm2, %xmm3
+ vinsertps $0xce, (%ecx), %xmm2, %xmm2
+ vinsertps $0xff, %xmm1, %xmm2, %xmm3
+
bt $15, %ax
bt $16, %ax
btc $15, %ax
diff --git a/gas/testsuite/gas/i386/optimize-1a.d b/gas/testsuite/gas/i386/optimize-1a.d
index b039a0d..a59c616 100644
--- a/gas/testsuite/gas/i386/optimize-1a.d
+++ b/gas/testsuite/gas/i386/optimize-1a.d
@@ -167,6 +167,36 @@ Disassembly of section .text:
+[a-f0-9]+: 66 .* movd %xmm1,\(%edx\)
+[a-f0-9]+: c5 .* vmovd %xmm1,%edx
+[a-f0-9]+: c5 .* vmovd %xmm1,\(%edx\)
+ +[a-f0-9]+: 66 .* movd %xmm1,%edx
+ +[a-f0-9]+: f3 .* movss %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovd %xmm1,%edx
+ +[a-f0-9]+: c5 .* vmovss %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovups %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovups %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovapd %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovupd %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovups %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovdqu %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovapd %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovupd %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovdqu %ymm1,\(%edx\)
+ +[a-f0-9]+: f3 .* movss %xmm1,%xmm2
+ +[a-f0-9]+: f3 .* movss \(%ecx\),%xmm2
+ +[a-f0-9]+: 0f .* xorps %xmm2,%xmm2
+ +[a-f0-9]+: c5 .* vmovss %xmm1,%xmm2,%xmm3
+ +[a-f0-9]+: c5 .* vmovss \(%ecx\),%xmm2
+ +[a-f0-9]+: c5 .* vxorps %xmm3,%xmm3,%xmm3
+[a-f0-9]+: 0f ba e0 0f bt \$0xf,%eax
+[a-f0-9]+: 66 0f ba e0 10 bt \$0x10,%ax
+[a-f0-9]+: 0f ba f8 0f btc \$0xf,%eax
diff --git a/gas/testsuite/gas/i386/optimize-4.d b/gas/testsuite/gas/i386/optimize-4.d
index ea2c761..8d29aab 100644
--- a/gas/testsuite/gas/i386/optimize-4.d
+++ b/gas/testsuite/gas/i386/optimize-4.d
@@ -166,6 +166,36 @@ Disassembly of section .text:
+[a-f0-9]+: 66 .* movd %xmm1,\(%edx\)
+[a-f0-9]+: c5 .* vmovd %xmm1,%edx
+[a-f0-9]+: c5 .* vmovd %xmm1,\(%edx\)
+ +[a-f0-9]+: 66 .* movd %xmm1,%edx
+ +[a-f0-9]+: f3 .* movss %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovd %xmm1,%edx
+ +[a-f0-9]+: c5 .* vmovss %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovups %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovups %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovapd %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovupd %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovups %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovdqu %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovapd %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovupd %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovdqu %ymm1,\(%edx\)
+ +[a-f0-9]+: f3 .* movss %xmm1,%xmm2
+ +[a-f0-9]+: f3 .* movss \(%ecx\),%xmm2
+ +[a-f0-9]+: 0f .* xorps %xmm2,%xmm2
+ +[a-f0-9]+: c5 .* vmovss %xmm1,%xmm2,%xmm3
+ +[a-f0-9]+: c5 .* vmovss \(%ecx\),%xmm2
+ +[a-f0-9]+: c5 .* vxorps %xmm3,%xmm3,%xmm3
+[a-f0-9]+: 0f ba e0 0f bt \$0xf,%eax
+[a-f0-9]+: 66 0f ba e0 10 bt \$0x10,%ax
+[a-f0-9]+: 0f ba f8 0f btc \$0xf,%eax
diff --git a/gas/testsuite/gas/i386/optimize-5.d b/gas/testsuite/gas/i386/optimize-5.d
index d53d2cc..162a97f 100644
--- a/gas/testsuite/gas/i386/optimize-5.d
+++ b/gas/testsuite/gas/i386/optimize-5.d
@@ -166,6 +166,36 @@ Disassembly of section .text:
+[a-f0-9]+: 66 .* movd %xmm1,\(%edx\)
+[a-f0-9]+: c5 .* vmovd %xmm1,%edx
+[a-f0-9]+: c5 .* vmovd %xmm1,\(%edx\)
+ +[a-f0-9]+: 66 .* movd %xmm1,%edx
+ +[a-f0-9]+: f3 .* movss %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovd %xmm1,%edx
+ +[a-f0-9]+: c5 .* vmovss %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovups %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovups %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovapd %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovupd %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 .* vmovdqu %xmm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovaps %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovups %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovdqu %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovapd %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovupd %ymm1,\(%edx\)
+ +[a-f0-9]+: c5 .* vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 .* vmovdqu %ymm1,\(%edx\)
+ +[a-f0-9]+: f3 .* movss %xmm1,%xmm2
+ +[a-f0-9]+: f3 .* movss \(%ecx\),%xmm2
+ +[a-f0-9]+: 0f .* xorps %xmm2,%xmm2
+ +[a-f0-9]+: c5 .* vmovss %xmm1,%xmm2,%xmm3
+ +[a-f0-9]+: c5 .* vmovss \(%ecx\),%xmm2
+ +[a-f0-9]+: c5 .* vxorps %xmm3,%xmm3,%xmm3
+[a-f0-9]+: 0f ba e0 0f bt \$0xf,%eax
+[a-f0-9]+: 66 0f ba e0 10 bt \$0x10,%ax
+[a-f0-9]+: 0f ba f8 0f btc \$0xf,%eax
diff --git a/gas/testsuite/gas/i386/reloc32.d b/gas/testsuite/gas/i386/reloc32.d
index 263a742..ebac545 100644
--- a/gas/testsuite/gas/i386/reloc32.d
+++ b/gas/testsuite/gas/i386/reloc32.d
@@ -1,4 +1,4 @@
-#as: -mrelax-relocations=yes
+#as: -mrelax-relocations=yes -mtls-check=no
#objdump: -Drw
#name: i386 relocs
@@ -43,6 +43,7 @@ Disassembly of section \.text:
.*[ ]+R_386_TLS_LE[ ]+xtrn
.*[ ]+R_386_TLS_LE_32[ ]+xtrn
.*[ ]+R_386_TLS_LE_32[ ]+xtrn
+.*[ ]+R_386_PLT32[ ]+ptr
Disassembly of section \.data:
#...
.*[ ]+R_386_32[ ]+xtrn
diff --git a/gas/testsuite/gas/i386/reloc32.s b/gas/testsuite/gas/i386/reloc32.s
index e766a3d..5616cd5 100644
--- a/gas/testsuite/gas/i386/reloc32.s
+++ b/gas/testsuite/gas/i386/reloc32.s
@@ -162,3 +162,10 @@ bad .byte xtrn@tpoff
.long xtrn@got + 4
.long xtrn@got - 4
bad .long xtrn@plt - .
+
+ .text
+ movl $ptr@PLT, %eax
+
+ .data
+ptr:
+ .dc.a 0
diff --git a/gas/testsuite/gas/i386/reloc64.d b/gas/testsuite/gas/i386/reloc64.d
index 540a9b7..5fee029 100644
--- a/gas/testsuite/gas/i386/reloc64.d
+++ b/gas/testsuite/gas/i386/reloc64.d
@@ -1,4 +1,4 @@
-#as: -mx86-used-note=no --generate-missing-build-notes=no
+#as: -mx86-used-note=no --generate-missing-build-notes=no -mtls-check=no
#objdump: -Drw
#name: x86-64 relocs
#notarget: *-*-solaris*
@@ -57,6 +57,9 @@ Disassembly of section \.text:
.*[ ]+R_X86_64_32[ ]+xtrn
.*[ ]+R_X86_64_32S[ ]+xtrn
.*[ ]+R_X86_64_32[ ]+xtrn
+.*[ ]+R_X86_64_GOT64[ ]+ptr
+.*[ ]+R_X86_64_GOTOFF64[ ]+Ldst
+.*[ ]+R_X86_64_PLT32[ ]+ptr
Disassembly of section \.data:
#...
.*[ ]+R_X86_64_64[ ]+xtrn
@@ -97,3 +100,8 @@ Disassembly of section \.data:
.*[ ]+R_X86_64_GOT32[ ]+xtrn-0x4
.*[ ]+R_X86_64_GOT32[ ]+xtrn\+0x4
.*[ ]+R_X86_64_GOTPLT64[ ]+xtrn
+
+.* <ptr>:
+ ...
+.* <Ldst>:
+ ...
diff --git a/gas/testsuite/gas/i386/reloc64.s b/gas/testsuite/gas/i386/reloc64.s
index bc6f0fa..5c0f413 100644
--- a/gas/testsuite/gas/i386/reloc64.s
+++ b/gas/testsuite/gas/i386/reloc64.s
@@ -225,3 +225,14 @@ bad .byte xtrn@gotplt
vgatherdps %xmm2, xtrn(,%xmm1), %xmm0
addr32 vgatherdps %xmm2, xtrn(,%xmm1), %xmm0
bad .long xtrn@plt - .
+
+ .text
+ movabs $ptr@GOT, %rax
+ movabs $Ldst@GOTOFF, %rdx
+ movq $ptr@PLT, %rax
+
+ .data
+ptr:
+ .quad 0
+Ldst:
+ .quad 0
diff --git a/gas/testsuite/gas/i386/solaris/reloc64.d b/gas/testsuite/gas/i386/solaris/reloc64.d
index 5b4b91e..e316e78 100644
--- a/gas/testsuite/gas/i386/solaris/reloc64.d
+++ b/gas/testsuite/gas/i386/solaris/reloc64.d
@@ -1,4 +1,4 @@
-#as: -mx86-used-note=no
+#as: -mx86-used-note=no -mtls-check=no
#source: ../reloc64.s
#objdump: -Drw
#name: x86-64 relocs
@@ -57,6 +57,9 @@ Disassembly of section \.text:
.*[ ]+R_X86_64_32[ ]+xtrn
.*[ ]+R_X86_64_32S[ ]+xtrn
.*[ ]+R_X86_64_32[ ]+xtrn
+.*[ ]+R_X86_64_GOT64[ ]+ptr
+.*[ ]+R_X86_64_GOTOFF64[ ]+Ldst
+.*[ ]+R_X86_64_PLT32[ ]+ptr
Disassembly of section \.data:
#...
.*[ ]+R_X86_64_64[ ]+xtrn
@@ -97,3 +100,8 @@ Disassembly of section \.data:
.*[ ]+R_X86_64_GOT32[ ]+xtrn-0x4
.*[ ]+R_X86_64_GOT32[ ]+xtrn\+0x4
.*[ ]+R_X86_64_GOTPLT64[ ]+xtrn
+
+.* <ptr>:
+ ...
+.* <Ldst>:
+ ...
diff --git a/gas/testsuite/gas/i386/tls.d b/gas/testsuite/gas/i386/tls.d
new file mode 100644
index 0000000..adfe7ce
--- /dev/null
+++ b/gas/testsuite/gas/i386/tls.d
@@ -0,0 +1,25 @@
+#as:
+#objdump: -drw
+#name: Check tls relocation 32 bit-mode
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+00000000 <_start>:
+\s*[a-f0-9]+:\s*8d 04 1d 00 00 00 00[ ]+lea 0x0\(,%ebx,1\),%eax 3: R_386_TLS_GD foo
+\s*[a-f0-9]+:\s*8d 81 00 00 00 00[ ]+lea 0x0\(%ecx\),%eax 9: R_386_TLS_GD foo
+\s*[a-f0-9]+:\s*8d 83 00 00 00 00[ ]+lea 0x0\(%ebx\),%eax f: R_386_TLS_LDM foo
+\s*[a-f0-9]+:\s*8d 83 00 00 00 00[ ]+lea 0x0\(%ebx\),%eax 15: R_386_TLS_GOTDESC x
+\s*[a-f0-9]+:\s*a1 00 00 00 00[ ]+mov 0x0,%eax 1a: R_386_TLS_IE foo
+\s*[a-f0-9]+:\s*8b 1d 00 00 00 00[ ]+mov 0x0,%ebx 20: R_386_TLS_IE foo
+\s*[a-f0-9]+:\s*03 15 00 00 00 00[ ]+add 0x0,%edx 26: R_386_TLS_IE foo
+\s*[a-f0-9]+:\s*2b 8b 00 00 00 00[ ]+sub 0x0\(%ebx\),%ecx 2c: R_386_TLS_GOTIE foo
+\s*[a-f0-9]+:\s*8b 8b 00 00 00 00[ ]+mov 0x0\(%ebx\),%ecx 32: R_386_TLS_GOTIE foo
+\s*[a-f0-9]+:\s*03 8b 00 00 00 00[ ]+add 0x0\(%ebx\),%ecx 38: R_386_TLS_GOTIE foo
+\s*[a-f0-9]+:\s*2b 8b 00 00 00 00[ ]+sub 0x0\(%ebx\),%ecx 3e: R_386_TLS_IE_32 foo
+\s*[a-f0-9]+:\s*8b 8b 00 00 00 00[ ]+mov 0x0\(%ebx\),%ecx 44: R_386_TLS_IE_32 foo
+\s*[a-f0-9]+:\s*03 8b 00 00 00 00[ ]+add 0x0\(%ebx\),%ecx 4a: R_386_TLS_IE_32 foo
+\s*[a-f0-9]+:\s*ff 10[ ]+call \*\(%eax\) 4e: R_386_TLS_DESC_CALL foo
+#pass
diff --git a/gas/testsuite/gas/i386/tls.s b/gas/testsuite/gas/i386/tls.s
new file mode 100644
index 0000000..6c077ee
--- /dev/null
+++ b/gas/testsuite/gas/i386/tls.s
@@ -0,0 +1,31 @@
+# Check tls relocation 32-bit mode
+
+ .text
+_start:
+ /* R_386_TLS_GD. */
+ leal foo@tlsgd(,%ebx,1), %eax
+ leal foo@tlsgd(%ecx), %eax
+
+ /* R_386_TLS_LDM. */
+ leal foo@tlsldm(%ebx), %eax
+
+ /* R_386_TLS_GOTDESC. */
+ leal x@tlsdesc(%ebx), %eax
+
+ /* R_386_TLS_IE. */
+ movl foo@indntpoff, %eax
+ movl foo@indntpoff, %ebx
+ addl foo@indntpoff, %edx
+
+ /* R_386_TLS_GOTIE. */
+ subl foo@gotntpoff(%ebx), %ecx
+ movl foo@gotntpoff(%ebx), %ecx
+ addl foo@gotntpoff(%ebx), %ecx
+
+ /* R_386_TLS_IE_32. */
+ subl foo@gottpoff(%ebx), %ecx
+ movl foo@gottpoff(%ebx), %ecx
+ addl foo@gottpoff(%ebx), %ecx
+
+ /* R_386_TLS_DESC_CALL. */
+ call *foo@tlscall(%eax)
diff --git a/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l b/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l
index b018b3f..2525565 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l
+++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l
@@ -187,10 +187,10 @@
.*:195: Error: no EVEX encoding for `vrcpps'
.*:196: Error: no EVEX encoding for `vrcpps'
.*:197: Error: no EVEX encoding for `vrcpss'
-.*:198: Error: .* 4 bits for `vroundpd'
-.*:199: Error: .* 4 bits for `vroundps'
-.*:200: Error: .* 4 bits for `vroundsd'
-.*:201: Error: .* 4 bits for `vroundss'
+.*:198: Error: no EVEX encoding for `vroundpd'
+.*:199: Error: no EVEX encoding for `vroundps'
+.*:200: Error: no EVEX encoding for `vroundsd'
+.*:201: Error: no EVEX encoding for `vroundss'
.*:202: Error: no EVEX encoding for `vrsqrtps'
.*:203: Error: no EVEX encoding for `vrsqrtps'
.*:204: Error: no EVEX encoding for `vrsqrtss'
diff --git a/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l b/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l
index 6f06df9..9c0b818 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l
+++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l
@@ -20,6 +20,12 @@
.*:37: Error: .*`kmovb'.*
.*:38: Error: .*`ldtilecfg'.*
.*:39: Error: .*`cmpexadd'.*
+.*:42: Error: no EVEX encoding for `vbroadcastf128'
+.*:43: Error: no EVEX encoding for `vbroadcasti128'
+.*:44: Error: no EVEX encoding for `vextractf128'
+.*:45: Error: no EVEX encoding for `vextracti128'
+.*:46: Error: no EVEX encoding for `vinsertf128'
+.*:47: Error: no EVEX encoding for `vinserti128'
GAS LISTING .*
#...
[ ]*1[ ]+\# Check illegal 64bit APX EVEX promoted instructions
diff --git a/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s b/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s
index 5e4e08f..d23dbd3 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s
+++ b/gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s
@@ -37,3 +37,11 @@
{evex} kmovb %k1, %r8d
{evex} ldtilecfg (%r8)
{evex} cmpexadd %rax, %rcx, (%r8)
+
+ .arch default
+ vbroadcastf128 (%r16),%ymm3
+ vbroadcasti128 (%r16),%ymm3
+ vextractf128 $1,%ymm3,(%r16)
+ vextracti128 $1,%ymm3,(%r16)
+ vinsertf128 $1,(%r16),%ymm3,%ymm8
+ vinserti128 $1,(%r16),%ymm3,%ymm8
diff --git a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d
index 7666454..5419517 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d
+++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d
@@ -138,16 +138,6 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*62 da 7f 08 4b b4 87 23 01 00 00[ ]+tileloadd tmm6,\[r31\+rax\*4\+0x123\]
[ ]*[a-f0-9]+:[ ]*62 da 7d 08 4b b4 87 23 01 00 00[ ]+tileloaddt1 tmm6,\[r31\+rax\*4\+0x123\]
[ ]*[a-f0-9]+:[ ]*62 da 7e 08 4b b4 87 23 01 00 00[ ]+tilestored[ ]+\[r31\+rax\*4\+0x123\],tmm6
-[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 1a 18[ ]+vbroadcastf32x4 ymm3,XMMWORD PTR \[r16\]
-[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 5a 18[ ]+vbroadcasti32x4 ymm3,XMMWORD PTR \[r16\]
-[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 19 18 01[ ]+vextractf32x4 XMMWORD PTR \[r16\],ymm3,(0x)?1
-[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 39 18 01[ ]+vextracti32x4 XMMWORD PTR \[r16\],ymm3,(0x)?1
-[ ]*[a-f0-9]+:[ ]*62 7b 65 28 18 00 01[ ]+vinsertf32x4 ymm8,ymm3,XMMWORD PTR \[r16\],(0x)?1
-[ ]*[a-f0-9]+:[ ]*62 7b 65 28 38 00 01[ ]+vinserti32x4 ymm8,ymm3,XMMWORD PTR \[r16\],(0x)?1
-[ ]*[a-f0-9]+:[ ]*62 db fd 08 09 30 01[ ]+vrndscalepd xmm6,XMMWORD PTR \[r24\],(0x)?1
-[ ]*[a-f0-9]+:[ ]*62 db 7d 08 08 30 02[ ]+vrndscaleps xmm6,XMMWORD PTR \[r24\],(0x)?2
-[ ]*[a-f0-9]+:[ ]*62 db cd 08 0b 18 03[ ]+vrndscalesd xmm3,xmm6,QWORD PTR \[r24\],(0x)?3
-[ ]*[a-f0-9]+:[ ]*62 db 4d 08 0a 18 04[ ]+vrndscaless xmm3,xmm6,DWORD PTR \[r24\],(0x)?4
[ ]*[a-f0-9]+:[ ]*62 4c 7c 08 66 8c 87 23 01 00 00[ ]+wrssd[ ]+\[r31\+rax\*4\+0x123\],r25d
[ ]*[a-f0-9]+:[ ]*62 4c fc 08 66 bc 87 23 01 00 00[ ]+wrssq[ ]+\[r31\+rax\*4\+0x123\],r31
[ ]*[a-f0-9]+:[ ]*62 4c 7d 08 65 8c 87 23 01 00 00[ ]+wrussd[ ]+\[r31\+rax\*4\+0x123\],r25d
diff --git a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d
index e800205..bcdc43e 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d
+++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d
@@ -138,16 +138,6 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*62 da 7f 08 4b b4 87 23 01 00 00[ ]+tileloadd[ ]+0x123\(%r31,%rax,4\),%tmm6
[ ]*[a-f0-9]+:[ ]*62 da 7d 08 4b b4 87 23 01 00 00[ ]+tileloaddt1[ ]+0x123\(%r31,%rax,4\),%tmm6
[ ]*[a-f0-9]+:[ ]*62 da 7e 08 4b b4 87 23 01 00 00[ ]+tilestored[ ]+%tmm6,0x123\(%r31,%rax,4\)
-[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 1a 18[ ]+vbroadcastf32x4 \(%r16\),%ymm3
-[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 5a 18[ ]+vbroadcasti32x4 \(%r16\),%ymm3
-[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 19 18 01[ ]+vextractf32x4 \$(0x)?1,%ymm3,\(%r16\)
-[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 39 18 01[ ]+vextracti32x4 \$(0x)?1,%ymm3,\(%r16\)
-[ ]*[a-f0-9]+:[ ]*62 7b 65 28 18 00 01[ ]+vinsertf32x4 \$(0x)?1,\(%r16\),%ymm3,%ymm8
-[ ]*[a-f0-9]+:[ ]*62 7b 65 28 38 00 01[ ]+vinserti32x4 \$(0x)?1,\(%r16\),%ymm3,%ymm8
-[ ]*[a-f0-9]+:[ ]*62 db fd 08 09 30 01[ ]+vrndscalepd \$0x1,\(%r24\),%xmm6
-[ ]*[a-f0-9]+:[ ]*62 db 7d 08 08 30 02[ ]+vrndscaleps \$0x2,\(%r24\),%xmm6
-[ ]*[a-f0-9]+:[ ]*62 db cd 08 0b 18 03[ ]+vrndscalesd \$0x3,\(%r24\),%xmm6,%xmm3
-[ ]*[a-f0-9]+:[ ]*62 db 4d 08 0a 18 04[ ]+vrndscaless \$0x4,\(%r24\),%xmm6,%xmm3
[ ]*[a-f0-9]+:[ ]*62 4c 7c 08 66 8c 87 23 01 00 00[ ]+wrssd[ ]+%r25d,0x123\(%r31,%rax,4\)
[ ]*[a-f0-9]+:[ ]*62 4c fc 08 66 bc 87 23 01 00 00[ ]+wrssq[ ]+%r31,0x123\(%r31,%rax,4\)
[ ]*[a-f0-9]+:[ ]*62 4c 7d 08 65 8c 87 23 01 00 00[ ]+wrussd[ ]+%r25d,0x123\(%r31,%rax,4\)
diff --git a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d
index a8f9231..c72f701 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d
+++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d
@@ -138,16 +138,6 @@ Disassembly of section \.text:
[ ]*[a-f0-9]+:[ ]*62 da 7f 08 4b b4 87 23 01 00 00[ ]+tileloadd[ ]+0x123\(%r31,%rax,4\),%tmm6
[ ]*[a-f0-9]+:[ ]*62 da 7d 08 4b b4 87 23 01 00 00[ ]+tileloaddt1[ ]+0x123\(%r31,%rax,4\),%tmm6
[ ]*[a-f0-9]+:[ ]*62 da 7e 08 4b b4 87 23 01 00 00[ ]+tilestored[ ]+%tmm6,0x123\(%r31,%rax,4\)
-[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 1a 18[ ]+vbroadcastf32x4 \(%r16\),%ymm3
-[ ]*[a-f0-9]+:[ ]*62 fa 7d 28 5a 18[ ]+vbroadcasti32x4 \(%r16\),%ymm3
-[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 19 18 01[ ]+vextractf32x4 \$(0x)?1,%ymm3,\(%r16\)
-[ ]*[a-f0-9]+:[ ]*62 fb 7d 28 39 18 01[ ]+vextracti32x4 \$(0x)?1,%ymm3,\(%r16\)
-[ ]*[a-f0-9]+:[ ]*62 7b 65 28 18 00 01[ ]+vinsertf32x4 \$(0x)?1,\(%r16\),%ymm3,%ymm8
-[ ]*[a-f0-9]+:[ ]*62 7b 65 28 38 00 01[ ]+vinserti32x4 \$(0x)?1,\(%r16\),%ymm3,%ymm8
-[ ]*[a-f0-9]+:[ ]*62 db fd 08 09 30 01[ ]+vrndscalepd \$0x1,\(%r24\),%xmm6
-[ ]*[a-f0-9]+:[ ]*62 db 7d 08 08 30 02[ ]+vrndscaleps \$0x2,\(%r24\),%xmm6
-[ ]*[a-f0-9]+:[ ]*62 db cd 08 0b 18 03[ ]+vrndscalesd \$0x3,\(%r24\),%xmm6,%xmm3
-[ ]*[a-f0-9]+:[ ]*62 db 4d 08 0a 18 04[ ]+vrndscaless \$0x4,\(%r24\),%xmm6,%xmm3
[ ]*[a-f0-9]+:[ ]*62 4c 7c 08 66 8c 87 23 01 00 00[ ]+wrssd[ ]+%r25d,0x123\(%r31,%rax,4\)
[ ]*[a-f0-9]+:[ ]*62 4c fc 08 66 bc 87 23 01 00 00[ ]+wrssq[ ]+%r31,0x123\(%r31,%rax,4\)
[ ]*[a-f0-9]+:[ ]*62 4c 7d 08 65 8c 87 23 01 00 00[ ]+wrussd[ ]+%r25d,0x123\(%r31,%rax,4\)
diff --git a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s
index 1ba7d72..b66ee19 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s
+++ b/gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s
@@ -132,16 +132,6 @@ _start:
tileloadd 0x123(%r31,%rax,4),%tmm6
tileloaddt1 0x123(%r31,%rax,4),%tmm6
tilestored %tmm6,0x123(%r31,%rax,4)
- vbroadcastf128 (%r16),%ymm3
- vbroadcasti128 (%r16),%ymm3
- vextractf128 $1,%ymm3,(%r16)
- vextracti128 $1,%ymm3,(%r16)
- vinsertf128 $1,(%r16),%ymm3,%ymm8
- vinserti128 $1,(%r16),%ymm3,%ymm8
- vroundpd $1,(%r24),%xmm6
- vroundps $2,(%r24),%xmm6
- vroundsd $3,(%r24),%xmm6,%xmm3
- vroundss $4,(%r24),%xmm6,%xmm3
wrssd %r25d,0x123(%r31,%rax,4)
wrssq %r31,0x123(%r31,%rax,4)
wrussd %r25d,0x123(%r31,%rax,4)
diff --git a/gas/testsuite/gas/i386/x86-64-inval-tls.l b/gas/testsuite/gas/i386/x86-64-inval-tls.l
index da8ac19..134d96b 100644
--- a/gas/testsuite/gas/i386/x86-64-inval-tls.l
+++ b/gas/testsuite/gas/i386/x86-64-inval-tls.l
@@ -1,3 +1,39 @@
.*: Assembler messages:
.*:3: Error: @GOTTPOFF operator cannot be used with `kmovq'
.*:4: Error: @TLSLD operator cannot be used with `kmovq'
+.*:7: Error: @TLSGD operator cannot be used with `add'
+.*:8: Error: @TLSGD operator requires `%rdi' as dest register
+.*:9: Error: @TLSGD operator requires `%rip' as base register
+.*:10: Error: @TLSGD operator requires base register
+.*:11: Error: @TLSGD operator requires `%rip' as base register
+.*:12: Error: @TLSGD operator requires `%rdi' as dest register
+.*:15: Error: @TLSLD operator cannot be used with `add'
+.*:16: Error: @TLSLD operator requires `%rdi' as dest register
+.*:17: Error: @TLSLD operator requires `%rip' as base register
+.*:18: Error: @TLSLD operator requires base register
+.*:19: Error: @TLSLD operator requires `%rip' as base register
+.*:20: Error: @TLSLD operator requires `%rdi' as dest register
+.*:23: Error: @TLSDESC operator cannot be used with `add'
+.*:24: Error: @TLSDESC operator requires `%rip' as base register
+.*:25: Error: @TLSDESC operator requires `%rip' as base register
+.*:26: Error: @TLSDESC operator requires 64-bit dest register
+.*:27: Error: @TLSDESC operator requires 64-bit dest register
+.*:30: Error: @GOTTPOFF operator cannot be used with `sub'
+.*:31: Error: @GOTTPOFF operator cannot be used with `xor'
+.*:32: Error: @GOTTPOFF operator requires `%rip' as base register
+.*:33: Error: @GOTTPOFF operator requires `%rip' as base register
+.*:34: Error: @GOTTPOFF operator requires 64-bit dest register
+.*:35: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*:36: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*:37: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*:38: Error: @GOTTPOFF operator can be used with `add', but format is wrong
+.*:39: Error: @GOTTPOFF operator requires `%rip' as base register
+.*:40: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:41: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:42: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:43: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:44: Error: @GOTTPOFF operator can be used with `mov', but format is wrong
+.*:48: Error: @TLSCALL operator cannot be used with `lea'
+.*:49: Error: @TLSCALL operator requires `%eax/%rax' as base register
+.*:49: Error: 0-byte relocation cannot be applied to 4-byte field
+.*:50: Error: `\*foo@tlscall\(%ax\)' is not a valid base/index expression
diff --git a/gas/testsuite/gas/i386/x86-64-inval-tls.s b/gas/testsuite/gas/i386/x86-64-inval-tls.s
index 71e1927..8783530 100644
--- a/gas/testsuite/gas/i386/x86-64-inval-tls.s
+++ b/gas/testsuite/gas/i386/x86-64-inval-tls.s
@@ -2,3 +2,49 @@
# All the following should be illegal
kmovq foo@gottpoff(%rip), %k0
kmovq foo@tlsld(%rip), %k0
+
+ /* Invalid testcase for R_X86_64_TLSGD. */
+ addq foo@tlsgd(%rip), %rdi
+ leaq foo@tlsgd(%rip), %rax
+ leaq foo@tlsgd(%rax), %rdi
+ leaq foo@tlsgd(,%rax,1), %rdi
+ leaq foo@tlsgd(%eip), %rdi
+ leal foo@tlsgd(%rip), %edi
+
+ /* Invalid testcase for R_X86_64_TLSLD. */
+ addq foo@tlsld(%rip), %rdi
+ leaq foo@tlsld(%rip), %rax
+ leaq foo@tlsld(%rax), %rdi
+ leaq foo@tlsld(,%rax,1), %rdi
+ leaq foo@tlsld(%eip), %rdi
+ leal foo@tlsld(%rip), %edi
+
+ /* Invalid testcase for R_X86_64_GOTPC32_TLSDESC. */
+ addq x@tlsdesc(%rip), %rax
+ leaq x@tlsdesc(%rbx), %rax
+ lea x@tlsdesc(%eip), %rdi
+ lea x@tlsdesc(%rip), %eax
+ lea x@tlsdesc(%rip), %ax
+
+ /* Invalid testcase for R_X86_64_GOTTPOFF. */
+ subq foo@gottpoff(%rip), %r12
+ xorq foo@gottpoff(%rip), %rax
+ addq foo@gottpoff(%rbx), %rax
+ addq foo@gottpoff(%eip), %rax
+ add foo@gottpoff(%rip), %ax
+ addq %rax, foo@gottpoff(%rip)
+ addl $0x90909090, foo@gottpoff(%rip)
+ add $0x90, foo@gottpoff(%rip), %rax
+ add $0xffffffffffffffff, foo@gottpoff(%rip), %rax
+ movq foo@gottpoff(%rbx), %rax
+ movq %rax, foo@gottpoff(%rip)
+ mov %ss,foo@gottpoff(%rip)
+ mov foo@gottpoff(%rip),%ss
+ movl $0x90909090,foo@gottpoff(%rip)
+ mov $foo@gottpoff, %rax
+
+
+ /* Invalid testcase for R_X86_64_TLSDESC_CALL. */
+ leaq foo@tlscall(%rax), %rbx
+ call *foo@tlscall(%rip)
+ call *foo@tlscall(%ax)
diff --git a/gas/testsuite/gas/i386/x86-64-optimize-extractps.d b/gas/testsuite/gas/i386/x86-64-optimize-extractps.d
new file mode 100644
index 0000000..706cd00
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-optimize-extractps.d
@@ -0,0 +1,20 @@
+#as: -O -msse2avx
+#objdump: -drw
+#name: x86-64 EXTRACTPS optimized encoding with -msse2avx
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <extractps>:
+ +[a-f0-9]+: c5 f9 7e ca vmovd %xmm1,%edx
+ +[a-f0-9]+: c5 fa 11 0a vmovss %xmm1,\(%rdx\)
+ +[a-f0-9]+: 62 f9 7d 08 7e ca vmovd %xmm1,%r18d
+ +[a-f0-9]+: 62 f9 7e 08 11 0a vmovss %xmm1,\(%r18\)
+ +[a-f0-9]+: c5 f9 7e ca vmovd %xmm1,%edx
+ +[a-f0-9]+: c5 fa 11 0a vmovss %xmm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 7d 08 7e ca vmovd %xmm17,%edx
+ +[a-f0-9]+: 62 f9 7d 08 7e ca vmovd %xmm1,%r18d
+ +[a-f0-9]+: 62 f9 7e 08 11 0a vmovss %xmm1,\(%r18\)
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-optimize-extractps.l b/gas/testsuite/gas/i386/x86-64-optimize-extractps.l
new file mode 100644
index 0000000..d52794e
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-optimize-extractps.l
@@ -0,0 +1,21 @@
+.*: Assembler messages:
+.*:6: Error: .*
+.*:7: Error: .*
+[ ]*[0-9a-f]+[ ]+\.text
+[ ]*[0-9a-f]+[ ]+extractps:
+[ ]*[0-9a-f]+[ ]+\?\?\?\? 660F7ECA[ ]+extractps \$0, %xmm1, %edx
+[ ]*[0-9a-f]+[ ]+\?\?\?\? F30F110A[ ]+extractps \$0, %xmm1, \(%rdx\)
+[ ]*[0-9a-f]+[ ]+
+[ ]*[0-9a-f]+[ ]+extractps \$0, %xmm1, %r18d
+[ ]*[0-9a-f]+[ ]+extractps \$0, %xmm1, \(%r18\)
+[ ]*[0-9a-f]+[ ]+
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5F97ECA[ ]+vextractps \$0, %xmm1, %edx
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5FA110A[ ]+vextractps \$0, %xmm1, \(%rdx\)
+[ ]*[0-9a-f]+[ ]+
+[ ]*[0-9a-f]+[ ]+\?\?\?\? 62E17D08[ ]+vextractps \$0, %xmm17, %edx
+[ ]*[0-9a-f]+[ ]+7ECA
+[ ]*[0-9a-f]+[ ]+\?\?\?\? 62F97D08[ ]+vextractps \$0, %xmm1, %r18d
+[ ]*[0-9a-f]+[ ]+7ECA
+[ ]*[0-9a-f]+[ ]+\?\?\?\? 62F97E08[ ]+vextractps \$0, %xmm1, \(%r18\)
+[ ]*[0-9a-f]+[ ]+110A
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-optimize-extractps.s b/gas/testsuite/gas/i386/x86-64-optimize-extractps.s
new file mode 100644
index 0000000..1a1c77b
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-optimize-extractps.s
@@ -0,0 +1,14 @@
+ .text
+extractps:
+ extractps $0, %xmm1, %edx
+ extractps $0, %xmm1, (%rdx)
+
+ extractps $0, %xmm1, %r18d
+ extractps $0, %xmm1, (%r18)
+
+ vextractps $0, %xmm1, %edx
+ vextractps $0, %xmm1, (%rdx)
+
+ vextractps $0, %xmm17, %edx
+ vextractps $0, %xmm1, %r18d
+ vextractps $0, %xmm1, (%r18)
diff --git a/gas/testsuite/gas/i386/x86-64-optimize-insertps.d b/gas/testsuite/gas/i386/x86-64-optimize-insertps.d
new file mode 100644
index 0000000..97300d0
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-optimize-insertps.d
@@ -0,0 +1,26 @@
+#as: -O -msse2avx
+#objdump: -drw
+#name: x86-64 EXTRACTPS optimized encoding with -msse2avx
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <insertps>:
+ +[a-f0-9]+: c5 ea 10 d1 vmovss %xmm1,%xmm2,%xmm2
+ +[a-f0-9]+: c5 fa 10 11 vmovss \(%rcx\),%xmm2
+ +[a-f0-9]+: 62 f9 7e 08 10 11 vmovss \(%r17\),%xmm2
+ +[a-f0-9]+: c5 e8 57 d2 vxorps %xmm2,%xmm2,%xmm2
+ +[a-f0-9]+: c5 ea 10 d9 vmovss %xmm1,%xmm2,%xmm3
+ +[a-f0-9]+: c5 fa 10 11 vmovss \(%rcx\),%xmm2
+ +[a-f0-9]+: c5 e0 57 db vxorps %xmm3,%xmm3,%xmm3
+ +[a-f0-9]+: c5 e0 57 db vxorps %xmm3,%xmm3,%xmm3
+ +[a-f0-9]+: c5 e0 57 db vxorps %xmm3,%xmm3,%xmm3
+ +[a-f0-9]+: c5 60 57 db vxorps %xmm3,%xmm3,%xmm11
+ +[a-f0-9]+: 62 b1 6e 08 10 d9 vmovss %xmm17,%xmm2,%xmm3
+ +[a-f0-9]+: 62 e1 7e 08 10 11 vmovss \(%rcx\),%xmm18
+ +[a-f0-9]+: c5 e0 57 db vxorps %xmm3,%xmm3,%xmm3
+ +[a-f0-9]+: c5 e0 57 db vxorps %xmm3,%xmm3,%xmm3
+ +[a-f0-9]+: 62 a1 64 00 57 db vxorps %xmm19,%xmm19,%xmm19
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-optimize-insertps.l b/gas/testsuite/gas/i386/x86-64-optimize-insertps.l
new file mode 100644
index 0000000..08eb0c1
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-optimize-insertps.l
@@ -0,0 +1,26 @@
+.*: Assembler messages:
+.*:5: Error: .*
+[ ]*[0-9a-f]+[ ]+\.text
+[ ]*[0-9a-f]+[ ]+insertps:
+[ ]*[0-9a-f]+[ ]+\?\?\?\? F30F10D1[ ]+insertps \$0, %xmm1, %xmm2
+[ ]*[0-9a-f]+[ ]+\?\?\?\? F30F1011[ ]+insertps \$0xce, \(%rcx\), %xmm2
+[ ]*[0-9a-f]+[ ]+insertps \$0x0e, \(%r17\), %xmm2
+[ ]*[0-9a-f]+[ ]+\?\?\?\? 0F57D2[ ]+insertps \$0xff, %xmm1, %xmm2
+[ ]*[0-9a-f]+[ ]+
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5EA10D9[ ]+vinsertps \$0, %xmm1, %xmm2, %xmm3
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5FA1011[ ]+vinsertps \$0xce, \(%rcx\), %xmm2, %xmm2
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5E057DB[ ]+vinsertps \$0xff, %xmm1, %xmm2, %xmm3
+[ ]*[0-9a-f]+[ ]+
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5E057DB[ ]+vinsertps \$0xbf, %xmm9, %xmm2, %xmm3
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5E057DB[ ]+vinsertps \$0x7f, %xmm1, %xmm10, %xmm3
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C56057DB[ ]+vinsertps \$0x3f, %xmm1, %xmm2, %xmm11
+[ ]*[0-9a-f]+[ ]+
+[ ]*[0-9a-f]+[ ]+\?\?\?\? 62B16E08[ ]+vinsertps \$0, %xmm17, %xmm2, %xmm3
+[ ]*[0-9a-f]+[ ]+10D9
+[ ]*[0-9a-f]+[ ]+\?\?\?\? 62E17E08[ ]+vinsertps \$0xce, \(%rcx\), %xmm18, %xmm18
+[ ]*[0-9a-f]+[ ]+1011
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5E057DB[ ]+vinsertps \$0xff, %xmm17, %xmm2, %xmm3
+[ ]*[0-9a-f]+[ ]+\?\?\?\? C5E057DB[ ]+vinsertps \$0xff, %xmm1, %xmm18, %xmm3
+[ ]*[0-9a-f]+[ ]+\?\?\?\? 62A16400[ ]+vinsertps \$0xff, %xmm1, %xmm2, %xmm19
+[ ]*[0-9a-f]+[ ]+57DB
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-optimize-insertps.s b/gas/testsuite/gas/i386/x86-64-optimize-insertps.s
new file mode 100644
index 0000000..98240ac
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-optimize-insertps.s
@@ -0,0 +1,20 @@
+ .text
+insertps:
+ insertps $0, %xmm1, %xmm2
+ insertps $0xce, (%rcx), %xmm2
+ insertps $0x0e, (%r17), %xmm2
+ insertps $0xff, %xmm1, %xmm2
+
+ vinsertps $0, %xmm1, %xmm2, %xmm3
+ vinsertps $0xce, (%rcx), %xmm2, %xmm2
+ vinsertps $0xff, %xmm1, %xmm2, %xmm3
+
+ vinsertps $0xbf, %xmm9, %xmm2, %xmm3
+ vinsertps $0x7f, %xmm1, %xmm10, %xmm3
+ vinsertps $0x3f, %xmm1, %xmm2, %xmm11
+
+ vinsertps $0, %xmm17, %xmm2, %xmm3
+ vinsertps $0xce, (%rcx), %xmm18, %xmm18
+ vinsertps $0xff, %xmm17, %xmm2, %xmm3
+ vinsertps $0xff, %xmm1, %xmm18, %xmm3
+ vinsertps $0xff, %xmm1, %xmm2, %xmm19
diff --git a/gas/testsuite/gas/i386/x86-64-optimize-vextractNN.d b/gas/testsuite/gas/i386/x86-64-optimize-vextractNN.d
new file mode 100644
index 0000000..739a2fb
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-optimize-vextractNN.d
@@ -0,0 +1,59 @@
+#as: -O
+#objdump: -drw
+#name: x86-64 VEXTRACT{F,I}<nn> optimized encoding with -msse2avx
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <vextract_128>:
+ +[a-f0-9]+: c5 f8 29 ca vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 f8 11 0a vmovups %xmm1,\(%rdx\)
+ +[a-f0-9]+: c5 f9 7f ca vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 fa 7f 0a vmovdqu %xmm1,\(%rdx\)
+
+0+[a-f0-9]+ <vextract_NNxM_XMM>:
+ +[a-f0-9]+: c5 f8 29 ca vmovaps %xmm1,%xmm2
+ +[a-f0-9]+: c5 f8 11 0a vmovups %xmm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 7c 08 29 ca vmovaps %xmm17,%xmm2
+ +[a-f0-9]+: 62 e1 7c 08 11 0a vmovups %xmm17,\(%rdx\)
+ +[a-f0-9]+: 62 f9 7c 08 11 0a vmovups %xmm1,\(%r18\)
+ +[a-f0-9]+: c5 f9 29 ca vmovapd %xmm1,%xmm2
+ +[a-f0-9]+: c5 f9 11 0a vmovupd %xmm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 fd 08 29 ca vmovapd %xmm17,%xmm2
+ +[a-f0-9]+: 62 e1 fd 08 11 0a vmovupd %xmm17,\(%rdx\)
+ +[a-f0-9]+: 62 f9 fd 08 11 0a vmovupd %xmm1,\(%r18\)
+ +[a-f0-9]+: c5 f9 7f ca vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 fa 7f 0a vmovdqu %xmm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 7d 08 7f ca vmovdqa32 %xmm17,%xmm2
+ +[a-f0-9]+: 62 e1 7e 08 7f 0a vmovdqu32 %xmm17,\(%rdx\)
+ +[a-f0-9]+: 62 f9 7e 08 7f 0a vmovdqu32 %xmm1,\(%r18\)
+ +[a-f0-9]+: c5 f9 7f ca vmovdqa %xmm1,%xmm2
+ +[a-f0-9]+: c5 fa 7f 0a vmovdqu %xmm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 fd 08 7f ca vmovdqa64 %xmm17,%xmm2
+ +[a-f0-9]+: 62 e1 fe 08 7f 0a vmovdqu64 %xmm17,\(%rdx\)
+ +[a-f0-9]+: 62 f9 fe 08 7f 0a vmovdqu64 %xmm1,\(%r18\)
+
+0+[a-f0-9]+ <vextract_NNxM_YMM>:
+ +[a-f0-9]+: c5 fc 29 ca vmovaps %ymm1,%ymm2
+ +[a-f0-9]+: c5 fc 11 0a vmovups %ymm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 7c 28 29 ca vmovaps %ymm17,%ymm2
+ +[a-f0-9]+: 62 e1 7c 28 11 0a vmovups %ymm17,\(%rdx\)
+ +[a-f0-9]+: 62 f9 7c 28 11 0a vmovups %ymm1,\(%r18\)
+ +[a-f0-9]+: c5 fd 29 ca vmovapd %ymm1,%ymm2
+ +[a-f0-9]+: c5 fd 11 0a vmovupd %ymm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 fd 28 29 ca vmovapd %ymm17,%ymm2
+ +[a-f0-9]+: 62 e1 fd 28 11 0a vmovupd %ymm17,\(%rdx\)
+ +[a-f0-9]+: 62 f9 fd 28 11 0a vmovupd %ymm1,\(%r18\)
+ +[a-f0-9]+: c5 fd 7f ca vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 fe 7f 0a vmovdqu %ymm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 7d 28 7f ca vmovdqa32 %ymm17,%ymm2
+ +[a-f0-9]+: 62 e1 7e 28 7f 0a vmovdqu32 %ymm17,\(%rdx\)
+ +[a-f0-9]+: 62 f9 7e 28 7f 0a vmovdqu32 %ymm1,\(%r18\)
+ +[a-f0-9]+: c5 fd 7f ca vmovdqa %ymm1,%ymm2
+ +[a-f0-9]+: c5 fe 7f 0a vmovdqu %ymm1,\(%rdx\)
+ +[a-f0-9]+: 62 e1 fd 28 7f ca vmovdqa64 %ymm17,%ymm2
+ +[a-f0-9]+: 62 e1 fe 28 7f 0a vmovdqu64 %ymm17,\(%rdx\)
+ +[a-f0-9]+: 62 f9 fe 28 7f 0a vmovdqu64 %ymm1,\(%r18\)
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-optimize-vextractNN.s b/gas/testsuite/gas/i386/x86-64-optimize-vextractNN.s
new file mode 100644
index 0000000..5da8265
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-optimize-vextractNN.s
@@ -0,0 +1,57 @@
+ .text
+vextract_128:
+ vextractf128 $0, %ymm1, %xmm2
+ vextractf128 $0, %ymm1, (%rdx)
+
+ vextracti128 $0, %ymm1, %xmm2
+ vextracti128 $0, %ymm1, (%rdx)
+
+vextract_NNxM_XMM:
+ vextractf32x4 $0, %ymm1, %xmm2
+ vextractf32x4 $0, %ymm1, (%rdx)
+ vextractf32x4 $0, %ymm17, %xmm2
+ vextractf32x4 $0, %ymm17, (%rdx)
+ vextractf32x4 $0, %ymm1, (%r18)
+
+ vextractf64x2 $0, %ymm1, %xmm2
+ vextractf64x2 $0, %ymm1, (%rdx)
+ vextractf64x2 $0, %ymm17, %xmm2
+ vextractf64x2 $0, %ymm17, (%rdx)
+ vextractf64x2 $0, %ymm1, (%r18)
+
+ vextracti32x4 $0, %ymm1, %xmm2
+ vextracti32x4 $0, %ymm1, (%rdx)
+ vextracti32x4 $0, %ymm17, %xmm2
+ vextracti32x4 $0, %ymm17, (%rdx)
+ vextracti32x4 $0, %ymm1, (%r18)
+
+ vextracti64x2 $0, %ymm1, %xmm2
+ vextracti64x2 $0, %ymm1, (%rdx)
+ vextracti64x2 $0, %ymm17, %xmm2
+ vextracti64x2 $0, %ymm17, (%rdx)
+ vextracti64x2 $0, %ymm1, (%r18)
+
+vextract_NNxM_YMM:
+ vextractf32x8 $0, %zmm1, %ymm2
+ vextractf32x8 $0, %zmm1, (%rdx)
+ vextractf32x8 $0, %zmm17, %ymm2
+ vextractf32x8 $0, %zmm17, (%rdx)
+ vextractf32x8 $0, %zmm1, (%r18)
+
+ vextractf64x4 $0, %zmm1, %ymm2
+ vextractf64x4 $0, %zmm1, (%rdx)
+ vextractf64x4 $0, %zmm17, %ymm2
+ vextractf64x4 $0, %zmm17, (%rdx)
+ vextractf64x4 $0, %zmm1, (%r18)
+
+ vextracti32x8 $0, %zmm1, %ymm2
+ vextracti32x8 $0, %zmm1, (%rdx)
+ vextracti32x8 $0, %zmm17, %ymm2
+ vextracti32x8 $0, %zmm17, (%rdx)
+ vextracti32x8 $0, %zmm1, (%r18)
+
+ vextracti64x4 $0, %zmm1, %ymm2
+ vextracti64x4 $0, %zmm1, (%rdx)
+ vextracti64x4 $0, %zmm17, %ymm2
+ vextracti64x4 $0, %zmm17, (%rdx)
+ vextracti64x4 $0, %zmm1, (%r18)
diff --git a/gas/testsuite/gas/i386/x86-64-tls.d b/gas/testsuite/gas/i386/x86-64-tls.d
new file mode 100644
index 0000000..1c30496
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-tls.d
@@ -0,0 +1,25 @@
+#as:
+#objdump: -drw
+#name: Check tls relocation x86-64
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+ +[a-f0-9]+: 48 8d 3d 00 00 00 00 lea 0x0\(%rip\),%rdi # 7 <_start\+0x7> 3: R_X86_64_TLSGD foo-0x4
+ +[a-f0-9]+: 48 8d 3d 00 00 00 00 lea 0x0\(%rip\),%rdi # e <_start\+0xe> a: R_X86_64_TLSLD foo-0x4
+ +[a-f0-9]+: 48 8d 05 00 00 00 00 lea 0x0\(%rip\),%rax # 15 <_start\+0x15> 11: R_X86_64_GOTPC32_TLSDESC x-0x4
+ +[a-f0-9]+: 4c 03 25 00 00 00 00 add 0x0\(%rip\),%r12 # 1c <_start\+0x1c> 18: R_X86_64_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 48 8b 05 00 00 00 00 mov 0x0\(%rip\),%rax # 23 <_start\+0x23> 1f: R_X86_64_GOTTPOFF foo-0x4
+ +[a-f0-9]+: d5 48 03 05 00 00 00 00 add 0x0\(%rip\),%r16 # 2b <_start\+0x2b> 27: R_X86_64_CODE_4_GOTTPOFF foo-0x4
+ +[a-f0-9]+: d5 48 8b 25 00 00 00 00 mov 0x0\(%rip\),%r20 # 33 <_start\+0x33> 2f: R_X86_64_CODE_4_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 64 bc 18 01 35 00 00 00 00 add %r30,0x0\(%rip\),%r8 # 3d <_start\+0x3d> 39: R_X86_64_CODE_6_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 f4 dc 10 03 05 00 00 00 00 add 0x0\(%rip\),%rax,%r20 # 47 <_start\+0x47> 43: R_X86_64_CODE_6_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 e4 fc 0c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\),%r16 # 51 <_start\+0x51> 4d: R_X86_64_CODE_6_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 64 bc 1c 01 35 00 00 00 00 \{nf\} add %r30,0x0\(%rip\),%r8 # 5b <_start\+0x5b> 57: R_X86_64_CODE_6_GOTTPOFF foo-0x4
+ +[a-f0-9]+: 62 f4 dc 14 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\),%rax,%r20 # 65 <_start\+0x65> 61: R_X86_64_CODE_6_GOTTPOFF foo-0x4
+ +[a-f0-9]+: ff 10 call \*\(%rax\) 65: R_X86_64_TLSDESC_CALL x
+ +[a-f0-9]+: 67 ff 10 call \*\(%eax\) 67: R_X86_64_TLSDESC_CALL x
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-tls.s b/gas/testsuite/gas/i386/x86-64-tls.s
new file mode 100644
index 0000000..7c3bd4a
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-tls.s
@@ -0,0 +1,27 @@
+# Check tls relocation 64-bit mode
+
+ .text
+_start:
+ /* R_X86_64_TLSGD. */
+ leaq foo@tlsgd(%rip), %rdi
+
+ /* R_X86_64_TLSLD. */
+ leaq foo@tlsld(%rip), %rdi
+
+ /* R_X86_64_GOTPC32_TLSDESC. */
+ leaq x@tlsdesc(%rip), %rax
+
+ /* R_X86_64_GOTTPOFF. */
+ addq foo@gottpoff(%rip), %r12
+ movq foo@gottpoff(%rip), %rax
+ addq foo@gottpoff(%rip), %r16
+ movq foo@gottpoff(%rip), %r20
+ addq %r30, foo@gottpoff(%rip), %r8
+ addq foo@gottpoff(%rip), %rax, %r20
+ {nf} addq foo@gottpoff(%rip), %r16
+ {nf} addq %r30, foo@gottpoff(%rip), %r8
+ {nf} addq foo@gottpoff(%rip), %rax, %r20
+
+ /* R_X86_64_TLSDESC_CALL. */
+ call *x@tlscall(%rax)
+ call *x@tlscall(%eax)
diff --git a/gas/testsuite/gas/i386/x86-64.exp b/gas/testsuite/gas/i386/x86-64.exp
index 86e7f4a..3ffeaaf 100644
--- a/gas/testsuite/gas/i386/x86-64.exp
+++ b/gas/testsuite/gas/i386/x86-64.exp
@@ -594,6 +594,11 @@ run_dump_test "x86-64-optimize-7b"
run_list_test "x86-64-optimize-8" "-I${srcdir}/$subdir -march=+noavx2 -al"
run_list_test "x86-64-optimize-pextr" "-O -aln"
run_dump_test "x86-64-optimize-pextr"
+run_list_test "x86-64-optimize-extractps" "-O -aln"
+run_dump_test "x86-64-optimize-extractps"
+run_dump_test "x86-64-optimize-vextractNN"
+run_list_test "x86-64-optimize-insertps" "-O -aln"
+run_dump_test "x86-64-optimize-insertps"
run_dump_test "x86-64-apx-ndd-optimize"
run_dump_test "x86-64-align-branch-1a"
run_dump_test "x86-64-align-branch-1b"
@@ -653,7 +658,8 @@ if [is_elf_format] then {
run_dump_test "x86-64-unwind"
run_dump_test "reloc64"
- run_list_test "reloc64" "--defsym _bad_=1"
+ run_list_test "reloc64" "--defsym _bad_=1 -mtls-check=no"
+ run_dump_test "x86-64-tls"
run_list_test "x86-64-inval-tls"
run_dump_test "mixed-mode-reloc64"
run_dump_test "rela"
diff --git a/gas/testsuite/gas/loongarch/insn_expr.d b/gas/testsuite/gas/loongarch/insn_expr.d
new file mode 100644
index 0000000..9abc711
--- /dev/null
+++ b/gas/testsuite/gas/loongarch/insn_expr.d
@@ -0,0 +1,10 @@
+#as:
+#objdump: -d
+
+.*: file format .*
+
+
+Disassembly of section \.text:
+
+0+ <\.text>:
+ 0: 02c00ca4 addi.d \$a0, \$a1, 3
diff --git a/gas/testsuite/gas/loongarch/insn_expr.s b/gas/testsuite/gas/loongarch/insn_expr.s
new file mode 100644
index 0000000..3b9ef08
--- /dev/null
+++ b/gas/testsuite/gas/loongarch/insn_expr.s
@@ -0,0 +1 @@
+addi.d $a0,$a1,(8 >> 2 + 1)
diff --git a/gas/testsuite/gas/mips/allegrex@div-trap.d b/gas/testsuite/gas/mips/allegrex@div-trap.d
index 2000416..234fd99 100644
--- a/gas/testsuite/gas/mips/allegrex@div-trap.d
+++ b/gas/testsuite/gas/mips/allegrex@div-trap.d
@@ -1,5 +1,5 @@
#as: -32 -trap
-#objdump: -dr --prefix-addresses
+#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS div with traps
#source: div.s
#dump: div.d
diff --git a/gas/testsuite/gas/mips/div.d b/gas/testsuite/gas/mips/div.d
index 465633d..2e57d10 100644
--- a/gas/testsuite/gas/mips/div.d
+++ b/gas/testsuite/gas/mips/div.d
@@ -1,90 +1,90 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS div
# Test the div macro.
.*: +file format .*mips.*
-Disassembly of section .text:
-0+0000 <[^>]*> div zero,a0,a1
-0+0004 <[^>]*> bnez a1,0+0010 <foo\+0x10>
-0+0008 <[^>]*> div zero,a0,a1
-0+000c <[^>]*> break (0x0,0x7|0x7)
-0+0010 <[^>]*> li at,-1
-0+0014 <[^>]*> bne a1,at,0+0028 <foo\+0x28>
-0+0018 <[^>]*> lui at,0x8000
-0+001c <[^>]*> bne a0,at,0+0028 <foo\+0x28>
-0+0020 <[^>]*> nop
-0+0024 <[^>]*> break (0x0,0x6|0x6)
-0+0028 <[^>]*> mflo a0
-0+002c <[^>]*> bnez a2,0+0038 <foo\+0x38>
-0+0030 <[^>]*> div zero,a1,a2
-0+0034 <[^>]*> break (0x0,0x7|0x7)
-0+0038 <[^>]*> li at,-1
-0+003c <[^>]*> bne a2,at,0+0050 <foo\+0x50>
-0+0040 <[^>]*> lui at,0x8000
-0+0044 <[^>]*> bne a1,at,0+0050 <foo\+0x50>
-0+0048 <[^>]*> nop
-0+004c <[^>]*> break (0x0,0x6|0x6)
-0+0050 <[^>]*> mflo a0
-0+0054 <[^>]*> move a0,a0
-0+0058 <[^>]*> move a0,a1
-0+005c <[^>]*> neg a0,a0
-0+0060 <[^>]*> neg a0,a1
-0+0064 <[^>]*> li at,2
-0+0068 <[^>]*> div zero,a0,at
-0+006c <[^>]*> mflo a0
-0+0070 <[^>]*> li at,2
-0+0074 <[^>]*> div zero,a1,at
-0+0078 <[^>]*> mflo a0
-0+007c <[^>]*> li at,0x8000
-0+0080 <[^>]*> div zero,a0,at
-0+0084 <[^>]*> mflo a0
-0+0088 <[^>]*> li at,0x8000
-0+008c <[^>]*> div zero,a1,at
-0+0090 <[^>]*> mflo a0
-0+0094 <[^>]*> li at,-32768
-0+0098 <[^>]*> div zero,a0,at
-0+009c <[^>]*> mflo a0
-0+00a0 <[^>]*> li at,-32768
-0+00a4 <[^>]*> div zero,a1,at
-0+00a8 <[^>]*> mflo a0
-0+00ac <[^>]*> lui at,0x1
-0+00b0 <[^>]*> div zero,a0,at
-0+00b4 <[^>]*> mflo a0
-0+00b8 <[^>]*> lui at,0x1
-0+00bc <[^>]*> div zero,a1,at
-0+00c0 <[^>]*> mflo a0
-0+00c4 <[^>]*> lui at,0x1
-0+00c8 <[^>]*> ori at,at,0xa5a5
-0+00cc <[^>]*> div zero,a0,at
-0+00d0 <[^>]*> mflo a0
-0+00d4 <[^>]*> lui at,0x1
-0+00d8 <[^>]*> ori at,at,0xa5a5
-0+00dc <[^>]*> div zero,a1,at
-0+00e0 <[^>]*> mflo a0
-0+00e4 <[^>]*> divu zero,a0,a1
-0+00e8 <[^>]*> bnez a1,0+0f4 <foo\+0xf4>
-0+00ec <[^>]*> divu zero,a0,a1
-0+00f0 <[^>]*> break (0x0,0x7|0x7)
-0+00f4 <[^>]*> mflo a0
-0+00f8 <[^>]*> bnez a2,0+0104 <foo\+0x104>
-0+00fc <[^>]*> divu zero,a1,a2
-0+0100 <[^>]*> break (0x0,0x7|0x7)
-0+0104 <[^>]*> mflo a0
-0+0108 <[^>]*> move a0,a0
-0+010c <[^>]*> bnez a2,0+0118 <foo\+0x118>
-0+0110 <[^>]*> div zero,a1,a2
-0+0114 <[^>]*> break (0x0,0x7|0x7)
-0+0118 <[^>]*> li at,-1
-0+011c <[^>]*> bne a2,at,0+0130 <foo\+0x130>
-0+0120 <[^>]*> lui at,0x8000
-0+0124 <[^>]*> bne a1,at,0+0130 <foo\+0x130>
-0+0128 <[^>]*> nop
-0+012c <[^>]*> break (0x0,0x6|0x6)
-0+0130 <[^>]*> mfhi a0
-0+0134 <[^>]*> li at,2
-0+0138 <[^>]*> divu zero,a1,at
-0+013c <[^>]*> mfhi a0
- ...
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 0085001a div zero,a0,a1
+[0-9a-f]+ <[^>]*> 14a00002 bnez a1,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 0085001a div zero,a0,a1
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 2401ffff li at,-1
+[0-9a-f]+ <[^>]*> 14a10004 bne a1,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 3c018000 lui at,0x8000
+[0-9a-f]+ <[^>]*> 14810002 bne a0,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0006000d break 0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 14c00002 bnez a2,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00a6001a div zero,a1,a2
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 2401ffff li at,-1
+[0-9a-f]+ <[^>]*> 14c10004 bne a2,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 3c018000 lui at,0x8000
+[0-9a-f]+ <[^>]*> 14a10002 bne a1,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0006000d break 0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00802025 move a0,a0
+[0-9a-f]+ <[^>]*> 00a02025 move a0,a1
+[0-9a-f]+ <[^>]*> 00042022 neg a0,a0
+[0-9a-f]+ <[^>]*> 00052022 neg a0,a1
+[0-9a-f]+ <[^>]*> 24010002 li at,2
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010002 li at,2
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 0085001b divu zero,a0,a1
+[0-9a-f]+ <[^>]*> 14a00002 bnez a1,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 0085001b divu zero,a0,a1
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 14c00002 bnez a2,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00a6001b divu zero,a1,a2
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00802025 move a0,a0
+[0-9a-f]+ <[^>]*> 14c00002 bnez a2,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00a6001a div zero,a1,a2
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 2401ffff li at,-1
+[0-9a-f]+ <[^>]*> 14c10004 bne a2,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 3c018000 lui at,0x8000
+[0-9a-f]+ <[^>]*> 14a10002 bne a1,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0006000d break 0x6
+[0-9a-f]+ <[^>]*> 00002010 mfhi a0
+[0-9a-f]+ <[^>]*> 24010002 li at,2
+[0-9a-f]+ <[^>]*> 00a1001b divu zero,a1,at
+[0-9a-f]+ <[^>]*> 00002010 mfhi a0
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/div64-trap.d b/gas/testsuite/gas/mips/div64-trap.d
index eab1975..48e4947 100644
--- a/gas/testsuite/gas/mips/div64-trap.d
+++ b/gas/testsuite/gas/mips/div64-trap.d
@@ -11,8 +11,7 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 00c001f4 teq a2,zero,0x7
[0-9a-f]+ <[^>]*> 00a6001e ddiv zero,a1,a2
[0-9a-f]+ <[^>]*> 2401ffff li at,-1
-[0-9a-f]+ <[^>]*> 14c10003 bne a2,at,[0-9a-f]+ <[^>]*>
-[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 14c10002 bne a2,at,[0-9a-f]+ <[^>]*>
[0-9a-f]+ <[^>]*> 00010ffc dsll32 at,at,0x1f
[0-9a-f]+ <[^>]*> 00a101b4 teq a1,at,0x6
[0-9a-f]+ <[^>]*> 00002012 mflo a0
diff --git a/gas/testsuite/gas/mips/div64.d b/gas/testsuite/gas/mips/div64.d
index 3a02205..2c6b343 100644
--- a/gas/testsuite/gas/mips/div64.d
+++ b/gas/testsuite/gas/mips/div64.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS 64-bit div
# Test the div macro.
@@ -7,24 +7,23 @@
.*: +file format .*mips.*
Disassembly of section \.text:
-0+0000 <[^>]*> bnez a2,0+000c <foo\+0xc>
-0+0004 <[^>]*> ddiv zero,a1,a2
-0+0008 <[^>]*> break (0x0,0x7|0x7)
-0+000c <[^>]*> (daddiu at,zero,-1|li at,-1)
-0+0010 <[^>]*> bne a2,at,0+0028 <foo\+0x28>
-0+0014 <[^>]*> (daddiu at,zero,1|li at,1)
-0+0018 <[^>]*> dsll32 at,at,0x1f
-0+001c <[^>]*> bne a1,at,0+0028 <foo\+0x28>
-0+0020 <[^>]*> nop
-0+0024 <[^>]*> break (0x0,0x6|0x6)
-0+0028 <[^>]*> mflo a0
-0+002c <[^>]*> li at,2
-0+0030 <[^>]*> ddivu zero,a1,at
-0+0034 <[^>]*> mflo a0
-0+0038 <[^>]*> li at,0x8000
-0+003c <[^>]*> ddiv zero,a1,at
-0+0040 <[^>]*> mfhi a0
-0+0044 <[^>]*> li at,-32768
-0+0048 <[^>]*> ddivu zero,a1,at
-0+004c <[^>]*> mfhi a0
+[0-9a-f]+ <[^>]*> 14c00002 bnez a2,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00a6001e ddiv zero,a1,a2
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 2401ffff li at,-1
+[0-9a-f]+ <[^>]*> 14c10004 bne a2,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00010ffc dsll32 at,at,0x1f
+[0-9a-f]+ <[^>]*> 14a10002 bne a1,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0006000d break 0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010002 li at,2
+[0-9a-f]+ <[^>]*> 00a1001f ddivu zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00a1001e ddiv zero,a1,at
+[0-9a-f]+ <[^>]*> 00002010 mfhi a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00a1001f ddivu zero,a1,at
+[0-9a-f]+ <[^>]*> 00002010 mfhi a0
\.\.\.
diff --git a/gas/testsuite/gas/mips/micromips-compact.d b/gas/testsuite/gas/mips/micromips-compact.d
index 34f6186..ca3451b 100644
--- a/gas/testsuite/gas/mips/micromips-compact.d
+++ b/gas/testsuite/gas/mips/micromips-compact.d
@@ -6523,7 +6523,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b424 fffe bne a0,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
@@ -6960,7 +6959,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b420 fffe bne zero,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
@@ -6978,7 +6976,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b43f fffe bne ra,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b420 fffe bne zero,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
diff --git a/gas/testsuite/gas/mips/micromips-insn32.d b/gas/testsuite/gas/mips/micromips-insn32.d
index f4282ff..e785134 100644
--- a/gas/testsuite/gas/mips/micromips-insn32.d
+++ b/gas/testsuite/gas/mips/micromips-insn32.d
@@ -6547,7 +6547,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b424 fffe bne a0,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
@@ -6984,7 +6983,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b420 fffe bne zero,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
@@ -7002,7 +7000,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b43f fffe bne ra,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b420 fffe bne zero,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
diff --git a/gas/testsuite/gas/mips/micromips-noinsn32.d b/gas/testsuite/gas/mips/micromips-noinsn32.d
index 75bfaf7..3fa9a06 100644
--- a/gas/testsuite/gas/mips/micromips-noinsn32.d
+++ b/gas/testsuite/gas/mips/micromips-noinsn32.d
@@ -6524,7 +6524,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b424 fffe bne a0,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
@@ -6961,7 +6960,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b420 fffe bne zero,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
@@ -6979,7 +6977,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b43f fffe bne ra,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b420 fffe bne zero,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
diff --git a/gas/testsuite/gas/mips/micromips-trap.d b/gas/testsuite/gas/mips/micromips-trap.d
index 68f5a02..0be6e28 100644
--- a/gas/testsuite/gas/mips/micromips-trap.d
+++ b/gas/testsuite/gas/mips/micromips-trap.d
@@ -6526,7 +6526,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b424 fffe bne a0,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: 0023 603c teq v1,at,0x6
@@ -6928,7 +6927,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: 0020 603c teq zero,at,0x6
@@ -6939,7 +6937,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b43f fffe bne ra,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: 0020 603c teq zero,at,0x6
diff --git a/gas/testsuite/gas/mips/micromips.d b/gas/testsuite/gas/mips/micromips.d
index 86511b9..4d96510 100644
--- a/gas/testsuite/gas/mips/micromips.d
+++ b/gas/testsuite/gas/mips/micromips.d
@@ -6602,7 +6602,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b424 fffe bne a0,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
@@ -7039,7 +7038,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b423 fffe bne v1,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b420 fffe bne zero,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
@@ -7057,7 +7055,6 @@ Disassembly of section \.text:
[ 0-9a-f]+: 3020 ffff li at,-1
[ 0-9a-f]+: b43f fffe bne ra,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
-[ 0-9a-f]+: 3020 0001 li at,1
[ 0-9a-f]+: 5821 f808 dsll32 at,at,0x1f
[ 0-9a-f]+: b420 fffe bne zero,at,[0-9a-f]+ <.*\+0x[0-9a-f]+>
[ ]*[0-9a-f]+: R_MICROMIPS_PC16_S1 .*
diff --git a/gas/testsuite/gas/mips/micromips@div64-trap.d b/gas/testsuite/gas/mips/micromips@div64-trap.d
index e4e5e68..6839401 100644
--- a/gas/testsuite/gas/mips/micromips@div64-trap.d
+++ b/gas/testsuite/gas/mips/micromips@div64-trap.d
@@ -13,7 +13,6 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 3020 ffff li at,-1
[0-9a-f]+ <[^>]*> b426 fffe bne a2,at,[0-9a-f]+ <[^>]*>
[0-9a-f]+: R_MICROMIPS_PC16_S1 \.L\^_0
-[0-9a-f]+ <[^>]*> 3020 0001 li at,1
[0-9a-f]+ <[^>]*> 5821 f808 dsll32 at,at,0x1f
[0-9a-f]+ <[^>]*> 0025 603c teq a1,at,0x6
[0-9a-f]+ <\.L\^_0> 4644 mflo a0
diff --git a/gas/testsuite/gas/mips/micromips@div64.d b/gas/testsuite/gas/mips/micromips@div64.d
index 07abe64..af7fc2c 100644
--- a/gas/testsuite/gas/mips/micromips@div64.d
+++ b/gas/testsuite/gas/mips/micromips@div64.d
@@ -15,7 +15,6 @@ Disassembly of section \.text:
[0-9a-f]+ <\.L\^_0> 3020 ffff li at,-1
[0-9a-f]+ <[^>]*> b426 fffe bne a2,at,[0-9a-f]+ <[^>]*>
[0-9a-f]+: R_MICROMIPS_PC16_S1 \.L\^_1
-[0-9a-f]+ <[^>]*> 3020 0001 li at,1
[0-9a-f]+ <[^>]*> 5821 f808 dsll32 at,at,0x1f
[0-9a-f]+ <[^>]*> b425 fffe bne a1,at,[0-9a-f]+ <[^>]*>
[0-9a-f]+: R_MICROMIPS_PC16_S1 \.L\^_1
diff --git a/gas/testsuite/gas/mips/mips1@div-trap.d b/gas/testsuite/gas/mips/mips1@div-trap.d
index bca128d..43f5d0d 100644
--- a/gas/testsuite/gas/mips/mips1@div-trap.d
+++ b/gas/testsuite/gas/mips/mips1@div-trap.d
@@ -1,5 +1,5 @@
#as: -32 -trap
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div with traps
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/mips1@div.d b/gas/testsuite/gas/mips/mips1@div.d
index 72fd3e5..5bff140 100644
--- a/gas/testsuite/gas/mips/mips1@div.d
+++ b/gas/testsuite/gas/mips/mips1@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
@@ -7,96 +7,104 @@
.*: +file format .*mips.*
-Disassembly of section .text:
-0+0000 <[^>]*> div zero,a0,a1
-0+0004 <[^>]*> bnez a1,0+0010 <foo\+0x10>
-0+0008 <[^>]*> div zero,a0,a1
-0+000c <[^>]*> break (0x0,0x7|0x7)
-0+0010 <[^>]*> li at,-1
-0+0014 <[^>]*> bne a1,at,0+0028 <foo\+0x28>
-0+0018 <[^>]*> lui at,0x8000
-0+001c <[^>]*> bne a0,at,0+0028 <foo\+0x28>
-0+0020 <[^>]*> nop
-0+0024 <[^>]*> break (0x0,0x6|0x6)
-0+0028 <[^>]*> mflo a0
-0+002c <[^>]*> nop
-0+0030 <[^>]*> bnez a2,0+003c <foo\+0x3c>
-0+0034 <[^>]*> div zero,a1,a2
-0+0038 <[^>]*> break (0x0,0x7|0x7)
-0+003c <[^>]*> li at,-1
-0+0040 <[^>]*> bne a2,at,0+0054 <foo\+0x54>
-0+0044 <[^>]*> lui at,0x8000
-0+0048 <[^>]*> bne a1,at,0+0054 <foo\+0x54>
-0+004c <[^>]*> nop
-0+0050 <[^>]*> break (0x0,0x6|0x6)
-0+0054 <[^>]*> mflo a0
-0+0058 <[^>]*> move a0,a0
-0+005c <[^>]*> move a0,a1
-0+0060 <[^>]*> neg a0,a0
-0+0064 <[^>]*> neg a0,a1
-0+0068 <[^>]*> li at,2
-0+006c <[^>]*> div zero,a0,at
-0+0070 <[^>]*> mflo a0
-0+0074 <[^>]*> li at,2
-0+0078 <[^>]*> nop
-0+007c <[^>]*> div zero,a1,at
-0+0080 <[^>]*> mflo a0
-0+0084 <[^>]*> li at,0x8000
-0+0088 <[^>]*> nop
-0+008c <[^>]*> div zero,a0,at
-0+0090 <[^>]*> mflo a0
-0+0094 <[^>]*> li at,0x8000
-0+0098 <[^>]*> nop
-0+009c <[^>]*> div zero,a1,at
-0+00a0 <[^>]*> mflo a0
-0+00a4 <[^>]*> li at,-32768
-0+00a8 <[^>]*> nop
-0+00ac <[^>]*> div zero,a0,at
-0+00b0 <[^>]*> mflo a0
-0+00b4 <[^>]*> li at,-32768
-0+00b8 <[^>]*> nop
-0+00bc <[^>]*> div zero,a1,at
-0+00c0 <[^>]*> mflo a0
-0+00c4 <[^>]*> lui at,0x1
-0+00c8 <[^>]*> nop
-0+00cc <[^>]*> div zero,a0,at
-0+00d0 <[^>]*> mflo a0
-0+00d4 <[^>]*> lui at,0x1
-0+00d8 <[^>]*> nop
-0+00dc <[^>]*> div zero,a1,at
-0+00e0 <[^>]*> mflo a0
-0+00e4 <[^>]*> lui at,0x1
-0+00e8 <[^>]*> ori at,at,0xa5a5
-0+00ec <[^>]*> div zero,a0,at
-0+00f0 <[^>]*> mflo a0
-0+00f4 <[^>]*> lui at,0x1
-0+00f8 <[^>]*> ori at,at,0xa5a5
-0+00fc <[^>]*> div zero,a1,at
-0+0100 <[^>]*> mflo a0
- ...
-0+010c <[^>]*> divu zero,a0,a1
-0+0110 <[^>]*> bnez a1,0+011c <foo\+0x11c>
-0+0114 <[^>]*> divu zero,a0,a1
-0+0118 <[^>]*> break (0x0,0x7|0x7)
-0+011c <[^>]*> mflo a0
-0+0120 <[^>]*> nop
-0+0124 <[^>]*> bnez a2,0+0130 <foo\+0x130>
-0+0128 <[^>]*> divu zero,a1,a2
-0+012c <[^>]*> break (0x0,0x7|0x7)
-0+0130 <[^>]*> mflo a0
-0+0134 <[^>]*> move a0,a0
-0+0138 <[^>]*> bnez a2,0+0144 <foo\+0x144>
-0+013c <[^>]*> div zero,a1,a2
-0+0140 <[^>]*> break (0x0,0x7|0x7)
-0+0144 <[^>]*> li at,-1
-0+0148 <[^>]*> bne a2,at,0+015c <foo\+0x15c>
-0+014c <[^>]*> lui at,0x8000
-0+0150 <[^>]*> bne a1,at,0+015c <foo\+0x15c>
-0+0154 <[^>]*> nop
-0+0158 <[^>]*> break (0x0,0x6|0x6)
-0+015c <[^>]*> mfhi a0
-0+0160 <[^>]*> li at,2
-0+0164 <[^>]*> nop
-0+0168 <[^>]*> divu zero,a1,at
-0+016c <[^>]*> mfhi a0
- ...
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 0085001a div zero,a0,a1
+[0-9a-f]+ <[^>]*> 14a00002 bnez a1,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 0085001a div zero,a0,a1
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 2401ffff li at,-1
+[0-9a-f]+ <[^>]*> 14a10004 bne a1,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 3c018000 lui at,0x8000
+[0-9a-f]+ <[^>]*> 14810002 bne a0,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0006000d break 0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 14c00002 bnez a2,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00a6001a div zero,a1,a2
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 2401ffff li at,-1
+[0-9a-f]+ <[^>]*> 14c10004 bne a2,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 3c018000 lui at,0x8000
+[0-9a-f]+ <[^>]*> 14a10002 bne a1,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0006000d break 0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00802025 move a0,a0
+[0-9a-f]+ <[^>]*> 00a02025 move a0,a1
+[0-9a-f]+ <[^>]*> 00042022 neg a0,a0
+[0-9a-f]+ <[^>]*> 00052022 neg a0,a1
+[0-9a-f]+ <[^>]*> 24010002 li at,2
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010002 li at,2
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 0081001a div zero,a0,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 3c010001 lui at,0x1
+[0-9a-f]+ <[^>]*> 3421a5a5 ori at,at,0xa5a5
+[0-9a-f]+ <[^>]*> 00a1001a div zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0085001b divu zero,a0,a1
+[0-9a-f]+ <[^>]*> 14a00002 bnez a1,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 0085001b divu zero,a0,a1
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 14c00002 bnez a2,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00a6001b divu zero,a1,a2
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 00802025 move a0,a0
+[0-9a-f]+ <[^>]*> 14c00002 bnez a2,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00a6001a div zero,a1,a2
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 2401ffff li at,-1
+[0-9a-f]+ <[^>]*> 14c10004 bne a2,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 3c018000 lui at,0x8000
+[0-9a-f]+ <[^>]*> 14a10002 bne a1,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0006000d break 0x6
+[0-9a-f]+ <[^>]*> 00002010 mfhi a0
+[0-9a-f]+ <[^>]*> 24010002 li at,2
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001b divu zero,a1,at
+[0-9a-f]+ <[^>]*> 00002010 mfhi a0
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00000000 nop
diff --git a/gas/testsuite/gas/mips/mips2@div-trap.d b/gas/testsuite/gas/mips/mips2@div-trap.d
index f5b411c..1ecf906 100644
--- a/gas/testsuite/gas/mips/mips2@div-trap.d
+++ b/gas/testsuite/gas/mips/mips2@div-trap.d
@@ -1,5 +1,5 @@
#as: -32 -trap
-#objdump: -drz --prefix-addresses --show-raw-insn
+#objdump: -drz --prefix-addresses --show-raw-insn --show-raw-insn
#name: MIPS div with traps
#source: div.s
diff --git a/gas/testsuite/gas/mips/mips2@div.d b/gas/testsuite/gas/mips/mips2@div.d
index f89764b..2780d2f 100644
--- a/gas/testsuite/gas/mips/mips2@div.d
+++ b/gas/testsuite/gas/mips/mips2@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/mips3@div.d b/gas/testsuite/gas/mips/mips3@div.d
index f89764b..2780d2f 100644
--- a/gas/testsuite/gas/mips/mips3@div.d
+++ b/gas/testsuite/gas/mips/mips3@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/mips3@div64-trap.d b/gas/testsuite/gas/mips/mips3@div64-trap.d
index 568fbd4..33196f38 100644
--- a/gas/testsuite/gas/mips/mips3@div64-trap.d
+++ b/gas/testsuite/gas/mips/mips3@div64-trap.d
@@ -11,8 +11,7 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 00c001f4 teq a2,zero,0x7
[0-9a-f]+ <[^>]*> 00a6001e ddiv zero,a1,a2
[0-9a-f]+ <[^>]*> 2401ffff li at,-1
-[0-9a-f]+ <[^>]*> 14c10003 bne a2,at,[0-9a-f]+ <[^>]*>
-[0-9a-f]+ <[^>]*> 24010001 li at,1
+[0-9a-f]+ <[^>]*> 14c10002 bne a2,at,[0-9a-f]+ <[^>]*>
[0-9a-f]+ <[^>]*> 00010ffc dsll32 at,at,0x1f
[0-9a-f]+ <[^>]*> 00a101b4 teq a1,at,0x6
[0-9a-f]+ <[^>]*> 00002012 mflo a0
diff --git a/gas/testsuite/gas/mips/mips3@div64.d b/gas/testsuite/gas/mips/mips3@div64.d
index 1ca95a3..ec0f03e 100644
--- a/gas/testsuite/gas/mips/mips3@div64.d
+++ b/gas/testsuite/gas/mips/mips3@div64.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS 64-bit div
#source: div64.s
@@ -7,28 +7,27 @@
.*: +file format .*mips.*
-Disassembly of section .text:
-0+0000 <[^>]*> bnez a2,0+000c <foo\+0xc>
-0+0004 <[^>]*> ddiv zero,a1,a2
-0+0008 <[^>]*> break (0x0,0x7|0x7)
-0+000c <[^>]*> (daddiu at,zero,-1|li at,-1)
-0+0010 <[^>]*> bne a2,at,0+0028 <foo\+0x28>
-0+0014 <[^>]*> (daddiu at,zero,1|li at,1)
-0+0018 <[^>]*> dsll32 at,at,0x1f
-0+001c <[^>]*> bne a1,at,0+0028 <foo\+0x28>
-0+0020 <[^>]*> nop
-0+0024 <[^>]*> break (0x0,0x6|0x6)
-0+0028 <[^>]*> mflo a0
-0+002c <[^>]*> li at,2
-0+0030 <[^>]*> nop
-0+0034 <[^>]*> ddivu zero,a1,at
-0+0038 <[^>]*> mflo a0
-0+003c <[^>]*> li at,0x8000
-0+0040 <[^>]*> nop
-0+0044 <[^>]*> ddiv zero,a1,at
-0+0048 <[^>]*> mfhi a0
-0+004c <[^>]*> li at,-32768
-0+0050 <[^>]*> nop
-0+0054 <[^>]*> ddivu zero,a1,at
-0+0058 <[^>]*> mfhi a0
- ...
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 14c00002 bnez a2,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00a6001e ddiv zero,a1,a2
+[0-9a-f]+ <[^>]*> 0007000d break 0x7
+[0-9a-f]+ <[^>]*> 2401ffff li at,-1
+[0-9a-f]+ <[^>]*> 14c10004 bne a2,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00010ffc dsll32 at,at,0x1f
+[0-9a-f]+ <[^>]*> 14a10002 bne a1,at,[0-9a-f]+ <[^>]*>
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 0006000d break 0x6
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 24010002 li at,2
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001f ddivu zero,a1,at
+[0-9a-f]+ <[^>]*> 00002012 mflo a0
+[0-9a-f]+ <[^>]*> 34018000 li at,0x8000
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001e ddiv zero,a1,at
+[0-9a-f]+ <[^>]*> 00002010 mfhi a0
+[0-9a-f]+ <[^>]*> 24018000 li at,-32768
+[0-9a-f]+ <[^>]*> 00000000 nop
+[0-9a-f]+ <[^>]*> 00a1001f ddivu zero,a1,at
+[0-9a-f]+ <[^>]*> 00002010 mfhi a0
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/mips4@div.d b/gas/testsuite/gas/mips/mips4@div.d
index f89764b..2780d2f 100644
--- a/gas/testsuite/gas/mips/mips4@div.d
+++ b/gas/testsuite/gas/mips/mips4@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/mips4@div64.d b/gas/testsuite/gas/mips/mips4@div64.d
index 9849e85..a83979a 100644
--- a/gas/testsuite/gas/mips/mips4@div64.d
+++ b/gas/testsuite/gas/mips/mips4@div64.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS 64-bit div
#source: div64.s
#dump: mips3@div64.d
diff --git a/gas/testsuite/gas/mips/mips5@div.d b/gas/testsuite/gas/mips/mips5@div.d
index f89764b..2780d2f 100644
--- a/gas/testsuite/gas/mips/mips5@div.d
+++ b/gas/testsuite/gas/mips/mips5@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/mips5@div64.d b/gas/testsuite/gas/mips/mips5@div64.d
index 9849e85..a83979a 100644
--- a/gas/testsuite/gas/mips/mips5@div64.d
+++ b/gas/testsuite/gas/mips/mips5@div64.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS 64-bit div
#source: div64.s
#dump: mips3@div64.d
diff --git a/gas/testsuite/gas/mips/r3000@div-trap.d b/gas/testsuite/gas/mips/r3000@div-trap.d
index bca128d..43f5d0d 100644
--- a/gas/testsuite/gas/mips/r3000@div-trap.d
+++ b/gas/testsuite/gas/mips/r3000@div-trap.d
@@ -1,5 +1,5 @@
#as: -32 -trap
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div with traps
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/r3000@div.d b/gas/testsuite/gas/mips/r3000@div.d
index f89764b..2780d2f 100644
--- a/gas/testsuite/gas/mips/r3000@div.d
+++ b/gas/testsuite/gas/mips/r3000@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/r3900@div-trap.d b/gas/testsuite/gas/mips/r3900@div-trap.d
index bca128d..43f5d0d 100644
--- a/gas/testsuite/gas/mips/r3900@div-trap.d
+++ b/gas/testsuite/gas/mips/r3900@div-trap.d
@@ -1,5 +1,5 @@
#as: -32 -trap
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div with traps
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/r3900@div.d b/gas/testsuite/gas/mips/r3900@div.d
index f89764b..2780d2f 100644
--- a/gas/testsuite/gas/mips/r3900@div.d
+++ b/gas/testsuite/gas/mips/r3900@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/r4000@div.d b/gas/testsuite/gas/mips/r4000@div.d
index f89764b..2780d2f 100644
--- a/gas/testsuite/gas/mips/r4000@div.d
+++ b/gas/testsuite/gas/mips/r4000@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/r4000@div64.d b/gas/testsuite/gas/mips/r4000@div64.d
index 9849e85..a83979a 100644
--- a/gas/testsuite/gas/mips/r4000@div64.d
+++ b/gas/testsuite/gas/mips/r4000@div64.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS 64-bit div
#source: div64.s
#dump: mips3@div64.d
diff --git a/gas/testsuite/gas/mips/vr5400@div.d b/gas/testsuite/gas/mips/vr5400@div.d
index f89764b..2780d2f 100644
--- a/gas/testsuite/gas/mips/vr5400@div.d
+++ b/gas/testsuite/gas/mips/vr5400@div.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -drz --prefix-addresses --show-raw-insn
#name: MIPS div
#source: div.s
#dump: mips1@div.d
diff --git a/gas/testsuite/gas/mips/vr5400@div64.d b/gas/testsuite/gas/mips/vr5400@div64.d
index 9849e85..a83979a 100644
--- a/gas/testsuite/gas/mips/vr5400@div64.d
+++ b/gas/testsuite/gas/mips/vr5400@div64.d
@@ -1,5 +1,5 @@
#as: -32
-#objdump: -dr --prefix-addresses
+#objdump: -dr --prefix-addresses --show-raw-insn
#name: MIPS 64-bit div
#source: div64.s
#dump: mips3@div64.d
diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.d b/gas/testsuite/gas/riscv/csr-version-1p10.d
index 5165f4b..ce28f59 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p10.d
+++ b/gas/testsuite/gas/riscv/csr-version-1p10.d
@@ -645,6 +645,14 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+mcyclecfgh,a1
[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,minstretcfgh
[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+minstretcfgh,a1
+[ ]+[0-9a-f]+:[ ]+74102573[ ]+csrr[ ]+a0,mnepc
+[ ]+[0-9a-f]+:[ ]+74159073[ ]+csrw[ ]+mnepc,a1
+[ ]+[0-9a-f]+:[ ]+74202573[ ]+csrr[ ]+a0,mncause
+[ ]+[0-9a-f]+:[ ]+74259073[ ]+csrw[ ]+mncause,a1
+[ ]+[0-9a-f]+:[ ]+74002573[ ]+csrr[ ]+a0,mnscratch
+[ ]+[0-9a-f]+:[ ]+74059073[ ]+csrw[ ]+mnscratch,a1
+[ ]+[0-9a-f]+:[ ]+74402573[ ]+csrr[ ]+a0,mnstatus
+[ ]+[0-9a-f]+:[ ]+74459073[ ]+csrw[ ]+mnstatus,a1
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.l b/gas/testsuite/gas/riscv/csr-version-1p10.l
index 17a8bb6..5f6a956 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p10.l
+++ b/gas/testsuite/gas/riscv/csr-version-1p10.l
@@ -941,6 +941,22 @@
.*Info: macro .*
.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
.*Info: macro .*
+.*Warning: invalid CSR `mnepc', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnepc', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mncause', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mncause', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnscratch', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnscratch', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnstatus', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnstatus', needs `smrnmi' extension
+.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.d b/gas/testsuite/gas/riscv/csr-version-1p11.d
index 1cb5a91..7bbcf33 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p11.d
+++ b/gas/testsuite/gas/riscv/csr-version-1p11.d
@@ -645,6 +645,14 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+mcyclecfgh,a1
[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,minstretcfgh
[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+minstretcfgh,a1
+[ ]+[0-9a-f]+:[ ]+74102573[ ]+csrr[ ]+a0,mnepc
+[ ]+[0-9a-f]+:[ ]+74159073[ ]+csrw[ ]+mnepc,a1
+[ ]+[0-9a-f]+:[ ]+74202573[ ]+csrr[ ]+a0,mncause
+[ ]+[0-9a-f]+:[ ]+74259073[ ]+csrw[ ]+mncause,a1
+[ ]+[0-9a-f]+:[ ]+74002573[ ]+csrr[ ]+a0,mnscratch
+[ ]+[0-9a-f]+:[ ]+74059073[ ]+csrw[ ]+mnscratch,a1
+[ ]+[0-9a-f]+:[ ]+74402573[ ]+csrr[ ]+a0,mnstatus
+[ ]+[0-9a-f]+:[ ]+74459073[ ]+csrw[ ]+mnstatus,a1
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.l b/gas/testsuite/gas/riscv/csr-version-1p11.l
index 8b797e8..412271c 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p11.l
+++ b/gas/testsuite/gas/riscv/csr-version-1p11.l
@@ -937,6 +937,22 @@
.*Info: macro .*
.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
.*Info: macro .*
+.*Warning: invalid CSR `mnepc', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnepc', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mncause', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mncause', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnscratch', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnscratch', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnstatus', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnstatus', needs `smrnmi' extension
+.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.d b/gas/testsuite/gas/riscv/csr-version-1p12.d
index ac88d93..25518dc 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p12.d
+++ b/gas/testsuite/gas/riscv/csr-version-1p12.d
@@ -645,6 +645,14 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+mcyclecfgh,a1
[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,minstretcfgh
[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+minstretcfgh,a1
+[ ]+[0-9a-f]+:[ ]+74102573[ ]+csrr[ ]+a0,mnepc
+[ ]+[0-9a-f]+:[ ]+74159073[ ]+csrw[ ]+mnepc,a1
+[ ]+[0-9a-f]+:[ ]+74202573[ ]+csrr[ ]+a0,mncause
+[ ]+[0-9a-f]+:[ ]+74259073[ ]+csrw[ ]+mncause,a1
+[ ]+[0-9a-f]+:[ ]+74002573[ ]+csrr[ ]+a0,mnscratch
+[ ]+[0-9a-f]+:[ ]+74059073[ ]+csrw[ ]+mnscratch,a1
+[ ]+[0-9a-f]+:[ ]+74402573[ ]+csrr[ ]+a0,mnstatus
+[ ]+[0-9a-f]+:[ ]+74459073[ ]+csrw[ ]+mnstatus,a1
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.l b/gas/testsuite/gas/riscv/csr-version-1p12.l
index 81a7aba..4848a68 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p12.l
+++ b/gas/testsuite/gas/riscv/csr-version-1p12.l
@@ -661,6 +661,22 @@
.*Info: macro .*
.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
.*Info: macro .*
+.*Warning: invalid CSR `mnepc', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnepc', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mncause', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mncause', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnscratch', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnscratch', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnstatus', needs `smrnmi' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mnstatus', needs `smrnmi' extension
+.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
diff --git a/gas/testsuite/gas/riscv/csr.s b/gas/testsuite/gas/riscv/csr.s
index 378caef..8378e14 100644
--- a/gas/testsuite/gas/riscv/csr.s
+++ b/gas/testsuite/gas/riscv/csr.s
@@ -365,6 +365,12 @@
csr mcyclecfgh
csr minstretcfgh
+ # smrnmi
+ csr mnepc
+ csr mncause
+ csr mnscratch
+ csr mnstatus
+
# Smstateen/Ssstateen extensions
csr mstateen0
csr mstateen1
diff --git a/gas/testsuite/gas/riscv/imply.d b/gas/testsuite/gas/riscv/imply.d
index 88b8c46..26eff8c 100644
--- a/gas/testsuite/gas/riscv/imply.d
+++ b/gas/testsuite/gas/riscv/imply.d
@@ -15,8 +15,8 @@ SYMBOL TABLE:
[0-9a-f]+ l .text 0+000 \$xrv32i2p1_zicntr2p0_zicsr2p0
[0-9a-f]+ l .text 0+000 \$xrv32i2p1_zicsr2p0_zihpm2p0
[0-9a-f]+ l .text 0+000 \$xrv32i2p1_m2p0_zmmul1p0
-[0-9a-f]+ l .text 0+000 \$xrv32i2p1_a2p1_zaamo1p0_zabha1p0_zalrsc1p0
-[0-9a-f]+ l .text 0+000 \$xrv32i2p1_a2p1_zaamo1p0_zacas1p0_zalrsc1p0
+[0-9a-f]+ l .text 0+000 \$xrv32i2p1_zaamo1p0_zabha1p0
+[0-9a-f]+ l .text 0+000 \$xrv32i2p1_zaamo1p0_zacas1p0
[0-9a-f]+ l .text 0+000 \$xrv32i2p1_a2p1_zaamo1p0_zalrsc1p0
[0-9a-f]+ l .text 0+000 \$xrv32i2p1_zicsr2p0_zve32x1p0_zvl32b1p0_xsfvcp1p0
[0-9a-f]+ l .text 0+000 \$xrv32i2p1_f2p2_d2p2_v1p0_zicsr2p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0
diff --git a/gas/testsuite/gas/riscv/march-help.l b/gas/testsuite/gas/riscv/march-help.l
index 0c33d1e..0033592 100644
--- a/gas/testsuite/gas/riscv/march-help.l
+++ b/gas/testsuite/gas/riscv/march-help.l
@@ -114,6 +114,7 @@ All available -march extensions for RISC-V:
smcsrind 1.0
smcntrpmf 1.0
smepmp 1.0
+ smrnmi 1.0
smstateen 1.0
ssaia 1.0
ssccptr 1.0
diff --git a/gas/testsuite/gas/riscv/odd-padding.d b/gas/testsuite/gas/riscv/odd-padding.d
new file mode 100644
index 0000000..b445a74
--- /dev/null
+++ b/gas/testsuite/gas/riscv/odd-padding.d
@@ -0,0 +1,17 @@
+#as: -mrelax
+#as: -mno-relax
+#objdump: -d
+
+.*:[ ]+file format .*
+
+
+Disassembly of section \.text:
+
+0+000 <byte>:
+[ ]+0:[ ]+00000013[ ]+nop
+[ ]+4:[ ]+00[ ]+\.byte[ ]+0x00
+#...
+[ ]+9:[ ]+00[ ]+\.byte[ ]+0x00
+[ ]+a:[ ]+0001[ ]+\.insn[ ]+2, 0x0*1
+[ ]+c:[ ]+00000013[ ]+nop
+[ ]+10:[ ]+00008067[ ]+ret
diff --git a/gas/testsuite/gas/riscv/odd-padding.s b/gas/testsuite/gas/riscv/odd-padding.s
new file mode 100644
index 0000000..9e434ea
--- /dev/null
+++ b/gas/testsuite/gas/riscv/odd-padding.s
@@ -0,0 +1,8 @@
+ .text
+byte:
+ nop
+ .byte 0
+ nop
+ .p2align 2
+ nop
+ ret
diff --git a/gas/testsuite/gas/riscv/relax-align-2.d b/gas/testsuite/gas/riscv/relax-align-2.d
new file mode 100644
index 0000000..36ab78e
--- /dev/null
+++ b/gas/testsuite/gas/riscv/relax-align-2.d
@@ -0,0 +1,52 @@
+#as: -mrelax
+#objdump: -drw
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <rvc_func>:
+[ ]+0:[ ]+8082[ ]+ret
+[ ]+2:[ ]+0001[ ]+nop
+[ ]+4:[ ]+00000013[ ]+nop[ ]+4: R_RISCV_ALIGN[ ]+\*ABS\*\+0x4
+
+0+008 <non_rvc_func>:
+[ ]+8:[ ]+00008067[ ]+ret
+
+0+00c <insn>:
+[ ]+c:[ ]+00000013[ ]+nop
+[ ]+10:[ ]+0000[ ]+\.insn 2, 0x0+
+[ ]+12:[ ]+0001[ ]+\.insn 2, 0x0*1
+[ ]+14:[ ]+00000013[ ]+nop[ ]+14: R_RISCV_ALIGN[ ]+\*ABS\*\+0x4
+[ ]+18:[ ]+00008067[ ]+ret
+
+0+001c <hword>:
+[ ]+1c:[ ]+00000013[ ]+nop
+[ ]+20:[ ]+0000[ ]+\.short 0x0+
+[ ]+22:[ ]+0001[ ]+\.insn 2, 0x0*1
+[ ]+24:[ ]+00000013[ ]+nop[ ]+24: R_RISCV_ALIGN[ ]+\*ABS\*\+0x4
+[ ]+28:[ ]+00008067[ ]+ret
+
+0+002c <byte>:
+[ ]+2c:[ ]+00000013[ ]+nop
+[ ]+30:[ ]+00[ ]+\.byte 0x0+
+[ ]+31:[ ]+00[ ]+\.byte 0x0+
+[ ]+32:[ ]+0001[ ]+\.insn 2, 0x0*1
+[ ]+34:[ ]+00000013[ ]+nop[ ]+34: R_RISCV_ALIGN[ ]+\*ABS\*\+0x4
+[ ]+38:[ ]+00008067[ ]+ret
+[ ]+3c:[ ]+00000013[ ]+nop[ ]+3c: R_RISCV_ALIGN[ ]+\*ABS\*\+0x4
+
+0+0040 <func1>:
+[ ]+40:[ ]+00000013[ ]+nop
+[ ]+44:[ ]+00008067[ ]+ret
+
+0+0048 <func2>:
+[ ]+48:[ ]+8082[ ]+ret
+[ ]+4a:[ ]+0001[ ]+nop
+[ ]+4c:[ ]+00000013[ ]+nop[ ]+4c: R_RISCV_ALIGN[ ]+\*ABS\*\+0x4
+
+0+0050 <func3>:
+[ ]+50:[ ]+00000013[ ]+nop
+[ ]+54:[ ]+00008067[ ]+ret
+#pass
diff --git a/gas/testsuite/gas/riscv/relax-align-2.s b/gas/testsuite/gas/riscv/relax-align-2.s
new file mode 100644
index 0000000..69c6128
--- /dev/null
+++ b/gas/testsuite/gas/riscv/relax-align-2.s
@@ -0,0 +1,50 @@
+ .text
+ .option rvc
+rvc_func:
+ ret
+
+ .option norvc
+ .p2align 3
+non_rvc_func:
+ ret
+
+insn:
+ nop
+ .insn 0
+ .p2align 3
+ ret
+
+hword:
+ nop
+ .hword 0
+ .p2align 3
+ ret
+
+byte:
+ nop
+ .byte 0
+ .p2align 3
+ ret
+
+ .p2align 3
+func1:
+ nop
+ ret
+
+ .pushsection .text1, "ax", @progbits
+ .option rvc
+ nop
+ .popsection
+
+func2:
+ ret
+
+ .pushsection .text1, "ax", @progbits
+ nop
+ .option norvc
+ .popsection
+
+ .p2align 3
+func3:
+ nop
+ ret
diff --git a/gas/testsuite/gas/riscv/relax-align.d b/gas/testsuite/gas/riscv/relax-align.d
new file mode 100644
index 0000000..0aed58e
--- /dev/null
+++ b/gas/testsuite/gas/riscv/relax-align.d
@@ -0,0 +1,34 @@
+#as: -mrelax
+#objdump: -dr
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <rvc_func>:
+[ ]+0:[ ]+8082[ ]+ret
+[ ]+2:[ ]+0001[ ]+nop
+
+0+004 <non_rvc_func>:
+[ ]+4:[ ]+00008067[ ]+ret
+
+0+008 <insn>:
+[ ]+8:[ ]+00000013[ ]+nop
+[ ]+c:[ ]+0000[ ]+\.insn 2, 0x0+
+[ ]+e:[ ]+0001[ ]+\.insn 2, 0x0*1
+[ ]+10:[ ]+00008067[ ]+ret
+
+0+0014 <hword>:
+[ ]+14:[ ]+00000013[ ]+nop
+[ ]+18:[ ]+0000[ ]+\.short 0x0+
+[ ]+1a:[ ]+0001[ ]+\.insn 2, 0x0*1
+[ ]+1c:[ ]+00008067[ ]+ret
+
+0+0020 <byte>:
+[ ]+20:[ ]+00000013[ ]+nop
+[ ]+24:[ ]+00[ ]+\.byte 0x0+
+[ ]+25:[ ]+00[ ]+\.byte 0x0+
+[ ]+26:[ ]+0001[ ]+\.insn 2, 0x0*1
+[ ]+28:[ ]+00008067[ ]+ret
+#pass
diff --git a/gas/testsuite/gas/riscv/relax-align.s b/gas/testsuite/gas/riscv/relax-align.s
new file mode 100644
index 0000000..54db102
--- /dev/null
+++ b/gas/testsuite/gas/riscv/relax-align.s
@@ -0,0 +1,27 @@
+ .text
+ .option rvc
+rvc_func:
+ ret
+
+ .option norvc
+ .p2align 2
+non_rvc_func:
+ ret
+
+insn:
+ nop
+ .insn 0
+ .p2align 2
+ ret
+
+hword:
+ nop
+ .hword 0
+ .p2align 2
+ ret
+
+byte:
+ nop
+ .byte 0
+ .p2align 2
+ ret
diff --git a/gas/testsuite/gas/s390/s390.exp b/gas/testsuite/gas/s390/s390.exp
index a4e8dbc..1d5d97f 100644
--- a/gas/testsuite/gas/s390/s390.exp
+++ b/gas/testsuite/gas/s390/s390.exp
@@ -43,6 +43,7 @@ if [expr [istarget "s390-*-*"] || [istarget "s390x-*-*"]] then {
run_dump_test "zarch-arch12" "{as -m64} {as -march=arch12}"
run_dump_test "zarch-arch13" "{as -m64} {as -march=arch13}"
run_dump_test "zarch-arch14" "{as -m64} {as -march=arch14}"
+ run_dump_test "zarch-arch15" "{as -m64} {as -march=arch15}"
run_dump_test "zarch-reloc" "{as -m64}"
run_dump_test "zarch-operands" "{as -m64} {as -march=z9-109}"
run_dump_test "zarch-machine" "{as -m64} {as -march=z900}"
diff --git a/gas/testsuite/gas/s390/zarch-arch15.d b/gas/testsuite/gas/s390/zarch-arch15.d
new file mode 100644
index 0000000..955c970
--- /dev/null
+++ b/gas/testsuite/gas/s390/zarch-arch15.d
@@ -0,0 +1,102 @@
+#name: s390x opcode
+#objdump: -dr
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+.* <foo>:
+.*: e7 f1 4d 00 87 89 [ ]*vblend %v15,%v17,%v20,%v24,13
+.*: e7 f1 40 00 87 89 [ ]*vblendb %v15,%v17,%v20,%v24
+.*: e7 f1 41 00 87 89 [ ]*vblendh %v15,%v17,%v20,%v24
+.*: e7 f1 42 00 87 89 [ ]*vblendf %v15,%v17,%v20,%v24
+.*: e7 f1 43 00 87 89 [ ]*vblendg %v15,%v17,%v20,%v24
+.*: e7 f1 44 00 87 89 [ ]*vblendq %v15,%v17,%v20,%v24
+.*: e7 f1 40 fd 87 88 [ ]*veval %v15,%v17,%v20,%v24,253
+.*: e7 f1 00 00 d4 54 [ ]*vgem %v15,%v17,13
+.*: e7 f1 00 00 04 54 [ ]*vgemb %v15,%v17
+.*: e7 f1 00 00 14 54 [ ]*vgemh %v15,%v17
+.*: e7 f1 00 00 24 54 [ ]*vgemf %v15,%v17
+.*: e7 f1 00 00 34 54 [ ]*vgemg %v15,%v17
+.*: e7 f1 00 00 44 54 [ ]*vgemq %v15,%v17
+.*: e7 f1 00 00 34 d7 [ ]*vuphg %v15,%v17
+.*: e7 f1 00 00 34 d5 [ ]*vuplhg %v15,%v17
+.*: e7 f1 00 00 34 d6 [ ]*vuplg %v15,%v17
+.*: e7 f1 00 00 34 d4 [ ]*vupllg %v15,%v17
+.*: e7 f1 40 00 46 f2 [ ]*vavgq %v15,%v17,%v20
+.*: e7 f1 40 00 46 f0 [ ]*vavglq %v15,%v17,%v20
+.*: e7 f1 00 00 44 db [ ]*vecq %v15,%v17
+.*: e7 f1 00 00 44 d9 [ ]*veclq %v15,%v17
+.*: e7 f1 40 00 46 f8 [ ]*vceqq %v15,%v17,%v20
+.*: e7 f1 40 10 46 f8 [ ]*vceqqs %v15,%v17,%v20
+.*: e7 f1 40 00 46 fb [ ]*vchq %v15,%v17,%v20
+.*: e7 f1 40 10 46 fb [ ]*vchqs %v15,%v17,%v20
+.*: e7 f1 40 00 46 f9 [ ]*vchlq %v15,%v17,%v20
+.*: e7 f1 40 10 46 f9 [ ]*vchlqs %v15,%v17,%v20
+.*: e7 f1 00 00 44 53 [ ]*vclzq %v15,%v17
+.*: e7 f1 00 00 44 52 [ ]*vctzq %v15,%v17
+.*: e7 f1 00 00 44 de [ ]*vlcq %v15,%v17
+.*: e7 f1 00 00 44 df [ ]*vlpq %v15,%v17
+.*: e7 f1 40 00 46 ff [ ]*vmxq %v15,%v17,%v20
+.*: e7 f1 40 00 46 fd [ ]*vmxlq %v15,%v17,%v20
+.*: e7 f1 40 00 46 fe [ ]*vmnq %v15,%v17,%v20
+.*: e7 f1 40 00 46 fc [ ]*vmnlq %v15,%v17,%v20
+.*: e7 f1 43 00 87 aa [ ]*vmalg %v15,%v17,%v20,%v24
+.*: e7 f1 44 00 87 aa [ ]*vmalq %v15,%v17,%v20,%v24
+.*: e7 f1 43 00 87 ab [ ]*vmahg %v15,%v17,%v20,%v24
+.*: e7 f1 44 00 87 ab [ ]*vmahq %v15,%v17,%v20,%v24
+.*: e7 f1 43 00 87 a9 [ ]*vmalhg %v15,%v17,%v20,%v24
+.*: e7 f1 44 00 87 a9 [ ]*vmalhq %v15,%v17,%v20,%v24
+.*: e7 f1 43 00 87 ae [ ]*vmaeg %v15,%v17,%v20,%v24
+.*: e7 f1 43 00 87 ac [ ]*vmaleg %v15,%v17,%v20,%v24
+.*: e7 f1 43 00 87 af [ ]*vmaog %v15,%v17,%v20,%v24
+.*: e7 f1 43 00 87 ad [ ]*vmalog %v15,%v17,%v20,%v24
+.*: e7 f1 40 00 36 a3 [ ]*vmhg %v15,%v17,%v20
+.*: e7 f1 40 00 46 a3 [ ]*vmhq %v15,%v17,%v20
+.*: e7 f1 40 00 36 a1 [ ]*vmlhg %v15,%v17,%v20
+.*: e7 f1 40 00 46 a1 [ ]*vmlhq %v15,%v17,%v20
+.*: e7 f1 40 00 36 a2 [ ]*vmlg %v15,%v17,%v20
+.*: e7 f1 40 00 46 a2 [ ]*vmlq %v15,%v17,%v20
+.*: e7 f1 40 00 36 a6 [ ]*vmeg %v15,%v17,%v20
+.*: e7 f1 40 00 36 a4 [ ]*vmleg %v15,%v17,%v20
+.*: e7 f1 40 00 36 a7 [ ]*vmog %v15,%v17,%v20
+.*: e7 f1 40 00 36 a5 [ ]*vmlog %v15,%v17,%v20
+.*: e7 f1 40 0c d6 b2 [ ]*vd %v15,%v17,%v20,13,12
+.*: e7 f1 40 0d 26 b2 [ ]*vdf %v15,%v17,%v20,13
+.*: e7 f1 40 0d 36 b2 [ ]*vdg %v15,%v17,%v20,13
+.*: e7 f1 40 0d 46 b2 [ ]*vdq %v15,%v17,%v20,13
+.*: e7 f1 40 0c d6 b0 [ ]*vdl %v15,%v17,%v20,13,12
+.*: e7 f1 40 0d 26 b0 [ ]*vdlf %v15,%v17,%v20,13
+.*: e7 f1 40 0d 36 b0 [ ]*vdlg %v15,%v17,%v20,13
+.*: e7 f1 40 0d 46 b0 [ ]*vdlq %v15,%v17,%v20,13
+.*: e7 f1 40 0c d6 b3 [ ]*vr %v15,%v17,%v20,13,12
+.*: e7 f1 40 0d 26 b3 [ ]*vrf %v15,%v17,%v20,13
+.*: e7 f1 40 0d 36 b3 [ ]*vrg %v15,%v17,%v20,13
+.*: e7 f1 40 0d 46 b3 [ ]*vrq %v15,%v17,%v20,13
+.*: e7 f1 40 0c d6 b1 [ ]*vrl %v15,%v17,%v20,13,12
+.*: e7 f1 40 0d 26 b1 [ ]*vrlf %v15,%v17,%v20,13
+.*: e7 f1 40 0d 36 b1 [ ]*vrlg %v15,%v17,%v20,13
+.*: e7 f1 40 0d 46 b1 [ ]*vrlq %v15,%v17,%v20,13
+.*: b9 68 00 69 [ ]*clzg %r6,%r9
+.*: b9 69 00 69 [ ]*ctzg %r6,%r9
+.*: e3 69 b8 f0 fd 60 [ ]*lxab %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 62 [ ]*lxah %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 64 [ ]*lxaf %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 66 [ ]*lxag %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 68 [ ]*lxaq %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 61 [ ]*llxab %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 63 [ ]*llxah %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 65 [ ]*llxaf %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 67 [ ]*llxag %r6,-10000\(%r9,%r11\)
+.*: e3 69 b8 f0 fd 69 [ ]*llxaq %r6,-10000\(%r9,%r11\)
+.*: b9 6c b0 69 [ ]*bextg %r6,%r9,%r11
+.*: b9 6d b0 69 [ ]*bdepg %r6,%r9,%r11
+.*: b9 3e 00 69 [ ]*kimd %r6,%r9
+.*: b9 3e d0 69 [ ]*kimd %r6,%r9,13
+.*: b9 3f 00 69 [ ]*klmd %r6,%r9
+.*: b9 3f d0 69 [ ]*klmd %r6,%r9,13
+.*: e6 f1 00 d0 04 4e [ ]*vcvbq %v15,%v17,13
+.*: e6 f1 00 cf d4 4a [ ]*vcvdq %v15,%v17,253,12
+.*: e6 0f 00 00 00 5f [ ]*vtp %v15
+.*: e6 0f 0f ff d0 5f [ ]*vtp %v15,65533
+.*: e6 0f 1f ff d2 7f [ ]*vtz %v15,%v17,65533
diff --git a/gas/testsuite/gas/s390/zarch-arch15.s b/gas/testsuite/gas/s390/zarch-arch15.s
new file mode 100644
index 0000000..43be9d4
--- /dev/null
+++ b/gas/testsuite/gas/s390/zarch-arch15.s
@@ -0,0 +1,96 @@
+.text
+foo:
+ vblend %v15,%v17,%v20,%v24,13
+ vblendb %v15,%v17,%v20,%v24
+ vblendh %v15,%v17,%v20,%v24
+ vblendf %v15,%v17,%v20,%v24
+ vblendg %v15,%v17,%v20,%v24
+ vblendq %v15,%v17,%v20,%v24
+ veval %v15,%v17,%v20,%v24,253
+ vgem %v15,%v17,13
+ vgemb %v15,%v17
+ vgemh %v15,%v17
+ vgemf %v15,%v17
+ vgemg %v15,%v17
+ vgemq %v15,%v17
+ vuphg %v15,%v17
+ vuplhg %v15,%v17
+ vuplg %v15,%v17
+ vupllg %v15,%v17
+ vavgq %v15,%v17,%v20
+ vavglq %v15,%v17,%v20
+ vecq %v15,%v17
+ veclq %v15,%v17
+ vceqq %v15,%v17,%v20
+ vceqqs %v15,%v17,%v20
+ vchq %v15,%v17,%v20
+ vchqs %v15,%v17,%v20
+ vchlq %v15,%v17,%v20
+ vchlqs %v15,%v17,%v20
+ vclzq %v15,%v17
+ vctzq %v15,%v17
+ vlcq %v15,%v17
+ vlpq %v15,%v17
+ vmxq %v15,%v17,%v20
+ vmxlq %v15,%v17,%v20
+ vmnq %v15,%v17,%v20
+ vmnlq %v15,%v17,%v20
+ vmalg %v15,%v17,%v20,%v24
+ vmalq %v15,%v17,%v20,%v24
+ vmahg %v15,%v17,%v20,%v24
+ vmahq %v15,%v17,%v20,%v24
+ vmalhg %v15,%v17,%v20,%v24
+ vmalhq %v15,%v17,%v20,%v24
+ vmaeg %v15,%v17,%v20,%v24
+ vmaleg %v15,%v17,%v20,%v24
+ vmaog %v15,%v17,%v20,%v24
+ vmalog %v15,%v17,%v20,%v24
+ vmhg %v15,%v17,%v20
+ vmhq %v15,%v17,%v20
+ vmlhg %v15,%v17,%v20
+ vmlhq %v15,%v17,%v20
+ vmlg %v15,%v17,%v20
+ vmlq %v15,%v17,%v20
+ vmeg %v15,%v17,%v20
+ vmleg %v15,%v17,%v20
+ vmog %v15,%v17,%v20
+ vmlog %v15,%v17,%v20
+ vd %v15,%v17,%v20,13,12
+ vdf %v15,%v17,%v20,13
+ vdg %v15,%v17,%v20,13
+ vdq %v15,%v17,%v20,13
+ vdl %v15,%v17,%v20,13,12
+ vdlf %v15,%v17,%v20,13
+ vdlg %v15,%v17,%v20,13
+ vdlq %v15,%v17,%v20,13
+ vr %v15,%v17,%v20,13,12
+ vrf %v15,%v17,%v20,13
+ vrg %v15,%v17,%v20,13
+ vrq %v15,%v17,%v20,13
+ vrl %v15,%v17,%v20,13,12
+ vrlf %v15,%v17,%v20,13
+ vrlg %v15,%v17,%v20,13
+ vrlq %v15,%v17,%v20,13
+ clzg %r6,%r9
+ ctzg %r6,%r9
+ lxab %r6,-10000(%r9,%r11)
+ lxah %r6,-10000(%r9,%r11)
+ lxaf %r6,-10000(%r9,%r11)
+ lxag %r6,-10000(%r9,%r11)
+ lxaq %r6,-10000(%r9,%r11)
+ llxab %r6,-10000(%r9,%r11)
+ llxah %r6,-10000(%r9,%r11)
+ llxaf %r6,-10000(%r9,%r11)
+ llxag %r6,-10000(%r9,%r11)
+ llxaq %r6,-10000(%r9,%r11)
+ bextg %r6,%r9,%r11
+ bdepg %r6,%r9,%r11
+ kimd %r6,%r9
+ kimd %r6,%r9,13
+ klmd %r6,%r9
+ klmd %r6,%r9,13
+ vcvbq %v15,%v17,13
+ vcvdq %v15,%v17,253,12
+ vtp %v15
+ vtp %v15,65533
+ vtz %v15,%v17,65533
diff --git a/gas/testsuite/gas/s390/zarch-z10.d b/gas/testsuite/gas/s390/zarch-z10.d
index 4a05153..beb0578 100644
--- a/gas/testsuite/gas/s390/zarch-z10.d
+++ b/gas/testsuite/gas/s390/zarch-z10.d
@@ -359,20 +359,20 @@ Disassembly of section .text:
.*: c2 60 ff fe 79 60 [ ]*msgfi %r6,-100000
.*: e3 a6 75 b3 01 36 [ ]*pfd 10,5555\(%r6,%r7\)
*([\da-f]+): c6 a2 00 00 00 00 [ ]*pfdrl 10,\1 <foo\+0x\1>
-.*: ec 67 d2 dc e6 54 [ ]*rnsbg %r6,%r7,210,220,230
-.*: ec 67 d2 dc 00 54 [ ]*rnsbg %r6,%r7,210,220
+.*: ec 67 6e dc e6 54 [ ]*rnsbg %r6,%r7,110,220,230
+.*: ec 67 6e dc 00 54 [ ]*rnsbg %r6,%r7,110,220
.*: ec 67 92 dc e6 54 [ ]*rnsbgt %r6,%r7,18,220,230
.*: ec 67 92 dc 00 54 [ ]*rnsbgt %r6,%r7,18,220
.*: ec 67 92 1c 26 54 [ ]*rnsbgt %r6,%r7,18,28,38
.*: ec 67 92 1c 00 54 [ ]*rnsbgt %r6,%r7,18,28
-.*: ec 67 d2 dc e6 57 [ ]*rxsbg %r6,%r7,210,220,230
-.*: ec 67 d2 dc 00 57 [ ]*rxsbg %r6,%r7,210,220
+.*: ec 67 6e dc e6 57 [ ]*rxsbg %r6,%r7,110,220,230
+.*: ec 67 6e dc 00 57 [ ]*rxsbg %r6,%r7,110,220
.*: ec 67 92 dc e6 57 [ ]*rxsbgt %r6,%r7,18,220,230
.*: ec 67 92 dc 00 57 [ ]*rxsbgt %r6,%r7,18,220
.*: ec 67 92 1c 26 57 [ ]*rxsbgt %r6,%r7,18,28,38
.*: ec 67 92 1c 00 57 [ ]*rxsbgt %r6,%r7,18,28
-.*: ec 67 d2 dc e6 56 [ ]*rosbg %r6,%r7,210,220,230
-.*: ec 67 d2 dc 00 56 [ ]*rosbg %r6,%r7,210,220
+.*: ec 67 6e dc e6 56 [ ]*rosbg %r6,%r7,110,220,230
+.*: ec 67 6e dc 00 56 [ ]*rosbg %r6,%r7,110,220
.*: ec 67 92 dc e6 56 [ ]*rosbgt %r6,%r7,18,220,230
.*: ec 67 92 dc 00 56 [ ]*rosbgt %r6,%r7,18,220
.*: ec 67 92 1c 26 56 [ ]*rosbgt %r6,%r7,18,28,38
diff --git a/gas/testsuite/gas/s390/zarch-z10.s b/gas/testsuite/gas/s390/zarch-z10.s
index 45bb894..a624588 100644
--- a/gas/testsuite/gas/s390/zarch-z10.s
+++ b/gas/testsuite/gas/s390/zarch-z10.s
@@ -353,20 +353,20 @@ foo:
msgfi %r6,-100000
pfd 10,5555(%r6,%r7)
pfdrl 10,.
- rnsbg %r6,%r7,210,220,230
- rnsbg %r6,%r7,210,220
+ rnsbg %r6,%r7,110,220,230
+ rnsbg %r6,%r7,110,220
rnsbg %r6,%r7,146,220,230
rnsbg %r6,%r7,146,220
rnsbgt %r6,%r7,18,28,38
rnsbgt %r6,%r7,18,28
- rxsbg %r6,%r7,210,220,230
- rxsbg %r6,%r7,210,220
+ rxsbg %r6,%r7,110,220,230
+ rxsbg %r6,%r7,110,220
rxsbg %r6,%r7,146,220,230
rxsbg %r6,%r7,146,220
rxsbgt %r6,%r7,18,28,38
rxsbgt %r6,%r7,18,28
- rosbg %r6,%r7,210,220,230
- rosbg %r6,%r7,210,220
+ rosbg %r6,%r7,110,220,230
+ rosbg %r6,%r7,110,220
rosbg %r6,%r7,146,220,230
rosbg %r6,%r7,146,220
rosbgt %r6,%r7,18,28,38
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 2a18bcc..b821901 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -346,7 +346,6 @@ the native maintainer when resolving ABI issues.
h8300 --target=h8300-elf
i386 --target=i386-elf
- Felix Willgerodt felix.willgerodt@intel.com
ia64 --target=ia64-linux-gnu
(--target=ia64-elf broken)
@@ -422,7 +421,6 @@ the native maintainer when resolving ABI issues.
vax --target=vax-netbsd
x86-64 --target=x86_64-linux-gnu
- Felix Willgerodt felix.willgerodt@intel.com
xstormy16 --target=xstormy16-elf
xtensa --target=xtensa-elf
@@ -473,7 +471,7 @@ SystemTap Sergio Durigan Junior sergiodj@sergiodj.net
Reverse debugging / Record and Replay / Tracing:
record
- full Guinevere Larsen blarsen@redhat.com
+ full Guinevere Larsen guinevere@redhat.com
btrace Markus T. Metzger markus.t.metzger@intel.com
@@ -606,6 +604,7 @@ Mike Frysinger vapier@gentoo.org
Gary Funck gary@intrepid.com
Martin Galvan martingalvan@sourceware.org
Chen Gang gang.chen.5i5j@gmail.com
+Klaus Gerlicher klaus.gerlicher@intel.com
Mircea Gherzan mircea.gherzan@intel.com
Paul Gilliam pgilliam@us.ibm.com
Tristan Gingold tgingold@free.fr
@@ -656,7 +655,7 @@ Jan Kratochvil jan.kratochvil@redhat.com
Maxim Kuvyrkov maxim@kugelworks.com
Pierre Langlois pierre.langlois@arm.com
Jonathan Larmour jifl@ecoscentric.com
-Guinevere Larsen blarsen@redhat.com
+Guinevere Larsen guinevere@redhat.com
Jeff Law law@redhat.com
Justin Lebar justin.lebar@gmail.com
David Lecomber david@streamline-computing.com
@@ -690,7 +689,7 @@ Chris Moller cmoller@redhat.com
Patrick Monnerat patrick@monnerat.net
Phil Muldoon pmuldoon@redhat.com
Pierre Muller muller@sourceware.org
-Gaius Mulley gaius@glam.ac.uk
+Gaius Mulley gaiusmod2@gmail.com
Masaki Muranaka monaka@monami-software.com
Joseph Myers josmyers@redhat.com
Fernando Nasser fnasser@redhat.com
@@ -790,7 +789,7 @@ Ulrich Weigand uweigand@de.ibm.com
Ken Werner ken.werner@de.ibm.com
Tim Wiederhake tim.wiederhake@intel.com
Mark Wielaard mark@klomp.org
-Felix Willgerodt felix.willgerodt@intel.com
+Felix Willgerodt felix.willgerodt@gmail.com
Nathan Williams nathanw@wasabisystems.com
Bob Wilson bob.wilson@acm.org
Jim Wilson wilson@tuliptree.org
@@ -866,6 +865,7 @@ Stan Shebs (Global) stanshebs@google.com
Joel Brobecker (Global, Ada) brobecker@adacore.com
Doug Evans (Global) dje@google.com
Yao Qi (Global) qiyao@sourceware.org
+Felix Willgerodt (amd64, i386) felix.willgerodt@gmail.com
Folks that have been caught up in a paper trail:
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index bcf1ee4..ecb323d 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2528,7 +2528,7 @@ clean-po:
# rule has no dependencies and always regenerates gdb.pot. This is
# relatively harmless since the .po files do not directly depend on
# it. The .pot file is left in the build directory. Since GDB's
-# Makefile lacks a cannonical list of sources (missing xm, tm and nm
+# Makefile lacks a canonical list of sources (missing xm, tm and nm
# files) force this rule.
$(PACKAGE).pot: po/$(PACKAGE).pot
po/$(PACKAGE).pot: force
diff --git a/gdb/NEWS b/gdb/NEWS
index fa57b56..42668cb 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,18 @@
*** Changes since GDB 15
+* Debugging support for Intel MPX has been removed. This includes the
+ removal of
+ ** MPX register support
+ ** the commands "show/set mpx bound" (deprecated since GDB 15)
+ ** i386 and amd64 implementation of the hooks report_signal_info and
+ get_siginfo_type.
+
+* GDB now supports printing of asynchronous events from the Intel Processor
+ Trace during 'record instruction-history', 'record function-call-history'
+ and all stepping commands. This can be controlled with the new
+ "set record btrace pt event-tracing" command.
+
* GDB now supports printing of ptwrite payloads from the Intel Processor
Trace during 'record instruction-history', 'record function-call-history'
and all stepping commands. The payload is also accessible in Python as a
@@ -21,20 +33,6 @@
inferior containing the thread of interest. The breakpoint will
be hit no less than before.
-* Python API
-
- ** Added gdb.record.clear. Clears the trace data of the current recording.
- This forces re-decoding of the trace for successive commands.
-
-* Debugger Adapter Protocol changes
-
- ** The "scopes" request will now return a scope holding global
- variables from the stack frame's compilation unit.
-
- ** The "scopes" request will return a "returnValue" scope holding
- the return value from the latest "stepOut" command, when
- appropriate.
-
* For ARM targets, the offset of the pc in the jmp_buf has been fixed to match
glibc 2.20 and later. This should only matter when not using libc probes.
This may cause breakage when using an incompatible libc, like uclibc or
@@ -51,8 +49,27 @@
history has been reached. It also specifies that the forward execution can
continue, and the recording will also continue.
+* Python API
+
+ ** Added gdb.record.clear. Clears the trace data of the current recording.
+ This forces re-decoding of the trace for successive commands.
+
+* Debugger Adapter Protocol changes
+
+ ** The "scopes" request will now return a scope holding global
+ variables from the stack frame's compilation unit.
+
+ ** The "scopes" request will return a "returnValue" scope holding
+ the return value from the latest "stepOut" command, when
+ appropriate.
+
* New commands
+set style line-number foreground COLOR
+set style line-number background COLOR
+set style line-number intensity VALUE
+ Control the styling of line numbers printed by GDB.
+
maintenance info inline-frames [ADDRESS]
New command which displays GDB's inline-frame information for the
current address, or for ADDRESS if specified. The output identifies
@@ -85,6 +102,11 @@ save gdb-index
it contains white space or quote characters. If the argument
contains no such special characters then quoting is not required.
+maintenance print remote-registers
+ Add an "Expedited" column to the output of the command. It indicates
+ which registers were included in the last stop reply packet received by
+ GDB.
+
* New remote packets
vFile:stat
@@ -387,7 +409,7 @@ qIsAddressTagged
* The printf command now accepts a '%V' output format which will
format an expression just as the 'print' command would. Print
- options can be placed withing '[...]' after the '%V' to modify how
+ options can be placed within '[...]' after the '%V' to modify how
the value is printed. E.g:
printf "%V", some_array
printf "%V[-array-indexes on]", some_array
@@ -6664,7 +6686,7 @@ qSupported:
target.
qXfer:auxv:read:
- Fetch an OS auxilliary vector from the remote stub. This packet is a
+ Fetch an OS auxiliary vector from the remote stub. This packet is a
more efficient replacement for qPart:auxv:read.
qXfer:memory-map:read:
@@ -7872,7 +7894,7 @@ with that. The sub-program to run is specified using the syntax
* MIPS 64 remote protocol
A long standing bug in the mips64 remote protocol where by GDB
-expected certain 32 bit registers (ex SR) to be transfered as 32
+expected certain 32 bit registers (ex SR) to be transferred as 32
instead of 64 bits has been fixed.
The command ``set remote-mips64-transfers-32bit-regs on'' has been
@@ -8628,7 +8650,7 @@ MIPS remote debugging protocol.
This version includes preliminary support for Chill, a Pascal like language
used by telecommunications companies. Chill support is also being integrated
-into the GNU compiler, but we don't know when it will be publically available.
+into the GNU compiler, but we don't know when it will be publicly available.
*** Changes in GDB-4.8:
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index b9f84ee..ed8ed44 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1477,7 +1477,7 @@ block_lookup (const struct block *context, const char *raw_name)
if (context == NULL
&& (syms.empty () || syms[0].symbol->aclass () != LOC_BLOCK))
- symtab = lookup_symtab (name);
+ symtab = lookup_symtab (current_program_space, name);
else
symtab = NULL;
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 14d6abd..d14a556 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -201,7 +201,8 @@ static symbol_name_matcher_ftype *ada_get_symbol_name_matcher
static int symbols_are_identical_enums
(const std::vector<struct block_symbol> &syms);
-static int ada_identical_enum_types_p (struct type *type1, struct type *type2);
+static bool ada_identical_enum_types_p (struct type *type1,
+ struct type *type2);
/* The character set used for source files. */
@@ -1487,7 +1488,7 @@ ada_decode (const char *encoded, bool wrap, bool operators, bool wide)
if (i < len0 + 3
&& encoded[i] == 'N' && encoded[i+1] == '_' && encoded[i+2] == '_')
{
- /* Backtrack a bit up until we reach either the begining of
+ /* Backtrack a bit up until we reach either the beginning of
the encoded name, or "__". Make sure that we only find
digits or lowercase characters. */
const char *ptr = encoded + i - 1;
@@ -3697,9 +3698,11 @@ See set/show multiple-symbol."));
gdb_printf ("[%d] ", i + first_choice);
ada_print_symbol_signature (gdb_stdout, syms[i].symbol,
&type_print_raw_options);
- gdb_printf (_(" at %s:%d\n"),
- symtab_to_filename_for_display (symtab),
- syms[i].symbol->line ());
+ gdb_printf (_(" at %ps:%ps\n"),
+ styled_string (file_name_style.style (),
+ symtab_to_filename_for_display (symtab)),
+ styled_string (line_number_style.style (),
+ pulongest (syms[i].symbol->line ())));
}
else if (is_enumeral
&& syms[i].symbol->type ()->name () != NULL)
@@ -3718,9 +3721,10 @@ See set/show multiple-symbol."));
if (symtab != NULL)
gdb_printf (is_enumeral
- ? _(" in %s (enumeral)\n")
- : _(" at %s:?\n"),
- symtab_to_filename_for_display (symtab));
+ ? _(" in %ps (enumeral)\n")
+ : _(" at %ps:?\n"),
+ styled_string (file_name_style.style (),
+ symtab_to_filename_for_display (symtab)));
else
gdb_printf (is_enumeral
? _(" (enumeral)\n")
@@ -3813,8 +3817,6 @@ ada_resolve_enum (std::vector<struct block_symbol> &syms,
for (int i = 0; i < syms.size (); ++i)
{
struct type *type2 = ada_check_typedef (syms[i].symbol->type ());
- if (type1->num_fields () != type2->num_fields ())
- continue;
if (strcmp (type1->name (), type2->name ()) != 0)
continue;
if (ada_identical_enum_types_p (type1, type2))
@@ -4965,31 +4967,31 @@ is_nondebugging_type (struct type *type)
return (name != NULL && strcmp (name, "<variable, no debug info>") == 0);
}
-/* Return nonzero if TYPE1 and TYPE2 are two enumeration types
+/* Return true if TYPE1 and TYPE2 are two enumeration types
that are deemed "identical" for practical purposes.
This function assumes that TYPE1 and TYPE2 are both TYPE_CODE_ENUM
- types and that their number of enumerals is identical (in other
- words, type1->num_fields () == type2->num_fields ()). */
+ types. */
-static int
+static bool
ada_identical_enum_types_p (struct type *type1, struct type *type2)
{
- int i;
-
/* The heuristic we use here is fairly conservative. We consider
that 2 enumerate types are identical if they have the same
number of enumerals and that all enumerals have the same
underlying value and name. */
+ if (type1->num_fields () != type2->num_fields ())
+ return false;
+
/* All enums in the type should have an identical underlying value. */
- for (i = 0; i < type1->num_fields (); i++)
+ for (int i = 0; i < type1->num_fields (); i++)
if (type1->field (i).loc_enumval () != type2->field (i).loc_enumval ())
- return 0;
+ return false;
/* All enumerals should also have the same name (modulo any numerical
suffix). */
- for (i = 0; i < type1->num_fields (); i++)
+ for (int i = 0; i < type1->num_fields (); i++)
{
const char *name_1 = type1->field (i).name ();
const char *name_2 = type2->field (i).name ();
@@ -4999,10 +5001,10 @@ ada_identical_enum_types_p (struct type *type1, struct type *type2)
ada_remove_trailing_digits (name_1, &len_1);
ada_remove_trailing_digits (name_2, &len_2);
if (len_1 != len_2 || strncmp (name_1, name_2, len_1) != 0)
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/* Return nonzero if all the symbols in SYMS are all enumeral symbols
@@ -5047,12 +5049,6 @@ symbols_are_identical_enums (const std::vector<struct block_symbol> &syms)
if (syms[i].symbol->value_longest () != syms[0].symbol->value_longest ())
return 0;
- /* Quick check: They should all have the same number of enumerals. */
- for (i = 1; i < syms.size (); i++)
- if (syms[i].symbol->type ()->num_fields ()
- != syms[0].symbol->type ()->num_fields ())
- return 0;
-
/* All the sanity checks passed, so we might have a set of
identical enumeration types. Perform a more complete
comparison of the type of each symbol. */
@@ -5825,8 +5821,8 @@ is_name_suffix (const char *str)
/* ??? We should not modify STR directly, as we are doing below. This
is fine in this case, but may become problematic later if we find
that this alternative did not work, and want to try matching
- another one from the begining of STR. Since we modified it, we
- won't be able to find the begining of the string anymore! */
+ another one from the beginning of STR. Since we modified it, we
+ won't be able to find the beginning of the string anymore! */
if (str[0] == 'X')
{
str += 1;
@@ -10779,7 +10775,7 @@ ada_unop_atr_operation::evaluate (struct type *expect_type,
struct type *type_arg = nullptr;
value *val = nullptr;
- if (std::get<0> (m_storage)->opcode () == OP_TYPE)
+ if (std::get<0> (m_storage)->type_p ())
{
value *tem = std::get<0> (m_storage)->evaluate (nullptr, exp,
EVAL_AVOID_SIDE_EFFECTS);
@@ -13055,7 +13051,12 @@ ada_add_global_exceptions (compiled_regex *preg,
},
NULL,
SEARCH_GLOBAL_BLOCK | SEARCH_STATIC_BLOCK,
- SEARCH_VAR_DOMAIN);
+ SEARCH_VAR_DOMAIN,
+ [&] (enum language lang)
+ {
+ /* Try to skip non-Ada CUs. */
+ return lang == language_ada;
+ });
/* Iterate over all objfiles irrespective of scope or linker namespaces
so we get all exceptions anywhere in the progspace. */
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 136e6dd..3fe0c2e 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -510,7 +510,7 @@ processReal (struct parser_state *par_state, const char *num0)
encoded and the resulting name is equal to it. Similarly, if the name
starts with '<', it is copied verbatim. Otherwise, it differs
from NAME0 in that:
- + Characters between '...' are transfered verbatim to yylval.ssym.
+ + Characters between '...' are transferred verbatim to yylval.ssym.
+ Trailing "'" characters in quoted sequences are removed (a leading quote is
preserved to indicate that the name is not to be GNAT-encoded).
+ Unquoted whitespace is removed.
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 01ee2fb..d050b26 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -266,7 +266,7 @@ struct ada_tasks_inferior_data
reference it - this number is printed beside each task in the tasks
info listing displayed by "info tasks". This number is equal to
its index in the vector + 1. Reciprocally, to compute the index
- of a task in the vector, we need to substract 1 from its number. */
+ of a task in the vector, we need to subtract 1 from its number. */
std::vector<ada_task_info> task_list;
};
diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index b9a0f77..696a7dc 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -354,7 +354,9 @@ addrmap_mutable::~addrmap_mutable ()
/* See addrmap.h. */
void
-addrmap_dump (struct addrmap *map, struct ui_file *outfile, void *payload)
+addrmap_dump (struct addrmap *map, struct ui_file *outfile, void *payload,
+ gdb::function_view<void (struct ui_file *outfile,
+ const void *value)> annotate_value)
{
/* True if the previously printed addrmap entry was for PAYLOAD.
If so, we want to print the next one as well (since the next
@@ -373,10 +375,16 @@ addrmap_dump (struct addrmap *map, struct ui_file *outfile, void *payload)
addr_str = "<ends here>";
if (matches || previous_matched)
- gdb_printf (outfile, " %s%s %s\n",
- payload != nullptr ? " " : "",
- core_addr_to_string (start_addr),
- addr_str);
+ {
+ gdb_printf (outfile, " %s%s %s",
+ payload != nullptr ? " " : "",
+ core_addr_to_string (start_addr),
+ addr_str);
+ if (annotate_value != nullptr)
+ annotate_value (outfile, obj);
+
+ gdb_printf (outfile, "\n");
+ }
previous_matched = matches;
diff --git a/gdb/addrmap.h b/gdb/addrmap.h
index abd1ee3..85d4645 100644
--- a/gdb/addrmap.h
+++ b/gdb/addrmap.h
@@ -219,8 +219,13 @@ private:
/* Dump the addrmap to OUTFILE. If PAYLOAD is non-NULL, only dump any
components that map to PAYLOAD. (If PAYLOAD is NULL, the entire
- map is dumped.) */
+ map is dumped.) If ANNOTATE_VALUE is non-nullptr, call it for each
+ value. */
+
void addrmap_dump (struct addrmap *map, struct ui_file *outfile,
- void *payload);
+ void *payload,
+ gdb::function_view<void (struct ui_file *outfile,
+ const void *value)>
+ annotate_value = nullptr);
#endif /* ADDRMAP_H */
diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
index 0423abb..4554ac0 100644
--- a/gdb/alpha-tdep.h
+++ b/gdb/alpha-tdep.h
@@ -99,7 +99,7 @@ struct alpha_gdbarch_tdep : gdbarch_tdep_base
int sc_fpregs_offset = 0;
int jb_pc = 0; /* Offset to PC value in jump buffer.
- If htis is negative, longjmp support
+ If this is negative, longjmp support
will be disabled. */
size_t jb_elt_size = 0; /* And the size of each entry in the buf. */
};
diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c
index e9c5a47..2bb79ac 100644
--- a/gdb/amd-dbgapi-target.c
+++ b/gdb/amd-dbgapi-target.c
@@ -483,12 +483,12 @@ struct amd_dbgapi_target_breakpoint : public code_breakpoint
disposition = disp_donttouch;
}
- void re_set () override;
+ void re_set (program_space *) override;
void check_status (struct bpstat *bs) override;
};
void
-amd_dbgapi_target_breakpoint::re_set ()
+amd_dbgapi_target_breakpoint::re_set (program_space *)
{
/* Nothing. */
}
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index 823c1f7..742fc81 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -79,6 +79,8 @@ static int amd64_linux_gregset32_reg_offset[] =
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ /* MPX is deprecated. Yet we keep this to not give the registers below
+ a new number. That could break older gdbservers. */
-1, -1, -1, -1, /* MPX registers BND0 ... BND3. */
-1, -1, /* MPX registers BNDCFGU, BNDSTATUS. */
-1, -1, -1, -1, -1, -1, -1, -1, /* k0 ... k7 (AVX512) */
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index d7662ca..77de821 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -86,6 +86,8 @@ int amd64_linux_gregset_reg_offset[] =
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ /* MPX is deprecated. Yet we keep this to not give the registers below
+ a new number. That could break older gdbservers. */
-1, -1, -1, -1, /* MPX registers BND0 ... BND3. */
-1, -1, /* MPX registers BNDCFGU and BNDSTATUS. */
-1, -1, -1, -1, -1, -1, -1, -1, /* xmm16 ... xmm31 (AVX512) */
@@ -1816,9 +1818,6 @@ amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch,
set_gdbarch_process_record (gdbarch, i386_process_record);
set_gdbarch_process_record_signal (gdbarch, amd64_linux_record_signal);
-
- set_gdbarch_get_siginfo_type (gdbarch, x86_linux_get_siginfo_type);
- set_gdbarch_report_signal_info (gdbarch, i386_linux_report_signal_info);
}
static void
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index df6b882..b63e35d 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -110,11 +110,6 @@ static const char * const amd64_ymmh_avx512_names[] =
"ymm28h", "ymm29h", "ymm30h", "ymm31h"
};
-static const char * const amd64_mpx_names[] =
-{
- "bnd0raw", "bnd1raw", "bnd2raw", "bnd3raw", "bndcfgu", "bndstatus"
-};
-
static const char * const amd64_k_names[] =
{
"k0", "k1", "k2", "k3",
@@ -1039,13 +1034,6 @@ amd64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte buf[8];
- /* BND registers can be in arbitrary values at the moment of the
- inferior call. This can cause boundary violations that are not
- due to a real bug or even desired by the user. The best to be done
- is set the BND registers to allow access to the whole memory, INIT
- state, before pushing the inferior call. */
- i387_reset_bnd_regs (gdbarch, regcache);
-
/* Pass arguments. */
sp = amd64_push_arguments (regcache, nargs, args, sp, return_method);
@@ -3196,13 +3184,6 @@ amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch,
tdep->ymm0h_regnum = AMD64_YMM0H_REGNUM;
}
- if (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.mpx") != NULL)
- {
- tdep->mpx_register_names = amd64_mpx_names;
- tdep->bndcfgu_regnum = AMD64_BNDCFGU_REGNUM;
- tdep->bnd0r_regnum = AMD64_BND0R_REGNUM;
- }
-
if (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.segments") != NULL)
{
tdep->fsbase_regnum = AMD64_FSBASE_REGNUM;
@@ -3377,11 +3358,10 @@ const struct target_desc *
amd64_target_description (uint64_t xcr0, bool segments)
{
static target_desc *amd64_tdescs \
- [2/*AVX*/][2/*MPX*/][2/*AVX512*/][2/*PKRU*/][2/*segments*/] = {};
+ [2/*AVX*/][2/*AVX512*/][2/*PKRU*/][2/*segments*/] = {};
target_desc **tdesc;
tdesc = &amd64_tdescs[(xcr0 & X86_XSTATE_AVX) ? 1 : 0]
- [(xcr0 & X86_XSTATE_MPX) ? 1 : 0]
[(xcr0 & X86_XSTATE_AVX512) ? 1 : 0]
[(xcr0 & X86_XSTATE_PKRU) ? 1 : 0]
[segments ? 1 : 0];
diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h
index 696c65b..544ed91 100644
--- a/gdb/amd64-tdep.h
+++ b/gdb/amd64-tdep.h
@@ -66,6 +66,8 @@ enum amd64_regnum
AMD64_MXCSR_REGNUM = AMD64_XMM0_REGNUM + 16,
AMD64_YMM0H_REGNUM, /* %ymm0h */
AMD64_YMM15H_REGNUM = AMD64_YMM0H_REGNUM + 15,
+ /* MPX is deprecated. Yet we keep this to not give the registers below
+ a new number. That could break older gdbservers. */
AMD64_BND0R_REGNUM = AMD64_YMM15H_REGNUM + 1,
AMD64_BND3R_REGNUM = AMD64_BND0R_REGNUM + 3,
AMD64_BNDCFGU_REGNUM,
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index 5adc7d5..29a1f60 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -324,7 +324,7 @@ amd64_windows_push_dummy_call
/* Pass "hidden" argument". */
if (return_method == return_method_struct)
{
- /* The "hidden" argument is passed throught the first argument
+ /* The "hidden" argument is passed through the first argument
register. */
const int arg_regnum = amd64_windows_dummy_call_integer_regs[0];
diff --git a/gdb/arc-linux-tdep.c b/gdb/arc-linux-tdep.c
index 01c591f..69980f9 100644
--- a/gdb/arc-linux-tdep.c
+++ b/gdb/arc-linux-tdep.c
@@ -428,7 +428,7 @@ arc_linux_software_single_step (struct regcache *regcache)
CORE_ADDR next_pc = arc_insn_get_linear_next_pc (curr_insn);
std::vector<CORE_ADDR> next_pcs;
- /* For instructions with delay slots, the fall thru is not the
+ /* For instructions with delay slots, the fall through is not the
instruction immediately after the current instruction, but the one
after that. */
if (curr_insn.has_delay_slot)
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index 4fc1ea1..9adf295 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -1438,7 +1438,7 @@ arc_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR entrypoint,
1) Store instruction for each callee-saved register (R25 - R13 + 1)
2) Two instructions for FP
3) One for BLINK
- 4) Three substract instructions for SP (for variadic args, for
+ 4) Three subtract instructions for SP (for variadic args, for
callee saved regs and for local vars) and assuming that those SUB use
long-immediate (hence double length).
5) Stores of arguments registers are considered part of prologue too
@@ -2117,7 +2117,7 @@ arc_check_tdesc_feature (struct tdesc_arch_data *tdesc_data,
return true;
}
-/* Check for the existance of "lp_start" and "lp_end" in target description.
+/* Check for the existence of "lp_start" and "lp_end" in target description.
If both are present, assume there is hardware loop support in the target.
This can be improved by looking into "lpc_size" field of "isa_config"
auxiliary register. */
diff --git a/gdb/arch/amd64.c b/gdb/arch/amd64.c
index 94d55d7..5fc9947 100644
--- a/gdb/arch/amd64.c
+++ b/gdb/arch/amd64.c
@@ -17,13 +17,13 @@
#include "amd64.h"
#include "gdbsupport/x86-xstate.h"
+#include "gdbsupport/osabi.h"
#include <stdlib.h>
#include "../features/i386/64bit-avx.c"
#include "../features/i386/64bit-avx512.c"
#include "../features/i386/64bit-core.c"
#include "../features/i386/64bit-linux.c"
-#include "../features/i386/64bit-mpx.c"
#include "../features/i386/64bit-segments.c"
#include "../features/i386/64bit-sse.c"
#include "../features/i386/pkeys.c"
@@ -46,7 +46,7 @@ amd64_create_target_description (uint64_t xcr0, bool is_x32, bool is_linux,
is_x32 ? "i386:x64-32" : "i386:x86-64");
if (is_linux)
- set_tdesc_osabi (tdesc.get (), "GNU/Linux");
+ set_tdesc_osabi (tdesc.get (), GDB_OSABI_LINUX);
#endif
long regnum = 0;
@@ -65,13 +65,6 @@ amd64_create_target_description (uint64_t xcr0, bool is_x32, bool is_linux,
if (xcr0 & X86_XSTATE_AVX)
regnum = create_feature_i386_64bit_avx (tdesc.get (), regnum);
- if (xcr0 & X86_XSTATE_MPX)
- {
- /* MPX is not available on x32. */
- gdb_assert (!is_x32);
- regnum = create_feature_i386_64bit_mpx (tdesc.get (), regnum);
- }
-
if (xcr0 & X86_XSTATE_AVX512)
regnum = create_feature_i386_64bit_avx512 (tdesc.get (), regnum);
diff --git a/gdb/arch/i386.c b/gdb/arch/i386.c
index f3165c5..2072eae 100644
--- a/gdb/arch/i386.c
+++ b/gdb/arch/i386.c
@@ -18,6 +18,7 @@
#include "i386.h"
#include "gdbsupport/tdesc.h"
#include "gdbsupport/x86-xstate.h"
+#include "gdbsupport/osabi.h"
#include <stdlib.h>
#include "../features/i386/32bit-core.c"
@@ -25,7 +26,6 @@
#include "../features/i386/32bit-sse.c"
#include "../features/i386/32bit-avx.c"
#include "../features/i386/32bit-avx512.c"
-#include "../features/i386/32bit-mpx.c"
#include "../features/i386/32bit-segments.c"
#include "../features/i386/pkeys.c"
@@ -39,7 +39,7 @@ i386_create_target_description (uint64_t xcr0, bool is_linux, bool segments)
#ifndef IN_PROCESS_AGENT
set_tdesc_architecture (tdesc.get (), "i386");
if (is_linux)
- set_tdesc_osabi (tdesc.get (), "GNU/Linux");
+ set_tdesc_osabi (tdesc.get (), GDB_OSABI_LINUX);
#endif
long regnum = 0;
@@ -59,9 +59,6 @@ i386_create_target_description (uint64_t xcr0, bool is_linux, bool segments)
if (xcr0 & X86_XSTATE_AVX)
regnum = create_feature_i386_32bit_avx (tdesc.get (), regnum);
- if (xcr0 & X86_XSTATE_MPX)
- regnum = create_feature_i386_32bit_mpx (tdesc.get (), regnum);
-
if (xcr0 & X86_XSTATE_AVX512)
regnum = create_feature_i386_32bit_avx512 (tdesc.get (), regnum);
diff --git a/gdb/arch/tic6x.c b/gdb/arch/tic6x.c
index 680a794..b8a722b 100644
--- a/gdb/arch/tic6x.c
+++ b/gdb/arch/tic6x.c
@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "gdbsupport/tdesc.h"
+#include "gdbsupport/osabi.h"
#include "tic6x.h"
#include "../features/tic6x-core.c"
@@ -30,7 +31,7 @@ tic6x_create_target_description (enum c6x_feature feature)
target_desc_up tdesc = allocate_target_description ();
set_tdesc_architecture (tdesc.get (), "tic6x");
- set_tdesc_osabi (tdesc.get (), "GNU/Linux");
+ set_tdesc_osabi (tdesc.get (), GDB_OSABI_LINUX);
long regnum = 0;
diff --git a/gdb/arch/x86-linux-tdesc-features.c b/gdb/arch/x86-linux-tdesc-features.c
index ad1d919..f6eb112 100644
--- a/gdb/arch/x86-linux-tdesc-features.c
+++ b/gdb/arch/x86-linux-tdesc-features.c
@@ -65,7 +65,6 @@ static constexpr x86_xstate_feature x86_linux_all_xstate_features[] = {
{ X86_XSTATE_PKRU, true, true, true },
{ X86_XSTATE_AVX512, true, true, true },
{ X86_XSTATE_AVX, true, true, true },
- { X86_XSTATE_MPX, true, true, false },
{ X86_XSTATE_SSE, true, false, false },
{ X86_XSTATE_X87, true, false, false }
};
@@ -150,9 +149,9 @@ x86_linux_xcr0_to_tdesc_idx (uint64_t xcr0)
the target descriptions (see nat/x86-linux-tdesc.c), the feature order
represents the bit order within the generated index number.
- i386 | x87 sse mpx avx avx512 pkru
- amd64 | mpx avx avx512 pkru
- i32 | avx avx512 pkru
+ i386 | x87 sse avx avx512 pkru
+ amd64 | avx avx512 pkru
+ i32 | avx avx512 pkru
The features are ordered so that for each mode (i386, amd64, i32) the
generated index will form a continuous range. */
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 6b235a0..9c996b8 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -4857,7 +4857,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
si = pop_stack_item (si);
}
- /* Finally, update teh SP register. */
+ /* Finally, update the SP register. */
regcache_cooked_write_unsigned (regcache, ARM_SP_REGNUM, sp);
return sp;
@@ -12139,7 +12139,7 @@ arm_record_ld_st_imm_offset (arm_insn_decode_record *arm_insn_r)
record_buf[arm_insn_r->reg_rec_count++] = reg_dest;
/* The LDR instruction is capable of doing branching. If MOV LR, PC
- preceeds a LDR instruction having R15 as reg_base, it
+ precedes a LDR instruction having R15 as reg_base, it
emulates a branch and link instruction, and hence we need to save
CPSR and PC as well. */
if (ARM_PC_REGNUM == reg_dest)
@@ -12263,7 +12263,7 @@ arm_record_ld_st_reg_offset (arm_insn_decode_record *arm_insn_r)
if (15 == reg_src2)
{
/* If R15 was used as Rn, hence current PC+8. */
- /* Pre-indexed mode doesnt reach here ; illegal insn. */
+ /* Pre-indexed mode doesn't reach here ; illegal insn. */
u_regval[0] = u_regval[0] + 8;
}
/* Calculate target store address, Rn +/- Rm, register offset. */
@@ -12576,7 +12576,7 @@ arm_record_b_bl (arm_insn_decode_record *arm_insn_r)
/* Handle B, BL, BLX(1) insns. */
/* B simply branches so we do nothing here. */
- /* Note: BLX(1) doesnt fall here but instead it falls into
+ /* Note: BLX(1) doesn't fall here but instead it falls into
extension space. */
if (bit (arm_insn_r->arm_insn, 24))
{
diff --git a/gdb/auxv.c b/gdb/auxv.c
index 8bcd347..c831b2b 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -328,7 +328,7 @@ parse_auxv (target_ops *ops, gdbarch *gdbarch, const gdb_byte **readptr,
/* Auxiliary Vector information structure. This is used by GDB
for caching purposes for each inferior. This helps reduce the
- overhead of transfering data from a remote target to the local host. */
+ overhead of transferring data from a remote target to the local host. */
struct auxv_info
{
std::optional<gdb::byte_vector> data;
diff --git a/gdb/break-cond-parse.c b/gdb/break-cond-parse.c
index f5fe308..b2b1324 100644
--- a/gdb/break-cond-parse.c
+++ b/gdb/break-cond-parse.c
@@ -478,6 +478,7 @@ create_breakpoint_parse_arg_string
for (const token &t : tokens)
{
+ std::string tok_value (t.get_value ());
switch (t.get_type ())
{
case token::type::FORCE:
@@ -490,9 +491,7 @@ create_breakpoint_parse_arg_string
if (task != -1 || inferior != -1)
error ("You can specify only one of thread, inferior, or task.");
const char *tmptok;
- thread_info *thr
- = parse_thread_id (std::string (t.get_value ()).c_str (),
- &tmptok);
+ thread_info *thr = parse_thread_id (tok_value.c_str (), &tmptok);
gdb_assert (*tmptok == '\0');
thread = thr->global_num;
}
@@ -504,8 +503,7 @@ create_breakpoint_parse_arg_string
if (task != -1 || thread != -1)
error ("You can specify only one of thread, inferior, or task.");
char *tmptok;
- long inferior_id
- = strtol (std::string (t.get_value ()).c_str (), &tmptok, 0);
+ long inferior_id = strtol (tok_value.c_str (), &tmptok, 0);
if (*tmptok != '\0')
error (_("Junk '%s' after inferior keyword."), tmptok);
if (inferior_id > INT_MAX)
@@ -523,8 +521,7 @@ create_breakpoint_parse_arg_string
if (inferior != -1 || thread != -1)
error ("You can specify only one of thread, inferior, or task.");
char *tmptok;
- long task_id
- = strtol (std::string (t.get_value ()).c_str (), &tmptok, 0);
+ long task_id = strtol (tok_value.c_str (), &tmptok, 0);
if (*tmptok != '\0')
error (_("Junk '%s' after task keyword."), tmptok);
if (task_id > INT_MAX)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 7fd50ba..4cf6857 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1578,10 +1578,20 @@ breakpoint_set_thread (struct breakpoint *b, int thread)
/* If the program space has changed for this breakpoint, then
re-evaluate it's locations. */
if (old_pspace != new_pspace)
- breakpoint_re_set_one (b, new_pspace);
+ {
+ /* The breakpoint is now associated with a completely different
+ program space. Discard all of the current locations and then
+ re-set the breakpoint in the new program space, this will
+ create the new locations. */
+ b->clear_locations ();
+ breakpoint_re_set_one (b, new_pspace);
+ }
- /* Let others know the breakpoint has changed. */
- notify_breakpoint_modified (b);
+ /* If the program space didn't change, or the breakpoint didn't
+ acquire any new locations after the clear_locations call, then we
+ need to notify of the breakpoint modification now. */
+ if (old_pspace == new_pspace || !b->has_locations ())
+ notify_breakpoint_modified (b);
}
}
@@ -1625,9 +1635,20 @@ breakpoint_set_inferior (struct breakpoint *b, int inferior)
}
if (old_pspace != new_pspace)
- breakpoint_re_set_one (b, new_pspace);
+ {
+ /* The breakpoint is now associated with a completely different
+ program space. Discard all of the current locations and then
+ re-set the breakpoint in the new program space, this will
+ create the new locations. */
+ b->clear_locations ();
+ breakpoint_re_set_one (b, new_pspace);
+ }
- notify_breakpoint_modified (b);
+ /* If the program space didn't change, or the breakpoint didn't
+ acquire any new locations after the clear_locations call, then we
+ need to notify of the breakpoint modification now. */
+ if (old_pspace == new_pspace || !b->has_locations ())
+ notify_breakpoint_modified (b);
}
}
@@ -6371,7 +6392,8 @@ print_breakpoint_location (const breakpoint *b, const bp_location *loc)
if (uiout->is_mi_like_p ())
uiout->field_string ("fullname", symtab_to_fullname (loc->symtab));
- uiout->field_signed ("line", loc->line_number);
+ uiout->field_signed ("line", loc->line_number,
+ line_number_style.style ());
}
else if (loc)
{
@@ -10458,45 +10480,6 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
'wp_frame'. */
frame_id watchpoint_frame = get_frame_id (wp_frame);
- /* If the expression is "local", then set up a "watchpoint scope"
- breakpoint at the point where we've left the scope of the watchpoint
- expression. Create the scope breakpoint before the watchpoint, so
- that we will encounter it first in bpstat_stop_status. */
- if (exp_valid_block != NULL && wp_frame != NULL)
- {
- frame_id caller_frame_id = frame_unwind_caller_id (wp_frame);
-
- if (frame_id_p (caller_frame_id))
- {
- gdbarch *caller_arch = frame_unwind_caller_arch (wp_frame);
- CORE_ADDR caller_pc = frame_unwind_caller_pc (wp_frame);
-
- scope_breakpoint
- = create_internal_breakpoint (caller_arch, caller_pc,
- bp_watchpoint_scope);
-
- /* create_internal_breakpoint could invalidate WP_FRAME. */
- wp_frame = NULL;
-
- scope_breakpoint->enable_state = bp_enabled;
-
- /* Automatically delete the breakpoint when it hits. */
- scope_breakpoint->disposition = disp_del;
-
- /* Only break in the proper frame (help with recursion). */
- scope_breakpoint->frame_id = caller_frame_id;
-
- /* Set the address at which we will stop. */
- bp_location &loc = scope_breakpoint->first_loc ();
- loc.gdbarch = caller_arch;
- loc.requested_address = caller_pc;
- loc.address
- = adjust_breakpoint_address (loc.gdbarch, loc.requested_address,
- scope_breakpoint->type,
- current_program_space);
- }
- }
-
/* Now set up the breakpoint. We create all watchpoints as hardware
watchpoints here even if hardware watchpoints are turned off, a call
to update_watchpoint later in this function will cause the type to
@@ -10567,14 +10550,6 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
w->watchpoint_thread = null_ptid;
}
- if (scope_breakpoint != NULL)
- {
- /* The scope breakpoint is related to the watchpoint. We will
- need to act on them together. */
- w->related_breakpoint = scope_breakpoint;
- scope_breakpoint->related_breakpoint = w.get ();
- }
-
if (!just_location)
value_free_to_mark (mark);
@@ -10582,7 +10557,60 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
that should be inserted. */
update_watchpoint (w.get (), true /* reparse */);
+ /* If the expression is "local", then set up a "watchpoint scope"
+ breakpoint at the point where we've left the scope of the watchpoint
+ expression. Create the scope breakpoint before the watchpoint, so
+ that we will encounter it first in bpstat_stop_status. */
+ if (exp_valid_block != nullptr && wp_frame != nullptr)
+ {
+ frame_id caller_frame_id = frame_unwind_caller_id (wp_frame);
+
+ if (frame_id_p (caller_frame_id))
+ {
+ gdbarch *caller_arch = frame_unwind_caller_arch (wp_frame);
+ CORE_ADDR caller_pc = frame_unwind_caller_pc (wp_frame);
+
+ scope_breakpoint
+ = create_internal_breakpoint (caller_arch, caller_pc,
+ bp_watchpoint_scope);
+
+ /* create_internal_breakpoint could invalidate WP_FRAME. */
+ wp_frame = nullptr;
+
+ scope_breakpoint->enable_state = bp_enabled;
+
+ /* Automatically delete the breakpoint when it hits. */
+ scope_breakpoint->disposition = disp_del;
+
+ /* Only break in the proper frame (help with recursion). */
+ scope_breakpoint->frame_id = caller_frame_id;
+
+ /* Set the address at which we will stop. */
+ bp_location &loc = scope_breakpoint->first_loc ();
+ loc.gdbarch = caller_arch;
+ loc.requested_address = caller_pc;
+ loc.address
+ = adjust_breakpoint_address (loc.gdbarch, loc.requested_address,
+ scope_breakpoint->type,
+ current_program_space);
+ }
+ }
+
+ if (scope_breakpoint != nullptr)
+ {
+ /* The scope breakpoint is related to the watchpoint. We will
+ need to act on them together. */
+ w->related_breakpoint = scope_breakpoint;
+ scope_breakpoint->related_breakpoint = w.get ();
+ }
+
+ /* Verify that the scope breakpoint comes before the watchpoint in the
+ breakpoint chain. */
+ gdb_assert (scope_breakpoint == nullptr
+ || &breakpoint_chain.back () == scope_breakpoint);
+ watchpoint *watchpoint_ptr = w.get ();
install_breakpoint (internal, std::move (w), 1);
+ gdb_assert (&breakpoint_chain.back () == watchpoint_ptr);
}
/* Return count of debug registers needed to watch the given expression.
@@ -11076,7 +11104,7 @@ clear_command (const char *arg, int from_tty)
}
}
- /* Now go thru the 'found' chain and delete them. */
+ /* Now go through the 'found' chain and delete them. */
if (found.empty ())
{
if (arg)
@@ -11799,10 +11827,11 @@ code_breakpoint::say_where () const
{
const char *filename
= symtab_to_filename_for_display (bl.symtab);
- gdb_printf (": file %ps, line %d.",
+ gdb_printf (": file %ps, line %ps.",
styled_string (file_name_style.style (),
filename),
- bl.line_number);
+ styled_string (line_number_style.style (),
+ pulongest (bl.line_number)));
}
else
/* This is not ideal, but each location may have a
@@ -12832,7 +12861,7 @@ update_static_tracepoint (tracepoint *tp, struct symtab_and_line sal)
uiout->field_string ("fullname", fullname);
}
- uiout->field_signed ("line", sal2.line);
+ uiout->field_signed ("line", sal2.line, line_number_style.style ());
uiout->text ("\n");
tp->first_loc ().line_number = sal2.line;
@@ -12941,32 +12970,12 @@ update_breakpoint_locations (code_breakpoint *b,
all locations are in the same shared library, that was unloaded.
We'd like to retain the location, so that when the library is
loaded again, we don't loose the enabled/disabled status of the
- individual locations.
-
- Thread specific breakpoints will also trigger this case if the thread
- is changed to a different program space, and all of the old locations
- go out of scope. In this case we do (currently) discard the old
- locations -- we assume the change in thread is permanent and the old
- locations will never come back into scope. */
+ individual locations. */
if (all_locations_are_pending (b, filter_pspace) && sals.empty ())
- {
- if (b->thread != -1)
- b->clear_locations ();
- return;
- }
+ return;
bp_location_list existing_locations = b->steal_locations (filter_pspace);
- /* If this is a thread-specific breakpoint then any locations left on the
- breakpoint are for a program space in which the thread of interest
- does not operate. This can happen when the user changes the thread of
- a thread-specific breakpoint.
-
- We assume that the change in thread is permanent, and that the old
- locations will never be used again, so discard them now. */
- if (b->thread != -1)
- b->clear_locations ();
-
for (const auto &sal : sals)
{
struct bp_location *new_loc;
@@ -13136,9 +13145,10 @@ code_breakpoint::re_set_default (struct program_space *filter_pspace)
{
std::vector<symtab_and_line> expanded, expanded_end;
- /* If this breakpoint is thread-specific then find the program space in
- which the specific thread exists. Otherwise, for breakpoints that are
- not thread-specific THREAD_PSPACE will be nullptr. */
+ /* If this breakpoint is thread- or inferior-specific, then find the
+ program space in which this breakpoint exists. Otherwise, for
+ breakpoints that are not thread- or inferior-specific, BP_PSPACE will
+ be nullptr. */
program_space *bp_pspace
= find_program_space_for_breakpoint (this->thread, this->inferior);
diff --git a/gdb/btrace.c b/gdb/btrace.c
index ff9612d..152f6f2 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -547,31 +547,39 @@ ftrace_new_gap (struct btrace_thread_info *btinfo, int errcode,
Return the chronologically latest function segment, never NULL. */
static struct btrace_function *
-ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
+ftrace_update_function (struct btrace_thread_info *btinfo,
+ std::optional<CORE_ADDR> pc)
{
- struct minimal_symbol *mfun;
- struct symbol *fun;
- struct btrace_function *bfun;
+ struct minimal_symbol *mfun = nullptr;
+ struct symbol *fun = nullptr;
/* Try to determine the function we're in. We use both types of symbols
to avoid surprises when we sometimes get a full symbol and sometimes
only a minimal symbol. */
- fun = find_pc_function (pc);
- bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (pc);
- mfun = bmfun.minsym;
+ if (pc.has_value ())
+ {
+ fun = find_pc_function (*pc);
+ bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (*pc);
+ mfun = bmfun.minsym;
- if (fun == NULL && mfun == NULL)
- DEBUG_FTRACE ("no symbol at %s", core_addr_to_string_nz (pc));
+ if (fun == nullptr && mfun == nullptr)
+ DEBUG_FTRACE ("no symbol at %s", core_addr_to_string_nz (*pc));
+ }
/* If we didn't have a function, we create one. */
if (btinfo->functions.empty ())
return ftrace_new_function (btinfo, mfun, fun);
/* If we had a gap before, we create a function. */
- bfun = &btinfo->functions.back ();
+ btrace_function *bfun = &btinfo->functions.back ();
if (bfun->errcode != 0)
return ftrace_new_function (btinfo, mfun, fun);
+ /* If there is no valid PC, which can happen for events with a
+ suppressed IP, we can't do more than return the last bfun. */
+ if (!pc.has_value ())
+ return bfun;
+
/* Check the last instruction, if we have one.
We do this check first, since it allows us to fill in the call stack
links in addition to the normal flow links. */
@@ -605,7 +613,7 @@ ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
case BTRACE_INSN_CALL:
/* Ignore calls to the next instruction. They are used for PIC. */
- if (last->pc + last->size == pc)
+ if (last->pc + last->size == *pc)
break;
return ftrace_new_call (btinfo, mfun, fun);
@@ -614,10 +622,10 @@ ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
{
CORE_ADDR start;
- start = get_pc_function_start (pc);
+ start = get_pc_function_start (*pc);
/* A jump to the start of a function is (typically) a tail call. */
- if (start == pc)
+ if (start == *pc)
return ftrace_new_tailcall (btinfo, mfun, fun);
/* Some versions of _Unwind_RaiseException use an indirect
@@ -642,6 +650,18 @@ ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
break;
}
+
+ case BTRACE_INSN_AUX:
+ /* An aux insn couldn't have switched the function. But the
+ segment might not have had a symbol name resolved yet, as events
+ might not have an IP. Use the current IP in that case and update
+ the name. */
+ if (bfun->sym == nullptr && bfun->msym == nullptr)
+ {
+ bfun->sym = fun;
+ bfun->msym = mfun;
+ }
+ break;
}
}
@@ -668,6 +688,8 @@ ftrace_update_insns (struct btrace_function *bfun, const btrace_insn &insn)
if (insn.iclass == BTRACE_INSN_AUX)
bfun->flags |= BFUN_CONTAINS_AUX;
+ else
+ bfun->flags |= BFUN_CONTAINS_NON_AUX;
if (record_debug > 1)
ftrace_debug (bfun, "update insn");
@@ -1101,7 +1123,8 @@ btrace_compute_ftrace_bts (struct thread_info *tp,
break;
}
- bfun = ftrace_update_function (btinfo, pc);
+ bfun = ftrace_update_function (btinfo,
+ std::make_optional<CORE_ADDR> (pc));
/* Maintain the function level offset.
For all but the last block, we do it here. */
@@ -1211,10 +1234,10 @@ pt_btrace_insn (const struct pt_insn &insn)
static void
handle_pt_aux_insn (btrace_thread_info *btinfo, std::string &aux_str,
- CORE_ADDR ip)
+ std::optional<CORE_ADDR> pc)
{
btinfo->aux_data.emplace_back (std::move (aux_str));
- struct btrace_function *bfun = ftrace_update_function (btinfo, ip);
+ struct btrace_function *bfun = ftrace_update_function (btinfo, pc);
btrace_insn insn {{btinfo->aux_data.size () - 1}, 0,
BTRACE_INSN_AUX, 0};
@@ -1222,8 +1245,47 @@ handle_pt_aux_insn (btrace_thread_info *btinfo, std::string &aux_str,
ftrace_update_insns (bfun, insn);
}
+/* Check if the recording contains real instructions and not only auxiliary
+ instructions since the last gap (or since the beginning). */
+
+static bool
+ftrace_contains_non_aux_since_last_gap (const btrace_thread_info *btinfo)
+{
+ const std::vector<btrace_function> &functions = btinfo->functions;
+
+ std::vector<btrace_function>::const_reverse_iterator rit;
+ for (rit = functions.crbegin (); rit != functions.crend (); ++rit)
+ {
+ if (rit->errcode != 0)
+ return false;
+
+ if ((rit->flags & BFUN_CONTAINS_NON_AUX) != 0)
+ return true;
+ }
+
+ return false;
+}
#endif /* defined (HAVE_PT_INSN_EVENT) */
+#if (LIBIPT_VERSION >= 0x201)
+/* Translate an interrupt vector to a mnemonic string as defined for x86.
+ Returns nullptr if there is none. */
+
+static const char *
+decode_interrupt_vector (const uint8_t vector)
+{
+ static const char *mnemonic[]
+ = { "#de", "#db", nullptr, "#bp", "#of", "#br", "#ud", "#nm",
+ "#df", "#mf", "#ts", "#np", "#ss", "#gp", "#pf", nullptr,
+ "#mf", "#ac", "#mc", "#xm", "#ve", "#cp" };
+
+ if (vector < (sizeof (mnemonic) / sizeof (mnemonic[0])))
+ return mnemonic[vector];
+
+ return nullptr;
+}
+#endif /* defined (LIBIPT_VERSION >= 0x201) */
+
/* Handle instruction decode events (libipt-v2). */
static int
@@ -1236,6 +1298,7 @@ handle_pt_insn_events (struct btrace_thread_info *btinfo,
{
struct pt_event event;
uint64_t offset;
+ std::optional<CORE_ADDR> pc;
status = pt_insn_event (decoder, &event, sizeof (event));
if (status < 0)
@@ -1251,11 +1314,16 @@ handle_pt_insn_events (struct btrace_thread_info *btinfo,
if (event.status_update != 0)
break;
+ /* Only create a new gap if there are non-aux instructions in
+ the trace since the last gap. We could be at the beginning
+ of the recording and could already have handled one or more
+ events, like ptev_iret, that created aux insns. In that
+ case we don't want to create a gap or print a warning. */
if (event.variant.enabled.resumed == 0
- && !btinfo->functions.empty ())
+ && ftrace_contains_non_aux_since_last_gap (btinfo))
{
struct btrace_function *bfun
- = ftrace_new_gap (btinfo, BDE_PT_DISABLED, gaps);
+ = ftrace_new_gap (btinfo, BDE_PT_NON_CONTIGUOUS, gaps);
pt_insn_get_offset (decoder, &offset);
@@ -1282,7 +1350,6 @@ handle_pt_insn_events (struct btrace_thread_info *btinfo,
#if defined (HAVE_STRUCT_PT_EVENT_VARIANT_PTWRITE)
case ptev_ptwrite:
{
- uint64_t pc = 0;
std::optional<std::string> ptw_string;
/* Lookup the PC if available. The event often doesn't provide
@@ -1314,9 +1381,10 @@ handle_pt_insn_events (struct btrace_thread_info *btinfo,
}
}
- if (pc == 0)
+ if (!pc.has_value ())
warning (_("Failed to determine the PC for ptwrite."));
+
if (btinfo->ptw_callback_fun != nullptr)
ptw_string
= btinfo->ptw_callback_fun (event.variant.ptwrite.payload,
@@ -1333,6 +1401,203 @@ handle_pt_insn_events (struct btrace_thread_info *btinfo,
break;
}
#endif /* defined (HAVE_STRUCT_PT_EVENT_VARIANT_PTWRITE) */
+
+#if (LIBIPT_VERSION >= 0x201)
+ case ptev_interrupt:
+ {
+ std::string aux_string = std::string (_("interrupt: vector = "))
+ + hex_string (event.variant.interrupt.vector);
+
+ const char *decoded
+ = decode_interrupt_vector (event.variant.interrupt.vector);
+ if (decoded != nullptr)
+ aux_string += std::string (" (") + decoded + ")";
+
+ if (event.variant.interrupt.has_cr2 != 0)
+ {
+ aux_string += std::string (", cr2 = ")
+ + hex_string (event.variant.interrupt.cr2);
+ }
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.interrupt.ip;
+ aux_string += std::string (", ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_iret:
+ {
+ std::string aux_string = std::string (_("iret"));
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.iret.ip;
+ aux_string += std::string (": ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_smi:
+ {
+ std::string aux_string = std::string (_("smi"));
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.smi.ip;
+ aux_string += std::string (": ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_rsm:
+ {
+ std::string aux_string = std::string (_("rsm"));
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.rsm.ip;
+ aux_string += std::string (": ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_sipi:
+ {
+ std::string aux_string = std::string (_("sipi: vector = "))
+ + hex_string (event.variant.sipi.vector);
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_init:
+ {
+ std::string aux_string = std::string (_("init"));
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.init.ip;
+ aux_string += std::string (": ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_vmentry:
+ {
+ std::string aux_string = std::string (_("vmentry"));
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.vmentry.ip;
+ aux_string += std::string (": ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_vmexit:
+ {
+ std::string aux_string = std::string (_("vmexit"));
+
+ if (event.variant.vmexit.has_vector != 0
+ || event.variant.vmexit.has_vmxr != 0
+ || event.variant.vmexit.has_vmxq != 0
+ || event.ip_suppressed != 0)
+ aux_string += std::string (":");
+
+ if (event.variant.vmexit.has_vector != 0)
+ {
+ aux_string += std::string (_(" vector = "))
+ + hex_string (event.variant.vmexit.vector);
+
+ const char* decoded = decode_interrupt_vector
+ (event.variant.vmexit.vector);
+ if (decoded != nullptr)
+ aux_string += std::string (" (") + decoded + ")";
+ }
+
+ if (event.variant.vmexit.has_vmxr != 0)
+ {
+ std::string seperator = aux_string.back () == ':' ? "" : ",";
+ aux_string += seperator + std::string (" vmxr = ")
+ + hex_string (event.variant.vmexit.vmxr);
+ }
+
+ if (event.variant.vmexit.has_vmxq != 0)
+ {
+ std::string seperator = aux_string.back () == ':' ? "" : ",";
+ aux_string += seperator + std::string (" vmxq = ")
+ + hex_string (event.variant.vmexit.vmxq);
+ }
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.vmexit.ip;
+ std::string seperator = aux_string.back () == ':' ? "" : ",";
+ aux_string += seperator + std::string (" ip = ")
+ + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_shutdown:
+ {
+ std::string aux_string = std::string (_("shutdown"));
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.shutdown.ip;
+ aux_string += std::string (": ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_uintr:
+ {
+ std::string aux_string = std::string (_("uintr: vector = "))
+ + hex_string (event.variant.uintr.vector);
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.uintr.ip;
+ aux_string += std::string (", ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+
+ case ptev_uiret:
+ {
+ std::string aux_string = std::string (_("uiret"));
+
+ if (event.ip_suppressed == 0)
+ {
+ pc = event.variant.uiret.ip;
+ aux_string += std::string (": ip = ") + hex_string (*pc);
+ }
+
+ handle_pt_aux_insn (btinfo, aux_string, pc);
+ break;
+ }
+#endif /* defined (LIBIPT_VERSION >= 0x201) */
}
}
#endif /* defined (HAVE_PT_INSN_EVENT) */
@@ -1359,7 +1624,7 @@ handle_pt_insn_event_flags (struct btrace_thread_info *btinfo,
struct btrace_function *bfun;
uint64_t offset;
- bfun = ftrace_new_gap (btinfo, BDE_PT_DISABLED, gaps);
+ bfun = ftrace_new_gap (btinfo, BDE_PT_NON_CONTIGUOUS, gaps);
pt_insn_get_offset (decoder, &offset);
@@ -1428,7 +1693,9 @@ ftrace_add_pt (struct btrace_thread_info *btinfo,
/* Handle events indicated by flags in INSN. */
handle_pt_insn_event_flags (btinfo, decoder, insn, gaps);
- bfun = ftrace_update_function (btinfo, insn.ip);
+ bfun
+ = ftrace_update_function (btinfo,
+ std::make_optional<CORE_ADDR> (insn.ip));
/* Maintain the function level offset. */
*plevel = std::min (*plevel, bfun->level);
@@ -1966,8 +2233,8 @@ btrace_decode_error (enum btrace_format format, int errcode)
case BDE_PT_USER_QUIT:
return _("trace decode cancelled");
- case BDE_PT_DISABLED:
- return _("disabled");
+ case BDE_PT_NON_CONTIGUOUS:
+ return _("non-contiguous");
case BDE_PT_OVERFLOW:
return _("overflow");
@@ -2746,6 +3013,19 @@ pt_print_packet (const struct pt_packet *packet)
packet->payload.ptw.ip ? (" ip") : (""));
break;
#endif /* defined (LIBIPT_VERSION >= 0x200) */
+
+#if (LIBIPT_VERSION >= 0x201)
+ case ppt_cfe:
+ gdb_printf (("cfe %u: 0x%x%s"), packet->payload.cfe.type,
+ packet->payload.cfe.vector,
+ packet->payload.cfe.ip ? (" ip") : (""));
+ break;
+
+ case ppt_evd:
+ gdb_printf (("evd %u: 0x%" PRIx64 ""), packet->payload.evd.type,
+ packet->payload.evd.payload);
+ break;
+#endif /* defined (LIBIPT_VERSION >= 0x201) */
}
}
diff --git a/gdb/btrace.h b/gdb/btrace.h
index 75bc4f8..a4960f3 100644
--- a/gdb/btrace.h
+++ b/gdb/btrace.h
@@ -110,7 +110,11 @@ enum btrace_function_flag
/* Indicates that at least one auxiliary instruction is in the current
function segment. */
- BFUN_CONTAINS_AUX = (1 << 2)
+ BFUN_CONTAINS_AUX = (1 << 2),
+
+ /* Indicates that at least one instruction not of type BTRACE_INSN_AUX
+ is in the current function segment. */
+ BFUN_CONTAINS_NON_AUX = (1 << 3)
};
DEF_ENUM_FLAGS_TYPE (enum btrace_function_flag, btrace_function_flags);
@@ -131,7 +135,7 @@ enum btrace_pt_error
BDE_PT_USER_QUIT = 1,
/* Tracing was temporarily disabled. */
- BDE_PT_DISABLED,
+ BDE_PT_NON_CONTIGUOUS,
/* Trace recording overflowed. */
BDE_PT_OVERFLOW
@@ -356,7 +360,7 @@ struct btrace_thread_info
/* Function pointer to the ptwrite callback. Returns the string returned
by the ptwrite filter function. */
std::optional<std::string> (*ptw_callback_fun) (const uint64_t payload,
- const uint64_t ip,
+ std::optional<uint64_t> ip,
const void *ptw_context)
= nullptr;
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index ca411dc..645cb59 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -3087,10 +3087,8 @@ classify_name (struct parser_state *par_state, const struct block *block,
|| is_quoted_name)
{
/* See if it's a file name. */
- struct symtab *symtab;
-
- symtab = lookup_symtab (copy.c_str ());
- if (symtab)
+ if (auto symtab = lookup_symtab (current_program_space, copy.c_str ());
+ symtab != nullptr)
{
yylval.bval
= symtab->compunit ()->blockvector ()->static_block ();
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index 1c303f0..d8a542d 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -94,13 +94,14 @@ cli_ui_out::do_end (ui_out_type type)
void
cli_ui_out::do_field_signed (int fldno, int width, ui_align alignment,
- const char *fldname, LONGEST value)
+ const char *fldname, LONGEST value,
+ const ui_file_style &style)
{
if (m_suppress_output)
return;
do_field_string (fldno, width, alignment, fldname, plongest (value),
- ui_file_style ());
+ style);
}
/* output an unsigned field */
diff --git a/gdb/cli-out.h b/gdb/cli-out.h
index f17cb0c..f0654b2 100644
--- a/gdb/cli-out.h
+++ b/gdb/cli-out.h
@@ -52,7 +52,8 @@ protected:
virtual void do_begin (ui_out_type type, const char *id) override;
virtual void do_end (ui_out_type type) override;
virtual void do_field_signed (int fldno, int width, ui_align align,
- const char *fldname, LONGEST value) override;
+ const char *fldname, LONGEST value,
+ const ui_file_style &style) override;
virtual void do_field_unsigned (int fldno, int width, ui_align align,
const char *fldname, ULONGEST value)
override;
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index fd8e277..ea2e156 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -51,7 +51,6 @@
#include "cli/cli-cmds.h"
#include "cli/cli-style.h"
#include "cli/cli-utils.h"
-#include "cli/cli-style.h"
#include "extension.h"
#include "gdbsupport/pathstuff.h"
@@ -1017,16 +1016,23 @@ edit_command (const char *arg, int from_tty)
gdbarch = sal.symtab->compunit ()->objfile ()->arch ();
sym = find_pc_function (sal.pc);
if (sym)
- gdb_printf ("%s is in %s (%s:%d).\n",
- paddress (gdbarch, sal.pc),
- sym->print_name (),
- symtab_to_filename_for_display (sal.symtab),
- sal.line);
+ gdb_printf ("%ps is in %ps (%ps:%ps).\n",
+ styled_string (address_style.style (),
+ paddress (gdbarch, sal.pc)),
+ styled_string (function_name_style.style (),
+ sym->print_name ()),
+ styled_string (file_name_style.style (),
+ symtab_to_filename_for_display (sal.symtab)),
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)));
else
- gdb_printf ("%s is at %s:%d.\n",
- paddress (gdbarch, sal.pc),
- symtab_to_filename_for_display (sal.symtab),
- sal.line);
+ gdb_printf ("%ps is at %ps:%ps.\n",
+ styled_string (address_style.style (),
+ paddress (gdbarch, sal.pc)),
+ styled_string (file_name_style.style (),
+ symtab_to_filename_for_display (sal.symtab)),
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)));
}
/* If what was given does not imply a symtab, it must be an
@@ -1118,19 +1124,14 @@ pipe_command (const char *arg, int from_tty)
if (to_shell_command == nullptr)
error (_("Error launching \"%s\""), shell_command);
- try
- {
- stdio_file pipe_file (to_shell_command);
+ int exit_status;
+ {
+ SCOPE_EXIT { exit_status = pclose (to_shell_command); };
- execute_command_to_ui_file (&pipe_file, gdb_cmd.c_str (), from_tty);
- }
- catch (...)
- {
- pclose (to_shell_command);
- throw;
- }
+ stdio_file pipe_file (to_shell_command);
- int exit_status = pclose (to_shell_command);
+ execute_command_to_ui_file (&pipe_file, gdb_cmd.c_str (), from_tty);
+ }
if (exit_status < 0)
error (_("shell command \"%s\" failed: %s"), shell_command,
@@ -2122,9 +2123,11 @@ print_sal_location (const symtab_and_line &sal)
const char *sym_name = NULL;
if (sal.symbol != NULL)
sym_name = sal.symbol->print_name ();
- gdb_printf (_("file: \"%s\", line number: %d, symbol: \"%s\"\n"),
+ gdb_printf (_("file: \"%s\", line number: %ps, symbol: \"%s\"\n"),
symtab_to_filename_for_display (sal.symtab),
- sal.line, sym_name != NULL ? sym_name : "???");
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)),
+ sym_name != NULL ? sym_name : "???");
}
/* Print a list of files and line numbers which a user may choose from
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index fa5d70e..1817573 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -228,7 +228,7 @@ cli_interp::exec (const char *command_str)
interpreter which has a new ui_file for gdb_stdout, use that one
instead of the default.
- It is important that it gets reset everytime, since the user
+ It is important that it gets reset every time, since the user
could set gdb to use a different interpreter. */
ui_file *old_stream = m_cli_uiout->set_stream (gdb_stdout);
SCOPE_EXIT { m_cli_uiout->set_stream (old_stream); };
diff --git a/gdb/cli/cli-style.c b/gdb/cli/cli-style.c
index 5928998..36a8bd9 100644
--- a/gdb/cli/cli-style.c
+++ b/gdb/cli/cli-style.c
@@ -126,6 +126,10 @@ cli_style_option disasm_comment_style ("comment", ui_file_style::WHITE,
/* See cli-style.h. */
+cli_style_option line_number_style ("line-number", ui_file_style::DIM);
+
+/* See cli-style.h. */
+
cli_style_option::cli_style_option (const char *name,
ui_file_style::basic_color fg,
ui_file_style::intensity intensity)
@@ -529,6 +533,14 @@ then this style has no effect."),
&style_disasm_show_list,
false);
+ line_number_style.add_setshow_commands (no_class, _("\
+Line number display styling.\n\
+Configure colors and display intensity for line numbers\n\
+The \"line-number\" style is used when GDB displays line numbers\n\
+coming from your source code."),
+ &style_set_list, &style_show_list,
+ false);
+
/* Setup 'disassembler address' style and 'disassembler symbol' style,
these are aliases for 'address' and 'function' styles respectively. */
add_alias_cmd ("address", address_prefix_cmds.set, no_class, 0,
diff --git a/gdb/cli/cli-style.h b/gdb/cli/cli-style.h
index 1663b4e..5052b86 100644
--- a/gdb/cli/cli-style.h
+++ b/gdb/cli/cli-style.h
@@ -145,6 +145,9 @@ extern cli_style_option tui_active_border_style;
/* The style to use for the GDB version string. */
extern cli_style_option version_style;
+/* The style for a line number. */
+extern cli_style_option line_number_style;
+
/* True if source styling is enabled. */
extern bool source_styling;
diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c
index ed5e533..bb85b00 100644
--- a/gdb/coff-pe-read.c
+++ b/gdb/coff-pe-read.c
@@ -176,7 +176,6 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
{
enum minimal_symbol_type msymtype;
int forward_dll_name_len = strlen (forward_dll_name);
- short section;
std::string forward_qualified_name = string_printf ("%s!%s",
forward_dll_name,
@@ -215,7 +214,7 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
unrelocated_addr vma = unrelocated_addr (msymbol.value_address ()
- objfile->text_section_offset ());
msymtype = msymbol.minsym->type ();
- section = msymbol.minsym->section_index ();
+ int section = msymbol.minsym->section_index ();
/* Generate a (hopefully unique) qualified name using the first part
of the dll name, e.g. KERNEL32!AddAtomA. This matches the style
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 3e67ebd..abe150d 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -37,6 +37,7 @@
#include "block.h"
#include "dictionary.h"
#include "dwarf2/public.h"
+#include "gdb-stabs.h"
#include "coff-pe-read.h"
@@ -121,7 +122,7 @@ static unsigned local_auxesz;
static int pe_file;
/* Chain of typedefs of pointers to empty struct/union types.
- They are chained thru the SYMBOL_VALUE_CHAIN. */
+ They are chained through the SYMBOL_VALUE_CHAIN. */
static struct symbol *opaque_type_chain[HASHSIZE];
@@ -204,6 +205,98 @@ static void read_one_sym (struct coff_symbol *,
static void coff_symtab_read (minimal_symbol_reader &,
file_ptr, unsigned int, struct objfile *);
+/* Scan and build partial symbols for an coff symbol file.
+ The coff file has already been processed to get its minimal symbols.
+
+ This routine is the equivalent of dbx_symfile_init and dbx_symfile_read
+ rolled into one.
+
+ OBJFILE is the object file we are reading symbols from.
+ ADDR is the address relative to which the symbols are (e.g.
+ the base address of the text segment).
+ TEXTADDR is the address of the text section.
+ TEXTSIZE is the size of the text section.
+ STABSECTS is the list of .stab sections in OBJFILE.
+ STABSTROFFSET and STABSTRSIZE define the location in OBJFILE where the
+ .stabstr section exists.
+
+ This routine is mostly copied from dbx_symfile_init and dbx_symfile_read,
+ adjusted for coff details. */
+
+void
+coffstab_build_psymtabs (struct objfile *objfile,
+ CORE_ADDR textaddr, unsigned int textsize,
+ const std::vector<asection *> &stabsects,
+ file_ptr stabstroffset, unsigned int stabstrsize)
+{
+ int val;
+ bfd *sym_bfd = objfile->obfd.get ();
+ const char *name = bfd_get_filename (sym_bfd);
+ unsigned int stabsize;
+
+ /* Allocate struct to keep track of stab reading. */
+ dbx_objfile_data_key.emplace (objfile);
+ dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ DBX_TEXT_ADDR (objfile) = textaddr;
+ DBX_TEXT_SIZE (objfile) = textsize;
+
+#define COFF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */
+ DBX_SYMBOL_SIZE (objfile) = COFF_STABS_SYMBOL_SIZE;
+ DBX_STRINGTAB_SIZE (objfile) = stabstrsize;
+
+ if (stabstrsize > bfd_get_size (sym_bfd))
+ error (_("ridiculous string table size: %d bytes"), stabstrsize);
+ DBX_STRINGTAB (objfile) = (char *)
+ obstack_alloc (&objfile->objfile_obstack, stabstrsize + 1);
+ OBJSTAT (objfile, sz_strtab += stabstrsize + 1);
+
+ /* Now read in the string table in one big gulp. */
+
+ val = bfd_seek (sym_bfd, stabstroffset, SEEK_SET);
+ if (val < 0)
+ perror_with_name (name);
+ val = bfd_read (DBX_STRINGTAB (objfile), stabstrsize, sym_bfd);
+ if (val != stabstrsize)
+ perror_with_name (name);
+
+ stabsread_new_init ();
+ free_header_files ();
+ init_header_files ();
+
+ key->ctx.processing_acc_compilation = 1;
+
+ /* In a coff file, we've already installed the minimal symbols that came
+ from the coff (non-stab) symbol table, so always act like an
+ incremental load here. */
+ scoped_restore save_symbuf_sections
+ = make_scoped_restore (&key->ctx.symbuf_sections);
+ if (stabsects.size () == 1)
+ {
+ stabsize = bfd_section_size (stabsects[0]);
+ DBX_SYMCOUNT (objfile) = stabsize / DBX_SYMBOL_SIZE (objfile);
+ DBX_SYMTAB_OFFSET (objfile) = stabsects[0]->filepos;
+ }
+ else
+ {
+ DBX_SYMCOUNT (objfile) = 0;
+ for (asection *section : stabsects)
+ {
+ stabsize = bfd_section_size (section);
+ DBX_SYMCOUNT (objfile) += stabsize / DBX_SYMBOL_SIZE (objfile);
+ }
+
+ DBX_SYMTAB_OFFSET (objfile) = stabsects[0]->filepos;
+
+ key->ctx.sect_idx = 1;
+ key->ctx.symbuf_sections = &stabsects;
+ key->ctx.symbuf_left = bfd_section_size (stabsects[0]);
+ key->ctx.symbuf_read = 0;
+ }
+
+ read_stabs_symtab (objfile, 0);
+}
+
/* We are called once per section from coff_symfile_read. We
need to examine each section we are passed, check to see
if it is something we are interested in processing, and
@@ -1644,7 +1737,7 @@ process_coff_symbol (struct coff_symbol *cs,
This is not just a consequence of GDB's type
management; CC and GCC (at least through version
2.4) both output variables of either type char *
- or caddr_t with the type refering to the C_TPDEF
+ or caddr_t with the type referring to the C_TPDEF
symbol for caddr_t. If a future compiler cleans
this up it GDB is not ready for it yet, but if it
becomes ready we somehow need to disable this
diff --git a/gdb/completer.c b/gdb/completer.c
index e8f5e7b..4735aa5 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -31,6 +31,7 @@
#include "linespec.h"
#include "cli/cli-decode.h"
#include "gdbsupport/gdb_tilde_expand.h"
+#include "readline/readline.h"
/* FIXME: This is needed because of lookup_cmd_1 (). We should be
calling a hook instead so we eliminate the CLI dependency. */
@@ -258,7 +259,7 @@ gdb_completer_file_name_char_is_quoted (char *string, int eindex)
as quoted, though this might not be completely correct; the
opening and closing quotes are not themselves quoted. But so
far this doesn't seem to have caused any issues. */
- if (i >= eindex)
+ if (i > eindex)
return 1;
}
else
@@ -393,13 +394,34 @@ gdb_completer_file_name_quote_1 (const char *text, char quote_char)
the quote character surrounding TEXT, or points to the null-character if
there are no quotes around TEXT. MATCH_TYPE will be one of the readline
constants SINGLE_MATCH or MULTI_MATCH depending on if there is one or
- many completions. */
+ many completions.
+
+ We also add a trailing character, either a '/' of closing quote, if
+ MATCH_TYPE is 'SINGLE_MATCH'. We do this because readline will only
+ add this trailing character when completing at the end of a line. */
static char *
-gdb_completer_file_name_quote (char *text, int match_type ATTRIBUTE_UNUSED,
- char *quote_ptr)
+gdb_completer_file_name_quote (char *text, int match_type, char *quote_ptr)
{
- return gdb_completer_file_name_quote_1 (text, *quote_ptr);
+ char *result = gdb_completer_file_name_quote_1 (text, *quote_ptr);
+
+ if (match_type == SINGLE_MATCH)
+ {
+ /* Add trailing '/' if TEXT is a directory, otherwise add a closing
+ quote character matching *QUOTE_PTR. */
+ char c = (gdb_path_isdir (gdb_tilde_expand (text).c_str ())
+ ? '/' : *quote_ptr);
+
+ /* Reallocate RESULT adding C to the end. But only if C is
+ interesting, otherwise we can save the reallocation. */
+ if (c != '\0')
+ {
+ char buf[2] = { c, '\0' };
+ result = reconcat (result, result, buf, nullptr);
+ }
+ }
+
+ return result;
}
/* The function is used to update the completion word MATCH before
diff --git a/gdb/config.in b/gdb/config.in
index 57be033..59a5da3 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -46,6 +46,9 @@
language is requested. */
#undef ENABLE_NLS
+/* Additional targets configured into GDB. */
+#undef ENABLE_TARGETS
+
/* The .gdbearlyinit filename. */
#undef GDBEARLYINIT
diff --git a/gdb/configure b/gdb/configure
index 53eaad4..ec9bbd3 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -24828,11 +24828,19 @@ if test "${enable_targets+set}" = set; then :
yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
;;
no) enable_targets= ;;
- *) enable_targets=$enableval ;;
+ *)
+ enable_targets=$enableval
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_TARGETS "$enable_targets"
+_ACEOF
+
+ ;;
esac
fi
+
# Check whether --enable-64-bit-bfd was given.
if test "${enable_64_bit_bfd+set}" = set; then :
enableval=$enable_64_bit_bfd; case $enableval in #(
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 8368fea..21f5dc8 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -184,9 +184,14 @@ AS_HELP_STRING([--enable-targets=TARGETS], [alternative target configurations]),
yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
;;
no) enable_targets= ;;
- *) enable_targets=$enableval ;;
+ *)
+ enable_targets=$enableval
+ AC_DEFINE_UNQUOTED(ENABLE_TARGETS, "$enable_targets",
+ Additional targets configured into GDB. )
+ ;;
esac])
+
BFD_64_BIT
# Provide defaults for some variables set by the per-host and per-target
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
index d690d29..5ed7d61 100755
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -243,7 +243,7 @@ END {
if (seen[file] && (skipped[bug_n_file] < skip[bug_n_file])) {
# ari.*.bug: <FILE>:<LINE>: <CATEGORY>: <BUG>: <DOC>
b = file " missing " bug
- print_bug(file, 0, "", "internal", file " missing " bug, "Expecting " skip[bug_n_file] " occurances of bug " bug " in file " file ", only found " skipped[bug_n_file])
+ print_bug(file, 0, "", "internal", file " missing " bug, "Expecting " skip[bug_n_file] " occurrences of bug " bug " in file " file ", only found " skipped[bug_n_file])
}
}
}
diff --git a/gdb/contrib/common-misspellings.txt b/gdb/contrib/common-misspellings.txt
new file mode 100644
index 0000000..62e2c51
--- /dev/null
+++ b/gdb/contrib/common-misspellings.txt
@@ -0,0 +1,18 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+# Common spelling mistakes.
+
+inbetween->between, in between, in-between
+sofar->so far
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
index 80bc495..bd5a8f7 100755
--- a/gdb/contrib/gdb-add-index.sh
+++ b/gdb/contrib/gdb-add-index.sh
@@ -113,7 +113,7 @@ trap "rm -f $tmp_files" 0
$GDB --batch -nx -iex 'set auto-load no' \
-iex 'set debuginfod enabled off' \
- -ex "file $file" -ex "save gdb-index $dwarf5 $dir" || {
+ -ex "file '$file'" -ex "save gdb-index $dwarf5 '$dir'" || {
# Just in case.
status=$?
echo "$myname: gdb error generating index for $file" 1>&2
@@ -143,35 +143,32 @@ handle_file ()
index="$index5"
section=".debug_names"
fi
- debugstradd=false
- debugstrupdate=false
if test -s "$debugstr"; then
if ! $OBJCOPY --dump-section .debug_str="$debugstrmerge" "$fpath" \
- /dev/null 2>$debugstrerr; then
- cat >&2 $debugstrerr
+ /dev/null 2> "$debugstrerr"; then
+ cat >&2 "$debugstrerr"
exit 1
fi
+ cat "$debugstr" >>"$debugstrmerge"
if grep -q "can't dump section '.debug_str' - it does not exist" \
- $debugstrerr; then
- debugstradd=true
+ "$debugstrerr"; then
+ $OBJCOPY --add-section $section="$index" \
+ --set-section-flags $section=readonly \
+ --add-section .debug_str="$debugstrmerge" \
+ --set-section-flags .debug_str=readonly \
+ "$fpath" "$fpath"
else
- debugstrupdate=true
- cat >&2 $debugstrerr
+ $OBJCOPY --add-section $section="$index" \
+ --set-section-flags $section=readonly \
+ --update-section .debug_str="$debugstrmerge" \
+ "$fpath" "$fpath"
fi
- cat "$debugstr" >>"$debugstrmerge"
+ else
+ $OBJCOPY --add-section $section="$index" \
+ --set-section-flags $section=readonly \
+ "$fpath" "$fpath"
fi
- $OBJCOPY --add-section $section="$index" \
- --set-section-flags $section=readonly \
- $(if $debugstradd; then \
- echo --add-section .debug_str="$debugstrmerge"; \
- echo --set-section-flags .debug_str=readonly; \
- fi; \
- if $debugstrupdate; then \
- echo --update-section .debug_str="$debugstrmerge"; \
- fi) \
- "$fpath" "$fpath"
-
status=$?
else
echo "$myname: No index was created for $fpath" 1>&2
diff --git a/gdb/contrib/spellcheck.sh b/gdb/contrib/spellcheck.sh
new file mode 100755
index 0000000..4203333
--- /dev/null
+++ b/gdb/contrib/spellcheck.sh
@@ -0,0 +1,353 @@
+#!/bin/bash
+
+# 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 <http://www.gnu.org/licenses/>.
+
+# Script to auto-correct common spelling mistakes.
+#
+# Example usage:
+# $ ./gdb/contrib/spellcheck.sh gdb*
+
+scriptdir=$(cd "$(dirname "$0")" || exit; pwd -P)
+
+url=https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
+cache_dir=$scriptdir/../../.git
+cache_file=wikipedia-common-misspellings.txt
+dictionary=$cache_dir/$cache_file
+local_dictionary=$scriptdir/common-misspellings.txt
+
+# Separators: space, slash, tab, colon, comma.
+declare -a grep_separators
+grep_separators=(
+ " "
+ "/"
+ " "
+ ":"
+ ","
+)
+declare -a sed_separators
+sed_separators=(
+ " "
+ "/"
+ "\t"
+ ":"
+ ","
+)
+
+join ()
+{
+ local or
+ or="$1"
+ shift
+
+ local res
+ res=""
+
+ local first
+ first=true
+
+ for item in "$@"; do
+ if $first; then
+ first=false
+ res="$item"
+ else
+ res="$res$or$item"
+ fi
+ done
+
+ echo "$res"
+}
+
+grep_or="|"
+sed_or="\|"
+grep_separator=$(join $grep_or "${grep_separators[@]}")
+sed_separator=$(join $sed_or "${sed_separators[@]}")
+
+usage ()
+{
+ echo "usage: $(basename "$0") <file|dir>+"
+}
+
+make_absolute ()
+{
+ local arg
+ arg="$1"
+
+ case "$arg" in
+ /*)
+ ;;
+ *)
+ arg=$(pwd -P)/"$arg"
+ ;;
+ esac
+
+ echo "$arg"
+}
+
+parse_args ()
+{
+ local files
+ files=$(mktemp)
+ trap 'rm -f "$files"' EXIT
+
+ if [ $# -eq -0 ]; then
+ usage
+ exit 1
+ fi
+
+ local arg
+ for arg in "$@"; do
+ if [ -f "$arg" ]; then
+ arg=$(make_absolute "$arg")
+ readlink -e "$arg" \
+ >> "$files"
+ elif [ -d "$arg" ]; then
+ arg=$(make_absolute "$arg")
+ local f
+ find "$arg" -type f -exec readlink -e {} \; \
+ >> "$files"
+ else
+ echo "Not a file or directory: $arg"
+ exit 1
+ fi
+ done
+
+ mapfile -t unique_files \
+ < <(sort -u "$files" \
+ | grep -v ChangeLog)
+
+ rm -f "$files"
+ trap "" EXIT
+}
+
+get_dictionary ()
+{
+ if [ -f "$dictionary" ]; then
+ return
+ fi
+
+ local webpage
+ webpage=$(mktemp)
+ trap 'rm -f "$webpage"' EXIT
+
+ # Download web page containing table.
+ wget $url -O "$webpage"
+
+ # Extract table from web page.
+ awk '/<pre>/,/<\/pre>/' "$webpage" \
+ | sed 's/<pre>//;s/<\/pre>//' \
+ | grep -E -v "^$" \
+ > "$dictionary"
+
+ rm -f "$webpage"
+ trap "" EXIT
+}
+
+output_local_dictionary ()
+{
+ # Filter out comments and empty lines.
+ grep -E -v \
+ "^#|^$" \
+ "$local_dictionary"
+}
+
+output_dictionaries ()
+{
+ output_local_dictionary
+ cat "$dictionary"
+}
+
+parse_dictionary ()
+{
+ # Parse dictionary.
+ mapfile -t words \
+ < <(awk -F '->' '{print $1}' <(output_dictionaries))
+ mapfile -t replacements \
+ < <(awk -F '->' '{print $2}' <(output_dictionaries))
+}
+
+find_files_matching_words ()
+{
+ local pat
+ pat=""
+ for word in "${words[@]}"; do
+ if [ "$pat" = "" ]; then
+ pat="$word"
+ else
+ pat="$pat|$word"
+ fi
+ done
+ pat="($pat)"
+
+ local sep
+ sep=$grep_separator
+
+ pat="(^|$sep)$pat($sep|$)"
+
+ grep -E \
+ -l \
+ "$pat" \
+ "$@"
+}
+
+find_files_matching_word ()
+{
+ local pat
+ pat="$1"
+ shift
+
+ local sep
+ sep=$grep_separator
+
+ pat="(^|$sep)$pat($sep|$)"
+
+ grep -E \
+ -l \
+ "$pat" \
+ "$@"
+}
+
+replace_word_in_file ()
+{
+ local word
+ word="$1"
+
+ local replacement
+ replacement="$2"
+
+ local file
+ file="$3"
+
+ local sep
+ sep=$sed_separator
+
+ # Save separator.
+ sep="\($sep\)"
+
+ local repl1 repl2 repl3
+
+ repl1="s%$sep$word$sep%\1$replacement\2%g"
+
+ repl2="s%^$word$sep%$replacement\1%"
+
+ repl3="s%$sep$word$%\1$replacement%"
+
+ sed -i \
+ "$repl1;$repl2;$repl3" \
+ "$file"
+}
+
+replace_word_in_files ()
+{
+ local word
+ word="$1"
+
+ local replacement
+ replacement="$2"
+
+ shift 2
+
+ local id
+ id="$word -> $replacement"
+
+ # Reduce set of files for sed to operate on.
+ local files_matching_word
+ declare -a files_matching_word
+ mapfile -t files_matching_word \
+ < <(find_files_matching_word "$word" "$@")
+
+ if [ ${#files_matching_word[@]} -eq 0 ]; then
+ return
+ fi
+
+ if echo "$replacement"| grep -q ","; then
+ echo "TODO: $id"
+ return
+ fi
+
+ declare -A md5sums
+
+ local changed f before after
+ changed=false
+ for f in "${files_matching_word[@]}"; do
+ if [ "${md5sums[$f]}" = "" ]; then
+ md5sums[$f]=$(md5sum "$f")
+ fi
+
+ before="${md5sums[$f]}"
+
+ replace_word_in_file \
+ "$word" \
+ "$replacement" \
+ "$f"
+
+ after=$(md5sum "$f")
+
+ if [ "$after" != "$before" ]; then
+ md5sums[$f]="$after"
+ changed=true
+ fi
+ done
+
+ if $changed; then
+ echo "$id"
+ fi
+
+ find_files_matching_word "$word" "${files_matching_word[@]}" \
+ | awk "{ printf \"TODO: $id: replacement failed: %s\n\", \$0}"
+}
+
+main ()
+{
+ declare -a unique_files
+ parse_args "$@"
+
+ get_dictionary
+
+ declare -a words
+ declare -a replacements
+ parse_dictionary
+
+ # Reduce set of files for sed to operate on.
+ local files_matching_words
+ declare -a files_matching_words
+ mapfile -t files_matching_words \
+ < <(find_files_matching_words "${unique_files[@]}")
+
+ if [ ${#files_matching_words[@]} -eq 0 ]; then
+ return
+ fi
+
+ declare -A words_done
+ local i word replacement
+ i=0
+ for word in "${words[@]}"; do
+ replacement=${replacements[$i]}
+ i=$((i + 1))
+
+ # Skip words that are already handled. This ensures that the local
+ # dictionary overrides the wiki dictionary.
+ if [ "${words_done[$word]}" == 1 ]; then
+ continue
+ fi
+ words_done[$word]=1
+
+ replace_word_in_files \
+ "$word" \
+ "$replacement" \
+ "${files_matching_words[@]}"
+ done
+}
+
+main "$@"
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 16f07c2..5820ffe 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -1698,24 +1698,19 @@ get_current_core_target ()
void
core_target::info_proc_mappings (struct gdbarch *gdbarch)
{
- if (!m_core_file_mappings.empty ())
- {
- gdb_printf (_("Mapped address spaces:\n\n"));
- if (gdbarch_addr_bit (gdbarch) == 32)
- {
- gdb_printf ("\t%10s %10s %10s %10s %s\n",
- "Start Addr",
- " End Addr",
- " Size", " Offset", "objfile");
- }
- else
- {
- gdb_printf (" %18s %18s %10s %10s %s\n",
- "Start Addr",
- " End Addr",
- " Size", " Offset", "objfile");
- }
- }
+ if (m_core_file_mappings.empty ())
+ return;
+
+ gdb_printf (_("Mapped address spaces:\n\n"));
+ ui_out_emit_table emitter (current_uiout, 5, -1, "ProcMappings");
+
+ int width = gdbarch_addr_bit (gdbarch) == 32 ? 10 : 18;
+ current_uiout->table_header (width, ui_left, "start", "Start Addr");
+ current_uiout->table_header (width, ui_left, "end", "End Addr");
+ current_uiout->table_header (width, ui_left, "size", "Size");
+ current_uiout->table_header (width, ui_left, "offset", "Offset");
+ current_uiout->table_header (0, ui_left, "objfile", "File");
+ current_uiout->table_body ();
for (const target_section &tsp : m_core_file_mappings)
{
@@ -1724,20 +1719,16 @@ core_target::info_proc_mappings (struct gdbarch *gdbarch)
ULONGEST file_ofs = tsp.the_bfd_section->filepos;
const char *filename = bfd_get_filename (tsp.the_bfd_section->owner);
- if (gdbarch_addr_bit (gdbarch) == 32)
- gdb_printf ("\t%10s %10s %10s %10s %s\n",
- paddress (gdbarch, start),
- paddress (gdbarch, end),
- hex_string (end - start),
- hex_string (file_ofs),
- filename);
- else
- gdb_printf (" %18s %18s %10s %10s %s\n",
- paddress (gdbarch, start),
- paddress (gdbarch, end),
- hex_string (end - start),
- hex_string (file_ofs),
- filename);
+ ui_out_emit_tuple tuple_emitter (current_uiout, nullptr);
+ current_uiout->field_core_addr ("start", gdbarch, start);
+ current_uiout->field_core_addr ("end", gdbarch, end);
+ /* These next two aren't really addresses and so shouldn't be
+ styled as such. */
+ current_uiout->field_string ("size", paddress (gdbarch, end - start));
+ current_uiout->field_string ("offset", paddress (gdbarch, file_ofs));
+ current_uiout->field_string ("objfile", filename,
+ file_name_style.style ());
+ current_uiout->text ("\n");
}
}
@@ -1819,8 +1810,8 @@ mapped_file_info::add (const char *soname,
parsed, we group the build-id information based on the file name. As
a consequence, we should see each EXPECTED_FILENAME value exactly
once. This means that each insertion should always succeed. */
- const auto [it, inserted]
- = m_filename_to_build_id_map.emplace (expected_filename, build_id);
+ const auto inserted
+ = m_filename_to_build_id_map.emplace (expected_filename, build_id).second;
gdb_assert (inserted);
/* Setup the reverse build-id to file name map. */
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 769b930..8562def 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -3339,7 +3339,7 @@ get_data_from_address (unsigned short *inst, CORE_ADDR address,
return value;
}
-/* Handles the assign addresing mode for the ADD, SUB, CMP, AND, OR and MOVE
+/* Handles the assign addressing mode for the ADD, SUB, CMP, AND, OR and MOVE
instructions. The MOVE instruction is the move from source to register. */
static void
@@ -3398,7 +3398,7 @@ three_operand_add_sub_cmp_and_or_op (unsigned short inst,
inst_env->disable_interrupt = 0;
}
-/* Handles the index addresing mode for the ADD, SUB, CMP, AND, OR and MOVE
+/* Handles the index addressing mode for the ADD, SUB, CMP, AND, OR and MOVE
instructions. The MOVE instruction is the move from source to register. */
static void
@@ -3425,7 +3425,7 @@ handle_prefix_index_mode_for_aritm_op (unsigned short inst,
inst_env->disable_interrupt = 0;
}
-/* Handles the autoincrement and indirect addresing mode for the ADD, SUB,
+/* Handles the autoincrement and indirect addressing mode for the ADD, SUB,
CMP, AND OR and MOVE instruction. The MOVE instruction is the move from
source to register. */
diff --git a/gdb/ctfread.c b/gdb/ctfread.c
index 9eb9537..ee7c30f 100644
--- a/gdb/ctfread.c
+++ b/gdb/ctfread.c
@@ -1460,7 +1460,7 @@ ctf_psymtab_type_cb (ctf_id_t tid, void *arg)
{
struct ctf_context *ccp;
uint32_t kind;
- short section = -1;
+ int section = -1;
ccp = (struct ctf_context *) arg;
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
index f9472f4..1a17d23 100644
--- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in
@@ -120,8 +120,7 @@ PYTHON_FILE_LIST = \
gdb/function/as_string.py \
gdb/function/caller_is.py \
gdb/function/strfns.py \
- gdb/printer/__init__.py \
- gdb/printer/bound_registers.py
+ gdb/printer/__init__.py
@HAVE_PYTHON_TRUE@PYTHON_FILES = $(PYTHON_FILE_LIST)
@HAVE_PYTHON_FALSE@PYTHON_FILES =
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 31eb51f..1b29d6e 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -54,228 +54,15 @@
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
+/* Required for the following registry. */
+#include "gdb-stabs.h"
-/* Key for dbx-associated data. */
-
-const registry<objfile>::key<dbx_symfile_info> dbx_objfile_data_key;
-
-/* We put a pointer to this structure in the read_symtab_private field
- of the psymtab. */
-
-struct symloc
- {
- /* Offset within the file symbol table of first local symbol for this
- file. */
-
- int ldsymoff;
-
- /* Length (in bytes) of the section of the symbol table devoted to
- this file's symbols (actually, the section bracketed may contain
- more than just this file's symbols). If ldsymlen is 0, the only
- reason for this thing's existence is the dependency list. Nothing
- else will happen when it is read in. */
-
- int ldsymlen;
-
- /* The size of each symbol in the symbol file (in external form). */
-
- int symbol_size;
-
- /* Further information needed to locate the symbols if they are in
- an ELF file. */
-
- int symbol_offset;
- int string_offset;
- int file_string_offset;
- enum language pst_language;
- };
-
-#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
-#define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
-#define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
-#define SYMBOL_SIZE(p) (SYMLOC(p)->symbol_size)
-#define SYMBOL_OFFSET(p) (SYMLOC(p)->symbol_offset)
-#define STRING_OFFSET(p) (SYMLOC(p)->string_offset)
-#define FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
-#define PST_LANGUAGE(p) (SYMLOC(p)->pst_language)
-
-/* The objfile we are currently reading. */
-
-static struct objfile *dbxread_objfile;
-
-/* Remember what we deduced to be the source language of this psymtab. */
-
-static enum language psymtab_language = language_unknown;
-
-/* The BFD for this file -- implicit parameter to next_symbol_text. */
-
-static bfd *symfile_bfd;
-
-/* The size of each symbol in the symbol file (in external form).
- This is set by dbx_symfile_read when building psymtabs, and by
- dbx_psymtab_to_symtab when building symtabs. */
-
-static unsigned symbol_size;
-
-/* This is the offset of the symbol table in the executable file. */
-
-static unsigned symbol_table_offset;
-
-/* This is the offset of the string table in the executable file. */
-
-static unsigned string_table_offset;
-
-/* For elf+stab executables, the n_strx field is not a simple index
- into the string table. Instead, each .o file has a base offset in
- the string table, and the associated symbols contain offsets from
- this base. The following two variables contain the base offset for
- the current and next .o files. */
-
-static unsigned int file_string_table_offset;
-static unsigned int next_file_string_table_offset;
-
-/* .o and NLM files contain unrelocated addresses which are based at
- 0. When non-zero, this flag disables some of the special cases for
- Solaris elf+stab text addresses at location 0. */
-
-static int symfile_relocatable = 0;
-
-/* When set, we are processing a .o file compiled by sun acc. This is
- misnamed; it refers to all stabs-in-elf implementations which use
- N_UNDF the way Sun does, including Solaris gcc. Hopefully all
- stabs-in-elf implementations ever invented will choose to be
- compatible. */
-
-static unsigned char processing_acc_compilation;
-
-/* The lowest text address we have yet encountered. This is needed
- because in an a.out file, there is no header field which tells us
- what address the program is actually going to be loaded at, so we
- need to make guesses based on the symbols (which *are* relocated to
- reflect the address it will be loaded at). */
-
-static unrelocated_addr lowest_text_address;
-
-/* Non-zero if there is any line number info in the objfile. Prevents
- dbx_end_psymtab from discarding an otherwise empty psymtab. */
-static int has_line_numbers;
-
-/* Complaints about the symbols we have encountered. */
-
-static void
-unknown_symtype_complaint (const char *arg1)
-{
- complaint (_("unknown symbol type %s"), arg1);
-}
-
-static void
-lbrac_mismatch_complaint (int arg1)
-{
- complaint (_("N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d"), arg1);
-}
-
-static void
-repeated_header_complaint (const char *arg1, int arg2)
-{
- complaint (_("\"repeated\" header file %s not "
- "previously seen, at symtab pos %d"),
- arg1, arg2);
-}
-
-/* find_text_range --- find start and end of loadable code sections
-
- The find_text_range function finds the shortest address range that
- encloses all sections containing executable code, and stores it in
- objfile's text_addr and text_size members.
-
- dbx_symfile_read will use this to finish off the partial symbol
- table, in some cases. */
-
-static void
-find_text_range (bfd * sym_bfd, struct objfile *objfile)
-{
- asection *sec;
- int found_any = 0;
- CORE_ADDR start = 0;
- CORE_ADDR end = 0;
-
- for (sec = sym_bfd->sections; sec; sec = sec->next)
- if (bfd_section_flags (sec) & SEC_CODE)
- {
- CORE_ADDR sec_start = bfd_section_vma (sec);
- CORE_ADDR sec_end = sec_start + bfd_section_size (sec);
-
- if (found_any)
- {
- if (sec_start < start)
- start = sec_start;
- if (sec_end > end)
- end = sec_end;
- }
- else
- {
- start = sec_start;
- end = sec_end;
- }
-
- found_any = 1;
- }
-
- if (!found_any)
- error (_("Can't find any code sections in symbol file"));
-
- DBX_TEXT_ADDR (objfile) = start;
- DBX_TEXT_SIZE (objfile) = end - start;
-}
-
-
-
-/* During initial symbol readin, we need to have a structure to keep
- track of which psymtabs have which bincls in them. This structure
- is used during readin to setup the list of dependencies within each
- partial symbol table. */
-
-struct header_file_location
-{
- header_file_location (const char *name_, int instance_,
- legacy_psymtab *pst_)
- : name (name_),
- instance (instance_),
- pst (pst_)
- {
- }
-
- const char *name; /* Name of header file */
- int instance; /* See above */
- legacy_psymtab *pst; /* Partial symtab that has the
- BINCL/EINCL defs for this file. */
-};
-
-/* The list of bincls. */
-static std::vector<struct header_file_location> *bincl_list;
/* Local function prototypes. */
-static void read_ofile_symtab (struct objfile *, legacy_psymtab *);
-
-static void dbx_read_symtab (legacy_psymtab *self,
- struct objfile *objfile);
-
-static void dbx_expand_psymtab (legacy_psymtab *, struct objfile *);
-
-static void read_dbx_symtab (minimal_symbol_reader &, psymtab_storage *,
- struct objfile *);
-
-static legacy_psymtab *find_corresponding_bincl_psymtab (const char *,
- int);
-
-static const char *dbx_next_symbol_text (struct objfile *);
-
-static void fill_symbuf (bfd *);
-
static void dbx_symfile_init (struct objfile *);
static void dbx_new_init (struct objfile *);
@@ -284,128 +71,6 @@ static void dbx_symfile_read (struct objfile *, symfile_add_flags);
static void dbx_symfile_finish (struct objfile *);
-static void record_minimal_symbol (minimal_symbol_reader &,
- const char *, unrelocated_addr, int,
- struct objfile *);
-
-static void add_new_header_file (const char *, int);
-
-static void add_old_header_file (const char *, int);
-
-static void add_this_object_header_file (int);
-
-static legacy_psymtab *start_psymtab (psymtab_storage *, struct objfile *,
- const char *, unrelocated_addr, int);
-
-/* Free up old header file tables. */
-
-void
-free_header_files (void)
-{
- if (this_object_header_files)
- {
- xfree (this_object_header_files);
- this_object_header_files = NULL;
- }
- n_allocated_this_object_header_files = 0;
-}
-
-/* Allocate new header file tables. */
-
-void
-init_header_files (void)
-{
- n_allocated_this_object_header_files = 10;
- this_object_header_files = XNEWVEC (int, 10);
-}
-
-/* Add header file number I for this object file
- at the next successive FILENUM. */
-
-static void
-add_this_object_header_file (int i)
-{
- if (n_this_object_header_files == n_allocated_this_object_header_files)
- {
- n_allocated_this_object_header_files *= 2;
- this_object_header_files
- = (int *) xrealloc ((char *) this_object_header_files,
- n_allocated_this_object_header_files * sizeof (int));
- }
-
- this_object_header_files[n_this_object_header_files++] = i;
-}
-
-/* Add to this file an "old" header file, one already seen in
- a previous object file. NAME is the header file's name.
- INSTANCE is its instance code, to select among multiple
- symbol tables for the same header file. */
-
-static void
-add_old_header_file (const char *name, int instance)
-{
- struct header_file *p = HEADER_FILES (dbxread_objfile);
- int i;
-
- for (i = 0; i < N_HEADER_FILES (dbxread_objfile); i++)
- if (filename_cmp (p[i].name, name) == 0 && instance == p[i].instance)
- {
- add_this_object_header_file (i);
- return;
- }
- repeated_header_complaint (name, symnum);
-}
-
-/* Add to this file a "new" header file: definitions for its types follow.
- NAME is the header file's name.
- Most often this happens only once for each distinct header file,
- but not necessarily. If it happens more than once, INSTANCE has
- a different value each time, and references to the header file
- use INSTANCE values to select among them.
-
- dbx output contains "begin" and "end" markers for each new header file,
- but at this level we just need to know which files there have been;
- so we record the file when its "begin" is seen and ignore the "end". */
-
-static void
-add_new_header_file (const char *name, int instance)
-{
- int i;
- struct header_file *hfile;
-
- /* Make sure there is room for one more header file. */
-
- i = N_ALLOCATED_HEADER_FILES (dbxread_objfile);
-
- if (N_HEADER_FILES (dbxread_objfile) == i)
- {
- if (i == 0)
- {
- N_ALLOCATED_HEADER_FILES (dbxread_objfile) = 10;
- HEADER_FILES (dbxread_objfile) = (struct header_file *)
- xmalloc (10 * sizeof (struct header_file));
- }
- else
- {
- i *= 2;
- N_ALLOCATED_HEADER_FILES (dbxread_objfile) = i;
- HEADER_FILES (dbxread_objfile) = (struct header_file *)
- xrealloc ((char *) HEADER_FILES (dbxread_objfile),
- (i * sizeof (struct header_file)));
- }
- }
-
- /* Create an entry for this header file. */
-
- i = N_HEADER_FILES (dbxread_objfile)++;
- hfile = HEADER_FILES (dbxread_objfile) + i;
- hfile->name = xstrdup (name);
- hfile->instance = instance;
- hfile->length = 10;
- hfile->vector = XCNEWVEC (struct type *, 10);
-
- add_this_object_header_file (i);
-}
#if 0
static struct type **
@@ -425,91 +90,6 @@ explicit_lookup_type (int real_filenum, int index)
}
#endif
-static void
-record_minimal_symbol (minimal_symbol_reader &reader,
- const char *name, unrelocated_addr address, int type,
- struct objfile *objfile)
-{
- enum minimal_symbol_type ms_type;
- int section;
-
- switch (type)
- {
- case N_TEXT | N_EXT:
- ms_type = mst_text;
- section = SECT_OFF_TEXT (objfile);
- break;
- case N_DATA | N_EXT:
- ms_type = mst_data;
- section = SECT_OFF_DATA (objfile);
- break;
- case N_BSS | N_EXT:
- ms_type = mst_bss;
- section = SECT_OFF_BSS (objfile);
- break;
- case N_ABS | N_EXT:
- ms_type = mst_abs;
- section = -1;
- break;
-#ifdef N_SETV
- case N_SETV | N_EXT:
- ms_type = mst_data;
- section = SECT_OFF_DATA (objfile);
- break;
- case N_SETV:
- /* I don't think this type actually exists; since a N_SETV is the result
- of going over many .o files, it doesn't make sense to have one
- file local. */
- ms_type = mst_file_data;
- section = SECT_OFF_DATA (objfile);
- break;
-#endif
- case N_TEXT:
- case N_NBTEXT:
- case N_FN:
- case N_FN_SEQ:
- ms_type = mst_file_text;
- section = SECT_OFF_TEXT (objfile);
- break;
- case N_DATA:
- ms_type = mst_file_data;
-
- /* Check for __DYNAMIC, which is used by Sun shared libraries.
- Record it as global even if it's local, not global, so
- lookup_minimal_symbol can find it. We don't check symbol_leading_char
- because for SunOS4 it always is '_'. */
- if (strcmp ("__DYNAMIC", name) == 0)
- ms_type = mst_data;
-
- /* Same with virtual function tables, both global and static. */
- {
- const char *tempstring = name;
-
- if (*tempstring != '\0'
- && *tempstring == bfd_get_symbol_leading_char (objfile->obfd.get ()))
- ++tempstring;
- if (is_vtable_name (tempstring))
- ms_type = mst_data;
- }
- section = SECT_OFF_DATA (objfile);
- break;
- case N_BSS:
- ms_type = mst_file_bss;
- section = SECT_OFF_BSS (objfile);
- break;
- default:
- ms_type = mst_unknown;
- section = -1;
- break;
- }
-
- if ((ms_type == mst_file_text || ms_type == mst_text)
- && address < lowest_text_address)
- lowest_text_address = address;
-
- reader.record_with_info (name, address, ms_type, section);
-}
-
/* Scan and build partial symbols for a symbol file.
We have been initialized by a call to dbx_symfile_init, which
put all the relevant info into a "struct dbx_symfile_info",
@@ -518,39 +98,7 @@ record_minimal_symbol (minimal_symbol_reader &reader,
static void
dbx_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
{
- bfd *sym_bfd;
- int val;
-
- sym_bfd = objfile->obfd.get ();
-
- /* .o and .nlm files are relocatables with text, data and bss segs based at
- 0. This flag disables special (Solaris stabs-in-elf only) fixups for
- symbols with a value of 0. */
-
- symfile_relocatable = bfd_get_file_flags (sym_bfd) & HAS_RELOC;
-
- val = bfd_seek (sym_bfd, DBX_SYMTAB_OFFSET (objfile), SEEK_SET);
- if (val < 0)
- perror_with_name (objfile_name (objfile));
-
- symbol_size = DBX_SYMBOL_SIZE (objfile);
- symbol_table_offset = DBX_SYMTAB_OFFSET (objfile);
-
- scoped_free_pendings free_pending;
-
- minimal_symbol_reader reader (objfile);
-
- /* Read stabs data from executable file and define symbols. */
-
- psymbol_functions *psf = new psymbol_functions ();
- psymtab_storage *partial_symtabs = psf->get_partial_symtabs ().get ();
- objfile->qf.emplace_front (psf);
- read_dbx_symtab (reader, partial_symtabs, objfile);
-
- /* Install any minimal symbols that have been collected as the current
- minimal symbols for this objfile. */
-
- reader.install ();
+ read_stabs_symtab (objfile, symfile_flags);
}
/* Initialize anything that needs initializing when a completely new
@@ -699,2446 +247,10 @@ dbx_symfile_finish (struct objfile *objfile)
free_header_files ();
}
-dbx_symfile_info::~dbx_symfile_info ()
-{
- if (header_files != NULL)
- {
- int i = n_header_files;
- struct header_file *hfiles = header_files;
-
- while (--i >= 0)
- {
- xfree (hfiles[i].name);
- xfree (hfiles[i].vector);
- }
- xfree (hfiles);
- }
-}
-
-
-
-/* Buffer for reading the symbol table entries. */
-static struct external_nlist symbuf[4096];
-static int symbuf_idx;
-static int symbuf_end;
-
-/* Name of last function encountered. Used in Solaris to approximate
- object file boundaries. */
-static const char *last_function_name;
-
-/* The address in memory of the string table of the object file we are
- reading (which might not be the "main" object file, but might be a
- shared library or some other dynamically loaded thing). This is
- set by read_dbx_symtab when building psymtabs, and by
- read_ofile_symtab when building symtabs, and is used only by
- next_symbol_text. FIXME: If that is true, we don't need it when
- building psymtabs, right? */
-static char *stringtab_global;
-
-/* These variables are used to control fill_symbuf when the stabs
- symbols are not contiguous (as may be the case when a COFF file is
- linked using --split-by-reloc). */
-static const std::vector<asection *> *symbuf_sections;
-static size_t sect_idx;
-static unsigned int symbuf_left;
-static unsigned int symbuf_read;
-
-/* This variable stores a global stabs buffer, if we read stabs into
- memory in one chunk in order to process relocations. */
-static bfd_byte *stabs_data;
-
-/* Refill the symbol table input buffer
- and set the variables that control fetching entries from it.
- Reports an error if no data available.
- This function can read past the end of the symbol table
- (into the string table) but this does no harm. */
-
-static void
-fill_symbuf (bfd *sym_bfd)
-{
- unsigned int count;
- int nbytes;
-
- if (stabs_data)
- {
- nbytes = sizeof (symbuf);
- if (nbytes > symbuf_left)
- nbytes = symbuf_left;
- memcpy (symbuf, stabs_data + symbuf_read, nbytes);
- }
- else if (symbuf_sections == NULL)
- {
- count = sizeof (symbuf);
- nbytes = bfd_read (symbuf, count, sym_bfd);
- }
- else
- {
- if (symbuf_left <= 0)
- {
- file_ptr filepos = (*symbuf_sections)[sect_idx]->filepos;
-
- if (bfd_seek (sym_bfd, filepos, SEEK_SET) != 0)
- perror_with_name (bfd_get_filename (sym_bfd));
- symbuf_left = bfd_section_size ((*symbuf_sections)[sect_idx]);
- symbol_table_offset = filepos - symbuf_read;
- ++sect_idx;
- }
-
- count = symbuf_left;
- if (count > sizeof (symbuf))
- count = sizeof (symbuf);
- nbytes = bfd_read (symbuf, count, sym_bfd);
- }
-
- if (nbytes < 0)
- perror_with_name (bfd_get_filename (sym_bfd));
- else if (nbytes == 0)
- error (_("Premature end of file reading symbol table"));
- symbuf_end = nbytes / symbol_size;
- symbuf_idx = 0;
- symbuf_left -= nbytes;
- symbuf_read += nbytes;
-}
-
-static void
-stabs_seek (int sym_offset)
-{
- if (stabs_data)
- {
- symbuf_read += sym_offset;
- symbuf_left -= sym_offset;
- }
- else
- if (bfd_seek (symfile_bfd, sym_offset, SEEK_CUR) != 0)
- perror_with_name (bfd_get_filename (symfile_bfd));
-}
-
-#define INTERNALIZE_SYMBOL(intern, extern, abfd) \
- { \
- (intern).n_strx = bfd_h_get_32 (abfd, (extern)->e_strx); \
- (intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type); \
- (intern).n_other = 0; \
- (intern).n_desc = bfd_h_get_16 (abfd, (extern)->e_desc); \
- if (bfd_get_sign_extend_vma (abfd)) \
- (intern).n_value = bfd_h_get_signed_32 (abfd, (extern)->e_value); \
- else \
- (intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value); \
- }
-
-/* Invariant: The symbol pointed to by symbuf_idx is the first one
- that hasn't been swapped. Swap the symbol at the same time
- that symbuf_idx is incremented. */
-
-/* dbx allows the text of a symbol name to be continued into the
- next symbol name! When such a continuation is encountered
- (a \ at the end of the text of a name)
- call this function to get the continuation. */
-
-static const char *
-dbx_next_symbol_text (struct objfile *objfile)
-{
- struct internal_nlist nlist;
-
- if (symbuf_idx == symbuf_end)
- fill_symbuf (symfile_bfd);
-
- symnum++;
- INTERNALIZE_SYMBOL (nlist, &symbuf[symbuf_idx], symfile_bfd);
- OBJSTAT (objfile, n_stabs++);
-
- symbuf_idx++;
-
- return nlist.n_strx + stringtab_global + file_string_table_offset;
-}
-
-
-/* Given a name, value pair, find the corresponding
- bincl in the list. Return the partial symtab associated
- with that header_file_location. */
-
-static legacy_psymtab *
-find_corresponding_bincl_psymtab (const char *name, int instance)
-{
- for (const header_file_location &bincl : *bincl_list)
- if (bincl.instance == instance
- && strcmp (name, bincl.name) == 0)
- return bincl.pst;
-
- repeated_header_complaint (name, symnum);
- return (legacy_psymtab *) 0;
-}
-
-/* Set namestring based on nlist. If the string table index is invalid,
- give a fake name, and print a single error message per symbol file read,
- rather than abort the symbol reading or flood the user with messages. */
-
-static const char *
-set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
-{
- const char *namestring;
-
- if (nlist->n_strx + file_string_table_offset
- >= DBX_STRINGTAB_SIZE (objfile)
- || nlist->n_strx + file_string_table_offset < nlist->n_strx)
- {
- complaint (_("bad string table offset in symbol %d"),
- symnum);
- namestring = "<bad string table offset>";
- }
- else
- namestring = (nlist->n_strx + file_string_table_offset
- + DBX_STRINGTAB (objfile));
- return namestring;
-}
-
-static bound_minimal_symbol
-find_stab_function (const char *namestring, const char *filename,
- struct objfile *objfile)
-{
- int n;
-
- const char *colon = strchr (namestring, ':');
- if (colon == NULL)
- n = 0;
- else
- n = colon - namestring;
-
- char *p = (char *) alloca (n + 2);
- strncpy (p, namestring, n);
- p[n] = 0;
-
- bound_minimal_symbol msym
- = lookup_minimal_symbol (current_program_space, p, objfile, filename);
- if (msym.minsym == NULL)
- {
- /* Sun Fortran appends an underscore to the minimal symbol name,
- try again with an appended underscore if the minimal symbol
- was not found. */
- p[n] = '_';
- p[n + 1] = 0;
- msym
- = lookup_minimal_symbol (current_program_space, p, objfile, filename);
- }
-
- if (msym.minsym == NULL && filename != NULL)
- {
- /* Try again without the filename. */
- p[n] = 0;
- msym = lookup_minimal_symbol (current_program_space, p, objfile);
- }
- if (msym.minsym == NULL && filename != NULL)
- {
- /* And try again for Sun Fortran, but without the filename. */
- p[n] = '_';
- p[n + 1] = 0;
- msym = lookup_minimal_symbol (current_program_space, p, objfile);
- }
-
- return msym;
-}
-
-static void
-function_outside_compilation_unit_complaint (const char *arg1)
-{
- complaint (_("function `%s' appears to be defined "
- "outside of all compilation units"),
- arg1);
-}
-
-/* Setup partial_symtab's describing each source file for which
- debugging information is available. */
-
-static void
-read_dbx_symtab (minimal_symbol_reader &reader,
- psymtab_storage *partial_symtabs,
- struct objfile *objfile)
-{
- struct gdbarch *gdbarch = objfile->arch ();
- struct external_nlist *bufp = 0; /* =0 avoids gcc -Wall glitch. */
- struct internal_nlist nlist;
- CORE_ADDR text_addr;
- int text_size;
- const char *sym_name;
- int sym_len;
-
- const char *namestring;
- int nsl;
- int past_first_source_file = 0;
- CORE_ADDR last_function_start = 0;
- bfd *abfd;
- int textlow_not_set;
- int data_sect_index;
-
- /* Current partial symtab. */
- legacy_psymtab *pst;
-
- /* List of current psymtab's include files. */
- const char **psymtab_include_list;
- int includes_allocated;
- int includes_used;
-
- /* Index within current psymtab dependency list. */
- legacy_psymtab **dependency_list;
- int dependencies_used, dependencies_allocated;
-
- text_addr = DBX_TEXT_ADDR (objfile);
- text_size = DBX_TEXT_SIZE (objfile);
-
- /* FIXME. We probably want to change stringtab_global rather than add this
- while processing every symbol entry. FIXME. */
- file_string_table_offset = 0;
- next_file_string_table_offset = 0;
-
- stringtab_global = DBX_STRINGTAB (objfile);
-
- pst = (legacy_psymtab *) 0;
-
- includes_allocated = 30;
- includes_used = 0;
- psymtab_include_list = (const char **) alloca (includes_allocated *
- sizeof (const char *));
-
- dependencies_allocated = 30;
- dependencies_used = 0;
- dependency_list =
- (legacy_psymtab **) alloca (dependencies_allocated *
- sizeof (legacy_psymtab *));
-
- /* Init bincl list */
- std::vector<struct header_file_location> bincl_storage;
- scoped_restore restore_bincl_global
- = make_scoped_restore (&bincl_list, &bincl_storage);
-
- set_last_source_file (NULL);
-
- lowest_text_address = (unrelocated_addr) -1;
-
- symfile_bfd = objfile->obfd.get (); /* For next_text_symbol. */
- abfd = objfile->obfd.get ();
- symbuf_end = symbuf_idx = 0;
- next_symbol_text_func = dbx_next_symbol_text;
- textlow_not_set = 1;
- has_line_numbers = 0;
-
- /* FIXME: jimb/2003-09-12: We don't apply the right section's offset
- to global and static variables. The stab for a global or static
- variable doesn't give us any indication of which section it's in,
- so we can't tell immediately which offset in
- objfile->section_offsets we should apply to the variable's
- address.
-
- We could certainly find out which section contains the variable
- by looking up the variable's unrelocated address with
- find_pc_section, but that would be expensive; this is the
- function that constructs the partial symbol tables by examining
- every symbol in the entire executable, and it's
- performance-critical. So that expense would not be welcome. I'm
- not sure what to do about this at the moment.
-
- What we have done for years is to simply assume that the .data
- section's offset is appropriate for all global and static
- variables. Recently, this was expanded to fall back to the .bss
- section's offset if there is no .data section, and then to the
- .rodata section's offset. */
- data_sect_index = objfile->sect_index_data;
- if (data_sect_index == -1)
- data_sect_index = SECT_OFF_BSS (objfile);
- if (data_sect_index == -1)
- data_sect_index = SECT_OFF_RODATA (objfile);
-
- /* If data_sect_index is still -1, that's okay. It's perfectly fine
- for the file to have no .data, no .bss, and no .text at all, if
- it also has no global or static variables. */
-
- for (symnum = 0; symnum < DBX_SYMCOUNT (objfile); symnum++)
- {
- /* Get the symbol for this run and pull out some info. */
- QUIT; /* Allow this to be interruptable. */
- if (symbuf_idx == symbuf_end)
- fill_symbuf (abfd);
- bufp = &symbuf[symbuf_idx++];
-
- /*
- * Special case to speed up readin.
- */
- if (bfd_h_get_8 (abfd, bufp->e_type) == N_SLINE)
- {
- has_line_numbers = 1;
- continue;
- }
-
- INTERNALIZE_SYMBOL (nlist, bufp, abfd);
- OBJSTAT (objfile, n_stabs++);
-
- /* Ok. There is a lot of code duplicated in the rest of this
- switch statement (for efficiency reasons). Since I don't
- like duplicating code, I will do my penance here, and
- describe the code which is duplicated:
-
- *) The assignment to namestring.
- *) The call to strchr.
- *) The addition of a partial symbol the two partial
- symbol lists. This last is a large section of code, so
- I've embedded it in the following macro. */
-
- switch (nlist.n_type)
- {
- /*
- * Standard, external, non-debugger, symbols
- */
-
- case N_TEXT | N_EXT:
- case N_NBTEXT | N_EXT:
- goto record_it;
-
- case N_DATA | N_EXT:
- case N_NBDATA | N_EXT:
- goto record_it;
-
- case N_BSS:
- case N_BSS | N_EXT:
- case N_NBBSS | N_EXT:
- case N_SETV | N_EXT: /* FIXME, is this in BSS? */
- goto record_it;
-
- case N_ABS | N_EXT:
- record_it:
- namestring = set_namestring (objfile, &nlist);
-
- record_minimal_symbol (reader, namestring,
- unrelocated_addr (nlist.n_value),
- nlist.n_type, objfile); /* Always */
- continue;
-
- /* Standard, local, non-debugger, symbols. */
-
- case N_NBTEXT:
-
- /* We need to be able to deal with both N_FN or N_TEXT,
- because we have no way of knowing whether the sys-supplied ld
- or GNU ld was used to make the executable. Sequents throw
- in another wrinkle -- they renumbered N_FN. */
-
- case N_FN:
- case N_FN_SEQ:
- case N_TEXT:
- namestring = set_namestring (objfile, &nlist);
-
- if ((namestring[0] == '-' && namestring[1] == 'l')
- || (namestring[(nsl = strlen (namestring)) - 1] == 'o'
- && namestring[nsl - 2] == '.'))
- {
- unrelocated_addr unrel_val = unrelocated_addr (nlist.n_value);
-
- if (past_first_source_file && pst
- /* The gould NP1 uses low values for .o and -l symbols
- which are not the address. */
- && unrel_val >= pst->unrelocated_text_low ())
- {
- dbx_end_psymtab (objfile, partial_symtabs,
- pst, psymtab_include_list,
- includes_used, symnum * symbol_size,
- unrel_val > pst->unrelocated_text_high ()
- ? unrel_val : pst->unrelocated_text_high (),
- dependency_list, dependencies_used,
- textlow_not_set);
- pst = (legacy_psymtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- has_line_numbers = 0;
- }
- else
- past_first_source_file = 1;
- }
- else
- goto record_it;
- continue;
-
- case N_DATA:
- goto record_it;
-
- case N_UNDF | N_EXT:
- /* The case (nlist.n_value != 0) is a "Fortran COMMON" symbol.
- We used to rely on the target to tell us whether it knows
- where the symbol has been relocated to, but none of the
- target implementations actually provided that operation.
- So we just ignore the symbol, the same way we would do if
- we had a target-side symbol lookup which returned no match.
-
- All other symbols (with nlist.n_value == 0), are really
- undefined, and so we ignore them too. */
- continue;
-
- case N_UNDF:
- if (processing_acc_compilation && nlist.n_strx == 1)
- {
- /* Deal with relative offsets in the string table
- used in ELF+STAB under Solaris. If we want to use the
- n_strx field, which contains the name of the file,
- we must adjust file_string_table_offset *before* calling
- set_namestring(). */
- past_first_source_file = 1;
- file_string_table_offset = next_file_string_table_offset;
- next_file_string_table_offset =
- file_string_table_offset + nlist.n_value;
- if (next_file_string_table_offset < file_string_table_offset)
- error (_("string table offset backs up at %d"), symnum);
- /* FIXME -- replace error() with complaint. */
- continue;
- }
- continue;
-
- /* Lots of symbol types we can just ignore. */
-
- case N_ABS:
- case N_NBDATA:
- case N_NBBSS:
- continue;
-
- /* Keep going . . . */
-
- /*
- * Special symbol types for GNU
- */
- case N_INDR:
- case N_INDR | N_EXT:
- case N_SETA:
- case N_SETA | N_EXT:
- case N_SETT:
- case N_SETT | N_EXT:
- case N_SETD:
- case N_SETD | N_EXT:
- case N_SETB:
- case N_SETB | N_EXT:
- case N_SETV:
- continue;
-
- /*
- * Debugger symbols
- */
-
- case N_SO:
- {
- CORE_ADDR valu;
- static int prev_so_symnum = -10;
- static int first_so_symnum;
- const char *p;
- static const char *dirname_nso;
- int prev_textlow_not_set;
-
- valu = nlist.n_value;
-
- prev_textlow_not_set = textlow_not_set;
-
- /* A zero value is probably an indication for the SunPRO 3.0
- compiler. dbx_end_psymtab explicitly tests for zero, so
- don't relocate it. */
-
- if (nlist.n_value == 0
- && gdbarch_sofun_address_maybe_missing (gdbarch))
- {
- textlow_not_set = 1;
- valu = 0;
- }
- else
- textlow_not_set = 0;
-
- past_first_source_file = 1;
-
- if (prev_so_symnum != symnum - 1)
- { /* Here if prev stab wasn't N_SO. */
- first_so_symnum = symnum;
-
- if (pst)
- {
- unrelocated_addr unrel_value = unrelocated_addr (valu);
- dbx_end_psymtab (objfile, partial_symtabs,
- pst, psymtab_include_list,
- includes_used, symnum * symbol_size,
- unrel_value > pst->unrelocated_text_high ()
- ? unrel_value
- : pst->unrelocated_text_high (),
- dependency_list, dependencies_used,
- prev_textlow_not_set);
- pst = (legacy_psymtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- has_line_numbers = 0;
- }
- }
-
- prev_so_symnum = symnum;
-
- /* End the current partial symtab and start a new one. */
-
- namestring = set_namestring (objfile, &nlist);
-
- /* Null name means end of .o file. Don't start a new one. */
- if (*namestring == '\000')
- continue;
-
- /* Some compilers (including gcc) emit a pair of initial N_SOs.
- The first one is a directory name; the second the file name.
- If pst exists, is empty, and has a filename ending in '/',
- we assume the previous N_SO was a directory name. */
-
- p = lbasename (namestring);
- if (p != namestring && *p == '\000')
- {
- /* Save the directory name SOs locally, then save it into
- the psymtab when it's created below. */
- dirname_nso = namestring;
- continue;
- }
-
- /* Some other compilers (C++ ones in particular) emit useless
- SOs for non-existant .c files. We ignore all subsequent SOs
- that immediately follow the first. */
-
- if (!pst)
- {
- pst = start_psymtab (partial_symtabs, objfile,
- namestring,
- unrelocated_addr (valu),
- first_so_symnum * symbol_size);
- pst->dirname = dirname_nso;
- dirname_nso = NULL;
- }
- continue;
- }
-
- case N_BINCL:
- {
- enum language tmp_language;
-
- /* Add this bincl to the bincl_list for future EXCLs. No
- need to save the string; it'll be around until
- read_dbx_symtab function returns. */
-
- namestring = set_namestring (objfile, &nlist);
- tmp_language = deduce_language_from_filename (namestring);
-
- /* Only change the psymtab's language if we've learned
- something useful (eg. tmp_language is not language_unknown).
- In addition, to match what start_subfile does, never change
- from C++ to C. */
- if (tmp_language != language_unknown
- && (tmp_language != language_c
- || psymtab_language != language_cplus))
- psymtab_language = tmp_language;
-
- if (pst == NULL)
- {
- /* FIXME: we should not get here without a PST to work on.
- Attempt to recover. */
- complaint (_("N_BINCL %s not in entries for "
- "any file, at symtab pos %d"),
- namestring, symnum);
- continue;
- }
- bincl_list->emplace_back (namestring, nlist.n_value, pst);
-
- /* Mark down an include file in the current psymtab. */
-
- goto record_include_file;
- }
-
- case N_SOL:
- {
- enum language tmp_language;
-
- /* Mark down an include file in the current psymtab. */
- namestring = set_namestring (objfile, &nlist);
- tmp_language = deduce_language_from_filename (namestring);
-
- /* Only change the psymtab's language if we've learned
- something useful (eg. tmp_language is not language_unknown).
- In addition, to match what start_subfile does, never change
- from C++ to C. */
- if (tmp_language != language_unknown
- && (tmp_language != language_c
- || psymtab_language != language_cplus))
- psymtab_language = tmp_language;
-
- /* In C++, one may expect the same filename to come round many
- times, when code is coming alternately from the main file
- and from inline functions in other files. So I check to see
- if this is a file we've seen before -- either the main
- source file, or a previously included file.
-
- This seems to be a lot of time to be spending on N_SOL, but
- things like "break c-exp.y:435" need to work (I
- suppose the psymtab_include_list could be hashed or put
- in a binary tree, if profiling shows this is a major hog). */
- if (pst && filename_cmp (namestring, pst->filename) == 0)
- continue;
- {
- int i;
-
- for (i = 0; i < includes_used; i++)
- if (filename_cmp (namestring, psymtab_include_list[i]) == 0)
- {
- i = -1;
- break;
- }
- if (i == -1)
- continue;
- }
-
- record_include_file:
-
- psymtab_include_list[includes_used++] = namestring;
- if (includes_used >= includes_allocated)
- {
- const char **orig = psymtab_include_list;
-
- psymtab_include_list = (const char **)
- alloca ((includes_allocated *= 2) * sizeof (const char *));
- memcpy (psymtab_include_list, orig,
- includes_used * sizeof (const char *));
- }
- continue;
- }
- case N_LSYM: /* Typedef or automatic variable. */
- case N_STSYM: /* Data seg var -- static. */
- case N_LCSYM: /* BSS " */
- case N_ROSYM: /* Read-only data seg var -- static. */
- case N_NBSTS: /* Gould nobase. */
- case N_NBLCS: /* symbols. */
- case N_FUN:
- case N_GSYM: /* Global (extern) variable; can be
- data or bss (sigh FIXME). */
-
- /* Following may probably be ignored; I'll leave them here
- for now (until I do Pascal and Modula 2 extensions). */
-
- case N_PC: /* I may or may not need this; I
- suspect not. */
- case N_M2C: /* I suspect that I can ignore this here. */
- case N_SCOPE: /* Same. */
- {
- const char *p;
-
- namestring = set_namestring (objfile, &nlist);
-
- /* See if this is an end of function stab. */
- if (pst && nlist.n_type == N_FUN && *namestring == '\000')
- {
- unrelocated_addr valu;
-
- /* It's value is the size (in bytes) of the function for
- function relative stabs, or the address of the function's
- end for old style stabs. */
- valu = unrelocated_addr (nlist.n_value + last_function_start);
- if (pst->unrelocated_text_high () == unrelocated_addr (0)
- || valu > pst->unrelocated_text_high ())
- pst->set_text_high (valu);
- break;
- }
-
- p = (char *) strchr (namestring, ':');
- if (!p)
- continue; /* Not a debugging symbol. */
-
- sym_len = 0;
- sym_name = NULL; /* pacify "gcc -Werror" */
- if (psymtab_language == language_cplus)
- {
- std::string name (namestring, p - namestring);
- gdb::unique_xmalloc_ptr<char> new_name
- = cp_canonicalize_string (name.c_str ());
- if (new_name != nullptr)
- {
- sym_len = strlen (new_name.get ());
- sym_name = obstack_strdup (&objfile->objfile_obstack,
- new_name.get ());
- }
- }
- else if (psymtab_language == language_c)
- {
- std::string name (namestring, p - namestring);
- gdb::unique_xmalloc_ptr<char> new_name
- = c_canonicalize_name (name.c_str ());
- if (new_name != nullptr)
- {
- sym_len = strlen (new_name.get ());
- sym_name = obstack_strdup (&objfile->objfile_obstack,
- new_name.get ());
- }
- }
-
- if (sym_len == 0)
- {
- sym_name = namestring;
- sym_len = p - namestring;
- }
-
- /* Main processing section for debugging symbols which
- the initial read through the symbol tables needs to worry
- about. If we reach this point, the symbol which we are
- considering is definitely one we are interested in.
- p must also contain the (valid) index into the namestring
- which indicates the debugging type symbol. */
-
- switch (p[1])
- {
- case 'S':
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (sym_name, sym_len), true,
- VAR_DOMAIN, LOC_STATIC,
- data_sect_index,
- psymbol_placement::STATIC,
- unrelocated_addr (nlist.n_value),
- psymtab_language,
- partial_symtabs, objfile);
- else
- complaint (_("static `%*s' appears to be defined "
- "outside of all compilation units"),
- sym_len, sym_name);
- continue;
-
- case 'G':
- /* The addresses in these entries are reported to be
- wrong. See the code that reads 'G's for symtabs. */
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (sym_name, sym_len), true,
- VAR_DOMAIN, LOC_STATIC,
- data_sect_index,
- psymbol_placement::GLOBAL,
- unrelocated_addr (nlist.n_value),
- psymtab_language,
- partial_symtabs, objfile);
- else
- complaint (_("global `%*s' appears to be defined "
- "outside of all compilation units"),
- sym_len, sym_name);
- continue;
-
- case 'T':
- /* When a 'T' entry is defining an anonymous enum, it
- may have a name which is the empty string, or a
- single space. Since they're not really defining a
- symbol, those shouldn't go in the partial symbol
- table. We do pick up the elements of such enums at
- 'check_enum:', below. */
- if (p >= namestring + 2
- || (p == namestring + 1
- && namestring[0] != ' '))
- {
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (sym_name, sym_len),
- true, STRUCT_DOMAIN, LOC_TYPEDEF, -1,
- psymbol_placement::STATIC,
- unrelocated_addr (0),
- psymtab_language,
- partial_symtabs, objfile);
- else
- complaint (_("enum, struct, or union `%*s' appears "
- "to be defined outside of all "
- "compilation units"),
- sym_len, sym_name);
- if (p[2] == 't')
- {
- /* Also a typedef with the same name. */
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (sym_name, sym_len),
- true, VAR_DOMAIN, LOC_TYPEDEF, -1,
- psymbol_placement::STATIC,
- unrelocated_addr (0),
- psymtab_language,
- partial_symtabs, objfile);
- else
- complaint (_("typedef `%*s' appears to be defined "
- "outside of all compilation units"),
- sym_len, sym_name);
- p += 1;
- }
- }
- goto check_enum;
-
- case 't':
- if (p != namestring) /* a name is there, not just :T... */
- {
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (sym_name, sym_len),
- true, VAR_DOMAIN, LOC_TYPEDEF, -1,
- psymbol_placement::STATIC,
- unrelocated_addr (0),
- psymtab_language,
- partial_symtabs, objfile);
- else
- complaint (_("typename `%*s' appears to be defined "
- "outside of all compilation units"),
- sym_len, sym_name);
- }
- check_enum:
- /* If this is an enumerated type, we need to
- add all the enum constants to the partial symbol
- table. This does not cover enums without names, e.g.
- "enum {a, b} c;" in C, but fortunately those are
- rare. There is no way for GDB to find those from the
- enum type without spending too much time on it. Thus
- to solve this problem, the compiler needs to put out the
- enum in a nameless type. GCC2 does this. */
-
- /* We are looking for something of the form
- <name> ":" ("t" | "T") [<number> "="] "e"
- {<constant> ":" <value> ","} ";". */
-
- /* Skip over the colon and the 't' or 'T'. */
- p += 2;
- /* This type may be given a number. Also, numbers can come
- in pairs like (0,26). Skip over it. */
- while ((*p >= '0' && *p <= '9')
- || *p == '(' || *p == ',' || *p == ')'
- || *p == '=')
- p++;
-
- if (*p++ == 'e')
- {
- /* The aix4 compiler emits extra crud before the members. */
- if (*p == '-')
- {
- /* Skip over the type (?). */
- while (*p != ':')
- p++;
-
- /* Skip over the colon. */
- p++;
- }
-
- /* We have found an enumerated type. */
- /* According to comments in read_enum_type
- a comma could end it instead of a semicolon.
- I don't know where that happens.
- Accept either. */
- while (*p && *p != ';' && *p != ',')
- {
- const char *q;
-
- /* Check for and handle cretinous dbx symbol name
- continuation! */
- if (*p == '\\' || (*p == '?' && p[1] == '\0'))
- p = next_symbol_text (objfile);
-
- /* Point to the character after the name
- of the enum constant. */
- for (q = p; *q && *q != ':'; q++)
- ;
- /* Note that the value doesn't matter for
- enum constants in psymtabs, just in symtabs. */
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (p, q - p), true,
- VAR_DOMAIN, LOC_CONST, -1,
- psymbol_placement::STATIC,
- unrelocated_addr (0),
- psymtab_language,
- partial_symtabs, objfile);
- else
- complaint (_("enum constant `%*s' appears to be defined "
- "outside of all compilation units"),
- ((int) (q - p)), p);
- /* Point past the name. */
- p = q;
- /* Skip over the value. */
- while (*p && *p != ',')
- p++;
- /* Advance past the comma. */
- if (*p)
- p++;
- }
- }
- continue;
-
- case 'c':
- /* Constant, e.g. from "const" in Pascal. */
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (sym_name, sym_len), true,
- VAR_DOMAIN, LOC_CONST, -1,
- psymbol_placement::STATIC,
- unrelocated_addr (0),
- psymtab_language,
- partial_symtabs, objfile);
- else
- complaint (_("constant `%*s' appears to be defined "
- "outside of all compilation units"),
- sym_len, sym_name);
-
- continue;
-
- case 'f':
- if (! pst)
- {
- std::string name (namestring, (p - namestring));
- function_outside_compilation_unit_complaint (name.c_str ());
- }
- /* Kludges for ELF/STABS with Sun ACC. */
- last_function_name = namestring;
- /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
- value for the bottom of the text seg in those cases. */
- if (nlist.n_value == 0
- && gdbarch_sofun_address_maybe_missing (gdbarch))
- {
- bound_minimal_symbol minsym
- = find_stab_function (namestring,
- pst ? pst->filename : NULL, objfile);
- if (minsym.minsym != NULL)
- nlist.n_value
- = CORE_ADDR (minsym.minsym->unrelocated_address ());
- }
- if (pst && textlow_not_set
- && gdbarch_sofun_address_maybe_missing (gdbarch))
- {
- pst->set_text_low (unrelocated_addr (nlist.n_value));
- textlow_not_set = 0;
- }
- /* End kludge. */
-
- /* Keep track of the start of the last function so we
- can handle end of function symbols. */
- last_function_start = nlist.n_value;
-
- /* In reordered executables this function may lie outside
- the bounds created by N_SO symbols. If that's the case
- use the address of this function as the low bound for
- the partial symbol table. */
- if (pst
- && (textlow_not_set
- || (unrelocated_addr (nlist.n_value)
- < pst->unrelocated_text_low ()
- && (nlist.n_value != 0))))
- {
- pst->set_text_low (unrelocated_addr (nlist.n_value));
- textlow_not_set = 0;
- }
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (sym_name, sym_len), true,
- VAR_DOMAIN, LOC_BLOCK,
- SECT_OFF_TEXT (objfile),
- psymbol_placement::STATIC,
- unrelocated_addr (nlist.n_value),
- psymtab_language,
- partial_symtabs, objfile);
- continue;
-
- /* Global functions were ignored here, but now they
- are put into the global psymtab like one would expect.
- They're also in the minimal symbol table. */
- case 'F':
- if (! pst)
- {
- std::string name (namestring, (p - namestring));
- function_outside_compilation_unit_complaint (name.c_str ());
- }
- /* Kludges for ELF/STABS with Sun ACC. */
- last_function_name = namestring;
- /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
- value for the bottom of the text seg in those cases. */
- if (nlist.n_value == 0
- && gdbarch_sofun_address_maybe_missing (gdbarch))
- {
- bound_minimal_symbol minsym
- = find_stab_function (namestring,
- pst ? pst->filename : NULL, objfile);
- if (minsym.minsym != NULL)
- nlist.n_value
- = CORE_ADDR (minsym.minsym->unrelocated_address ());
- }
- if (pst && textlow_not_set
- && gdbarch_sofun_address_maybe_missing (gdbarch))
- {
- pst->set_text_low (unrelocated_addr (nlist.n_value));
- textlow_not_set = 0;
- }
- /* End kludge. */
-
- /* Keep track of the start of the last function so we
- can handle end of function symbols. */
- last_function_start = nlist.n_value;
-
- /* In reordered executables this function may lie outside
- the bounds created by N_SO symbols. If that's the case
- use the address of this function as the low bound for
- the partial symbol table. */
- if (pst
- && (textlow_not_set
- || (unrelocated_addr (nlist.n_value)
- < pst->unrelocated_text_low ()
- && (nlist.n_value != 0))))
- {
- pst->set_text_low (unrelocated_addr (nlist.n_value));
- textlow_not_set = 0;
- }
- if (pst != nullptr)
- pst->add_psymbol (std::string_view (sym_name, sym_len), true,
- VAR_DOMAIN, LOC_BLOCK,
- SECT_OFF_TEXT (objfile),
- psymbol_placement::GLOBAL,
- unrelocated_addr (nlist.n_value),
- psymtab_language,
- partial_symtabs, objfile);
- continue;
-
- /* Two things show up here (hopefully); static symbols of
- local scope (static used inside braces) or extensions
- of structure symbols. We can ignore both. */
- case 'V':
- case '(':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case '-':
- case '#': /* For symbol identification (used in live ranges). */
- continue;
-
- case ':':
- /* It is a C++ nested symbol. We don't need to record it
- (I don't think); if we try to look up foo::bar::baz,
- then symbols for the symtab containing foo should get
- read in, I think. */
- /* Someone says sun cc puts out symbols like
- /foo/baz/maclib::/usr/local/bin/maclib,
- which would get here with a symbol type of ':'. */
- continue;
-
- default:
- /* Unexpected symbol descriptor. The second and subsequent stabs
- of a continued stab can show up here. The question is
- whether they ever can mimic a normal stab--it would be
- nice if not, since we certainly don't want to spend the
- time searching to the end of every string looking for
- a backslash. */
-
- complaint (_("unknown symbol descriptor `%c'"),
- p[1]);
-
- /* Ignore it; perhaps it is an extension that we don't
- know about. */
- continue;
- }
- }
-
- case N_EXCL:
-
- namestring = set_namestring (objfile, &nlist);
-
- /* Find the corresponding bincl and mark that psymtab on the
- psymtab dependency list. */
- {
- legacy_psymtab *needed_pst =
- find_corresponding_bincl_psymtab (namestring, nlist.n_value);
-
- /* If this include file was defined earlier in this file,
- leave it alone. */
- if (needed_pst == pst)
- continue;
-
- if (needed_pst)
- {
- int i;
- int found = 0;
-
- for (i = 0; i < dependencies_used; i++)
- if (dependency_list[i] == needed_pst)
- {
- found = 1;
- break;
- }
-
- /* If it's already in the list, skip the rest. */
- if (found)
- continue;
-
- dependency_list[dependencies_used++] = needed_pst;
- if (dependencies_used >= dependencies_allocated)
- {
- legacy_psymtab **orig = dependency_list;
-
- dependency_list =
- (legacy_psymtab **)
- alloca ((dependencies_allocated *= 2)
- * sizeof (legacy_psymtab *));
- memcpy (dependency_list, orig,
- (dependencies_used
- * sizeof (legacy_psymtab *)));
-#ifdef DEBUG_INFO
- gdb_printf (gdb_stderr,
- "Had to reallocate "
- "dependency list.\n");
- gdb_printf (gdb_stderr,
- "New dependencies allocated: %d\n",
- dependencies_allocated);
-#endif
- }
- }
- }
- continue;
-
- case N_ENDM:
- /* Solaris 2 end of module, finish current partial symbol
- table. dbx_end_psymtab will set the high text address of
- PST to the proper value, which is necessary if a module
- compiled without debugging info follows this module. */
- if (pst && gdbarch_sofun_address_maybe_missing (gdbarch))
- {
- dbx_end_psymtab (objfile, partial_symtabs, pst,
- psymtab_include_list, includes_used,
- symnum * symbol_size,
- (unrelocated_addr) 0, dependency_list,
- dependencies_used, textlow_not_set);
- pst = (legacy_psymtab *) 0;
- includes_used = 0;
- dependencies_used = 0;
- has_line_numbers = 0;
- }
- continue;
-
- case N_RBRAC:
-#ifdef HANDLE_RBRAC
- HANDLE_RBRAC (nlist.n_value);
- continue;
-#endif
- case N_EINCL:
- case N_DSLINE:
- case N_BSLINE:
- case N_SSYM: /* Claim: Structure or union element.
- Hopefully, I can ignore this. */
- case N_ENTRY: /* Alternate entry point; can ignore. */
- case N_MAIN: /* Can definitely ignore this. */
- case N_CATCH: /* These are GNU C++ extensions */
- case N_EHDECL: /* that can safely be ignored here. */
- case N_LENG:
- case N_BCOMM:
- case N_ECOMM:
- case N_ECOML:
- case N_FNAME:
- case N_SLINE:
- case N_RSYM:
- case N_PSYM:
- case N_BNSYM:
- case N_ENSYM:
- case N_LBRAC:
- case N_NSYMS: /* Ultrix 4.0: symbol count */
- case N_DEFD: /* GNU Modula-2 */
- case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
-
- case N_OBJ: /* Useless types from Solaris. */
- case N_OPT:
- case N_PATCH:
- /* These symbols aren't interesting; don't worry about them. */
- continue;
-
- default:
- /* If we haven't found it yet, ignore it. It's probably some
- new type we don't know about yet. */
- unknown_symtype_complaint (hex_string (nlist.n_type));
- continue;
- }
- }
-
- /* If there's stuff to be cleaned up, clean it up. */
- if (pst)
- {
- /* Don't set high text address of PST lower than it already
- is. */
- unrelocated_addr text_end
- = (unrelocated_addr
- ((lowest_text_address == (unrelocated_addr) -1
- ? text_addr
- : CORE_ADDR (lowest_text_address))
- + text_size));
-
- dbx_end_psymtab (objfile, partial_symtabs,
- pst, psymtab_include_list, includes_used,
- symnum * symbol_size,
- (text_end > pst->unrelocated_text_high ()
- ? text_end : pst->unrelocated_text_high ()),
- dependency_list, dependencies_used, textlow_not_set);
- }
-}
-
-/* Allocate and partially fill a partial symtab. It will be
- completely filled at the end of the symbol list.
-
- SYMFILE_NAME is the name of the symbol-file we are reading from, and ADDR
- is the address relative to which its symbols are (incremental) or 0
- (normal). */
-
-static legacy_psymtab *
-start_psymtab (psymtab_storage *partial_symtabs, struct objfile *objfile,
- const char *filename, unrelocated_addr textlow, int ldsymoff)
-{
- legacy_psymtab *result = new legacy_psymtab (filename, partial_symtabs,
- objfile->per_bfd, textlow);
-
- result->read_symtab_private =
- XOBNEW (&objfile->objfile_obstack, struct symloc);
- LDSYMOFF (result) = ldsymoff;
- result->legacy_read_symtab = dbx_read_symtab;
- result->legacy_expand_psymtab = dbx_expand_psymtab;
- SYMBOL_SIZE (result) = symbol_size;
- SYMBOL_OFFSET (result) = symbol_table_offset;
- STRING_OFFSET (result) = string_table_offset;
- FILE_STRING_OFFSET (result) = file_string_table_offset;
-
- /* Deduce the source language from the filename for this psymtab. */
- psymtab_language = deduce_language_from_filename (filename);
- PST_LANGUAGE (result) = psymtab_language;
-
- return result;
-}
-
-/* Close off the current usage of PST.
- Returns PST or NULL if the partial symtab was empty and thrown away.
-
- FIXME: List variables and peculiarities of same. */
-
-legacy_psymtab *
-dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
- legacy_psymtab *pst,
- const char **include_list, int num_includes,
- int capping_symbol_offset, unrelocated_addr capping_text,
- legacy_psymtab **dependency_list,
- int number_dependencies,
- int textlow_not_set)
-{
- int i;
- struct gdbarch *gdbarch = objfile->arch ();
-
- if (capping_symbol_offset != -1)
- LDSYMLEN (pst) = capping_symbol_offset - LDSYMOFF (pst);
- pst->set_text_high (capping_text);
-
- /* Under Solaris, the N_SO symbols always have a value of 0,
- instead of the usual address of the .o file. Therefore,
- we have to do some tricks to fill in texthigh and textlow.
- The first trick is: if we see a static
- or global function, and the textlow for the current pst
- is not set (ie: textlow_not_set), then we use that function's
- address for the textlow of the pst. */
-
- /* Now, to fill in texthigh, we remember the last function seen
- in the .o file. Also, there's a hack in
- bfd/elf.c and gdb/elfread.c to pass the ELF st_size field
- to here via the misc_info field. Therefore, we can fill in
- a reliable texthigh by taking the address plus size of the
- last function in the file. */
-
- if (!pst->text_high_valid && last_function_name
- && gdbarch_sofun_address_maybe_missing (gdbarch))
- {
- int n;
-
- const char *colon = strchr (last_function_name, ':');
- if (colon == NULL)
- n = 0;
- else
- n = colon - last_function_name;
- char *p = (char *) alloca (n + 2);
- strncpy (p, last_function_name, n);
- p[n] = 0;
-
- bound_minimal_symbol minsym
- = lookup_minimal_symbol (current_program_space, p, objfile,
- pst->filename);
- if (minsym.minsym == NULL)
- {
- /* Sun Fortran appends an underscore to the minimal symbol name,
- try again with an appended underscore if the minimal symbol
- was not found. */
- p[n] = '_';
- p[n + 1] = 0;
- minsym = lookup_minimal_symbol (current_program_space, p, objfile,
- pst->filename);
- }
-
- if (minsym.minsym)
- pst->set_text_high
- (unrelocated_addr (CORE_ADDR (minsym.minsym->unrelocated_address ())
- + minsym.minsym->size ()));
-
- last_function_name = NULL;
- }
-
- if (!gdbarch_sofun_address_maybe_missing (gdbarch))
- ;
- /* This test will be true if the last .o file is only data. */
- else if (textlow_not_set)
- pst->set_text_low (pst->unrelocated_text_high ());
- else
- {
- /* If we know our own starting text address, then walk through all other
- psymtabs for this objfile, and if any didn't know their ending text
- address, set it to our starting address. Take care to not set our
- own ending address to our starting address. */
-
- for (partial_symtab *p1 : partial_symtabs->range ())
- if (!p1->text_high_valid && p1->text_low_valid && p1 != pst)
- p1->set_text_high (pst->unrelocated_text_low ());
- }
-
- /* End of kludge for patching Solaris textlow and texthigh. */
-
- pst->end ();
-
- pst->number_of_dependencies = number_dependencies;
- if (number_dependencies)
- {
- pst->dependencies
- = partial_symtabs->allocate_dependencies (number_dependencies);
- memcpy (pst->dependencies, dependency_list,
- number_dependencies * sizeof (legacy_psymtab *));
- }
- else
- pst->dependencies = 0;
-
- for (i = 0; i < num_includes; i++)
- {
- legacy_psymtab *subpst =
- new legacy_psymtab (include_list[i], partial_symtabs, objfile->per_bfd);
-
- subpst->read_symtab_private =
- XOBNEW (&objfile->objfile_obstack, struct symloc);
- LDSYMOFF (subpst) =
- LDSYMLEN (subpst) = 0;
-
- /* We could save slight bits of space by only making one of these,
- shared by the entire set of include files. FIXME-someday. */
- subpst->dependencies =
- partial_symtabs->allocate_dependencies (1);
- subpst->dependencies[0] = pst;
- subpst->number_of_dependencies = 1;
-
- subpst->legacy_read_symtab = pst->legacy_read_symtab;
- subpst->legacy_expand_psymtab = pst->legacy_expand_psymtab;
- }
-
- if (num_includes == 0
- && number_dependencies == 0
- && pst->empty ()
- && has_line_numbers == 0)
- {
- /* Throw away this psymtab, it's empty. */
- /* Empty psymtabs happen as a result of header files which don't have
- any symbols in them. There can be a lot of them. But this check
- is wrong, in that a psymtab with N_SLINE entries but nothing else
- is not empty, but we don't realize that. Fixing that without slowing
- things down might be tricky. */
-
- partial_symtabs->discard_psymtab (pst);
-
- /* Indicate that psymtab was thrown away. */
- pst = NULL;
- }
- return pst;
-}
-static void
-dbx_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile)
-{
- gdb_assert (!pst->readin);
-
- /* Read in all partial symtabs on which this one is dependent. */
- pst->expand_dependencies (objfile);
-
- if (LDSYMLEN (pst)) /* Otherwise it's a dummy. */
- {
- /* Init stuff necessary for reading in symbols */
- stabsread_init ();
- scoped_free_pendings free_pending;
- file_string_table_offset = FILE_STRING_OFFSET (pst);
- symbol_size = SYMBOL_SIZE (pst);
-
- /* Read in this file's symbols. */
- if (bfd_seek (objfile->obfd.get (), SYMBOL_OFFSET (pst), SEEK_SET) == 0)
- read_ofile_symtab (objfile, pst);
- }
- pst->readin = true;
-}
-
-/* Read in all of the symbols for a given psymtab for real.
- Be verbose about it if the user wants that. SELF is not NULL. */
-
-static void
-dbx_read_symtab (legacy_psymtab *self, struct objfile *objfile)
-{
- gdb_assert (!self->readin);
-
- if (LDSYMLEN (self) || self->number_of_dependencies)
- {
- next_symbol_text_func = dbx_next_symbol_text;
-
- {
- scoped_restore restore_stabs_data = make_scoped_restore (&stabs_data);
- gdb::unique_xmalloc_ptr<gdb_byte> data_holder;
- if (DBX_STAB_SECTION (objfile))
- {
- stabs_data
- = symfile_relocate_debug_section (objfile,
- DBX_STAB_SECTION (objfile),
- NULL);
- data_holder.reset (stabs_data);
- }
-
- self->expand_psymtab (objfile);
- }
-
- /* Match with global symbols. This only needs to be done once,
- after all of the symtabs and dependencies have been read in. */
- scan_file_globals (objfile);
- }
-}
-
-/* Read in a defined section of a specific object file's symbols. */
-
-static void
-read_ofile_symtab (struct objfile *objfile, legacy_psymtab *pst)
-{
- const char *namestring;
- struct external_nlist *bufp;
- struct internal_nlist nlist;
- unsigned char type;
- unsigned max_symnum;
- bfd *abfd;
- int sym_offset; /* Offset to start of symbols to read */
- int sym_size; /* Size of symbols to read */
- CORE_ADDR text_offset; /* Start of text segment for symbols */
- int text_size; /* Size of text segment for symbols */
-
- sym_offset = LDSYMOFF (pst);
- sym_size = LDSYMLEN (pst);
- text_offset = pst->text_low (objfile);
- text_size = pst->text_high (objfile) - pst->text_low (objfile);
- const section_offsets &section_offsets = objfile->section_offsets;
-
- dbxread_objfile = objfile;
-
- stringtab_global = DBX_STRINGTAB (objfile);
- set_last_source_file (NULL);
-
- abfd = objfile->obfd.get ();
- symfile_bfd = objfile->obfd.get (); /* Implicit param to next_text_symbol. */
- symbuf_end = symbuf_idx = 0;
- symbuf_read = 0;
- symbuf_left = sym_offset + sym_size;
-
- /* It is necessary to actually read one symbol *before* the start
- of this symtab's symbols, because the GCC_COMPILED_FLAG_SYMBOL
- occurs before the N_SO symbol.
-
- Detecting this in read_dbx_symtab
- would slow down initial readin, so we look for it here instead. */
- if (!processing_acc_compilation && sym_offset >= (int) symbol_size)
- {
- stabs_seek (sym_offset - symbol_size);
- fill_symbuf (abfd);
- bufp = &symbuf[symbuf_idx++];
- INTERNALIZE_SYMBOL (nlist, bufp, abfd);
- OBJSTAT (objfile, n_stabs++);
-
- namestring = set_namestring (objfile, &nlist);
-
- processing_gcc_compilation = 0;
- if (nlist.n_type == N_TEXT)
- {
- const char *tempstring = namestring;
-
- if (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0)
- processing_gcc_compilation = 1;
- else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0)
- processing_gcc_compilation = 2;
- if (*tempstring != '\0'
- && *tempstring == bfd_get_symbol_leading_char (symfile_bfd))
- ++tempstring;
- if (startswith (tempstring, "__gnu_compiled"))
- processing_gcc_compilation = 2;
- }
- }
- else
- {
- /* The N_SO starting this symtab is the first symbol, so we
- better not check the symbol before it. I'm not this can
- happen, but it doesn't hurt to check for it. */
- stabs_seek (sym_offset);
- processing_gcc_compilation = 0;
- }
-
- if (symbuf_idx == symbuf_end)
- fill_symbuf (abfd);
- bufp = &symbuf[symbuf_idx];
- if (bfd_h_get_8 (abfd, bufp->e_type) != N_SO)
- error (_("First symbol in segment of executable not a source symbol"));
-
- max_symnum = sym_size / symbol_size;
-
- for (symnum = 0;
- symnum < max_symnum;
- symnum++)
- {
- QUIT; /* Allow this to be interruptable. */
- if (symbuf_idx == symbuf_end)
- fill_symbuf (abfd);
- bufp = &symbuf[symbuf_idx++];
- INTERNALIZE_SYMBOL (nlist, bufp, abfd);
- OBJSTAT (objfile, n_stabs++);
-
- type = bfd_h_get_8 (abfd, bufp->e_type);
-
- namestring = set_namestring (objfile, &nlist);
-
- if (type & N_STAB)
- {
- if (sizeof (nlist.n_value) > 4
- /* We are a 64-bit debugger debugging a 32-bit program. */
- && (type == N_LSYM || type == N_PSYM))
- /* We have to be careful with the n_value in the case of N_LSYM
- and N_PSYM entries, because they are signed offsets from frame
- pointer, but we actually read them as unsigned 32-bit values.
- This is not a problem for 32-bit debuggers, for which negative
- values end up being interpreted correctly (as negative
- offsets) due to integer overflow.
- But we need to sign-extend the value for 64-bit debuggers,
- or we'll end up interpreting negative values as very large
- positive offsets. */
- nlist.n_value = (nlist.n_value ^ 0x80000000) - 0x80000000;
- process_one_symbol (type, nlist.n_desc, nlist.n_value,
- namestring, section_offsets, objfile,
- PST_LANGUAGE (pst));
- }
- /* We skip checking for a new .o or -l file; that should never
- happen in this routine. */
- else if (type == N_TEXT)
- {
- /* I don't think this code will ever be executed, because
- the GCC_COMPILED_FLAG_SYMBOL usually is right before
- the N_SO symbol which starts this source file.
- However, there is no reason not to accept
- the GCC_COMPILED_FLAG_SYMBOL anywhere. */
-
- if (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0)
- processing_gcc_compilation = 1;
- else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0)
- processing_gcc_compilation = 2;
- }
- else if (type & N_EXT || type == (unsigned char) N_TEXT
- || type == (unsigned char) N_NBTEXT)
- {
- /* Global symbol: see if we came across a dbx definition for
- a corresponding symbol. If so, store the value. Remove
- syms from the chain when their values are stored, but
- search the whole chain, as there may be several syms from
- different files with the same name. */
- /* This is probably not true. Since the files will be read
- in one at a time, each reference to a global symbol will
- be satisfied in each file as it appears. So we skip this
- section. */
- ;
- }
- }
-
- /* In a Solaris elf file, this variable, which comes from the value
- of the N_SO symbol, will still be 0. Luckily, text_offset, which
- comes from low text address of PST, is correct. */
- if (get_last_source_start_addr () == 0)
- set_last_source_start_addr (text_offset);
-
- /* In reordered executables last_source_start_addr may not be the
- lower bound for this symtab, instead use text_offset which comes
- from the low text address of PST, which is correct. */
- if (get_last_source_start_addr () > text_offset)
- set_last_source_start_addr (text_offset);
-
- pst->compunit_symtab = end_compunit_symtab (text_offset + text_size);
-
- end_stabs ();
-
- dbxread_objfile = NULL;
-}
-
-/* Record the namespace that the function defined by SYMBOL was
- defined in, if necessary. BLOCK is the associated block; use
- OBSTACK for allocation. */
-
-static void
-cp_set_block_scope (const struct symbol *symbol,
- struct block *block,
- struct obstack *obstack)
-{
- if (symbol->demangled_name () != NULL)
- {
- /* Try to figure out the appropriate namespace from the
- demangled name. */
-
- /* FIXME: carlton/2003-04-15: If the function in question is
- a method of a class, the name will actually include the
- name of the class as well. This should be harmless, but
- is a little unfortunate. */
-
- const char *name = symbol->demangled_name ();
- unsigned int prefix_len = cp_entire_prefix_len (name);
-
- block->set_scope (obstack_strndup (obstack, name, prefix_len),
- obstack);
- }
-}
-
-/* This handles a single symbol from the symbol-file, building symbols
- into a GDB symtab. It takes these arguments and an implicit argument.
-
- TYPE is the type field of the ".stab" symbol entry.
- DESC is the desc field of the ".stab" entry.
- VALU is the value field of the ".stab" entry.
- NAME is the symbol name, in our address space.
- SECTION_OFFSETS is a set of amounts by which the sections of this
- object file were relocated when it was loaded into memory. Note
- that these section_offsets are not the objfile->section_offsets but
- the pst->section_offsets. All symbols that refer to memory
- locations need to be offset by these amounts.
- OBJFILE is the object file from which we are reading symbols. It
- is used in end_compunit_symtab.
- LANGUAGE is the language of the symtab.
-*/
-
-void
-process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
- const section_offsets &section_offsets,
- struct objfile *objfile, enum language language)
-{
- struct gdbarch *gdbarch = objfile->arch ();
- struct context_stack *newobj;
- struct context_stack cstk;
- /* This remembers the address of the start of a function. It is
- used because in Solaris 2, N_LBRAC, N_RBRAC, and N_SLINE entries
- are relative to the current function's start address. On systems
- other than Solaris 2, this just holds the SECT_OFF_TEXT value,
- and is used to relocate these symbol types rather than
- SECTION_OFFSETS. */
- static CORE_ADDR function_start_offset;
-
- /* This holds the address of the start of a function, without the
- system peculiarities of function_start_offset. */
- static CORE_ADDR last_function_start;
-
- /* If this is nonzero, we've seen an N_SLINE since the start of the
- current function. We use this to tell us to move the first sline
- to the beginning of the function regardless of what its given
- value is. */
- static int sline_found_in_function = 1;
-
- /* If this is nonzero, we've seen a non-gcc N_OPT symbol for this
- source file. Used to detect the SunPRO solaris compiler. */
- static int n_opt_found;
-
- /* The section index for this symbol. */
- int section_index = -1;
-
- /* Something is wrong if we see real data before seeing a source
- file name. */
-
- if (get_last_source_file () == NULL && type != (unsigned char) N_SO)
- {
- /* Ignore any symbols which appear before an N_SO symbol.
- Currently no one puts symbols there, but we should deal
- gracefully with the case. A complain()t might be in order,
- but this should not be an error (). */
- return;
- }
-
- switch (type)
- {
- case N_FUN:
- case N_FNAME:
-
- if (*name == '\000')
- {
- /* This N_FUN marks the end of a function. This closes off
- the current block. */
- struct block *block;
-
- if (outermost_context_p ())
- {
- lbrac_mismatch_complaint (symnum);
- break;
- }
-
- /* The following check is added before recording line 0 at
- end of function so as to handle hand-generated stabs
- which may have an N_FUN stabs at the end of the function,
- but no N_SLINE stabs. */
- if (sline_found_in_function)
- {
- CORE_ADDR addr = last_function_start + valu;
-
- record_line
- (get_current_subfile (), 0,
- unrelocated_addr (gdbarch_addr_bits_remove (gdbarch, addr)
- - objfile->text_section_offset ()));
- }
-
- within_function = 0;
- cstk = pop_context ();
-
- /* Make a block for the local symbols within. */
- block = finish_block (cstk.name,
- cstk.old_blocks, NULL,
- cstk.start_addr, cstk.start_addr + valu);
-
- /* For C++, set the block's scope. */
- if (cstk.name->language () == language_cplus)
- cp_set_block_scope (cstk.name, block, &objfile->objfile_obstack);
-
- /* May be switching to an assembler file which may not be using
- block relative stabs, so reset the offset. */
- function_start_offset = 0;
-
- break;
- }
-
- sline_found_in_function = 0;
-
- /* Relocate for dynamic loading. */
- section_index = SECT_OFF_TEXT (objfile);
- valu += section_offsets[SECT_OFF_TEXT (objfile)];
- valu = gdbarch_addr_bits_remove (gdbarch, valu);
- last_function_start = valu;
-
- goto define_a_symbol;
-
- case N_LBRAC:
- /* This "symbol" just indicates the start of an inner lexical
- context within a function. */
-
- /* Ignore extra outermost context from SunPRO cc and acc. */
- if (n_opt_found && desc == 1)
- break;
-
- valu += function_start_offset;
-
- push_context (desc, valu);
- break;
-
- case N_RBRAC:
- /* This "symbol" just indicates the end of an inner lexical
- context that was started with N_LBRAC. */
-
- /* Ignore extra outermost context from SunPRO cc and acc. */
- if (n_opt_found && desc == 1)
- break;
-
- valu += function_start_offset;
-
- if (outermost_context_p ())
- {
- lbrac_mismatch_complaint (symnum);
- break;
- }
-
- cstk = pop_context ();
- if (desc != cstk.depth)
- lbrac_mismatch_complaint (symnum);
-
- if (*get_local_symbols () != NULL)
- {
- /* GCC development snapshots from March to December of
- 2000 would output N_LSYM entries after N_LBRAC
- entries. As a consequence, these symbols are simply
- discarded. Complain if this is the case. */
- complaint (_("misplaced N_LBRAC entry; discarding local "
- "symbols which have no enclosing block"));
- }
- *get_local_symbols () = cstk.locals;
-
- if (get_context_stack_depth () > 1)
- {
- /* This is not the outermost LBRAC...RBRAC pair in the
- function, its local symbols preceded it, and are the ones
- just recovered from the context stack. Define the block
- for them (but don't bother if the block contains no
- symbols. Should we complain on blocks without symbols?
- I can't think of any useful purpose for them). */
- if (*get_local_symbols () != NULL)
- {
- /* Muzzle a compiler bug that makes end < start.
-
- ??? Which compilers? Is this ever harmful?. */
- if (cstk.start_addr > valu)
- {
- complaint (_("block start larger than block end"));
- cstk.start_addr = valu;
- }
- /* Make a block for the local symbols within. */
- finish_block (0, cstk.old_blocks, NULL,
- cstk.start_addr, valu);
- }
- }
- else
- {
- /* This is the outermost LBRAC...RBRAC pair. There is no
- need to do anything; leave the symbols that preceded it
- to be attached to the function's own block. We need to
- indicate that we just moved outside of the function. */
- within_function = 0;
- }
-
- break;
-
- case N_FN:
- case N_FN_SEQ:
- /* This kind of symbol indicates the start of an object file.
- Relocate for dynamic loading. */
- section_index = SECT_OFF_TEXT (objfile);
- valu += section_offsets[SECT_OFF_TEXT (objfile)];
- break;
-
- case N_SO:
- /* This type of symbol indicates the start of data for one
- source file. Finish the symbol table of the previous source
- file (if any) and start accumulating a new symbol table.
- Relocate for dynamic loading. */
- section_index = SECT_OFF_TEXT (objfile);
- valu += section_offsets[SECT_OFF_TEXT (objfile)];
-
- n_opt_found = 0;
-
- if (get_last_source_file ())
- {
- /* Check if previous symbol was also an N_SO (with some
- sanity checks). If so, that one was actually the
- directory name, and the current one is the real file
- name. Patch things up. */
- if (previous_stab_code == (unsigned char) N_SO)
- {
- patch_subfile_names (get_current_subfile (), name);
- break; /* Ignore repeated SOs. */
- }
- end_compunit_symtab (valu);
- end_stabs ();
- }
-
- /* Null name means this just marks the end of text for this .o
- file. Don't start a new symtab in this case. */
- if (*name == '\000')
- break;
-
- function_start_offset = 0;
-
- start_stabs ();
- start_compunit_symtab (objfile, name, NULL, valu, language);
- record_debugformat ("stabs");
- break;
-
- case N_SOL:
- /* This type of symbol indicates the start of data for a
- sub-source-file, one whose contents were copied or included
- in the compilation of the main source file (whose name was
- given in the N_SO symbol). Relocate for dynamic loading. */
- section_index = SECT_OFF_TEXT (objfile);
- valu += section_offsets[SECT_OFF_TEXT (objfile)];
- start_subfile (name);
- break;
-
- case N_BINCL:
- push_subfile ();
- add_new_header_file (name, valu);
- start_subfile (name);
- break;
-
- case N_EINCL:
- start_subfile (pop_subfile ());
- break;
-
- case N_EXCL:
- add_old_header_file (name, valu);
- break;
-
- case N_SLINE:
- /* This type of "symbol" really just records one line-number --
- core-address correspondence. Enter it in the line list for
- this symbol table. */
-
- /* Relocate for dynamic loading and for ELF acc
- function-relative symbols. */
- valu += function_start_offset;
-
- /* GCC 2.95.3 emits the first N_SLINE stab somewhere in the
- middle of the prologue instead of right at the start of the
- function. To deal with this we record the address for the
- first N_SLINE stab to be the start of the function instead of
- the listed location. We really shouldn't to this. When
- compiling with optimization, this first N_SLINE stab might be
- optimized away. Other (non-GCC) compilers don't emit this
- stab at all. There is no real harm in having an extra
- numbered line, although it can be a bit annoying for the
- user. However, it totally screws up our testsuite.
-
- So for now, keep adjusting the address of the first N_SLINE
- stab, but only for code compiled with GCC. */
-
- if (within_function && sline_found_in_function == 0)
- {
- CORE_ADDR addr = processing_gcc_compilation == 2 ?
- last_function_start : valu;
-
- record_line
- (get_current_subfile (), desc,
- unrelocated_addr (gdbarch_addr_bits_remove (gdbarch, addr)
- - objfile->text_section_offset ()));
- sline_found_in_function = 1;
- }
- else
- record_line
- (get_current_subfile (), desc,
- unrelocated_addr (gdbarch_addr_bits_remove (gdbarch, valu)
- - objfile->text_section_offset ()));
- break;
-
- case N_BCOMM:
- common_block_start (name, objfile);
- break;
-
- case N_ECOMM:
- common_block_end (objfile);
- break;
-
- /* The following symbol types need to have the appropriate
- offset added to their value; then we process symbol
- definitions in the name. */
-
- case N_STSYM: /* Static symbol in data segment. */
- case N_LCSYM: /* Static symbol in BSS segment. */
- case N_ROSYM: /* Static symbol in read-only data segment. */
- /* HORRID HACK DEPT. However, it's Sun's furgin' fault.
- Solaris 2's stabs-in-elf makes *most* symbols relative but
- leaves a few absolute (at least for Solaris 2.1 and version
- 2.0.1 of the SunPRO compiler). N_STSYM and friends sit on
- the fence. .stab "foo:S...",N_STSYM is absolute (ld
- relocates it) .stab "foo:V...",N_STSYM is relative (section
- base subtracted). This leaves us no choice but to search for
- the 'S' or 'V'... (or pass the whole section_offsets stuff
- down ONE MORE function call level, which we really don't want
- to do). */
- {
- const char *p;
-
- /* Normal object file and NLMs have non-zero text seg offsets,
- but don't need their static syms offset in this fashion.
- XXX - This is really a crock that should be fixed in the
- solib handling code so that I don't have to work around it
- here. */
-
- if (!symfile_relocatable)
- {
- p = strchr (name, ':');
- if (p != 0 && p[1] == 'S')
- {
- /* The linker relocated it. We don't want to add a
- Sun-stabs Tfoo.foo-like offset, but we *do*
- want to add whatever solib.c passed to
- symbol_file_add as addr (this is known to affect
- SunOS 4, and I suspect ELF too). Since there is no
- Ttext.text symbol, we can get addr from the text offset. */
- section_index = SECT_OFF_TEXT (objfile);
- valu += section_offsets[SECT_OFF_TEXT (objfile)];
- goto define_a_symbol;
- }
- }
- /* Since it's not the kludge case, re-dispatch to the right
- handler. */
- switch (type)
- {
- case N_STSYM:
- goto case_N_STSYM;
- case N_LCSYM:
- goto case_N_LCSYM;
- case N_ROSYM:
- goto case_N_ROSYM;
- default:
- internal_error (_("failed internal consistency check"));
- }
- }
-
- case_N_STSYM: /* Static symbol in data segment. */
- case N_DSLINE: /* Source line number, data segment. */
- section_index = SECT_OFF_DATA (objfile);
- valu += section_offsets[SECT_OFF_DATA (objfile)];
- goto define_a_symbol;
-
- case_N_LCSYM: /* Static symbol in BSS segment. */
- case N_BSLINE: /* Source line number, BSS segment. */
- /* N_BROWS: overlaps with N_BSLINE. */
- section_index = SECT_OFF_BSS (objfile);
- valu += section_offsets[SECT_OFF_BSS (objfile)];
- goto define_a_symbol;
-
- case_N_ROSYM: /* Static symbol in read-only data segment. */
- section_index = SECT_OFF_RODATA (objfile);
- valu += section_offsets[SECT_OFF_RODATA (objfile)];
- goto define_a_symbol;
-
- case N_ENTRY: /* Alternate entry point. */
- /* Relocate for dynamic loading. */
- section_index = SECT_OFF_TEXT (objfile);
- valu += section_offsets[SECT_OFF_TEXT (objfile)];
- goto define_a_symbol;
-
- /* The following symbol types we don't know how to process.
- Handle them in a "default" way, but complain to people who
- care. */
- default:
- case N_CATCH: /* Exception handler catcher. */
- case N_EHDECL: /* Exception handler name. */
- case N_PC: /* Global symbol in Pascal. */
- case N_M2C: /* Modula-2 compilation unit. */
- /* N_MOD2: overlaps with N_EHDECL. */
- case N_SCOPE: /* Modula-2 scope information. */
- case N_ECOML: /* End common (local name). */
- case N_NBTEXT: /* Gould Non-Base-Register symbols??? */
- case N_NBDATA:
- case N_NBBSS:
- case N_NBSTS:
- case N_NBLCS:
- unknown_symtype_complaint (hex_string (type));
-
- define_a_symbol:
- [[fallthrough]];
- /* These symbol types don't need the address field relocated,
- since it is either unused, or is absolute. */
- case N_GSYM: /* Global variable. */
- case N_NSYMS: /* Number of symbols (Ultrix). */
- case N_NOMAP: /* No map? (Ultrix). */
- case N_RSYM: /* Register variable. */
- case N_DEFD: /* Modula-2 GNU module dependency. */
- case N_SSYM: /* Struct or union element. */
- case N_LSYM: /* Local symbol in stack. */
- case N_PSYM: /* Parameter variable. */
- case N_LENG: /* Length of preceding symbol type. */
- if (name)
- {
- int deftype;
- const char *colon_pos = strchr (name, ':');
-
- if (colon_pos == NULL)
- deftype = '\0';
- else
- deftype = colon_pos[1];
-
- switch (deftype)
- {
- case 'f':
- case 'F':
- /* Deal with the SunPRO 3.0 compiler which omits the
- address from N_FUN symbols. */
- if (type == N_FUN
- && valu == section_offsets[SECT_OFF_TEXT (objfile)]
- && gdbarch_sofun_address_maybe_missing (gdbarch))
- {
- bound_minimal_symbol minsym
- = find_stab_function (name, get_last_source_file (),
- objfile);
- if (minsym.minsym != NULL)
- valu = minsym.value_address ();
- }
-
- /* These addresses are absolute. */
- function_start_offset = valu;
-
- within_function = 1;
-
- if (get_context_stack_depth () > 1)
- {
- complaint (_("unmatched N_LBRAC before symtab pos %d"),
- symnum);
- break;
- }
-
- if (!outermost_context_p ())
- {
- struct block *block;
-
- cstk = pop_context ();
- /* Make a block for the local symbols within. */
- block = finish_block (cstk.name,
- cstk.old_blocks, NULL,
- cstk.start_addr, valu);
-
- /* For C++, set the block's scope. */
- if (cstk.name->language () == language_cplus)
- cp_set_block_scope (cstk.name, block,
- &objfile->objfile_obstack);
- }
-
- newobj = push_context (0, valu);
- newobj->name = define_symbol (valu, name, desc, type, objfile);
- if (newobj->name != nullptr)
- newobj->name->set_section_index (section_index);
- break;
-
- default:
- {
- struct symbol *sym = define_symbol (valu, name, desc, type,
- objfile);
- if (sym != nullptr)
- sym->set_section_index (section_index);
- }
- break;
- }
- }
- break;
-
- /* We use N_OPT to carry the gcc2_compiled flag. Sun uses it
- for a bunch of other flags, too. Someday we may parse their
- flags; for now we ignore theirs and hope they'll ignore ours. */
- case N_OPT: /* Solaris 2: Compiler options. */
- if (name)
- {
- if (strcmp (name, GCC2_COMPILED_FLAG_SYMBOL) == 0)
- {
- processing_gcc_compilation = 2;
- }
- else
- n_opt_found = 1;
- }
- break;
-
- case N_MAIN: /* Name of main routine. */
- /* FIXME: If one has a symbol file with N_MAIN and then replaces
- it with a symbol file with "main" and without N_MAIN. I'm
- not sure exactly what rule to follow but probably something
- like: N_MAIN takes precedence over "main" no matter what
- objfile it is in; If there is more than one N_MAIN, choose
- the one in the symfile_objfile; If there is more than one
- N_MAIN within a given objfile, complain() and choose
- arbitrarily. (kingdon) */
- if (name != NULL)
- set_objfile_main_name (objfile, name, language_unknown);
- break;
-
- /* The following symbol types can be ignored. */
- case N_OBJ: /* Solaris 2: Object file dir and name. */
- case N_PATCH: /* Solaris 2: Patch Run Time Checker. */
- /* N_UNDF: Solaris 2: File separator mark. */
- /* N_UNDF: -- we will never encounter it, since we only process
- one file's symbols at once. */
- case N_ENDM: /* Solaris 2: End of module. */
- case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
- break;
- }
-
- /* '#' is a GNU C extension to allow one symbol to refer to another
- related symbol.
-
- Generally this is used so that an alias can refer to its main
- symbol. */
- gdb_assert (name);
- if (name[0] == '#')
- {
- /* Initialize symbol reference names and determine if this is a
- definition. If a symbol reference is being defined, go ahead
- and add it. Otherwise, just return. */
-
- const char *s = name;
- int refnum;
-
- /* If this stab defines a new reference ID that is not on the
- reference list, then put it on the reference list.
-
- We go ahead and advance NAME past the reference, even though
- it is not strictly necessary at this time. */
- refnum = symbol_reference_defined (&s);
- if (refnum >= 0)
- if (!ref_search (refnum))
- ref_add (refnum, 0, name, valu);
- name = s;
- }
-
- previous_stab_code = type;
-}
-
-/* FIXME: The only difference between this and elfstab_build_psymtabs
- is the call to install_minimal_symbols for elf, and the support for
- split sections. If the differences are really that small, the code
- should be shared. */
-
-/* Scan and build partial symbols for an coff symbol file.
- The coff file has already been processed to get its minimal symbols.
-
- This routine is the equivalent of dbx_symfile_init and dbx_symfile_read
- rolled into one.
-
- OBJFILE is the object file we are reading symbols from.
- ADDR is the address relative to which the symbols are (e.g.
- the base address of the text segment).
- TEXTADDR is the address of the text section.
- TEXTSIZE is the size of the text section.
- STABSECTS is the list of .stab sections in OBJFILE.
- STABSTROFFSET and STABSTRSIZE define the location in OBJFILE where the
- .stabstr section exists.
-
- This routine is mostly copied from dbx_symfile_init and dbx_symfile_read,
- adjusted for coff details. */
-
-void
-coffstab_build_psymtabs (struct objfile *objfile,
- CORE_ADDR textaddr, unsigned int textsize,
- const std::vector<asection *> &stabsects,
- file_ptr stabstroffset, unsigned int stabstrsize)
-{
- int val;
- bfd *sym_bfd = objfile->obfd.get ();
- const char *name = bfd_get_filename (sym_bfd);
- unsigned int stabsize;
-
- /* Allocate struct to keep track of stab reading. */
- dbx_objfile_data_key.emplace (objfile);
-
- DBX_TEXT_ADDR (objfile) = textaddr;
- DBX_TEXT_SIZE (objfile) = textsize;
-
-#define COFF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */
- DBX_SYMBOL_SIZE (objfile) = COFF_STABS_SYMBOL_SIZE;
- DBX_STRINGTAB_SIZE (objfile) = stabstrsize;
-
- if (stabstrsize > bfd_get_size (sym_bfd))
- error (_("ridiculous string table size: %d bytes"), stabstrsize);
- DBX_STRINGTAB (objfile) = (char *)
- obstack_alloc (&objfile->objfile_obstack, stabstrsize + 1);
- OBJSTAT (objfile, sz_strtab += stabstrsize + 1);
-
- /* Now read in the string table in one big gulp. */
-
- val = bfd_seek (sym_bfd, stabstroffset, SEEK_SET);
- if (val < 0)
- perror_with_name (name);
- val = bfd_read (DBX_STRINGTAB (objfile), stabstrsize, sym_bfd);
- if (val != stabstrsize)
- perror_with_name (name);
-
- stabsread_new_init ();
- free_header_files ();
- init_header_files ();
-
- processing_acc_compilation = 1;
-
- /* In a coff file, we've already installed the minimal symbols that came
- from the coff (non-stab) symbol table, so always act like an
- incremental load here. */
- scoped_restore save_symbuf_sections
- = make_scoped_restore (&symbuf_sections);
- if (stabsects.size () == 1)
- {
- stabsize = bfd_section_size (stabsects[0]);
- DBX_SYMCOUNT (objfile) = stabsize / DBX_SYMBOL_SIZE (objfile);
- DBX_SYMTAB_OFFSET (objfile) = stabsects[0]->filepos;
- }
- else
- {
- DBX_SYMCOUNT (objfile) = 0;
- for (asection *section : stabsects)
- {
- stabsize = bfd_section_size (section);
- DBX_SYMCOUNT (objfile) += stabsize / DBX_SYMBOL_SIZE (objfile);
- }
-
- DBX_SYMTAB_OFFSET (objfile) = stabsects[0]->filepos;
-
- sect_idx = 1;
- symbuf_sections = &stabsects;
- symbuf_left = bfd_section_size (stabsects[0]);
- symbuf_read = 0;
- }
-
- dbx_symfile_read (objfile, 0);
-}
-/* Scan and build partial symbols for an ELF symbol file.
- This ELF file has already been processed to get its minimal symbols.
-
- This routine is the equivalent of dbx_symfile_init and dbx_symfile_read
- rolled into one.
-
- OBJFILE is the object file we are reading symbols from.
- ADDR is the address relative to which the symbols are (e.g.
- the base address of the text segment).
- STABSECT is the BFD section information for the .stab section.
- STABSTROFFSET and STABSTRSIZE define the location in OBJFILE where the
- .stabstr section exists.
-
- This routine is mostly copied from dbx_symfile_init and dbx_symfile_read,
- adjusted for elf details. */
-
-void
-elfstab_build_psymtabs (struct objfile *objfile, asection *stabsect,
- file_ptr stabstroffset, unsigned int stabstrsize)
-{
- int val;
- bfd *sym_bfd = objfile->obfd.get ();
- const char *name = bfd_get_filename (sym_bfd);
-
- stabsread_new_init ();
-
- /* Allocate struct to keep track of stab reading. */
- dbx_objfile_data_key.emplace (objfile);
-
- /* Find the first and last text address. dbx_symfile_read seems to
- want this. */
- find_text_range (sym_bfd, objfile);
-
-#define ELF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */
- DBX_SYMBOL_SIZE (objfile) = ELF_STABS_SYMBOL_SIZE;
- DBX_SYMCOUNT (objfile)
- = bfd_section_size (stabsect) / DBX_SYMBOL_SIZE (objfile);
- DBX_STRINGTAB_SIZE (objfile) = stabstrsize;
- DBX_SYMTAB_OFFSET (objfile) = stabsect->filepos;
- DBX_STAB_SECTION (objfile) = stabsect;
-
- if (stabstrsize > bfd_get_size (sym_bfd))
- error (_("ridiculous string table size: %d bytes"), stabstrsize);
- DBX_STRINGTAB (objfile) = (char *)
- obstack_alloc (&objfile->objfile_obstack, stabstrsize + 1);
- OBJSTAT (objfile, sz_strtab += stabstrsize + 1);
-
- /* Now read in the string table in one big gulp. */
-
- val = bfd_seek (sym_bfd, stabstroffset, SEEK_SET);
- if (val < 0)
- perror_with_name (name);
- val = bfd_read (DBX_STRINGTAB (objfile), stabstrsize, sym_bfd);
- if (val != stabstrsize)
- perror_with_name (name);
-
- stabsread_new_init ();
- free_header_files ();
- init_header_files ();
-
- processing_acc_compilation = 1;
-
- symbuf_read = 0;
- symbuf_left = bfd_section_size (stabsect);
-
- scoped_restore restore_stabs_data = make_scoped_restore (&stabs_data);
- gdb::unique_xmalloc_ptr<gdb_byte> data_holder;
-
- stabs_data = symfile_relocate_debug_section (objfile, stabsect, NULL);
- if (stabs_data)
- data_holder.reset (stabs_data);
-
- /* In an elf file, we've already installed the minimal symbols that came
- from the elf (non-stab) symbol table, so always act like an
- incremental load here. dbx_symfile_read should not generate any new
- minimal symbols, since we will have already read the ELF dynamic symbol
- table and normal symbol entries won't be in the ".stab" section; but in
- case it does, it will install them itself. */
- dbx_symfile_read (objfile, 0);
-}
/* Scan and build partial symbols for a file with special sections for stabs
and stabstrings. The file has already been processed to get its minimal
@@ -3220,7 +332,7 @@ stabsect_build_psymtabs (struct objfile *objfile, char *stab_name,
/* Now, do an incremental load. */
- processing_acc_compilation = 1;
+ dbx_objfile_data_key.get (objfile)->ctx.processing_acc_compilation = 1;
dbx_symfile_read (objfile, 0);
}
diff --git a/gdb/dictionary.h b/gdb/dictionary.h
index 6f602f4..e09afb3 100644
--- a/gdb/dictionary.h
+++ b/gdb/dictionary.h
@@ -113,7 +113,7 @@ struct dict_iterator
struct mdict_iterator
{
- /* The multidictionary with whcih this iterator is associated. */
+ /* The multidictionary with which this iterator is associated. */
const struct multidictionary *mdict;
/* The iterator used to iterate through individual dictionaries. */
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 7209cfc..541293a 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -899,7 +899,10 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch,
output includes the source specs for each line. */
if (sal.symtab != NULL)
{
- uiout->text (symtab_to_filename_for_display (sal.symtab));
+ auto filename = symtab_to_filename_for_display (sal.symtab);
+ uiout->message ("%ps",
+ styled_string (file_name_style.style (),
+ filename));
}
else
uiout->text ("unknown");
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 780eaf4..46ca62e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4289,7 +4289,7 @@ includes changes in memory, registers, and even (within some limits)
system state. Effectively, it is like going back in time to the
moment when the checkpoint was saved.
-Thus, if you're stepping thru a program and you think you're
+Thus, if you're stepping through a program and you think you're
getting close to the point where things go wrong, you can save
a checkpoint. Then, if you accidentally go too far and miss
the critical statement, instead of having to restart your program
@@ -7077,33 +7077,6 @@ $1 = (void *) 0x7ffff7ff7000
Depending on target support, @code{$_siginfo} may also be writable.
-@cindex Intel MPX boundary violations
-@cindex boundary violations, Intel MPX
-On some targets, a @code{SIGSEGV} can be caused by a boundary
-violation, i.e., accessing an address outside of the allowed range.
-In those cases @value{GDBN} may displays additional information,
-depending on how @value{GDBN} has been told to handle the signal.
-With @code{handle stop SIGSEGV}, @value{GDBN} displays the violation
-kind: "Upper" or "Lower", the memory address accessed and the
-bounds, while with @code{handle nostop SIGSEGV} no additional
-information is displayed.
-
-The usual output of a segfault is:
-@smallexample
-Program received signal SIGSEGV, Segmentation fault
-0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
-68 value = *(p + len);
-@end smallexample
-
-While a bound violation is presented as:
-@smallexample
-Program received signal SIGSEGV, Segmentation fault
-Upper bound violation while accessing address 0x7fffffffc3b3
-Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
-0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
-68 value = *(p + len);
-@end smallexample
-
@node Thread Stops
@section Stopping and Starting Multi-thread Programs
@@ -7686,7 +7659,7 @@ the called function, stopping at the beginning of the @emph{last}
statement in the called function (typically a return statement).
Also, as with the @code{step} command, if non-debuggable functions are
-called, @code{reverse-step} will run thru them backward without stopping.
+called, @code{reverse-step} will run through them backward without stopping.
@kindex reverse-stepi
@kindex rsi @r{(@code{reverse-stepi})}
@@ -8116,6 +8089,16 @@ also need longer to process the branch trace data before it can be used.
Show the current setting of the requested ring buffer size for branch
tracing in Intel Processor Trace format.
+@item set record btrace pt event-tracing
+Enable or disable event tracing for branch tracing in Intel Processor
+Trace format. When enabled, events are recorded during execution as
+auxiliary information and will be printed during stepping commands and
+commands displaying the execution history. Changing this setting has no
+effect on an active recording. The default is off.
+
+@item show record btrace pt event-tracing
+Show the current setting of Intel Processor Trace event tracing.
+
@kindex info record
@item info record
Show various statistics about the recording depending on the recording
@@ -18315,6 +18298,9 @@ All Modula-2 built-in procedures also return a result, described below.
@item ABS(@var{n})
Returns the absolute value of @var{n}.
+@item ADR(@var{n})
+Returns the memory address of @var{n}.
+
@item CAP(@var{c})
If @var{c} is a lower case letter, it returns its upper case
equivalent, otherwise it returns its argument.
@@ -26793,91 +26779,6 @@ Show the current setting of the convention to return @code{struct}s
from functions.
@end table
-
-@subsubsection Intel @dfn{Memory Protection Extensions} (MPX).
-@cindex Intel Memory Protection Extensions (MPX).
-
-Memory Protection Extension (MPX) adds the bound registers @samp{BND0}
-@footnote{The register named with capital letters represent the architecture
-registers.} through @samp{BND3}. Bound registers store a pair of 64-bit values
-which are the lower bound and upper bound. Bounds are effective addresses or
-memory locations. The upper bounds are architecturally represented in 1's
-complement form. A bound having lower bound = 0, and upper bound = 0
-(1's complement of all bits set) will allow access to the entire address space.
-
-@samp{BND0} through @samp{BND3} are represented in @value{GDBN} as @samp{bnd0raw}
-through @samp{bnd3raw}. Pseudo registers @samp{bnd0} through @samp{bnd3}
-display the upper bound performing the complement of one operation on the
-upper bound value, i.e.@ when upper bound in @samp{bnd0raw} is 0 in the
-@value{GDBN} @samp{bnd0} it will be @code{0xfff@dots{}}. In this sense it
-can also be noted that the upper bounds are inclusive.
-
-As an example, assume that the register BND0 holds bounds for a pointer having
-access allowed for the range between 0x32 and 0x71. The values present on
-bnd0raw and bnd registers are presented as follows:
-
-@smallexample
- bnd0raw = @{0x32, 0xffffffff8e@}
- bnd0 = @{lbound = 0x32, ubound = 0x71@} : size 64
-@end smallexample
-
-This way the raw value can be accessed via bnd0raw@dots{}bnd3raw. Any
-change on bnd0@dots{}bnd3 or bnd0raw@dots{}bnd3raw is reflect on its
-counterpart. When the bnd0@dots{}bnd3 registers are displayed via
-Python, the display includes the memory size, in bits, accessible to
-the pointer.
-
-Bounds can also be stored in bounds tables, which are stored in
-application memory. These tables store bounds for pointers by specifying
-the bounds pointer's value along with its bounds. Evaluating and changing
-bounds located in bound tables is therefore interesting while investigating
-bugs on MPX context. @value{GDBN} provides commands for this purpose:
-
-@table @code
-@item show mpx bound @var{pointer}
-@kindex show mpx bound
-Display bounds of the given @var{pointer}.
-
-@item set mpx bound @var{pointer}, @var{lbound}, @var{ubound}
-@kindex set mpx bound
-Set the bounds of a pointer in the bound table.
-This command takes three parameters: @var{pointer} is the pointers
-whose bounds are to be changed, @var{lbound} and @var{ubound} are new values
-for lower and upper bounds respectively.
-@end table
-
-Both commands are deprecated and will be removed in future versions of
-@value{GDBN}. MPX itself was listed as removed by Intel in 2019.
-
-When you call an inferior function on an Intel MPX enabled program,
-GDB sets the inferior's bound registers to the init (disabled) state
-before calling the function. As a consequence, bounds checks for the
-pointer arguments passed to the function will always pass.
-
-This is necessary because when you call an inferior function, the
-program is usually in the middle of the execution of other function.
-Since at that point bound registers are in an arbitrary state, not
-clearing them would lead to random bound violations in the called
-function.
-
-You can still examine the influence of the bound registers on the
-execution of the called function by stopping the execution of the
-called function at its prologue, setting bound registers, and
-continuing the execution. For example:
-
-@smallexample
- $ break *upper
- Breakpoint 2 at 0x4009de: file i386-mpx-call.c, line 47.
- $ print upper (a, b, c, d, 1)
- Breakpoint 2, upper (a=0x0, b=0x6e0000005b, c=0x0, d=0x0, len=48)....
- $ print $bnd0
- @{lbound = 0x0, ubound = ffffffff@} : size -1
-@end smallexample
-
-At this last step the value of bnd0 can be changed for investigation of bound
-violations caused along the execution of the call. In order to know how to
-set the bound registers or bound table for the call consult the ABI.
-
@subsubsection x87 registers
@value{GDBN} provides access to the x87 state through the following registers:
@@ -27954,6 +27855,10 @@ if @value{GDBN} is using its builtin disassembler library for styling
(@pxref{style_disassembler_enabled,,@kbd{set style disassembler
enabled}}).
+@item line-number
+Control the styling of line numbers. By default, this style's
+intensity is dim.
+
@item variable
Control the styling of variable names. These are managed with the
@code{set style variable} family of commands. By default, this style's
@@ -39850,6 +39755,11 @@ corresponds to the @code{file} command. @xref{Files}.
If provided, this must be a boolean. When @samp{True}, @value{GDBN}
will set a temporary breakpoint at the program's main procedure, using
the same approach as the @code{start} command. @xref{Starting}.
+
+@item stopOnEntry
+If provided, this must be a boolean. When @samp{True}, @value{GDBN}
+will set a temporary breakpoint at the program's first instruction, using
+the same approach as the @code{starti} command. @xref{Starting}.
@end table
@value{GDBN} defines some parameters that can be passed to the
@@ -42067,7 +41977,11 @@ including registers which aren't available on the target nor visible
to user; the command @code{maint print register-groups} includes the
groups that each register is a member of; and the command @code{maint
print remote-registers} includes the remote target's register numbers
-and offsets in the `G' packets.
+and offsets in the `G' packets, as well as an indication of which
+registers were included in the last stop reply packet received by
+@value{GDBN} (@pxref{Stop Reply Packets}). Please note that the list
+of registers included in a stop reply can change from one stop to the
+next.
These commands take an optional parameter, a file name to which to
write the information.
@@ -45002,6 +44916,11 @@ These are the currently defined stub features and their properties:
@tab @samp{-}
@tab Yes
+@item @samp{Qbtrace-conf:pt:event-tracing}
+@tab Yes
+@tab @samp{-}
+@tab Yes
+
@item @samp{QNonStop}
@tab No
@tab @samp{-}
@@ -45326,6 +45245,9 @@ The remote stub understands the @samp{Qbtrace-conf:pt:size} packet.
@item Qbtrace-conf:pt:ptwrite
The remote stub understands the @samp{Qbtrace-conf:pt:ptwrite} packet.
+@item Qbtrace-conf:pt:event-tracing
+The remote stub understands the @samp{Qbtrace-conf:pt:event-tracing} packet.
+
@item swbreak
The remote stub reports the @samp{swbreak} stop reason for memory
breakpoints.
@@ -45827,6 +45749,18 @@ The ptwrite config parameter has been set.
A badly formed request or an error was encountered.
@end table
+@item Qbtrace-conf:pt:event-tracing=@var{(yes|no)}
+Indicate support for event-tracing packets. This allows for backwards
+compatibility.
+
+Reply:
+@table @samp
+@item OK
+The event-tracing config parameter has been set.
+@item E.errtext
+A badly formed request or an error was encountered.
+@end table
+
@end table
@node Architecture-Specific Protocol Details
@@ -48460,15 +48394,16 @@ branch trace configuration discovery. @xref{Expat}.
The formal DTD for the branch trace configuration format is given below:
@smallexample
-<!ELEMENT btrace-conf (bts?, pt?)>
-<!ATTLIST btrace-conf version CDATA #FIXED "1.0">
+<!ELEMENT btrace-conf (bts?, pt?)>
+<!ATTLIST btrace-conf version CDATA #FIXED "1.0">
<!ELEMENT bts EMPTY>
-<!ATTLIST bts size CDATA #IMPLIED>
+<!ATTLIST bts size CDATA #IMPLIED>
<!ELEMENT pt EMPTY>
-<!ATTLIST pt size CDATA #IMPLIED>
-<!ATTLIST pt ptwrite (yes | no) #IMPLIED>
+<!ATTLIST pt size CDATA #IMPLIED>
+<!ATTLIST pt ptwrite (yes | no) #IMPLIED>
+<!ATTLIST pt event-tracing (yes | no) #IMPLIED>
@end smallexample
@include agentexpr.texi
@@ -49706,16 +49641,6 @@ describe the upper 128 bits of @sc{ymm} registers:
@samp{ymm0h} through @samp{ymm15h} for amd64
@end itemize
-The @samp{org.gnu.gdb.i386.mpx} is an optional feature representing Intel
-Memory Protection Extension (MPX). It should describe the following registers:
-
-@itemize @minus
-@item
-@samp{bnd0raw} through @samp{bnd3raw} for i386 and amd64.
-@item
-@samp{bndcfgu} and @samp{bndstatus} for i386 and amd64.
-@end itemize
-
The @samp{org.gnu.gdb.i386.linux} feature is optional. It should
describe a single register, @samp{orig_eax}.
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index bb1f205..22f0e6c 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -7327,7 +7327,7 @@ contains the full contents of the window. This is similar to calling
@end defun
The factory function that you supply should return an object
-conforming to the TUI window protocol. These are the method that can
+conforming to the TUI window protocol. These are the methods that can
be called on this object, which is referred to below as the ``window
object''. The methods documented below are optional; if the object
does not implement one of these methods, @value{GDBN} will not attempt
diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c
index 0f4e164..ac1b1c5 100644
--- a/gdb/dtrace-probe.c
+++ b/gdb/dtrace-probe.c
@@ -493,7 +493,7 @@ dtrace_process_dof_probe (struct objfile *objfile,
{
}
- if (expr != NULL && expr->first_opcode () == OP_TYPE)
+ if (expr != NULL && expr->type_p ())
type = expr->evaluate_type ()->type ();
args.emplace_back (type, std::move (type_str), std::move (expr));
diff --git a/gdb/dwarf2/abbrev.c b/gdb/dwarf2/abbrev.c
index bae8d8b..c30db1e 100644
--- a/gdb/dwarf2/abbrev.c
+++ b/gdb/dwarf2/abbrev.c
@@ -276,7 +276,8 @@ abbrev_table::read (struct dwarf2_section_info *section,
}
else if ((cur_abbrev->tag == DW_TAG_structure_type
|| cur_abbrev->tag == DW_TAG_class_type
- || cur_abbrev->tag == DW_TAG_union_type)
+ || cur_abbrev->tag == DW_TAG_union_type
+ || cur_abbrev->tag == DW_TAG_namespace)
&& cur_abbrev->has_children)
{
/* We have to record this as interesting, regardless of how
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index 41aa9d0..4073c92 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -288,7 +288,7 @@ cooked_index_shard::add (sect_offset die_offset, enum dwarf_tag tag,
/* See cooked-index.h. */
-gdb::unique_xmalloc_ptr<char>
+void
cooked_index_shard::handle_gnat_encoded_entry (cooked_index_entry *entry,
htab_t gnat_entries)
{
@@ -298,7 +298,10 @@ cooked_index_shard::handle_gnat_encoded_entry (cooked_index_entry *entry,
source charset does not affect the indexer directly. */
std::string canonical = ada_decode (entry->name, false, false, false);
if (canonical.empty ())
- return {};
+ {
+ entry->canonical = entry->name;
+ return;
+ }
std::vector<std::string_view> names = split_name (canonical.c_str (),
split_style::DOT_STYLE);
std::string_view tail = names.back ();
@@ -329,7 +332,9 @@ cooked_index_shard::handle_gnat_encoded_entry (cooked_index_entry *entry,
}
entry->set_parent (parent);
- return make_unique_xstrndup (tail.data (), tail.length ());
+ auto new_canon = make_unique_xstrndup (tail.data (), tail.length ());
+ entry->canonical = new_canon.get ();
+ m_names.push_back (std::move (new_canon));
}
/* See cooked-index.h. */
@@ -389,17 +394,7 @@ cooked_index_shard::finalize (const parent_map_map *parent_maps)
if ((entry->flags & IS_LINKAGE) != 0)
entry->canonical = entry->name;
else if (entry->lang == language_ada)
- {
- gdb::unique_xmalloc_ptr<char> canon_name
- = handle_gnat_encoded_entry (entry, gnat_entries.get ());
- if (canon_name == nullptr)
- entry->canonical = entry->name;
- else
- {
- entry->canonical = canon_name.get ();
- m_names.push_back (std::move (canon_name));
- }
- }
+ handle_gnat_encoded_entry (entry, gnat_entries.get ());
else if (entry->lang == language_cplus || entry->lang == language_c)
{
void **slot = htab_find_slot (seen_names.get (), entry,
diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h
index e9f13c9..0873e7d 100644
--- a/gdb/dwarf2/cooked-index.h
+++ b/gdb/dwarf2/cooked-index.h
@@ -227,8 +227,7 @@ struct cooked_index_entry : public allocate_on_obstack<cooked_index_entry>
linkage name -- two entries are created for DIEs which have both
attributes. */
const char *name;
- /* The canonical name. For C++ names, this may differ from NAME.
- In all other cases, this is equal to NAME. */
+ /* The canonical name. This may be equal to NAME. */
const char *canonical = nullptr;
/* The DWARF tag. */
enum dwarf_tag tag;
@@ -245,9 +244,10 @@ private:
/* A helper method for full_name. Emits the full scope of this
object, followed by the separator, to STORAGE. If this entry has
- a parent, its write_scope method is called first. */
+ a parent, its write_scope method is called first. FOR_MAIN is
+ true when computing the name of 'main'; see full_name. */
void write_scope (struct obstack *storage, const char *sep,
- bool for_name) const;
+ bool for_main) const;
/* The parent entry. This is NULL for top-level entries.
Otherwise, it points to the parent entry, such as a namespace or
@@ -338,9 +338,8 @@ private:
/* GNAT only emits mangled ("encoded") names in the DWARF, and does
not emit the module structure. However, we need this structure
to do lookups. This function recreates that structure for an
- existing entry. It returns the base name (last element) of the
- full decoded name. */
- gdb::unique_xmalloc_ptr<char> handle_gnat_encoded_entry
+ existing entry, modifying ENTRY as appropriate. */
+ void handle_gnat_encoded_entry
(cooked_index_entry *entry, htab_t gnat_entries);
/* Finalize the index. This should be called a single time, when
@@ -779,7 +778,9 @@ struct cooked_index_functions : public dwarf2_base_index_functions
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain) override;
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
+ override;
struct compunit_symtab *find_pc_sect_compunit_symtab
(struct objfile *objfile, bound_minimal_symbol msymbol,
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c
index cb80dbf..5ad17ea 100644
--- a/gdb/dwarf2/expr.c
+++ b/gdb/dwarf2/expr.c
@@ -1593,8 +1593,9 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
uoffset)));
result_val = value_from_ulongest (address_type, result);
break;
+ case DW_OP_constx:
case DW_OP_GNU_const_index:
- ensure_have_per_cu (this->m_per_cu, "DW_OP_GNU_const_index");
+ ensure_have_per_cu (this->m_per_cu, "DW_OP_constx");
op_ptr = safe_read_uleb128 (op_ptr, op_end, &uoffset);
result = (ULONGEST) dwarf2_read_addr_index (this->m_per_cu,
diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c
index 79ef065..841d2d4 100644
--- a/gdb/dwarf2/frame.c
+++ b/gdb/dwarf2/frame.c
@@ -911,7 +911,7 @@ dwarf2_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
its return address. As a result the return address will
point at some random instruction, and the CFI for that
instruction is probably worthless to us. GCC's unwinder solves
- this problem by substracting 1 from the return address to get an
+ this problem by subtracting 1 from the return address to get an
address in the middle of a presumed call instruction (or the
instruction in the associated delay slot). This should only be
done for "normal" frames and not for resume-type frames (signal
@@ -1073,7 +1073,7 @@ incomplete CFI data; unspecified registers (e.g., %s) at %s"),
ULONGEST retaddr_column = fs.retaddr_column;
/* It seems rather bizarre to specify an "empty" column as
- the return adress column. However, this is exactly
+ the return address column. However, this is exactly
what GCC does on some targets. It turns out that GCC
assumes that the return address can be found in the
register corresponding to the return address column.
diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c
index 3a47805..d515386 100644
--- a/gdb/dwarf2/loc.c
+++ b/gdb/dwarf2/loc.c
@@ -779,7 +779,7 @@ func_addr_to_tail_call_list (struct gdbarch *gdbarch, CORE_ADDR addr)
via its tail calls (incl. transitively). Throw NO_ENTRY_VALUE_ERROR if it
can call itself via tail calls.
- If a funtion can tail call itself its entry value based parameters are
+ If a function can tail call itself its entry value based parameters are
unreliable. There is no verification whether the value of some/all
parameters is unchanged through the self tail call, we expect if there is
a self tail call all the parameters can be modified. */
@@ -1967,6 +1967,7 @@ dwarf2_get_symbol_read_needs (gdb::array_view<const gdb_byte> expr,
case DW_OP_GNU_reinterpret:
case DW_OP_addrx:
case DW_OP_GNU_addr_index:
+ case DW_OP_constx:
case DW_OP_GNU_const_index:
case DW_OP_constu:
case DW_OP_plus_uconst:
@@ -3265,10 +3266,13 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
/* With -gsplit-dwarf a TLS variable can also look like this:
DW_AT_location : 3 byte block: fc 4 e0
(DW_OP_GNU_const_index: 4;
- DW_OP_GNU_push_tls_address) */
+ DW_OP_GNU_push_tls_address) |
+ 3 byte block a2 4 e0
+ (DW_OP_constx: 4;
+ DW_OP_form_tls_address) */
else if (data + 3 <= end
&& data + 1 + (leb128_size = skip_leb128 (data + 1, end)) < end
- && data[0] == DW_OP_GNU_const_index
+ && (data[0] == DW_OP_constx || data[0] == DW_OP_GNU_const_index)
&& leb128_size > 0
&& (data[1 + leb128_size] == DW_OP_GNU_push_tls_address
|| data[1 + leb128_size] == DW_OP_form_tls_address)
@@ -3675,6 +3679,7 @@ disassemble_dwarf_expression (struct ui_file *stream,
gdb_printf (stream, " 0x%s", phex_nz (ul, addr_size));
break;
+ case DW_OP_constx:
case DW_OP_GNU_const_index:
data = safe_read_uleb128 (data, end, &ul);
ul = (uint64_t) dwarf2_read_addr_index (per_cu, per_objfile, ul);
diff --git a/gdb/dwarf2/parent-map.h b/gdb/dwarf2/parent-map.h
index 5307d4d..6cff548 100644
--- a/gdb/dwarf2/parent-map.h
+++ b/gdb/dwarf2/parent-map.h
@@ -104,6 +104,9 @@ public:
return new (obstack) addrmap_fixed (obstack, &m_map);
}
+ /* Dump a human-readable form of this map. */
+ void dump () const;
+
private:
/* An addrmap that maps from section offsets to cooked_index_entry *. */
@@ -141,6 +144,9 @@ public:
return nullptr;
}
+ /* Dump a human-readable form of this collection of parent_maps. */
+ void dump () const;
+
private:
/* Storage for the convert maps. */
diff --git a/gdb/dwarf2/read-gdb-index.c b/gdb/dwarf2/read-gdb-index.c
index 8cd665c..701cdec 100644
--- a/gdb/dwarf2/read-gdb-index.c
+++ b/gdb/dwarf2/read-gdb-index.c
@@ -158,7 +158,9 @@ struct dwarf2_gdb_index : public dwarf2_base_index_functions
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain) override;
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
+ override;
};
/* This dumps minimal information about the index.
@@ -187,7 +189,8 @@ dw2_expand_marked_cus
gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags kind)
+ domain_search_flags kind,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
{
offset_type vec_len, vec_idx;
bool global_seen = false;
@@ -268,7 +271,7 @@ dw2_expand_marked_cus
dwarf2_per_cu_data *per_cu = per_objfile->per_bfd->get_cu (cu_index);
if (!dw2_expand_symtabs_matching_one (per_cu, per_objfile, file_matcher,
- expansion_notify))
+ expansion_notify, lang_matcher))
return false;
}
@@ -283,7 +286,8 @@ dwarf2_gdb_index::expand_symtabs_matching
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain)
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
{
dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
@@ -300,7 +304,8 @@ dwarf2_gdb_index::expand_symtabs_matching
if (!dw2_expand_symtabs_matching_one (per_cu, per_objfile,
file_matcher,
- expansion_notify))
+ expansion_notify,
+ lang_matcher))
return false;
}
return true;
@@ -316,10 +321,11 @@ dwarf2_gdb_index::expand_symtabs_matching
[&] (offset_type idx)
{
if (!dw2_expand_marked_cus (per_objfile, idx, file_matcher,
- expansion_notify, search_flags, domain))
+ expansion_notify, search_flags, domain,
+ lang_matcher))
return false;
return true;
- }, per_objfile);
+ }, per_objfile, lang_matcher);
return result;
}
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 769ca91..ea31d8d 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -96,6 +96,7 @@
#include "run-on-main-thread.h"
#include "dwarf2/parent-map.h"
#include "dwarf2/error.h"
+#include <variant>
/* When == 1, print basic high level tracing messages.
When > 1, be more verbose.
@@ -1644,7 +1645,9 @@ struct readnow_functions : public dwarf2_base_index_functions
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain) override
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
+ override
{
return true;
}
@@ -2296,7 +2299,8 @@ dw2_expand_symtabs_matching_symbol
const lookup_name_info &lookup_name_in,
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<bool (offset_type)> match_callback,
- dwarf2_per_objfile *per_objfile)
+ dwarf2_per_objfile *per_objfile,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
{
lookup_name_info lookup_name_without_params
= lookup_name_in.make_ignore_params ();
@@ -2332,6 +2336,8 @@ dw2_expand_symtabs_matching_symbol
for (int i = 0; i < nr_languages; i++)
{
enum language lang_e = (enum language) i;
+ if (lang_matcher != nullptr && !lang_matcher (lang_e))
+ continue;
const language_defn *lang = language_def (lang_e);
symbol_name_matcher_ftype *name_matcher
@@ -2489,7 +2495,7 @@ check_match (const char *file, int line,
if (expected_str == NULL || strcmp (expected_str, matched_name) != 0)
mismatch (expected_str, matched_name);
return true;
- }, per_objfile);
+ }, per_objfile, nullptr);
const char *expected_str
= expected_it == expected_end ? NULL : *expected_it++;
@@ -2850,19 +2856,29 @@ dw2_expand_symtabs_matching_one
(dwarf2_per_cu_data *per_cu,
dwarf2_per_objfile *per_objfile,
gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
- gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify)
+ gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
{
- if (file_matcher == NULL || per_cu->mark)
+ if (file_matcher != nullptr && !per_cu->mark)
+ return true;
+
+ if (lang_matcher != nullptr)
{
- bool symtab_was_null = !per_objfile->symtab_set_p (per_cu);
+ /* Try to skip CUs with non-matching language. */
+ per_cu->ensure_lang (per_objfile);
+ if (!per_cu->maybe_multi_language ()
+ && !lang_matcher (per_cu->lang ()))
+ return true;
+ }
- compunit_symtab *symtab
- = dw2_instantiate_symtab (per_cu, per_objfile, false);
- gdb_assert (symtab != nullptr);
+ bool symtab_was_null = !per_objfile->symtab_set_p (per_cu);
+ compunit_symtab *symtab
+ = dw2_instantiate_symtab (per_cu, per_objfile, false);
+ gdb_assert (symtab != nullptr);
+
+ if (expansion_notify != NULL && symtab_was_null)
+ return expansion_notify (symtab);
- if (expansion_notify != NULL && symtab_was_null)
- return expansion_notify (symtab);
- }
return true;
}
@@ -4434,6 +4450,50 @@ cooked_index_storage::eq_cutu_reader (const void *a, const void *b)
return ra->cu->per_cu->index == *rb;
}
+/* Dump MAP as parent_map. */
+
+static void
+dump_parent_map (const struct addrmap *map)
+{
+ auto_obstack temp_storage;
+
+ auto annotate_cooked_index_entry
+ = [&] (struct ui_file *outfile, const void *value)
+ {
+ const cooked_index_entry *parent_entry
+ = (const cooked_index_entry *)value;
+ if (parent_entry == nullptr)
+ return;
+
+ gdb_printf (outfile, " (0x%" PRIx64 ": %s)",
+ to_underlying (parent_entry->die_offset),
+ parent_entry->full_name (&temp_storage, false));
+ };
+
+ addrmap_dump (const_cast<addrmap *> (map), gdb_stdlog, nullptr,
+ annotate_cooked_index_entry);
+}
+
+/* See parent-map.h. */
+
+void
+parent_map::dump () const
+{
+ dump_parent_map (&m_map);
+}
+
+/* See parent-map.h. */
+
+void
+parent_map_map::dump () const
+{
+ for (const auto &iter : m_maps)
+ {
+ gdb_printf (gdb_stdlog, "map start:\n");
+ dump_parent_map (iter);
+ }
+}
+
/* An instance of this is created to index a CU. */
class cooked_indexer
@@ -4471,7 +4531,7 @@ private:
bool is_dwz,
bool for_scanning);
- /* Index DIEs in the READER starting at INFO_PTR. PARENT_ENTRY is
+ /* Index DIEs in the READER starting at INFO_PTR. PARENT is
the entry for the enclosing scope (nullptr at top level). FULLY
is true when a full scan must be done -- in some languages,
function scopes must be fully explored in order to find nested
@@ -4479,7 +4539,8 @@ private:
reading stopped. */
const gdb_byte *index_dies (cutu_reader *reader,
const gdb_byte *info_ptr,
- const cooked_index_entry *parent_entry,
+ std::variant<const cooked_index_entry *,
+ parent_map::addr_type> parent,
bool fully);
/* Scan the attributes for a given DIE and update the out
@@ -4509,7 +4570,8 @@ private:
m_die_range_map and then calling index_dies. */
const gdb_byte *recurse (cutu_reader *reader,
const gdb_byte *info_ptr,
- const cooked_index_entry *parent_entry,
+ std::variant<const cooked_index_entry *,
+ parent_map::addr_type> parent_entry,
bool fully);
/* The storage object, where the results are kept. */
@@ -4826,6 +4888,11 @@ private:
{
if (dwarf_read_debug > 0)
print_tu_stats (m_per_objfile);
+ if (dwarf_read_debug > 1)
+ {
+ dwarf_read_debug_printf_v ("Final m_all_parents_map:");
+ m_all_parents_map.dump ();
+ }
}
/* After the last DWARF-reading task has finished, this function
@@ -16063,6 +16130,10 @@ cooked_indexer::ensure_cu_exists (cutu_reader *reader,
cutu_reader new_reader (per_cu, per_objfile, nullptr, nullptr, false,
m_index_storage->get_abbrev_cache ());
+ if (new_reader.dummy_p || new_reader.comp_unit_die == nullptr
+ || !new_reader.comp_unit_die->has_children)
+ return nullptr;
+
prepare_one_comp_unit (new_reader.cu, new_reader.comp_unit_die,
language_minimal);
std::unique_ptr<cutu_reader> copy
@@ -16070,7 +16141,8 @@ cooked_indexer::ensure_cu_exists (cutu_reader *reader,
result = m_index_storage->preserve (std::move (copy));
}
- if (result->dummy_p || !result->comp_unit_die->has_children)
+ if (result->dummy_p || result->comp_unit_die == nullptr
+ || !result->comp_unit_die->has_children)
return nullptr;
if (for_scanning)
@@ -16238,7 +16310,8 @@ cooked_indexer::scan_attributes (dwarf2_per_cu_data *scanning_per_cu,
want to treat them as definitions. */
if ((abbrev->tag == DW_TAG_class_type
|| abbrev->tag == DW_TAG_structure_type
- || abbrev->tag == DW_TAG_union_type)
+ || abbrev->tag == DW_TAG_union_type
+ || abbrev->tag == DW_TAG_namespace)
&& abbrev->has_children)
*flags |= IS_TYPE_DECLARATION;
else
@@ -16256,49 +16329,53 @@ cooked_indexer::scan_attributes (dwarf2_per_cu_data *scanning_per_cu,
cutu_reader *new_reader
= ensure_cu_exists (reader, reader->cu->per_objfile, origin_offset,
origin_is_dwz, false);
- if (new_reader != nullptr)
- {
- const gdb_byte *new_info_ptr = (new_reader->buffer
- + to_underlying (origin_offset));
+ if (new_reader == nullptr)
+ error (_(DWARF_ERROR_PREFIX
+ "cannot follow reference to DIE at %s"
+ " [in module %s]"),
+ sect_offset_str (origin_offset),
+ bfd_get_filename (reader->abfd));
- if (*parent_entry == nullptr)
- {
- /* We only perform immediate lookups of parents for DIEs
- from earlier in this CU. This avoids any problem
- with a NULL result when when we see a reference to a
- DIE in another CU that we may or may not have
- imported locally. */
- parent_map::addr_type addr
- = parent_map::form_addr (origin_offset, origin_is_dwz);
- if (new_reader->cu != reader->cu || new_info_ptr > watermark_ptr)
- *maybe_defer = addr;
- else
- *parent_entry = m_die_range_map->find (addr);
- }
+ const gdb_byte *new_info_ptr = (new_reader->buffer
+ + to_underlying (origin_offset));
- unsigned int bytes_read;
- const abbrev_info *new_abbrev = peek_die_abbrev (*new_reader,
- new_info_ptr,
- &bytes_read);
+ if (*parent_entry == nullptr)
+ {
+ /* We only perform immediate lookups of parents for DIEs
+ from earlier in this CU. This avoids any problem
+ with a NULL result when when we see a reference to a
+ DIE in another CU that we may or may not have
+ imported locally. */
+ parent_map::addr_type addr
+ = parent_map::form_addr (origin_offset, origin_is_dwz);
+ if (new_reader->cu != reader->cu || new_info_ptr > watermark_ptr)
+ *maybe_defer = addr;
+ else
+ *parent_entry = m_die_range_map->find (addr);
+ }
- if (new_abbrev == nullptr)
- error (_(DWARF_ERROR_PREFIX
- "Unexpected null DIE at offset %s [in module %s]"),
- sect_offset_str (origin_offset),
- bfd_get_filename (new_reader->abfd));
+ unsigned int bytes_read;
+ const abbrev_info *new_abbrev = peek_die_abbrev (*new_reader,
+ new_info_ptr,
+ &bytes_read);
- new_info_ptr += bytes_read;
+ if (new_abbrev == nullptr)
+ error (_(DWARF_ERROR_PREFIX
+ "Unexpected null DIE at offset %s [in module %s]"),
+ sect_offset_str (origin_offset),
+ bfd_get_filename (new_reader->abfd));
- if (new_reader->cu == reader->cu && new_info_ptr == watermark_ptr)
- {
- /* Self-reference, we're done. */
- }
- else
- scan_attributes (scanning_per_cu, new_reader, new_info_ptr,
- new_info_ptr, new_abbrev, name, linkage_name,
- flags, nullptr, parent_entry, maybe_defer,
- is_enum_class, true);
+ new_info_ptr += bytes_read;
+
+ if (new_reader->cu == reader->cu && new_info_ptr == watermark_ptr)
+ {
+ /* Self-reference, we're done. */
}
+ else
+ scan_attributes (scanning_per_cu, new_reader, new_info_ptr,
+ new_info_ptr, new_abbrev, name, linkage_name,
+ flags, nullptr, parent_entry, maybe_defer,
+ is_enum_class, true);
}
if (!for_specification)
@@ -16393,10 +16470,16 @@ cooked_indexer::index_imported_unit (cutu_reader *reader,
const gdb_byte *
cooked_indexer::recurse (cutu_reader *reader,
const gdb_byte *info_ptr,
- const cooked_index_entry *parent_entry,
+ std::variant<const cooked_index_entry *,
+ parent_map::addr_type> parent,
bool fully)
{
- info_ptr = index_dies (reader, info_ptr, parent_entry, fully);
+ info_ptr = index_dies (reader, info_ptr, parent, fully);
+
+ if (!std::holds_alternative<const cooked_index_entry *> (parent))
+ return info_ptr;
+ const cooked_index_entry *parent_entry
+ = std::get<const cooked_index_entry *> (parent);
if (parent_entry != nullptr)
{
@@ -16417,7 +16500,8 @@ cooked_indexer::recurse (cutu_reader *reader,
const gdb_byte *
cooked_indexer::index_dies (cutu_reader *reader,
const gdb_byte *info_ptr,
- const cooked_index_entry *parent_entry,
+ std::variant<const cooked_index_entry *,
+ parent_map::addr_type> parent,
bool fully)
{
const gdb_byte *end_ptr = (reader->buffer
@@ -16444,15 +16528,20 @@ cooked_indexer::index_dies (cutu_reader *reader,
{
info_ptr = skip_one_die (reader, info_ptr, abbrev, !fully);
if (fully && abbrev->has_children)
- info_ptr = index_dies (reader, info_ptr, parent_entry, fully);
+ info_ptr = index_dies (reader, info_ptr, parent, fully);
continue;
}
const char *name = nullptr;
const char *linkage_name = nullptr;
parent_map::addr_type defer {};
+ if (std::holds_alternative<parent_map::addr_type> (parent))
+ defer = std::get<parent_map::addr_type> (parent);
cooked_index_flag flags = IS_STATIC;
sect_offset sibling {};
+ const cooked_index_entry *parent_entry = nullptr;
+ if (std::holds_alternative<const cooked_index_entry *> (parent))
+ parent_entry = std::get<const cooked_index_entry *> (parent);
const cooked_index_entry *this_parent_entry = parent_entry;
bool is_enum_class = false;
@@ -16471,12 +16560,6 @@ cooked_indexer::index_dies (cutu_reader *reader,
flags &= ~IS_STATIC;
flags |= parent_entry->flags & IS_STATIC;
}
- /* If the parent is an enum, but not an enum class, then use the
- grandparent instead. */
- if (this_parent_entry != nullptr
- && this_parent_entry->tag == DW_TAG_enumeration_type
- && !is_enum_class)
- this_parent_entry = this_parent_entry->get_parent ();
if (abbrev->tag == DW_TAG_namespace
&& m_language == language_cplus
@@ -16536,7 +16619,27 @@ cooked_indexer::index_dies (cutu_reader *reader,
break;
case DW_TAG_enumeration_type:
- info_ptr = recurse (reader, info_ptr, this_entry, fully);
+ /* We need to recurse even for an anonymous enumeration.
+ Which scope we record as the parent scope depends on
+ whether we're reading an "enum class". If so, we use
+ the enum itself as the parent, yielding names like
+ "enum_class::enumerator"; otherwise we inject the
+ names into our own parent scope. */
+ {
+ std::variant<const cooked_index_entry *,
+ parent_map::addr_type> recurse_parent;
+ if (is_enum_class)
+ {
+ gdb_assert (this_entry != nullptr);
+ recurse_parent = this_entry;
+ }
+ else if (defer != 0)
+ recurse_parent = defer;
+ else
+ recurse_parent = this_parent_entry;
+
+ info_ptr = recurse (reader, info_ptr, recurse_parent, fully);
+ }
continue;
case DW_TAG_module:
@@ -16617,7 +16720,8 @@ cooked_index_functions::expand_symtabs_matching
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain)
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
{
dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
@@ -16636,7 +16740,8 @@ cooked_index_functions::expand_symtabs_matching
if (!dw2_expand_symtabs_matching_one (per_cu, per_objfile,
file_matcher,
- expansion_notify))
+ expansion_notify,
+ lang_matcher))
return false;
}
return true;
@@ -16661,8 +16766,42 @@ cooked_index_functions::expand_symtabs_matching
symbol_name_match_type match_type
= lookup_name_without_params.match_type ();
+ std::bitset<nr_languages> unique_styles_used;
+ if (lang_matcher != nullptr)
+ for (unsigned iter = 0; iter < nr_languages; ++iter)
+ {
+ enum language lang = (enum language) iter;
+ if (!lang_matcher (lang))
+ continue;
+
+ switch (lang)
+ {
+ case language_cplus:
+ case language_rust:
+ unique_styles_used[language_cplus] = true;
+ break;
+ case language_d:
+ case language_go:
+ unique_styles_used[language_d] = true;
+ break;
+ case language_ada:
+ unique_styles_used[language_ada] = true;
+ break;
+ default:
+ unique_styles_used[language_c] = true;
+ }
+
+ if (unique_styles_used.count ()
+ == sizeof (unique_styles) / sizeof (unique_styles[0]))
+ break;
+ }
+
for (enum language lang : unique_styles)
{
+ if (lang_matcher != nullptr
+ && !unique_styles_used.test (lang))
+ continue;
+
std::vector<std::string_view> name_vec
= lookup_name_without_params.split_name (lang);
std::vector<std::string> name_str_vec (name_vec.begin (), name_vec.end ());
@@ -16693,6 +16832,15 @@ cooked_index_functions::expand_symtabs_matching
|| !entry->matches (domain))
continue;
+ if (lang_matcher != nullptr)
+ {
+ /* Try to skip CUs with non-matching language. */
+ entry->per_cu->ensure_lang (per_objfile);
+ if (!entry->per_cu->maybe_multi_language ()
+ && !lang_matcher (entry->per_cu->lang ()))
+ continue;
+ }
+
/* We've found the base name of the symbol; now walk its
parentage chain, ensuring that each component
matches. */
@@ -16761,7 +16909,7 @@ cooked_index_functions::expand_symtabs_matching
if (!dw2_expand_symtabs_matching_one (entry->per_cu, per_objfile,
file_matcher,
- expansion_notify))
+ expansion_notify, nullptr))
return false;
}
}
@@ -17762,7 +17910,7 @@ die_is_declaration (struct die_info *die, struct dwarf2_cu *cu)
which value is non-zero. However, we have to be careful with
DIEs having a DW_AT_specification attribute, because dwarf2_attr()
(via dwarf2_flag_true_p) follows this attribute. So we may
- end up accidently finding a declaration attribute that belongs
+ end up accidentally finding a declaration attribute that belongs
to a different DIE referenced by the specification attribute,
even though the given DIE does not have a declaration attribute. */
return (dwarf2_flag_true_p (die, DW_AT_declaration, cu)
@@ -20353,7 +20501,12 @@ follow_die_offset (sect_offset sect_off, int offset_in_dwz,
false, cu->lang ());
target_cu = per_objfile->get_cu (per_cu);
- gdb_assert (target_cu != nullptr);
+ if (target_cu == nullptr)
+ error (_(DWARF_ERROR_PREFIX
+ "cannot follow reference to DIE at %s"
+ " [in module %s]"),
+ sect_offset_str (sect_off),
+ objfile_name (per_objfile->objfile));
}
else if (cu->dies == NULL)
{
@@ -21142,6 +21295,7 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu,
case DW_OP_addrx:
case DW_OP_GNU_addr_index:
+ case DW_OP_constx:
case DW_OP_GNU_const_index:
stack[++stacki]
= (CORE_ADDR) read_addr_index_from_leb128 (cu, &data[i],
@@ -21460,6 +21614,24 @@ dwarf2_per_cu_data::set_lang (enum language lang,
gdb_assert (old_dw == 0 || old_dw == dw_lang);
}
+/* See read.h. */
+
+void
+dwarf2_per_cu_data::ensure_lang (dwarf2_per_objfile *per_objfile)
+{
+ if (lang (false) != language_unknown)
+ return;
+
+ cutu_reader reader (this, per_objfile);
+ if (reader.dummy_p)
+ {
+ set_lang (language_minimal, (dwarf_source_language)0);
+ return;
+ }
+
+ prepare_one_comp_unit (reader.cu, reader.comp_unit_die, language_minimal);
+}
+
/* A helper function for dwarf2_find_containing_comp_unit that returns
the index of the result, and that searches a vector. It will
return a result even if the offset in question does not actually
@@ -21623,6 +21795,14 @@ prepare_one_comp_unit (struct dwarf2_cu *cu, struct die_info *comp_unit_die,
cu->language_defn = language_def (lang);
+ /* Initialize the lto_artificial field. */
+ attr = dwarf2_attr (comp_unit_die, DW_AT_name, cu);
+ if (attr != nullptr
+ && cu->producer != nullptr
+ && strcmp (attr->as_string (), "<artificial>") == 0
+ && producer_is_gcc (cu->producer, nullptr, nullptr))
+ cu->per_cu->lto_artificial = true;
+
switch (comp_unit_die->tag)
{
case DW_TAG_compile_unit:
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index b23972b..7c42017 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -102,6 +102,7 @@ struct dwarf2_per_cu_data
is_dwz (false),
reading_dwo_directly (false),
tu_read (false),
+ lto_artificial (false),
queued (false),
m_header_read_in (false),
mark (false),
@@ -148,6 +149,11 @@ public:
This flag is only valid if is_debug_types is true. */
unsigned int tu_read : 1;
+ /* Non-zero if the CU is produced by GCC and has name "<artificial>". GCC
+ uses this to indicate that the CU does not correspond to a single source
+ file. GCC produces this type of CU during LTO. */
+ unsigned int lto_artificial : 1;
+
/* Wrap the following in struct packed instead of bitfields to avoid
data races when the bitfields end up on the same memory location
(per C++ memory model). */
@@ -324,6 +330,9 @@ public:
return l;
}
+ /* Make sure that m_lang != language_unknown. */
+ void ensure_lang (dwarf2_per_objfile *per_objfile);
+
/* Return the language of this CU, as a DWARF DW_LANG_* value. This
may be 0 in some situations. */
dwarf_source_language dw_lang () const
@@ -335,6 +344,22 @@ public:
situation LANG would be set by the importing CU. */
void set_lang (enum language lang, dwarf_source_language dw_lang);
+ /* Return true if the CU may be a multi-language CU. */
+
+ bool maybe_multi_language () const
+ {
+ enum language lang = this->lang ();
+
+ if (!lto_artificial)
+ /* Assume multi-language CUs are generated only by GCC LTO. */
+ return false;
+
+ /* If GCC mixes different languages in an artificial LTO CU, it labels it C.
+ The exception to this is when it mixes C and C++, which it labels it C++.
+ For now, we don't consider the latter a multi-language CU. */
+ return lang == language_c;
+ }
+
/* Free any cached file names. */
void free_cached_file_names ();
};
@@ -867,7 +892,8 @@ extern bool dw2_expand_symtabs_matching_one
(dwarf2_per_cu_data *per_cu,
dwarf2_per_objfile *per_objfile,
gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
- gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify);
+ gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher);
/* Helper for dw2_expand_symtabs_matching that works with a
mapped_index_base instead of the containing objfile. This is split
@@ -881,7 +907,8 @@ extern bool dw2_expand_symtabs_matching_symbol
const lookup_name_info &lookup_name_in,
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<bool (offset_type)> match_callback,
- dwarf2_per_objfile *per_objfile);
+ dwarf2_per_objfile *per_objfile,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher);
/* If FILE_MATCHER is non-NULL, set all the
dwarf2_per_cu_quick_data::MARK of the current DWARF2_PER_OBJFILE
diff --git a/gdb/dwarf2/tag.h b/gdb/dwarf2/tag.h
index 2ceae53..d82690b 100644
--- a/gdb/dwarf2/tag.h
+++ b/gdb/dwarf2/tag.h
@@ -30,7 +30,6 @@ tag_is_type (dwarf_tag tag)
{
switch (tag)
{
- case DW_TAG_padding:
case DW_TAG_array_type:
case DW_TAG_class_type:
case DW_TAG_enumeration_type:
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 5371b99..2e68b0d 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -29,8 +29,6 @@
#include "symfile.h"
#include "objfiles.h"
#include "stabsread.h"
-#include "demangle.h"
-#include "filenames.h"
#include "probe.h"
#include "arch-utils.h"
#include "gdbtypes.h"
@@ -39,16 +37,15 @@
#include "gdbthread.h"
#include "inferior.h"
#include "regcache.h"
-#include "bcache.h"
#include "gdb_bfd.h"
#include "location.h"
#include "auxv.h"
#include "mdebugread.h"
#include "ctfread.h"
#include <string_view>
-#include "gdbsupport/scoped_fd.h"
#include "dwarf2/public.h"
#include "cli/cli-cmds.h"
+#include "gdb-stabs.h"
/* Whether ctf should always be read, or only if no dwarf is present. */
static bool always_read_ctf;
@@ -615,6 +612,8 @@ elf_rel_plt_read (minimal_symbol_reader &reader,
const size_t got_suffix_len = strlen (SYMBOL_GOT_PLT_SUFFIX);
name = bfd_asymbol_name (*relplt->relocation[reloc].sym_ptr_ptr);
+ if (!name)
+ continue;
address = relplt->relocation[reloc].address;
asection *msym_section;
@@ -1225,6 +1224,134 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
return has_dwarf2;
}
+/* find_text_range --- find start and end of loadable code sections
+
+ The find_text_range function finds the shortest address range that
+ encloses all sections containing executable code, and stores it in
+ objfile's text_addr and text_size members.
+
+ dbx_symfile_read will use this to finish off the partial symbol
+ table, in some cases. */
+
+static void
+find_text_range (bfd * sym_bfd, struct objfile *objfile)
+{
+ asection *sec;
+ int found_any = 0;
+ CORE_ADDR start = 0;
+ CORE_ADDR end = 0;
+
+ for (sec = sym_bfd->sections; sec; sec = sec->next)
+ if (bfd_section_flags (sec) & SEC_CODE)
+ {
+ CORE_ADDR sec_start = bfd_section_vma (sec);
+ CORE_ADDR sec_end = sec_start + bfd_section_size (sec);
+
+ if (found_any)
+ {
+ if (sec_start < start)
+ start = sec_start;
+ if (sec_end > end)
+ end = sec_end;
+ }
+ else
+ {
+ start = sec_start;
+ end = sec_end;
+ }
+
+ found_any = 1;
+ }
+
+ if (!found_any)
+ error (_("Can't find any code sections in symbol file"));
+
+ DBX_TEXT_ADDR (objfile) = start;
+ DBX_TEXT_SIZE (objfile) = end - start;
+}
+
+/* Scan and build partial symbols for an ELF symbol file.
+ This ELF file has already been processed to get its minimal symbols.
+
+ This routine is the equivalent of dbx_symfile_init and dbx_symfile_read
+ rolled into one.
+
+ OBJFILE is the object file we are reading symbols from.
+ ADDR is the address relative to which the symbols are (e.g.
+ the base address of the text segment).
+ STABSECT is the BFD section information for the .stab section.
+ STABSTROFFSET and STABSTRSIZE define the location in OBJFILE where the
+ .stabstr section exists.
+
+ This routine is mostly copied from dbx_symfile_init and dbx_symfile_read,
+ adjusted for elf details. */
+
+void
+elfstab_build_psymtabs (struct objfile *objfile, asection *stabsect,
+ file_ptr stabstroffset, unsigned int stabstrsize)
+{
+ int val;
+ bfd *sym_bfd = objfile->obfd.get ();
+ const char *name = bfd_get_filename (sym_bfd);
+
+ stabsread_new_init ();
+
+ /* Allocate struct to keep track of stab reading. */
+ dbx_objfile_data_key.emplace (objfile);
+ dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ /* Find the first and last text address. dbx_symfile_read seems to
+ want this. */
+ find_text_range (sym_bfd, objfile);
+
+#define ELF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */
+ DBX_SYMBOL_SIZE (objfile) = ELF_STABS_SYMBOL_SIZE;
+ DBX_SYMCOUNT (objfile)
+ = bfd_section_size (stabsect) / DBX_SYMBOL_SIZE (objfile);
+ DBX_STRINGTAB_SIZE (objfile) = stabstrsize;
+ DBX_SYMTAB_OFFSET (objfile) = stabsect->filepos;
+ DBX_STAB_SECTION (objfile) = stabsect;
+
+ if (stabstrsize > bfd_get_size (sym_bfd))
+ error (_("ridiculous string table size: %d bytes"), stabstrsize);
+ DBX_STRINGTAB (objfile) = (char *)
+ obstack_alloc (&objfile->objfile_obstack, stabstrsize + 1);
+ OBJSTAT (objfile, sz_strtab += stabstrsize + 1);
+
+ /* Now read in the string table in one big gulp. */
+
+ val = bfd_seek (sym_bfd, stabstroffset, SEEK_SET);
+ if (val < 0)
+ perror_with_name (name);
+ val = bfd_read (DBX_STRINGTAB (objfile), stabstrsize, sym_bfd);
+ if (val != stabstrsize)
+ perror_with_name (name);
+
+ stabsread_new_init ();
+ free_header_files ();
+ init_header_files ();
+
+ key->ctx.processing_acc_compilation = 1;
+
+ key->ctx.symbuf_read = 0;
+ key->ctx.symbuf_left = bfd_section_size (stabsect);
+
+ scoped_restore restore_stabs_data = make_scoped_restore (&key->ctx.stabs_data);
+ gdb::unique_xmalloc_ptr<gdb_byte> data_holder;
+
+ key->ctx.stabs_data = symfile_relocate_debug_section (objfile, stabsect, NULL);
+ if (key->ctx.stabs_data)
+ data_holder.reset (key->ctx.stabs_data);
+
+ /* In an elf file, we've already installed the minimal symbols that came
+ from the elf (non-stab) symbol table, so always act like an
+ incremental load here. dbx_symfile_read should not generate any new
+ minimal symbols, since we will have already read the ELF dynamic symbol
+ table and normal symbol entries won't be in the ".stab" section; but in
+ case it does, it will install them itself. */
+ read_stabs_symtab (objfile, 0);
+}
+
/* Scan and build partial symbols for a symbol file.
We have been initialized by a call to elf_symfile_init, which
currently does nothing.
diff --git a/gdb/eval.c b/gdb/eval.c
index bbf4375..457a436 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1872,18 +1872,21 @@ eval_op_postdec (struct type *expect_type, struct expression *exp,
}
}
-/* A helper function for OP_TYPE. */
+namespace expr
+{
struct value *
-eval_op_type (struct type *expect_type, struct expression *exp,
- enum noside noside, struct type *type)
+type_operation::evaluate (struct type *expect_type, struct expression *exp,
+ enum noside noside)
{
if (noside == EVAL_AVOID_SIDE_EFFECTS)
- return value::allocate (type);
+ return value::allocate (std::get<0> (m_storage));
else
error (_("Attempt to use a type name as an expression"));
}
+}
+
/* A helper function for BINOP_ASSIGN_MODIFY. */
struct value *
@@ -2102,7 +2105,7 @@ eval_op_objc_msgcall (struct type *expect_type, struct expression *exp,
/* Found a function symbol. Now we will substitute its
value in place of the message dispatcher (obj_msgSend),
- so that we call the method directly instead of thru
+ so that we call the method directly instead of through
the dispatcher. The main reason for doing this is that
we can now evaluate the return value and parameter values
according to their known data types, in case we need to
diff --git a/gdb/exec.h b/gdb/exec.h
index 0c1f604..c08cb9f 100644
--- a/gdb/exec.h
+++ b/gdb/exec.h
@@ -62,7 +62,7 @@ extern enum target_xfer_status
noted above. See memory_xfer_partial_1() in target.c for an
example.
- Return the number of bytes actually transfered, or zero when no
+ Return the number of bytes actually transferred, or zero when no
data is available for the requested range.
This function is intended to be used from target_xfer_partial
diff --git a/gdb/expop.h b/gdb/expop.h
index 2d46a9d..af031f5 100644
--- a/gdb/expop.h
+++ b/gdb/expop.h
@@ -172,9 +172,6 @@ extern struct value *eval_op_ind (struct type *expect_type,
struct expression *exp,
enum noside noside,
struct value *arg1);
-extern struct value *eval_op_type (struct type *expect_type,
- struct expression *exp,
- enum noside noside, struct type *type);
extern struct value *eval_op_alignof (struct type *expect_type,
struct expression *exp,
enum noside noside,
@@ -1560,16 +1557,16 @@ public:
value *evaluate (struct type *expect_type,
struct expression *exp,
- enum noside noside) override
- {
- return eval_op_type (expect_type, exp, noside, std::get<0> (m_storage));
- }
+ enum noside noside) override;
enum exp_opcode opcode () const override
{ return OP_TYPE; }
bool constant_p () const override
{ return true; }
+
+ bool type_p () const override
+ { return true; }
};
/* Implement the "typeof" operation. */
@@ -1593,6 +1590,9 @@ public:
enum exp_opcode opcode () const override
{ return OP_TYPEOF; }
+
+ bool type_p () const override
+ { return true; }
};
/* Implement 'decltype'. */
@@ -1638,6 +1638,9 @@ public:
enum exp_opcode opcode () const override
{ return OP_DECLTYPE; }
+
+ bool type_p () const override
+ { return true; }
};
/* Implement 'typeid'. */
@@ -1652,9 +1655,8 @@ public:
struct expression *exp,
enum noside noside) override
{
- enum exp_opcode sub_op = std::get<0> (m_storage)->opcode ();
enum noside sub_noside
- = ((sub_op == OP_TYPE || sub_op == OP_DECLTYPE || sub_op == OP_TYPEOF)
+ = (std::get<0> (m_storage)->type_p ()
? EVAL_AVOID_SIDE_EFFECTS
: noside);
diff --git a/gdb/expression.h b/gdb/expression.h
index 5bfc74c..2eb866f 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -147,6 +147,11 @@ public:
virtual bool uses_objfile (struct objfile *objfile) const
{ return false; }
+ /* Some expression nodes represent a type, not a value. This method
+ should be overridden to return 'true' in these situations. */
+ virtual bool type_p () const
+ { return false; }
+
/* Generate agent expression bytecodes for this operation. */
void generate_ax (struct expression *exp, struct agent_expr *ax,
struct axs_value *value,
@@ -215,6 +220,11 @@ struct expression
op->dump (stream, 0);
}
+ /* Call the type_p method on the outermost sub-expression of this
+ expression, and return the result. */
+ bool type_p () const
+ { return op->type_p (); }
+
/* Return true if this expression uses OBJFILE (and will become
dangling when OBJFILE is unloaded), otherwise return false.
OBJFILE must not be a separate debug info file. */
diff --git a/gdb/extension.c b/gdb/extension.c
index c488fc7..897bf25 100644
--- a/gdb/extension.c
+++ b/gdb/extension.c
@@ -680,7 +680,7 @@ static bool quit_flag;
/* The current extension language we've called out to, or
extension_language_gdb if there isn't one.
- This must be set everytime we call out to an extension language, and reset
+ This must be set every time we call out to an extension language, and reset
to the previous value when it returns. Note that the previous value may
be a different (or the same) extension language. */
static const struct extension_language_defn *active_ext_lang
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index ac51f10..e97ff52d 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -26,7 +26,6 @@
#include "regcache.h"
#include "regset.h"
#include "gdbthread.h"
-#include "objfiles.h"
#include "xml-syscall.h"
#include <sys/socket.h>
#include <arpa/inet.h>
diff --git a/gdb/features/Makefile b/gdb/features/Makefile
index ddf4ec2..01b327c 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -222,12 +222,10 @@ FEATURE_XMLFILES = aarch64-core.xml \
i386/32bit-sse.xml \
i386/32bit-linux.xml \
i386/32bit-avx.xml \
- i386/32bit-mpx.xml \
i386/32bit-avx512.xml \
i386/32bit-segments.xml \
i386/64bit-avx512.xml \
i386/64bit-core.xml \
- i386/64bit-mpx.xml \
i386/64bit-segments.xml \
i386/64bit-avx.xml \
i386/64bit-linux.xml \
diff --git a/gdb/features/btrace-conf.dtd b/gdb/features/btrace-conf.dtd
index 87a4a84..c6f3f60 100644
--- a/gdb/features/btrace-conf.dtd
+++ b/gdb/features/btrace-conf.dtd
@@ -13,3 +13,4 @@
<!ELEMENT pt EMPTY>
<!ATTLIST pt size CDATA #IMPLIED>
<!ATTLIST pt ptwrite (yes | no) #IMPLIED>
+<!ATTLIST pt event-tracing (yes | no) #IMPLIED>
diff --git a/gdb/features/i386/32bit-mpx.c b/gdb/features/i386/32bit-mpx.c
deleted file mode 100644
index 40b34ed..0000000
--- a/gdb/features/i386/32bit-mpx.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
- Original: 32bit-mpx.xml */
-
-#include "gdbsupport/tdesc.h"
-
-static int
-create_feature_i386_32bit_mpx (struct target_desc *result, long regnum)
-{
- struct tdesc_feature *feature;
-
- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
- tdesc_type_with_fields *type_with_fields;
- type_with_fields = tdesc_create_struct (feature, "br128");
- tdesc_type *field_type;
- field_type = tdesc_named_type (feature, "uint64");
- tdesc_add_field (type_with_fields, "lbound", field_type);
- field_type = tdesc_named_type (feature, "uint64");
- tdesc_add_field (type_with_fields, "ubound_raw", field_type);
-
- type_with_fields = tdesc_create_struct (feature, "_bndstatus");
- tdesc_set_struct_size (type_with_fields, 8);
- tdesc_add_bitfield (type_with_fields, "bde", 2, 31);
- tdesc_add_bitfield (type_with_fields, "error", 0, 1);
-
- type_with_fields = tdesc_create_union (feature, "status");
- field_type = tdesc_named_type (feature, "data_ptr");
- tdesc_add_field (type_with_fields, "raw", field_type);
- field_type = tdesc_named_type (feature, "_bndstatus");
- tdesc_add_field (type_with_fields, "status", field_type);
-
- type_with_fields = tdesc_create_struct (feature, "_bndcfgu");
- tdesc_set_struct_size (type_with_fields, 8);
- tdesc_add_bitfield (type_with_fields, "base", 12, 31);
- tdesc_add_bitfield (type_with_fields, "reserved", 2, 11);
- tdesc_add_bitfield (type_with_fields, "preserved", 1, 1);
- tdesc_add_bitfield (type_with_fields, "enabled", 0, 0);
-
- type_with_fields = tdesc_create_union (feature, "cfgu");
- field_type = tdesc_named_type (feature, "data_ptr");
- tdesc_add_field (type_with_fields, "raw", field_type);
- field_type = tdesc_named_type (feature, "_bndcfgu");
- tdesc_add_field (type_with_fields, "config", field_type);
-
- tdesc_create_reg (feature, "bnd0raw", regnum++, 1, NULL, 128, "br128");
- tdesc_create_reg (feature, "bnd1raw", regnum++, 1, NULL, 128, "br128");
- tdesc_create_reg (feature, "bnd2raw", regnum++, 1, NULL, 128, "br128");
- tdesc_create_reg (feature, "bnd3raw", regnum++, 1, NULL, 128, "br128");
- tdesc_create_reg (feature, "bndcfgu", regnum++, 1, NULL, 64, "cfgu");
- tdesc_create_reg (feature, "bndstatus", regnum++, 1, NULL, 64, "status");
- return regnum;
-}
diff --git a/gdb/features/i386/32bit-mpx.xml b/gdb/features/i386/32bit-mpx.xml
deleted file mode 100644
index 81eb2ee..0000000
--- a/gdb/features/i386/32bit-mpx.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2013-2024 Free Software Foundation, Inc.
-
- Copying and distribution of this file, with or without modification,
- are permitted in any medium without royalty provided the copyright
- notice and this notice are preserved. -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.i386.mpx">
- <struct id="br128">
- <field name="lbound" type="uint64"/>
- <field name="ubound_raw" type="uint64"/>
- </struct>
-
- <struct id="_bndstatus" size="8">
- <field name="bde" start="2" end="31"/>
- <field name="error" start="0" end="1"/>
- </struct>
-
- <union id="status">
- <field name="raw" type="data_ptr"/>
- <field name="status" type="_bndstatus"/>
- </union>
-
- <struct id="_bndcfgu" size="8">
- <field name="base" start="12" end="31" />
- <field name="reserved" start="2" end="11"/>
- <!-- Explicitly set the type here, otherwise it defaults to bool.
- Perhaps this should be uint32, but the container type has size 8. -->
- <field name="preserved" start="1" end="1" type="uint64"/>
- <field name="enabled" start="0" end="0" type="uint64"/>
- </struct>
-
- <union id="cfgu">
- <field name="raw" type="data_ptr"/>
- <field name="config" type="_bndcfgu"/>
- </union>
-
- <reg name="bnd0raw" bitsize="128" type="br128"/>
- <reg name="bnd1raw" bitsize="128" type="br128"/>
- <reg name="bnd2raw" bitsize="128" type="br128"/>
- <reg name="bnd3raw" bitsize="128" type="br128"/>
- <reg name="bndcfgu" bitsize="64" type="cfgu"/>
- <reg name="bndstatus" bitsize="64" type="status"/>
-</feature>
diff --git a/gdb/features/i386/64bit-mpx.c b/gdb/features/i386/64bit-mpx.c
deleted file mode 100644
index 3eabc9d..0000000
--- a/gdb/features/i386/64bit-mpx.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
- Original: 64bit-mpx.xml */
-
-#include "gdbsupport/tdesc.h"
-
-static int
-create_feature_i386_64bit_mpx (struct target_desc *result, long regnum)
-{
- struct tdesc_feature *feature;
-
- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
- tdesc_type_with_fields *type_with_fields;
- type_with_fields = tdesc_create_struct (feature, "br128");
- tdesc_type *field_type;
- field_type = tdesc_named_type (feature, "uint64");
- tdesc_add_field (type_with_fields, "lbound", field_type);
- field_type = tdesc_named_type (feature, "uint64");
- tdesc_add_field (type_with_fields, "ubound_raw", field_type);
-
- type_with_fields = tdesc_create_struct (feature, "_bndstatus");
- tdesc_set_struct_size (type_with_fields, 8);
- tdesc_add_bitfield (type_with_fields, "bde", 2, 63);
- tdesc_add_bitfield (type_with_fields, "error", 0, 1);
-
- type_with_fields = tdesc_create_union (feature, "status");
- field_type = tdesc_named_type (feature, "data_ptr");
- tdesc_add_field (type_with_fields, "raw", field_type);
- field_type = tdesc_named_type (feature, "_bndstatus");
- tdesc_add_field (type_with_fields, "status", field_type);
-
- type_with_fields = tdesc_create_struct (feature, "_bndcfgu");
- tdesc_set_struct_size (type_with_fields, 8);
- tdesc_add_bitfield (type_with_fields, "base", 12, 63);
- tdesc_add_bitfield (type_with_fields, "reserved", 2, 11);
- tdesc_add_bitfield (type_with_fields, "preserved", 1, 1);
- tdesc_add_bitfield (type_with_fields, "enabled", 0, 0);
-
- type_with_fields = tdesc_create_union (feature, "cfgu");
- field_type = tdesc_named_type (feature, "data_ptr");
- tdesc_add_field (type_with_fields, "raw", field_type);
- field_type = tdesc_named_type (feature, "_bndcfgu");
- tdesc_add_field (type_with_fields, "config", field_type);
-
- tdesc_create_reg (feature, "bnd0raw", regnum++, 1, NULL, 128, "br128");
- tdesc_create_reg (feature, "bnd1raw", regnum++, 1, NULL, 128, "br128");
- tdesc_create_reg (feature, "bnd2raw", regnum++, 1, NULL, 128, "br128");
- tdesc_create_reg (feature, "bnd3raw", regnum++, 1, NULL, 128, "br128");
- tdesc_create_reg (feature, "bndcfgu", regnum++, 1, NULL, 64, "cfgu");
- tdesc_create_reg (feature, "bndstatus", regnum++, 1, NULL, 64, "status");
- return regnum;
-}
diff --git a/gdb/features/i386/64bit-mpx.xml b/gdb/features/i386/64bit-mpx.xml
deleted file mode 100644
index 812c78c..0000000
--- a/gdb/features/i386/64bit-mpx.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2013-2024 Free Software Foundation, Inc.
-
- Copying and distribution of this file, with or without modification,
- are permitted in any medium without royalty provided the copyright
- notice and this notice are preserved. -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.i386.mpx">
- <struct id="br128">
- <field name="lbound" type="uint64"/>
- <field name="ubound_raw" type="uint64"/>
- </struct>
-
- <struct id="_bndstatus" size="8">
- <field name="bde" start="2" end="63"/>
- <field name="error" start="0" end="1"/>
- </struct>
-
- <union id="status">
- <field name="raw" type="data_ptr"/>
- <field name="status" type="_bndstatus"/>
- </union>
-
- <struct id="_bndcfgu" size="8">
- <field name="base" start="12" end="63"/>
- <field name="reserved" start="2" end="11"/>
- <!-- Explicitly set the type here, otherwise it defaults to bool. -->
- <field name="preserved" start="1" end="1" type="uint64"/>
- <field name="enabled" start="0" end="0" type="uint64"/>
- </struct>
-
- <union id="cfgu">
- <field name="raw" type="data_ptr"/>
- <field name="config" type="_bndcfgu"/>
- </union>
-
- <reg name="bnd0raw" bitsize="128" type="br128"/>
- <reg name="bnd1raw" bitsize="128" type="br128"/>
- <reg name="bnd2raw" bitsize="128" type="br128"/>
- <reg name="bnd3raw" bitsize="128" type="br128"/>
- <reg name="bndcfgu" bitsize="64" type="cfgu"/>
- <reg name="bndstatus" bitsize="64" type="status"/>
-</feature>
diff --git a/gdb/features/mips-dsp-linux.c b/gdb/features/mips-dsp-linux.c
index d8e4028..4873037 100644
--- a/gdb/features/mips-dsp-linux.c
+++ b/gdb/features/mips-dsp-linux.c
@@ -11,7 +11,7 @@ initialize_tdesc_mips_dsp_linux (void)
target_desc_up result = allocate_target_description ();
set_tdesc_architecture (result.get (), bfd_scan_arch ("mips"));
- set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("GNU/Linux"));
+ set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
struct tdesc_feature *feature;
diff --git a/gdb/features/mips-linux.c b/gdb/features/mips-linux.c
index f93eef5..5ff2e5f 100644
--- a/gdb/features/mips-linux.c
+++ b/gdb/features/mips-linux.c
@@ -11,7 +11,7 @@ initialize_tdesc_mips_linux (void)
target_desc_up result = allocate_target_description ();
set_tdesc_architecture (result.get (), bfd_scan_arch ("mips"));
- set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("GNU/Linux"));
+ set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
struct tdesc_feature *feature;
diff --git a/gdb/features/or1k-linux.c b/gdb/features/or1k-linux.c
index 2473145..85a681f 100644
--- a/gdb/features/or1k-linux.c
+++ b/gdb/features/or1k-linux.c
@@ -11,7 +11,7 @@ initialize_tdesc_or1k_linux (void)
target_desc_up result = allocate_target_description ();
set_tdesc_architecture (result.get (), bfd_scan_arch ("or1k"));
- set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("GNU/Linux"));
+ set_tdesc_osabi (result.get (), GDB_OSABI_LINUX);
struct tdesc_feature *feature;
diff --git a/gdb/features/sparc/sparc32-solaris.c b/gdb/features/sparc/sparc32-solaris.c
index dce9685..70affdb 100644
--- a/gdb/features/sparc/sparc32-solaris.c
+++ b/gdb/features/sparc/sparc32-solaris.c
@@ -11,7 +11,7 @@ initialize_tdesc_sparc32_solaris (void)
target_desc_up result = allocate_target_description ();
set_tdesc_architecture (result.get (), bfd_scan_arch ("sparc"));
- set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("Solaris"));
+ set_tdesc_osabi (result.get (), GDB_OSABI_SOLARIS);
struct tdesc_feature *feature;
diff --git a/gdb/features/sparc/sparc64-solaris.c b/gdb/features/sparc/sparc64-solaris.c
index d030df6..98edabe 100644
--- a/gdb/features/sparc/sparc64-solaris.c
+++ b/gdb/features/sparc/sparc64-solaris.c
@@ -11,7 +11,7 @@ initialize_tdesc_sparc64_solaris (void)
target_desc_up result = allocate_target_description ();
set_tdesc_architecture (result.get (), bfd_scan_arch ("sparc:v9"));
- set_tdesc_osabi (result.get (), osabi_from_tdesc_string ("Solaris"));
+ set_tdesc_osabi (result.get (), GDB_OSABI_SOLARIS);
struct tdesc_feature *feature;
diff --git a/gdb/gdb-stabs.h b/gdb/gdb-stabs.h
index 3786ad6..20fb8fa 100644
--- a/gdb/gdb-stabs.h
+++ b/gdb/gdb-stabs.h
@@ -20,12 +20,108 @@
#ifndef GDB_STABS_H
#define GDB_STABS_H
+/* During initial symbol readin, we need to have a structure to keep
+ track of which psymtabs have which bincls in them. This structure
+ is used during readin to setup the list of dependencies within each
+ partial symbol table. */
+struct legacy_psymtab;
+
+struct header_file_location
+{
+ header_file_location (const char *name_, int instance_,
+ legacy_psymtab *pst_)
+ : name (name_),
+ instance (instance_),
+ pst (pst_)
+ {
+ }
+
+ const char *name; /* Name of header file */
+ int instance; /* See above */
+ legacy_psymtab *pst; /* Partial symtab that has the
+ BINCL/EINCL defs for this file. */
+};
+
/* This file exists to hold the common definitions required of most of
the symbol-readers that end up using stabs. The common use of
these `symbol-type-specific' customizations of the generic data
structures makes the stabs-oriented symbol readers able to call
each others' functions as required. */
+struct stabsread_context {
+ /* Remember what we deduced to be the source language of this psymtab. */
+ enum language psymtab_language = language_unknown;
+
+ /* The size of each symbol in the symbol file (in external form).
+ This is set by dbx_symfile_read when building psymtabs, and by
+ dbx_psymtab_to_symtab when building symtabs. */
+ unsigned symbol_size = 0;
+
+ /* This is the offset of the symbol table in the executable file. */
+ unsigned symbol_table_offset = 0;
+
+ /* This is the offset of the string table in the executable file. */
+ unsigned string_table_offset = 0;
+
+ /* For elf+stab executables, the n_strx field is not a simple index
+ into the string table. Instead, each .o file has a base offset in
+ the string table, and the associated symbols contain offsets from
+ this base. The following two variables contain the base offset for
+ the current and next .o files. */
+ unsigned int file_string_table_offset = 0;
+
+ /* .o and NLM files contain unrelocated addresses which are based at
+ 0. When non-zero, this flag disables some of the special cases for
+ Solaris elf+stab text addresses at location 0. */
+ int symfile_relocatable = 0;
+
+ /* When set, we are processing a .o file compiled by sun acc. This is
+ misnamed; it refers to all stabs-in-elf implementations which use
+ N_UNDF the way Sun does, including Solaris gcc. Hopefully all
+ stabs-in-elf implementations ever invented will choose to be
+ compatible. */
+ unsigned char processing_acc_compilation = 0;
+
+ /* The lowest text address we have yet encountered. This is needed
+ because in an a.out file, there is no header field which tells us
+ what address the program is actually going to be loaded at, so we
+ need to make guesses based on the symbols (which *are* relocated to
+ reflect the address it will be loaded at). */
+ unrelocated_addr lowest_text_address;
+
+ /* Non-zero if there is any line number info in the objfile. Prevents
+ dbx_end_psymtab from discarding an otherwise empty psymtab. */
+ int has_line_numbers = 0;
+
+ /* The list of bincls. */
+ std::vector<struct header_file_location> bincl_list;
+
+ /* Name of last function encountered. Used in Solaris to approximate
+ object file boundaries. */
+ const char *last_function_name = nullptr;
+
+ /* The address in memory of the string table of the object file we are
+ reading (which might not be the "main" object file, but might be a
+ shared library or some other dynamically loaded thing). This is
+ set by read_dbx_symtab when building psymtabs, and by
+ read_ofile_symtab when building symtabs, and is used only by
+ next_symbol_text. FIXME: If that is true, we don't need it when
+ building psymtabs, right? */
+ char *stringtab_global = nullptr;
+
+ /* These variables are used to control fill_symbuf when the stabs
+ symbols are not contiguous (as may be the case when a COFF file is
+ linked using --split-by-reloc). */
+ const std::vector<asection *> *symbuf_sections;
+ size_t sect_idx = 0;
+ unsigned int symbuf_left = 0;
+ unsigned int symbuf_read = 0;
+
+ /* This variable stores a global stabs buffer, if we read stabs into
+ memory in one chunk in order to process relocations. */
+ bfd_byte *stabs_data = nullptr;
+};
+
/* Information is passed among various dbxread routines for accessing
symbol files. A pointer to this structure is kept in the objfile,
@@ -43,6 +139,8 @@ struct dbx_symfile_info
file_ptr symtab_offset = 0; /* Offset in file to symbol table */
int symbol_size = 0; /* Bytes in a single symbol */
+ stabsread_context ctx; /* Context for the symfile being read. */
+
/* See stabsread.h for the use of the following. */
struct header_file *header_files = nullptr;
int n_header_files = 0;
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 1cf5f48..323f15d 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -631,7 +631,7 @@ address_space_name_to_type_instance_flags (struct gdbarch *gdbarch,
}
/* Identify address space identifier by type_instance_flags and return
- the string version of the adress space name. */
+ the string version of the address space name. */
const char *
address_space_type_instance_flags_to_name (struct gdbarch *gdbarch,
@@ -733,7 +733,7 @@ make_type_with_address_space (struct type *type,
If TYPEPTR and *TYPEPTR are non-zero, then *TYPEPTR points to
storage to hold the new qualified type; *TYPEPTR and TYPE must be
in the same objfile. Otherwise, allocate fresh memory for the new
- type whereever TYPE lives. If TYPEPTR is non-zero, set it to the
+ type wherever TYPE lives. If TYPEPTR is non-zero, set it to the
new type we construct. */
struct type *
@@ -1371,7 +1371,7 @@ create_array_type_with_stride (type_allocator &alloc,
undefined by setting it to zero. Although we are not expected
to trust TYPE_LENGTH in this case, setting the size to zero
allows us to avoid allocating objects of random sizes in case
- we accidently do. */
+ we accidentally do. */
result_type->set_length (0);
}
@@ -1553,7 +1553,7 @@ set_type_self_type (struct type *type, struct type *self_type)
}
/* Smash TYPE to be a type of pointers to members of SELF_TYPE with type
- TO_TYPE. A member pointer is a wierd thing -- it amounts to a
+ TO_TYPE. A member pointer is a weird thing -- it amounts to a
typed offset into a struct, e.g. "an int at offset 8". A MEMBER
TYPE doesn't include the offset (that's the value of the MEMBER
itself), but does include the structure type into which it points
diff --git a/gdb/i386-fbsd-nat.c b/gdb/i386-fbsd-nat.c
index f4538fb..d9f4067 100644
--- a/gdb/i386-fbsd-nat.c
+++ b/gdb/i386-fbsd-nat.c
@@ -254,7 +254,7 @@ i386_fbsd_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signal)
request = PT_CONTINUE;
}
- /* An addres of (caddr_t) 1 tells ptrace to continue from where it
+ /* An address of (caddr_t) 1 tells ptrace to continue from where it
was. (If GDB wanted it to start some other way, we have already
written a new PC value to the child.) */
if (ptrace (request, pid, (caddr_t) 1,
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 0e360b1..41c1113 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -259,7 +259,7 @@ fill_fpregset (const struct regcache *regcache,
#ifdef HAVE_PTRACE_GETREGS
/* Fetch all floating-point registers from process/thread TID and store
- thier values in GDB's register array. */
+ their values in GDB's register array. */
static void
fetch_fpregs (struct regcache *regcache, int tid)
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 6debed2..9dec83a 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -390,62 +390,6 @@ i386_canonicalize_syscall (int syscall)
#define SIG_CODE_BOUNDARY_FAULT 3
-/* i386 GNU/Linux implementation of the report_signal_info
- gdbarch hook. Displays information related to MPX bound
- violations. */
-void
-i386_linux_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout,
- enum gdb_signal siggnal)
-{
- /* -Wmaybe-uninitialized */
- CORE_ADDR lower_bound = 0, upper_bound = 0, access = 0;
- int is_upper;
- long sig_code = 0;
-
- if (!i386_mpx_enabled () || siggnal != GDB_SIGNAL_SEGV)
- return;
-
- try
- {
- /* Sigcode evaluates if the actual segfault is a boundary violation. */
- sig_code = parse_and_eval_long ("$_siginfo.si_code\n");
-
- lower_bound
- = parse_and_eval_long ("$_siginfo._sifields._sigfault._addr_bnd._lower");
- upper_bound
- = parse_and_eval_long ("$_siginfo._sifields._sigfault._addr_bnd._upper");
- access
- = parse_and_eval_long ("$_siginfo._sifields._sigfault.si_addr");
- }
- catch (const gdb_exception_error &exception)
- {
- return;
- }
-
- /* If this is not a boundary violation just return. */
- if (sig_code != SIG_CODE_BOUNDARY_FAULT)
- return;
-
- is_upper = (access > upper_bound ? 1 : 0);
-
- uiout->text ("\n");
- if (is_upper)
- uiout->field_string ("sigcode-meaning", _("Upper bound violation"));
- else
- uiout->field_string ("sigcode-meaning", _("Lower bound violation"));
-
- uiout->text (_(" while accessing address "));
- uiout->field_core_addr ("bound-access", gdbarch, access);
-
- uiout->text (_("\nBounds: [lower = "));
- uiout->field_core_addr ("lower-bound", gdbarch, lower_bound);
-
- uiout->text (_(", upper = "));
- uiout->field_core_addr ("upper-bound", gdbarch, upper_bound);
-
- uiout->text (_("]"));
-}
-
/* Parse the arguments of current system call instruction and record
the values of the registers and memory that will be changed into
"record_arch_list". This instruction is "int 0x80" (Linux
@@ -608,6 +552,8 @@ int i386_linux_gregset_reg_offset[] =
-1, -1, -1, -1, -1, -1, -1, -1,
-1,
-1, -1, -1, -1, -1, -1, -1, -1,
+ /* MPX is deprecated. Yet we keep this to not give the registers below
+ a new number. That could break older gdbservers. */
-1, -1, -1, -1, /* MPX registers BND0 ... BND3. */
-1, -1, /* MPX registers BNDCFGU, BNDSTATUS. */
-1, -1, -1, -1, -1, -1, -1, -1, /* k0 ... k7 (AVX512) */
@@ -721,12 +667,6 @@ i386_linux_supply_xstateregset (const struct regset *regset,
i387_supply_xsave (regcache, regnum, xstateregs);
}
-struct type *
-x86_linux_get_siginfo_type (struct gdbarch *gdbarch)
-{
- return linux_get_siginfo_type_with_fields (gdbarch, LINUX_SIGINFO_FIELD_ADDR_BND);
-}
-
/* Similar to i386_collect_fpregset, but use XSAVE extended state. */
static void
@@ -1064,9 +1004,6 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_xml_syscall_file_name (gdbarch, XML_SYSCALL_FILENAME_I386);
set_gdbarch_get_syscall_number (gdbarch,
i386_linux_get_syscall_number);
-
- set_gdbarch_get_siginfo_type (gdbarch, x86_linux_get_siginfo_type);
- set_gdbarch_report_signal_info (gdbarch, i386_linux_report_signal_info);
}
void _initialize_i386_linux_tdep ();
diff --git a/gdb/i386-linux-tdep.h b/gdb/i386-linux-tdep.h
index e8691cd..e169c1d 100644
--- a/gdb/i386-linux-tdep.h
+++ b/gdb/i386-linux-tdep.h
@@ -49,15 +49,6 @@ extern uint64_t i386_linux_core_read_xsave_info (bfd *abfd,
extern bool i386_linux_core_read_x86_xsave_layout (struct gdbarch *gdbarch,
x86_xsave_layout &layout);
-/* Handle and display information related to the MPX bound violation
- to the user. */
-extern void i386_linux_report_signal_info (struct gdbarch *gdbarch,
- struct ui_out *uiout,
- enum gdb_signal siggnal);
-
extern int i386_linux_gregset_reg_offset[];
-/* Return x86 siginfo type. */
-extern struct type *x86_linux_get_siginfo_type (struct gdbarch *gdbarch);
-
#endif /* i386-linux-tdep.h */
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 625ffe5..d2c3efb 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -117,23 +117,12 @@ static const char * const i386_ymmh_names[] =
"ymm4h", "ymm5h", "ymm6h", "ymm7h",
};
-static const char * const i386_mpx_names[] =
-{
- "bnd0raw", "bnd1raw", "bnd2raw", "bnd3raw", "bndcfgu", "bndstatus"
-};
static const char * const i386_pkeys_names[] =
{
"pkru"
};
-/* Register names for MPX pseudo-registers. */
-
-static const char * const i386_bnd_names[] =
-{
- "bnd0", "bnd1", "bnd2", "bnd3"
-};
-
/* Register names for MMX pseudo-registers. */
static const char * const i386_mmx_names[] =
@@ -311,21 +300,6 @@ i386_ymm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum)
return regnum >= 0 && regnum < tdep->num_ymm_avx512_regs;
}
-/* BND register? */
-
-int
-i386_bnd_regnum_p (struct gdbarch *gdbarch, int regnum)
-{
- i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
- int bnd0_regnum = tdep->bnd0_regnum;
-
- if (bnd0_regnum < 0)
- return 0;
-
- regnum -= bnd0_regnum;
- return regnum >= 0 && regnum < I387_NUM_BND_REGS;
-}
-
/* SSE register? */
int
@@ -393,34 +367,6 @@ i386_fpc_regnum_p (struct gdbarch *gdbarch, int regnum)
&& regnum < I387_XMM0_REGNUM (tdep));
}
-/* BNDr (raw) register? */
-
-static int
-i386_bndr_regnum_p (struct gdbarch *gdbarch, int regnum)
-{
- i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
-
- if (I387_BND0R_REGNUM (tdep) < 0)
- return 0;
-
- regnum -= tdep->bnd0r_regnum;
- return regnum >= 0 && regnum < I387_NUM_BND_REGS;
-}
-
-/* BND control register? */
-
-static int
-i386_mpx_ctrl_regnum_p (struct gdbarch *gdbarch, int regnum)
-{
- i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
-
- if (I387_BNDCFGU_REGNUM (tdep) < 0)
- return 0;
-
- regnum -= I387_BNDCFGU_REGNUM (tdep);
- return regnum >= 0 && regnum < I387_NUM_MPX_CTRL_REGS;
-}
-
/* PKRU register? */
bool
@@ -463,8 +409,6 @@ const char *
i386_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
{
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
- if (i386_bnd_regnum_p (gdbarch, regnum))
- return i386_bnd_names[regnum - tdep->bnd0_regnum];
if (i386_mmx_regnum_p (gdbarch, regnum))
return i386_mmx_names[regnum - I387_MM0_REGNUM (tdep)];
else if (i386_ymm_regnum_p (gdbarch, regnum))
@@ -2738,13 +2682,6 @@ i386_thiscall_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
int write_pass;
int args_space = 0;
- /* BND registers can be in arbitrary values at the moment of the
- inferior call. This can cause boundary violations that are not
- due to a real bug or even desired by the user. The best to be done
- is set the BND registers to allow access to the whole memory, INIT
- state, before pushing the inferior call. */
- i387_reset_bnd_regs (gdbarch, regcache);
-
/* Determine the total space required for arguments and struct
return address in a first pass (allowing for 16-byte-aligned
arguments), then push arguments in a second pass. */
@@ -3161,43 +3098,6 @@ i387_ext_type (struct gdbarch *gdbarch)
return tdep->i387_ext_type;
}
-/* Construct type for pseudo BND registers. We can't use
- tdesc_find_type since a complement of one value has to be used
- to describe the upper bound. */
-
-static struct type *
-i386_bnd_type (struct gdbarch *gdbarch)
-{
- i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
-
-
- if (!tdep->i386_bnd_type)
- {
- struct type *t;
- const struct builtin_type *bt = builtin_type (gdbarch);
-
- /* The type we're building is described bellow: */
-#if 0
- struct __bound128
- {
- void *lbound;
- void *ubound; /* One complement of raw ubound field. */
- };
-#endif
-
- t = arch_composite_type (gdbarch,
- "__gdb_builtin_type_bound128", TYPE_CODE_STRUCT);
-
- append_composite_type_field (t, "lbound", bt->builtin_data_ptr);
- append_composite_type_field (t, "ubound", bt->builtin_data_ptr);
-
- t->set_name ("builtin_type_bound128");
- tdep->i386_bnd_type = t;
- }
-
- return tdep->i386_bnd_type;
-}
-
/* Construct vector type for pseudo ZMM registers. We can't use
tdesc_find_type since ZMM isn't described in target description. */
@@ -3364,8 +3264,6 @@ i386_mmx_type (struct gdbarch *gdbarch)
struct type *
i386_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
{
- if (i386_bnd_regnum_p (gdbarch, regnum))
- return i386_bnd_type (gdbarch);
if (i386_mmx_regnum_p (gdbarch, regnum))
return i386_mmx_type (gdbarch);
else if (i386_ymm_regnum_p (gdbarch, regnum))
@@ -3425,39 +3323,7 @@ i386_pseudo_register_read_value (gdbarch *gdbarch, const frame_info_ptr &next_fr
else
{
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
- if (i386_bnd_regnum_p (gdbarch, pseudo_reg_num))
- {
- int i = pseudo_reg_num - tdep->bnd0_regnum;
-
- /* Extract (always little endian). Read lower 128bits. */
- value *bndr_value
- = value_of_register (I387_BND0R_REGNUM (tdep) + i, next_frame);
- int size = builtin_type (gdbarch)->builtin_data_ptr->length ();
- value *result
- = value::allocate_register (next_frame, pseudo_reg_num);
-
- /* Copy the lower. */
- bndr_value->contents_copy (result, 0, 0, size);
-
- /* Copy the upper. */
- bndr_value->contents_copy (result, size, 8, size);
-
- /* If upper bytes are available, compute ones' complement. */
- if (result->bytes_available (size, size))
- {
- bfd_endian byte_order
- = gdbarch_byte_order (frame_unwind_arch (next_frame));
- gdb::array_view<gdb_byte> upper_bytes
- = result->contents_raw ().slice (size, size);
- ULONGEST upper
- = extract_unsigned_integer (upper_bytes, byte_order);
- upper = ~upper;
- store_unsigned_integer (upper_bytes, byte_order, upper);
- }
-
- return result;
- }
- else if (i386_zmm_regnum_p (gdbarch, pseudo_reg_num))
+ if (i386_zmm_regnum_p (gdbarch, pseudo_reg_num))
{
/* Which register is it, relative to zmm0. */
int i_0 = pseudo_reg_num - tdep->zmm0_regnum;
@@ -3530,33 +3396,7 @@ i386_pseudo_register_write (gdbarch *gdbarch, const frame_info_ptr &next_frame,
{
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
- if (i386_bnd_regnum_p (gdbarch, pseudo_reg_num))
- {
- int size = builtin_type (gdbarch)->builtin_data_ptr->length ();
- bfd_endian byte_order
- = gdbarch_byte_order (current_inferior ()->arch ());
-
- /* New values from input value. */
- int reg_index = pseudo_reg_num - tdep->bnd0_regnum;
- int raw_regnum = I387_BND0R_REGNUM (tdep) + reg_index;
-
- value *bndr_value = value_of_register (raw_regnum, next_frame);
- gdb::array_view<gdb_byte> bndr_view
- = bndr_value->contents_writeable ();
-
- /* Copy lower bytes directly. */
- copy (buf.slice (0, size), bndr_view.slice (0, size));
-
- /* Convert and then copy upper bytes. */
- ULONGEST upper
- = extract_unsigned_integer (buf.slice (size, size), byte_order);
- upper = ~upper;
- store_unsigned_integer (bndr_view.slice (8, size), byte_order,
- upper);
-
- put_frame_register (next_frame, raw_regnum, bndr_view);
- }
- else if (i386_zmm_regnum_p (gdbarch, pseudo_reg_num))
+ if (i386_zmm_regnum_p (gdbarch, pseudo_reg_num))
{
/* Which register is it, relative to zmm0. */
int reg_index_0 = pseudo_reg_num - tdep->zmm0_regnum;
@@ -3627,12 +3467,6 @@ i386_ax_pseudo_register_collect (struct gdbarch *gdbarch,
ax_reg_mask (ax, I387_ST0_REGNUM (tdep) + i);
return 0;
}
- else if (i386_bnd_regnum_p (gdbarch, regnum))
- {
- regnum -= tdep->bnd0_regnum;
- ax_reg_mask (ax, I387_BND0R_REGNUM (tdep) + regnum);
- return 0;
- }
else if (i386_zmm_regnum_p (gdbarch, regnum))
{
regnum -= tdep->zmm0_regnum;
@@ -4480,9 +4314,8 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
const i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int fp_regnum_p, mmx_regnum_p, xmm_regnum_p, mxcsr_regnum_p,
ymm_regnum_p, ymmh_regnum_p, ymm_avx512_regnum_p, ymmh_avx512_regnum_p,
- bndr_regnum_p, bnd_regnum_p, zmm_regnum_p, zmmh_regnum_p,
- mpx_ctrl_regnum_p, xmm_avx512_regnum_p,
- avx512_p, avx_p, sse_p, pkru_regnum_p;
+ zmm_regnum_p, zmmh_regnum_p, xmm_avx512_regnum_p, avx512_p, avx_p,
+ sse_p, pkru_regnum_p;
/* Don't include pseudo registers, except for MMX, in any register
groups. */
@@ -4542,21 +4375,6 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|| zmmh_regnum_p))
return 0;
- bnd_regnum_p = i386_bnd_regnum_p (gdbarch, regnum);
- if (group == all_reggroup
- && ((bnd_regnum_p && (tdep->xcr0 & X86_XSTATE_MPX_MASK))))
- return bnd_regnum_p;
-
- bndr_regnum_p = i386_bndr_regnum_p (gdbarch, regnum);
- if (group == all_reggroup
- && ((bndr_regnum_p && (tdep->xcr0 & X86_XSTATE_MPX_MASK))))
- return 0;
-
- mpx_ctrl_regnum_p = i386_mpx_ctrl_regnum_p (gdbarch, regnum);
- if (group == all_reggroup
- && ((mpx_ctrl_regnum_p && (tdep->xcr0 & X86_XSTATE_MPX_MASK))))
- return mpx_ctrl_regnum_p;
-
if (group == general_reggroup)
return (!fp_regnum_p
&& !mmx_regnum_p
@@ -4567,9 +4385,6 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
&& !ymmh_regnum_p
&& !ymm_avx512_regnum_p
&& !ymmh_avx512_regnum_p
- && !bndr_regnum_p
- && !bnd_regnum_p
- && !mpx_ctrl_regnum_p
&& !zmm_regnum_p
&& !zmmh_regnum_p
&& !pkru_regnum_p);
@@ -8186,7 +8001,7 @@ i386_xcr0_from_tdesc (const struct target_desc *tdesc)
const struct tdesc_feature *feature_core;
- const struct tdesc_feature *feature_sse, *feature_avx, *feature_mpx,
+ const struct tdesc_feature *feature_sse, *feature_avx,
*feature_avx512, *feature_pkeys;
/* Get core registers. */
@@ -8200,9 +8015,6 @@ i386_xcr0_from_tdesc (const struct target_desc *tdesc)
/* Try AVX registers. */
feature_avx = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.avx");
- /* Try MPX registers. */
- feature_mpx = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.mpx");
-
/* Try AVX512 registers. */
feature_avx512 = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.avx512");
@@ -8224,9 +8036,6 @@ i386_xcr0_from_tdesc (const struct target_desc *tdesc)
xcr0 |= X86_XSTATE_AVX;
}
- if (feature_mpx)
- xcr0 |= X86_XSTATE_MPX_MASK;
-
if (feature_avx512)
{
/* AVX512 register description requires AVX register description. */
@@ -8249,8 +8058,8 @@ i386_validate_tdesc_p (i386_gdbarch_tdep *tdep,
const struct target_desc *tdesc = tdep->tdesc;
const struct tdesc_feature *feature_core;
- const struct tdesc_feature *feature_sse, *feature_avx, *feature_mpx,
- *feature_avx512, *feature_pkeys, *feature_segments;
+ const struct tdesc_feature *feature_sse, *feature_avx, *feature_avx512,
+ *feature_pkeys, *feature_segments;
int i, num_regs, valid_p;
if (! tdesc_has_registers (tdesc))
@@ -8267,9 +8076,6 @@ i386_validate_tdesc_p (i386_gdbarch_tdep *tdep,
/* Try AVX registers. */
feature_avx = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.avx");
- /* Try MPX registers. */
- feature_mpx = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.mpx");
-
/* Try AVX512 registers. */
feature_avx512 = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.avx512");
@@ -8368,23 +8174,6 @@ i386_validate_tdesc_p (i386_gdbarch_tdep *tdep,
tdep->register_names[i]);
}
- if (feature_mpx)
- {
- tdep->xcr0 |= X86_XSTATE_MPX_MASK;
-
- if (tdep->bnd0r_regnum < 0)
- {
- tdep->mpx_register_names = i386_mpx_names;
- tdep->bnd0r_regnum = I386_BND0R_REGNUM;
- tdep->bndcfgu_regnum = I386_BNDCFGU_REGNUM;
- }
-
- for (i = 0; i < I387_NUM_MPX_REGS; i++)
- valid_p &= tdesc_numbered_register (feature_mpx, tdesc_data,
- I387_BND0R_REGNUM (tdep) + i,
- tdep->mpx_register_names[i]);
- }
-
if (feature_segments)
{
if (tdep->fsbase_regnum < 0)
@@ -8448,8 +8237,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
const struct target_desc *tdesc;
int mm0_regnum;
int ymm0_regnum;
- int bnd0_regnum;
- int num_bnd_cooked;
x86_xsave_layout xsave_layout = target_fetch_x86_xsave_layout ();
@@ -8498,7 +8285,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->st0_regnum = I386_ST0_REGNUM;
- /* I386_NUM_XREGS includes %mxcsr, so substract one. */
+ /* I386_NUM_XREGS includes %mxcsr, so subtract one. */
tdep->num_xmm_regs = I386_NUM_XREGS - 1;
tdep->jb_pc_offset = -1;
@@ -8655,7 +8442,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Even though the default ABI only includes general-purpose registers,
floating-point registers and the SSE registers, we have to leave a
- gap for the upper AVX, MPX and AVX512 registers. */
+ gap for the upper AVX, (deprecated) MPX and AVX512 registers. */
set_gdbarch_num_regs (gdbarch, I386_NUM_REGS);
set_gdbarch_gnu_triplet_regexp (gdbarch, i386_gnu_triplet_regexp);
@@ -8691,10 +8478,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->num_mmx_regs = 8;
tdep->num_ymm_regs = 0;
- /* No MPX registers. */
- tdep->bnd0r_regnum = -1;
- tdep->bndcfgu_regnum = -1;
-
/* No AVX512 registers. */
tdep->k0_regnum = -1;
tdep->num_zmm_regs = 0;
@@ -8731,8 +8514,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
tdep->xsave_layout = xsave_layout;
- num_bnd_cooked = (tdep->bnd0r_regnum > 0 ? I387_NUM_BND_REGS : 0);
-
/* Wire in pseudo registers. Number of pseudo registers may be
changed. */
set_gdbarch_num_pseudo_regs (gdbarch, (tdep->num_byte_regs
@@ -8740,7 +8521,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+ tdep->num_dword_regs
+ tdep->num_mmx_regs
+ tdep->num_ymm_regs
- + num_bnd_cooked
+ tdep->num_ymm_avx512_regs
+ tdep->num_zmm_regs));
@@ -8794,21 +8574,14 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else
tdep->zmm0_regnum = -1;
- bnd0_regnum = mm0_regnum;
if (tdep->num_mmx_regs != 0)
{
/* Support MMX pseudo-register if MMX hasn't been disabled. */
tdep->mm0_regnum = mm0_regnum;
- bnd0_regnum += tdep->num_mmx_regs;
}
else
tdep->mm0_regnum = -1;
- if (tdep->bnd0r_regnum > 0)
- tdep->bnd0_regnum = bnd0_regnum;
- else
- tdep-> bnd0_regnum = -1;
-
/* Hook in the legacy prologue-based unwinders last (fallback). */
if (info.bfd_arch_info->bits_per_word == 32)
{
@@ -8838,12 +8611,11 @@ const struct target_desc *
i386_target_description (uint64_t xcr0, bool segments)
{
static target_desc *i386_tdescs \
- [2/*SSE*/][2/*AVX*/][2/*MPX*/][2/*AVX512*/][2/*PKRU*/][2/*segments*/] = {};
+ [2/*SSE*/][2/*AVX*/][2/*AVX512*/][2/*PKRU*/][2/*segments*/] = {};
target_desc **tdesc;
tdesc = &i386_tdescs[(xcr0 & X86_XSTATE_SSE) ? 1 : 0]
[(xcr0 & X86_XSTATE_AVX) ? 1 : 0]
- [(xcr0 & X86_XSTATE_MPX) ? 1 : 0]
[(xcr0 & X86_XSTATE_AVX512) ? 1 : 0]
[(xcr0 & X86_XSTATE_PKRU) ? 1 : 0]
[segments ? 1 : 0];
@@ -8854,245 +8626,6 @@ i386_target_description (uint64_t xcr0, bool segments)
return *tdesc;
}
-#define MPX_BASE_MASK (~(ULONGEST) 0xfff)
-
-/* Find the bound directory base address. */
-
-static unsigned long
-i386_mpx_bd_base (void)
-{
- ULONGEST ret;
- enum register_status regstatus;
-
- regcache *rcache = get_thread_regcache (inferior_thread ());
- gdbarch *arch = rcache->arch ();
- i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
-
- regstatus = regcache_raw_read_unsigned (rcache, tdep->bndcfgu_regnum, &ret);
-
- if (regstatus != REG_VALID)
- error (_("BNDCFGU register invalid, read status %d."), regstatus);
-
- return ret & MPX_BASE_MASK;
-}
-
-int
-i386_mpx_enabled (void)
-{
- gdbarch *arch = get_current_arch ();
- i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (arch);
- const struct target_desc *tdesc = tdep->tdesc;
-
- return (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.mpx") != NULL);
-}
-
-#define MPX_BD_MASK 0xfffffff00000ULL /* select bits [47:20] */
-#define MPX_BT_MASK 0x0000000ffff8 /* select bits [19:3] */
-#define MPX_BD_MASK_32 0xfffff000 /* select bits [31:12] */
-#define MPX_BT_MASK_32 0x00000ffc /* select bits [11:2] */
-
-/* Find the bound table entry given the pointer location and the base
- address of the table. */
-
-static CORE_ADDR
-i386_mpx_get_bt_entry (CORE_ADDR ptr, CORE_ADDR bd_base)
-{
- CORE_ADDR offset1;
- CORE_ADDR offset2;
- CORE_ADDR mpx_bd_mask, bd_ptr_r_shift, bd_ptr_l_shift;
- CORE_ADDR bt_mask, bt_select_r_shift, bt_select_l_shift;
- CORE_ADDR bd_entry_addr;
- CORE_ADDR bt_addr;
- CORE_ADDR bd_entry;
- struct gdbarch *gdbarch = get_current_arch ();
- struct type *data_ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
-
-
- if (gdbarch_ptr_bit (gdbarch) == 64)
- {
- mpx_bd_mask = (CORE_ADDR) MPX_BD_MASK;
- bd_ptr_r_shift = 20;
- bd_ptr_l_shift = 3;
- bt_select_r_shift = 3;
- bt_select_l_shift = 5;
- bt_mask = (CORE_ADDR) MPX_BT_MASK;
-
- if ( sizeof (CORE_ADDR) == 4)
- error (_("bound table examination not supported\
- for 64-bit process with 32-bit GDB"));
- }
- else
- {
- mpx_bd_mask = MPX_BD_MASK_32;
- bd_ptr_r_shift = 12;
- bd_ptr_l_shift = 2;
- bt_select_r_shift = 2;
- bt_select_l_shift = 4;
- bt_mask = MPX_BT_MASK_32;
- }
-
- offset1 = ((ptr & mpx_bd_mask) >> bd_ptr_r_shift) << bd_ptr_l_shift;
- bd_entry_addr = bd_base + offset1;
- bd_entry = read_memory_typed_address (bd_entry_addr, data_ptr_type);
-
- if ((bd_entry & 0x1) == 0)
- error (_("Invalid bounds directory entry at %s."),
- paddress (get_current_arch (), bd_entry_addr));
-
- /* Clearing status bit. */
- bd_entry--;
- bt_addr = bd_entry & ~bt_select_r_shift;
- offset2 = ((ptr & bt_mask) >> bt_select_r_shift) << bt_select_l_shift;
-
- return bt_addr + offset2;
-}
-
-/* Print routine for the mpx bounds. */
-
-static void
-i386_mpx_print_bounds (const CORE_ADDR bt_entry[4])
-{
- struct ui_out *uiout = current_uiout;
- LONGEST size;
- struct gdbarch *gdbarch = get_current_arch ();
- CORE_ADDR onecompl = ~((CORE_ADDR) 0);
- int bounds_in_map = ((~bt_entry[1] == 0 && bt_entry[0] == onecompl) ? 1 : 0);
-
- if (bounds_in_map == 1)
- {
- uiout->text ("Null bounds on map:");
- uiout->text (" pointer value = ");
- uiout->field_core_addr ("pointer-value", gdbarch, bt_entry[2]);
- uiout->text (".");
- uiout->text ("\n");
- }
- else
- {
- uiout->text ("{lbound = ");
- uiout->field_core_addr ("lower-bound", gdbarch, bt_entry[0]);
- uiout->text (", ubound = ");
-
- /* The upper bound is stored in 1's complement. */
- uiout->field_core_addr ("upper-bound", gdbarch, ~bt_entry[1]);
- uiout->text ("}: pointer value = ");
- uiout->field_core_addr ("pointer-value", gdbarch, bt_entry[2]);
-
- if (gdbarch_ptr_bit (gdbarch) == 64)
- size = ( (~(int64_t) bt_entry[1]) - (int64_t) bt_entry[0]);
- else
- size = ( ~((int32_t) bt_entry[1]) - (int32_t) bt_entry[0]);
-
- /* In case the bounds are 0x0 and 0xffff... the difference will be -1.
- -1 represents in this sense full memory access, and there is no need
- one to the size. */
-
- size = (size > -1 ? size + 1 : size);
- uiout->text (", size = ");
- uiout->field_string ("size", plongest (size));
-
- uiout->text (", metadata = ");
- uiout->field_core_addr ("metadata", gdbarch, bt_entry[3]);
- uiout->text ("\n");
- }
-}
-
-/* Implement the command "show mpx bound". */
-
-static void
-i386_mpx_info_bounds (const char *args, int from_tty)
-{
- CORE_ADDR bd_base = 0;
- CORE_ADDR addr;
- CORE_ADDR bt_entry_addr = 0;
- CORE_ADDR bt_entry[4];
- int i;
- struct gdbarch *gdbarch = get_current_arch ();
- struct type *data_ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
-
- if (gdbarch_bfd_arch_info (gdbarch)->arch != bfd_arch_i386
- || !i386_mpx_enabled ())
- {
- gdb_printf (_("Intel Memory Protection Extensions not "
- "supported on this target.\n"));
- return;
- }
-
- if (args == NULL)
- {
- gdb_printf (_("Address of pointer variable expected.\n"));
- return;
- }
-
- addr = parse_and_eval_address (args);
-
- bd_base = i386_mpx_bd_base ();
- bt_entry_addr = i386_mpx_get_bt_entry (addr, bd_base);
-
- memset (bt_entry, 0, sizeof (bt_entry));
-
- for (i = 0; i < 4; i++)
- bt_entry[i] = read_memory_typed_address (bt_entry_addr
- + i * data_ptr_type->length (),
- data_ptr_type);
-
- i386_mpx_print_bounds (bt_entry);
-}
-
-/* Implement the command "set mpx bound". */
-
-static void
-i386_mpx_set_bounds (const char *args, int from_tty)
-{
- CORE_ADDR bd_base = 0;
- CORE_ADDR addr, lower, upper;
- CORE_ADDR bt_entry_addr = 0;
- CORE_ADDR bt_entry[2];
- const char *input = args;
- int i;
- struct gdbarch *gdbarch = get_current_arch ();
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct type *data_ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
-
- if (gdbarch_bfd_arch_info (gdbarch)->arch != bfd_arch_i386
- || !i386_mpx_enabled ())
- error (_("Intel Memory Protection Extensions not supported\
- on this target."));
-
- if (args == NULL)
- error (_("Pointer value expected."));
-
- addr = value_as_address (parse_to_comma_and_eval (&input));
-
- if (input[0] == ',')
- ++input;
- if (input[0] == '\0')
- error (_("wrong number of arguments: missing lower and upper bound."));
- lower = value_as_address (parse_to_comma_and_eval (&input));
-
- if (input[0] == ',')
- ++input;
- if (input[0] == '\0')
- error (_("Wrong number of arguments; Missing upper bound."));
- upper = value_as_address (parse_to_comma_and_eval (&input));
-
- bd_base = i386_mpx_bd_base ();
- bt_entry_addr = i386_mpx_get_bt_entry (addr, bd_base);
- for (i = 0; i < 2; i++)
- bt_entry[i] = read_memory_typed_address (bt_entry_addr
- + i * data_ptr_type->length (),
- data_ptr_type);
- bt_entry[0] = (uint64_t) lower;
- bt_entry[1] = ~(uint64_t) upper;
-
- for (i = 0; i < 2; i++)
- write_memory_unsigned_integer (bt_entry_addr
- + i * data_ptr_type->length (),
- data_ptr_type->length (), byte_order,
- bt_entry[i]);
-}
-
-static struct cmd_list_element *mpx_set_cmdlist, *mpx_show_cmdlist;
-
void _initialize_i386_tdep ();
void
_initialize_i386_tdep ()
@@ -9121,30 +8654,6 @@ is \"default\"."),
NULL, /* FIXME: i18n: */
&setlist, &showlist);
- /* Add "mpx" prefix for the set and show commands. */
-
- add_setshow_prefix_cmd
- ("mpx", class_support,
- _("Set Intel Memory Protection Extensions specific variables."),
- _("Show Intel Memory Protection Extensions specific variables."),
- &mpx_set_cmdlist, &mpx_show_cmdlist, &setlist, &showlist);
-
- /* Add "bound" command for the show mpx commands list. */
-
- cmd_list_element *c = add_cmd ("bound", no_class, i386_mpx_info_bounds,
- "Show the memory bounds for a given array/pointer storage\
- in the bound table.",
- &mpx_show_cmdlist);
- deprecate_cmd (c, nullptr);
-
- /* Add "bound" command for the set mpx commands list. */
-
- c = add_cmd ("bound", no_class, i386_mpx_set_bounds,
- "Set the memory bounds for a given array/pointer storage\
- in the bound table.",
- &mpx_set_cmdlist);
- deprecate_cmd (c, nullptr);
-
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_SVR4,
i386_svr4_init_abi);
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index a85e0a9..82676c2 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -166,21 +166,6 @@ struct i386_gdbarch_tdep : gdbarch_tdep_base
/* YMM16-31 register names. Only used for tdesc_numbered_register. */
const char * const *ymm16h_register_names = nullptr;
- /* Register number for %bnd0r. Set this to -1 to indicate the absence
- bound registers. */
- int bnd0r_regnum = 0;
-
- /* Register number for pseudo register %bnd0. Set this to -1 to indicate the absence
- bound registers. */
- int bnd0_regnum = 0;
-
- /* Register number for %bndcfgu. Set this to -1 to indicate the absence
- bound control registers. */
- int bndcfgu_regnum = 0;
-
- /* MPX register names. Only used for tdesc_numbered_register. */
- const char * const *mpx_register_names = nullptr;
-
/* Register number for %zmm0h. Set this to -1 to indicate the absence
of ZMM_HI256 register support. */
int zmm0h_regnum = 0;
@@ -246,7 +231,6 @@ struct i386_gdbarch_tdep : gdbarch_tdep_base
struct type *i386_ymm_type = nullptr;
struct type *i386_zmm_type = nullptr;
struct type *i387_ext_type = nullptr;
- struct type *i386_bnd_type = nullptr;
/* Process record/replay target. */
/* The map for registers because the AMD64's registers order
@@ -298,6 +282,8 @@ enum i386_regnum
I386_MXCSR_REGNUM = 40, /* %mxcsr */
I386_YMM0H_REGNUM, /* %ymm0h */
I386_YMM7H_REGNUM = I386_YMM0H_REGNUM + 7,
+ /* MPX is deprecated. Yet we keep this to not give the registers below
+ a new number. That could break older gdbservers. */
I386_BND0R_REGNUM,
I386_BND3R_REGNUM = I386_BND0R_REGNUM + 3,
I386_BNDCFGU_REGNUM,
@@ -346,7 +332,6 @@ enum record_i386_regnum
#define I386_SSE_NUM_REGS (I386_MXCSR_REGNUM + 1)
#define I386_AVX_NUM_REGS (I386_YMM7H_REGNUM + 1)
-#define I386_MPX_NUM_REGS (I386_BNDSTATUS_REGNUM + 1)
#define I386_AVX512_NUM_REGS (I386_ZMM7H_REGNUM + 1)
#define I386_PKEYS_NUM_REGS (I386_PKRU_REGNUM + 1)
#define I386_NUM_REGS (I386_GSBASE_REGNUM + 1)
@@ -365,7 +350,6 @@ extern int i386_xmm_regnum_p (struct gdbarch *gdbarch, int regnum);
extern int i386_xmm_avx512_regnum_p (struct gdbarch * gdbarch, int regnum);
extern int i386_ymm_regnum_p (struct gdbarch *gdbarch, int regnum);
extern int i386_ymm_avx512_regnum_p (struct gdbarch *gdbarch, int regnum);
-extern int i386_bnd_regnum_p (struct gdbarch *gdbarch, int regnum);
extern int i386_k_regnum_p (struct gdbarch *gdbarch, int regnum);
extern int i386_zmm_regnum_p (struct gdbarch *gdbarch, int regnum);
extern int i386_zmmh_regnum_p (struct gdbarch *gdbarch, int regnum);
@@ -468,10 +452,6 @@ extern int i386_process_record (struct gdbarch *gdbarch,
extern const struct target_desc *i386_target_description (uint64_t xcr0,
bool segments);
-/* Return true iff the current target is MPX enabled. */
-extern int i386_mpx_enabled (void);
-
-
/* Functions and variables exported from i386-bsd-tdep.c. */
extern void i386bsd_init_abi (struct gdbarch_info, struct gdbarch *);
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 675ee8d..3bda888 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -818,30 +818,6 @@ static int xsave_xmm_avx512_offset[] =
(xsave + (tdep)->xsave_layout.zmm_offset \
+ xsave_xmm_avx512_offset[regnum - I387_XMM16_REGNUM (tdep)])
-/* At xsave_bndregs_offset[REGNUM] you'll find the relative offset
- within the BNDREGS region of the XSAVE extended state where the GDB
- register BND0R + REGNUM is stored. */
-
-static int xsave_bndregs_offset[] = {
- 0 * 16, /* bnd0r...bnd3r registers. */
- 1 * 16,
- 2 * 16,
- 3 * 16
-};
-
-#define XSAVE_BNDREGS_ADDR(tdep, xsave, regnum) \
- (xsave + (tdep)->xsave_layout.bndregs_offset \
- + xsave_bndregs_offset[regnum - I387_BND0R_REGNUM (tdep)])
-
-static int xsave_bndcfg_offset[] = {
- 0 * 8, /* bndcfg ... bndstatus. */
- 1 * 8,
-};
-
-#define XSAVE_BNDCFG_ADDR(tdep, xsave, regnum) \
- (xsave + (tdep)->xsave_layout.bndcfg_offset \
- + xsave_bndcfg_offset[regnum - I387_BNDCFGU_REGNUM (tdep)])
-
/* At xsave_avx512_k_offset[REGNUM] you'll find the relative offset
within the K region of the XSAVE extended state where the AVX512
opmask register K0 + REGNUM is stored. */
@@ -944,8 +920,6 @@ i387_guess_xsave_layout (uint64_t xcr0, size_t xsave_size,
{
/* Intel CPUs supporting PKRU. */
layout.avx_offset = 576;
- layout.bndregs_offset = 960;
- layout.bndcfg_offset = 1024;
layout.k_offset = 1088;
layout.zmm_h_offset = 1152;
layout.zmm_offset = 1664;
@@ -964,20 +938,14 @@ i387_guess_xsave_layout (uint64_t xcr0, size_t xsave_size,
{
/* Intel CPUs supporting AVX512. */
layout.avx_offset = 576;
- layout.bndregs_offset = 960;
- layout.bndcfg_offset = 1024;
layout.k_offset = 1088;
layout.zmm_h_offset = 1152;
layout.zmm_offset = 1664;
}
- else if (HAS_MPX (xcr0) && xsave_size == 1088)
- {
- /* Intel CPUs supporting MPX. */
- layout.avx_offset = 576;
- layout.bndregs_offset = 960;
- layout.bndcfg_offset = 1024;
- }
- else if (HAS_AVX (xcr0) && xsave_size == 832)
+ /* As MPX has been removed, we need the additional check
+ (xsave_size == 1088) to allow reading AVX registers from corefiles
+ on CPUs with MPX as the highest supported feature. */
+ else if (HAS_AVX (xcr0) && (xsave_size == 832 || xsave_size == 1088))
{
/* Intel and AMD CPUs supporting AVX. */
layout.avx_offset = 576;
@@ -1000,8 +968,6 @@ i387_fallback_xsave_layout (uint64_t xcr0)
{
/* Intel CPUs supporting PKRU. */
layout.avx_offset = 576;
- layout.bndregs_offset = 960;
- layout.bndcfg_offset = 1024;
layout.k_offset = 1088;
layout.zmm_h_offset = 1152;
layout.zmm_offset = 1664;
@@ -1012,21 +978,11 @@ i387_fallback_xsave_layout (uint64_t xcr0)
{
/* Intel CPUs supporting AVX512. */
layout.avx_offset = 576;
- layout.bndregs_offset = 960;
- layout.bndcfg_offset = 1024;
layout.k_offset = 1088;
layout.zmm_h_offset = 1152;
layout.zmm_offset = 1664;
layout.sizeof_xsave = 2688;
}
- else if (HAS_MPX (xcr0))
- {
- /* Intel CPUs supporting MPX. */
- layout.avx_offset = 576;
- layout.bndregs_offset = 960;
- layout.bndcfg_offset = 1024;
- layout.sizeof_xsave = 1088;
- }
else if (HAS_AVX (xcr0))
{
/* Intel and AMD CPUs supporting AVX. */
@@ -1082,16 +1038,14 @@ i387_supply_xsave (struct regcache *regcache, int regnum,
x87 = 0x1,
sse = 0x2,
avxh = 0x4,
- bndregs = 0x8,
- bndcfg = 0x10,
- avx512_k = 0x20,
- avx512_zmm0_h = 0x40,
- avx512_zmm16_h = 0x80,
- avx512_ymmh_avx512 = 0x100,
- avx512_xmm_avx512 = 0x200,
- pkeys = 0x400,
- all = x87 | sse | avxh | bndregs | bndcfg | avx512_k | avx512_zmm0_h
- | avx512_zmm16_h | avx512_ymmh_avx512 | avx512_xmm_avx512 | pkeys
+ avx512_k = 0x8,
+ avx512_zmm0_h = 0x10,
+ avx512_zmm16_h = 0x20,
+ avx512_ymmh_avx512 = 0x40,
+ avx512_xmm_avx512 = 0x80,
+ pkeys = 0x100,
+ all = x87 | sse | avxh | avx512_k | avx512_zmm0_h | avx512_zmm16_h
+ | avx512_ymmh_avx512 | avx512_xmm_avx512 | pkeys
} regclass;
gdb_assert (regs != NULL);
@@ -1121,12 +1075,6 @@ i387_supply_xsave (struct regcache *regcache, int regnum,
else if (regnum >= I387_YMM0H_REGNUM (tdep)
&& regnum < I387_YMMENDH_REGNUM (tdep))
regclass = avxh;
- else if (regnum >= I387_BND0R_REGNUM (tdep)
- && regnum < I387_BNDCFGU_REGNUM (tdep))
- regclass = bndregs;
- else if (regnum >= I387_BNDCFGU_REGNUM (tdep)
- && regnum < I387_MPXEND_REGNUM (tdep))
- regclass = bndcfg;
else if (regnum >= I387_XMM0_REGNUM (tdep)
&& regnum < I387_MXCSR_REGNUM (tdep))
regclass = sse;
@@ -1205,20 +1153,6 @@ i387_supply_xsave (struct regcache *regcache, int regnum,
regcache->raw_supply (regnum, XSAVE_AVXH_ADDR (tdep, regs, regnum));
return;
- case bndcfg:
- if ((clear_bv & X86_XSTATE_BNDCFG))
- regcache->raw_supply (regnum, zero);
- else
- regcache->raw_supply (regnum, XSAVE_BNDCFG_ADDR (tdep, regs, regnum));
- return;
-
- case bndregs:
- if ((clear_bv & X86_XSTATE_BNDREGS))
- regcache->raw_supply (regnum, zero);
- else
- regcache->raw_supply (regnum, XSAVE_BNDREGS_ADDR (tdep, regs, regnum));
- return;
-
case sse:
if ((clear_bv & X86_XSTATE_SSE))
regcache->raw_supply (regnum, zero);
@@ -1341,40 +1275,6 @@ i387_supply_xsave (struct regcache *regcache, int regnum,
}
}
- /* Handle the MPX registers. */
- if ((tdep->xcr0 & X86_XSTATE_BNDREGS))
- {
- if (clear_bv & X86_XSTATE_BNDREGS)
- {
- for (i = I387_BND0R_REGNUM (tdep);
- i < I387_BNDCFGU_REGNUM (tdep); i++)
- regcache->raw_supply (i, zero);
- }
- else
- {
- for (i = I387_BND0R_REGNUM (tdep);
- i < I387_BNDCFGU_REGNUM (tdep); i++)
- regcache->raw_supply (i, XSAVE_BNDREGS_ADDR (tdep, regs, i));
- }
- }
-
- /* Handle the MPX registers. */
- if ((tdep->xcr0 & X86_XSTATE_BNDCFG))
- {
- if (clear_bv & X86_XSTATE_BNDCFG)
- {
- for (i = I387_BNDCFGU_REGNUM (tdep);
- i < I387_MPXEND_REGNUM (tdep); i++)
- regcache->raw_supply (i, zero);
- }
- else
- {
- for (i = I387_BNDCFGU_REGNUM (tdep);
- i < I387_MPXEND_REGNUM (tdep); i++)
- regcache->raw_supply (i, XSAVE_BNDCFG_ADDR (tdep, regs, i));
- }
- }
-
/* Handle the XMM registers. */
if ((tdep->xcr0 & X86_XSTATE_SSE))
{
@@ -1527,16 +1427,14 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
x87 = 0x2,
sse = 0x4,
avxh = 0x8,
- bndregs = 0x10,
- bndcfg = 0x20,
- avx512_k = 0x40,
- avx512_zmm0_h = 0x80,
- avx512_zmm16_h = 0x100,
- avx512_ymmh_avx512 = 0x200,
- avx512_xmm_avx512 = 0x400,
- pkeys = 0x800,
- all = x87 | sse | avxh | bndregs | bndcfg | avx512_k | avx512_zmm0_h
- | avx512_zmm16_h | avx512_ymmh_avx512 | avx512_xmm_avx512 | pkeys
+ avx512_k = 0x10,
+ avx512_zmm0_h = 0x20,
+ avx512_zmm16_h = 0x40,
+ avx512_ymmh_avx512 = 0x80,
+ avx512_xmm_avx512 = 0x100,
+ pkeys = 0x200,
+ all = x87 | sse | avxh | avx512_k | avx512_zmm0_h | avx512_zmm16_h
+ | avx512_ymmh_avx512 | avx512_xmm_avx512 | pkeys
} regclass;
gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
@@ -1565,12 +1463,6 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
else if (regnum >= I387_YMM0H_REGNUM (tdep)
&& regnum < I387_YMMENDH_REGNUM (tdep))
regclass = avxh;
- else if (regnum >= I387_BND0R_REGNUM (tdep)
- && regnum < I387_BNDCFGU_REGNUM (tdep))
- regclass = bndregs;
- else if (regnum >= I387_BNDCFGU_REGNUM (tdep)
- && regnum < I387_MPXEND_REGNUM (tdep))
- regclass = bndcfg;
else if (regnum >= I387_XMM0_REGNUM (tdep)
&& regnum < I387_MXCSR_REGNUM (tdep))
regclass = sse;
@@ -1619,16 +1511,6 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
i < I387_PKEYSEND_REGNUM (tdep); i++)
memset (XSAVE_PKEYS_ADDR (tdep, regs, i), 0, 4);
- if ((clear_bv & X86_XSTATE_BNDREGS))
- for (i = I387_BND0R_REGNUM (tdep);
- i < I387_BNDCFGU_REGNUM (tdep); i++)
- memset (XSAVE_BNDREGS_ADDR (tdep, regs, i), 0, 16);
-
- if ((clear_bv & X86_XSTATE_BNDCFG))
- for (i = I387_BNDCFGU_REGNUM (tdep);
- i < I387_MPXEND_REGNUM (tdep); i++)
- memset (XSAVE_BNDCFG_ADDR (tdep, regs, i), 0, 8);
-
if ((clear_bv & X86_XSTATE_ZMM_H))
for (i = I387_ZMM0H_REGNUM (tdep); i < zmm_endlo_regnum; i++)
memset (XSAVE_AVX512_ZMM0_H_ADDR (tdep, regs, i), 0, 32);
@@ -1771,34 +1653,6 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
}
}
- /* Check if any upper MPX registers are changed. */
- if ((tdep->xcr0 & X86_XSTATE_BNDREGS))
- for (i = I387_BND0R_REGNUM (tdep);
- i < I387_BNDCFGU_REGNUM (tdep); i++)
- {
- regcache->raw_collect (i, raw);
- p = XSAVE_BNDREGS_ADDR (tdep, regs, i);
- if (memcmp (raw, p, 16))
- {
- xstate_bv |= X86_XSTATE_BNDREGS;
- memcpy (p, raw, 16);
- }
- }
-
- /* Check if any upper MPX registers are changed. */
- if ((tdep->xcr0 & X86_XSTATE_BNDCFG))
- for (i = I387_BNDCFGU_REGNUM (tdep);
- i < I387_MPXEND_REGNUM (tdep); i++)
- {
- regcache->raw_collect (i, raw);
- p = XSAVE_BNDCFG_ADDR (tdep, regs, i);
- if (memcmp (raw, p, 8))
- {
- xstate_bv |= X86_XSTATE_BNDCFG;
- memcpy (p, raw, 8);
- }
- }
-
/* Check if any upper YMM registers are changed. */
if ((tdep->xcr0 & X86_XSTATE_AVX))
for (i = I387_YMM0H_REGNUM (tdep);
@@ -1940,22 +1794,6 @@ i387_collect_xsave (const struct regcache *regcache, int regnum,
}
break;
- case bndregs:
- regcache->raw_collect (regnum, raw);
- p = XSAVE_BNDREGS_ADDR (tdep, regs, regnum);
- if (memcmp (raw, p, 16))
- {
- xstate_bv |= X86_XSTATE_BNDREGS;
- memcpy (p, raw, 16);
- }
- break;
-
- case bndcfg:
- p = XSAVE_BNDCFG_ADDR (tdep, regs, regnum);
- xstate_bv |= X86_XSTATE_BNDCFG;
- memcpy (p, raw, 8);
- break;
-
case sse:
/* This is an SSE register. */
p = FXSAVE_ADDR (tdep, regs, regnum);
@@ -2143,20 +1981,3 @@ i387_return_value (struct gdbarch *gdbarch, struct regcache *regcache)
regcache_raw_write_unsigned (regcache, I387_FTAG_REGNUM (tdep), 0x3fff);
}
-
-/* See i387-tdep.h. */
-
-void
-i387_reset_bnd_regs (struct gdbarch *gdbarch, struct regcache *regcache)
-{
- i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
-
- if (I387_BND0R_REGNUM (tdep) > 0)
- {
- gdb_byte bnd_buf[16];
-
- memset (bnd_buf, 0, 16);
- for (int i = 0; i < I387_NUM_BND_REGS; i++)
- regcache->raw_write (I387_BND0R_REGNUM (tdep) + i, bnd_buf);
- }
-}
diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h
index 30d7694..7b2c3b1 100644
--- a/gdb/i387-tdep.h
+++ b/gdb/i387-tdep.h
@@ -37,13 +37,7 @@ struct x86_xsave_layout;
#define I387_NUM_YMM_REGS(tdep) ((tdep)->num_ymm_regs)
#define I387_YMM0H_REGNUM(tdep) ((tdep)->ymm0h_regnum)
-#define I387_BND0R_REGNUM(tdep) ((tdep)->bnd0r_regnum)
-#define I387_BNDCFGU_REGNUM(tdep) ((tdep)->bndcfgu_regnum)
-
/* Set of constants used for 32 and 64-bit. */
-#define I387_NUM_MPX_REGS 6
-#define I387_NUM_BND_REGS 4
-#define I387_NUM_MPX_CTRL_REGS 2
#define I387_NUM_K_REGS 8
#define I387_NUM_PKEYS_REGS 1
@@ -71,8 +65,6 @@ struct x86_xsave_layout;
#define I387_YMMENDH_REGNUM(tdep) \
(I387_YMM0H_REGNUM (tdep) + I387_NUM_YMM_REGS (tdep))
-#define I387_MPXEND_REGNUM(tdep) \
- (I387_BND0R_REGNUM (tdep) + I387_NUM_MPX_REGS)
#define I387_KEND_REGNUM(tdep) \
(I387_K0_REGNUM (tdep) + I387_NUM_K_REGS)
@@ -181,8 +173,4 @@ extern ULONGEST i387_xsave_get_clear_bv (struct gdbarch *gdbarch,
extern void i387_return_value (struct gdbarch *gdbarch,
struct regcache *regcache);
-/* Set all bnd registers to the INIT state. INIT state means
- all memory range can be accessed. */
-extern void i387_reset_bnd_regs (struct gdbarch *gdbarch,
- struct regcache *regcache);
#endif /* i387-tdep.h */
diff --git a/gdb/ia64-tdep.h b/gdb/ia64-tdep.h
index 64be38b..3d5b56e 100644
--- a/gdb/ia64-tdep.h
+++ b/gdb/ia64-tdep.h
@@ -156,7 +156,7 @@
/* Predicate registers: There are 64 of these 1-bit registers. We
define a single register which is used to communicate these values
to/from the target. We will somehow contrive to make it appear
- that IA64_PR0_REGNUM thru IA64_PR63_REGNUM hold the actual values. */
+ that IA64_PR0_REGNUM through IA64_PR63_REGNUM hold the actual values. */
#define IA64_PR_REGNUM 330
/* Instruction pointer: 64 bits wide. */
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index acb80af..36d6e2a 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -475,7 +475,7 @@ inf_ptrace_target::xfer_partial (enum target_object object,
case TARGET_OBJECT_AUXV:
#if defined (PT_IO) && defined (PIOD_READ_AUXV)
/* OpenBSD 4.5 has a new PIOD_READ_AUXV operation for the PT_IO
- request that allows us to read the auxilliary vector. Other
+ request that allows us to read the auxiliary vector. Other
BSD's may follow if they feel the need to support PIE. */
{
struct ptrace_io_desc piod;
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 5e9af41..74873b9 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1103,7 +1103,9 @@ jump_command (const char *arg, int from_tty)
find_pc_mapped_section (sal.pc));
if (fn != nullptr && sfn != fn)
{
- if (!query (_("Line %d is not in `%s'. Jump anyway? "), sal.line,
+ if (!query (_("Line %ps is not in `%s'. Jump anyway? "),
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)),
fn->print_name ()))
{
error (_("Not confirmed."));
diff --git a/gdb/linespec.c b/gdb/linespec.c
index be85074..d525626 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -3733,15 +3733,11 @@ collect_symtabs_from_filename (const char *file,
if (pspace->executing_startup)
continue;
- set_current_program_space (pspace);
- iterate_over_symtabs (file, collector);
+ iterate_over_symtabs (pspace, file, collector);
}
}
else
- {
- set_current_program_space (search_pspace);
- iterate_over_symtabs (file, collector);
- }
+ iterate_over_symtabs (search_pspace, file, collector);
return collector.release_symtabs ();
}
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index fe880b3..65ec221 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -43,6 +43,7 @@
#include "gcore-elf.h"
#include "solib-svr4.h"
#include "memtag.h"
+#include "cli/cli-style.h"
#include <ctype.h>
#include <unordered_map>
@@ -213,7 +214,7 @@ get_linux_gdbarch_data (struct gdbarch *gdbarch)
/* Linux-specific cached data. This is used by GDB for caching
purposes for each inferior. This helps reduce the overhead of
- transfering data from a remote target to the local host. */
+ transferring data from a remote target to the local host. */
struct linux_info
{
/* Cache of the inferior's vsyscall/vDSO mapping range. Only valid
@@ -457,7 +458,7 @@ struct mapping
{
ULONGEST addr;
ULONGEST endaddr;
- std::string_view permissions;
+ std::string permissions;
ULONGEST offset;
std::string_view device;
ULONGEST inode;
@@ -484,7 +485,8 @@ read_mapping (const char *line)
const char *permissions_start = p;
while (*p && !isspace (*p))
p++;
- mapping.permissions = {permissions_start, (size_t) (p - permissions_start)};
+ mapping.permissions = std::string (permissions_start,
+ (size_t) (p - permissions_start));
mapping.offset = strtoulst (p, &p, 16);
@@ -897,51 +899,39 @@ linux_info_proc (struct gdbarch *gdbarch, const char *args,
= target_fileio_read_stralloc (NULL, filename);
if (map != NULL)
{
- char *line;
-
gdb_printf (_("Mapped address spaces:\n\n"));
- if (gdbarch_addr_bit (gdbarch) == 32)
- {
- gdb_printf ("\t%10s %10s %10s %10s %s %s\n",
- "Start Addr", " End Addr", " Size",
- " Offset", "Perms ", "objfile");
- }
- else
- {
- gdb_printf (" %18s %18s %10s %10s %s %s\n",
- "Start Addr", " End Addr", " Size",
- " Offset", "Perms ", "objfile");
- }
+ ui_out_emit_table emitter (current_uiout, 6, -1, "ProcMappings");
+
+ int width = gdbarch_addr_bit (gdbarch) == 32 ? 10 : 18;
+ current_uiout->table_header (width, ui_left, "start", "Start Addr");
+ current_uiout->table_header (width, ui_left, "end", "End Addr");
+ current_uiout->table_header (width, ui_left, "size", "Size");
+ current_uiout->table_header (width, ui_left, "offset", "Offset");
+ current_uiout->table_header (5, ui_left, "perms", "Perms");
+ current_uiout->table_header (0, ui_left, "objfile", "File");
+ current_uiout->table_body ();
char *saveptr;
- for (line = strtok_r (map.get (), "\n", &saveptr);
- line;
- line = strtok_r (NULL, "\n", &saveptr))
+ for (const char *line = strtok_r (map.get (), "\n", &saveptr);
+ line != nullptr;
+ line = strtok_r (nullptr, "\n", &saveptr))
{
struct mapping m = read_mapping (line);
- if (gdbarch_addr_bit (gdbarch) == 32)
- {
- gdb_printf ("\t%10s %10s %10s %10s %-5.*s %s\n",
- paddress (gdbarch, m.addr),
- paddress (gdbarch, m.endaddr),
- hex_string (m.endaddr - m.addr),
- hex_string (m.offset),
- (int) m.permissions.size (),
- m.permissions.data (),
- m.filename);
- }
- else
- {
- gdb_printf (" %18s %18s %10s %10s %-5.*s %s\n",
- paddress (gdbarch, m.addr),
- paddress (gdbarch, m.endaddr),
- hex_string (m.endaddr - m.addr),
- hex_string (m.offset),
- (int) m.permissions.size (),
- m.permissions.data (),
- m.filename);
- }
+ ui_out_emit_tuple tuple_emitter (current_uiout, nullptr);
+ current_uiout->field_core_addr ("start", gdbarch, m.addr);
+ current_uiout->field_core_addr ("end", gdbarch, m.endaddr);
+ /* These next two aren't really addresses and so
+ shouldn't be styled as such. */
+ current_uiout->field_string ("size",
+ paddress (gdbarch,
+ m.endaddr - m.addr));
+ current_uiout->field_string ("offset",
+ paddress (gdbarch, m.offset));
+ current_uiout->field_string ("perms", m.permissions);
+ current_uiout->field_string ("objfile", m.filename,
+ file_name_style.style ());
+ current_uiout->text ("\n");
}
}
else
@@ -1242,42 +1232,34 @@ linux_read_core_file_mappings
static void
linux_core_info_proc_mappings (struct gdbarch *gdbarch, const char *args)
{
+ std::optional<ui_out_emit_table> emitter;
+
linux_read_core_file_mappings (gdbarch, current_program_space->core_bfd (),
- [=] (ULONGEST count)
+ [&] (ULONGEST count)
{
gdb_printf (_("Mapped address spaces:\n\n"));
- if (gdbarch_addr_bit (gdbarch) == 32)
- {
- gdb_printf ("\t%10s %10s %10s %10s %s\n",
- "Start Addr",
- " End Addr",
- " Size", " Offset", "objfile");
- }
- else
- {
- gdb_printf (" %18s %18s %10s %10s %s\n",
- "Start Addr",
- " End Addr",
- " Size", " Offset", "objfile");
- }
+ emitter.emplace (current_uiout, 5, -1, "ProcMappings");
+ int width = gdbarch_addr_bit (gdbarch) == 32 ? 10 : 18;
+ current_uiout->table_header (width, ui_left, "start", "Start Addr");
+ current_uiout->table_header (width, ui_left, "end", "End Addr");
+ current_uiout->table_header (width, ui_left, "size", "Size");
+ current_uiout->table_header (width, ui_left, "offset", "Offset");
+ current_uiout->table_header (0, ui_left, "objfile", "File");
+ current_uiout->table_body ();
},
[=] (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs,
const char *filename, const bfd_build_id *build_id)
{
- if (gdbarch_addr_bit (gdbarch) == 32)
- gdb_printf ("\t%10s %10s %10s %10s %s\n",
- paddress (gdbarch, start),
- paddress (gdbarch, end),
- hex_string (end - start),
- hex_string (file_ofs),
- filename);
- else
- gdb_printf (" %18s %18s %10s %10s %s\n",
- paddress (gdbarch, start),
- paddress (gdbarch, end),
- hex_string (end - start),
- hex_string (file_ofs),
- filename);
+ ui_out_emit_tuple tuple_emitter (current_uiout, nullptr);
+ current_uiout->field_core_addr ("start", gdbarch, start);
+ current_uiout->field_core_addr ("end", gdbarch, end);
+ /* These next two aren't really addresses and so shouldn't be
+ styled as such. */
+ current_uiout->field_string ("size", paddress (gdbarch, end - start));
+ current_uiout->field_string ("offset", paddress (gdbarch, file_ofs));
+ current_uiout->field_string ("objfile", filename,
+ file_name_style.style ());
+ current_uiout->text ("\n");
});
}
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 28005e1..2887ad2 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -117,7 +117,7 @@ using namespace expr;
%token <sval> TYPENAME
%token SIZE CAP ORD HIGH ABS MIN_FUNC MAX_FUNC FLOAT_FUNC VAL CHR ODD TRUNC
-%token TSIZE
+%token TSIZE ADR
%token INC DEC INCL EXCL
/* The GDB scope operator */
@@ -191,6 +191,10 @@ exp : ABS '(' exp ')'
{ error (_("ABS function is not implemented")); }
;
+exp : ADR '(' exp ')'
+ { pstate->wrap<unop_addr_operation> (); }
+ ;
+
exp : HIGH '(' exp ')'
{ pstate->wrap<m2_unop_high_operation> (); }
;
@@ -699,6 +703,7 @@ static struct keyword keytab[] =
{"IN", IN },/* Note space after IN */
{"AND", LOGICAL_AND},
{"ABS", ABS },
+ {"ADR", ADR },
{"CHR", CHR },
{"DEC", DEC },
{"NOT", NOT },
@@ -918,8 +923,9 @@ yylex (void)
std::string tmp = copy_name (yylval.sval);
struct symbol *sym;
- if (lookup_symtab (tmp.c_str ()))
+ if (lookup_symtab (current_program_space, tmp.c_str ()) != nullptr)
return BLOCKNAME;
+
sym = lookup_symbol (tmp.c_str (), pstate->expression_context_block,
SEARCH_VFT, 0).symbol;
if (sym && sym->aclass () == LOC_BLOCK)
diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c
index c0ae722..4ade1ce 100644
--- a/gdb/m2-typeprint.c
+++ b/gdb/m2-typeprint.c
@@ -27,7 +27,6 @@
#include "gdbcore.h"
#include "m2-lang.h"
#include "target.h"
-#include "language.h"
#include "demangle.h"
#include "c-lang.h"
#include "typeprint.h"
diff --git a/gdb/m68k-linux-nat.c b/gdb/m68k-linux-nat.c
index 7f33739..49cd491 100644
--- a/gdb/m68k-linux-nat.c
+++ b/gdb/m68k-linux-nat.c
@@ -350,7 +350,7 @@ fill_fpregset (const struct regcache *regcache,
#ifdef HAVE_PTRACE_GETREGS
/* Fetch all floating-point registers from process/thread TID and store
- thier values in GDB's register array. */
+ their values in GDB's register array. */
static void
fetch_fpregs (struct regcache *regcache, int tid)
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index ab4d509..dae4e4d 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -413,7 +413,7 @@ static struct parse_stack
struct type *cur_type; /* Type we parse fields for. */
int cur_field; /* Field number in cur_type. */
- CORE_ADDR procadr; /* Start addres of this procedure. */
+ CORE_ADDR procadr; /* Start address of this procedure. */
int numargs; /* Its argument count. */
}
@@ -1319,7 +1319,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
consequence of GDB's type management; CC and GCC (at
least through version 2.4) both output variables of
either type char * or caddr_t with the type
- refering to the stTypedef symbol for caddr_t. If a future
+ referring to the stTypedef symbol for caddr_t. If a future
compiler cleans this up it GDB is not ready for it
yet, but if it becomes ready we somehow need to
disable this check (without breaking the PCC/GCC2.4
@@ -2522,14 +2522,14 @@ parse_partial_symbols (minimal_symbol_reader &reader,
/* On certain platforms, some extra label symbols can be
generated by the linker. One possible usage for this kind
- of symbols is to represent the address of the begining of a
+ of symbols is to represent the address of the beginning of a
given section. For instance, on Tru64 5.1, the address of
the _ftext label is the start address of the .text section.
The storage class of these symbols is usually directly
related to the section to which the symbol refers. For
instance, on Tru64 5.1, the storage class for the _fdata
- label is scData, refering to the .data section.
+ label is scData, referring to the .data section.
It is actually possible that the section associated to the
storage class of the label does not exist. On True64 5.1
@@ -2892,7 +2892,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
const char *basename;
/* A zero value is probably an indication for the
- SunPRO 3.0 compiler. dbx_end_psymtab explicitly tests
+ SunPRO 3.0 compiler. stabs_end_psymtab explicitly tests
for zero, so don't relocate it. */
if (sh.value == 0
@@ -3297,7 +3297,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
case N_ENDM:
/* Solaris 2 end of module, finish current partial
- symbol table. dbx_end_psymtab will set the
+ symbol table. stabs_end_psymtab will set the
high text address of PST to the proper value,
which is necessary if a module compiled without
debugging info follows this module. */
@@ -3368,7 +3368,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
char *sym_name;
enum address_class theclass;
unrelocated_addr minsym_value;
- short section = -1;
+ int section = -1;
(*swap_sym_in) (cur_bfd,
((char *) debug_info->external_sym
@@ -3616,7 +3616,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
enum address_class theclass;
SYMR *psh;
CORE_ADDR svalue;
- short section;
+ int section;
gdb_assert (ext_ptr->ifd == f_idx);
@@ -3686,14 +3686,14 @@ parse_partial_symbols (minimal_symbol_reader &reader,
}
}
- /* Link pst to FDR. dbx_end_psymtab returns NULL if the psymtab was
+ /* Link pst to FDR. stabs_end_psymtab returns NULL if the psymtab was
empty and put on the free list. */
fdr_to_pst[f_idx].pst
- = dbx_end_psymtab (objfile, partial_symtabs, save_pst,
- psymtab_include_list, includes_used,
- -1, save_pst->unrelocated_text_high (),
- dependency_list, dependencies_used,
- textlow_not_set);
+ = stabs_end_psymtab (objfile, partial_symtabs, save_pst,
+ psymtab_include_list, includes_used,
+ -1, save_pst->unrelocated_text_high (),
+ dependency_list, dependencies_used,
+ textlow_not_set);
includes_used = 0;
dependencies_used = 0;
}
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 735068e..c92792e 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -134,7 +134,7 @@ create_user_mem_region (CORE_ADDR lo, CORE_ADDR hi,
int ix = std::distance (user_mem_region_list.begin (), it);
/* Check for an overlapping memory region. We only need to check
- in the vincinity - at most one before and one after the
+ in the vicinity - at most one before and one after the
insertion point. */
for (int i = ix - 1; i < ix + 1; i++)
{
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index 99b2ae4..a311e25 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "progspace.h"
#include "target.h"
#include "value.h"
#include "mi-cmds.h"
@@ -245,7 +246,7 @@ mi_cmd_disassemble (const char *command, const char *const *argv, int argc)
if (line_seen && file_seen)
{
- s = lookup_symtab (file_string);
+ s = lookup_symtab (current_program_space, file_string);
if (s == NULL)
error (_("-data-disassemble: Invalid filename."));
if (!find_line_pc (s, line_num, &start))
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index ff93d2c..9ad26e7 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -35,8 +35,8 @@ mi_ui_out::do_table_begin (int nr_cols, int nr_rows,
const char *tblid)
{
open (tblid, ui_out_type_tuple);
- do_field_signed (-1, -1, ui_left, "nr_rows", nr_rows);
- do_field_signed (-1, -1, ui_left, "nr_cols", nr_cols);
+ do_field_signed (-1, -1, ui_left, "nr_rows", nr_rows, ui_file_style ());
+ do_field_signed (-1, -1, ui_left, "nr_cols", nr_cols, ui_file_style ());
open ("hdr", ui_out_type_list);
}
@@ -67,8 +67,8 @@ mi_ui_out::do_table_header (int width, ui_align alignment,
const std::string &col_hdr)
{
open (NULL, ui_out_type_tuple);
- do_field_signed (0, 0, ui_center, "width", width);
- do_field_signed (0, 0, ui_center, "alignment", alignment);
+ do_field_signed (0, 0, ui_center, "width", width, ui_file_style ());
+ do_field_signed (0, 0, ui_center, "alignment", alignment, ui_file_style ());
do_field_string (0, 0, ui_center, "col_name", col_name.c_str (),
ui_file_style ());
do_field_string (0, width, alignment, "colhdr", col_hdr.c_str (),
@@ -96,10 +96,11 @@ mi_ui_out::do_end (ui_out_type type)
void
mi_ui_out::do_field_signed (int fldno, int width, ui_align alignment,
- const char *fldname, LONGEST value)
+ const char *fldname, LONGEST value,
+ const ui_file_style &style)
{
do_field_string (fldno, width, alignment, fldname, plongest (value),
- ui_file_style ());
+ style);
}
/* Output an unsigned field. */
diff --git a/gdb/mi/mi-out.h b/gdb/mi/mi-out.h
index a21a34f..9ad419e 100644
--- a/gdb/mi/mi-out.h
+++ b/gdb/mi/mi-out.h
@@ -62,7 +62,8 @@ protected:
virtual void do_begin (ui_out_type type, const char *id) override;
virtual void do_end (ui_out_type type) override;
virtual void do_field_signed (int fldno, int width, ui_align align,
- const char *fldname, LONGEST value) override;
+ const char *fldname, LONGEST value,
+ const ui_file_style &style) override;
virtual void do_field_unsigned (int fldno, int width, ui_align align,
const char *fldname, ULONGEST value)
override;
diff --git a/gdb/mi/mi-symbol-cmds.c b/gdb/mi/mi-symbol-cmds.c
index e90055f..e4d890f 100644
--- a/gdb/mi/mi-symbol-cmds.c
+++ b/gdb/mi/mi-symbol-cmds.c
@@ -41,7 +41,7 @@ mi_cmd_symbol_list_lines (const char *command, const char *const *argv,
error (_("-symbol-list-lines: Usage: SOURCE_FILENAME"));
filename = argv[0];
- s = lookup_symtab (filename);
+ s = lookup_symtab (current_program_space, filename);
if (s == NULL)
error (_("-symbol-list-lines: Unknown source file name."));
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 3d768d7..609c665 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -160,7 +160,7 @@ microblaze_alloc_frame_cache (void)
/* The base of the current frame is in a frame pointer register.
This register is noted in frame_extra_info->fp_regnum.
- Note that the existance of an FP might also indicate that the
+ Note that the existence of an FP might also indicate that the
function has called alloca. */
#define MICROBLAZE_MY_FRAME_IN_FP 0x2
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index b5c4b95..33eb907 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -1594,7 +1594,6 @@ find_solib_trampoline_target (const frame_info_ptr &frame, CORE_ADDR pc)
CORE_ADDR
minimal_symbol_upper_bound (bound_minimal_symbol minsym)
{
- short section;
struct obj_section *obj_section;
CORE_ADDR result;
struct minimal_symbol *iter, *msymbol;
@@ -1616,7 +1615,7 @@ minimal_symbol_upper_bound (bound_minimal_symbol minsym)
= (minsym.objfile->per_bfd->msymbols.get ()
+ minsym.objfile->per_bfd->minimal_symbol_count);
msymbol = minsym.minsym;
- section = msymbol->section_index ();
+ int section = msymbol->section_index ();
for (iter = msymbol + 1; iter != past_the_end; ++iter)
{
if ((iter->unrelocated_address ()
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 006bc92..c00efbd 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -558,7 +558,7 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
}
/* Determine if a MIPS3 or later cpu is operating in MIPS{1,2} FPU
- compatiblity mode. A return value of 1 means that we have
+ compatibility mode. A return value of 1 means that we have
physical 64-bit registers, but should treat them as 32-bit registers. */
static int
@@ -574,7 +574,7 @@ mips2_fp_compat (const frame_info_ptr &frame)
/* FIXME drow 2002-03-10: This is disabled until we can do it consistently,
in all the places we deal with FP registers. PR gdb/413. */
/* Otherwise check the FR bit in the status register - it controls
- the FP compatiblity mode. If it is clear we are in compatibility
+ the FP compatibility mode. If it is clear we are in compatibility
mode. */
if ((get_frame_register_unsigned (frame, MIPS_PS_REGNUM) & ST0_FR) == 0)
return 1;
@@ -592,7 +592,7 @@ static CORE_ADDR heuristic_proc_start (struct gdbarch *, CORE_ADDR);
static struct cmd_list_element *setmipscmdlist = NULL;
static struct cmd_list_element *showmipscmdlist = NULL;
-/* Integer registers 0 thru 31 are handled explicitly by
+/* Integer registers 0 through 31 are handled explicitly by
mips_register_name(). Processor specific registers 32 and above
are listed in the following tables. */
@@ -920,7 +920,7 @@ mips_convert_register_float_case_p (struct gdbarch *gdbarch, int regnum,
}
/* This predicate tests for the case of a value of less than 8
- bytes in width that is being transfered to or from an 8 byte
+ bytes in width that is being transferred to or from an 8 byte
general purpose register. */
static int
mips_convert_register_gpreg_case_p (struct gdbarch *gdbarch, int regnum,
@@ -1076,7 +1076,7 @@ mips_register_type (struct gdbarch *gdbarch, int regnum)
return builtin_type (gdbarch)->builtin_int32;
else if (tdep->mips64_transfers_32bit_regs_p)
/* The target, while possibly using a 64-bit register buffer,
- is only transfering 32-bits of each integer register.
+ is only transferring 32-bits of each integer register.
Reflect this in the cooked/pseudo (ABI) register value. */
return builtin_type (gdbarch)->builtin_int32;
else if (mips_abi_regsize (gdbarch) == 4)
@@ -2877,7 +2877,7 @@ mips_insn16_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
find_pc_partial_function (pc, NULL, &start_addr, NULL);
if (start_addr == 0)
start_addr = heuristic_proc_start (gdbarch, pc);
- /* We can't analyze the prologue if we couldn't find the begining
+ /* We can't analyze the prologue if we couldn't find the beginning
of the function. */
if (start_addr == 0)
return cache;
@@ -3312,7 +3312,7 @@ mips_micro_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
find_pc_partial_function (pc, NULL, &start_addr, NULL);
if (start_addr == 0)
start_addr = heuristic_proc_start (get_frame_arch (this_frame), pc);
- /* We can't analyze the prologue if we couldn't find the begining
+ /* We can't analyze the prologue if we couldn't find the beginning
of the function. */
if (start_addr == 0)
return cache;
@@ -3693,7 +3693,7 @@ mips_insn32_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
find_pc_partial_function (pc, NULL, &start_addr, NULL);
if (start_addr == 0)
start_addr = heuristic_proc_start (gdbarch, pc);
- /* We can't analyze the prologue if we couldn't find the begining
+ /* We can't analyze the prologue if we couldn't find the beginning
of the function. */
if (start_addr == 0)
return cache;
@@ -4581,7 +4581,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Now load as many as possible of the first arguments into
- registers, and push the rest onto the stack. Loop thru args
+ registers, and push the rest onto the stack. Loop through args
from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
@@ -4754,7 +4754,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Note!!! This is NOT an else clause. Odd sized
- structs may go thru BOTH paths. Floating point
+ structs may go through BOTH paths. Floating point
arguments will not. */
/* Write this portion of the argument to a general
purpose register. */
@@ -4975,7 +4975,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Now load as many as possible of the first arguments into
- registers, and push the rest onto the stack. Loop thru args
+ registers, and push the rest onto the stack. Loop through args
from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
@@ -5106,7 +5106,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Note!!! This is NOT an else clause. Odd sized
- structs may go thru BOTH paths. */
+ structs may go through BOTH paths. */
/* Write this portion of the argument to a general
purpose register. */
if (argreg <= mips_last_arg_regnum (gdbarch))
@@ -5455,7 +5455,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Now load as many as possible of the first arguments into
- registers, and push the rest onto the stack. Loop thru args
+ registers, and push the rest onto the stack. Loop through args
from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
@@ -5618,7 +5618,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Note!!! This is NOT an else clause. Odd sized
- structs may go thru BOTH paths. */
+ structs may go through BOTH paths. */
/* Write this portion of the argument to a general
purpose register. */
if (argreg <= mips_last_arg_regnum (gdbarch))
@@ -5976,7 +5976,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Now load as many as possible of the first arguments into
- registers, and push the rest onto the stack. Loop thru args
+ registers, and push the rest onto the stack. Loop through args
from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
@@ -6080,7 +6080,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
}
/* Note!!! This is NOT an else clause. Odd sized
- structs may go thru BOTH paths. */
+ structs may go through BOTH paths. */
/* Write this portion of the argument to a general
purpose register. */
if (argreg <= mips_last_arg_regnum (gdbarch))
diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c
index 59e8ae6..7ff12d6 100644
--- a/gdb/nat/linux-btrace.c
+++ b/gdb/nat/linux-btrace.c
@@ -686,6 +686,17 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf)
tinfo->conf.pt.ptwrite = true;
}
+ if (conf->event_tracing)
+ {
+ if (linux_supports_pt_feature ("event_trace"))
+ {
+ tinfo->attr.config |= linux_read_pt_config_bitmask ("event");
+ tinfo->conf.pt.event_tracing = true;
+ }
+ else
+ error (_("Event tracing for record btrace pt is not supported."));
+ }
+
errno = 0;
scoped_fd fd (syscall (SYS_perf_event_open, &tinfo->attr, pid, -1, -1, 0));
if (fd.get () < 0)
diff --git a/gdb/nat/x86-linux-tdesc.c b/gdb/nat/x86-linux-tdesc.c
index c15a600..1824f57 100644
--- a/gdb/nat/x86-linux-tdesc.c
+++ b/gdb/nat/x86-linux-tdesc.c
@@ -106,12 +106,6 @@ x86_linux_tdesc_for_tid (int tid, uint64_t *xcr0_storage,
*xcr0_storage = xstateregs[(I386_LINUX_XSAVE_XCR0_OFFSET
/ sizeof (uint64_t))];
-#ifdef __x86_64__
- /* No MPX on x32. */
- if (is_64bit && is_x32)
- *xcr0_storage &= ~X86_XSTATE_MPX;
-#endif /* __x86_64__ */
-
*xsave_layout_storage
= x86_fetch_xsave_layout (*xcr0_storage, x86_xsave_length ());
}
diff --git a/gdb/nat/x86-xstate.c b/gdb/nat/x86-xstate.c
index 970dda1..ca6fbbf 100644
--- a/gdb/nat/x86-xstate.c
+++ b/gdb/nat/x86-xstate.c
@@ -56,8 +56,6 @@ x86_fetch_xsave_layout (uint64_t xcr0, int len)
x86_xsave_layout layout;
layout.sizeof_xsave = len;
layout.avx_offset = xsave_feature_offset (xcr0, X86_XSTATE_AVX_ID);
- layout.bndregs_offset = xsave_feature_offset (xcr0, X86_XSTATE_BNDREGS_ID);
- layout.bndcfg_offset = xsave_feature_offset (xcr0, X86_XSTATE_BNDCFG_ID);
layout.k_offset = xsave_feature_offset (xcr0, X86_XSTATE_K_ID);
layout.zmm_h_offset = xsave_feature_offset (xcr0, X86_XSTATE_ZMM_H_ID);
layout.zmm_offset = xsave_feature_offset (xcr0, X86_XSTATE_ZMM_ID);
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index cf78979..fa2befd 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -552,7 +552,7 @@ compare_selectors (const void *a, const void *b)
*
* Implements the "Info selectors" command. Takes an optional regexp
* arg. Lists all objective c selectors that match the regexp. Works
- * by grepping thru all symbols for objective c methods. Output list
+ * by grepping through all symbols for objective c methods. Output list
* is sorted and uniqued.
*/
@@ -601,7 +601,7 @@ info_selectors_command (const char *regexp, int from_tty)
error (_("Invalid regexp (%s): %s"), val, regexp);
}
- /* First time thru is JUST to get max length and count. */
+ /* First time through is JUST to get max length and count. */
for (objfile *objfile : current_program_space->objfiles ())
{
for (minimal_symbol *msymbol : objfile->msymbols ())
@@ -716,7 +716,7 @@ compare_classes (const void *a, const void *b)
*
* Implements the "info classes" command for objective c classes.
* Lists all objective c classes that match the optional regexp.
- * Works by grepping thru the list of objective c methods. List will
+ * Works by grepping through the list of objective c methods. List will
* be sorted and uniqued (since one class may have many methods).
* BUGS: will not list a class that has no methods.
*/
@@ -755,7 +755,7 @@ info_classes_command (const char *regexp, int from_tty)
error (_("Invalid regexp (%s): %s"), val, regexp);
}
- /* First time thru is JUST to get max length and count. */
+ /* First time through is JUST to get max length and count. */
for (objfile *objfile : current_program_space->objfiles ())
{
for (minimal_symbol *msymbol : objfile->msymbols ())
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 8b1e89c..d92570a 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -597,7 +597,9 @@ public:
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain);
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher
+ = nullptr);
/* See quick_symbol_functions. */
struct compunit_symtab *
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 8a1efce..236d425 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -42,93 +42,6 @@ static const char *gdb_osabi_available_names[GDB_OSABI_INVALID + 3] = {
};
static const char *set_osabi_string;
-/* Names associated with each osabi. */
-
-struct osabi_names
-{
- /* The "pretty" name. */
-
- const char *pretty;
-
- /* The triplet regexp, or NULL if not known. */
-
- const char *regexp;
-};
-
-/* This table matches the indices assigned to enum gdb_osabi. Keep
- them in sync. */
-static const struct osabi_names gdb_osabi_names[] =
-{
- { "unknown", NULL },
- { "none", NULL },
-
- { "SVR4", NULL },
- { "GNU/Hurd", NULL },
- { "Solaris", NULL },
- { "GNU/Linux", "linux(-gnu[^-]*)?" },
- { "FreeBSD", NULL },
- { "NetBSD", NULL },
- { "OpenBSD", NULL },
- { "WindowsCE", NULL },
- { "DJGPP", NULL },
- { "Cygwin", NULL },
- { "Windows", NULL },
- { "AIX", NULL },
- { "DICOS", NULL },
- { "Darwin", NULL },
- { "OpenVMS", NULL },
- { "LynxOS178", NULL },
- { "Newlib", NULL },
- { "SDE", NULL },
- { "PikeOS", NULL },
-
- { "<invalid>", NULL }
-};
-
-const char *
-gdbarch_osabi_name (enum gdb_osabi osabi)
-{
- if (osabi >= GDB_OSABI_UNKNOWN && osabi < GDB_OSABI_INVALID)
- return gdb_osabi_names[osabi].pretty;
-
- return gdb_osabi_names[GDB_OSABI_INVALID].pretty;
-}
-
-/* See osabi.h. */
-
-const char *
-osabi_triplet_regexp (enum gdb_osabi osabi)
-{
- if (osabi >= GDB_OSABI_UNKNOWN && osabi < GDB_OSABI_INVALID)
- return gdb_osabi_names[osabi].regexp;
-
- return gdb_osabi_names[GDB_OSABI_INVALID].regexp;
-}
-
-/* Lookup the OS ABI corresponding to the specified target description
- string. */
-
-enum gdb_osabi
-osabi_from_tdesc_string (const char *name)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE (gdb_osabi_names); i++)
- if (strcmp (name, gdb_osabi_names[i].pretty) == 0)
- {
- /* See note above: the name table matches the indices assigned
- to enum gdb_osabi. */
- enum gdb_osabi osabi = (enum gdb_osabi) i;
-
- if (osabi == GDB_OSABI_INVALID)
- return GDB_OSABI_UNKNOWN;
- else
- return osabi;
- }
-
- return GDB_OSABI_UNKNOWN;
-}
-
/* Handler for a given architecture/OS ABI pair. There should be only
one handler for a given OS ABI each architecture family. */
struct gdb_osabi_handler
@@ -611,6 +524,35 @@ generic_elf_osabi_sniffer (bfd *abfd)
return osabi;
}
+
+/* See osabi.h. */
+
+const char *
+gdbarch_osabi_enum_name (enum gdb_osabi osabi)
+{
+ switch (osabi)
+ {
+#define GDB_OSABI_DEF_FIRST(Enum, Name, Regex) \
+ case GDB_OSABI_ ## Enum: \
+ return "GDB_OSABI_" #Enum;
+
+#define GDB_OSABI_DEF(Enum, Name, Regex) \
+ case GDB_OSABI_ ## Enum: \
+ return "GDB_OSABI_" #Enum;
+
+#define GDB_OSABI_DEF_LAST(Enum, Name, Regex) \
+ case GDB_OSABI_ ## Enum: \
+ return "GDB_OSABI_" #Enum;
+
+#include "gdbsupport/osabi.def"
+
+#undef GDB_OSABI_DEF_LAST
+#undef GDB_OSABI_DEF
+#undef GDB_OSABI_DEF_FIRST
+ }
+
+ gdb_assert_not_reached ();
+}
static void
set_osabi (const char *args, int from_tty, struct cmd_list_element *c)
@@ -671,10 +613,6 @@ void _initialize_gdb_osabi ();
void
_initialize_gdb_osabi ()
{
- if (strcmp (gdb_osabi_names[GDB_OSABI_INVALID].pretty, "<invalid>") != 0)
- internal_error
- (_("_initialize_gdb_osabi: gdb_osabi_names[] is inconsistent"));
-
/* Register a generic sniffer for ELF flavoured files. */
gdbarch_register_osabi_sniffer (bfd_arch_unknown,
bfd_target_elf_flavour,
diff --git a/gdb/osabi.h b/gdb/osabi.h
index d2b1a35..2d828d5 100644
--- a/gdb/osabi.h
+++ b/gdb/osabi.h
@@ -19,35 +19,7 @@
#ifndef OSABI_H
#define OSABI_H
-/* * List of known OS ABIs. If you change this, make sure to update the
- table in osabi.c. */
-enum gdb_osabi
-{
- GDB_OSABI_UNKNOWN = 0, /* keep this zero */
- GDB_OSABI_NONE,
-
- GDB_OSABI_SVR4,
- GDB_OSABI_HURD,
- GDB_OSABI_SOLARIS,
- GDB_OSABI_LINUX,
- GDB_OSABI_FREEBSD,
- GDB_OSABI_NETBSD,
- GDB_OSABI_OPENBSD,
- GDB_OSABI_WINCE,
- GDB_OSABI_GO32,
- GDB_OSABI_CYGWIN,
- GDB_OSABI_WINDOWS,
- GDB_OSABI_AIX,
- GDB_OSABI_DICOS,
- GDB_OSABI_DARWIN,
- GDB_OSABI_OPENVMS,
- GDB_OSABI_LYNXOS178,
- GDB_OSABI_NEWLIB,
- GDB_OSABI_SDE,
- GDB_OSABI_PIKEOS,
-
- GDB_OSABI_INVALID /* keep this last */
-};
+#include "gdbsupport/osabi.h"
/* Register an OS ABI sniffer. Each arch/flavour may have more than
one sniffer. This is used to e.g. differentiate one OS's a.out from
@@ -69,26 +41,19 @@ void gdbarch_register_osabi (enum bfd_architecture, unsigned long,
/* Lookup the OS ABI corresponding to the specified BFD. */
enum gdb_osabi gdbarch_lookup_osabi (bfd *);
-/* Lookup the OS ABI corresponding to the specified target description
- string. */
-enum gdb_osabi osabi_from_tdesc_string (const char *text);
-
/* Return true if there's an OS ABI handler for INFO. */
bool has_gdb_osabi_handler (struct gdbarch_info info);
/* Initialize the gdbarch for the specified OS ABI variant. */
void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *);
-/* Return the name of the specified OS ABI. */
-const char *gdbarch_osabi_name (enum gdb_osabi);
-
-/* Return a regular expression that matches the OS part of a GNU
- configury triplet for the given OSABI. */
-const char *osabi_triplet_regexp (enum gdb_osabi osabi);
-
/* Helper routine for ELF file sniffers. This looks at ABI tag note
sections to determine the OS ABI from the note. */
void generic_elf_osabi_sniff_abi_tag_sections (bfd *, asection *,
enum gdb_osabi *);
+/* Return a string version of OSABI. This is used when generating code
+ which calls set_tdesc_osabi and an 'enum gdb_osabi' value is needed. */
+const char *gdbarch_osabi_enum_name (enum gdb_osabi osabi);
+
#endif /* OSABI_H */
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index ad7cd58..938d3cf 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -614,7 +614,7 @@ block : BLOCKNAME
{
std::string copy = copy_name ($1.stoken);
struct symtab *tem =
- lookup_symtab (copy.c_str ());
+ lookup_symtab (current_program_space, copy.c_str ());
if (tem)
$$ = (tem->compunit ()->blockvector ()
->static_block ());
@@ -1520,7 +1520,7 @@ yylex (void)
no psymtabs (coff, xcoff, or some future change to blow away the
psymtabs once once symbols are read). */
if ((sym && sym->aclass () == LOC_BLOCK)
- || lookup_symtab (tmp.c_str ()))
+ || lookup_symtab (current_program_space, tmp.c_str ()))
{
yylval.ssym.sym.symbol = sym;
yylval.ssym.sym.block = NULL;
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 3116fc1..8a5eea7 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -133,7 +133,7 @@ static solib_ops powerpc_so_ops;
(gdb) b main
Breakpoint 2 at 0x100006a0: file gdb.base/shmain.c, line 44.
- Examine the instruction (and the immediatly following instruction)
+ Examine the instruction (and the immediately following instruction)
upon which the breakpoint was placed. Note that the PLT entry
for shr1 contains zeros.
diff --git a/gdb/ppc-netbsd-tdep.c b/gdb/ppc-netbsd-tdep.c
index d8e4c42..b412030 100644
--- a/gdb/ppc-netbsd-tdep.c
+++ b/gdb/ppc-netbsd-tdep.c
@@ -28,7 +28,6 @@
#include "ppc-tdep.h"
#include "netbsd-tdep.h"
-#include "ppc-tdep.h"
#include "solib-svr4.h"
/* Register offsets from <machine/reg.h>. */
diff --git a/gdb/procfs.c b/gdb/procfs.c
index a9a26c6..c6abe3e 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -205,7 +205,7 @@ procfs_target::auxv_parse (const gdb_byte **readptr,
concerning a /proc process. There should be exactly one procinfo
for each process, and since GDB currently can debug only one
process at a time, that means there should be only one procinfo.
- All of the LWP's of a process can be accessed indirectly thru the
+ All of the LWP's of a process can be accessed indirectly through the
single process procinfo.
However, against the day when GDB may debug more than one process,
diff --git a/gdb/progspace.h b/gdb/progspace.h
index 82c0a74..999e7a3 100644
--- a/gdb/progspace.h
+++ b/gdb/progspace.h
@@ -289,7 +289,7 @@ struct program_space
struct objfile *objfile_for_address (CORE_ADDR address);
/* Return the list of all the solibs in this program space. */
- intrusive_list<solib> &solibs ()
+ owning_intrusive_list<solib> &solibs ()
{ return so_list; }
/* Similar to `bfd_get_filename (exec_bfd ())` but in original form given
@@ -399,7 +399,7 @@ struct program_space
/* List of shared objects mapped into this space. Managed by
solib.c. */
- intrusive_list<solib> so_list;
+ owning_intrusive_list<solib> so_list;
/* Number of calls to solib_add. */
unsigned int solib_add_generation = 0;
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 0df3dc8..f8c83d9 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -893,7 +893,9 @@ psymbol_functions::expand_symtabs_matching
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain)
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype>
+ lang_matcher ATTRIBUTE_UNUSED)
{
/* Clear the search flags. */
for (partial_symtab *ps : partial_symbols (objfile))
@@ -1082,7 +1084,7 @@ void
partial_symtab::add_psymbol (std::string_view name, bool copy_name,
domain_enum domain,
enum address_class theclass,
- short section,
+ int section,
psymbol_placement where,
unrelocated_addr coreaddr,
enum language language,
diff --git a/gdb/psymtab.h b/gdb/psymtab.h
index 508e778..b23aadb 100644
--- a/gdb/psymtab.h
+++ b/gdb/psymtab.h
@@ -349,7 +349,7 @@ struct partial_symtab
void add_psymbol (std::string_view name,
bool copy_name, domain_enum domain,
enum address_class theclass,
- short section,
+ int section,
psymbol_placement where,
unrelocated_addr coreaddr,
enum language language,
@@ -633,7 +633,9 @@ struct psymbol_functions : public quick_symbol_functions
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags kind) override;
+ domain_search_flags kind,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
+ override;
struct compunit_symtab *find_pc_sect_compunit_symtab
(struct objfile *objfile, bound_minimal_symbol msymbol, CORE_ADDR pc,
diff --git a/gdb/python/lib/gdb/dap/breakpoint.py b/gdb/python/lib/gdb/dap/breakpoint.py
index db8ac10..15055f2 100644
--- a/gdb/python/lib/gdb/dap/breakpoint.py
+++ b/gdb/python/lib/gdb/dap/breakpoint.py
@@ -208,9 +208,9 @@ def _set_breakpoints_callback(kind, specs, creator):
}
)
- # Delete any breakpoints that were not reused.
- for entry in saved_map.values():
- entry.delete()
+ # Delete any breakpoints that were not reused.
+ for entry in saved_map.values():
+ entry.delete()
return result
diff --git a/gdb/python/lib/gdb/dap/launch.py b/gdb/python/lib/gdb/dap/launch.py
index 2674e02..65444bf 100644
--- a/gdb/python/lib/gdb/dap/launch.py
+++ b/gdb/python/lib/gdb/dap/launch.py
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import re
+
# These are deprecated in 3.9, but required in older versions.
from typing import Mapping, Optional, Sequence
@@ -20,7 +22,16 @@ import gdb
from .events import exec_and_expect_stop, expect_process, expect_stop
from .server import capability, request
-from .startup import DAPException, exec_and_log
+from .startup import DAPException, exec_and_log, in_gdb_thread
+
+
+# A wrapper for the 'file' command that correctly quotes its argument.
+@in_gdb_thread
+def file_command(program):
+ # Handle whitespace, quotes, and backslashes here. Exactly what
+ # to quote depends on libiberty's buildargv and safe-ctype.
+ program = re.sub("[ \t\n\r\f\v\\\\'\"]", "\\\\\\g<0>", program)
+ exec_and_log("file " + program)
# Any parameters here are necessarily extensions -- DAP requires this
@@ -34,12 +45,13 @@ def launch(
args: Sequence[str] = (),
env: Optional[Mapping[str, str]] = None,
stopAtBeginningOfMainSubprogram: bool = False,
+ stopOnEntry: bool = False,
**extra,
):
if cwd is not None:
exec_and_log("cd " + cwd)
if program is not None:
- exec_and_log("file " + program)
+ file_command(program)
inf = gdb.selected_inferior()
if stopAtBeginningOfMainSubprogram:
main = inf.main_name
@@ -51,7 +63,7 @@ def launch(
for name, value in env.items():
inf.set_env(name, value)
expect_process("process")
- exec_and_expect_stop("run")
+ exec_and_expect_stop("starti" if stopOnEntry else "run")
@request("attach")
@@ -63,7 +75,7 @@ def attach(
**args,
):
if program is not None:
- exec_and_log("file " + program)
+ file_command(program)
if pid is not None:
cmd = "attach " + str(pid)
elif target is not None:
diff --git a/gdb/python/lib/gdb/dap/varref.py b/gdb/python/lib/gdb/dap/varref.py
index 57e84a1..0dd9879 100644
--- a/gdb/python/lib/gdb/dap/varref.py
+++ b/gdb/python/lib/gdb/dap/varref.py
@@ -18,6 +18,7 @@ from collections import defaultdict
from contextlib import contextmanager
import gdb
+import gdb.printing
from .server import client_bool_capability
from .startup import DAPException, in_gdb_thread
diff --git a/gdb/python/lib/gdb/disassembler.py b/gdb/python/lib/gdb/disassembler.py
index 72d311b..7d0e781 100644
--- a/gdb/python/lib/gdb/disassembler.py
+++ b/gdb/python/lib/gdb/disassembler.py
@@ -147,7 +147,7 @@ class maint_info_py_disassemblers_cmd(gdb.Command):
# Figure out the name of the current architecture. There
# should always be a current inferior, but if, somehow, there
# isn't, then leave curr_arch as the empty string, which will
- # not then match agaisnt any architecture in the dictionary.
+ # not then match against any architecture in the dictionary.
curr_arch = ""
if gdb.selected_inferior() is not None:
curr_arch = gdb.selected_inferior().architecture().name()
diff --git a/gdb/python/lib/gdb/missing_debug.py b/gdb/python/lib/gdb/missing_debug.py
index 6d57462..7ccc4fe 100644
--- a/gdb/python/lib/gdb/missing_debug.py
+++ b/gdb/python/lib/gdb/missing_debug.py
@@ -31,9 +31,33 @@ if sys.version_info >= (3, 7):
return ch.isalnum()
else:
- # Fall back to curses.ascii.isascii() and curses.ascii.isalnum() for
- # earlier versions.
- from curses.ascii import isalnum, isascii
+ # Older version of Python doesn't have str.isascii() and
+ # str.isalnum() so provide our own.
+ #
+ # We could import isalnum() and isascii() from the curses library,
+ # but that adds an extra dependency. Given these functions are
+ # both small and trivial lets implement them here.
+ #
+ # These definitions are based on those in the curses library, but
+ # simplified as we know C will always be a single character 'str'.
+
+ def isdigit(c):
+ return 48 <= ord(c) <= 57
+
+ def islower(c):
+ return 97 <= ord(c) <= 122
+
+ def isupper(c):
+ return 65 <= ord(c) <= 90
+
+ def isalpha(c):
+ return isupper(c) or islower(c)
+
+ def isalnum(c):
+ return isalpha(c) or isdigit(c)
+
+ def isascii(c):
+ return 0 <= ord(c) <= 127
def _validate_name(name):
diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py
deleted file mode 100644
index d00b455..0000000
--- a/gdb/python/lib/gdb/printer/bound_registers.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# Pretty-printers for bounds registers.
-# Copyright (C) 2013-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 <http://www.gnu.org/licenses/>.
-
-import gdb
-import gdb.printing
-
-
-class MpxBound128Printer(gdb.ValuePrinter):
- """Adds size field to a mpx __gdb_builtin_type_bound128 type."""
-
- def __init__(self, val):
- self.__val = val
-
- def to_string(self):
- upper = self.__val["ubound"]
- lower = self.__val["lbound"]
- size = upper - lower
- if size > -1:
- size = size + 1
- result = "{lbound = %s, ubound = %s} : size %s" % (lower, upper, size)
- return result
-
-
-gdb.printing.add_builtin_pretty_printer(
- "mpx_bound128", "^builtin_type_bound128", MpxBound128Printer
-)
diff --git a/gdb/python/py-arch.c b/gdb/python/py-arch.c
index 178efab..d73d7fc 100644
--- a/gdb/python/py-arch.c
+++ b/gdb/python/py-arch.c
@@ -199,7 +199,7 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
gdbpy_ref<> pc_obj = gdb_py_object_from_ulongest (pc);
@@ -361,11 +361,7 @@ static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_arch (void)
{
arch_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&arch_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "Architecture",
- (PyObject *) &arch_object_type);
+ return gdbpy_type_ready (&arch_object_type);
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_arch);
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index 62e93d5..aeb9acb 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -493,19 +493,14 @@ static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_blocks (void)
{
block_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&block_object_type) < 0)
+ if (gdbpy_type_ready (&block_object_type) < 0)
return -1;
block_syms_iterator_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&block_syms_iterator_object_type) < 0)
+ if (gdbpy_type_ready (&block_syms_iterator_object_type) < 0)
return -1;
- if (gdb_pymodule_addobject (gdb_module, "Block",
- (PyObject *) &block_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "BlockIterator",
- (PyObject *) &block_syms_iterator_object_type);
+ return 0;
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_blocks);
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 013c3fa..1edd556 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -207,7 +207,7 @@ bppy_set_enabled (PyObject *self, PyObject *newvalue, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
return 0;
@@ -394,7 +394,7 @@ bppy_set_task (PyObject *self, PyObject *newvalue, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
if (! valid_id)
@@ -443,7 +443,7 @@ bppy_delete_breakpoint (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -484,7 +484,7 @@ bppy_set_ignore_count (PyObject *self, PyObject *newvalue, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
return 0;
@@ -613,7 +613,7 @@ bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure)
}
catch (const gdb_exception &ex)
{
- GDB_PY_SET_HANDLE_EXCEPTION (ex);
+ return gdbpy_handle_gdb_exception (-1, ex);
}
return 0;
@@ -640,7 +640,7 @@ bppy_get_commands (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return host_string_to_python_string (stb.c_str ()).release ();
@@ -678,7 +678,7 @@ bppy_set_commands (PyObject *self, PyObject *newvalue, void *closure)
}
catch (const gdb_exception &ex)
{
- GDB_PY_SET_HANDLE_EXCEPTION (ex);
+ return gdbpy_handle_gdb_exception (-1, ex);
}
return 0;
@@ -1054,7 +1054,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
catch (const gdb_exception &except)
{
bppy_pending_object = NULL;
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
BPPY_SET_REQUIRE_VALID ((gdbpy_breakpoint_object *) self);
@@ -1114,7 +1114,7 @@ gdbpy_breakpoint_init_breakpoint_type ()
if (breakpoint_object_type.tp_new == nullptr)
{
breakpoint_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&breakpoint_object_type) < 0)
+ if (gdbpy_type_ready (&breakpoint_object_type) < 0)
{
/* Reset tp_new back to nullptr so future calls to this function
will try calling PyType_Ready again. */
@@ -1359,10 +1359,6 @@ gdbpy_initialize_breakpoints (void)
if (!gdbpy_breakpoint_init_breakpoint_type ())
return -1;
- if (gdb_pymodule_addobject (gdb_module, "Breakpoint",
- (PyObject *) &breakpoint_object_type) < 0)
- return -1;
-
gdb::observers::breakpoint_created.attach (gdbpy_breakpoint_created,
"py-breakpoint");
gdb::observers::breakpoint_deleted.attach (gdbpy_breakpoint_deleted,
@@ -1394,14 +1390,7 @@ gdbpy_initialize_breakpoints (void)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_breakpoint_locations ()
{
- if (PyType_Ready (&breakpoint_location_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_module, "BreakpointLocation",
- (PyObject *) &breakpoint_location_object_type)
- < 0)
- return -1;
- return 0;
+ return gdbpy_type_ready (&breakpoint_location_object_type);
}
@@ -1595,7 +1584,7 @@ bplocpy_set_enabled (PyObject *py_self, PyObject *newvalue, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
return 0;
}
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index e042f20..2bb9b82 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -541,7 +541,7 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
return 0;
@@ -557,7 +557,7 @@ gdbpy_initialize_commands (void)
int i;
cmdpy_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&cmdpy_object_type) < 0)
+ if (gdbpy_type_ready (&cmdpy_object_type) < 0)
return -1;
/* Note: alias and user are special. */
@@ -587,10 +587,6 @@ gdbpy_initialize_commands (void)
return -1;
}
- if (gdb_pymodule_addobject (gdb_module, "Command",
- (PyObject *) &cmdpy_object_type) < 0)
- return -1;
-
invoke_cst = PyUnicode_FromString ("invoke");
if (invoke_cst == NULL)
return -1;
diff --git a/gdb/python/py-connection.c b/gdb/python/py-connection.c
index 79e2767..1fdcd73 100644
--- a/gdb/python/py-connection.c
+++ b/gdb/python/py-connection.c
@@ -287,18 +287,10 @@ connpy_get_connection_details (PyObject *self, void *closure)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_connection (void)
{
- if (PyType_Ready (&connection_object_type) < 0)
+ if (gdbpy_type_ready (&connection_object_type) < 0)
return -1;
- if (gdb_pymodule_addobject (gdb_module, "TargetConnection",
- (PyObject *) &connection_object_type) < 0)
- return -1;
-
- if (PyType_Ready (&remote_connection_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_module, "RemoteTargetConnection",
- (PyObject *) &remote_connection_object_type) < 0)
+ if (gdbpy_type_ready (&remote_connection_object_type) < 0)
return -1;
return 0;
@@ -431,7 +423,7 @@ connpy_send_packet (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
}
diff --git a/gdb/python/py-disasm.c b/gdb/python/py-disasm.c
index 9b9b509..7b64436 100644
--- a/gdb/python/py-disasm.c
+++ b/gdb/python/py-disasm.c
@@ -595,7 +595,7 @@ disasmpy_builtin_disassemble (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (!str.empty ())
PyErr_SetString (gdbpy_gdberror_exc, str.c_str ());
@@ -933,7 +933,7 @@ disasmpy_result_str (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyUnicode_Decode (str.c_str (), str.size (),
@@ -1512,7 +1512,7 @@ disasmpy_addr_part_str (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyUnicode_Decode (str.c_str (), str.size (),
@@ -1665,45 +1665,23 @@ gdbpy_initialize_disasm ()
}
disasm_info_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&disasm_info_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_disassembler_module, "DisassembleInfo",
- (PyObject *) &disasm_info_object_type) < 0)
+ if (gdbpy_type_ready (&disasm_info_object_type, gdb_disassembler_module) < 0)
return -1;
disasm_result_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&disasm_result_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_disassembler_module, "DisassemblerResult",
- (PyObject *) &disasm_result_object_type) < 0)
+ if (gdbpy_type_ready (&disasm_result_object_type, gdb_disassembler_module) < 0)
return -1;
disasm_part_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&disasm_part_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_disassembler_module, "DisassemblerPart",
- (PyObject *) &disasm_part_object_type) < 0)
+ if (gdbpy_type_ready (&disasm_part_object_type, gdb_disassembler_module) < 0)
return -1;
disasm_addr_part_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&disasm_addr_part_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_disassembler_module,
- "DisassemblerAddressPart",
- (PyObject *) &disasm_addr_part_object_type) < 0)
+ if (gdbpy_type_ready (&disasm_addr_part_object_type, gdb_disassembler_module) < 0)
return -1;
disasm_text_part_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&disasm_text_part_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_disassembler_module,
- "DisassemblerTextPart",
- (PyObject *) &disasm_text_part_object_type) < 0)
+ if (gdbpy_type_ready (&disasm_text_part_object_type, gdb_disassembler_module) < 0)
return -1;
return 0;
diff --git a/gdb/python/py-event.c b/gdb/python/py-event.c
index 47a2997..a918136 100644
--- a/gdb/python/py-event.c
+++ b/gdb/python/py-event.c
@@ -56,25 +56,9 @@ evpy_add_attribute (PyObject *event, const char *name, PyObject *attr)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_event (void)
{
- return gdbpy_initialize_event_generic (&event_object_type,
- "Event");
+ return gdbpy_type_ready (&event_object_type);
}
-/* Initialize the given event type. If BASE is not NULL it will
- be set as the types base.
- Returns 0 if initialization was successful -1 otherwise. */
-
-int
-gdbpy_initialize_event_generic (PyTypeObject *type,
- const char *name)
-{
- if (PyType_Ready (type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, name, (PyObject *) type);
-}
-
-
/* Notify the list of listens that the given EVENT has occurred.
returns 0 if emit is successful -1 otherwise. */
diff --git a/gdb/python/py-event.h b/gdb/python/py-event.h
index 388c513..a723824 100644
--- a/gdb/python/py-event.h
+++ b/gdb/python/py-event.h
@@ -84,7 +84,5 @@ extern void evpy_dealloc (PyObject *self);
extern int evpy_add_attribute (PyObject *event,
const char *name, PyObject *attr)
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
-int gdbpy_initialize_event_generic (PyTypeObject *type, const char *name)
- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
#endif /* PYTHON_PY_EVENT_H */
diff --git a/gdb/python/py-evtregistry.c b/gdb/python/py-evtregistry.c
index 1f486e2..7ae3997 100644
--- a/gdb/python/py-evtregistry.c
+++ b/gdb/python/py-evtregistry.c
@@ -104,11 +104,7 @@ evregpy_dealloc (PyObject *self)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_eventregistry (void)
{
- if (PyType_Ready (&eventregistry_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "EventRegistry",
- (PyObject *) &eventregistry_object_type);
+ return gdbpy_type_ready (&eventregistry_object_type);
}
/* Return the number of listeners currently connected to this
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index ed3c4a5..bc53d4e 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -217,7 +217,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
if (PyErr_Occurred ())
@@ -317,7 +317,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
self_bpfinish->py_bp.bp->frame_id = frame_id;
@@ -439,11 +439,7 @@ gdbpy_initialize_finishbreakpoints (void)
if (!gdbpy_breakpoint_init_breakpoint_type ())
return -1;
- if (PyType_Ready (&finish_breakpoint_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_module, "FinishBreakpoint",
- (PyObject *) &finish_breakpoint_object_type) < 0)
+ if (gdbpy_type_ready (&finish_breakpoint_object_type) < 0)
return -1;
gdb::observers::normal_stop.attach (bpfinishpy_handle_stop,
diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c
index 7f617fa..88646ee 100644
--- a/gdb/python/py-frame.c
+++ b/gdb/python/py-frame.c
@@ -115,7 +115,7 @@ frapy_is_valid (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (frame == NULL)
@@ -143,7 +143,7 @@ frapy_name (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (name)
@@ -177,7 +177,7 @@ frapy_type (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return gdb_py_object_from_longest (type).release ();
@@ -198,7 +198,7 @@ frapy_arch (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return gdbarch_to_arch_object (obj->gdbarch);
@@ -219,7 +219,7 @@ frapy_unwind_stop_reason (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
stop_reason = get_frame_unwind_stop_reason (frame);
@@ -244,7 +244,7 @@ frapy_pc (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return gdb_py_object_from_ulongest (pc).release ();
@@ -286,7 +286,7 @@ frapy_read_register (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -308,7 +308,7 @@ frapy_block (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
for (fn_block = block;
@@ -347,7 +347,7 @@ frapy_function (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (sym)
@@ -389,7 +389,7 @@ frame_info_to_frame_object (const frame_info_ptr &frame)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return (PyObject *) frame_obj.release ();
@@ -413,7 +413,7 @@ frapy_older (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (prev)
@@ -445,7 +445,7 @@ frapy_newer (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (next)
@@ -477,7 +477,7 @@ frapy_find_sal (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return sal_obj;
@@ -537,7 +537,7 @@ frapy_read_var (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (!var)
@@ -567,7 +567,7 @@ frapy_read_var (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -588,7 +588,7 @@ frapy_select (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -609,7 +609,7 @@ frapy_level (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -632,7 +632,7 @@ frapy_language (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -653,7 +653,7 @@ frapy_static_link (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (link == nullptr)
@@ -676,7 +676,7 @@ gdbpy_newest_frame (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return frame_info_to_frame_object (frame);
@@ -696,7 +696,7 @@ gdbpy_selected_frame (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return frame_info_to_frame_object (frame);
@@ -761,7 +761,7 @@ static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_frames (void)
{
frame_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&frame_object_type) < 0)
+ if (gdbpy_type_ready (&frame_object_type) < 0)
return -1;
/* Note: These would probably be best exposed as class attributes of
@@ -785,8 +785,7 @@ gdbpy_initialize_frames (void)
#include "unwind_stop_reasons.def"
#undef SET
- return gdb_pymodule_addobject (gdb_module, "Frame",
- (PyObject *) &frame_object_type);
+ return 0;
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_frames);
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index 9f9032f..daec6dd 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -1007,7 +1007,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
out->text (":");
annotate_frame_source_line ();
- out->field_signed ("line", line);
+ out->field_signed ("line", line, line_number_style.style ());
}
}
if (out->is_mi_like_p ())
diff --git a/gdb/python/py-function.c b/gdb/python/py-function.c
index 2bbfb9d..58ae0d0 100644
--- a/gdb/python/py-function.c
+++ b/gdb/python/py-function.c
@@ -137,11 +137,7 @@ static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_functions (void)
{
fnpy_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&fnpy_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "Function",
- (PyObject *) &fnpy_object_type);
+ return gdbpy_type_ready (&fnpy_object_type);
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_functions);
diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c
index 14a76b4..dd0ee45 100644
--- a/gdb/python/py-gdb-readline.c
+++ b/gdb/python/py-gdb-readline.c
@@ -59,7 +59,7 @@ gdbpy_readline_wrapper (FILE *sys_stdin, FILE *sys_stdout,
/* This readline callback is called without the GIL held. */
gdbpy_gil gil;
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
/* Detect EOF (Ctrl-D). */
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index ccc3e88..60bf56d 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -412,7 +412,7 @@ infpy_threads (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
tuple = PyTuple_New (inf_obj->threads->size ());
@@ -578,7 +578,7 @@ infpy_read_memory (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
@@ -633,7 +633,7 @@ infpy_write_memory (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &ex)
{
- GDB_PY_HANDLE_EXCEPTION (ex);
+ return gdbpy_handle_gdb_exception (nullptr, ex);
}
Py_RETURN_NONE;
@@ -707,7 +707,7 @@ infpy_search_memory (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &ex)
{
- GDB_PY_HANDLE_EXCEPTION (ex);
+ return gdbpy_handle_gdb_exception (nullptr, ex);
}
if (found)
@@ -783,7 +783,7 @@ infpy_thread_from_thread_handle (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -1009,11 +1009,7 @@ gdbpy_selected_inferior (PyObject *self, PyObject *args)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_inferior (void)
{
- if (PyType_Ready (&inferior_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_module, "Inferior",
- (PyObject *) &inferior_object_type) < 0)
+ if (gdbpy_type_ready (&inferior_object_type) < 0)
return -1;
gdb::observers::new_thread.attach (add_thread_object, "py-inferior");
diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c
index a17f25e..4340666 100644
--- a/gdb/python/py-infthread.c
+++ b/gdb/python/py-infthread.c
@@ -104,7 +104,7 @@ thpy_get_details (PyObject *self, void *ignore)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (extra_info == nullptr)
Py_RETURN_NONE;
@@ -212,7 +212,7 @@ thpy_get_ptid_string (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
}
@@ -245,7 +245,7 @@ thpy_switch (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -330,7 +330,7 @@ thpy_thread_handle (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (hv.size () == 0)
@@ -412,11 +412,7 @@ gdbpy_selected_thread (PyObject *self, PyObject *args)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_thread (void)
{
- if (PyType_Ready (&thread_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "InferiorThread",
- (PyObject *) &thread_object_type);
+ return gdbpy_type_ready (&thread_object_type);
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_thread);
diff --git a/gdb/python/py-instruction.c b/gdb/python/py-instruction.c
index bc3945a..7d77572 100644
--- a/gdb/python/py-instruction.c
+++ b/gdb/python/py-instruction.c
@@ -66,7 +66,7 @@ py_insn_get_insn_type ()
py_insn_type.tp_doc = "GDB instruction object";
py_insn_type.tp_getset = py_insn_getset;
- if (PyType_Ready (&py_insn_type) < 0)
+ if (gdbpy_type_ready (&py_insn_type) < 0)
{
/* Reset the tp_new field so any subsequent calls to this
function will retry to make the type ready. */
diff --git a/gdb/python/py-lazy-string.c b/gdb/python/py-lazy-string.c
index 8779716..4898a1f 100644
--- a/gdb/python/py-lazy-string.c
+++ b/gdb/python/py-lazy-string.c
@@ -148,7 +148,7 @@ stpy_convert_to_value (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -236,11 +236,7 @@ gdbpy_create_lazy_string_object (CORE_ADDR address, long length,
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_lazy_string (void)
{
- if (PyType_Ready (&lazy_string_object_type) < 0)
- return -1;
-
- Py_INCREF (&lazy_string_object_type);
- return 0;
+ return gdbpy_type_ready (&lazy_string_object_type);
}
/* Determine whether the printer object pointed to by OBJ is a
@@ -315,7 +311,7 @@ stpy_str (PyObject *self)
}
catch (const gdb_exception &exc)
{
- GDB_PY_HANDLE_EXCEPTION (exc);
+ return gdbpy_handle_gdb_exception (nullptr, exc);
}
return host_string_to_python_string (stream.c_str ()).release ();
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index e3e71f9..fc57f36 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -169,7 +169,7 @@ ltpy_get_pcs_for_line (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return build_line_table_tuple_from_pcs (py_line, pcs);
@@ -287,27 +287,11 @@ ltpy_dealloc (PyObject *self)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_linetable (void)
{
- if (PyType_Ready (&linetable_object_type) < 0)
+ if (gdbpy_type_ready (&linetable_object_type) < 0)
return -1;
- if (PyType_Ready (&linetable_entry_object_type) < 0)
+ if (gdbpy_type_ready (&linetable_entry_object_type) < 0)
return -1;
- if (PyType_Ready (&ltpy_iterator_object_type) < 0)
- return -1;
-
- Py_INCREF (&linetable_object_type);
- Py_INCREF (&linetable_entry_object_type);
- Py_INCREF (&ltpy_iterator_object_type);
-
- if (gdb_pymodule_addobject (gdb_module, "LineTable",
- (PyObject *) &linetable_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_module, "LineTableEntry",
- (PyObject *) &linetable_entry_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_module, "LineTableIterator",
- (PyObject *) &ltpy_iterator_object_type) < 0)
+ if (gdbpy_type_ready (&ltpy_iterator_object_type) < 0)
return -1;
return 0;
diff --git a/gdb/python/py-membuf.c b/gdb/python/py-membuf.c
index af48d01..25ebc99 100644
--- a/gdb/python/py-membuf.c
+++ b/gdb/python/py-membuf.c
@@ -102,11 +102,7 @@ static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_membuf (void)
{
membuf_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&membuf_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "Membuf",
- (PyObject *) &membuf_object_type);
+ return gdbpy_type_ready (&membuf_object_type);
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_membuf);
diff --git a/gdb/python/py-mi.c b/gdb/python/py-mi.c
index 0a63654..f0e28d9 100644
--- a/gdb/python/py-mi.c
+++ b/gdb/python/py-mi.c
@@ -86,7 +86,8 @@ py_ui_out::do_end (ui_out_type type)
void
py_ui_out::do_field_signed (int fldno, int width, ui_align align,
- const char *fldname, LONGEST value)
+ const char *fldname, LONGEST value,
+ const ui_file_style &style)
{
if (m_error.has_value ())
return;
@@ -168,7 +169,7 @@ gdbpy_execute_mi_command (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return uiout.result ().release ();
diff --git a/gdb/python/py-micmd.c b/gdb/python/py-micmd.c
index 54427d4..f4abf2b 100644
--- a/gdb/python/py-micmd.c
+++ b/gdb/python/py-micmd.c
@@ -447,12 +447,7 @@ static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_micommands ()
{
micmdpy_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&micmdpy_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_module, "MICommand",
- (PyObject *) &micmdpy_object_type)
- < 0)
+ if (gdbpy_type_ready (&micmdpy_object_type) < 0)
return -1;
invoke_cst = PyUnicode_FromString ("invoke");
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 6e8d5b5..6ce58a1 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -162,7 +162,7 @@ objfpy_get_build_id (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (build_id != NULL)
@@ -453,7 +453,7 @@ objfpy_add_separate_debug_file (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -488,7 +488,7 @@ objfpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -523,7 +523,7 @@ objfpy_lookup_static_symbol (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -709,11 +709,7 @@ objfile_to_objfile_object (struct objfile *objfile)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_objfile (void)
{
- if (PyType_Ready (&objfile_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "Objfile",
- (PyObject *) &objfile_object_type);
+ return gdbpy_type_ready (&objfile_object_type);
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_objfile);
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c
index e7032f7..9741782 100644
--- a/gdb/python/py-param.c
+++ b/gdb/python/py-param.c
@@ -885,7 +885,7 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
catch (const gdb_exception &except)
{
Py_DECREF (self);
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
return 0;
@@ -909,7 +909,7 @@ gdbpy_initialize_parameters (void)
int i;
parmpy_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&parmpy_object_type) < 0)
+ if (gdbpy_type_ready (&parmpy_object_type) < 0)
return -1;
set_doc_cst = PyUnicode_FromString ("set_doc");
@@ -927,8 +927,7 @@ gdbpy_initialize_parameters (void)
return -1;
}
- return gdb_pymodule_addobject (gdb_module, "Parameter",
- (PyObject *) &parmpy_object_type);
+ return 0;
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_parameters);
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index 368b3a3..e061ea1 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -836,10 +836,7 @@ PyTypeObject printer_object_type =
static int
gdbpy_initialize_prettyprint ()
{
- if (PyType_Ready (&printer_object_type) < 0)
- return -1;
- return gdb_pymodule_addobject (gdb_module, "ValuePrinter",
- (PyObject *) &printer_object_type);
+ return gdbpy_type_ready (&printer_object_type);
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_prettyprint);
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index 5bc0015..aa1e713 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -522,7 +522,7 @@ pspy_block_for_pc (PyObject *o, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (cust == NULL || cust->objfile () == NULL)
@@ -564,7 +564,7 @@ pspy_find_pc_line (PyObject *o, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -747,11 +747,10 @@ gdbpy_initialize_pspace (void)
gdb::observers::free_program_space.attach (gdbpy_free_program_space_event,
"py-progspace");
- if (PyType_Ready (&pspace_object_type) < 0)
+ if (gdbpy_type_ready (&pspace_object_type) < 0)
return -1;
- return gdb_pymodule_addobject (gdb_module, "Progspace",
- (PyObject *) &pspace_object_type);
+ return 0;
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_pspace);
diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c
index 30d0e83..bdfebf1 100644
--- a/gdb/python/py-record-btrace.c
+++ b/gdb/python/py-record-btrace.c
@@ -217,7 +217,7 @@ recpy_bt_insn_sal (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -288,7 +288,7 @@ recpy_bt_insn_data (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
object = PyBytes_FromStringAndSize ((const char *) buffer.data (),
@@ -318,7 +318,7 @@ recpy_bt_insn_decoded (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyBytes_FromString (strfile.string ().c_str ());
@@ -810,7 +810,7 @@ recpy_bt_function_call_history (PyObject *self, void *closure)
/* Helper function that calls PTW_FILTER with PAYLOAD and IP as arguments.
Returns the string that will be printed, if there is a filter to call. */
static std::optional<std::string>
-recpy_call_filter (const uint64_t payload, const uint64_t ip,
+recpy_call_filter (const uint64_t payload, std::optional<uint64_t> ip,
const void *ptw_filter)
{
std::optional<std::string> result;
@@ -824,10 +824,10 @@ recpy_call_filter (const uint64_t payload, const uint64_t ip,
gdbpy_ref<> py_payload = gdb_py_object_from_ulongest (payload);
gdbpy_ref<> py_ip;
- if (ip == 0)
+ if (!ip.has_value ())
py_ip = gdbpy_ref<>::new_reference (Py_None);
else
- py_ip = gdb_py_object_from_ulongest (ip);
+ py_ip = gdb_py_object_from_ulongest (*ip);
gdbpy_ref<> py_result (PyObject_CallFunctionObjArgs ((PyObject *) ptw_filter,
py_payload.get (),
@@ -943,7 +943,7 @@ recpy_bt_goto (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -1006,7 +1006,7 @@ gdbpy_initialize_btrace (void)
btpy_list_mapping_methods.mp_subscript = btpy_list_slice;
- return PyType_Ready (&btpy_list_type);
+ return gdbpy_type_ready (&btpy_list_type);
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_btrace);
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c
index 759bf30..2995dc1 100644
--- a/gdb/python/py-record.c
+++ b/gdb/python/py-record.c
@@ -653,11 +653,11 @@ gdbpy_initialize_record (void)
recpy_aux_type.tp_richcompare = recpy_element_richcompare;
recpy_aux_type.tp_hash = recpy_element_hash;
- if (PyType_Ready (&recpy_record_type) < 0
- || PyType_Ready (&recpy_insn_type) < 0
- || PyType_Ready (&recpy_func_type) < 0
- || PyType_Ready (&recpy_gap_type) < 0
- || PyType_Ready (&recpy_aux_type) < 0)
+ if (gdbpy_type_ready (&recpy_record_type) < 0
+ || gdbpy_type_ready (&recpy_insn_type) < 0
+ || gdbpy_type_ready (&recpy_func_type) < 0
+ || gdbpy_type_ready (&recpy_gap_type) < 0
+ || gdbpy_type_ready (&recpy_aux_type) < 0)
return -1;
else
return 0;
@@ -681,7 +681,7 @@ gdbpy_start_recording (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
}
@@ -713,7 +713,7 @@ gdbpy_stop_recording (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
diff --git a/gdb/python/py-registers.c b/gdb/python/py-registers.c
index f03274c..229dd62 100644
--- a/gdb/python/py-registers.c
+++ b/gdb/python/py-registers.c
@@ -430,35 +430,22 @@ static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_registers ()
{
register_descriptor_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&register_descriptor_object_type) < 0)
- return -1;
- if (gdb_pymodule_addobject
- (gdb_module, "RegisterDescriptor",
- (PyObject *) &register_descriptor_object_type) < 0)
+ if (gdbpy_type_ready (&register_descriptor_object_type) < 0)
return -1;
reggroup_iterator_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&reggroup_iterator_object_type) < 0)
- return -1;
- if (gdb_pymodule_addobject
- (gdb_module, "RegisterGroupsIterator",
- (PyObject *) &reggroup_iterator_object_type) < 0)
+ if (gdbpy_type_ready (&reggroup_iterator_object_type) < 0)
return -1;
reggroup_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&reggroup_object_type) < 0)
- return -1;
- if (gdb_pymodule_addobject
- (gdb_module, "RegisterGroup",
- (PyObject *) &reggroup_object_type) < 0)
+ if (gdbpy_type_ready (&reggroup_object_type) < 0)
return -1;
register_descriptor_iterator_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&register_descriptor_iterator_object_type) < 0)
+ if (gdbpy_type_ready (&register_descriptor_iterator_object_type) < 0)
return -1;
- return (gdb_pymodule_addobject
- (gdb_module, "RegisterDescriptorIterator",
- (PyObject *) &register_descriptor_iterator_object_type));
+
+ return 0;
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_registers);
diff --git a/gdb/python/py-stopevent.c b/gdb/python/py-stopevent.c
index 47f81bd..485bbb1 100644
--- a/gdb/python/py-stopevent.c
+++ b/gdb/python/py-stopevent.c
@@ -74,7 +74,7 @@ py_print_bpstat (bpstat *bs, enum gdb_signal stop_signal)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
gdbpy_ref<> dict = uiout.result ();
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 754420f..24b53bb 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -222,7 +222,7 @@ sympy_needs_frame (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (result)
@@ -307,7 +307,7 @@ sympy_value (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -425,7 +425,7 @@ gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
}
@@ -436,7 +436,7 @@ gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
gdbpy_ref<> ret_tuple (PyTuple_New (2));
@@ -485,7 +485,7 @@ gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (symbol)
@@ -553,7 +553,7 @@ gdbpy_lookup_static_symbol (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (symbol)
@@ -631,7 +631,7 @@ gdbpy_lookup_static_symbols (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return return_list.release ();
@@ -640,7 +640,7 @@ gdbpy_lookup_static_symbols (PyObject *self, PyObject *args, PyObject *kw)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_symbols (void)
{
- if (PyType_Ready (&symbol_object_type) < 0)
+ if (gdbpy_type_ready (&symbol_object_type) < 0)
return -1;
if (PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_UNDEF", LOC_UNDEF) < 0
@@ -685,8 +685,7 @@ gdbpy_initialize_symbols (void)
#include "sym-domains.def"
#undef SYM_DOMAIN
- return gdb_pymodule_addobject (gdb_module, "Symbol",
- (PyObject *) &symbol_object_type);
+ return 0;
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_symbols);
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index 7290b85..99a5094 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -512,19 +512,14 @@ static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_symtabs (void)
{
symtab_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&symtab_object_type) < 0)
+ if (gdbpy_type_ready (&symtab_object_type) < 0)
return -1;
sal_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&sal_object_type) < 0)
+ if (gdbpy_type_ready (&sal_object_type) < 0)
return -1;
- if (gdb_pymodule_addobject (gdb_module, "Symtab",
- (PyObject *) &symtab_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "Symtab_and_line",
- (PyObject *) &sal_object_type);
+ return 0;
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_symtabs);
diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c
index 8ad2b7d..afa6f36 100644
--- a/gdb/python/py-tui.c
+++ b/gdb/python/py-tui.c
@@ -425,7 +425,7 @@ gdbpy_register_tui_window (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -625,7 +625,7 @@ gdbpy_initialize_tui ()
{
#ifdef TUI
gdbpy_tui_window_object_type.tp_new = PyType_GenericNew;
- if (PyType_Ready (&gdbpy_tui_window_object_type) < 0)
+ if (gdbpy_type_ready (&gdbpy_tui_window_object_type) < 0)
return -1;
#endif /* TUI */
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index c13b861..284960a 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -292,7 +292,7 @@ typy_fields_items (PyObject *self, enum gdbpy_iter_kind kind)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
gdbpy_ref<> type_holder;
@@ -456,7 +456,7 @@ typy_is_array_like (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (result)
@@ -480,7 +480,7 @@ typy_is_string_like (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (result)
@@ -501,7 +501,7 @@ typy_strip_typedefs (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return type_to_type_object (type);
@@ -522,7 +522,7 @@ typy_get_composite (struct type *type)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (!type->is_pointer_or_reference ())
@@ -592,7 +592,7 @@ typy_array_1 (PyObject *self, PyObject *args, int is_vector)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return type_to_type_object (array);
@@ -626,7 +626,7 @@ typy_pointer (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return type_to_type_object (type);
@@ -698,7 +698,7 @@ typy_reference (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return type_to_type_object (type);
@@ -732,7 +732,7 @@ typy_const (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return type_to_type_object (type);
@@ -750,7 +750,7 @@ typy_volatile (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return type_to_type_object (type);
@@ -768,7 +768,7 @@ typy_unqualified (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return type_to_type_object (type);
@@ -859,7 +859,7 @@ typy_lookup_typename (const char *type_name, const struct block *block)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return type;
@@ -913,7 +913,7 @@ typy_lookup_type (struct demangle_component *demangled,
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
}
@@ -955,7 +955,7 @@ typy_legacy_template_argument (struct type *type, const struct block *block,
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (! info)
@@ -1034,7 +1034,7 @@ typy_template_argument (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
/* We might not have DW_TAG_template_*, so try to parse the type's
@@ -1069,7 +1069,7 @@ typy_template_argument (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -1093,7 +1093,7 @@ typy_repr (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
auto py_typename = PyUnicode_Decode (type_name.c_str (), type_name.size (),
host_charset (), NULL);
@@ -1115,7 +1115,7 @@ typy_str (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyUnicode_Decode (thetype.c_str (), thetype.size (),
@@ -1151,7 +1151,7 @@ typy_richcompare (PyObject *self, PyObject *other, int op)
{
/* If there is a GDB exception, a comparison is not capable
(or trusted), so exit. */
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
}
@@ -1471,7 +1471,7 @@ type_to_type_object (struct type *type)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
type_obj = PyObject_New (type_object, &type_object_type);
@@ -1526,11 +1526,11 @@ gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_types (void)
{
- if (PyType_Ready (&type_object_type) < 0)
+ if (gdbpy_type_ready (&type_object_type) < 0)
return -1;
- if (PyType_Ready (&field_object_type) < 0)
+ if (gdbpy_type_ready (&field_object_type) < 0)
return -1;
- if (PyType_Ready (&type_iterator_object_type) < 0)
+ if (gdbpy_type_ready (&type_iterator_object_type) < 0)
return -1;
for (const auto &item : pyty_codes)
@@ -1539,16 +1539,7 @@ gdbpy_initialize_types (void)
return -1;
}
- if (gdb_pymodule_addobject (gdb_module, "Type",
- (PyObject *) &type_object_type) < 0)
- return -1;
-
- if (gdb_pymodule_addobject (gdb_module, "TypeIterator",
- (PyObject *) &type_iterator_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "Field",
- (PyObject *) &field_object_type);
+ return 0;
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_types);
diff --git a/gdb/python/py-uiout.h b/gdb/python/py-uiout.h
index a2fc90e..5f8c530 100644
--- a/gdb/python/py-uiout.h
+++ b/gdb/python/py-uiout.h
@@ -86,7 +86,8 @@ protected:
void do_end (ui_out_type type) override;
void do_field_signed (int fldno, int width, ui_align align,
- const char *fldname, LONGEST value) override;
+ const char *fldname, LONGEST value,
+ const ui_file_style &style) override;
void do_field_unsigned (int fldno, int width, ui_align align,
const char *fldname, ULONGEST value) override;
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index e36768e..68deaf9 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -228,7 +228,7 @@ unwind_infopy_str (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
}
else
@@ -378,7 +378,7 @@ unwind_infopy_add_saved_register (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
gdbpy_ref<> new_value = gdbpy_ref<>::new_reference (pyo_reg_value);
@@ -429,7 +429,7 @@ pending_framepy_str (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyUnicode_FromFormat ("SP=%s,PC=%s", sp_str, pc_str);
@@ -456,7 +456,7 @@ pending_framepy_repr (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyUnicode_FromFormat ("<%s level=%d, sp=%s, pc=%s>",
@@ -505,7 +505,7 @@ pending_framepy_read_register (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -546,7 +546,7 @@ pending_framepy_name (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (name != nullptr)
@@ -574,7 +574,7 @@ pending_framepy_pc (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return gdb_py_object_from_ulongest (pc).release ();
@@ -601,7 +601,7 @@ pending_framepy_language (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -628,7 +628,7 @@ pending_framepy_find_sal (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return sal_obj;
@@ -653,7 +653,7 @@ pending_framepy_block (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
for (fn_block = block;
@@ -696,7 +696,7 @@ pending_framepy_function (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (sym != nullptr)
@@ -1002,17 +1002,13 @@ gdbpy_initialize_unwind (void)
{
gdb::observers::new_architecture.attach (pyuw_on_new_gdbarch, "py-unwind");
- if (PyType_Ready (&pending_frame_object_type) < 0)
+ if (gdbpy_type_ready (&pending_frame_object_type) < 0)
return -1;
- int rc = gdb_pymodule_addobject (gdb_module, "PendingFrame",
- (PyObject *) &pending_frame_object_type);
- if (rc != 0)
- return rc;
- if (PyType_Ready (&unwind_info_object_type) < 0)
+ if (gdbpy_type_ready (&unwind_info_object_type) < 0)
return -1;
- return gdb_pymodule_addobject (gdb_module, "UnwindInfo",
- (PyObject *) &unwind_info_object_type);
+
+ return 0;
}
void _initialize_py_unwind ();
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c
index 47f65f4..0bc18a6 100644
--- a/gdb/python/py-utils.c
+++ b/gdb/python/py-utils.c
@@ -247,7 +247,7 @@ get_addr_from_python (PyObject *obj, CORE_ADDR *addr)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
}
else
@@ -390,6 +390,35 @@ gdbpy_handle_exception ()
if (fetched_error.type_matches (PyExc_KeyboardInterrupt))
throw_quit ("Quit");
+ else if (fetched_error.type_matches (PyExc_SystemExit))
+ {
+ gdbpy_ref<> value = fetched_error.value ();
+ gdbpy_ref<> code (PyObject_GetAttrString (value.get (), "code"));
+ int exit_arg;
+
+ if (code.get () == Py_None)
+ {
+ /* CODE == None: exit status is 0. */
+ exit_arg = 0;
+ }
+ else if (code.get () != nullptr && PyLong_Check (code.get ()))
+ {
+ /* CODE == integer: exit status is aforementioned integer. */
+ exit_arg = PyLong_AsLong (code.get ());
+ }
+ else
+ {
+ if (code.get () == nullptr)
+ gdbpy_print_stack ();
+
+ /* Otherwise: exit status is 1, print code to stderr. */
+ if (msg != nullptr)
+ gdb_printf (gdb_stderr, "%s\n", msg.get ());
+ exit_arg = 1;
+ }
+
+ quit_force (&exit_arg, 0);
+ }
else if (! fetched_error.type_matches (gdbpy_gdberror_exc)
|| msg == NULL || *msg == '\0')
{
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 37d5716..119bf9f 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -257,7 +257,7 @@ valpy_dereference (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -300,7 +300,7 @@ valpy_referenced_value (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -323,7 +323,7 @@ valpy_reference_value (PyObject *self, PyObject *args, enum type_code refcode)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -369,7 +369,7 @@ valpy_to_array (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -393,7 +393,7 @@ valpy_const_value (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -499,7 +499,7 @@ valpy_get_dynamic_type (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (type == NULL)
@@ -605,7 +605,7 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return str_obj;
@@ -640,7 +640,7 @@ valpy_string (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
encoding = (user_encoding && *user_encoding) ? user_encoding : la_encoding;
@@ -824,7 +824,7 @@ valpy_format_string (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyUnicode_Decode (stb.c_str (), stb.size (), host_charset (), NULL);
@@ -869,7 +869,7 @@ valpy_do_cast (PyObject *self, PyObject *args, enum exp_opcode op)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -921,8 +921,7 @@ valpy_assign_core (value_object *self, struct value *new_value)
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return false;
+ return gdbpy_handle_gdb_exception (false, except);
}
return true;
@@ -997,7 +996,7 @@ value_has_field (struct value *v, PyObject *field)
}
catch (const gdb_exception &except)
{
- GDB_PY_SET_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (-1, except);
}
return has_field;
@@ -1180,7 +1179,7 @@ valpy_getitem (PyObject *self, PyObject *key)
}
catch (const gdb_exception &ex)
{
- GDB_PY_HANDLE_EXCEPTION (ex);
+ return gdbpy_handle_gdb_exception (nullptr, ex);
}
return result;
@@ -1211,7 +1210,7 @@ valpy_call (PyObject *self, PyObject *args, PyObject *keywords)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (ftype->code () != TYPE_CODE_FUNC && ftype->code () != TYPE_CODE_METHOD
@@ -1268,7 +1267,7 @@ valpy_call (PyObject *self, PyObject *args, PyObject *keywords)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -1293,7 +1292,7 @@ valpy_str (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyUnicode_Decode (stb.c_str (), stb.size (), host_charset (), NULL);
@@ -1312,7 +1311,7 @@ valpy_get_is_optimized_out (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (opt)
@@ -1334,7 +1333,7 @@ valpy_get_is_lazy (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (opt)
@@ -1364,7 +1363,7 @@ valpy_get_bytes (PyObject *self, void *closure)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
value_obj->content_bytes
@@ -1408,7 +1407,7 @@ valpy_fetch_lazy (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -1579,7 +1578,7 @@ valpy_binop (enum valpy_opcode opcode, PyObject *self, PyObject *other)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -1647,7 +1646,7 @@ valpy_negative (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -1674,7 +1673,7 @@ valpy_absolute (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (isabs)
@@ -1709,7 +1708,7 @@ valpy_nonzero (PyObject *self)
/* This is not documented in the Python documentation, but if
this function fails, return -1 as slot_nb_nonzero does (the
default Python nonzero function). */
- GDB_PY_SET_HANDLE_EXCEPTION (ex);
+ return gdbpy_handle_gdb_exception (-1, ex);
}
return nonzero;
@@ -1729,7 +1728,7 @@ valpy_invert (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -1856,7 +1855,7 @@ valpy_richcompare (PyObject *self, PyObject *other, int op)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
/* In this case, the Python exception has already been set. */
@@ -1895,7 +1894,7 @@ valpy_long (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (type->is_unsigned ())
@@ -1930,7 +1929,7 @@ valpy_float (PyObject *self)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return PyFloat_FromDouble (d);
@@ -2056,7 +2055,7 @@ convert_value_from_python (PyObject *obj)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return value;
@@ -2080,7 +2079,7 @@ gdbpy_history (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -2107,7 +2106,7 @@ gdbpy_add_history (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return nullptr;
@@ -2152,7 +2151,7 @@ gdbpy_convenience_variable (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (result == nullptr && !found)
@@ -2198,7 +2197,7 @@ gdbpy_set_convenience_variable (PyObject *self, PyObject *args)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -2215,11 +2214,7 @@ gdbpy_is_value_object (PyObject *obj)
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
gdbpy_initialize_values (void)
{
- if (PyType_Ready (&value_object_type) < 0)
- return -1;
-
- return gdb_pymodule_addobject (gdb_module, "Value",
- (PyObject *) &value_object_type);
+ return gdbpy_type_ready (&value_object_type);
}
GDBPY_INITIALIZE_FILE (gdbpy_initialize_values);
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index bf3ab67..d723c4d 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -932,22 +932,6 @@ private:
PyGILState_STATE m_state;
};
-/* Use this in a 'catch' block to convert the exception to a Python
- exception and return nullptr. */
-#define GDB_PY_HANDLE_EXCEPTION(Exception) \
- do { \
- gdbpy_convert_exception (Exception); \
- return nullptr; \
- } while (0)
-
-/* Use this in a 'catch' block to convert the exception to a Python
- exception and return -1. */
-#define GDB_PY_SET_HANDLE_EXCEPTION(Exception) \
- do { \
- gdbpy_convert_exception (Exception); \
- return -1; \
- } while (0)
-
int gdbpy_print_python_errors_p (void);
void gdbpy_print_stack (void);
void gdbpy_print_stack_or_quit ();
@@ -1013,6 +997,18 @@ extern PyObject *gdbpy_gdberror_exc;
extern void gdbpy_convert_exception (const struct gdb_exception &)
CPYCHECKER_SETS_EXCEPTION;
+ /* Use this in a 'catch' block to convert the exception E to a Python
+ exception and return value VAL to signal that an exception occurred.
+ Typically at the use site, that value will be returned immediately. */
+
+template<typename T>
+[[nodiscard]] T
+gdbpy_handle_gdb_exception (T val, const gdb_exception &e)
+{
+ gdbpy_convert_exception (e);
+ return val;
+}
+
int get_addr_from_python (PyObject *obj, CORE_ADDR *addr)
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
@@ -1119,4 +1115,34 @@ extern std::optional<int> gdbpy_print_insn (struct gdbarch *gdbarch,
CORE_ADDR address,
disassemble_info *info);
+/* A wrapper for PyType_Ready that also automatically registers the
+ type in the appropriate module. Returns 0 on success, -1 on error.
+ If MOD is supplied, then the type is added to that module. If MOD
+ is not supplied, the type name (tp_name field) must be of the form
+ "gdb.Mumble", and the type will be added to the gdb module. */
+
+static inline int
+gdbpy_type_ready (PyTypeObject *type, PyObject *mod = nullptr)
+{
+ if (PyType_Ready (type) < 0)
+ return -1;
+ if (mod == nullptr)
+ {
+ gdb_assert (startswith (type->tp_name, "gdb."));
+ mod = gdb_module;
+ }
+ const char *dot = strrchr (type->tp_name, '.');
+ gdb_assert (dot != nullptr);
+ return gdb_pymodule_addobject (mod, dot + 1, (PyObject *) type);
+}
+
+/* Poison PyType_Ready. Only gdbpy_type_ready should be used, to
+ avoid forgetting to register the type. See PR python/32163. */
+#undef PyType_Ready
+#ifdef __GNUC__
+# pragma GCC poison PyType_Ready
+#else
+# define PyType_Ready POISONED_PyType_Ready
+#endif
+
#endif /* PYTHON_PYTHON_INTERNAL_H */
diff --git a/gdb/python/python.c b/gdb/python/python.c
index a2ce1f6..cc06526 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -593,7 +593,7 @@ gdbpy_parameter (PyObject *self, PyObject *args)
}
catch (const gdb_exception &ex)
{
- GDB_PY_HANDLE_EXCEPTION (ex);
+ return gdbpy_handle_gdb_exception (nullptr, ex);
}
if (cmd == CMD_LIST_AMBIGUOUS)
@@ -756,7 +756,7 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
convert the exception and continue back in Python, we should
re-enable stdin here. */
async_enable_stdin ();
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
if (to_string)
@@ -972,7 +972,7 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
catch (const gdb_exception &ex)
{
/* We know this will always throw. */
- GDB_PY_HANDLE_EXCEPTION (ex);
+ return gdbpy_handle_gdb_exception (nullptr, ex);
}
if (!sals.empty ())
@@ -1053,7 +1053,7 @@ gdbpy_parse_and_eval (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
return result;
@@ -1538,7 +1538,7 @@ gdbpy_write (PyObject *self, PyObject *args, PyObject *kw)
}
catch (const gdb_exception &except)
{
- GDB_PY_HANDLE_EXCEPTION (except);
+ return gdbpy_handle_gdb_exception (nullptr, except);
}
Py_RETURN_NONE;
@@ -2316,7 +2316,7 @@ init_done:
return false;
#define GDB_PY_DEFINE_EVENT_TYPE(name, py_name, doc, base) \
- if (gdbpy_initialize_event_generic (&name##_event_object_type, py_name) < 0) \
+ if (gdbpy_type_ready (&name##_event_object_type) < 0) \
return false;
#include "py-event-types.def"
#undef GDB_PY_DEFINE_EVENT_TYPE
diff --git a/gdb/quick-symbol.h b/gdb/quick-symbol.h
index d6de734..0d76e18 100644
--- a/gdb/quick-symbol.h
+++ b/gdb/quick-symbol.h
@@ -47,6 +47,11 @@ typedef bool (expand_symtabs_file_matcher_ftype) (const char *filename,
typedef bool (expand_symtabs_symbol_matcher_ftype) (const char *name);
/* Callback for quick_symbol_functions->expand_symtabs_matching
+ to match a language. */
+
+typedef bool (expand_symtabs_lang_matcher_ftype) (enum language lang);
+
+/* Callback for quick_symbol_functions->expand_symtabs_matching
to be called after a symtab has been expanded. If this returns
true, more symtabs are checked; if it returns false, iteration
stops. */
@@ -122,6 +127,10 @@ struct quick_symbol_functions
/* Expand all symbol tables in OBJFILE matching some criteria.
+ If LANG_MATCHER returns false, expansion of the symbol table may be
+ skipped. It may also not be skipped, which the caller needs to take into
+ account.
+
FILE_MATCHER is called for each file in OBJFILE. The file name
is passed to it. If the matcher returns false, the file is
skipped. If FILE_MATCHER is NULL the file is not skipped. If
@@ -154,7 +163,9 @@ struct quick_symbol_functions
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain) = 0;
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher
+ = nullptr) = 0;
/* Return the comp unit from OBJFILE that contains PC and
SECTION. Return NULL if there is no such compunit. This
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 997f442..8fcf638 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -3180,6 +3180,36 @@ show_record_pt_buffer_size_value (struct ui_file *file, int from_tty,
value);
}
+
+static bool event_tracing = false;
+
+/* The "record pt event-tracing" show value function. */
+
+static void
+show_record_pt_event_tracing_value (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c,
+ const char *value)
+{
+#if (LIBIPT_VERSION >= 0x201)
+ gdb_printf (file, _("record pt event-tracing is %s.\n"), value);
+#else
+ gdb_printf (_("Event-tracing is not supported by GDB.\n"));
+#endif /* defined (LIBIPT_VERSION >= 0x201) */
+}
+
+/* The "record pt event-tracing" set value function. */
+
+static void
+set_record_pt_event_tracing_value (const char *args, int from_tty,
+ cmd_list_element *c)
+{
+#if (LIBIPT_VERSION >= 0x201)
+ record_btrace_conf.pt.event_tracing = event_tracing;
+#else
+ gdb_printf (_("Event-tracing is not supported by GDB.\n"));
+#endif /* defined (LIBIPT_VERSION >= 0x201) */
+}
+
/* Initialize btrace commands. */
void _initialize_record_btrace ();
@@ -3299,6 +3329,19 @@ to see the actual buffer size."), NULL, show_record_pt_buffer_size_value,
&set_record_btrace_pt_cmdlist,
&show_record_btrace_pt_cmdlist);
+ add_setshow_boolean_cmd ("event-tracing", no_class, &event_tracing,
+ _("Set event-tracing for record pt."),
+ _("Show event-tracing for record pt."),
+ _("\
+Use \"on\" to enable event tracing for recordings with Intel Processor Trace, \
+and \"off\" to disable it.\n\
+Without an argument, event tracing is enabled. Changing this setting has no\
+effect on an active recording."),
+ set_record_pt_event_tracing_value,
+ show_record_pt_event_tracing_value,
+ &set_record_btrace_pt_cmdlist,
+ &show_record_btrace_pt_cmdlist);
+
add_target (record_btrace_target_info, record_btrace_target_open);
bfcache = htab_create_alloc (50, bfcache_hash, bfcache_eq, NULL,
@@ -3311,4 +3354,5 @@ to see the actual buffer size."), NULL, show_record_pt_buffer_size_value,
#else
record_btrace_conf.pt.ptwrite = false;
#endif
+ record_btrace_conf.pt.event_tracing = false;
}
diff --git a/gdb/regcache-dump.c b/gdb/regcache-dump.c
index bc665dc..6b711bf 100644
--- a/gdb/regcache-dump.c
+++ b/gdb/regcache-dump.c
@@ -162,7 +162,7 @@ protected:
{
if (regnum < 0)
{
- gdb_printf (file, "Rmt Nr g/G Offset");
+ gdb_printf (file, "Rmt Nr g/G Offset Expedited");
}
else if (regnum < gdbarch_num_regs (m_gdbarch))
{
@@ -170,7 +170,12 @@ protected:
if (remote_register_number_and_offset (m_gdbarch, regnum,
&pnum, &poffset))
- gdb_printf (file, "%7d %11d", pnum, poffset);
+ {
+ if (remote_register_is_expedited (regnum))
+ gdb_printf (file, "%7d %11d yes", pnum, poffset);
+ else
+ gdb_printf (file, "%7d %11d", pnum, poffset);
+ }
}
}
};
@@ -324,9 +329,11 @@ _initialize_regcache_dump ()
"Takes an optional file parameter."),
&maintenanceprintlist);
add_cmd ("remote-registers", class_maintenance,
- maintenance_print_remote_registers, _("\
-Print the internal register configuration including remote register number "
-"and g/G packets offset.\n\
-Takes an optional file parameter."),
+ maintenance_print_remote_registers,
+ _("Print the internal register configuration including remote "
+ "register number and g/G packets offset.\n"
+ "Also prints which registers were sent in the last stop reply "
+ "packet (i.e. expedited).\n"
+ "Takes an optional file parameter."),
&maintenanceprintlist);
}
diff --git a/gdb/remote.c b/gdb/remote.c
index 2c3988c..5323491 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -364,6 +364,9 @@ enum {
/* Support for the Qbtrace-conf:pt:ptwrite packet. */
PACKET_Qbtrace_conf_pt_ptwrite,
+ /* Support for the Qbtrace-conf:pt:event-tracing packet. */
+ PACKET_Qbtrace_conf_pt_event_tracing,
+
/* Support for exec events. */
PACKET_exec_event_feature,
@@ -682,7 +685,7 @@ public: /* data */
/* FIXME: cagney/1999-09-23: Even though getpkt was called with
``forever'' still use the normal timeout mechanism. This is
- currently used by the ASYNC code to guarentee that target reads
+ currently used by the ASYNC code to guarantee that target reads
during the initial connect always time-out. Once getpkt has been
modified to return a timeout indication and, in turn
remote_wait()/wait_for_inferior() have gained a timeout parameter
@@ -693,6 +696,10 @@ public: /* data */
qSupported. */
gdb_thread_options supported_thread_options = 0;
+ /* Contains the regnums of the expedited registers in the last stop
+ reply packet. */
+ std::set<int> last_seen_expedited_registers;
+
private:
/* Asynchronous signal handle registered as event loop source for
when we have pending events ready to be passed to the core. */
@@ -1490,6 +1497,20 @@ is_remote_target (process_stratum_target *target)
return as_remote_target (target) != nullptr;
}
+/* See remote.h. */
+
+bool
+remote_register_is_expedited (int regnum)
+{
+ remote_target *rt = as_remote_target (current_inferior ()->process_target ());
+
+ if (rt == nullptr)
+ return false;
+
+ remote_state *rs = rt->get_remote_state ();
+ return rs->last_seen_expedited_registers.count (regnum) > 0;
+}
+
/* Per-program-space data key. */
static const registry<program_space>::key<char, gdb::xfree_deleter<char>>
remote_pspace_data;
@@ -3911,7 +3932,7 @@ remote_target::remote_get_threadlist (int startflag, threadref *nextthread,
/* FIXME: This is a good reason to drop the packet. */
/* Possibly, there is a duplicate response. */
/* Possibilities :
- retransmit immediatly - race conditions
+ retransmit immediately - race conditions
retransmit after timeout - yes
exit
wait for packet, then exit
@@ -5815,6 +5836,8 @@ static const struct protocol_feature remote_protocol_features[] = {
PACKET_Qbtrace_conf_pt_size },
{ "Qbtrace-conf:pt:ptwrite", PACKET_DISABLE, remote_supported_packet,
PACKET_Qbtrace_conf_pt_ptwrite },
+ { "Qbtrace-conf:pt:event-tracing", PACKET_DISABLE, remote_supported_packet,
+ PACKET_Qbtrace_conf_pt_event_tracing },
{ "vContSupported", PACKET_DISABLE, remote_supported_packet, PACKET_vContSupported },
{ "QThreadEvents", PACKET_DISABLE, remote_supported_packet, PACKET_QThreadEvents },
{ "QThreadOptions", PACKET_DISABLE, remote_supported_thread_options,
@@ -6269,7 +6292,7 @@ remote_target::open_1 (const char *name, int from_tty, int extended_p)
/* Start the remote connection. If error() or QUIT, discard this
target (we'd otherwise be in an inconsistent state) and then
- propogate the error on up the exception chain. This ensures that
+ propagate the error on up the exception chain. This ensures that
the caller doesn't stumble along blindly assuming that the
function succeeded. The CLI doesn't have this problem but other
UI's, such as MI do.
@@ -8518,6 +8541,10 @@ remote_target::process_stop_reply (stop_reply_up stop_reply,
{
*status = stop_reply->ws;
ptid_t ptid = stop_reply->ptid;
+ struct remote_state *rs = get_remote_state ();
+
+ /* Forget about last reply's expedited registers. */
+ rs->last_seen_expedited_registers.clear ();
/* If no thread/process was reported by the stub then select a suitable
thread/process. */
@@ -8544,7 +8571,10 @@ remote_target::process_stop_reply (stop_reply_up stop_reply,
stop_reply->arch);
for (cached_reg_t &reg : stop_reply->regcache)
- regcache->raw_supply (reg.num, reg.data.get ());
+ {
+ regcache->raw_supply (reg.num, reg.data.get ());
+ rs->last_seen_expedited_registers.insert (reg.num);
+ }
}
remote_thread_info *remote_thr = get_remote_thread_info (this, ptid);
@@ -13237,6 +13267,18 @@ public:
fileio_error remote_errno;
m_remote->remote_hostio_close (m_fd, &remote_errno);
}
+ catch (const gdb_exception_quit &ex)
+ {
+ /* We can't throw from a destructor, so re-set the quit flag
+ for later QUIT checking. */
+ set_quit_flag ();
+ }
+ catch (const gdb_exception_forced_quit &ex)
+ {
+ /* Like above, but (eventually) cause GDB to terminate by
+ setting sync_quit_force_run. */
+ set_force_quit_flag ();
+ }
catch (...)
{
/* Swallow exception before it escapes the dtor. If
@@ -14741,7 +14783,7 @@ parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser,
std::vector<gdb_xml_value> &attributes)
{
struct btrace_config *conf;
- struct gdb_xml_value *size, *ptwrite;
+ struct gdb_xml_value *size, *ptwrite, *event_tracing;
conf = (struct btrace_config *) user_data;
conf->format = BTRACE_FORMAT_PT;
@@ -14754,12 +14796,18 @@ parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser,
ptwrite = xml_find_attribute (attributes, "ptwrite");
if (ptwrite != nullptr)
conf->pt.ptwrite = (bool) *(ULONGEST *) ptwrite->value.get ();
+
+ event_tracing = xml_find_attribute (attributes, "event-tracing");
+ if (event_tracing != nullptr)
+ conf->pt.event_tracing = (bool) *(ULONGEST *) event_tracing->value.get ();
}
static const struct gdb_xml_attribute btrace_conf_pt_attributes[] = {
{ "size", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_ulongest, NULL },
{ "ptwrite", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_enum,
gdb_xml_enums_boolean },
+ { "event-tracing", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_enum,
+ gdb_xml_enums_boolean },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
};
@@ -14891,6 +14939,39 @@ remote_target::btrace_sync_conf (const btrace_config *conf)
rs->btrace_config.pt.ptwrite = conf->pt.ptwrite;
}
+
+ /* Event tracing is a user setting, warn if it is set but the target
+ doesn't support it. */
+ if ((m_features.packet_support (PACKET_Qbtrace_conf_pt_event_tracing)
+ != PACKET_ENABLE)
+ && conf->pt.event_tracing)
+ warning (_("Target does not support event-tracing."));
+
+ if ((m_features.packet_support (PACKET_Qbtrace_conf_pt_event_tracing)
+ == PACKET_ENABLE)
+ && conf->pt.event_tracing != rs->btrace_config.pt.event_tracing)
+ {
+ pos = buf;
+ const char *event_tracing = conf->pt.event_tracing ? "yes" : "no";
+ const char *name
+ = packets_descriptions[PACKET_Qbtrace_conf_pt_event_tracing].name;
+ pos += xsnprintf (pos, endbuf - pos, "%s=\"%s\"", name, event_tracing);
+
+ putpkt (buf);
+ getpkt (&rs->buf, 0);
+
+ packet_result result
+ = m_features.packet_ok (buf, PACKET_Qbtrace_conf_pt_event_tracing);
+ if (result.status () == PACKET_ERROR)
+ {
+ if (buf[0] == 'E' && buf[1] == '.')
+ error (_("Failed to sync event-tracing config: %s"), buf + 2);
+ else
+ error (_("Failed to sync event-tracing config."));
+ }
+
+ rs->btrace_config.pt.event_tracing = conf->pt.event_tracing;
+ }
}
/* Read TP's btrace configuration from the target and store it into CONF. */
@@ -15246,7 +15327,7 @@ static serial_event_ftype remote_async_serial_handler;
static void
remote_async_serial_handler (struct serial *scb, void *context)
{
- /* Don't propogate error information up to the client. Instead let
+ /* Don't propagate error information up to the client. Instead let
the client find out about the error by querying the target. */
inferior_event_handler (INF_REG_EVENT);
}
@@ -16348,6 +16429,10 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL,
add_packet_config_cmd (PACKET_Qbtrace_conf_pt_ptwrite, "Qbtrace-conf:pt:ptwrite",
"btrace-conf-pt-ptwrite", 0);
+ add_packet_config_cmd (PACKET_Qbtrace_conf_pt_event_tracing,
+ "Qbtrace-conf:pt:event-tracing",
+ "btrace-conf-pt-event-tracing", 0);
+
add_packet_config_cmd (PACKET_vContSupported, "vContSupported",
"verbose-resume-supported", 0);
diff --git a/gdb/remote.h b/gdb/remote.h
index cb0a66d..bfe3c65 100644
--- a/gdb/remote.h
+++ b/gdb/remote.h
@@ -121,4 +121,9 @@ extern void send_remote_packet (gdb::array_view<const char> &buf,
extern bool is_remote_target (process_stratum_target *target);
+/* Return true if REGNUM was returned as an expedited register in the last
+ stop reply we received. */
+
+extern bool remote_register_is_expedited (int regnum);
+
#endif
diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c
index 3faefe5..3cc0232 100644
--- a/gdb/rs6000-aix-tdep.c
+++ b/gdb/rs6000-aix-tdep.c
@@ -524,7 +524,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
on PPC variants that lack them. */
gdb_assert (ppc_floating_point_unit_p (gdbarch));
- /* The first eight words of ther arguments are passed in registers.
+ /* The first eight words of the arguments are passed in registers.
Copy them appropriately. */
ii = 0;
diff --git a/gdb/rs6000-lynx178-tdep.c b/gdb/rs6000-lynx178-tdep.c
index 17244b3..a5a6bb9 100644
--- a/gdb/rs6000-lynx178-tdep.c
+++ b/gdb/rs6000-lynx178-tdep.c
@@ -56,7 +56,7 @@ rs6000_lynx178_push_dummy_call (struct gdbarch *gdbarch,
on PPC variants that lack them. */
gdb_assert (ppc_floating_point_unit_p (gdbarch));
- /* The first eight words of ther arguments are passed in registers.
+ /* The first eight words of the arguments are passed in registers.
Copy them appropriately. */
ii = 0;
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index ed6a21b..d7f9698 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1389,7 +1389,7 @@ rs6000_fetch_instruction (struct gdbarch *gdbarch, const CORE_ADDR pc)
return op;
}
-/* GCC generates several well-known sequences of instructions at the begining
+/* GCC generates several well-known sequences of instructions at the beginning
of each function prologue when compiling with -fstack-check. If one of
such sequences starts at START_PC, then return the address of the
instruction immediately past this sequence. Otherwise, return START_PC. */
@@ -4298,7 +4298,7 @@ ppc_record_ACC_fpscr (struct regcache *regcache, ppc_gdbarch_tdep *tdep,
ACC[7][3] -> VSR[31]
NOTE:
- In ISA 3.1 the ACC is mapped on top of VSR[0] thru VSR[31].
+ In ISA 3.1 the ACC is mapped on top of VSR[0] through VSR[31].
In the future, the ACC may be implemented as an independent register file
rather than mapping on top of the VSRs. This will then require the ACC to
diff --git a/gdb/run-on-main-thread.c b/gdb/run-on-main-thread.c
index e30daba..746ea35 100644
--- a/gdb/run-on-main-thread.c
+++ b/gdb/run-on-main-thread.c
@@ -74,7 +74,20 @@ run_events (int error, gdb_client_data client_data)
{
item ();
}
- catch (...)
+ catch (const gdb_exception_forced_quit &e)
+ {
+ /* GDB is terminating, so:
+ - make sure this is propagated, and
+ - no need to keep running things, so propagate immediately. */
+ throw;
+ }
+ catch (const gdb_exception_quit &e)
+ {
+ /* Should cancelation of a runnable event cancel the execution of
+ the following one? The answer is not clear, so keep doing what
+ we've done so far: ignore this exception. */
+ }
+ catch (const gdb_exception &)
{
/* Ignore exceptions in the callback. */
}
diff --git a/gdb/rust-lang.h b/gdb/rust-lang.h
index 9ae5961..866d1ac 100644
--- a/gdb/rust-lang.h
+++ b/gdb/rust-lang.h
@@ -45,7 +45,7 @@ extern const char *rust_last_path_segment (const char *path);
/* Create a new slice type. NAME is the name of the type. ELT_TYPE
is the type of the elements of the slice. USIZE_TYPE is the Rust
- "usize" type to use. The new type is allocated whereever ELT_TYPE
+ "usize" type to use. The new type is allocated wherever ELT_TYPE
is allocated. */
extern struct type *rust_slice_type (const char *name, struct type *elt_type,
struct type *usize_type);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 6687127..064cf68 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1897,7 +1897,7 @@ s390_handle_arg (struct s390_arg_state *as, struct value *arg,
for S/390 ELF Application Binary Interface Supplement".
SP is the current stack pointer. We must put arguments, links,
- padding, etc. whereever they belong, and return the new stack
+ padding, etc. wherever they belong, and return the new stack
pointer value.
If STRUCT_RETURN is non-zero, then the function we're calling is
diff --git a/gdb/ser-base.c b/gdb/ser-base.c
index 81ef942..838560e 100644
--- a/gdb/ser-base.c
+++ b/gdb/ser-base.c
@@ -148,7 +148,7 @@ run_async_handler_and_reschedule (struct serial *scb)
/* FD_EVENT: This is scheduled when the input FIFO is empty (and there
is no pending error). As soon as data arrives, it is read into the
input FIFO and the client notified. The client should then drain
- the FIFO using readchar(). If the FIFO isn't immediatly emptied,
+ the FIFO using readchar(). If the FIFO isn't immediately emptied,
push_event() is used to nag the client until it is. */
static void
@@ -419,7 +419,7 @@ do_ser_base_readchar (struct serial *scb, int timeout)
pre-reads the input into that FIFO. Once that has been emptied,
further data is obtained by polling the input FD using the device
specific readchar() function. Note: reschedule() is called after
- every read. This is because there is no guarentee that the lower
+ every read. This is because there is no guarantee that the lower
level fd_event() poll_event() code (which also calls reschedule())
will be called. */
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 050f7bf..d211265 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1057,7 +1057,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
/* Now load as many as possible of the first arguments into
registers, and push the rest onto the stack. There are 16 bytes
- in four registers available. Loop thru args from first to last. */
+ in four registers available. Loop through args from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
type = args[argnum]->type ();
@@ -1195,7 +1195,7 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch,
/* Now load as many as possible of the first arguments into
registers, and push the rest onto the stack. There are 16 bytes
- in four registers available. Loop thru args from first to last. */
+ in four registers available. Loop through args from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
type = args[argnum]->type ();
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c
index 1c319c2..926f1ed 100644
--- a/gdb/solib-aix.c
+++ b/gdb/solib-aix.c
@@ -444,7 +444,7 @@ solib_aix_solib_create_inferior_hook (int from_tty)
/* Implement the "current_sos" solib_ops method. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
solib_aix_current_sos ()
{
std::optional<std::vector<lm_info_aix>> &library_list
@@ -452,14 +452,13 @@ solib_aix_current_sos ()
if (!library_list.has_value ())
return {};
- intrusive_list<solib> sos;
+ owning_intrusive_list<solib> sos;
/* Build a struct solib for each entry on the list.
We skip the first entry, since this is the entry corresponding
to the main executable, not a shared library. */
for (int ix = 1; ix < library_list->size (); ix++)
{
- solib *new_solib = new solib;
std::string so_name;
lm_info_aix &info = (*library_list)[ix];
@@ -481,12 +480,11 @@ solib_aix_current_sos ()
info.member_name.c_str ());
}
- new_solib->so_original_name = so_name;
- new_solib->so_name = so_name;
- new_solib->lm_info = std::make_unique<lm_info_aix> (info);
-
/* Add it to the list. */
- sos.push_back (*new_solib);
+ auto &new_solib = sos.emplace_back ();
+ new_solib.so_original_name = so_name;
+ new_solib.so_name = so_name;
+ new_solib.lm_info = std::make_unique<lm_info_aix> (info);
}
return sos;
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index c7a7f62..6c7d906 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -212,7 +212,7 @@ open_symbol_file_object (int from_tty)
/* Build a list of currently loaded shared objects. See solib-svr4.c. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
darwin_current_sos ()
{
type *ptr_type
@@ -230,7 +230,7 @@ darwin_current_sos ()
image_info_size = ptr_len * 3;
- intrusive_list<solib> sos;
+ owning_intrusive_list<solib> sos;
/* Read infos for each solib.
The first entry was rumored to be the executable itself, but this is not
@@ -272,16 +272,15 @@ darwin_current_sos ()
break;
/* Create and fill the new struct solib element. */
- solib *newobj = new solib;
+ auto &newobj = sos.emplace_back ();
auto li = std::make_unique<lm_info_darwin> ();
- newobj->so_name = file_path.get ();
- newobj->so_original_name = newobj->so_name;
+ newobj.so_name = file_path.get ();
+ newobj.so_original_name = newobj.so_name;
li->lm_addr = load_addr;
- newobj->lm_info = std::move (li);
- sos.push_back (*newobj);
+ newobj.lm_info = std::move (li);
}
return sos;
diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c
index 2751ded..360aede 100644
--- a/gdb/solib-dsbt.c
+++ b/gdb/solib-dsbt.c
@@ -512,13 +512,13 @@ lm_base (void)
themselves. The declaration of `struct solib' says which fields
we provide values for. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
dsbt_current_sos (void)
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
CORE_ADDR lm_addr;
dsbt_info *info = get_dsbt_info (current_program_space);
- intrusive_list<solib> sos;
+ owning_intrusive_list<solib> sos;
/* Make sure that the main executable has been relocated. This is
required in order to find the address of the global offset table,
@@ -594,7 +594,7 @@ dsbt_current_sos (void)
break;
}
- solib *sop = new solib;
+ auto &sop = sos.emplace_back ();
auto li = std::make_unique<lm_info_dsbt> ();
li->map = loadmap;
/* Fetch the name. */
@@ -612,12 +612,11 @@ dsbt_current_sos (void)
gdb_printf (gdb_stdlog, "current_sos: name = %s\n",
name_buf.get ());
- sop->so_name = name_buf.get ();
- sop->so_original_name = sop->so_name;
+ sop.so_name = name_buf.get ();
+ sop.so_original_name = sop.so_name;
}
- sop->lm_info = std::move (li);
- sos.push_back (*sop);
+ sop.lm_info = std::move (li);
}
else
{
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 2ce35c4..25873e6 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -306,12 +306,12 @@ lm_base (void)
/* Implement the "current_sos" solib_ops method. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
frv_current_sos ()
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
CORE_ADDR lm_addr, mgot;
- intrusive_list<solib> sos;
+ owning_intrusive_list<solib> sos;
/* Make sure that the main executable has been relocated. This is
required in order to find the address of the global offset table,
@@ -377,12 +377,12 @@ frv_current_sos ()
break;
}
- solib *sop = new solib;
+ auto &sop = sos.emplace_back ();
auto li = std::make_unique<lm_info_frv> ();
li->map = loadmap;
li->got_value = got_addr;
li->lm_addr = lm_addr;
- sop->lm_info = std::move (li);
+ sop.lm_info = std::move (li);
/* Fetch the name. */
addr = extract_unsigned_integer (lm_buf.l_name,
@@ -397,11 +397,9 @@ frv_current_sos ()
warning (_("Can't read pathname for link map entry."));
else
{
- sop->so_name = name_buf.get ();
- sop->so_original_name = sop->so_name;
+ sop.so_name = name_buf.get ();
+ sop.so_original_name = sop.so_name;
}
-
- sos.push_back (*sop);
}
else
{
diff --git a/gdb/solib-rocm.c b/gdb/solib-rocm.c
index 9b995c7..156b36a 100644
--- a/gdb/solib-rocm.c
+++ b/gdb/solib-rocm.c
@@ -204,20 +204,18 @@ rocm_solib_handle_event ()
/* Create so_list objects from rocm_so objects in SOS. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
so_list_from_rocm_sos (const std::vector<rocm_so> &sos)
{
- intrusive_list<solib> dst;
+ owning_intrusive_list<solib> dst;
for (const rocm_so &so : sos)
{
- solib *newobj = new solib;
- newobj->lm_info = std::make_unique<lm_info_svr4> (*so.lm_info);
+ auto &newobj = dst.emplace_back ();
- newobj->so_name = so.name;
- newobj->so_original_name = so.unique_name;
-
- dst.push_back (*newobj);
+ newobj.lm_info = std::make_unique<lm_info_svr4> (*so.lm_info);
+ newobj.so_name = so.name;
+ newobj.so_original_name = so.unique_name;
}
return dst;
@@ -226,11 +224,11 @@ so_list_from_rocm_sos (const std::vector<rocm_so> &sos)
/* Build a list of `struct solib' objects describing the shared
objects currently loaded in the inferior. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
rocm_solib_current_sos ()
{
/* First, retrieve the host-side shared library list. */
- intrusive_list<solib> sos = svr4_so_ops.current_sos ();
+ owning_intrusive_list<solib> sos = svr4_so_ops.current_sos ();
/* Then, the device-side shared library list. */
std::vector<rocm_so> &dev_sos = get_solib_info (current_inferior ())->solib_list;
@@ -238,7 +236,7 @@ rocm_solib_current_sos ()
if (dev_sos.empty ())
return sos;
- intrusive_list<solib> dev_so_list = so_list_from_rocm_sos (dev_sos);
+ owning_intrusive_list<solib> dev_so_list = so_list_from_rocm_sos (dev_sos);
if (sos.empty ())
return dev_so_list;
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 5d23205..7999a8e 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -619,7 +619,7 @@ find_program_interpreter (void)
/* Scan for DESIRED_DYNTAG in .dynamic section of the target's main executable,
- found by consulting the OS auxillary vector. If DESIRED_DYNTAG is found, 1
+ found by consulting the OS auxiliary vector. If DESIRED_DYNTAG is found, 1
is returned and the corresponding PTR is set. */
static int
@@ -991,20 +991,18 @@ svr4_clear_so (const solib &so)
/* Create the so_list objects equivalent to the svr4_sos in SOS. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
so_list_from_svr4_sos (const std::vector<svr4_so> &sos)
{
- intrusive_list<solib> dst;
+ owning_intrusive_list<solib> dst;
for (const svr4_so &so : sos)
{
- struct solib *newobj = new struct solib;
+ auto &newobj = dst.emplace_back ();
- newobj->so_name = so.name;
- newobj->so_original_name = so.name;
- newobj->lm_info = std::make_unique<lm_info_svr4> (*so.lm_info);
-
- dst.push_back (*newobj);
+ newobj.so_name = so.name;
+ newobj.so_original_name = so.name;
+ newobj.lm_info = std::make_unique<lm_info_svr4> (*so.lm_info);
}
return dst;
@@ -1184,25 +1182,24 @@ svr4_current_sos_via_xfer_libraries (struct svr4_library_list *list,
/* If no shared library information is available from the dynamic
linker, build a fallback list from other sources. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
svr4_default_sos (svr4_info *info)
{
if (!info->debug_loader_offset_p)
return {};
- solib *newobj = new solib;
auto li = std::make_unique<lm_info_svr4> ();
/* Nothing will ever check the other fields if we set l_addr_p. */
li->l_addr = li->l_addr_inferior = info->debug_loader_offset;
li->l_addr_p = 1;
- newobj->lm_info = std::move (li);
- newobj->so_name = info->debug_loader_name;
- newobj->so_original_name = newobj->so_name;
+ owning_intrusive_list<solib> sos;
+ auto &newobj = sos.emplace_back ();
- intrusive_list<solib> sos;
- sos.push_back (*newobj);
+ newobj.lm_info = std::move (li);
+ newobj.so_name = info->debug_loader_name;
+ newobj.so_original_name = newobj.so_name;
return sos;
}
@@ -1373,10 +1370,10 @@ svr4_current_sos_direct (struct svr4_info *info)
/* Collect sos read and stored by the probes interface. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
svr4_collect_probes_sos (svr4_info *info)
{
- intrusive_list<solib> res;
+ owning_intrusive_list<solib> res;
for (const auto &tuple : info->solib_lists)
{
@@ -1390,10 +1387,10 @@ svr4_collect_probes_sos (svr4_info *info)
/* Implement the main part of the "current_sos" solib_ops
method. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
svr4_current_sos_1 (svr4_info *info)
{
- intrusive_list<solib> sos;
+ owning_intrusive_list<solib> sos;
/* If we're using the probes interface, we can use the cache as it will
be maintained by probe update/reload actions. */
@@ -1417,11 +1414,11 @@ svr4_current_sos_1 (svr4_info *info)
/* Implement the "current_sos" solib_ops method. */
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
svr4_current_sos ()
{
svr4_info *info = get_svr4_info (current_program_space);
- intrusive_list<solib> sos = svr4_current_sos_1 (info);
+ owning_intrusive_list<solib> sos = svr4_current_sos_1 (info);
struct mem_range vsyscall_range;
/* Filter out the vDSO module, if present. Its symbol file would
@@ -1478,9 +1475,7 @@ svr4_current_sos ()
if (vsyscall_range.contains (li->l_ld))
{
- auto next = sos.erase (so);
- delete &*so;
- so = next;
+ so = sos.erase (so);
break;
}
@@ -2360,7 +2355,7 @@ enable_break (struct svr4_info *info, int from_tty)
}
/* If we were not able to find the base address of the loader
- from our so_list, then try using the AT_BASE auxilliary entry. */
+ from our so_list, then try using the AT_BASE auxiliary entry. */
if (!load_addr_found)
if (target_auxv_search (AT_BASE, &load_addr) > 0)
{
@@ -2621,8 +2616,8 @@ svr4_exec_displacement (CORE_ADDR *displacementp)
return 0;
}
- /* Verify that the auxilliary vector describes the same file as exec_bfd, by
- comparing their program headers. If the program headers in the auxilliary
+ /* Verify that the auxiliary vector describes the same file as exec_bfd, by
+ comparing their program headers. If the program headers in the auxiliary
vector do not match the program headers in the executable, then we are
looking at a different file than the one used by the kernel - for
instance, "gdb program" connected to "gdbserver :PORT ld.so program". */
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index 3fffa7c..8f73d5d 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -226,10 +226,10 @@ solib_target_parse_libraries (const char *library)
}
#endif
-static intrusive_list<solib>
+static owning_intrusive_list<solib>
solib_target_current_sos (void)
{
- intrusive_list<solib> sos;
+ owning_intrusive_list<solib> sos;
/* Fetch the list of shared libraries. */
std::optional<gdb::char_vector> library_document
@@ -245,15 +245,12 @@ solib_target_current_sos (void)
/* Build a struct solib for each entry on the list. */
for (lm_info_target_up &info : library_list)
{
- solib *new_solib = new solib;
+ auto &new_solib = sos.emplace_back ();
/* We don't need a copy of the name in INFO anymore. */
- new_solib->so_name = std::move (info->name);
- new_solib->so_original_name = new_solib->so_name;
- new_solib->lm_info = std::move (info);
-
- /* Add it to the list. */
- sos.push_back (*new_solib);
+ new_solib.so_name = std::move (info->name);
+ new_solib.so_original_name = new_solib.so_name;
+ new_solib.lm_info = std::move (info);
}
return sos;
diff --git a/gdb/solib.c b/gdb/solib.c
index b123be3..5c926de 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -755,8 +755,8 @@ update_solib_list (int from_tty)
the time we're done walking GDB's list, the inferior's list
contains only the new shared objects, which we then add. */
- intrusive_list<solib> inferior = ops->current_sos ();
- intrusive_list<solib>::iterator gdb_iter
+ owning_intrusive_list<solib> inferior = ops->current_sos ();
+ owning_intrusive_list<solib>::iterator gdb_iter
= current_program_space->so_list.begin ();
while (gdb_iter != current_program_space->so_list.end ())
{
@@ -785,7 +785,6 @@ update_solib_list (int from_tty)
if (inferior_iter != inferior.end ())
{
inferior.erase (inferior_iter);
- delete &*inferior_iter;
++gdb_iter;
}
@@ -798,9 +797,6 @@ update_solib_list (int from_tty)
current_program_space->deleted_solibs.push_back (gdb_iter->so_name);
- intrusive_list<solib>::iterator gdb_iter_next
- = current_program_space->so_list.erase (gdb_iter);
-
/* Unless the user loaded it explicitly, free SO's objfile. */
if (gdb_iter->objfile != nullptr
&& !(gdb_iter->objfile->flags & OBJF_USERLOADED)
@@ -811,8 +807,7 @@ update_solib_list (int from_tty)
sections from so.abfd; remove them. */
current_program_space->remove_target_sections (&*gdb_iter);
- delete &*gdb_iter;
- gdb_iter = gdb_iter_next;
+ gdb_iter = current_program_space->so_list.erase (gdb_iter);
}
}
@@ -1151,11 +1146,13 @@ clear_solib (program_space *pspace)
disable_breakpoints_in_shlibs (pspace);
- pspace->so_list.clear_and_dispose ([pspace] (solib *so) {
- notify_solib_unloaded (pspace, *so);
- pspace->remove_target_sections (so);
- delete so;
- });
+ for (solib &so : pspace->so_list)
+ {
+ notify_solib_unloaded (pspace, so);
+ pspace->remove_target_sections (&so);
+ };
+
+ pspace->so_list.clear ();
if (ops->clear_solib != nullptr)
ops->clear_solib (pspace);
diff --git a/gdb/solist.h b/gdb/solist.h
index b898ae3..336bb01 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -20,9 +20,11 @@
#define SOLIST_H
#define SO_NAME_MAX_PATH_SIZE 512 /* FIXME: Should be dynamic */
+
/* For domain_enum domain. */
#include "symtab.h"
#include "gdb_bfd.h"
+#include "gdbsupport/owning_intrusive_list.h"
#include "target-section.h"
/* Base class for target-specific link map information. */
@@ -119,7 +121,7 @@ struct solib_ops
inferior --- we don't examine any of the shared library files
themselves. The declaration of `struct solib' says which fields
we provide values for. */
- intrusive_list<solib> (*current_sos) ();
+ owning_intrusive_list<solib> (*current_sos) ();
/* Find, open, and read the symbols for the main executable. If
FROM_TTY is non-zero, allow messages to be printed. */
diff --git a/gdb/source-cache.c b/gdb/source-cache.c
index 2815b6e..f08c872 100644
--- a/gdb/source-cache.c
+++ b/gdb/source-cache.c
@@ -282,6 +282,12 @@ static void gnu_source_highlight_test ()
{
res = try_source_highlight (styled_prog, language_c, fullname);
}
+ catch (const gdb_exception &e)
+ {
+ if (e.reason != RETURN_ERROR)
+ throw;
+ saw_exception = true;
+ }
catch (...)
{
saw_exception = true;
diff --git a/gdb/source.c b/gdb/source.c
index b9122c4..292d2bf 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1345,7 +1345,7 @@ print_source_lines_base (struct symtab *s, int line, int stopline,
fields. ui_source_list is set only for CLI, not for
TUI. */
- uiout->field_signed ("line", line);
+ uiout->field_signed ("line", line, line_number_style.style ());
uiout->text ("\tin ");
uiout->field_string ("file", symtab_to_filename_for_display (s),
@@ -1386,11 +1386,15 @@ print_source_lines_base (struct symtab *s, int line, int stopline,
last_line_listed = loc->line ();
if (flags & PRINT_SOURCE_LINES_FILENAME)
{
- uiout->text (symtab_to_filename_for_display (s));
+ uiout->message ("%ps",
+ styled_string (file_name_style.style (),
+ symtab_to_filename_for_display (s)));
uiout->text (":");
}
- xsnprintf (buf, sizeof (buf), "%d\t", new_lineno++);
- uiout->text (buf);
+
+ uiout->message ("%ps\t", styled_string (line_number_style.style (),
+ pulongest (new_lineno)));
+ ++new_lineno;
while (*iter != '\0')
{
@@ -1551,9 +1555,11 @@ info_line_command (const char *arg, int from_tty)
if (start_pc == end_pc)
{
- gdb_printf ("Line %d of \"%s\"",
- sal.line,
- symtab_to_filename_for_display (sal.symtab));
+ gdb_printf ("Line %ps of \"%ps\"",
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)),
+ styled_string (file_name_style.style (),
+ symtab_to_filename_for_display (sal.symtab)));
gdb_stdout->wrap_here (2);
gdb_printf (" is at address ");
print_address (gdbarch, start_pc, gdb_stdout);
@@ -1562,9 +1568,11 @@ info_line_command (const char *arg, int from_tty)
}
else
{
- gdb_printf ("Line %d of \"%s\"",
- sal.line,
- symtab_to_filename_for_display (sal.symtab));
+ gdb_printf ("Line %ps of \"%ps\"",
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)),
+ styled_string (file_name_style.style (),
+ symtab_to_filename_for_display (sal.symtab)));
gdb_stdout->wrap_here (2);
gdb_printf (" starts at address ");
print_address (gdbarch, start_pc, gdb_stdout);
@@ -1589,8 +1597,11 @@ info_line_command (const char *arg, int from_tty)
/* Is there any case in which we get here, and have an address
which the user would want to see? If we have debugging symbols
and no line numbers? */
- gdb_printf (_("Line number %d is out of range for \"%s\".\n"),
- sal.line, symtab_to_filename_for_display (sal.symtab));
+ gdb_printf (_("Line number %ps is out of range for \"%ps\".\n"),
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)),
+ styled_string (file_name_style.style (),
+ symtab_to_filename_for_display (sal.symtab)));
}
}
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index edbc038..e97a7d9 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -769,7 +769,7 @@ sparc_alloc_frame_cache (void)
return cache;
}
-/* GCC generates several well-known sequences of instructions at the begining
+/* GCC generates several well-known sequences of instructions at the beginning
of each function prologue when compiling with -fstack-check. If one of
such sequences starts at START_PC, then return the address of the
instruction immediately past this sequence. Otherwise, return START_PC. */
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 46536ba..e479820 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -33,6 +33,7 @@
#include "symfile.h"
#include "objfiles.h"
#include "aout/stab_gnu.h"
+#include "psymtab.h"
#include "libaout.h"
#include "aout/aout64.h"
#include "gdb-stabs.h"
@@ -46,6 +47,8 @@
#include "cp-abi.h"
#include "cp-support.h"
#include <ctype.h>
+#include "block.h"
+#include "filenames.h"
#include "stabsread.h"
@@ -61,6 +64,26 @@ int *this_object_header_files;
int n_this_object_header_files;
int n_allocated_this_object_header_files;
+/* See stabsread.h. */
+
+const registry<objfile>::key<dbx_symfile_info> dbx_objfile_data_key;
+
+dbx_symfile_info::~dbx_symfile_info ()
+{
+ if (header_files != NULL)
+ {
+ int i = n_header_files;
+ struct header_file *hfiles = header_files;
+
+ while (--i >= 0)
+ {
+ xfree (hfiles[i].name);
+ xfree (hfiles[i].vector);
+ }
+ xfree (hfiles);
+ }
+}
+
struct stabs_nextfield
{
struct stabs_nextfield *next;
@@ -165,6 +188,26 @@ void stabsread_clear_cache (void);
static const char vptr_name[] = "_vptr$";
static const char vb_name[] = "_vb$";
+void
+unknown_symtype_complaint (const char *arg1)
+{
+ complaint (_("unknown symbol type %s"), arg1);
+}
+
+void
+lbrac_mismatch_complaint (int arg1)
+{
+ complaint (_("N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d"), arg1);
+}
+
+void
+repeated_header_complaint (const char *arg1, int arg2)
+{
+ complaint (_("\"repeated\" header file %s not "
+ "previously seen, at symtab pos %d"),
+ arg1, arg2);
+}
+
static void
invalid_cpp_abbrev_complaint (const char *arg1)
{
@@ -184,6 +227,14 @@ stabs_general_complaint (const char *arg1)
complaint ("%s", arg1);
}
+static void
+function_outside_compilation_unit_complaint (const char *arg1)
+{
+ complaint (_("function `%s' appears to be defined "
+ "outside of all compilation units"),
+ arg1);
+}
+
/* Make a list of forward references which haven't been defined. */
static struct type **undef_types;
@@ -491,6 +542,2440 @@ read_type_number (const char **pp, int *typenums)
}
+/* Free up old header file tables. */
+
+void
+free_header_files (void)
+{
+ if (this_object_header_files)
+ {
+ xfree (this_object_header_files);
+ this_object_header_files = NULL;
+ }
+ n_allocated_this_object_header_files = 0;
+}
+
+/* Allocate new header file tables. */
+
+void
+init_header_files (void)
+{
+ n_allocated_this_object_header_files = 10;
+ this_object_header_files = XNEWVEC (int, 10);
+}
+
+/* Close off the current usage of PST.
+ Returns PST or NULL if the partial symtab was empty and thrown away.
+
+ FIXME: List variables and peculiarities of same. */
+
+legacy_psymtab *
+stabs_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
+ legacy_psymtab *pst,
+ const char **include_list, int num_includes,
+ int capping_symbol_offset, unrelocated_addr capping_text,
+ legacy_psymtab **dependency_list,
+ int number_dependencies,
+ int textlow_not_set)
+{
+ int i;
+ struct gdbarch *gdbarch = objfile->arch ();
+ dbx_symfile_info *key = dbx_objfile_data_key. get (objfile);
+
+ if (capping_symbol_offset != -1)
+ LDSYMLEN (pst) = capping_symbol_offset - LDSYMOFF (pst);
+ pst->set_text_high (capping_text);
+
+ /* Under Solaris, the N_SO symbols always have a value of 0,
+ instead of the usual address of the .o file. Therefore,
+ we have to do some tricks to fill in texthigh and textlow.
+ The first trick is: if we see a static
+ or global function, and the textlow for the current pst
+ is not set (ie: textlow_not_set), then we use that function's
+ address for the textlow of the pst. */
+
+ /* Now, to fill in texthigh, we remember the last function seen
+ in the .o file. Also, there's a hack in
+ bfd/elf.c and gdb/elfread.c to pass the ELF st_size field
+ to here via the misc_info field. Therefore, we can fill in
+ a reliable texthigh by taking the address plus size of the
+ last function in the file. */
+
+ if (!pst->text_high_valid && key->ctx.last_function_name
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ int n;
+
+ const char *colon = strchr (key->ctx.last_function_name, ':');
+ if (colon == NULL)
+ n = 0;
+ else
+ n = colon - key->ctx.last_function_name;
+ char *p = (char *) alloca (n + 2);
+ strncpy (p, key->ctx.last_function_name, n);
+ p[n] = 0;
+
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol (current_program_space, p, objfile,
+ pst->filename);
+ if (minsym.minsym == NULL)
+ {
+ /* Sun Fortran appends an underscore to the minimal symbol name,
+ try again with an appended underscore if the minimal symbol
+ was not found. */
+ p[n] = '_';
+ p[n + 1] = 0;
+ minsym = lookup_minimal_symbol (current_program_space, p, objfile,
+ pst->filename);
+ }
+
+ if (minsym.minsym)
+ pst->set_text_high
+ (unrelocated_addr (CORE_ADDR (minsym.minsym->unrelocated_address ())
+ + minsym.minsym->size ()));
+
+ key->ctx.last_function_name = NULL;
+ }
+
+ if (!gdbarch_sofun_address_maybe_missing (gdbarch))
+ ;
+ /* This test will be true if the last .o file is only data. */
+ else if (textlow_not_set)
+ pst->set_text_low (pst->unrelocated_text_high ());
+ else
+ {
+ /* If we know our own starting text address, then walk through all other
+ psymtabs for this objfile, and if any didn't know their ending text
+ address, set it to our starting address. Take care to not set our
+ own ending address to our starting address. */
+
+ for (partial_symtab *p1 : partial_symtabs->range ())
+ if (!p1->text_high_valid && p1->text_low_valid && p1 != pst)
+ p1->set_text_high (pst->unrelocated_text_low ());
+ }
+
+ /* End of kludge for patching Solaris textlow and texthigh. */
+
+ pst->end ();
+
+ pst->number_of_dependencies = number_dependencies;
+ if (number_dependencies)
+ {
+ pst->dependencies
+ = partial_symtabs->allocate_dependencies (number_dependencies);
+ memcpy (pst->dependencies, dependency_list,
+ number_dependencies * sizeof (legacy_psymtab *));
+ }
+ else
+ pst->dependencies = 0;
+
+ for (i = 0; i < num_includes; i++)
+ {
+ legacy_psymtab *subpst =
+ new legacy_psymtab (include_list[i], partial_symtabs, objfile->per_bfd);
+
+ subpst->read_symtab_private =
+ XOBNEW (&objfile->objfile_obstack, struct symloc);
+ LDSYMOFF (subpst) =
+ LDSYMLEN (subpst) = 0;
+
+ /* We could save slight bits of space by only making one of these,
+ shared by the entire set of include files. FIXME-someday. */
+ subpst->dependencies =
+ partial_symtabs->allocate_dependencies (1);
+ subpst->dependencies[0] = pst;
+ subpst->number_of_dependencies = 1;
+
+ subpst->legacy_read_symtab = pst->legacy_read_symtab;
+ subpst->legacy_expand_psymtab = pst->legacy_expand_psymtab;
+ }
+
+ if (num_includes == 0
+ && number_dependencies == 0
+ && pst->empty ()
+ && key->ctx.has_line_numbers == 0)
+ {
+ /* Throw away this psymtab, it's empty. */
+ /* Empty psymtabs happen as a result of header files which don't have
+ any symbols in them. There can be a lot of them. But this check
+ is wrong, in that a psymtab with N_SLINE entries but nothing else
+ is not empty, but we don't realize that. Fixing that without slowing
+ things down might be tricky. */
+
+ partial_symtabs->discard_psymtab (pst);
+
+ /* Indicate that psymtab was thrown away. */
+ pst = NULL;
+ }
+ return pst;
+}
+
+/* Set namestring based on nlist. If the string table index is invalid,
+ give a fake name, and print a single error message per symbol file read,
+ rather than abort the symbol reading or flood the user with messages. */
+
+static const char *
+set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
+{
+ const char *namestring;
+ struct dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ if (nlist->n_strx + key->ctx.file_string_table_offset
+ >= DBX_STRINGTAB_SIZE (objfile)
+ || nlist->n_strx + key->ctx.file_string_table_offset < nlist->n_strx)
+ {
+ complaint (_("bad string table offset in symbol %d"),
+ symnum);
+ namestring = "<bad string table offset>";
+ }
+ else
+ namestring = (nlist->n_strx + key->ctx.file_string_table_offset
+ + DBX_STRINGTAB (objfile));
+ return namestring;
+}
+
+static void
+stabs_seek (int sym_offset, struct objfile *objfile)
+{
+ dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+ if (key->ctx.stabs_data)
+ {
+ key->ctx.symbuf_read += sym_offset;
+ key->ctx.symbuf_left -= sym_offset;
+ }
+ else
+ if (bfd_seek (objfile->obfd.get (), sym_offset, SEEK_CUR) != 0)
+ perror_with_name (bfd_get_filename (objfile->obfd.get ()));
+}
+
+/* Buffer for reading the symbol table entries. */
+static struct external_nlist symbuf[4096];
+static int symbuf_idx;
+static int symbuf_end;
+
+/* Refill the symbol table input buffer
+ and set the variables that control fetching entries from it.
+ Reports an error if no data available.
+ This function can read past the end of the symbol table
+ (into the string table) but this does no harm. */
+
+static void
+fill_symbuf (bfd *sym_bfd, struct objfile *objfile)
+{
+ unsigned int count;
+ int nbytes;
+ struct dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ if (key->ctx.stabs_data)
+ {
+ nbytes = sizeof (symbuf);
+ if (nbytes > key->ctx.symbuf_left)
+ nbytes = key->ctx.symbuf_left;
+ memcpy (symbuf, key->ctx.stabs_data + key->ctx.symbuf_read, nbytes);
+ }
+ else if (key->ctx.symbuf_sections == NULL)
+ {
+ count = sizeof (symbuf);
+ nbytes = bfd_read (symbuf, count, sym_bfd);
+ }
+ else
+ {
+ if (key->ctx.symbuf_left <= 0)
+ {
+ file_ptr filepos = (*key->ctx.symbuf_sections)[key->ctx.sect_idx]->filepos;
+
+ if (bfd_seek (sym_bfd, filepos, SEEK_SET) != 0)
+ perror_with_name (bfd_get_filename (sym_bfd));
+ key->ctx.symbuf_left = bfd_section_size ((*key->ctx.symbuf_sections)[key->ctx.sect_idx]);
+ key->ctx.symbol_table_offset = filepos - key->ctx.symbuf_read;
+ ++key->ctx.sect_idx;
+ }
+
+ count = key->ctx.symbuf_left;
+ if (count > sizeof (symbuf))
+ count = sizeof (symbuf);
+ nbytes = bfd_read (symbuf, count, sym_bfd);
+ }
+
+ if (nbytes < 0)
+ perror_with_name (bfd_get_filename (sym_bfd));
+ else if (nbytes == 0)
+ error (_("Premature end of file reading symbol table"));
+ symbuf_end = nbytes / key->ctx.symbol_size;
+ symbuf_idx = 0;
+ key->ctx.symbuf_left -= nbytes;
+ key->ctx.symbuf_read += nbytes;
+}
+
+/* Read in a defined section of a specific object file's symbols. */
+
+static void
+read_ofile_symtab (struct objfile *objfile, legacy_psymtab *pst)
+{
+ const char *namestring;
+ struct external_nlist *bufp;
+ struct internal_nlist nlist;
+ unsigned char type;
+ unsigned max_symnum;
+ bfd *abfd;
+ int sym_offset; /* Offset to start of symbols to read */
+ int sym_size; /* Size of symbols to read */
+ CORE_ADDR text_offset; /* Start of text segment for symbols */
+ int text_size; /* Size of text segment for symbols */
+ struct dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ sym_offset = LDSYMOFF (pst);
+ sym_size = LDSYMLEN (pst);
+ text_offset = pst->text_low (objfile);
+ text_size = pst->text_high (objfile) - pst->text_low (objfile);
+ const section_offsets &section_offsets = objfile->section_offsets;
+
+ key->ctx.stringtab_global = DBX_STRINGTAB (objfile);
+ set_last_source_file (NULL);
+
+ abfd = objfile->obfd.get ();
+ symbuf_end = symbuf_idx = 0;
+ key->ctx.symbuf_read = 0;
+ key->ctx.symbuf_left = sym_offset + sym_size;
+
+ /* It is necessary to actually read one symbol *before* the start
+ of this symtab's symbols, because the GCC_COMPILED_FLAG_SYMBOL
+ occurs before the N_SO symbol.
+
+ Detecting this in read_stabs_symtab
+ would slow down initial readin, so we look for it here instead. */
+ if (!key->ctx.processing_acc_compilation && sym_offset >= (int) key->ctx.symbol_size)
+ {
+ stabs_seek (sym_offset - key->ctx.symbol_size, objfile);
+ fill_symbuf (abfd, objfile);
+ bufp = &symbuf[symbuf_idx++];
+ INTERNALIZE_SYMBOL (nlist, bufp, abfd);
+ OBJSTAT (objfile, n_stabs++);
+
+ namestring = set_namestring (objfile, &nlist);
+
+ processing_gcc_compilation = 0;
+ if (nlist.n_type == N_TEXT)
+ {
+ const char *tempstring = namestring;
+
+ if (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0)
+ processing_gcc_compilation = 1;
+ else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0)
+ processing_gcc_compilation = 2;
+ if (*tempstring != '\0'
+ && *tempstring == bfd_get_symbol_leading_char (objfile->obfd.get ()))
+ ++tempstring;
+ if (startswith (tempstring, "__gnu_compiled"))
+ processing_gcc_compilation = 2;
+ }
+ }
+ else
+ {
+ /* The N_SO starting this symtab is the first symbol, so we
+ better not check the symbol before it. I'm not this can
+ happen, but it doesn't hurt to check for it. */
+ stabs_seek (sym_offset, objfile);
+ processing_gcc_compilation = 0;
+ }
+
+ if (symbuf_idx == symbuf_end)
+ fill_symbuf (abfd, objfile);
+ bufp = &symbuf[symbuf_idx];
+ if (bfd_h_get_8 (abfd, bufp->e_type) != N_SO)
+ error (_("First symbol in segment of executable not a source symbol"));
+
+ max_symnum = sym_size / key->ctx.symbol_size;
+
+ for (symnum = 0;
+ symnum < max_symnum;
+ symnum++)
+ {
+ QUIT; /* Allow this to be interruptable. */
+ if (symbuf_idx == symbuf_end)
+ fill_symbuf (abfd, objfile);
+ bufp = &symbuf[symbuf_idx++];
+ INTERNALIZE_SYMBOL (nlist, bufp, abfd);
+ OBJSTAT (objfile, n_stabs++);
+
+ type = bfd_h_get_8 (abfd, bufp->e_type);
+
+ namestring = set_namestring (objfile, &nlist);
+
+ if (type & N_STAB)
+ {
+ if (sizeof (nlist.n_value) > 4
+ /* We are a 64-bit debugger debugging a 32-bit program. */
+ && (type == N_LSYM || type == N_PSYM))
+ /* We have to be careful with the n_value in the case of N_LSYM
+ and N_PSYM entries, because they are signed offsets from frame
+ pointer, but we actually read them as unsigned 32-bit values.
+ This is not a problem for 32-bit debuggers, for which negative
+ values end up being interpreted correctly (as negative
+ offsets) due to integer overflow.
+ But we need to sign-extend the value for 64-bit debuggers,
+ or we'll end up interpreting negative values as very large
+ positive offsets. */
+ nlist.n_value = (nlist.n_value ^ 0x80000000) - 0x80000000;
+ process_one_symbol (type, nlist.n_desc, nlist.n_value,
+ namestring, section_offsets, objfile,
+ PST_LANGUAGE (pst));
+ }
+ /* We skip checking for a new .o or -l file; that should never
+ happen in this routine. */
+ else if (type == N_TEXT)
+ {
+ /* I don't think this code will ever be executed, because
+ the GCC_COMPILED_FLAG_SYMBOL usually is right before
+ the N_SO symbol which starts this source file.
+ However, there is no reason not to accept
+ the GCC_COMPILED_FLAG_SYMBOL anywhere. */
+
+ if (strcmp (namestring, GCC_COMPILED_FLAG_SYMBOL) == 0)
+ processing_gcc_compilation = 1;
+ else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0)
+ processing_gcc_compilation = 2;
+ }
+ else if (type & N_EXT || type == (unsigned char) N_TEXT
+ || type == (unsigned char) N_NBTEXT)
+ {
+ /* Global symbol: see if we came across a dbx definition for
+ a corresponding symbol. If so, store the value. Remove
+ syms from the chain when their values are stored, but
+ search the whole chain, as there may be several syms from
+ different files with the same name. */
+ /* This is probably not true. Since the files will be read
+ in one at a time, each reference to a global symbol will
+ be satisfied in each file as it appears. So we skip this
+ section. */
+ ;
+ }
+ }
+
+ /* In a Solaris elf file, this variable, which comes from the value
+ of the N_SO symbol, will still be 0. Luckily, text_offset, which
+ comes from low text address of PST, is correct. */
+ if (get_last_source_start_addr () == 0)
+ set_last_source_start_addr (text_offset);
+
+ /* In reordered executables last_source_start_addr may not be the
+ lower bound for this symtab, instead use text_offset which comes
+ from the low text address of PST, which is correct. */
+ if (get_last_source_start_addr () > text_offset)
+ set_last_source_start_addr (text_offset);
+
+ pst->compunit_symtab = end_compunit_symtab (text_offset + text_size);
+
+ end_stabs ();
+
+}
+
+static void
+dbx_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile)
+{
+ gdb_assert (!pst->readin);
+ struct dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ /* Read in all partial symtabs on which this one is dependent. */
+ pst->expand_dependencies (objfile);
+
+ if (LDSYMLEN (pst)) /* Otherwise it's a dummy. */
+ {
+ /* Init stuff necessary for reading in symbols */
+ stabsread_init ();
+ scoped_free_pendings free_pending;
+ key->ctx.file_string_table_offset = FILE_STRING_OFFSET (pst);
+ key->ctx.symbol_size = SYMBOL_SIZE (pst);
+
+ /* Read in this file's symbols. */
+ if (bfd_seek (objfile->obfd.get (), SYMBOL_OFFSET (pst), SEEK_SET) == 0)
+ read_ofile_symtab (objfile, pst);
+ }
+
+ pst->readin = true;
+}
+
+/* Invariant: The symbol pointed to by symbuf_idx is the first one
+ that hasn't been swapped. Swap the symbol at the same time
+ that symbuf_idx is incremented. */
+
+/* dbx allows the text of a symbol name to be continued into the
+ next symbol name! When such a continuation is encountered
+ (a \ at the end of the text of a name)
+ call this function to get the continuation. */
+
+static const char *
+dbx_next_symbol_text (struct objfile *objfile)
+{
+ struct internal_nlist nlist;
+ dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ if (symbuf_idx == symbuf_end)
+ fill_symbuf (objfile->obfd.get (), objfile);
+
+ symnum++;
+ INTERNALIZE_SYMBOL (nlist, &symbuf[symbuf_idx], objfile->obfd.get ());
+ OBJSTAT (objfile, n_stabs++);
+
+ symbuf_idx++;
+
+ return nlist.n_strx + key->ctx.stringtab_global
+ + key->ctx.file_string_table_offset;
+}
+
+/* Read in all of the symbols for a given psymtab for real.
+ Be verbose about it if the user wants that. SELF is not NULL. */
+
+static void
+stabs_read_symtab (legacy_psymtab *self, struct objfile *objfile)
+{
+ gdb_assert (!self->readin);
+
+ if (LDSYMLEN (self) || self->number_of_dependencies)
+ {
+ next_symbol_text_func = dbx_next_symbol_text;
+ dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ {
+ scoped_restore restore_stabs_data = make_scoped_restore (&key->ctx.stabs_data);
+ gdb::unique_xmalloc_ptr<gdb_byte> data_holder;
+ if (DBX_STAB_SECTION (objfile))
+ {
+ key->ctx.stabs_data
+ = symfile_relocate_debug_section (objfile,
+ DBX_STAB_SECTION (objfile),
+ NULL);
+ data_holder.reset (key->ctx.stabs_data);
+ }
+
+ self->expand_psymtab (objfile);
+ }
+
+ /* Match with global symbols. This only needs to be done once,
+ after all of the symtabs and dependencies have been read in. */
+ scan_file_globals (objfile);
+ }
+}
+
+static void
+record_minimal_symbol (minimal_symbol_reader &reader,
+ const char *name, unrelocated_addr address, int type,
+ struct objfile *objfile)
+{
+ enum minimal_symbol_type ms_type;
+ int section;
+ struct dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ switch (type)
+ {
+ case N_TEXT | N_EXT:
+ ms_type = mst_text;
+ section = SECT_OFF_TEXT (objfile);
+ break;
+ case N_DATA | N_EXT:
+ ms_type = mst_data;
+ section = SECT_OFF_DATA (objfile);
+ break;
+ case N_BSS | N_EXT:
+ ms_type = mst_bss;
+ section = SECT_OFF_BSS (objfile);
+ break;
+ case N_ABS | N_EXT:
+ ms_type = mst_abs;
+ section = -1;
+ break;
+#ifdef N_SETV
+ case N_SETV | N_EXT:
+ ms_type = mst_data;
+ section = SECT_OFF_DATA (objfile);
+ break;
+ case N_SETV:
+ /* I don't think this type actually exists; since a N_SETV is the result
+ of going over many .o files, it doesn't make sense to have one
+ file local. */
+ ms_type = mst_file_data;
+ section = SECT_OFF_DATA (objfile);
+ break;
+#endif
+ case N_TEXT:
+ case N_NBTEXT:
+ case N_FN:
+ case N_FN_SEQ:
+ ms_type = mst_file_text;
+ section = SECT_OFF_TEXT (objfile);
+ break;
+ case N_DATA:
+ ms_type = mst_file_data;
+
+ /* Check for __DYNAMIC, which is used by Sun shared libraries.
+ Record it as global even if it's local, not global, so
+ lookup_minimal_symbol can find it. We don't check symbol_leading_char
+ because for SunOS4 it always is '_'. */
+ if (strcmp ("__DYNAMIC", name) == 0)
+ ms_type = mst_data;
+
+ /* Same with virtual function tables, both global and static. */
+ {
+ const char *tempstring = name;
+
+ if (*tempstring != '\0'
+ && *tempstring == bfd_get_symbol_leading_char (objfile->obfd.get ()))
+ ++tempstring;
+ if (is_vtable_name (tempstring))
+ ms_type = mst_data;
+ }
+ section = SECT_OFF_DATA (objfile);
+ break;
+ case N_BSS:
+ ms_type = mst_file_bss;
+ section = SECT_OFF_BSS (objfile);
+ break;
+ default:
+ ms_type = mst_unknown;
+ section = -1;
+ break;
+ }
+
+ if ((ms_type == mst_file_text || ms_type == mst_text)
+ && address < key->ctx.lowest_text_address)
+ key->ctx.lowest_text_address = address;
+
+ reader.record_with_info (name, address, ms_type, section);
+}
+
+/* Given a name, value pair, find the corresponding
+ bincl in the list. Return the partial symtab associated
+ with that header_file_location. */
+
+static legacy_psymtab *
+find_corresponding_bincl_psymtab (const char *name, int instance,
+ struct objfile* objfile)
+{
+ stabsread_context ctx = dbx_objfile_data_key.get (objfile) -> ctx;
+ for (const header_file_location &bincl : ctx.bincl_list)
+ if (bincl.instance == instance
+ && strcmp (name, bincl.name) == 0)
+ return bincl.pst;
+
+ repeated_header_complaint (name, symnum);
+ return (legacy_psymtab *) 0;
+}
+
+/* Allocate and partially fill a partial symtab. It will be
+ completely filled at the end of the symbol list.
+
+ SYMFILE_NAME is the name of the symbol-file we are reading from, and ADDR
+ is the address relative to which its symbols are (incremental) or 0
+ (normal). */
+
+static legacy_psymtab *
+start_psymtab (psymtab_storage *partial_symtabs, struct objfile *objfile,
+ const char *filename, unrelocated_addr textlow, int ldsymoff)
+{
+ legacy_psymtab *result = new legacy_psymtab (filename, partial_symtabs,
+ objfile->per_bfd, textlow);
+
+ struct dbx_symfile_info *key = dbx_objfile_data_key.get(objfile);
+
+ result->read_symtab_private =
+ XOBNEW (&objfile->objfile_obstack, struct symloc);
+ LDSYMOFF (result) = ldsymoff;
+ result->legacy_read_symtab = stabs_read_symtab;
+ result->legacy_expand_psymtab = dbx_expand_psymtab;
+ SYMBOL_SIZE (result) = key->ctx.symbol_size;
+ SYMBOL_OFFSET (result) = key->ctx.symbol_table_offset;
+ STRING_OFFSET (result) = 0; /* This used to be an uninitialized global. */
+ FILE_STRING_OFFSET (result) = key->ctx.file_string_table_offset;
+
+ /* Deduce the source language from the filename for this psymtab. */
+ key->ctx.psymtab_language = deduce_language_from_filename (filename);
+ PST_LANGUAGE (result) = key->ctx.psymtab_language;
+
+ return result;
+}
+
+/* See stabsread.h. */
+
+static void
+read_stabs_symtab_1 (minimal_symbol_reader &reader,
+ psymtab_storage *partial_symtabs,
+ struct objfile *objfile)
+{
+ struct gdbarch *gdbarch = objfile->arch ();
+ struct external_nlist *bufp = 0; /* =0 avoids gcc -Wall glitch. */
+ struct internal_nlist nlist;
+ CORE_ADDR text_addr;
+ int text_size;
+ const char *sym_name;
+ int sym_len;
+ unsigned int next_file_string_table_offset = 0;
+ struct dbx_symfile_info *dbx = dbx_objfile_data_key.get(objfile);
+
+ const char *namestring;
+ int nsl;
+ int past_first_source_file = 0;
+ CORE_ADDR last_function_start = 0;
+ bfd *abfd;
+ int textlow_not_set;
+ int data_sect_index;
+
+ /* Current partial symtab. */
+ legacy_psymtab *pst;
+
+ /* List of current psymtab's include files. */
+ const char **psymtab_include_list;
+ int includes_allocated;
+ int includes_used;
+
+ /* Index within current psymtab dependency list. */
+ legacy_psymtab **dependency_list;
+ int dependencies_used, dependencies_allocated;
+
+ text_addr = DBX_TEXT_ADDR (objfile);
+ text_size = DBX_TEXT_SIZE (objfile);
+
+ /* FIXME. We probably want to change stringtab_global rather than add this
+ while processing every symbol entry. FIXME. */
+ dbx->ctx.file_string_table_offset = 0;
+
+ dbx->ctx.stringtab_global = DBX_STRINGTAB (objfile);
+
+ pst = (legacy_psymtab *) 0;
+
+ includes_allocated = 30;
+ includes_used = 0;
+ psymtab_include_list = (const char **) alloca (includes_allocated *
+ sizeof (const char *));
+
+ dependencies_allocated = 30;
+ dependencies_used = 0;
+ dependency_list =
+ (legacy_psymtab **) alloca (dependencies_allocated *
+ sizeof (legacy_psymtab *));
+
+ /* Init bincl list */
+ std::vector<struct header_file_location> bincl_storage;
+ scoped_restore restore_bincl_global
+ = make_scoped_restore (&(dbx->ctx.bincl_list), bincl_storage);
+
+ set_last_source_file (NULL);
+
+ dbx->ctx.lowest_text_address = (unrelocated_addr) -1;
+
+ abfd = objfile->obfd.get ();
+ symbuf_end = symbuf_idx = 0;
+ next_symbol_text_func = dbx_next_symbol_text;
+ textlow_not_set = 1;
+ dbx->ctx.has_line_numbers = 0;
+
+ /* FIXME: jimb/2003-09-12: We don't apply the right section's offset
+ to global and static variables. The stab for a global or static
+ variable doesn't give us any indication of which section it's in,
+ so we can't tell immediately which offset in
+ objfile->section_offsets we should apply to the variable's
+ address.
+
+ We could certainly find out which section contains the variable
+ by looking up the variable's unrelocated address with
+ find_pc_section, but that would be expensive; this is the
+ function that constructs the partial symbol tables by examining
+ every symbol in the entire executable, and it's
+ performance-critical. So that expense would not be welcome. I'm
+ not sure what to do about this at the moment.
+
+ What we have done for years is to simply assume that the .data
+ section's offset is appropriate for all global and static
+ variables. Recently, this was expanded to fall back to the .bss
+ section's offset if there is no .data section, and then to the
+ .rodata section's offset. */
+ data_sect_index = objfile->sect_index_data;
+ if (data_sect_index == -1)
+ data_sect_index = SECT_OFF_BSS (objfile);
+ if (data_sect_index == -1)
+ data_sect_index = SECT_OFF_RODATA (objfile);
+
+ /* If data_sect_index is still -1, that's okay. It's perfectly fine
+ for the file to have no .data, no .bss, and no .text at all, if
+ it also has no global or static variables. */
+
+ for (symnum = 0; symnum < DBX_SYMCOUNT (objfile); symnum++)
+ {
+ /* Get the symbol for this run and pull out some info. */
+ QUIT; /* Allow this to be interruptable. */
+ if (symbuf_idx == symbuf_end)
+ fill_symbuf (abfd, objfile);
+ bufp = &symbuf[symbuf_idx++];
+
+ /*
+ * Special case to speed up readin.
+ */
+ if (bfd_h_get_8 (abfd, bufp->e_type) == N_SLINE)
+ {
+ dbx->ctx.has_line_numbers = 1;
+ continue;
+ }
+
+ INTERNALIZE_SYMBOL (nlist, bufp, abfd);
+ OBJSTAT (objfile, n_stabs++);
+
+ /* Ok. There is a lot of code duplicated in the rest of this
+ switch statement (for efficiency reasons). Since I don't
+ like duplicating code, I will do my penance here, and
+ describe the code which is duplicated:
+
+ *) The assignment to namestring.
+ *) The call to strchr.
+ *) The addition of a partial symbol the two partial
+ symbol lists. This last is a large section of code, so
+ I've embedded it in the following macro. */
+
+ switch (nlist.n_type)
+ {
+ /*
+ * Standard, external, non-debugger, symbols
+ */
+
+ case N_TEXT | N_EXT:
+ case N_NBTEXT | N_EXT:
+ goto record_it;
+
+ case N_DATA | N_EXT:
+ case N_NBDATA | N_EXT:
+ goto record_it;
+
+ case N_BSS:
+ case N_BSS | N_EXT:
+ case N_NBBSS | N_EXT:
+ case N_SETV | N_EXT: /* FIXME, is this in BSS? */
+ goto record_it;
+
+ case N_ABS | N_EXT:
+ record_it:
+ namestring = set_namestring (objfile, &nlist);
+
+ record_minimal_symbol (reader, namestring,
+ unrelocated_addr (nlist.n_value),
+ nlist.n_type, objfile); /* Always */
+ continue;
+
+ /* Standard, local, non-debugger, symbols. */
+
+ case N_NBTEXT:
+
+ /* We need to be able to deal with both N_FN or N_TEXT,
+ because we have no way of knowing whether the sys-supplied ld
+ or GNU ld was used to make the executable. Sequents throw
+ in another wrinkle -- they renumbered N_FN. */
+
+ case N_FN:
+ case N_FN_SEQ:
+ case N_TEXT:
+ namestring = set_namestring (objfile, &nlist);
+
+ if ((namestring[0] == '-' && namestring[1] == 'l')
+ || (namestring[(nsl = strlen (namestring)) - 1] == 'o'
+ && namestring[nsl - 2] == '.'))
+ {
+ unrelocated_addr unrel_val = unrelocated_addr (nlist.n_value);
+
+ if (past_first_source_file && pst
+ /* The gould NP1 uses low values for .o and -l symbols
+ which are not the address. */
+ && unrel_val >= pst->unrelocated_text_low ())
+ {
+ stabs_end_psymtab (objfile, partial_symtabs,
+ pst, psymtab_include_list,
+ includes_used, symnum * dbx->ctx.symbol_size,
+ unrel_val > pst->unrelocated_text_high ()
+ ? unrel_val : pst->unrelocated_text_high (),
+ dependency_list, dependencies_used,
+ textlow_not_set);
+ pst = (legacy_psymtab *) 0;
+ includes_used = 0;
+ dependencies_used = 0;
+ dbx->ctx.has_line_numbers = 0;
+ }
+ else
+ past_first_source_file = 1;
+ }
+ else
+ goto record_it;
+ continue;
+
+ case N_DATA:
+ goto record_it;
+
+ case N_UNDF | N_EXT:
+ /* The case (nlist.n_value != 0) is a "Fortran COMMON" symbol.
+ We used to rely on the target to tell us whether it knows
+ where the symbol has been relocated to, but none of the
+ target implementations actually provided that operation.
+ So we just ignore the symbol, the same way we would do if
+ we had a target-side symbol lookup which returned no match.
+
+ All other symbols (with nlist.n_value == 0), are really
+ undefined, and so we ignore them too. */
+ continue;
+
+ case N_UNDF:
+ if (dbx->ctx.processing_acc_compilation && nlist.n_strx == 1)
+ {
+ /* Deal with relative offsets in the string table
+ used in ELF+STAB under Solaris. If we want to use the
+ n_strx field, which contains the name of the file,
+ we must adjust file_string_table_offset *before* calling
+ set_namestring(). */
+ past_first_source_file = 1;
+ dbx->ctx.file_string_table_offset = next_file_string_table_offset;
+ next_file_string_table_offset =
+ dbx->ctx.file_string_table_offset + nlist.n_value;
+ if (next_file_string_table_offset < dbx->ctx.file_string_table_offset)
+ error (_("string table offset backs up at %d"), symnum);
+ /* FIXME -- replace error() with complaint. */
+ continue;
+ }
+ continue;
+
+ /* Lots of symbol types we can just ignore. */
+
+ case N_ABS:
+ case N_NBDATA:
+ case N_NBBSS:
+ continue;
+
+ /* Keep going . . . */
+
+ /*
+ * Special symbol types for GNU
+ */
+ case N_INDR:
+ case N_INDR | N_EXT:
+ case N_SETA:
+ case N_SETA | N_EXT:
+ case N_SETT:
+ case N_SETT | N_EXT:
+ case N_SETD:
+ case N_SETD | N_EXT:
+ case N_SETB:
+ case N_SETB | N_EXT:
+ case N_SETV:
+ continue;
+
+ /*
+ * Debugger symbols
+ */
+
+ case N_SO:
+ {
+ CORE_ADDR valu;
+ static int prev_so_symnum = -10;
+ static int first_so_symnum;
+ const char *p;
+ static const char *dirname_nso;
+ int prev_textlow_not_set;
+
+ valu = nlist.n_value;
+
+ prev_textlow_not_set = textlow_not_set;
+
+ /* A zero value is probably an indication for the SunPRO 3.0
+ compiler. stabs_end_psymtab explicitly tests for zero, so
+ don't relocate it. */
+
+ if (nlist.n_value == 0
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ textlow_not_set = 1;
+ valu = 0;
+ }
+ else
+ textlow_not_set = 0;
+
+ past_first_source_file = 1;
+
+ if (prev_so_symnum != symnum - 1)
+ { /* Here if prev stab wasn't N_SO. */
+ first_so_symnum = symnum;
+
+ if (pst)
+ {
+ unrelocated_addr unrel_value = unrelocated_addr (valu);
+ stabs_end_psymtab (objfile, partial_symtabs,
+ pst, psymtab_include_list,
+ includes_used, symnum * dbx->ctx.symbol_size,
+ unrel_value > pst->unrelocated_text_high ()
+ ? unrel_value
+ : pst->unrelocated_text_high (),
+ dependency_list, dependencies_used,
+ prev_textlow_not_set);
+ pst = (legacy_psymtab *) 0;
+ includes_used = 0;
+ dependencies_used = 0;
+ dbx->ctx.has_line_numbers = 0;
+ }
+ }
+
+ prev_so_symnum = symnum;
+
+ /* End the current partial symtab and start a new one. */
+
+ namestring = set_namestring (objfile, &nlist);
+
+ /* Null name means end of .o file. Don't start a new one. */
+ if (*namestring == '\000')
+ continue;
+
+ /* Some compilers (including gcc) emit a pair of initial N_SOs.
+ The first one is a directory name; the second the file name.
+ If pst exists, is empty, and has a filename ending in '/',
+ we assume the previous N_SO was a directory name. */
+
+ p = lbasename (namestring);
+ if (p != namestring && *p == '\000')
+ {
+ /* Save the directory name SOs locally, then save it into
+ the psymtab when it's created below. */
+ dirname_nso = namestring;
+ continue;
+ }
+
+ /* Some other compilers (C++ ones in particular) emit useless
+ SOs for non-existant .c files. We ignore all subsequent SOs
+ that immediately follow the first. */
+
+ if (!pst)
+ {
+ pst = start_psymtab (partial_symtabs, objfile,
+ namestring,
+ unrelocated_addr (valu),
+ first_so_symnum * dbx->ctx.symbol_size);
+ pst->dirname = dirname_nso;
+ dirname_nso = NULL;
+ }
+ continue;
+ }
+
+ case N_BINCL:
+ {
+ enum language tmp_language;
+
+ /* Add this bincl to the bincl_list for future EXCLs. No
+ need to save the string; it'll be around until
+ read_stabs_symtab function returns. */
+
+ namestring = set_namestring (objfile, &nlist);
+ tmp_language = deduce_language_from_filename (namestring);
+
+ /* Only change the psymtab's language if we've learned
+ something useful (eg. tmp_language is not language_unknown).
+ In addition, to match what start_subfile does, never change
+ from C++ to C. */
+ if (tmp_language != language_unknown
+ && (tmp_language != language_c
+ || dbx->ctx.psymtab_language != language_cplus))
+ dbx->ctx.psymtab_language = tmp_language;
+
+ if (pst == NULL)
+ {
+ /* FIXME: we should not get here without a PST to work on.
+ Attempt to recover. */
+ complaint (_("N_BINCL %s not in entries for "
+ "any file, at symtab pos %d"),
+ namestring, symnum);
+ continue;
+ }
+ dbx->ctx.bincl_list.emplace_back (namestring, nlist.n_value, pst);
+
+ /* Mark down an include file in the current psymtab. */
+
+ goto record_include_file;
+ }
+
+ case N_SOL:
+ {
+ enum language tmp_language;
+
+ /* Mark down an include file in the current psymtab. */
+ namestring = set_namestring (objfile, &nlist);
+ tmp_language = deduce_language_from_filename (namestring);
+
+ /* Only change the psymtab's language if we've learned
+ something useful (eg. tmp_language is not language_unknown).
+ In addition, to match what start_subfile does, never change
+ from C++ to C. */
+ if (tmp_language != language_unknown
+ && (tmp_language != language_c
+ || dbx->ctx.psymtab_language != language_cplus))
+ dbx->ctx.psymtab_language = tmp_language;
+
+ /* In C++, one may expect the same filename to come round many
+ times, when code is coming alternately from the main file
+ and from inline functions in other files. So I check to see
+ if this is a file we've seen before -- either the main
+ source file, or a previously included file.
+
+ This seems to be a lot of time to be spending on N_SOL, but
+ things like "break c-exp.y:435" need to work (I
+ suppose the psymtab_include_list could be hashed or put
+ in a binary tree, if profiling shows this is a major hog). */
+ if (pst && filename_cmp (namestring, pst->filename) == 0)
+ continue;
+ {
+ int i;
+
+ for (i = 0; i < includes_used; i++)
+ if (filename_cmp (namestring, psymtab_include_list[i]) == 0)
+ {
+ i = -1;
+ break;
+ }
+ if (i == -1)
+ continue;
+ }
+
+ record_include_file:
+
+ psymtab_include_list[includes_used++] = namestring;
+ if (includes_used >= includes_allocated)
+ {
+ const char **orig = psymtab_include_list;
+
+ psymtab_include_list = (const char **)
+ alloca ((includes_allocated *= 2) * sizeof (const char *));
+ memcpy (psymtab_include_list, orig,
+ includes_used * sizeof (const char *));
+ }
+ continue;
+ }
+ case N_LSYM: /* Typedef or automatic variable. */
+ case N_STSYM: /* Data seg var -- static. */
+ case N_LCSYM: /* BSS " */
+ case N_ROSYM: /* Read-only data seg var -- static. */
+ case N_NBSTS: /* Gould nobase. */
+ case N_NBLCS: /* symbols. */
+ case N_FUN:
+ case N_GSYM: /* Global (extern) variable; can be
+ data or bss (sigh FIXME). */
+
+ /* Following may probably be ignored; I'll leave them here
+ for now (until I do Pascal and Modula 2 extensions). */
+
+ case N_PC: /* I may or may not need this; I
+ suspect not. */
+ case N_M2C: /* I suspect that I can ignore this here. */
+ case N_SCOPE: /* Same. */
+ {
+ const char *p;
+
+ namestring = set_namestring (objfile, &nlist);
+
+ /* See if this is an end of function stab. */
+ if (pst && nlist.n_type == N_FUN && *namestring == '\000')
+ {
+ unrelocated_addr valu;
+
+ /* It's value is the size (in bytes) of the function for
+ function relative stabs, or the address of the function's
+ end for old style stabs. */
+ valu = unrelocated_addr (nlist.n_value + last_function_start);
+ if (pst->unrelocated_text_high () == unrelocated_addr (0)
+ || valu > pst->unrelocated_text_high ())
+ pst->set_text_high (valu);
+ break;
+ }
+
+ p = (char *) strchr (namestring, ':');
+ if (!p)
+ continue; /* Not a debugging symbol. */
+
+ sym_len = 0;
+ sym_name = NULL; /* pacify "gcc -Werror" */
+ if (dbx->ctx.psymtab_language == language_cplus)
+ {
+ std::string name (namestring, p - namestring);
+ gdb::unique_xmalloc_ptr<char> new_name
+ = cp_canonicalize_string (name.c_str ());
+ if (new_name != nullptr)
+ {
+ sym_len = strlen (new_name.get ());
+ sym_name = obstack_strdup (&objfile->objfile_obstack,
+ new_name.get ());
+ }
+ }
+ else if (dbx->ctx.psymtab_language == language_c)
+ {
+ std::string name (namestring, p - namestring);
+ gdb::unique_xmalloc_ptr<char> new_name
+ = c_canonicalize_name (name.c_str ());
+ if (new_name != nullptr)
+ {
+ sym_len = strlen (new_name.get ());
+ sym_name = obstack_strdup (&objfile->objfile_obstack,
+ new_name.get ());
+ }
+ }
+
+ if (sym_len == 0)
+ {
+ sym_name = namestring;
+ sym_len = p - namestring;
+ }
+
+ /* Main processing section for debugging symbols which
+ the initial read through the symbol tables needs to worry
+ about. If we reach this point, the symbol which we are
+ considering is definitely one we are interested in.
+ p must also contain the (valid) index into the namestring
+ which indicates the debugging type symbol. */
+
+ switch (p[1])
+ {
+ case 'S':
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (sym_name, sym_len), true,
+ VAR_DOMAIN, LOC_STATIC,
+ data_sect_index,
+ psymbol_placement::STATIC,
+ unrelocated_addr (nlist.n_value),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ else
+ complaint (_("static `%*s' appears to be defined "
+ "outside of all compilation units"),
+ sym_len, sym_name);
+ continue;
+
+ case 'G':
+ /* The addresses in these entries are reported to be
+ wrong. See the code that reads 'G's for symtabs. */
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (sym_name, sym_len), true,
+ VAR_DOMAIN, LOC_STATIC,
+ data_sect_index,
+ psymbol_placement::GLOBAL,
+ unrelocated_addr (nlist.n_value),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ else
+ complaint (_("global `%*s' appears to be defined "
+ "outside of all compilation units"),
+ sym_len, sym_name);
+ continue;
+
+ case 'T':
+ /* When a 'T' entry is defining an anonymous enum, it
+ may have a name which is the empty string, or a
+ single space. Since they're not really defining a
+ symbol, those shouldn't go in the partial symbol
+ table. We do pick up the elements of such enums at
+ 'check_enum:', below. */
+ if (p >= namestring + 2
+ || (p == namestring + 1
+ && namestring[0] != ' '))
+ {
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (sym_name, sym_len),
+ true, STRUCT_DOMAIN, LOC_TYPEDEF, -1,
+ psymbol_placement::STATIC,
+ unrelocated_addr (0),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ else
+ complaint (_("enum, struct, or union `%*s' appears "
+ "to be defined outside of all "
+ "compilation units"),
+ sym_len, sym_name);
+ if (p[2] == 't')
+ {
+ /* Also a typedef with the same name. */
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (sym_name, sym_len),
+ true, VAR_DOMAIN, LOC_TYPEDEF, -1,
+ psymbol_placement::STATIC,
+ unrelocated_addr (0),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ else
+ complaint (_("typedef `%*s' appears to be defined "
+ "outside of all compilation units"),
+ sym_len, sym_name);
+ p += 1;
+ }
+ }
+ goto check_enum;
+
+ case 't':
+ if (p != namestring) /* a name is there, not just :T... */
+ {
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (sym_name, sym_len),
+ true, VAR_DOMAIN, LOC_TYPEDEF, -1,
+ psymbol_placement::STATIC,
+ unrelocated_addr (0),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ else
+ complaint (_("typename `%*s' appears to be defined "
+ "outside of all compilation units"),
+ sym_len, sym_name);
+ }
+ check_enum:
+ /* If this is an enumerated type, we need to
+ add all the enum constants to the partial symbol
+ table. This does not cover enums without names, e.g.
+ "enum {a, b} c;" in C, but fortunately those are
+ rare. There is no way for GDB to find those from the
+ enum type without spending too much time on it. Thus
+ to solve this problem, the compiler needs to put out the
+ enum in a nameless type. GCC2 does this. */
+
+ /* We are looking for something of the form
+ <name> ":" ("t" | "T") [<number> "="] "e"
+ {<constant> ":" <value> ","} ";". */
+
+ /* Skip over the colon and the 't' or 'T'. */
+ p += 2;
+ /* This type may be given a number. Also, numbers can come
+ in pairs like (0,26). Skip over it. */
+ while ((*p >= '0' && *p <= '9')
+ || *p == '(' || *p == ',' || *p == ')'
+ || *p == '=')
+ p++;
+
+ if (*p++ == 'e')
+ {
+ /* The aix4 compiler emits extra crud before the members. */
+ if (*p == '-')
+ {
+ /* Skip over the type (?). */
+ while (*p != ':')
+ p++;
+
+ /* Skip over the colon. */
+ p++;
+ }
+
+ /* We have found an enumerated type. */
+ /* According to comments in read_enum_type
+ a comma could end it instead of a semicolon.
+ I don't know where that happens.
+ Accept either. */
+ while (*p && *p != ';' && *p != ',')
+ {
+ const char *q;
+
+ /* Check for and handle cretinous dbx symbol name
+ continuation! */
+ if (*p == '\\' || (*p == '?' && p[1] == '\0'))
+ p = next_symbol_text (objfile);
+
+ /* Point to the character after the name
+ of the enum constant. */
+ for (q = p; *q && *q != ':'; q++)
+ ;
+ /* Note that the value doesn't matter for
+ enum constants in psymtabs, just in symtabs. */
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (p, q - p), true,
+ VAR_DOMAIN, LOC_CONST, -1,
+ psymbol_placement::STATIC,
+ unrelocated_addr (0),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ else
+ complaint (_("enum constant `%*s' appears to be defined "
+ "outside of all compilation units"),
+ ((int) (q - p)), p);
+ /* Point past the name. */
+ p = q;
+ /* Skip over the value. */
+ while (*p && *p != ',')
+ p++;
+ /* Advance past the comma. */
+ if (*p)
+ p++;
+ }
+ }
+ continue;
+
+ case 'c':
+ /* Constant, e.g. from "const" in Pascal. */
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (sym_name, sym_len), true,
+ VAR_DOMAIN, LOC_CONST, -1,
+ psymbol_placement::STATIC,
+ unrelocated_addr (0),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ else
+ complaint (_("constant `%*s' appears to be defined "
+ "outside of all compilation units"),
+ sym_len, sym_name);
+
+ continue;
+
+ case 'f':
+ if (! pst)
+ {
+ std::string name (namestring, (p - namestring));
+ function_outside_compilation_unit_complaint (name.c_str ());
+ }
+ /* Kludges for ELF/STABS with Sun ACC. */
+ dbx->ctx.last_function_name = namestring;
+ /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
+ value for the bottom of the text seg in those cases. */
+ if (nlist.n_value == 0
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ bound_minimal_symbol minsym
+ = find_stab_function (namestring,
+ pst ? pst->filename : NULL, objfile);
+ if (minsym.minsym != NULL)
+ nlist.n_value
+ = CORE_ADDR (minsym.minsym->unrelocated_address ());
+ }
+ if (pst && textlow_not_set
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ pst->set_text_low (unrelocated_addr (nlist.n_value));
+ textlow_not_set = 0;
+ }
+ /* End kludge. */
+
+ /* Keep track of the start of the last function so we
+ can handle end of function symbols. */
+ last_function_start = nlist.n_value;
+
+ /* In reordered executables this function may lie outside
+ the bounds created by N_SO symbols. If that's the case
+ use the address of this function as the low bound for
+ the partial symbol table. */
+ if (pst
+ && (textlow_not_set
+ || (unrelocated_addr (nlist.n_value)
+ < pst->unrelocated_text_low ()
+ && (nlist.n_value != 0))))
+ {
+ pst->set_text_low (unrelocated_addr (nlist.n_value));
+ textlow_not_set = 0;
+ }
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (sym_name, sym_len), true,
+ VAR_DOMAIN, LOC_BLOCK,
+ SECT_OFF_TEXT (objfile),
+ psymbol_placement::STATIC,
+ unrelocated_addr (nlist.n_value),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ continue;
+
+ /* Global functions were ignored here, but now they
+ are put into the global psymtab like one would expect.
+ They're also in the minimal symbol table. */
+ case 'F':
+ if (! pst)
+ {
+ std::string name (namestring, (p - namestring));
+ function_outside_compilation_unit_complaint (name.c_str ());
+ }
+ /* Kludges for ELF/STABS with Sun ACC. */
+ dbx->ctx.last_function_name = namestring;
+ /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
+ value for the bottom of the text seg in those cases. */
+ if (nlist.n_value == 0
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ bound_minimal_symbol minsym
+ = find_stab_function (namestring,
+ pst ? pst->filename : NULL, objfile);
+ if (minsym.minsym != NULL)
+ nlist.n_value
+ = CORE_ADDR (minsym.minsym->unrelocated_address ());
+ }
+ if (pst && textlow_not_set
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ pst->set_text_low (unrelocated_addr (nlist.n_value));
+ textlow_not_set = 0;
+ }
+ /* End kludge. */
+
+ /* Keep track of the start of the last function so we
+ can handle end of function symbols. */
+ last_function_start = nlist.n_value;
+
+ /* In reordered executables this function may lie outside
+ the bounds created by N_SO symbols. If that's the case
+ use the address of this function as the low bound for
+ the partial symbol table. */
+ if (pst
+ && (textlow_not_set
+ || (unrelocated_addr (nlist.n_value)
+ < pst->unrelocated_text_low ()
+ && (nlist.n_value != 0))))
+ {
+ pst->set_text_low (unrelocated_addr (nlist.n_value));
+ textlow_not_set = 0;
+ }
+ if (pst != nullptr)
+ pst->add_psymbol (std::string_view (sym_name, sym_len), true,
+ VAR_DOMAIN, LOC_BLOCK,
+ SECT_OFF_TEXT (objfile),
+ psymbol_placement::GLOBAL,
+ unrelocated_addr (nlist.n_value),
+ dbx->ctx.psymtab_language,
+ partial_symtabs, objfile);
+ continue;
+
+ /* Two things show up here (hopefully); static symbols of
+ local scope (static used inside braces) or extensions
+ of structure symbols. We can ignore both. */
+ case 'V':
+ case '(':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case '-':
+ case '#': /* For symbol identification (used in live ranges). */
+ continue;
+
+ case ':':
+ /* It is a C++ nested symbol. We don't need to record it
+ (I don't think); if we try to look up foo::bar::baz,
+ then symbols for the symtab containing foo should get
+ read in, I think. */
+ /* Someone says sun cc puts out symbols like
+ /foo/baz/maclib::/usr/local/bin/maclib,
+ which would get here with a symbol type of ':'. */
+ continue;
+
+ default:
+ /* Unexpected symbol descriptor. The second and subsequent stabs
+ of a continued stab can show up here. The question is
+ whether they ever can mimic a normal stab--it would be
+ nice if not, since we certainly don't want to spend the
+ time searching to the end of every string looking for
+ a backslash. */
+
+ complaint (_("unknown symbol descriptor `%c'"),
+ p[1]);
+
+ /* Ignore it; perhaps it is an extension that we don't
+ know about. */
+ continue;
+ }
+ }
+
+ case N_EXCL:
+
+ namestring = set_namestring (objfile, &nlist);
+
+ /* Find the corresponding bincl and mark that psymtab on the
+ psymtab dependency list. */
+ {
+ legacy_psymtab *needed_pst =
+ find_corresponding_bincl_psymtab (namestring, nlist.n_value, objfile);
+
+ /* If this include file was defined earlier in this file,
+ leave it alone. */
+ if (needed_pst == pst)
+ continue;
+
+ if (needed_pst)
+ {
+ int i;
+ int found = 0;
+
+ for (i = 0; i < dependencies_used; i++)
+ if (dependency_list[i] == needed_pst)
+ {
+ found = 1;
+ break;
+ }
+
+ /* If it's already in the list, skip the rest. */
+ if (found)
+ continue;
+
+ dependency_list[dependencies_used++] = needed_pst;
+ if (dependencies_used >= dependencies_allocated)
+ {
+ legacy_psymtab **orig = dependency_list;
+
+ dependency_list =
+ (legacy_psymtab **)
+ alloca ((dependencies_allocated *= 2)
+ * sizeof (legacy_psymtab *));
+ memcpy (dependency_list, orig,
+ (dependencies_used
+ * sizeof (legacy_psymtab *)));
+#ifdef DEBUG_INFO
+ gdb_printf (gdb_stderr,
+ "Had to reallocate "
+ "dependency list.\n");
+ gdb_printf (gdb_stderr,
+ "New dependencies allocated: %d\n",
+ dependencies_allocated);
+#endif
+ }
+ }
+ }
+ continue;
+
+ case N_ENDM:
+ /* Solaris 2 end of module, finish current partial symbol
+ table. stabs_end_psymtab will set the high text address of
+ PST to the proper value, which is necessary if a module
+ compiled without debugging info follows this module. */
+ if (pst && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ stabs_end_psymtab (objfile, partial_symtabs, pst,
+ psymtab_include_list, includes_used,
+ symnum * dbx->ctx.symbol_size,
+ (unrelocated_addr) 0, dependency_list,
+ dependencies_used, textlow_not_set);
+ pst = (legacy_psymtab *) 0;
+ includes_used = 0;
+ dependencies_used = 0;
+ dbx->ctx.has_line_numbers = 0;
+ }
+ continue;
+
+ case N_RBRAC:
+#ifdef HANDLE_RBRAC
+ HANDLE_RBRAC (nlist.n_value);
+ continue;
+#endif
+ case N_EINCL:
+ case N_DSLINE:
+ case N_BSLINE:
+ case N_SSYM: /* Claim: Structure or union element.
+ Hopefully, I can ignore this. */
+ case N_ENTRY: /* Alternate entry point; can ignore. */
+ case N_MAIN: /* Can definitely ignore this. */
+ case N_CATCH: /* These are GNU C++ extensions */
+ case N_EHDECL: /* that can safely be ignored here. */
+ case N_LENG:
+ case N_BCOMM:
+ case N_ECOMM:
+ case N_ECOML:
+ case N_FNAME:
+ case N_SLINE:
+ case N_RSYM:
+ case N_PSYM:
+ case N_BNSYM:
+ case N_ENSYM:
+ case N_LBRAC:
+ case N_NSYMS: /* Ultrix 4.0: symbol count */
+ case N_DEFD: /* GNU Modula-2 */
+ case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
+
+ case N_OBJ: /* Useless types from Solaris. */
+ case N_OPT:
+ case N_PATCH:
+ /* These symbols aren't interesting; don't worry about them. */
+ continue;
+
+ default:
+ /* If we haven't found it yet, ignore it. It's probably some
+ new type we don't know about yet. */
+ unknown_symtype_complaint (hex_string (nlist.n_type));
+ continue;
+ }
+ }
+
+ /* If there's stuff to be cleaned up, clean it up. */
+ if (pst)
+ {
+ /* Don't set high text address of PST lower than it already
+ is. */
+ unrelocated_addr text_end
+ = (unrelocated_addr
+ ((dbx->ctx.lowest_text_address == (unrelocated_addr) -1
+ ? text_addr
+ : CORE_ADDR (dbx->ctx.lowest_text_address))
+ + text_size));
+
+ stabs_end_psymtab (objfile, partial_symtabs,
+ pst, psymtab_include_list, includes_used,
+ symnum * dbx->ctx.symbol_size,
+ (text_end > pst->unrelocated_text_high ()
+ ? text_end : pst->unrelocated_text_high ()),
+ dependency_list, dependencies_used, textlow_not_set);
+ }
+}
+
+/* Scan and build partial symbols for a symbol file.
+ We have been initialized by a call to dbx_symfile_init, which
+ put all the relevant info into a "struct dbx_symfile_info",
+ hung off the objfile structure. */
+
+void
+read_stabs_symtab (struct objfile *objfile, symfile_add_flags symfile_flags)
+{
+ bfd *sym_bfd;
+ int val;
+ struct dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ sym_bfd = objfile->obfd.get ();
+
+ /* .o and .nlm files are relocatables with text, data and bss segs based at
+ 0. This flag disables special (Solaris stabs-in-elf only) fixups for
+ symbols with a value of 0. */
+
+ key->ctx.symfile_relocatable = bfd_get_file_flags (sym_bfd) & HAS_RELOC;
+
+ val = bfd_seek (sym_bfd, DBX_SYMTAB_OFFSET (objfile), SEEK_SET);
+ if (val < 0)
+ perror_with_name (objfile_name (objfile));
+
+ key->ctx.symbol_size = DBX_SYMBOL_SIZE (objfile);
+ key->ctx.symbol_table_offset = DBX_SYMTAB_OFFSET (objfile);
+
+ scoped_free_pendings free_pending;
+
+ minimal_symbol_reader reader (objfile);
+
+ /* Read stabs data from executable file and define symbols. */
+
+ psymbol_functions *psf = new psymbol_functions ();
+ psymtab_storage *partial_symtabs = psf->get_partial_symtabs ().get ();
+ objfile->qf.emplace_front (psf);
+ read_stabs_symtab_1 (reader, partial_symtabs, objfile);
+
+ /* Install any minimal symbols that have been collected as the current
+ minimal symbols for this objfile. */
+
+ reader.install ();
+}
+
+/* Record the namespace that the function defined by SYMBOL was
+ defined in, if necessary. BLOCK is the associated block; use
+ OBSTACK for allocation. */
+
+static void
+cp_set_block_scope (const struct symbol *symbol,
+ struct block *block,
+ struct obstack *obstack)
+{
+ if (symbol->demangled_name () != NULL)
+ {
+ /* Try to figure out the appropriate namespace from the
+ demangled name. */
+
+ /* FIXME: carlton/2003-04-15: If the function in question is
+ a method of a class, the name will actually include the
+ name of the class as well. This should be harmless, but
+ is a little unfortunate. */
+
+ const char *name = symbol->demangled_name ();
+ unsigned int prefix_len = cp_entire_prefix_len (name);
+
+ block->set_scope (obstack_strndup (obstack, name, prefix_len),
+ obstack);
+ }
+}
+
+bound_minimal_symbol
+find_stab_function (const char *namestring, const char *filename,
+ struct objfile *objfile)
+{
+ int n;
+
+ const char *colon = strchr (namestring, ':');
+ if (colon == NULL)
+ n = 0;
+ else
+ n = colon - namestring;
+
+ char *p = (char *) alloca (n + 2);
+ strncpy (p, namestring, n);
+ p[n] = 0;
+
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, p, objfile, filename);
+ if (msym.minsym == NULL)
+ {
+ /* Sun Fortran appends an underscore to the minimal symbol name,
+ try again with an appended underscore if the minimal symbol
+ was not found. */
+ p[n] = '_';
+ p[n + 1] = 0;
+ msym
+ = lookup_minimal_symbol (current_program_space, p, objfile, filename);
+ }
+
+ if (msym.minsym == NULL && filename != NULL)
+ {
+ /* Try again without the filename. */
+ p[n] = 0;
+ msym = lookup_minimal_symbol (current_program_space, p, objfile);
+ }
+ if (msym.minsym == NULL && filename != NULL)
+ {
+ /* And try again for Sun Fortran, but without the filename. */
+ p[n] = '_';
+ p[n + 1] = 0;
+ msym = lookup_minimal_symbol (current_program_space, p, objfile);
+ }
+
+ return msym;
+}
+
+/* Add header file number I for this object file
+ at the next successive FILENUM. */
+
+static void
+add_this_object_header_file (int i)
+{
+ if (n_this_object_header_files == n_allocated_this_object_header_files)
+ {
+ n_allocated_this_object_header_files *= 2;
+ this_object_header_files
+ = (int *) xrealloc ((char *) this_object_header_files,
+ n_allocated_this_object_header_files * sizeof (int));
+ }
+
+ this_object_header_files[n_this_object_header_files++] = i;
+}
+
+/* Add to this file an "old" header file, one already seen in
+ a previous object file. NAME is the header file's name.
+ INSTANCE is its instance code, to select among multiple
+ symbol tables for the same header file. */
+
+static void
+add_old_header_file (const char *name, int instance, struct objfile *objfile)
+{
+ struct header_file *p = HEADER_FILES (objfile);
+ int i;
+
+ for (i = 0; i < N_HEADER_FILES (objfile); i++)
+ if (filename_cmp (p[i].name, name) == 0 && instance == p[i].instance)
+ {
+ add_this_object_header_file (i);
+ return;
+ }
+ repeated_header_complaint (name, symnum);
+}
+
+/* Add to this file a "new" header file: definitions for its types follow.
+ NAME is the header file's name.
+ Most often this happens only once for each distinct header file,
+ but not necessarily. If it happens more than once, INSTANCE has
+ a different value each time, and references to the header file
+ use INSTANCE values to select among them.
+
+ dbx output contains "begin" and "end" markers for each new header file,
+ but at this level we just need to know which files there have been;
+ so we record the file when its "begin" is seen and ignore the "end". */
+
+static void
+add_new_header_file (const char *name, int instance, struct objfile *objfile)
+{
+ int i;
+ struct header_file *hfile;
+
+ /* Make sure there is room for one more header file. */
+
+ i = N_ALLOCATED_HEADER_FILES (objfile);
+
+ if (N_HEADER_FILES (objfile) == i)
+ {
+ if (i == 0)
+ {
+ N_ALLOCATED_HEADER_FILES (objfile) = 10;
+ HEADER_FILES (objfile) = (struct header_file *)
+ xmalloc (10 * sizeof (struct header_file));
+ }
+ else
+ {
+ i *= 2;
+ N_ALLOCATED_HEADER_FILES (objfile) = i;
+ HEADER_FILES (objfile) = (struct header_file *)
+ xrealloc ((char *) HEADER_FILES (objfile),
+ (i * sizeof (struct header_file)));
+ }
+ }
+
+ /* Create an entry for this header file. */
+
+ i = N_HEADER_FILES (objfile)++;
+ hfile = HEADER_FILES (objfile) + i;
+ hfile->name = xstrdup (name);
+ hfile->instance = instance;
+ hfile->length = 10;
+ hfile->vector = XCNEWVEC (struct type *, 10);
+
+ add_this_object_header_file (i);
+}
+
+/* See stabsread.h. */
+
+void
+process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
+ const section_offsets &section_offsets,
+ struct objfile *objfile, enum language language)
+{
+ struct gdbarch *gdbarch = objfile->arch ();
+ struct context_stack *newobj;
+ struct context_stack cstk;
+ /* This remembers the address of the start of a function. It is
+ used because in Solaris 2, N_LBRAC, N_RBRAC, and N_SLINE entries
+ are relative to the current function's start address. On systems
+ other than Solaris 2, this just holds the SECT_OFF_TEXT value,
+ and is used to relocate these symbol types rather than
+ SECTION_OFFSETS. */
+ static CORE_ADDR function_start_offset;
+
+ /* This holds the address of the start of a function, without the
+ system peculiarities of function_start_offset. */
+ static CORE_ADDR last_function_start;
+
+ /* If this is nonzero, we've seen an N_SLINE since the start of the
+ current function. We use this to tell us to move the first sline
+ to the beginning of the function regardless of what its given
+ value is. */
+ static int sline_found_in_function = 1;
+
+ /* If this is nonzero, we've seen a non-gcc N_OPT symbol for this
+ source file. Used to detect the SunPRO solaris compiler. */
+ static int n_opt_found;
+
+ /* The section index for this symbol. */
+ int section_index = -1;
+
+ struct dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
+
+ /* Something is wrong if we see real data before seeing a source
+ file name. */
+
+ if (get_last_source_file () == NULL && type != (unsigned char) N_SO)
+ {
+ /* Ignore any symbols which appear before an N_SO symbol.
+ Currently no one puts symbols there, but we should deal
+ gracefully with the case. A complain()t might be in order,
+ but this should not be an error (). */
+ return;
+ }
+
+ switch (type)
+ {
+ case N_FUN:
+ case N_FNAME:
+
+ if (*name == '\000')
+ {
+ /* This N_FUN marks the end of a function. This closes off
+ the current block. */
+ struct block *block;
+
+ if (outermost_context_p ())
+ {
+ lbrac_mismatch_complaint (symnum);
+ break;
+ }
+
+ /* The following check is added before recording line 0 at
+ end of function so as to handle hand-generated stabs
+ which may have an N_FUN stabs at the end of the function,
+ but no N_SLINE stabs. */
+ if (sline_found_in_function)
+ {
+ CORE_ADDR addr = last_function_start + valu;
+
+ record_line
+ (get_current_subfile (), 0,
+ unrelocated_addr (gdbarch_addr_bits_remove (gdbarch, addr)
+ - objfile->text_section_offset ()));
+ }
+
+ within_function = 0;
+ cstk = pop_context ();
+
+ /* Make a block for the local symbols within. */
+ block = finish_block (cstk.name,
+ cstk.old_blocks, NULL,
+ cstk.start_addr, cstk.start_addr + valu);
+
+ /* For C++, set the block's scope. */
+ if (cstk.name->language () == language_cplus)
+ cp_set_block_scope (cstk.name, block, &objfile->objfile_obstack);
+
+ /* May be switching to an assembler file which may not be using
+ block relative stabs, so reset the offset. */
+ function_start_offset = 0;
+
+ break;
+ }
+
+ sline_found_in_function = 0;
+
+ /* Relocate for dynamic loading. */
+ section_index = SECT_OFF_TEXT (objfile);
+ valu += section_offsets[SECT_OFF_TEXT (objfile)];
+ valu = gdbarch_addr_bits_remove (gdbarch, valu);
+ last_function_start = valu;
+
+ goto define_a_symbol;
+
+ case N_LBRAC:
+ /* This "symbol" just indicates the start of an inner lexical
+ context within a function. */
+
+ /* Ignore extra outermost context from SunPRO cc and acc. */
+ if (n_opt_found && desc == 1)
+ break;
+
+ valu += function_start_offset;
+
+ push_context (desc, valu);
+ break;
+
+ case N_RBRAC:
+ /* This "symbol" just indicates the end of an inner lexical
+ context that was started with N_LBRAC. */
+
+ /* Ignore extra outermost context from SunPRO cc and acc. */
+ if (n_opt_found && desc == 1)
+ break;
+
+ valu += function_start_offset;
+
+ if (outermost_context_p ())
+ {
+ lbrac_mismatch_complaint (symnum);
+ break;
+ }
+
+ cstk = pop_context ();
+ if (desc != cstk.depth)
+ lbrac_mismatch_complaint (symnum);
+
+ if (*get_local_symbols () != NULL)
+ {
+ /* GCC development snapshots from March to December of
+ 2000 would output N_LSYM entries after N_LBRAC
+ entries. As a consequence, these symbols are simply
+ discarded. Complain if this is the case. */
+ complaint (_("misplaced N_LBRAC entry; discarding local "
+ "symbols which have no enclosing block"));
+ }
+ *get_local_symbols () = cstk.locals;
+
+ if (get_context_stack_depth () > 1)
+ {
+ /* This is not the outermost LBRAC...RBRAC pair in the
+ function, its local symbols preceded it, and are the ones
+ just recovered from the context stack. Define the block
+ for them (but don't bother if the block contains no
+ symbols. Should we complain on blocks without symbols?
+ I can't think of any useful purpose for them). */
+ if (*get_local_symbols () != NULL)
+ {
+ /* Muzzle a compiler bug that makes end < start.
+
+ ??? Which compilers? Is this ever harmful?. */
+ if (cstk.start_addr > valu)
+ {
+ complaint (_("block start larger than block end"));
+ cstk.start_addr = valu;
+ }
+ /* Make a block for the local symbols within. */
+ finish_block (0, cstk.old_blocks, NULL,
+ cstk.start_addr, valu);
+ }
+ }
+ else
+ {
+ /* This is the outermost LBRAC...RBRAC pair. There is no
+ need to do anything; leave the symbols that preceded it
+ to be attached to the function's own block. We need to
+ indicate that we just moved outside of the function. */
+ within_function = 0;
+ }
+
+ break;
+
+ case N_FN:
+ case N_FN_SEQ:
+ /* This kind of symbol indicates the start of an object file.
+ Relocate for dynamic loading. */
+ section_index = SECT_OFF_TEXT (objfile);
+ valu += section_offsets[SECT_OFF_TEXT (objfile)];
+ break;
+
+ case N_SO:
+ /* This type of symbol indicates the start of data for one
+ source file. Finish the symbol table of the previous source
+ file (if any) and start accumulating a new symbol table.
+ Relocate for dynamic loading. */
+ section_index = SECT_OFF_TEXT (objfile);
+ valu += section_offsets[SECT_OFF_TEXT (objfile)];
+
+ n_opt_found = 0;
+
+ if (get_last_source_file ())
+ {
+ /* Check if previous symbol was also an N_SO (with some
+ sanity checks). If so, that one was actually the
+ directory name, and the current one is the real file
+ name. Patch things up. */
+ if (previous_stab_code == (unsigned char) N_SO)
+ {
+ patch_subfile_names (get_current_subfile (), name);
+ break; /* Ignore repeated SOs. */
+ }
+ end_compunit_symtab (valu);
+ end_stabs ();
+ }
+
+ /* Null name means this just marks the end of text for this .o
+ file. Don't start a new symtab in this case. */
+ if (*name == '\000')
+ break;
+
+ function_start_offset = 0;
+
+ start_stabs ();
+ start_compunit_symtab (objfile, name, NULL, valu, language);
+ record_debugformat ("stabs");
+ break;
+
+ case N_SOL:
+ /* This type of symbol indicates the start of data for a
+ sub-source-file, one whose contents were copied or included
+ in the compilation of the main source file (whose name was
+ given in the N_SO symbol). Relocate for dynamic loading. */
+ section_index = SECT_OFF_TEXT (objfile);
+ valu += section_offsets[SECT_OFF_TEXT (objfile)];
+ start_subfile (name);
+ break;
+
+ case N_BINCL:
+ push_subfile ();
+ add_new_header_file (name, valu, objfile);
+ start_subfile (name);
+ break;
+
+ case N_EINCL:
+ start_subfile (pop_subfile ());
+ break;
+
+ case N_EXCL:
+ add_old_header_file (name, valu, objfile);
+ break;
+
+ case N_SLINE:
+ /* This type of "symbol" really just records one line-number --
+ core-address correspondence. Enter it in the line list for
+ this symbol table. */
+
+ /* Relocate for dynamic loading and for ELF acc
+ function-relative symbols. */
+ valu += function_start_offset;
+
+ /* GCC 2.95.3 emits the first N_SLINE stab somewhere in the
+ middle of the prologue instead of right at the start of the
+ function. To deal with this we record the address for the
+ first N_SLINE stab to be the start of the function instead of
+ the listed location. We really shouldn't to this. When
+ compiling with optimization, this first N_SLINE stab might be
+ optimized away. Other (non-GCC) compilers don't emit this
+ stab at all. There is no real harm in having an extra
+ numbered line, although it can be a bit annoying for the
+ user. However, it totally screws up our testsuite.
+
+ So for now, keep adjusting the address of the first N_SLINE
+ stab, but only for code compiled with GCC. */
+
+ if (within_function && sline_found_in_function == 0)
+ {
+ CORE_ADDR addr = processing_gcc_compilation == 2 ?
+ last_function_start : valu;
+
+ record_line
+ (get_current_subfile (), desc,
+ unrelocated_addr (gdbarch_addr_bits_remove (gdbarch, addr)
+ - objfile->text_section_offset ()));
+ sline_found_in_function = 1;
+ }
+ else
+ record_line
+ (get_current_subfile (), desc,
+ unrelocated_addr (gdbarch_addr_bits_remove (gdbarch, valu)
+ - objfile->text_section_offset ()));
+ break;
+
+ case N_BCOMM:
+ common_block_start (name, objfile);
+ break;
+
+ case N_ECOMM:
+ common_block_end (objfile);
+ break;
+
+ /* The following symbol types need to have the appropriate
+ offset added to their value; then we process symbol
+ definitions in the name. */
+
+ case N_STSYM: /* Static symbol in data segment. */
+ case N_LCSYM: /* Static symbol in BSS segment. */
+ case N_ROSYM: /* Static symbol in read-only data segment. */
+ /* HORRID HACK DEPT. However, it's Sun's furgin' fault.
+ Solaris 2's stabs-in-elf makes *most* symbols relative but
+ leaves a few absolute (at least for Solaris 2.1 and version
+ 2.0.1 of the SunPRO compiler). N_STSYM and friends sit on
+ the fence. .stab "foo:S...",N_STSYM is absolute (ld
+ relocates it) .stab "foo:V...",N_STSYM is relative (section
+ base subtracted). This leaves us no choice but to search for
+ the 'S' or 'V'... (or pass the whole section_offsets stuff
+ down ONE MORE function call level, which we really don't want
+ to do). */
+ {
+ const char *p;
+
+ /* Normal object file and NLMs have non-zero text seg offsets,
+ but don't need their static syms offset in this fashion.
+ XXX - This is really a crock that should be fixed in the
+ solib handling code so that I don't have to work around it
+ here. */
+
+ if (!key->ctx.symfile_relocatable)
+ {
+ p = strchr (name, ':');
+ if (p != 0 && p[1] == 'S')
+ {
+ /* The linker relocated it. We don't want to add a
+ Sun-stabs Tfoo.foo-like offset, but we *do*
+ want to add whatever solib.c passed to
+ symbol_file_add as addr (this is known to affect
+ SunOS 4, and I suspect ELF too). Since there is no
+ Ttext.text symbol, we can get addr from the text offset. */
+ section_index = SECT_OFF_TEXT (objfile);
+ valu += section_offsets[SECT_OFF_TEXT (objfile)];
+ goto define_a_symbol;
+ }
+ }
+ /* Since it's not the kludge case, re-dispatch to the right
+ handler. */
+ switch (type)
+ {
+ case N_STSYM:
+ goto case_N_STSYM;
+ case N_LCSYM:
+ goto case_N_LCSYM;
+ case N_ROSYM:
+ goto case_N_ROSYM;
+ default:
+ internal_error (_("failed internal consistency check"));
+ }
+ }
+
+ case_N_STSYM: /* Static symbol in data segment. */
+ case N_DSLINE: /* Source line number, data segment. */
+ section_index = SECT_OFF_DATA (objfile);
+ valu += section_offsets[SECT_OFF_DATA (objfile)];
+ goto define_a_symbol;
+
+ case_N_LCSYM: /* Static symbol in BSS segment. */
+ case N_BSLINE: /* Source line number, BSS segment. */
+ /* N_BROWS: overlaps with N_BSLINE. */
+ section_index = SECT_OFF_BSS (objfile);
+ valu += section_offsets[SECT_OFF_BSS (objfile)];
+ goto define_a_symbol;
+
+ case_N_ROSYM: /* Static symbol in read-only data segment. */
+ section_index = SECT_OFF_RODATA (objfile);
+ valu += section_offsets[SECT_OFF_RODATA (objfile)];
+ goto define_a_symbol;
+
+ case N_ENTRY: /* Alternate entry point. */
+ /* Relocate for dynamic loading. */
+ section_index = SECT_OFF_TEXT (objfile);
+ valu += section_offsets[SECT_OFF_TEXT (objfile)];
+ goto define_a_symbol;
+
+ /* The following symbol types we don't know how to process.
+ Handle them in a "default" way, but complain to people who
+ care. */
+ default:
+ case N_CATCH: /* Exception handler catcher. */
+ case N_EHDECL: /* Exception handler name. */
+ case N_PC: /* Global symbol in Pascal. */
+ case N_M2C: /* Modula-2 compilation unit. */
+ /* N_MOD2: overlaps with N_EHDECL. */
+ case N_SCOPE: /* Modula-2 scope information. */
+ case N_ECOML: /* End common (local name). */
+ case N_NBTEXT: /* Gould Non-Base-Register symbols??? */
+ case N_NBDATA:
+ case N_NBBSS:
+ case N_NBSTS:
+ case N_NBLCS:
+ unknown_symtype_complaint (hex_string (type));
+
+ define_a_symbol:
+ [[fallthrough]];
+ /* These symbol types don't need the address field relocated,
+ since it is either unused, or is absolute. */
+ case N_GSYM: /* Global variable. */
+ case N_NSYMS: /* Number of symbols (Ultrix). */
+ case N_NOMAP: /* No map? (Ultrix). */
+ case N_RSYM: /* Register variable. */
+ case N_DEFD: /* Modula-2 GNU module dependency. */
+ case N_SSYM: /* Struct or union element. */
+ case N_LSYM: /* Local symbol in stack. */
+ case N_PSYM: /* Parameter variable. */
+ case N_LENG: /* Length of preceding symbol type. */
+ if (name)
+ {
+ int deftype;
+ const char *colon_pos = strchr (name, ':');
+
+ if (colon_pos == NULL)
+ deftype = '\0';
+ else
+ deftype = colon_pos[1];
+
+ switch (deftype)
+ {
+ case 'f':
+ case 'F':
+ /* Deal with the SunPRO 3.0 compiler which omits the
+ address from N_FUN symbols. */
+ if (type == N_FUN
+ && valu == section_offsets[SECT_OFF_TEXT (objfile)]
+ && gdbarch_sofun_address_maybe_missing (gdbarch))
+ {
+ bound_minimal_symbol minsym
+ = find_stab_function (name, get_last_source_file (),
+ objfile);
+ if (minsym.minsym != NULL)
+ valu = minsym.value_address ();
+ }
+
+ /* These addresses are absolute. */
+ function_start_offset = valu;
+
+ within_function = 1;
+
+ if (get_context_stack_depth () > 1)
+ {
+ complaint (_("unmatched N_LBRAC before symtab pos %d"),
+ symnum);
+ break;
+ }
+
+ if (!outermost_context_p ())
+ {
+ struct block *block;
+
+ cstk = pop_context ();
+ /* Make a block for the local symbols within. */
+ block = finish_block (cstk.name,
+ cstk.old_blocks, NULL,
+ cstk.start_addr, valu);
+
+ /* For C++, set the block's scope. */
+ if (cstk.name->language () == language_cplus)
+ cp_set_block_scope (cstk.name, block,
+ &objfile->objfile_obstack);
+ }
+
+ newobj = push_context (0, valu);
+ newobj->name = define_symbol (valu, name, desc, type, objfile);
+ if (newobj->name != nullptr)
+ newobj->name->set_section_index (section_index);
+ break;
+
+ default:
+ {
+ struct symbol *sym = define_symbol (valu, name, desc, type,
+ objfile);
+ if (sym != nullptr)
+ sym->set_section_index (section_index);
+ }
+ break;
+ }
+ }
+ break;
+
+ /* We use N_OPT to carry the gcc2_compiled flag. Sun uses it
+ for a bunch of other flags, too. Someday we may parse their
+ flags; for now we ignore theirs and hope they'll ignore ours. */
+ case N_OPT: /* Solaris 2: Compiler options. */
+ if (name)
+ {
+ if (strcmp (name, GCC2_COMPILED_FLAG_SYMBOL) == 0)
+ {
+ processing_gcc_compilation = 2;
+ }
+ else
+ n_opt_found = 1;
+ }
+ break;
+
+ case N_MAIN: /* Name of main routine. */
+ /* FIXME: If one has a symbol file with N_MAIN and then replaces
+ it with a symbol file with "main" and without N_MAIN. I'm
+ not sure exactly what rule to follow but probably something
+ like: N_MAIN takes precedence over "main" no matter what
+ objfile it is in; If there is more than one N_MAIN, choose
+ the one in the symfile_objfile; If there is more than one
+ N_MAIN within a given objfile, complain() and choose
+ arbitrarily. (kingdon) */
+ if (name != NULL)
+ set_objfile_main_name (objfile, name, language_unknown);
+ break;
+
+ /* The following symbol types can be ignored. */
+ case N_OBJ: /* Solaris 2: Object file dir and name. */
+ case N_PATCH: /* Solaris 2: Patch Run Time Checker. */
+ /* N_UNDF: Solaris 2: File separator mark. */
+ /* N_UNDF: -- we will never encounter it, since we only process
+ one file's symbols at once. */
+ case N_ENDM: /* Solaris 2: End of module. */
+ case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
+ break;
+ }
+
+ /* '#' is a GNU C extension to allow one symbol to refer to another
+ related symbol.
+
+ Generally this is used so that an alias can refer to its main
+ symbol. */
+ gdb_assert (name);
+ if (name[0] == '#')
+ {
+ /* Initialize symbol reference names and determine if this is a
+ definition. If a symbol reference is being defined, go ahead
+ and add it. Otherwise, just return. */
+
+ const char *s = name;
+ int refnum;
+
+ /* If this stab defines a new reference ID that is not on the
+ reference list, then put it on the reference list.
+
+ We go ahead and advance NAME past the reference, even though
+ it is not strictly necessary at this time. */
+ refnum = symbol_reference_defined (&s);
+ if (refnum >= 0)
+ if (!ref_search (refnum))
+ ref_add (refnum, 0, name, valu);
+ name = s;
+ }
+
+ previous_stab_code = type;
+}
+
#define VISIBILITY_PRIVATE '0' /* Stabs character for private field */
#define VISIBILITY_PROTECTED '1' /* Stabs character for protected fld */
#define VISIBILITY_PUBLIC '2' /* Stabs character for public field */
@@ -2289,7 +4774,7 @@ read_member_functions (struct stab_field_info *fip, const char **pp,
if ((*pp)[0] == 'o' && (*pp)[1] == 'p' && is_cplus_marker ((*pp)[2]))
{
- /* This is a completely wierd case. In order to stuff in the
+ /* This is a completely weird case. In order to stuff in the
names that might contain colons (the usual name delimiter),
Mike Tiemann defined a different name format which is
signalled if the identifier is "op$". In that case, the
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 0a86840..565038a 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -1,5 +1,5 @@
-/* Include file for stabs debugging format support functions.
- Copyright (C) 1986-2024 Free Software Foundation, Inc.
+ /* Include file for stabs debugging format support functions.
+ Copyright (C) 1986-2024 Free Software Foundation, Inc.
This file is part of GDB.
@@ -54,7 +54,7 @@ extern unsigned char processing_gcc_compilation;
extern int within_function;
/* Hash table of global symbols whose values are not known yet.
- They are chained thru the SYMBOL_VALUE_CHAIN, since we don't
+ They are chained through the SYMBOL_VALUE_CHAIN, since we don't
have the correct data for that slot yet.
The use of the LOC_BLOCK code in this chain is nonstandard--
@@ -173,7 +173,7 @@ class psymtab_storage;
/* Functions exported by dbxread.c. These are not in stabsread.c because
they are only used by some stabs readers. */
-extern legacy_psymtab *dbx_end_psymtab
+extern legacy_psymtab *stabs_end_psymtab
(struct objfile *objfile, psymtab_storage *partial_symtabs,
legacy_psymtab *pst,
const char **include_list, int num_includes,
@@ -185,6 +185,12 @@ extern void process_one_symbol (int, int, CORE_ADDR, const char *,
const section_offsets &,
struct objfile *, enum language);
+/* Setup partial_symtab's describing each source file for which
+ debugging information is available. */
+
+void
+read_stabs_symtab (struct objfile *, symfile_add_flags);
+
extern void elfstab_build_psymtabs (struct objfile *objfile,
asection *stabsect,
file_ptr stabstroffset,
@@ -215,4 +221,91 @@ extern void init_header_files (void);
extern void scan_file_globals (struct objfile *objfile);
+/* Complaints about the symbols we have encountered. */
+
+void
+unknown_symtype_complaint (const char *);
+
+void
+lbrac_mismatch_complaint (int);
+
+void
+repeated_header_complaint (const char *, int);
+
+bound_minimal_symbol
+find_stab_function (const char *, const char *, struct objfile *);
+
+/* This handles a single symbol from the symbol-file, building symbols
+ into a GDB symtab. It takes these arguments and an implicit argument.
+
+ TYPE is the type field of the ".stab" symbol entry.
+ DESC is the desc field of the ".stab" entry.
+ VALU is the value field of the ".stab" entry.
+ NAME is the symbol name, in our address space.
+ SECTION_OFFSETS is a set of amounts by which the sections of this
+ object file were relocated when it was loaded into memory. Note
+ that these section_offsets are not the objfile->section_offsets but
+ the pst->section_offsets. All symbols that refer to memory
+ locations need to be offset by these amounts.
+ OBJFILE is the object file from which we are reading symbols. It
+ is used in end_compunit_symtab.
+ LANGUAGE is the language of the symtab.
+*/
+
+void
+process_one_symbol (int, int, CORE_ADDR, const char *,
+ const section_offsets &,
+ struct objfile *, enum language);
+
+#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
+#define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
+#define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
+#define SYMBOL_SIZE(p) (SYMLOC(p)->symbol_size)
+#define SYMBOL_OFFSET(p) (SYMLOC(p)->symbol_offset)
+#define STRING_OFFSET(p) (SYMLOC(p)->string_offset)
+#define FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
+#define PST_LANGUAGE(p) (SYMLOC(p)->pst_language)
+
+#define INTERNALIZE_SYMBOL(intern, extern, abfd) \
+ { \
+ (intern).n_strx = bfd_h_get_32 (abfd, (extern)->e_strx); \
+ (intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type); \
+ (intern).n_other = 0; \
+ (intern).n_desc = bfd_h_get_16 (abfd, (extern)->e_desc); \
+ if (bfd_get_sign_extend_vma (abfd)) \
+ (intern).n_value = bfd_h_get_signed_32 (abfd, (extern)->e_value); \
+ else \
+ (intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value); \
+ }
+
+/* We put a pointer to this structure in the read_symtab_private field
+ of the psymtab. */
+
+struct symloc
+ {
+ /* Offset within the file symbol table of first local symbol for this
+ file. */
+
+ int ldsymoff;
+
+ /* Length (in bytes) of the section of the symbol table devoted to
+ this file's symbols (actually, the section bracketed may contain
+ more than just this file's symbols). If ldsymlen is 0, the only
+ reason for this thing's existence is the dependency list. Nothing
+ else will happen when it is read in. */
+
+ int ldsymlen;
+
+ /* The size of each symbol in the symbol file (in external form). */
+
+ int symbol_size;
+
+ /* Further information needed to locate the symbols if they are in
+ an ELF file. */
+
+ int symbol_offset;
+ int string_offset;
+ int file_string_offset;
+ enum language pst_language;
+ };
#endif /* STABSREAD_H */
diff --git a/gdb/stack.c b/gdb/stack.c
index b7a102e..4a3e7e4 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -50,7 +50,6 @@
#include "linespec.h"
#include "cli/cli-utils.h"
#include "objfiles.h"
-#include "annotate.h"
#include "symfile.h"
#include "extension.h"
@@ -1418,7 +1417,7 @@ print_frame (struct ui_out *uiout,
annotate_frame_source_file_end ();
uiout->text (":");
annotate_frame_source_line ();
- uiout->field_signed ("line", sal.line);
+ uiout->field_signed ("line", sal.line, line_number_style.style ());
annotate_frame_source_end ();
}
diff --git a/gdb/stubs/ia64vms-stub.c b/gdb/stubs/ia64vms-stub.c
index e7578d8..7e08119 100644
--- a/gdb/stubs/ia64vms-stub.c
+++ b/gdb/stubs/ia64vms-stub.c
@@ -210,7 +210,7 @@ union ia64_ireg
/* Predicate registers: There are 64 of these 1-bit registers. We
define a single register which is used to communicate these values
to/from the target. We will somehow contrive to make it appear
- that IA64_PR0_REGNUM thru IA64_PR63_REGNUM hold the actual values. */
+ that IA64_PR0_REGNUM through IA64_PR63_REGNUM hold the actual values. */
#define IA64_PR_REGNUM 330
/* Instruction pointer: 64 bits wide. */
@@ -311,7 +311,7 @@ term_raw_write (const char *str, unsigned int len)
LIB$SIGNAL (status);
}
-/* Flush ther term buffer. */
+/* Flush the term buffer. */
static void
term_flush (void)
diff --git a/gdb/stubs/m32r-stub.c b/gdb/stubs/m32r-stub.c
index 8ac71f1..16be231 100644
--- a/gdb/stubs/m32r-stub.c
+++ b/gdb/stubs/m32r-stub.c
@@ -975,7 +975,7 @@ isShortBranch (unsigned char *instr)
if (instr0 == 0x1E || instr0 == 0x1F) /* JL or JMP */
if ((instr[1] & 0xF0) == 0xC0)
- return 2; /* jump thru a register */
+ return 2; /* jump through a register. */
if (instr0 == 0x7C || instr0 == 0x7D || /* BC, BNC, BL, BRA */
instr0 == 0x7E || instr0 == 0x7F)
@@ -1088,7 +1088,7 @@ branchDestination (unsigned char *instr, int branchCode)
case 1: /* RTE */
return registers[BPC] & ~3; /* pop BPC into PC */
case 2: /* JL or JMP */
- return registers[instr[1] & 0x0F] & ~3; /* jump thru a register */
+ return registers[instr[1] & 0x0F] & ~3; /* jump through a register. */
case 3: /* BC, BNC, BL, BRA (short, 8-bit relative offset) */
return (((int) instr) & ~3) + ((char) instr[1] << 2);
case 4: /* BC, BNC, BL, BRA (long, 24-bit relative offset) */
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c
index 0eccda2..6bf8dc3 100644
--- a/gdb/symfile-debug.c
+++ b/gdb/symfile-debug.c
@@ -376,7 +376,8 @@ objfile::expand_symtabs_matching
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain)
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
{
/* This invariant is documented in quick-functions.h. */
gdb_assert (lookup_name != nullptr || symbol_matcher == nullptr);
@@ -393,7 +394,8 @@ objfile::expand_symtabs_matching
for (const auto &iter : qf)
if (!iter->expand_symtabs_matching (this, file_matcher, lookup_name,
symbol_matcher, expansion_notify,
- search_flags, domain))
+ search_flags, domain,
+ lang_matcher))
return false;
return true;
}
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 2292eca..1502fdb 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3759,7 +3759,8 @@ expand_symtabs_matching
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain)
+ domain_search_flags domain,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher)
{
for (objfile *objfile : current_program_space->objfiles ())
if (!objfile->expand_symtabs_matching (file_matcher,
@@ -3767,7 +3768,8 @@ expand_symtabs_matching
symbol_matcher,
expansion_notify,
search_flags,
- domain))
+ domain,
+ lang_matcher))
return false;
return true;
}
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 508ba48..74187c8 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -352,7 +352,9 @@ bool expand_symtabs_matching
gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
block_search_flags search_flags,
- domain_search_flags kind);
+ domain_search_flags kind,
+ gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher
+ = nullptr);
void map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
bool need_fullname);
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 7f81415..a484fb2 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -377,7 +377,9 @@ static void
maintenance_print_symbols (const char *args, int from_tty)
{
struct ui_file *outfile = gdb_stdout;
- char *address_arg = NULL, *source_arg = NULL, *objfile_arg = NULL;
+ const char *address_arg = nullptr;
+ const char *source_arg = nullptr;
+ const char *objfile_arg = nullptr;
int i, outfile_idx;
dont_repeat ();
@@ -655,7 +657,7 @@ static void
maintenance_print_msymbols (const char *args, int from_tty)
{
struct ui_file *outfile = gdb_stdout;
- char *objfile_arg = NULL;
+ const char *objfile_arg = nullptr;
int i, outfile_idx;
dont_repeat ();
@@ -887,7 +889,7 @@ maintenance_check_symtabs (const char *ignore, int from_tty)
static void
maintenance_expand_symtabs (const char *args, int from_tty)
{
- char *regexp = NULL;
+ const char *regexp = nullptr;
/* We use buildargv here so that we handle spaces in the regexp
in a way that allows adding more arguments later. */
@@ -903,18 +905,25 @@ maintenance_expand_symtabs (const char *args, int from_tty)
}
}
- if (regexp)
- re_comp (regexp);
+ if (regexp == nullptr)
+ {
+ for (struct program_space *pspace : program_spaces)
+ for (objfile *objfile : pspace->objfiles ())
+ objfile->expand_all_symtabs ();
+
+ return;
+ }
+
+ re_comp (regexp);
for (struct program_space *pspace : program_spaces)
for (objfile *objfile : pspace->objfiles ())
objfile->expand_symtabs_matching
([&] (const char *filename, bool basenames)
- {
- /* KISS: Only apply the regexp to the complete file name. */
- return (!basenames
- && (regexp == NULL || re_exec (filename)));
- },
+ {
+ /* KISS: Only apply the regexp to the complete file name. */
+ return !basenames && re_exec (filename);
+ },
NULL,
NULL,
NULL,
@@ -990,7 +999,8 @@ maintenance_print_one_line_table (struct symtab *symtab, void *data)
ui_out_emit_tuple tuple_emitter (uiout, nullptr);
uiout->field_signed ("index", i);
if (item->line > 0)
- uiout->field_signed ("line", item->line);
+ uiout->field_signed ("line", item->line,
+ line_number_style.style ());
else
uiout->field_string ("line", _("END"));
uiout->field_core_addr ("rel-address", objfile->arch (),
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 3d8dcac63..a479e92 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -700,15 +700,10 @@ iterate_over_some_symtabs (const char *name,
return false;
}
-/* Check for a symtab of a specific name; first in symtabs, then in
- psymtabs. *If* there is no '/' in the name, a match after a '/'
- in the symtab filename will also work.
-
- Calls CALLBACK with each symtab that is found. If CALLBACK returns
- true, the search stops. */
+/* See symtab.h. */
void
-iterate_over_symtabs (const char *name,
+iterate_over_symtabs (program_space *pspace, const char *name,
gdb::function_view<bool (symtab *)> callback)
{
gdb::unique_xmalloc_ptr<char> real_path;
@@ -721,34 +716,28 @@ iterate_over_symtabs (const char *name,
gdb_assert (IS_ABSOLUTE_PATH (real_path.get ()));
}
- for (objfile *objfile : current_program_space->objfiles ())
- {
- if (iterate_over_some_symtabs (name, real_path.get (),
- objfile->compunit_symtabs, NULL,
- callback))
+ for (objfile *objfile : pspace->objfiles ())
+ if (iterate_over_some_symtabs (name, real_path.get (),
+ objfile->compunit_symtabs, nullptr,
+ callback))
return;
- }
- /* Same search rules as above apply here, but now we look thru the
+ /* Same search rules as above apply here, but now we look through the
psymtabs. */
-
- for (objfile *objfile : current_program_space->objfiles ())
- {
- if (objfile->map_symtabs_matching_filename (name, real_path.get (),
- callback))
- return;
- }
+ for (objfile *objfile : pspace->objfiles ())
+ if (objfile->map_symtabs_matching_filename (name, real_path.get (),
+ callback))
+ return;
}
-/* A wrapper for iterate_over_symtabs that returns the first matching
- symtab, or NULL. */
+/* See symtab.h. */
-struct symtab *
-lookup_symtab (const char *name)
+symtab *
+lookup_symtab (program_space *pspace, const char *name)
{
struct symtab *result = NULL;
- iterate_over_symtabs (name, [&] (symtab *symtab)
+ iterate_over_symtabs (pspace, name, [&] (symtab *symtab)
{
result = symtab;
return true;
@@ -3003,7 +2992,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
section. */
}
- /* Cust is best found sofar, save it. */
+ /* Cust is best found so far, save it. */
best_cust = cust;
best_cust_range = range;
}
@@ -6317,7 +6306,7 @@ collect_file_symbol_completion_matches (completion_tracker &tracker,
/* Go through symtabs for SRCFILE and check the externs and statics
for symbols which match. */
- iterate_over_symtabs (srcfile, [&] (symtab *s)
+ iterate_over_symtabs (current_program_space, srcfile, [&] (symtab *s)
{
add_symtab_completions (s->compunit (),
tracker, mode, lookup_name,
diff --git a/gdb/symtab.h b/gdb/symtab.h
index d615fdf..aa86a80 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -601,20 +601,20 @@ struct general_symbol_info
section_offsets for this objfile. Negative means that the symbol
does not get relocated relative to a section. */
- short m_section;
+ int m_section;
/* Set the index into the obj_section list (within the containing
objfile) for the section that contains this symbol. See M_SECTION
for more details. */
- void set_section_index (short idx)
+ void set_section_index (int idx)
{ m_section = idx; }
/* Return the index into the obj_section list (within the containing
objfile) for the section that contains this symbol. See M_SECTION
for more details. */
- short section_index () const
+ auto section_index () const
{ return m_section; }
/* Return the obj_section from OBJFILE for this symbol. The symbol
@@ -808,7 +808,7 @@ struct minimal_symbol : public general_symbol_info
m_target_flag_2 = target_flag_2;
}
- /* Size of this symbol. dbx_end_psymtab in dbxread.c uses this
+ /* Size of this symbol. stabs_end_psymtab in stabsread.c uses this
information to calculate the end of the partial symtab based on the
address of the last symbol plus the size of the last symbol. */
@@ -2089,9 +2089,9 @@ extern const char multiple_symbols_cancel[];
const char *multiple_symbols_select_mode (void);
-/* lookup a symbol table by source file name. */
+/* Lookup a symbol table in PSPACE by source file name. */
-extern struct symtab *lookup_symtab (const char *);
+extern symtab *lookup_symtab (program_space *pspace, const char *name);
/* An object of this type is passed as the 'is_a_field_of_this'
argument to lookup_symbol and lookup_symbol_in_language. */
@@ -2808,9 +2808,15 @@ bool iterate_over_some_symtabs (const char *name,
struct compunit_symtab *after_last,
gdb::function_view<bool (symtab *)> callback);
-void iterate_over_symtabs (const char *name,
- gdb::function_view<bool (symtab *)> callback);
+/* Check in PSPACE for a symtab of a specific name; first in symtabs, then in
+ psymtabs. *If* there is no '/' in the name, a match after a '/' in the
+ symtab filename will also work.
+
+ Call CALLBACK with each symtab that is found. If CALLBACK returns
+ true, the search stops. */
+void iterate_over_symtabs (program_space *pspace, const char *name,
+ gdb::function_view<bool (symtab *)> callback);
std::vector<CORE_ADDR> find_pcs_for_symtab_line
(struct symtab *symtab, int line, const linetable_entry **best_entry);
diff --git a/gdb/target-debug.h b/gdb/target-debug.h
index bba51eb..4a4e72e 100644
--- a/gdb/target-debug.h
+++ b/gdb/target-debug.h
@@ -368,8 +368,6 @@ target_debug_print_x86_xsave_layout (const x86_xsave_layout &layout)
string_appendf (s, ", " #region "_offset=%d", layout.region##_offset);
POFFS(avx);
- POFFS(bndregs);
- POFFS(bndcfg);
POFFS(k);
POFFS(zmm_h);
POFFS(zmm);
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index d78da14..1bd22c2 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -1200,12 +1200,6 @@ set_tdesc_architecture (struct target_desc *target_desc,
/* See gdbsupport/tdesc.h. */
void
-set_tdesc_osabi (struct target_desc *target_desc, const char *name)
-{
- set_tdesc_osabi (target_desc, osabi_from_tdesc_string (name));
-}
-
-void
set_tdesc_osabi (struct target_desc *target_desc, enum gdb_osabi osabi)
{
target_desc->osabi = osabi;
@@ -1317,9 +1311,8 @@ public:
if (tdesc_osabi (e) > GDB_OSABI_UNKNOWN
&& tdesc_osabi (e) < GDB_OSABI_INVALID)
{
- gdb_printf
- (" set_tdesc_osabi (result.get (), osabi_from_tdesc_string (\"%s\"));\n",
- gdbarch_osabi_name (tdesc_osabi (e)));
+ const char *enum_name = gdbarch_osabi_enum_name (tdesc_osabi (e));
+ gdb_printf (" set_tdesc_osabi (result.get (), %s);\n", enum_name);
gdb_printf ("\n");
}
diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h
index d708dbd..dc83db0 100644
--- a/gdb/target-descriptions.h
+++ b/gdb/target-descriptions.h
@@ -219,7 +219,6 @@ int tdesc_register_in_reggroup_p (struct gdbarch *gdbarch, int regno,
void set_tdesc_architecture (struct target_desc *,
const struct bfd_arch_info *);
-void set_tdesc_osabi (struct target_desc *, enum gdb_osabi osabi);
void set_tdesc_property (struct target_desc *,
const char *key, const char *value);
void tdesc_add_compatible (struct target_desc *,
diff --git a/gdb/target.c b/gdb/target.c
index 47f09f5..4378c05 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1754,7 +1754,7 @@ target_xfer_partial (struct target_ops *ops,
If an error occurs, no guarantee is made about the contents of the data at
MYADDR. In particular, the caller should not depend upon partial reads
filling the buffer with good data. There is no way for the caller to know
- how much good data might have been transfered anyway. Callers that can
+ how much good data might have been transferred anyway. Callers that can
deal with partial reads should call target_read (which will retry until
it makes no progress, and then return how much was transferred). */
@@ -2575,18 +2575,12 @@ target_wait (ptid_t ptid, struct target_waitstatus *status,
if (!target_can_async_p (target))
gdb_assert ((options & TARGET_WNOHANG) == 0);
- try
- {
- gdb::observers::target_pre_wait.notify (ptid);
- ptid_t event_ptid = target->wait (ptid, status, options);
- gdb::observers::target_post_wait.notify (event_ptid);
- return event_ptid;
- }
- catch (...)
- {
- gdb::observers::target_post_wait.notify (null_ptid);
- throw;
- }
+ ptid_t event_ptid = null_ptid;
+ SCOPE_EXIT { gdb::observers::target_post_wait.notify (event_ptid); };
+ gdb::observers::target_pre_wait.notify (ptid);
+ event_ptid = target->wait (ptid, status, options);
+
+ return event_ptid;
}
/* See target.h. */
diff --git a/gdb/target.h b/gdb/target.h
index dcf68a6..6da58c7 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -134,7 +134,7 @@ enum inferior_event_type
INF_EXEC_COMPLETE,
};
-/* Target objects which can be transfered using target_read,
+/* Target objects which can be transferred using target_read,
target_write, et cetera. */
enum target_object
@@ -156,7 +156,7 @@ enum target_object
TARGET_OBJECT_CODE_MEMORY,
/* Kernel Unwind Table. See "ia64-tdep.c". */
TARGET_OBJECT_UNWIND_TABLE,
- /* Transfer auxilliary vector. */
+ /* Transfer auxiliary vector. */
TARGET_OBJECT_AUXV,
/* StackGhost cookie. See "sparc-tdep.c". */
TARGET_OBJECT_WCOOKIE,
@@ -177,7 +177,7 @@ enum target_object
/* Currently loaded libraries specific to AIX systems, in XML format. */
TARGET_OBJECT_LIBRARIES_AIX,
/* Get OS specific data. The ANNEX specifies the type (running
- processes, etc.). The data being transfered is expected to follow
+ processes, etc.). The data being transferred is expected to follow
the DTD specified in features/osdata.dtd. */
TARGET_OBJECT_OSDATA,
/* Extra signal info. Usually the contents of `siginfo_t' on unix
@@ -821,7 +821,7 @@ struct target_ops
transferring if desired. This is handled in target.c.
The interface does not support a "retry" mechanism. Instead it
- assumes that at least one addressable unit will be transfered on each
+ assumes that at least one addressable unit will be transferred on each
successful call.
NOTE: cagney/2003-10-17: The current interface can lead to
diff --git a/gdb/testsuite/gdb.ada/call_pn.exp b/gdb/testsuite/gdb.ada/call_pn.exp
index 5d7e828..9114d30 100644
--- a/gdb/testsuite/gdb.ada/call_pn.exp
+++ b/gdb/testsuite/gdb.ada/call_pn.exp
@@ -35,7 +35,10 @@ if {![runto "foo.adb:$bp_location"]} {
# related to PR25764 - "LOC_UNRESOLVED symbol missing from partial symtab".
# Stabilize test results by ensuring that the xfail triggers for the "before"
# print.
-gdb_test_no_output "maint expand-symtabs"
+gdb_test_no_output {maint expand-symtabs "\(pck\|foo\)\.adb"}
+
+set gcc_major_version [gcc_major_version]
+set have_xfail [expr $gcc_major_version >= 8 && $gcc_major_version <= 9]
# The xfail is for PR gcc/94469, which occurs with target board
# unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects and gcc-8 and later.
@@ -52,7 +55,10 @@ set xfail_re \
# Make sure that last_node_id is set to zero...
gdb_test_multiple "print last_node_id" "print last_node_id before calling pn" {
-re $xfail_re {
- xfail $gdb_test_name
+ if { $have_xfail } {
+ setup_xfail *-*-*
+ }
+ fail $gdb_test_name
# One of the choices will print the correct value, the other one
# <optimized out>. Since we don't known which one to choose to get
# the correct value, cancel.
@@ -74,7 +80,10 @@ gdb_test "print pn(4321)" "= 4321"
# Make sure that last_node_id now has the correct value...
gdb_test_multiple "print last_node_id" "print last_node_id after calling pn" {
-re $xfail_re {
- xfail $gdb_test_name
+ if { $have_xfail } {
+ setup_xfail *-*-*
+ }
+ fail $gdb_test_name
# Cancel
gdb_test_multiple "0" "cancel after xfail 2" {
-re -wrap "cancelled" {
diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp
index 41ea8ae..6263c4e 100644
--- a/gdb/testsuite/gdb.ada/complete.exp
+++ b/gdb/testsuite/gdb.ada/complete.exp
@@ -124,7 +124,7 @@ test_gdb_complete "pck.my" \
"p pck.my_global_variable"
# A fully qualified package name
-test_gdb_complete "pck.inne" \
+test_gdb_complete "pck.inner" \
"p pck.inner.inside_variable" \
"complete fully qualified package name"
@@ -214,7 +214,7 @@ test_gdb_complete "ambiguous_f" \
test_gdb_complete "ambiguous_func" \
"p ambiguous_func"
-# Perform a test intented to verify the behavior where the number
+# Perform a test intended to verify the behavior where the number
# of possible completions is very large. The goal is not to verify
# precisely the list returned by the complete command (this depends
# on too many parameters -- targets, compiler version, runtime, etc).
diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp
index 8fb8d1c..69f386e 100644
--- a/gdb/testsuite/gdb.ada/exec_changed.exp
+++ b/gdb/testsuite/gdb.ada/exec_changed.exp
@@ -86,7 +86,7 @@ if { [gdb_start_cmd] < 0 } {
clean_restart "${binfile}$EXEEXT"
-# Ensure we don't accidently use the main symbol cache.
+# Ensure we don't accidentally use the main symbol cache.
gdb_test_no_output "mt set symbol-cache-size 0"
# Put something in the symbol lookup cache that will get looked up when
diff --git a/gdb/testsuite/gdb.ada/tagged-lookup.exp b/gdb/testsuite/gdb.ada/tagged-lookup.exp
index 3803319..f1473aa 100644
--- a/gdb/testsuite/gdb.ada/tagged-lookup.exp
+++ b/gdb/testsuite/gdb.ada/tagged-lookup.exp
@@ -51,11 +51,7 @@ gdb_test_multiple "print *the_local_var" "only one CU expanded" -lbl {
-re ".symtab-create. start_subfile: name = \[^,\]*, name_for_id = \[^\r\n\]*\r\n" {
exp_continue
}
- -re -wrap ".* = \\\(n => $decimal\\\)" {
- if {$found_pck + $found_pck2 <= 1} {
- pass $gdb_test_name
- } else {
- fail $gdb_test_name
- }
+ -re -wrap "" {
+ gdb_assert {$found_pck + $found_pck2 <= 1} $gdb_test_name
}
}
diff --git a/gdb/testsuite/gdb.ada/task_switch_in_core.exp b/gdb/testsuite/gdb.ada/task_switch_in_core.exp
index 63a951c..dd63bb8 100644
--- a/gdb/testsuite/gdb.ada/task_switch_in_core.exp
+++ b/gdb/testsuite/gdb.ada/task_switch_in_core.exp
@@ -41,7 +41,7 @@ if {!$core_supported} {
return -1
}
-# Now taht the core file has been created, we can start the real
+# Now that the core file has been created, we can start the real
# part of this testcase, which is to debug using that core file.
# Restart GDB and load that core file.
diff --git a/gdb/testsuite/gdb.arch/e500-prologue.exp b/gdb/testsuite/gdb.arch/e500-prologue.exp
index 50837ff..7732393 100644
--- a/gdb/testsuite/gdb.arch/e500-prologue.exp
+++ b/gdb/testsuite/gdb.arch/e500-prologue.exp
@@ -53,7 +53,7 @@ proc insert_breakpoint {function expected_location} {
# If we managed to get the breakpoing address, then check that
# we inserted it at the expected location by examining the
# instruction at that address (we're not interested in the insn
- # itself, but rather at the address printed at the begining of
+ # itself, but rather at the address printed at the beginning of
# the instruction).
if {$address != ""} {
gdb_test "x /i $address" \
diff --git a/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp b/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
index 9549b59..4ea86b4 100644
--- a/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
+++ b/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
@@ -33,6 +33,7 @@ if ![gdb_target_supports_trace] {
return -1
}
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
# Can't use prepare_for_testing, because that splits compiling into
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-call.c b/gdb/testsuite/gdb.arch/i386-mpx-call.c
deleted file mode 100644
index 5949202..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx-call.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Test for inferior function calls MPX context.
-
- Copyright (C) 2017-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 <http://www.gnu.org/licenses/>. */
-
-#include <stdlib.h>
-#include <string.h>
-
-/* Defined size for arrays. */
-#define ARRAY_LENGTH 5
-
-
-int
-upper (int *a, int *b, int *c, int *d, int len)
-{
- int value;
-
- value = *(a + len);
- value = *(b + len);
- value = *(c + len);
- value = *(d + len);
-
- value = value - *a + 1;
- return value;
-}
-
-
-int
-lower (int *a, int *b, int *c, int *d, int len)
-{
- int value;
-
- value = *(a - len);
- value = *(b - len);
- value = *(c - len);
- value = *(d - len);
-
- value = value - *a + 1;
- return value;
-}
-
-
-char
-char_upper (char *str, int length)
-{
- char ch;
- ch = *(str + length);
-
- return ch;
-}
-
-
-char
-char_lower (char *str, int length)
-{
- char ch;
- ch = *(str - length);
-
- return ch;
-}
-
-
-int
-main (void)
-{
- int sa[ARRAY_LENGTH];
- int sb[ARRAY_LENGTH];
- int sc[ARRAY_LENGTH];
- int sd[ARRAY_LENGTH];
- int *x, *a, *b, *c, *d;
- char mchar;
- char hello[] = "Hello";
-
- x = malloc (sizeof (int) * ARRAY_LENGTH);
- a = malloc (sizeof (int) * ARRAY_LENGTH);
- b = malloc (sizeof (int) * ARRAY_LENGTH);
- c = malloc (sizeof (int) * ARRAY_LENGTH);
- d = malloc (sizeof (int) * ARRAY_LENGTH);
-
- *x = upper (sa, sb, sc, sd, 0); /* bkpt 1. */
- *x = lower (a, b, c, d, 0);
-
- mchar = char_upper (hello, 10);
- mchar = char_lower (hello, 10);
-
- free (x);
- free (a);
- free (b);
- free (c);
- free (d);
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-call.exp b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
deleted file mode 100644
index e225484..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx-call.exp
+++ /dev/null
@@ -1,398 +0,0 @@
-# Copyright (C) 2017-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 <http://www.gnu.org/licenses/>.
-
-
-require {is_any_target "i?86-*-*" "x86_64-*-*"}
-
-standard_testfile
-
-require supports_mpx_check_pointer_bounds have_mpx
-
-set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat"
-
-if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
- [list debug additional_flags=${comp_flags}]] } {
- return -1
-}
-
-if ![runto_main] {
- return -1
-}
-
-set bounds_table 0
-gdb_test_multiple "disassemble upper" "" {
- -re -wrap "bndldx.*" {
- set bounds_table 1
- }
- -re -wrap "" {
- }
-}
-
-# Convenience for returning from an inferior call that causes a BND violation.
-#
-gdb_test_no_output "set confirm off"
-
-# Convenience variable.
-#
-set bound_reg " = \\\{lbound = $hex, ubound = $hex\\\}.*"
-set int_braw_reg " = \\\{lbound = 0x0, ubound_raw = 0x0\\\}.*"
-set bndcfg_reg " = \\\{raw = $hex, config = \\\{base = $hex, reserved = $hex,\
- preserved = $hex, enabled = $hex\\\}\\\}"
-set bndstatus_reg " = \\\{raw = $hex, status = \\\{bde = $hex,\
- error = $hex\\\}\\\}"
-set u_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \
- "Upper bound violation while accessing address $hex" \
- "Bounds: \\\[lower = $hex, upper = $hex\\\]"]
-
-
-# Simplify the tests below.
-#
-proc sanity_check_bndregs {arglist} {
-
- global int_braw_reg
-
- foreach a $arglist {
- gdb_test "p /x $a" "$int_braw_reg"\
- "$a"
- }
-}
-
-# Set bnd register to have no access to memory.
-#
-proc remove_memory_access {reg} {
- global hex
-
- sanity_check_bndregs {"\$bnd0raw" "\$bnd1raw" "\$bnd2raw" "\$bnd3raw"}
-
- gdb_test "p /x $reg.lbound = $reg.ubound" "= $hex"\
- "$reg lower bound set"
- gdb_test "p /x $reg.ubound = 0" " = 0x0"\
- "$reg upper bound set"
-}
-
-
-# Prepare convenience variables for bndconfig and status
-# for posterior comparison.
-#
-proc prepare_bndcfg_bndstatus {} {
-
- global bndcfg_reg
- global bndstatus_reg
-
- gdb_test "p /x \$temp_bndcfgu = \$bndcfgu" "$bndcfg_reg"\
- "bndcfgu should not change"
-
- gdb_test "p /x \$temp_bndstatus = \$bndstatus" "$bndstatus_reg"\
- "bndstatus should not change"
-}
-
-# Compare values set for convenience variables and actual values of bndconfig
-# and bndstatus registers.
-#
-proc compare_bndstatus_with_convenience {} {
-
- gdb_test "p \$temp_bndcfgu == \$bndcfgu" "= 1"\
- "bndcfgu compare before and after"
- gdb_test "p \$temp_bndstatus == \$bndstatus" "= 1"\
- "bndstatus compare before and after"
-}
-
-# Perform an inferior call defined in func.
-#
-proc perform_a_call {func} {
-
- global inf_call_stopped
- global gdb_prompt
-
- gdb_test "p /x $func" [multi_line "The program being debugged\
- stopped while in a function called from GDB." \
- "Evaluation of the expression containing the\
- function.*" \
- ] "inferior call stopped"
-}
-
-# Perform an inferior call defined in func.
-#
-proc check_bound_violation {parm parm_type is_positive} {
-
- global u_fault bounds_table
-
- set have_bnd_violation 0
- gdb_test_multiple "continue" "continue to a bnd violation" {
- -re -wrap "Continuing\." {
- if { $bounds_table } {
- pass $gdb_test_name
- } else {
- fail $gdb_test_name
- }
- }
- -re -wrap "$u_fault.*" {
- pass $gdb_test_name
- set have_bnd_violation 1
- }
- }
- if { ! $have_bnd_violation } {
- return
- }
-
- set message "access only one position"
- if {$is_positive == 1} {
- gdb_test "p (((void *)\$_siginfo._sifields._sigfault.si_addr\
- - (void*)$parm))/sizeof($parm_type) == 1"\
- " = 1" $message
- } else {
- gdb_test "p ((void*)$parm\
- - (void *)\$_siginfo._sifields._sigfault.si_addr)\
- /sizeof($parm_type) == 1"\
- " = 1" $message
- }
- gdb_test "return" "\\\#.*main.*i386-mpx-call\\\.c:.*" "return from the fault"
-}
-
-
-# Start testing!
-#
-
-# Set up for stopping in the middle of main for calling a function in the
-# inferior.
-#
-set break "bkpt 1."
-gdb_breakpoint [gdb_get_line_number "${break}"]
-gdb_continue_to_breakpoint "${break}" ".*${break}.*"
-
-
-# Consistency:
-# default run execution of call should succeed without violations.
-#
-with_test_prefix "default_run" {
-
- gdb_test "p \$keep_bnd0_value=\$bnd0" $bound_reg\
- "store bnd0 register in a convenience variable"
-
- gdb_test "p /x upper (a, b, c, d, 0)" " = $hex"\
- "default inferior call"
-
- gdb_test "p ((\$bnd0.lbound==\$keep_bnd0_value.lbound) &&\
- (\$bnd0.ubound==\$keep_bnd0_value.ubound))" "= 1" \
- "bnd register value after and before call"
-}
-
-# Consistency: Examine bnd registers values before and after the call.
-#
-#
-with_test_prefix "verify_default_values" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*upper"
- perform_a_call "upper (a, b, c, d, 1)"
-
- sanity_check_bndregs {"\$bnd0raw" "\$bnd1raw" "\$bnd2raw" "\$bnd3raw"}
-
- compare_bndstatus_with_convenience
-
- gdb_test_multiple "continue" "inferior call test" {
- -re ".*Continuing.\r\n$gdb_prompt " {
- pass "inferior call performed"
- }
- }
-}
-
-# Examine: Cause an upper bound violation changing BND0.
-#
-#
-with_test_prefix "upper_bnd0" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*upper"
- perform_a_call "upper (a, b, c, d, 1)"
-
- remove_memory_access "\$bnd0"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "a" "int" 1
-}
-
-# Examine: Cause an upper bound violation changing BND1.
-#
-#
-with_test_prefix "upper_bnd1" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*upper"
- perform_a_call "upper (a, b, c, d, 1)"
-
- remove_memory_access "\$bnd1"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "b" "int" 1
-}
-
-# Examine: Cause an upper bound violation changing BND2.
-#
-#
-with_test_prefix "upper_bnd2" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*upper"
- perform_a_call "upper (a, b, c, d, 1)"
-
- remove_memory_access "\$bnd2"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "c" "int" 1
-}
-
-# Examine: Cause an upper bound violation changing BND3.
-#
-#
-with_test_prefix "upper_bnd3" {
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*upper"
- perform_a_call "upper (a, b, c, d, 1)"
-
- remove_memory_access "\$bnd3"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "d" "int" 1
-}
-
-# Examine: Cause a lower bound violation changing BND0.
-#
-#
-with_test_prefix "lower_bnd0" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*lower"
- perform_a_call "lower (a, b, c, d, 1)"
-
- remove_memory_access "\$bnd0"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "a" "int" 0
-}
-
-# Examine: Cause a lower bound violation changing BND1.
-#
-#
-with_test_prefix "lower_bnd1" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*lower"
- perform_a_call "lower (a, b, c, d, 1)"
-
- remove_memory_access "\$bnd1"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "b" "int" 0
-}
-
-# Examine: Cause a lower bound violation changing BND2.
-#
-#
-with_test_prefix "lower_bnd2" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*lower"
- perform_a_call "lower (a, b, c, d, 1)"
-
- remove_memory_access "\$bnd2"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "c" "int" 0
-}
-
-# Examine: Cause a lower bound violation changing BND3.
-#
-#
-with_test_prefix "lower_bnd3" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*lower"
- perform_a_call "lower (a, b, c, d, 1)"
-
- remove_memory_access "\$bnd3"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "d" "int" 0
-}
-
-# Examine: String causing a upper bound violation changing BND0.
-#
-#
-with_test_prefix "chars_up" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*char_upper"
- perform_a_call "char_upper (hello, 1)"
-
- remove_memory_access "\$bnd0"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "str" "char" 1
-}
-
-
-# Examine: String causing an lower bound violation changing BND0.
-#
-#
-with_test_prefix "chars_low" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*char_lower"
- perform_a_call "char_lower (hello, 1)"
-
- remove_memory_access "\$bnd0"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "str" "char" 0
-}
-
-# Examine: String causing an lower bound violation changing BND0.
-#
-#
-with_test_prefix "chars_low_adhoc_parm" {
-
- prepare_bndcfg_bndstatus
-
- gdb_breakpoint "*char_lower"
- perform_a_call "char_lower (\"tryme\", 1)"
-
- remove_memory_access "\$bnd0"
-
- compare_bndstatus_with_convenience
-
- check_bound_violation "str" "char" 0
-}
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-map.c b/gdb/testsuite/gdb.arch/i386-mpx-map.c
deleted file mode 100644
index c072e74..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx-map.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Test program for MPX map allocated bounds.
-
- Copyright 2015-2024 Free Software Foundation, Inc.
-
- Contributed by Intel Corp. <walfred.tedeschi@intel.com>
- <mircea.gherzan@intel.com>
-
- 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 <http://www.gnu.org/licenses/>. */
-
-#include <stdlib.h>
-#define SIZE 5
-
-typedef int T;
-
-void
-foo (T *p)
-{
- T *x;
-
-#if defined __GNUC__ && !defined __INTEL_COMPILER
- __bnd_store_ptr_bounds (p, &p);
-#endif
-
- x = p + SIZE - 1;
-
-#if defined __GNUC__ && !defined __INTEL_COMPILER
- __bnd_store_ptr_bounds (x, &x);
-#endif
- /* Dummy assign. */
- x = x + 1; /* after-assign */
- return;
-}
-
-int
-main (void)
-{
- T *a = NULL;
-
- a = calloc (SIZE, sizeof (T)); /* after-decl */
-#if defined __GNUC__ && !defined __INTEL_COMPILER
- __bnd_store_ptr_bounds (a, &a);
-#endif
-
- foo (a); /* after-alloc */
- free (a);
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-map.exp b/gdb/testsuite/gdb.arch/i386-mpx-map.exp
deleted file mode 100644
index d955187..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx-map.exp
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2015-2024 Free Software Foundation, Inc.
-#
-# Contributed by Intel Corp. <walfred.tedeschi@intel.com>,
-# <mircea.gherzan@intel.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-require {is_any_target i?86-*-* x86_64-*-*}
-
-standard_testfile
-
-require supports_mpx_check_pointer_bounds have_mpx
-
-set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
-
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
- [list debug nowarnings additional_flags=${comp_flags}]] } {
- return -1
-}
-
-if ![runto_main] {
- return -1
-}
-
-gdb_breakpoint [ gdb_get_line_number "after-decl" ]
-gdb_breakpoint [ gdb_get_line_number "after-alloc" ]
-gdb_breakpoint [ gdb_get_line_number "after-assign" ]
-
-gdb_test "show mpx bound 0x0" "Invalid bounds directory entry at $hex." "NULL address of the pointer"
-
-gdb_continue_to_breakpoint "after-decl" ".*after-decl.*"
-gdb_test "show mpx bound a" "Invalid bounds directory entry at $hex." "pointer instead of pointer address"
-
-gdb_continue_to_breakpoint "after-alloc" ".*after-alloc.*"
-gdb_test "show mpx bound a" "\\\{lbound = $hex, ubound = $hex\\\}: pointer value = $hex, size = \[8, 4\], metadata = 0x0+" "pointer after allocation"
-
-gdb_continue_to_breakpoint "after-assign" ".*after-assign.*"
-gdb_test "show mpx bound x" "\\\{lbound = $hex, ubound = $hex\\\}: pointer value = $hex, size = \[8, 4\], metadata = 0x0+" "pointer after assignment"
-gdb_test "set mpx bound 0x0, 0x1, 0x2" "Invalid bounds directory entry at $hex." "set mpx bound: NULL address of the pointer"
-gdb_test_no_output "set mpx bound x, 0xcafebabe, 0xdeadbeef" "set mpx bound: set bounds for a valid pointer address"
-gdb_test "show mpx bound x" "\\\{lbound = .*cafebabe, ubound = .*deadbeef\\\}: pointer value = $hex, size = $decimal, metadata = 0x0+" "set mpx bound: bounds map entry after set mpx bound"
-
-
-gdb_test "set mpx bound 0x0, 0x1 0x2" "A syntax error in expression.*" "set mpx bound: Controlling syntax error, missing comma "
-gdb_test "set mpx bound 0x0, 0x1" "Wrong number of arguments.*" "set mpx bound: Controlling syntax error, missing argument "
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.c b/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.c
deleted file mode 100644
index 54722e3..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright (C) 2015-2024 Free Software Foundation, Inc.
-
- Contributed by Intel Corp. <walfred.tedeschi@intel.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#define OUR_SIZE 5
-
-int gx[OUR_SIZE];
-int ga[OUR_SIZE];
-int gb[OUR_SIZE];
-int gc[OUR_SIZE];
-int gd[OUR_SIZE];
-
-int
-bp1 (int value)
-{
- return 1;
-}
-
-int
-bp2 (int value)
-{
- return 1;
-}
-
-void
-upper (int * p, int * a, int * b, int * c, int * d, int len)
-{
- int value;
- value = *(p + len);
- value = *(a + len);
- value = *(b + len);
- value = *(c + len);
- value = *(d + len);
-}
-
-void
-lower (int * p, int * a, int * b, int * c, int * d, int len)
-{
- int value;
- value = *(p - len);
- value = *(a - len);
- value = *(b - len);
- value = *(c - len);
- bp2 (value);
- value = *(d - len);
-}
-
-int
-main (void)
-{
- int sx[OUR_SIZE];
- int sa[OUR_SIZE];
- int sb[OUR_SIZE];
- int sc[OUR_SIZE];
- int sd[OUR_SIZE];
- int *x, *a, *b, *c, *d;
-
- x = calloc (OUR_SIZE, sizeof (int));
- a = calloc (OUR_SIZE, sizeof (int));
- b = calloc (OUR_SIZE, sizeof (int));
- c = calloc (OUR_SIZE, sizeof (int));
- d = calloc (OUR_SIZE, sizeof (int));
-
- upper (x, a, b, c, d, OUR_SIZE + 2);
- upper (sx, sa, sb, sc, sd, OUR_SIZE + 2);
- upper (gx, ga, gb, gc, gd, OUR_SIZE + 2);
- lower (x, a, b, c, d, 1);
- lower (sx, sa, sb, sc, sd, 1);
- bp1 (*x);
- lower (gx, ga, gb, gc, gd, 1);
-
- free (x);
- free (a);
- free (b);
- free (c);
- free (d);
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp b/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
deleted file mode 100644
index 75f7e65..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
-#
-# Contributed by Intel Corp. <walfred.tedeschi@intel.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-require {is_any_target "i?86-*-*" "x86_64-*-*"}
-
-standard_testfile
-
-require supports_mpx_check_pointer_bounds have_mpx
-
-set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
-
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
- [list debug nowarnings additional_flags=${comp_flags}]] } {
- return -1
-}
-
-if ![runto_main] {
- return -1
-}
-
-set u_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \
- "Upper bound violation while accessing address $hex" \
- "Bounds: \\\[lower = $hex, upper = $hex\\\]"]
-
-set l_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \
- "Lower bound violation while accessing address $hex" \
- "Bounds: \\\[lower = $hex, upper = $hex\\\]"]
-
-for {set i 0} {$i < 15} {incr i} {
- set message "MPX signal segv Upper: ${i}"
-
- if {[gdb_test "continue" "$u_fault.*" $message] != 0} {
- break
- }
-
- gdb_test "where" ".*#0 $hex in upper.*"\
- "$message: should be in upper"
-}
-
-for {set i 0} {$i < 15} {incr i} {
- set message "MPX signal segv Lower: ${i}"
-
- if {[gdb_test "continue" "$l_fault.*" $message] != 0} {
- break
- }
-
- gdb_test "where" ".*#0 $hex in lower.*"\
- "$message: should be in lower"
-}
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp b/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
deleted file mode 100644
index 8a6c9dd..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
-#
-# Contributed by Intel Corp. <walfred.tedeschi@intel.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Testing handle setup together with boundary violation signals.
-#
-# Some states are not allowed as reported on the manual, as noprint
-# implies nostop, but nostop might print.
-#
-# Caveat: Setting the handle to nopass, ends up in a endless loop.
-
-require {is_any_target i?86-*-* x86_64-*-*}
-
-standard_testfile
-
-require supports_mpx_check_pointer_bounds have_mpx
-
-set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
-
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
- [list debug nowarnings additional_flags=${comp_flags}]] } {
- return -1
-}
-
-if ![runto_main] {
- return -1
-}
-
-set violation [multi_line "Program received signal SIGSEGV, Segmentation fault" \
- "Upper bound violation while accessing address $hex" \
- "Bounds: \\\[lower = $hex, upper = $hex\\\]"]
-
-set segv_with_exit "Program received signal SIGSEGV,\
- Segmentation fault.*$inferior_exited_re.*"
-
-
-# Test handler for segmentation fault for:
-# print pass stop
-#
-set parameters "print pass stop"
-with_test_prefix "$parameters" {
- if ![runto_main] {
- return -1
- }
-
- gdb_test "handle SIGSEGV $parameters"\
- ".*SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault.*"\
- "set parameters"
-
- gdb_test "continue" ".*$violation.*" "display"
-
- gdb_test "where" ".*#0 $hex in upper.*"\
- "should be in upper"
-}
-
-# Test handler for segmentation fault for:
-# print pass nostop
-#
-set parameters "print pass nostop"
-with_test_prefix "$parameters" {
- if ![runto_main] {
- return -1
- }
-
- gdb_test "handle SIGSEGV $parameters"\
- ".*SIGSEGV.*No.*Yes.*Yes.*Segmentation fault.*"\
- "set parameters"
-
- gdb_test "continue" ".*$segv_with_exit.*" "display"
-
- gdb_test "where" "No stack." "no inferior"
-}
-
-# Test handler for segmentation fault for:
-# print nopass stop
-#
-set parameters "print nopass stop"
-with_test_prefix "$parameters" {
- if ![runto_main] {
- return -1
- }
-
- gdb_test "handle SIGSEGV $parameters"\
- ".*SIGSEGV.*Yes.*Yes.*No.*Segmentation fault.*"\
- "set parameters"
-
- gdb_test "continue" ".*$violation.*" "display"
-
- gdb_test "where" ".*#0 $hex in upper.*"\
- "should be in upper"
-}
-
-# Test handler for segmentation fault for:
-# print nopass stop
-#
-set parameters "noprint pass nostop"
-with_test_prefix "$parameters" {
- if ![runto_main] {
- return -1
- }
-
- gdb_test "handle SIGSEGV $parameters"\
- ".*SIGSEGV.*No.*No.*Yes.*Segmentation fault.*"\
- "set parameters"
-
- gdb_test "continue" "Continuing\..*$inferior_exited_re.*"\
- "Display"
-
- gdb_test "where" "No stack." "no inferior"
-}
-
diff --git a/gdb/testsuite/gdb.arch/i386-mpx.c b/gdb/testsuite/gdb.arch/i386-mpx.c
deleted file mode 100644
index 99f6744..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Test program for MPX registers.
-
- Copyright 2013-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 <http://www.gnu.org/licenses/>. */
-
-int
-main (void)
-{
-#ifdef __x86_64__
- asm ("mov $10, %rax\n\t"
- "mov $9, %rdx\n\t"
- "bndmk (%rax,%rdx), %bnd0\n\t"
- "mov $20, %rax\n\t"
- "mov $9, %rdx\n\t"
- "bndmk (%rax,%rdx), %bnd1\n\t"
- "mov $30, %rax\n\t"
- "mov $9, %rdx\n\t"
- "bndmk (%rax,%rdx), %bnd2\n\t"
- "mov $40, %rax\n\t"
- "mov $9, %rdx\n\t"
- "bndmk (%rax,%rdx), %bnd3\n\t"
- "bndstx %bnd3, (%rax) \n\t"
- "nop\n\t"
- );
-#else
- asm ("mov $10, %eax\n\t"
- "mov $9, %edx\n\t"
- "bndmk (%eax,%edx), %bnd0\n\t"
- "mov $20, %eax\n\t"
- "mov $9, %edx\n\t"
- "bndmk (%eax,%edx), %bnd1\n\t"
- "mov $30, %eax\n\t"
- "mov $9, %edx\n\t"
- "bndmk (%eax,%edx), %bnd2\n\t"
- "mov $40, %eax\n\t"
- "mov $9, %edx\n\t"
- "bndmk (%eax,%edx), %bnd3\n\t"
- "bndstx %bnd3, (%eax)\n\t"
- "nop\n\t"
- );
-#endif
- asm ("nop\n\t"); /* break here. */
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.arch/i386-mpx.exp b/gdb/testsuite/gdb.arch/i386-mpx.exp
deleted file mode 100644
index 9d71feb..0000000
--- a/gdb/testsuite/gdb.arch/i386-mpx.exp
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 2013-2024 Free Software Foundation, Inc.
-#
-# Contributed by Intel Corp. <walfred.tedeschi@intel.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-require {is_any_target i?86-*-* x86_64-*-*}
-
-standard_testfile
-
-require {is_any_target i?86-*-* x86_64-*-*}
-
-require supports_mpx_check_pointer_bounds have_mpx
-
-set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
-
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
- [list debug nowarnings additional_flags=${comp_flags}]] } {
- return -1
-}
-
-if ![runto_main] {
- return -1
-}
-
-# Test bndcfg register and bndstatus at startup
-set test_string "\\\{raw = 0x\[0-9a-f\]+, config = \\\{base = \[0-9\]+,\
-reserved = \[0-9\]+, preserved = \[0-9\]+, enabled = \[0-9\]+\\\}\\\}"
-
-gdb_test "print \$bndcfgu" $test_string "bndcfgu formating"
-gdb_test "print \$bndcfgu.config.enabled" "= 1" "test if bndstatus is enabled"
-gdb_test "print \$bndstatus" "\\\{raw = 0x0, status = \\\{bde = 0, error = 0\\\}\\\}" \
- "bndstatus formating"
-gdb_test "print \$bndstatus.raw" "= \\\(void \\\*\\\) 0x0" "bndstatus is zero by startup"
-
-# Read values from pseudo registers.
-gdb_breakpoint [ gdb_get_line_number "break here" ]
-gdb_continue_to_breakpoint "break here" ".*break here.*"
-
-set test_string ".*\\\{lbound = 0xa, ubound = 0x13\\\}.*"
-gdb_test "info register bnd0" ".*bnd0$test_string" "pure bnd0 register"
-
-set test_string ".*\\\{lbound = 0x14, ubound = 0x1d\\\}.*"
-gdb_test "info register bnd1" ".*bnd1$test_string" "pure bnd1 register"
-
-set test_string ".*\\\{lbound = 0x1e, ubound = 0x27\\\}.*"
-gdb_test "info register bnd2" ".*bnd2$test_string" "pure bnd2 register"
-
-set test_string ".*\\\{lbound = 0x28, ubound = 0x31\\\}.*"
-gdb_test "info register bnd3" ".*bnd3$test_string" "pure bnd3 register"
-
-# Read value from registers bndrs.
-
-set test_string ".*\\\{lbound = 0xa, ubound_raw = 0x\[f\]+ec\\\}.*"
-gdb_test "info register bnd0raw" ".*bnd0$test_string" "pure bnd0r register"
-
-set test_string ".*\\\{lbound = 0x14, ubound_raw = 0x\[f\]+e2\\\}.*"
-gdb_test "info register bnd1raw" ".*bnd1$test_string" "pure bnd1r register"
-
-set test_string ".*\\\{lbound = 0x1e, ubound_raw = 0x\[f\]+d8\\\}.*"
-gdb_test "info register bnd2raw" ".*bnd2$test_string" "pure bnd2r register"
-
-set test_string ".*\\\{lbound = 0x28, ubound_raw = 0x\[f\]+ce\\\}.*"
-gdb_test "info register bnd3raw" ".*bnd3$test_string" "pure bnd3r register"
-
-# Setting fields on bnds
-set test_string ".*\\\{lbound = 0xa, ubound = 0x400\\\}.*"
-gdb_test "print \$bnd0.ubound = 0x400" "= \\\(void \\\*\\\) 0x400" "set value for bnd0.ubound"
-gdb_test "print \$bnd0" "$test_string" "after setting bnd0.ubound"
-set test_string ".*\\\{lbound = 0xa, ubound_raw = 0x\[f\]+bff\\\}.*"
-gdb_test "print /x \$bnd0raw" "$test_string" "bnd0raw after set bnd0.ubound"
-
-set test_string ".*\\\{lbound = 0x1, ubound = 0x400\\\}.*"
-gdb_test "print \$bnd0.lbound = 0x1" "= \\\(void \\\*\\\) 0x1" "set value for bnd0.lbound"
-gdb_test "print \$bnd0" "$test_string" "after setting bnd0.lbound"
-set test_string ".*\\\{lbound = 0x1, ubound_raw = 0x\[f\]+bff\\\}.*"
-gdb_test "print /x \$bnd0raw" "$test_string" "bnd0raw after set bnd0.lbound"
-
-# Setting fields on bnd0raw.
-set test_string ".*\\\{lbound = 0x1, ubound_raw = 0x600\\\}.*"
-gdb_test "print /x \$bnd0raw.ubound_raw = 0x600" "= 0x600" "set value for bnd0raw.ubound"
-gdb_test "print /x \$bnd0raw" "$test_string" "bnd0raw after setting bnd0raw.ubound"
-set test_string ".*\\\{lbound = 0x1, ubound = 0x\[f\]+9ff\\\}.*"
-gdb_test "print /x \$bnd0" "$test_string" "bnd0 after set bnd0raw.ubound"
-
-set test_string ".*\\\{lbound = 0x100, ubound_raw = 0x600\\\}.*"
-gdb_test "print /x \$bnd0raw.lbound = 0x100" "= 0x100" "set value for bnd0raw.lbound"
-gdb_test "print /x \$bnd0raw" "$test_string" "bnd0raw after setting bnd0raw.lbound"
-set test_string ".*\\\{lbound = 0x100, ubound = 0x\[f\]+9ff\\\}.*"
-gdb_test "print /x \$bnd0" "$test_string" "bnd0 after set bnd0raw.lbound"
-
-# Set full value bnd raw
-set test_string ".*\\\{lbound = 0x10, ubound_raw = 0x\[f\]+cff\\\}.*"
-gdb_test "print /x \$bnd0raw = {0x10, ~0x300}" "$test_string" "set full value for bnd0raw"
-set test_string ".*\\\{lbound = 0x10, ubound = 0x300\\\}.*"
-gdb_test "print /x \$bnd0" "$test_string" "bnd0raw after setting full bnd0raw"
-
-# Set full value bnd
-set test_string ".*\\\{lbound = 0x10, ubound = 0x300\\\}.*"
-gdb_test "print /x \$bnd0 = {0x10, 0x300}" "$test_string" "set full value for bnd0"
-set test_string ".*\\\{lbound = 0x10, ubound_raw = 0x\[f\]+cff\\\}.*"
-gdb_test "print /x \$bnd0raw" "$test_string" "bnd0raw after setting full bnd0"
-
-# Test bndcfg register and bndstatus after a failure on bndstr
-gdb_test "print \$bndstatus.status.error" "= 2" "bndstatus error is 2\
-after a failure on allocating an entry"
-
-# Going to test the python extension for lenght.
-if { ![allow_python_tests] } { continue }
-# Verify if size is right
-set test_string ".*\\\: size 0x11.*"
-gdb_test "print /x \$bnd0 = {0x10, 0x20}" "$test_string" "verify size for bnd0"
diff --git a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
index 24c3129..ed595d4 100644
--- a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
@@ -54,7 +54,7 @@ proc insert_breakpoint {function expected_location} {
# If we managed to get the breakpoing address, then check that
# we inserted it at the expected location by examining the
# instruction at that address (we're not interested in the insn
- # itself, but rather at the address printed at the begining of
+ # itself, but rather at the address printed at the beginning of
# the instruction).
if {$address != ""} {
gdb_test "x /i $address" \
diff --git a/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp b/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
index d60f63e..f91bebe 100644
--- a/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
@@ -18,7 +18,7 @@
# if the breakpoint is set past the syscall due to faulty prologue skipping,
# the breakpoint will not trigger.
#
-# In particular, we're trying to excercise the instruction analysis
+# In particular, we're trying to exercise the instruction analysis
# functionality of prologue skipping. If non-minimal symbols are
# read, then that functionality might not be used because f.i.
# line-info is used instead. So, we use nodebug.
diff --git a/gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp b/gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp
index 0e009b4..1cf9848 100644
--- a/gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp
+++ b/gdb/testsuite/gdb.arch/riscv-tdesc-loading.exp
@@ -29,7 +29,7 @@ foreach filename [lsort [glob $srcdir/$subdir/riscv-tdesc-loading-*.xml]] {
}
# Currently it is expected that all of the target descriptions in
- # this test will load successfully, so we expect no additonal
+ # this test will load successfully, so we expect no additional
# output from GDB.
gdb_test_no_output "set tdesc filename $test_path" \
"check [file tail $filename]"
diff --git a/gdb/testsuite/gdb.arch/sparc64-adi.c b/gdb/testsuite/gdb.arch/sparc64-adi.c
index aee5aca..97f6a99 100644
--- a/gdb/testsuite/gdb.arch/sparc64-adi.c
+++ b/gdb/testsuite/gdb.arch/sparc64-adi.c
@@ -31,7 +31,6 @@
#include <string.h>
#include <signal.h>
#include <sys/shm.h>
-#include <errno.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/gdb/testsuite/gdb.base/attach-deleted-exec.exp b/gdb/testsuite/gdb.base/attach-deleted-exec.exp
index 3e31c36..1196115 100644
--- a/gdb/testsuite/gdb.base/attach-deleted-exec.exp
+++ b/gdb/testsuite/gdb.base/attach-deleted-exec.exp
@@ -45,9 +45,27 @@ clean_restart
# Attach. GDB should spot that the executable is gone and fallback to
# use /proc/PID/exe.
-gdb_test "attach $testpid" \
- "Attaching to process $decimal\r\nReading symbols from /proc/${testpid}/exe\\.\\.\\..*" \
- "attach to process with deleted executable"
+set test "attach to process with deleted executable"
+set re \
+ [multi_line \
+ "Attaching to process $decimal" \
+ "Reading symbols from (\[^\r\n\]+)[string_to_regexp ...]" \
+ ".*"]
+set filename ""
+gdb_test_multiple "attach $testpid" $test {
+ -re -wrap $re {
+ set filename $expect_out(1,string)
+ pass $gdb_test_name
+ }
+}
+
+set test "filename /proc/PID/exe"
+set re_nfs \[^\r\n\]+[string_to_regexp /.nfs]\[^\r\n\]+
+if { [regexp $re_nfs $filename] } {
+ unsupported $test
+} else {
+ gdb_assert { [string equal $filename /proc/${testpid}/exe] } $test
+}
# Cleanup.
kill_wait_spawned_process $test_spawn_id
diff --git a/gdb/testsuite/gdb.base/bp-cond-failure.c b/gdb/testsuite/gdb.base/bp-cond-failure.c
index ffab098..b742139 100644
--- a/gdb/testsuite/gdb.base/bp-cond-failure.c
+++ b/gdb/testsuite/gdb.base/bp-cond-failure.c
@@ -15,8 +15,14 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-static inline int __attribute__((__always_inline__))
-foo ()
+static int
+foo (int x)
+{
+ return 0;
+}
+
+static int
+foo (char c)
{
return 0; /* Multi-location breakpoint here. */
}
@@ -24,7 +30,7 @@ foo ()
static int __attribute__((noinline))
bar ()
{
- int res = foo (); /* Single-location breakpoint here. */
+ int res = foo ('1'); /* Single-location breakpoint here. */
return res;
}
@@ -34,7 +40,7 @@ main ()
{
int res = bar ();
- res = foo ();
+ res = foo (1);
return res;
}
diff --git a/gdb/testsuite/gdb.base/bp-cond-failure.exp b/gdb/testsuite/gdb.base/bp-cond-failure.exp
index a82cedd..b4c046c 100644
--- a/gdb/testsuite/gdb.base/bp-cond-failure.exp
+++ b/gdb/testsuite/gdb.base/bp-cond-failure.exp
@@ -27,7 +27,7 @@
standard_testfile
if { [prepare_for_testing "failed to prepare" ${binfile} "${srcfile}" \
- {debug}] == -1 } {
+ {debug c++}] == -1 } {
return
}
@@ -44,7 +44,7 @@ if { [is_address_zero_readable] } {
return
}
-proc run_test { cond_eval access_type lineno nloc } {
+proc run_test { cond_eval access_type bpexpr nloc } {
clean_restart ${::binfile}
if { ![runto_main] } {
@@ -56,23 +56,37 @@ proc run_test { cond_eval access_type lineno nloc } {
}
# Setup the conditional breakpoint and record its number.
- gdb_breakpoint "${::srcfile}:${lineno} if (*(${access_type} *) 0) == 0"
+ gdb_breakpoint "${bpexpr} if (*(${access_type} *) 0) == 0"
+
+ # This test aims to test that GDB displays the correct breakpoint number
+ # and location when there is an error testing a breakpoint condition,
+ # so it is important to hardcode the breakpoint number into the regex,
+ # along with the location, if applicable.
set bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*"]
if { $nloc > 1 } {
- set bp_num_pattern "${bp_num}.1"
+ # We hardcode location 2 because, for some reason, Clang will always
+ # order the debug information so we hit the second location. For
+ # simplicity the .c is ordered in such a way that GCC will also order
+ # the debug info to have us land on location 2.
+ gdb_test "continue" \
+ [multi_line \
+ "Continuing\\." \
+ "Error in testing condition for breakpoint ${bp_num}.2:" \
+ "Cannot access memory at address 0x0" \
+ "" \
+ "Breakpoint ${bp_num}.2, foo \\(c=49 ...\\) at \[^\r\n\]+:\[0-9\]+" \
+ "${::decimal}\\s+\[^\r\n\]+ breakpoint here\\. \[^\r\n\]+"]
} else {
- set bp_num_pattern "${bp_num}"
+ gdb_test "continue" \
+ [multi_line \
+ "Continuing\\." \
+ "Error in testing condition for breakpoint ${bp_num}:" \
+ "Cannot access memory at address 0x0" \
+ "" \
+ "Breakpoint ${bp_num}, bar \\(\\) at \[^\r\n\]+:\[0-9\]+" \
+ "${::decimal}\\s+\[^\r\n\]+ breakpoint here\\. \[^\r\n\]+"]
}
-
- gdb_test "continue" \
- [multi_line \
- "Continuing\\." \
- "Error in testing condition for breakpoint ${bp_num_pattern}:" \
- "Cannot access memory at address 0x0" \
- "" \
- "Breakpoint ${bp_num_pattern}, \(foo\|bar\) \\(\\) at \[^\r\n\]+:${lineno}" \
- "${::decimal}\\s+\[^\r\n\]+ breakpoint here\\. \[^\r\n\]+"]
}
# If we're using a remote target then conditions could be evaulated
@@ -101,7 +115,7 @@ gdb_test_multiple "show breakpoint condition-evaluation" "" {
}
# Where the breakpoint will be placed.
-set bp_line_multi_loc [gdb_get_line_number "Multi-location breakpoint here"]
+set bp_line_multi_loc "foo"
set bp_line_single_loc [gdb_get_line_number "Single-location breakpoint here"]
foreach_with_prefix access_type { "char" "short" "int" "long long" } {
@@ -110,7 +124,7 @@ foreach_with_prefix access_type { "char" "short" "int" "long long" } {
run_test $cond_eval $access_type $bp_line_multi_loc 2
}
with_test_prefix "single-loc" {
- run_test $cond_eval $access_type $bp_line_single_loc 1
+ run_test $cond_eval $access_type "${srcfile}:${bp_line_single_loc}" 1
}
}
}
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 98f67ee..fd8afdd 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -495,26 +495,14 @@ proc test_ld {file ifmain trynosym displacement} {
if $ifmain {
reach $solib_bp run $displacement 3
- # Use two separate gdb_test_multiple statements to avoid timeouts due
- # to slow processing of wildcard capturing long output
- set test "info files"
set entrynohex ""
- set info_line [join [list \
- "\r\n" "\[\t\]" "0x\[0-9af\]+" " - " \
- "0x\[0-9af\]+" " @ " "0x\[0-9af\]+" \
- " is " "\[^\r\n\]+"] ""]
- gdb_test_multiple $test $test {
+ gdb_test_multiple "info files" "" -lbl {
-re "\r\n\[\t \]*Entry point:\[\t \]*0x(\[0-9a-f\]+)\r\n" {
set entrynohex $expect_out(1,string)
- gdb_test_multiple "" $test {
- -re "\r\n$gdb_prompt $" {
- pass $test
- }
- -re $info_line {
- # Avoid timeout with check-read1
- exp_continue
- }
- }
+ exp_continue
+ }
+ -re -wrap "" {
+ gdb_assert { ![string equal $entrynohex ""] } $gdb_test_name
}
}
diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp
index c485c9b..91a4e5b 100644
--- a/gdb/testsuite/gdb.base/call-sc.exp
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -184,7 +184,7 @@ proc test_scalar_returns { } {
# known, both failed to print a final "source and line" and misplaced
# the frame ("No frame").
- # The test is writen so that it only reports one FAIL/PASS for the
+ # The test is written so that it only reports one FAIL/PASS for the
# entire operation. The value returned is checked further down.
# "return_value_unknown", if non-empty, records why GDB realised
# that it didn't know where the return value was.
diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp
index f87f528..31b5a13 100644
--- a/gdb/testsuite/gdb.base/checkpoint.exp
+++ b/gdb/testsuite/gdb.base/checkpoint.exp
@@ -295,30 +295,48 @@ clean_restart $binfile
runto_main
gdb_breakpoint $break1_loc
-gdb_test "commands\nsilent\nif (lines % 2)\ncheckpoint\nend\n continue\nend" \
+set cmd \
+ [join \
+ [list \
+ "commands" \
+ "if (lines % 2)" \
+ " checkpoint" \
+ "else" \
+ " continue" \
+ "end" \
+ "end"] \
+ "\n"]
+gdb_test $cmd \
"" \
"set checkpoint breakpoint"
-set prev_timeout $timeout
-set timeout [expr $timeout + 120]
-verbose "Timeout now $timeout sec."
-
-gdb_breakpoint $break2_loc
-gdb_test "continue" "breakpoint 2.*" "break2 with many checkpoints"
+set nr_ok 0
+for {set iter 0} {$iter < 600} {incr iter} {
+ set ok 0
+ gdb_test_multiple "continue" "" {
+ -re -wrap "breakpoint 1.*" {
+ set ok 1
+ }
+ -re -wrap "" {
+ }
+ }
+ if { $ok } {
+ incr nr_ok
+ } else {
+ break
+ }
+}
+gdb_assert { $nr_ok == 600 } "break1 with many checkpoints"
set count 0
set msg "info checkpoints with at least 600 checkpoints"
gdb_test_multiple "info checkpoints" $msg {
- -re " $decimal process \[^\r\]*\r\n" {
+ -re "\r\n $decimal process \[^\r\]*" {
incr count
exp_continue
}
- -re "$gdb_prompt $" {
- if { $count >= 600 } {
- pass $msg
- } else {
- fail $msg
- }
+ -re -wrap "" {
+ gdb_assert { $count == 600 } $gdb_test_name
}
}
@@ -329,10 +347,6 @@ gdb_test_multiple "info checkpoints" $msg {
gdb_test "kill" "" "kill all one with many checkpoints" \
"Kill the program being debugged.*y or n. $" "y"
-# Restore old timeout
-set timeout $prev_timeout
-verbose "Timeout now $timeout sec."
-
#
# Finished: cleanup
#
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 4a0a373..57b4d1c 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -145,7 +145,7 @@ append regs_output "\n"
append regs_output [capture_command_output "mt print user-registers" \
".*Name.*Nr\[^\n]*\n"]
set all_regs {}
-foreach {- reg} [regexp -all -inline -line {^\s+(\w+)} $regs_output] {
+foreach {- reg} [regexp -all -inline -line {^\s*(\w+)} $regs_output] {
lappend all_regs $reg
}
diff --git a/gdb/testsuite/gdb.base/corefile-buildid.exp b/gdb/testsuite/gdb.base/corefile-buildid.exp
index e1b9804..fc54cf2 100644
--- a/gdb/testsuite/gdb.base/corefile-buildid.exp
+++ b/gdb/testsuite/gdb.base/corefile-buildid.exp
@@ -268,12 +268,13 @@ proc do_corefile_buildid_tests {args} {
return
}
- # Grab the build-id from the binary, removing ".debug" from the end.
- set buildid [build_id_debug_filename_get $program_to_run]
+ # Get the build-id filename without ".debug" on the end. This
+ # will have the format: '.build-id/xx/xxxxx'
+ set buildid [build_id_debug_filename_get $program_to_run ""]
if {$buildid == ""} {
untested "binary has no build-id"
+ return
}
- regsub {\.debug$} $buildid {} buildid
verbose -log "build-id is $buildid"
locate_exec_from_core_build_id $corefile $buildid \
diff --git a/gdb/testsuite/gdb.base/empty-host-env-vars.exp b/gdb/testsuite/gdb.base/empty-host-env-vars.exp
index e6e9d6e..5fab65a 100644
--- a/gdb/testsuite/gdb.base/empty-host-env-vars.exp
+++ b/gdb/testsuite/gdb.base/empty-host-env-vars.exp
@@ -21,16 +21,14 @@ require {!is_remote host}
set all_env_vars { HOME XDG_CACHE_HOME LOCALAPPDATA XDG_CONFIG_HOME }
-# Record the initial value of the index-cache directory.
+set re_pre \
+ [string_to_regexp {The directory of the index cache is "}]
+set re_post \
+ [string_to_regexp {".}]
+
+# Show the initial value of the index-cache directory.
clean_restart
-set index_cache_directory ""
-gdb_test_multiple "show index-cache directory" "" {
- -re -wrap "The directory of the index cache is \"(.*)\"\\." {
- set index_cache_directory $expect_out(1,string)
- set index_cache_directory [string_to_regexp $index_cache_directory]
- pass $gdb_test_name
- }
-}
+gdb_test "show index-cache directory" $re_pre\[^\r\n\]*$re_post
foreach_with_prefix env_var_name $all_env_vars {
# Restore the original state of the environment variable.
@@ -38,18 +36,7 @@ foreach_with_prefix env_var_name $all_env_vars {
set env($env_var_name) {}
clean_restart
- # Verify that the empty environment variable didn't affect the
- # index-cache directory setting, that we still see the initial value.
- # "HOME" is different, because if that one is unset, GDB isn't even
- # able to compute the default location. In that case, we expect it to
- # be empty.
- if { $env_var_name == "HOME" } {
- gdb_test "show index-cache directory" \
- "The directory of the index cache is \"\"\\."
- } else {
- gdb_test "show index-cache directory" \
- "The directory of the index cache is \"$index_cache_directory\"\\."
- }
+ gdb_test "show index-cache directory" $re_pre\[^\r\n\]*$re_post
}
}
@@ -69,7 +56,6 @@ with_test_prefix "all env vars" {
clean_restart
- gdb_test "show index-cache directory" \
- "The directory of the index cache is \"\"\\."
+ gdb_test "show index-cache directory" $re_pre$re_post
}
}
diff --git a/gdb/testsuite/gdb.base/filename-completion.exp b/gdb/testsuite/gdb.base/filename-completion.exp
index 95a9fba..389e2d7 100644
--- a/gdb/testsuite/gdb.base/filename-completion.exp
+++ b/gdb/testsuite/gdb.base/filename-completion.exp
@@ -113,7 +113,281 @@ proc test_gdb_complete_filename_multiple {
$testname
}
-# Run filename completetion tests for those command that accept quoting and
+# Helper proc. Returns a string containing the escape sequence to move the
+# cursor COUNT characters to the left. There's no sanity checking performed
+# on COUNT, so the user of this proc must ensure there are more than COUNT
+# characters on the current line.
+proc c_left { count } {
+ string repeat "\033\[D" $count
+}
+
+# This proc is based off of test_gdb_complete_tab_multiple in
+# completion-support.exp library. This proc however tests completing a
+# filename in the middle of a command line.
+#
+# INPUT_LINE is the line to complete, BACK_COUNT is the number of characters
+# to move the cursor left before sending tab to complete the line.
+# ADD_COMPLETED_LINE is what we expect to be unconditionally added the first
+# time tab is sent. On additional tabs COMPLETION_LIST will be displayed.
+# TESTNAME is used as expected.
+proc test_tab_complete_within_line_multiple { input_line back_count \
+ add_completed_line \
+ completion_list \
+ testname } {
+ global gdb_prompt
+
+ # After displaying the completion list the line will be reprinted, but
+ # now with ADD_COMPLETED_LINE inserted. Build the regexp to match
+ # against this expanded line. The new content will be inserted
+ # BACK_COUNT character from the end of the line.
+ set expanded_line \
+ [join [list \
+ [string range $input_line 0 end-$back_count] \
+ ${add_completed_line} \
+ [string range $input_line end-[expr $back_count - 1] end]] \
+ ""]
+ set expanded_line_re [string_to_regexp $expanded_line]
+
+ # Convert input arguments into regexp.
+ set input_line_re [string_to_regexp $input_line]
+ set add_completed_line_re [string_to_regexp $add_completed_line]
+ set completion_list_re [make_tab_completion_list_re $completion_list]
+
+ # Similar to test_tab_complete_within_line_unique, build two
+ # regexp for matching the line after the first tab. Which regexp
+ # matches will depend on the version and/or configuration of
+ # readline. This first regexp moves the cursor backwards and then
+ # inserts new content into the line.
+ set after_tab_re1 "^$input_line_re"
+ set after_tab_re1 "$after_tab_re1\\\x08{$back_count}"
+ set after_tab_re1 "$after_tab_re1${completion::bell_re}"
+ set after_tab_re1 "$after_tab_re1\\\x1b\\\x5b[string length $add_completed_line]\\\x40"
+ set after_tab_re1 "$after_tab_re1$add_completed_line_re\$"
+
+ # This second regexp moves the cursor backwards and overwrites the
+ # end of the line, then moves the cursor backwards again to the
+ # correct position within the line.
+ set after_tab_re2 "^$input_line_re"
+ set after_tab_re2 "$after_tab_re2\\\x08{$back_count}"
+ set after_tab_re2 "$after_tab_re2${completion::bell_re}"
+ set tail [string range $input_line end-[expr $back_count - 1] end]
+ set after_tab_re2 "$after_tab_re2$add_completed_line_re"
+ set after_tab_re2 "$after_tab_re2[string_to_regexp $tail]"
+ set after_tab_re2 "$after_tab_re2\\\x08{$back_count}"
+
+ send_gdb "$input_line[c_left $back_count]\t"
+ gdb_test_multiple "" "$testname (first tab)" {
+ -re "(?:(?:$after_tab_re1)|(?:$after_tab_re2))" {
+ send_gdb "\t"
+ # If we auto-completed to an ambiguous prefix, we need an
+ # extra tab to show the matches list.
+ if {$add_completed_line != ""} {
+ send_gdb "\t"
+ set maybe_bell ${completion::bell_re}
+ } else {
+ set maybe_bell ""
+ }
+ gdb_test_multiple "" "$testname (second tab)" {
+ -re "^${maybe_bell}\r\n$completion_list_re\r\n$gdb_prompt " {
+ gdb_test_multiple "" "$testname (second tab)" {
+ -re "^$expanded_line_re\\\x08{$back_count}$" {
+ pass $gdb_test_name
+ }
+ }
+ }
+ -re "${maybe_bell}\r\n.+\r\n$gdb_prompt $" {
+ fail $gdb_test_name
+ }
+ }
+ }
+ }
+
+ clear_input_line $testname
+}
+
+# Wrapper around test_gdb_complete_tab_unique to test completing a unique
+# item in the middle of a line. INPUT_LINE is the line to complete.
+# BACK_COUNT is the number of characters to move left within INPUT_LINE
+# before sending tab to perform completion. INSERT_STR is what we expect to
+# see inserted by the completion engine in GDB.
+proc test_tab_complete_within_line_unique { input_line back_count insert_str } {
+ # Build regexp for the line after completion has occurred. As
+ # completion is being performed in the middle of the line the
+ # sequence of characters we see can vary depending on which
+ # version of readline is in use, and/or how readline is
+ # configured. Currently two different approaches are covered as
+ # RE1 and RE2. Both of these regexp cover the complete possible
+ # output.
+ #
+ # In the first case we see the input line followed by some number
+ # of characters to move the cursor backwards. After this we see a
+ # control sequence that tells the terminal that some characters
+ # are going to be inserted into the middle of the line, the new
+ # characters are then emitted. The terminal itself is responsible
+ # for preserving the tail of the line, so these characters are not
+ # re-emitted.
+ set re1 [string_to_regexp $input_line]
+ set re1 $re1\\\x08{$back_count}
+ set re1 $re1\\\x1b\\\x5b[string length $insert_str]\\\x40
+ set re1 $re1[string_to_regexp $insert_str]
+
+ # In this second regexp we again start with the input line
+ # followed by the control characters to move the cursor backwards.
+ # This time though readline emits the new characters and then
+ # re-emits the tail of the original line. This new content will
+ # overwrite the original output on the terminal. Finally, control
+ # characters are emitted to move the cursor back to the correct
+ # place in the middle of the line.
+ set re2 [string_to_regexp $input_line]
+ set re2 $re2\\\x08{$back_count}
+ set re2 $re2[string_to_regexp $insert_str]
+ set tail [string range $input_line end-[expr $back_count - 1] end]
+ set re2 $re2[string_to_regexp $tail]
+ set re2 $re2\\\x08{$back_count}
+
+ # We can now perform the tab-completion, we check for either of
+ # the possible output regexp patterns.
+ test_gdb_complete_tab_unique \
+ "${input_line}[c_left $back_count]" \
+ "(?:(?:$re1)|(?:$re2))" \
+ "" \
+ "complete unique file within command line"
+}
+
+
+# Run filename completion tests for those command that accept quoting and
+# escaping of the filename argument. CMD is the initial part of the command
+# line, paths to complete will be added after CMD.
+#
+# ROOT is the base directory as returned from setup_directory_tree, though,
+# if ROOT is a sub-directory of the user's home directory ROOT might have
+# been modified to replace the $HOME prefix with a single "~" character.
+proc run_quoting_and_escaping_tests_1 { root cmd } {
+ gdb_start
+
+ # Completing 'thread apply all ...' commands uses a custom word
+ # point. At one point we had a bug where doing this would break
+ # completion of quoted filenames that contained white space.
+ test_gdb_complete_unique "thread apply all hel" \
+ "thread apply all help" " " false \
+ "complete a 'thread apply all' command"
+
+ foreach_with_prefix qc [list "" "'" "\""] {
+ test_gdb_complete_none "$cmd ${qc}${root}/xx" \
+ "expand a non-existent filename"
+
+ test_gdb_complete_unique "$cmd ${qc}${root}/a" \
+ "$cmd ${qc}${root}/aaa/" "" false \
+ "expand a unique directory name"
+
+ test_gdb_complete_unique "$cmd ${qc}${root}/cc2" \
+ "$cmd ${qc}${root}/cc2${qc}" " " false \
+ "expand a unique filename"
+
+ test_gdb_complete_filename_multiple "$cmd ${qc}${root}/" \
+ "b" "b" {
+ "bb1/"
+ "bb2/"
+ } "" "${qc}" false \
+ "expand multiple directory names"
+
+ test_gdb_complete_filename_multiple "$cmd ${qc}${root}/" \
+ "c" "c" {
+ "cc1/"
+ "cc2"
+ } "" "${qc}" false \
+ "expand mixed directory and file names"
+
+ if { $qc ne "" } {
+ set sp " "
+ } else {
+ set sp "\\ "
+ }
+
+ if { $qc eq "'" } {
+ set dq "\""
+ } else {
+ set dq "\\\""
+ }
+
+ test_gdb_complete_unique "${cmd} ${qc}${root}/bb2/dir${sp}1/" \
+ "${cmd} ${qc}${root}/bb2/dir${sp}1/unique${sp}file${qc}" " " \
+ false \
+ "expand a unique file name in a directory containing a space"
+
+ test_gdb_complete_filename_multiple "$cmd ${qc}${root}/bb2/" \
+ "d" "ir${sp}" {
+ "dir 1/"
+ "dir 2/"
+ } "" "${qc}" false \
+ "expand multiple directory names containing spaces"
+
+ test_gdb_complete_filename_multiple "${cmd} ${qc}${root}/bb2/dir${sp}2/" \
+ "f" "ile${sp}" {
+ "file 1"
+ "file 2"
+ } "" "${qc}" false \
+ "expand contents of a directory containing a space"
+
+ test_gdb_complete_filename_multiple "$cmd ${qc}${root}/aaa/" \
+ "a" "a${sp}" {
+ "aa bb"
+ "aa cc"
+ } "" "${qc}" false \
+ "expand filenames containing spaces"
+
+ test_gdb_complete_filename_multiple "$cmd ${qc}${root}/bb1/" \
+ "a" "a" {
+ "aa\"bb"
+ "aa'bb"
+ } "" "${qc}" false \
+ "expand filenames containing quotes"
+
+ test_gdb_complete_unique "$cmd ${qc}${root}/bb1/aa${dq}" \
+ "$cmd ${qc}${root}/bb1/aa${dq}bb${qc}" " " false \
+ "expand unique filename containing double quotes"
+
+ # It is not possible to include a single quote character
+ # within a single quoted string. However, GDB does not do
+ # anything smart if a user tries to do this. Avoid testing
+ # this case. Maybe in the future we'll figure a way to avoid
+ # this situation.
+ if { $qc ne "'" } {
+ if { $qc eq "" } {
+ set sq "\\'"
+ } else {
+ set sq "'"
+ }
+
+ test_gdb_complete_unique "$cmd ${qc}${root}/bb1/aa${sq}" \
+ "$cmd ${qc}${root}/bb1/aa${sq}bb${qc}" " " false \
+ "expand unique filename containing single quote"
+ }
+ }
+
+ gdb_exit
+}
+
+# Tests for completing a filename in the middle of a command line. This
+# represents a user typing out a command line then moving the cursor left
+# (e.g. with the left arrow key), editing a filename argument, and then
+# using tab completion to try and complete the filename even though there is
+# other content on the command line after the filename.
+proc run_mid_line_completion_tests { root cmd } {
+ gdb_start
+
+ test_tab_complete_within_line_unique \
+ "$cmd \"$root/bb2/dir 1/unique fi \"xxx\"" 6 "le\""
+
+ test_tab_complete_within_line_multiple \
+ "$cmd \"$root/aaa/a \"xxx\"" 6 "a " \
+ [list "aa bb" "aa cc"] \
+ "complete filename mid-line with multiple possibilities"
+
+ gdb_exit
+}
+
+# Run filename completion tests for those command that accept quoting and
# escaping of the filename argument.
#
# ROOT is the base directory as returned from setup_directory_tree, though,
@@ -127,109 +401,16 @@ proc run_quoting_and_escaping_tests { root } {
"target core" "target exec" "target tfile" \
"maint print c-tdesc" "compile file" \
"save gdb-index" "save gdb-index -dwarf-5" } {
- gdb_start
-
- # Completing 'thread apply all ...' commands uses a custom word
- # point. At one point we had a bug where doing this would break
- # completion of quoted filenames that contained white space.
- test_gdb_complete_unique "thread apply all hel" \
- "thread apply all help" " " false \
- "complete a 'thread apply all' command"
-
- foreach_with_prefix qc [list "" "'" "\""] {
- test_gdb_complete_none "$cmd ${qc}${root}/xx" \
- "expand a non-existent filename"
-
- test_gdb_complete_unique "$cmd ${qc}${root}/a" \
- "$cmd ${qc}${root}/aaa/" "" false \
- "expand a unique directory name"
-
- test_gdb_complete_unique "$cmd ${qc}${root}/cc2" \
- "$cmd ${qc}${root}/cc2${qc}" " " false \
- "expand a unique filename"
-
- test_gdb_complete_filename_multiple "$cmd ${qc}${root}/" \
- "b" "b" {
- "bb1/"
- "bb2/"
- } "" "${qc}" false \
- "expand multiple directory names"
-
- test_gdb_complete_filename_multiple "$cmd ${qc}${root}/" \
- "c" "c" {
- "cc1/"
- "cc2"
- } "" "${qc}" false \
- "expand mixed directory and file names"
-
- if { $qc ne "" } {
- set sp " "
- } else {
- set sp "\\ "
- }
-
- if { $qc eq "'" } {
- set dq "\""
- } else {
- set dq "\\\""
- }
-
- test_gdb_complete_unique "${cmd} ${qc}${root}/bb2/dir${sp}1/" \
- "${cmd} ${qc}${root}/bb2/dir${sp}1/unique${sp}file${qc}" " " \
- false \
- "expand a unique file name in a directory containing a space"
-
- test_gdb_complete_filename_multiple "$cmd ${qc}${root}/bb2/" \
- "d" "ir${sp}" {
- "dir 1/"
- "dir 2/"
- } "" "${qc}" false \
- "expand multiple directory names containing spaces"
-
- test_gdb_complete_filename_multiple "${cmd} ${qc}${root}/bb2/dir${sp}2/" \
- "f" "ile${sp}" {
- "file 1"
- "file 2"
- } "" "${qc}" false \
- "expand contents of a directory containing a space"
-
- test_gdb_complete_filename_multiple "$cmd ${qc}${root}/aaa/" \
- "a" "a${sp}" {
- "aa bb"
- "aa cc"
- } "" "${qc}" false \
- "expand filenames containing spaces"
-
- test_gdb_complete_filename_multiple "$cmd ${qc}${root}/bb1/" \
- "a" "a" {
- "aa\"bb"
- "aa'bb"
- } "" "${qc}" false \
- "expand filenames containing quotes"
-
- test_gdb_complete_unique "$cmd ${qc}${root}/bb1/aa${dq}" \
- "$cmd ${qc}${root}/bb1/aa${dq}bb${qc}" " " false \
- "expand unique filename containing double quotes"
-
- # It is not possible to include a single quote character
- # within a single quoted string. However, GDB does not do
- # anything smart if a user tries to do this. Avoid testing
- # this case. Maybe in the future we'll figure a way to avoid
- # this situation.
- if { $qc ne "'" } {
- if { $qc eq "" } {
- set sq "\\'"
- } else {
- set sq "'"
- }
-
- test_gdb_complete_unique "$cmd ${qc}${root}/bb1/aa${sq}" \
- "$cmd ${qc}${root}/bb1/aa${sq}bb${qc}" " " false \
- "expand unique filename containing single quote"
- }
+ # Try each test placing the filename as the first argument
+ # then again with a quoted string immediately after the
+ # command. This works because the filename completer will
+ # complete any number of filenames, even if the command only
+ # takes a single filename.
+ foreach_with_prefix filler { "" " \"xxx\"" " 'zzz'" " yyy"} {
+ run_quoting_and_escaping_tests_1 $root "$cmd$filler"
}
- gdb_exit
+ run_mid_line_completion_tests $root $cmd
}
}
@@ -290,7 +471,7 @@ proc run_unquoted_tests_core { root cmd { prefix "" } } {
}
-# Run filename completetion tests for a sample of commands that take an
+# Run filename completion tests for a sample of commands that take an
# unquoted, unescaped filename as an argument. Only a sample of commands
# are (currently) tested as there's a lot of commands that accept this style
# of filename argument.
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 5bc534b..ff1d561 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -225,7 +225,7 @@ proc misc_tests {resolver_attr resolver_debug final_debug} {
return 1
}
- # The "if" condition is artifical to test regression of a former patch.
+ # The "if" condition is artificial to test regression of a former patch.
gdb_breakpoint "[gdb_get_line_number "break-at-nextcall"] if i && (int) gnu_ifunc (i) != 42"
gdb_breakpoint [gdb_get_line_number "break-at-call"]
diff --git a/gdb/testsuite/gdb.base/hbreak-unmapped.exp b/gdb/testsuite/gdb.base/hbreak-unmapped.exp
index ccb4b20..b28af6d 100644
--- a/gdb/testsuite/gdb.base/hbreak-unmapped.exp
+++ b/gdb/testsuite/gdb.base/hbreak-unmapped.exp
@@ -68,8 +68,7 @@ gdb_test "hbreak *0" "Hardware assisted breakpoint \[0-9\]+ at 0x0"
gdb_test "info break" "hw breakpoint.*y.*0x0\+\[ \t\]\+" \
"info break shows hw breakpoint"
-gdb_test_no_output "delete \$bpnum" "" "delete" \
- "delete hw breakpoint"
+gdb_test_no_output "delete \$bpnum" "delete hw breakpoint"
gdb_test "info break" "No breakpoints, watchpoints, tracepoints, or catchpoints\." \
"info break shows no breakpoints, watchpoints, tracepoints, or catchpoints"
diff --git a/gdb/testsuite/gdb.base/info_sources_2.exp b/gdb/testsuite/gdb.base/info_sources_2.exp
index aa33f38..90442d0 100644
--- a/gdb/testsuite/gdb.base/info_sources_2.exp
+++ b/gdb/testsuite/gdb.base/info_sources_2.exp
@@ -120,7 +120,7 @@ proc run_info_sources { extra_args args } {
}
}
- # Now check ARGS agaisnt the values held in INFO_SOURCES map.
+ # Now check ARGS against the values held in INFO_SOURCES map.
foreach {objfile sourcefile} $args {
# First, figure out if we're expecting SOURCEFILE to be present,
# or not.
diff --git a/gdb/testsuite/gdb.base/killed-outside.exp b/gdb/testsuite/gdb.base/killed-outside.exp
index 87bd7be..88f4afe 100644
--- a/gdb/testsuite/gdb.base/killed-outside.exp
+++ b/gdb/testsuite/gdb.base/killed-outside.exp
@@ -102,7 +102,7 @@ with_test_prefix "continue" {
}
}
-# Try stepping the program. Stepping may go through diferent code
+# Try stepping the program. Stepping may go through different code
# paths in the target backends.
with_test_prefix "stepi" {
test {
diff --git a/gdb/testsuite/gdb.base/lineinc.exp b/gdb/testsuite/gdb.base/lineinc.exp
index 1fe1390..2386113 100644
--- a/gdb/testsuite/gdb.base/lineinc.exp
+++ b/gdb/testsuite/gdb.base/lineinc.exp
@@ -70,7 +70,7 @@
# #included by a given source file in a list sorted by the line at
# which they were #included; this gives GDB the chance to detect
# multiple #inclusions at the same line, complain, and assign
-# distinct, albiet incorrect, line numbers to each #inclusion.
+# distinct, albeit incorrect, line numbers to each #inclusion.
#
# However, at one point GDB was sorting the list in reverse order,
# while the code to assign new, distinct line numbers assumed it was
diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp
index 2adde30..c8730ec 100644
--- a/gdb/testsuite/gdb.base/overlays.exp
+++ b/gdb/testsuite/gdb.base/overlays.exp
@@ -150,7 +150,7 @@ if {$data_overlays} {
}
# Verify that early-mapped overlays have been bumped out
-# by later-mapped overlays layed over in the same VMA range.
+# by later-mapped overlays laid over in the same VMA range.
send_gdb "overlay list\n"
gdb_expect {
diff --git a/gdb/testsuite/gdb.base/reggroups.exp b/gdb/testsuite/gdb.base/reggroups.exp
index f96153b..56c00e5 100644
--- a/gdb/testsuite/gdb.base/reggroups.exp
+++ b/gdb/testsuite/gdb.base/reggroups.exp
@@ -27,7 +27,7 @@ if {![runto_main]} {
return 0
}
-set invalid_register_re "Invalid register .*"
+set invalid_register_re "Invalid register \[^\r\n\]*"
# Fetch all reggroups from 'maint print reggroups'.
@@ -51,6 +51,7 @@ proc fetch_reggroups {test} {
}
}
+ verbose -log "found reggroups: $reggroups"
return $reggroups
}
@@ -78,21 +79,34 @@ proc fetch_reggroup_regs {reggroup test} {
# xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, ... }}
#
set regs {}
- gdb_test_multiple "info reg $reggroup" $test {
- -re "info reg $reggroup\r\n" {
+ set have_invalid_register_fail 0
+ set re_regname "\[0-9a-zA-Z_-\]+"
+ set re_hws "\[ \t\]+"
+ set re_hs "\[^\n\r\]+"
+ set re_eol "\r\n"
+ set re_lookahead_eol "(?=$re_eol)"
+ gdb_test_multiple "info reg $reggroup" $test -lbl {
+ -re "^info reg $reggroup" {
exp_continue
}
- -re "^(\[0-9a-zA-Z-\]+)\[ \t\]+(0x\[0-9a-f\]+)\[ \t\]+(\[^\n\r\]+)\r\n" {
+ -re "^${re_eol}($re_regname)$re_hws$::hex$re_hws${re_hs}$re_lookahead_eol" {
lappend regs $expect_out(1,string)
exp_continue
}
-re $invalid_register_re {
- fail "$test (unexpected invalid register response)"
+ set have_invalid_register_fail 1
+ exp_continue
}
- -re "$gdb_prompt $" {
- pass $test
+ -re -wrap "" {
+ if { $have_invalid_register_fail } {
+ fail "$test (unexpected invalid register response)"
+ } else {
+ pass $test
+ }
}
}
+
+ verbose -log "found regs in reggroup $reggroup: [join $regs]"
return $regs
}
diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp
index 015cc56..52c4d27 100644
--- a/gdb/testsuite/gdb.base/remote.exp
+++ b/gdb/testsuite/gdb.base/remote.exp
@@ -167,7 +167,7 @@ set sizeof_random_data [get_sizeof "random_data" 48*1024]
clean_restart $binfile
#
-# Part THREE: Check the upload behavour
+# Part THREE: Check the upload behavior.
#
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c b/gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c
index 350c0c0..06f3c3d 100644
--- a/gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c
+++ b/gdb/testsuite/gdb.base/reset-catchpoint-cond-lib.c
@@ -20,7 +20,6 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
diff --git a/gdb/testsuite/gdb.base/return.exp b/gdb/testsuite/gdb.base/return.exp
index 29de995..23016f8 100644
--- a/gdb/testsuite/gdb.base/return.exp
+++ b/gdb/testsuite/gdb.base/return.exp
@@ -15,12 +15,12 @@
# This file was written by Jeff Law. (law@cs.utah.edu)
+set allow_float_test [allow_float_test]
+
if { [prepare_for_testing "failed to prepare" "return"] } {
return -1
}
-set allow_float_test [allow_float_test]
-
proc return_tests { } {
global gdb_prompt allow_float_test
diff --git a/gdb/testsuite/gdb.base/scope-hw-watch-disable.exp b/gdb/testsuite/gdb.base/scope-hw-watch-disable.exp
index 6113770..29eb682 100644
--- a/gdb/testsuite/gdb.base/scope-hw-watch-disable.exp
+++ b/gdb/testsuite/gdb.base/scope-hw-watch-disable.exp
@@ -29,6 +29,15 @@ if {![runto_main]} {
return -1
}
+gdb_test_multiple "maint info break" "maint info break before" {
+ -re -wrap "watchpoint.*" {
+ fail $gdb_test_name
+ }
+ -re -wrap "" {
+ pass $gdb_test_name
+ }
+}
+
gdb_test "awatch a" \
"Can't set read/access watchpoint when hardware watchpoints are disabled." \
"unsuccessful attempt to create an access watchpoint"
@@ -36,5 +45,14 @@ gdb_test "rwatch b" \
"Can't set read/access watchpoint when hardware watchpoints are disabled." \
"unsuccessful attempt to create a read watchpoint"
+gdb_test_multiple "maint info break" "maint info break after" {
+ -re -wrap "watchpoint.*" {
+ fail $gdb_test_name
+ }
+ -re -wrap "" {
+ pass $gdb_test_name
+ }
+}
+
# The program continues until termination.
gdb_continue_to_end
diff --git a/gdb/testsuite/gdb.base/sigbpt.exp b/gdb/testsuite/gdb.base/sigbpt.exp
index 4855400..6f4616e 100644
--- a/gdb/testsuite/gdb.base/sigbpt.exp
+++ b/gdb/testsuite/gdb.base/sigbpt.exp
@@ -22,7 +22,7 @@
# This test is known to tickle the following problems: kernel letting
# the inferior execute both the system call, and the instruction
# following, when single-stepping a system call; kernel failing to
-# propogate the single-step state when single-stepping the sigreturn
+# propagate the single-step state when single-stepping the sigreturn
# system call, instead resuming the inferior at full speed; GDB
# doesn't know how to software single-step across a sigreturn
# instruction. Since the kernel problems can be "fixed" using
diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp
index 38c63b5..e6bd35a 100644
--- a/gdb/testsuite/gdb.base/signals.exp
+++ b/gdb/testsuite/gdb.base/signals.exp
@@ -105,7 +105,7 @@ if {[runto_main]} {
"next to ++count #2"
sleep 2
- # ...call the function, which is immediatly interrupted
+ # ...call the function, which is immediately interrupted
gdb_test "p func1 ()" \
"Breakpoint \[0-9\]*, handler.*
diff --git a/gdb/testsuite/gdb.base/sigrepeat.c b/gdb/testsuite/gdb.base/sigrepeat.c
index 8717721..79fe648 100644
--- a/gdb/testsuite/gdb.base/sigrepeat.c
+++ b/gdb/testsuite/gdb.base/sigrepeat.c
@@ -59,7 +59,7 @@ handler (int sig)
while (1)
{
/* Wait until a signal has become pending, that way when this
- handler returns it will be immediatly delivered leading to
+ handler returns it will be immediately delivered leading to
back-to-back signals. */
sigset_t set;
sigemptyset (&set);
diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp
index 9286253..2271156 100644
--- a/gdb/testsuite/gdb.base/store.exp
+++ b/gdb/testsuite/gdb.base/store.exp
@@ -196,7 +196,7 @@ proc check_field { t } {
gdb_test "continue" "register struct f_${t} u = f_${t};" \
"continue field ${t}"
- # Match either the return statement, or the line immediatly after
+ # Match either the return statement, or the line immediately after
# it. The compiler can end up merging the return statement into
# the return instruction.
gdb_test "next" "(return u;|\})" "next field ${t}"
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index 31b2bbe..7f1192d 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -296,7 +296,7 @@ proc test_struct_returns { n } {
# known, both failed to print a final "source and line" and misplaced
# the frame ("No frame").
- # The test is writen so that it only reports one FAIL/PASS for the
+ # The test is written so that it only reports one FAIL/PASS for the
# entire operation. The value returned is checked further down.
# "return_value_known", if non-zero, indicates that GDB knew where
# the return value was located.
diff --git a/gdb/testsuite/gdb.base/style-logging.exp b/gdb/testsuite/gdb.base/style-logging.exp
index 882418b..d866d36 100644
--- a/gdb/testsuite/gdb.base/style-logging.exp
+++ b/gdb/testsuite/gdb.base/style-logging.exp
@@ -41,7 +41,8 @@ with_ansi_styling_terminal {
set main_expr [style main function]
set base_file_expr [style ".*style\\.c" file]
- set file_expr "$base_file_expr:\[0-9\]"
+ set line_expr [style $decimal line-number]
+ set file_expr "$base_file_expr:$line_expr"
set arg_expr [style "arg." variable]
gdb_test "frame" \
"$main_expr.*$arg_expr.*$arg_expr.*$file_expr.*"
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index aff6545..d29b238 100644
--- a/gdb/testsuite/gdb.base/style.exp
+++ b/gdb/testsuite/gdb.base/style.exp
@@ -99,7 +99,8 @@ proc run_style_tests { } {
set main_expr [limited_style main function]
set base_file_expr [limited_style ".*style\\.c" file]
- set file_expr "$base_file_expr:\[0-9\]+"
+ set line_expr [limited_style $decimal line-number]
+ set file_expr "$base_file_expr:$line_expr"
set arg_expr [limited_style "arg." variable]
# On some embedded targets that don't fully support argc/argv,
@@ -109,12 +110,12 @@ proc run_style_tests { } {
gdb_test "frame" \
[multi_line \
"#0\\s+$main_expr\\s+\\($arg_expr=$decimal,\\s+$arg_expr=$hex.*\\)\\s+at\\s+$file_expr" \
- "\[0-9\]+\\s+.*return.* break here .*"]
+ "$line_expr\\s+.*return.* break here .*"]
gdb_test "info breakpoints" "$main_expr at $file_expr.*"
gdb_test_no_output "set style sources off"
gdb_test "frame" \
- "\r\n\[^\033\]*break here.*" \
+ "\r\n$line_expr\[^\033\]*break here.*" \
"frame without sources styling"
gdb_test_no_output "set style sources on"
@@ -139,18 +140,18 @@ proc run_style_tests { } {
[multi_line \
"#0\\s+$main_expr\\s+\\($arg_expr=$decimal,\\s+$arg_expr=$hex\\)" \
"\\s+at\\s+$file_expr" \
- "\[0-9\]+\\s+.*return.* break here .*"]
+ "$line_expr\\s+.*return.* break here .*"]
set re1_styled \
[multi_line \
"#0\\s+$main_expr\\s+\\($arg_expr=$decimal,\\s+" \
"\\s+$arg_expr=$hex.*\\)" \
"\\s+at\\s+$file_expr" \
- "\[0-9\]+\\s+.*return.* break here .*"]
+ "$line_expr\\s+.*return.* break here .*"]
set re2_styled \
[multi_line \
"#0\\s+$main_expr\\s+\\($arg_expr=.*" \
"\\s+$arg_expr=$hex.*\\)\\s+at\\s+$file_expr" \
- "\[0-9\]+\\s+.*return.* break here .*"]
+ "$line_expr\\s+.*return.* break here .*"]
# The length of the line containing argv containing:
# - 4 leading spaces
diff --git a/gdb/testsuite/gdb.base/testenv.exp b/gdb/testsuite/gdb.base/testenv.exp
index 847647e..908918a 100644
--- a/gdb/testsuite/gdb.base/testenv.exp
+++ b/gdb/testsuite/gdb.base/testenv.exp
@@ -68,7 +68,7 @@ proc find_env {varname} {
}
-re "$gdb_prompt $" {
# If this fails, bail out, otherwise we get stuck in
- # an infinite loop. The caller will end up emiting a
+ # an infinite loop. The caller will end up emitting a
# FAIL.
return "<fail>"
}
diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
index 30fa12e..154514f 100644
--- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
@@ -62,7 +62,7 @@
#
# If the target has non-continuable watchpoints, while GDB thinks it
# has continuable watchpoints, GDB will see a watchpoint trigger,
-# notice no value changed, and immediatly continue the target. Now,
+# notice no value changed, and immediately continue the target. Now,
# either the target manages to step-over the watchpoint transparently,
# and GDB thus fails to present to value change to the user, or, the
# watchpoint will keep re-triggering, with the program never making
diff --git a/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp
index ebe009a..7088299 100644
--- a/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp
+++ b/gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp
@@ -55,7 +55,7 @@ proc prepare {lang} {
return 1
}
-# The following list is layed out as a table. It is composed by
+# The following list is laid out as a table. It is composed by
# sub-lists (lines), with each line representing one whatis/ptype
# test. The sub-list (line) elements (columns) are (in order):
#
diff --git a/gdb/testsuite/gdb.base/wrap-line.exp b/gdb/testsuite/gdb.base/wrap-line.exp
index b0931a3..323cd6c 100644
--- a/gdb/testsuite/gdb.base/wrap-line.exp
+++ b/gdb/testsuite/gdb.base/wrap-line.exp
@@ -19,8 +19,10 @@
# build == host.
require {!is_remote host}
-# Test both ansi (no auto-wrap) and xterm (auto-wrap).
-set terms {ansi xterm}
+# Test both ansi (no auto-wrap) and xterm (auto-wrap). Also test dumb, which
+# shows the effective behaviour on stub-termcap systems, regardless of the
+# TERM setting.
+set terms {ansi xterm dumb}
# Fill line, assuming we start after the gdb prompt.
proc fill_line { width } {
@@ -44,9 +46,11 @@ proc get_screen_width { } {
upvar gdb_width gdb_width
upvar readline_width readline_width
upvar env_width env_width
+ upvar wrap_mode wrap_mode
set gdb_width 0
set readline_width 0
set env_width 0
+ set wrap_mode ""
set re1 "Number of characters gdb thinks are in a line is ($::decimal)\[^\r\n\]*\\."
set re2 \
"Number of characters readline reports are in a line is ($::decimal)\[^\r\n\]*\\."
@@ -54,6 +58,7 @@ proc get_screen_width { } {
"Number of characters curses thinks are in a line is $::decimal\\."
set re4 \
"Number of characters environment thinks are in a line is ($::decimal) \\(COLUMNS\\)."
+ set re5 [string cat "Readline wrapping mode: (\[^\r\n]*\)\\."]
set cmd "maint info screen"
set re \
[multi_line \
@@ -61,12 +66,14 @@ proc get_screen_width { } {
$re2 \
"(?:$re3" \
")?$re4" \
- .*]
+ .* \
+ $re5]
gdb_test_multiple $cmd "" {
-re -wrap $re {
set gdb_width $expect_out(1,string)
set readline_width $expect_out(2,string)
set env_width $expect_out(3,string)
+ set wrap_mode $expect_out(4,string)
pass $gdb_test_name
}
}
@@ -79,10 +86,16 @@ proc test_wrap { width_auto_detected } {
get_screen_width
- if { $::term == "xterm" } {
+ set wrap_mode_terminal "terminal (terminal is auto wrap capable)"
+ set wrap_mode_readline \
+ "readline (terminal is not auto wrap capable, last column reserved)"
+ set have_wrap 1
+ if { $wrap_mode == $wrap_mode_terminal } {
gdb_assert { $gdb_width == $readline_width }
- } else {
+ } elseif { $wrap_mode == $wrap_mode_readline } {
gdb_assert { $gdb_width == [expr $readline_width + 1] }
+ } else {
+ set have_wrap 0
}
gdb_assert { $gdb_width == $env_width } "width"
@@ -113,7 +126,10 @@ proc test_wrap { width_auto_detected } {
gdb_test_multiple "" "wrap" {
-re $re {
- pass $gdb_test_name
+ gdb_assert {$have_wrap} $gdb_test_name
+ }
+ -re "\r<.*" {
+ gdb_assert {!$have_wrap} $gdb_test_name
}
}
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.c b/gdb/testsuite/gdb.btrace/event-tracing-gap.c
index 6843317..b04f74d 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.c
+++ b/gdb/testsuite/gdb.btrace/event-tracing-gap.c
@@ -1,6 +1,6 @@
-/* Copyright (C) 2015-2024 Free Software Foundation, Inc.
+/* This testcase is part of GDB, the GNU debugger.
- Contributed by Intel Corp. <walfred.tedeschi@intel.com>
+ 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
@@ -15,22 +15,18 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#define OUR_SIZE 5
-
-void
-upper (int * p, int len)
+static int
+square (int num)
{
- int value;
- len++; /* b0-size-test. */
- value = *(p + len);
+ return num * num; /* bp1. */
}
int
main (void)
{
- int a = 0; /* Dummy variable for debugging purposes. */
- int sx[OUR_SIZE];
- a++; /* register-eval. */
- upper (sx, OUR_SIZE + 2);
- return sx[1];
+ int a = 2;
+ int ans = 0;
+
+ ans = square (a);
+ return 0; /* bp2. */
}
diff --git a/gdb/testsuite/gdb.btrace/event-tracing-gap.exp b/gdb/testsuite/gdb.btrace/event-tracing-gap.exp
new file mode 100644
index 0000000..d33e8e8
--- /dev/null
+++ b/gdb/testsuite/gdb.btrace/event-tracing-gap.exp
@@ -0,0 +1,75 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+# Test event tracing with gaps.
+
+require allow_btrace_pt_event_trace_tests
+
+standard_testfile
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
+ return -1
+}
+
+if {![runto_main]} {
+ return -1
+}
+
+gdb_test_no_output "set record btrace pt event-tracing on"
+gdb_test_no_output "record btrace pt"
+
+set bp_1 [gdb_get_line_number "bp1"]
+set bp_2 [gdb_get_line_number "bp2"]
+gdb_breakpoint $bp_1
+gdb_breakpoint $bp_2
+
+gdb_test "next"
+
+# Inferior calls and return commands will create gaps in the recording.
+gdb_test "call square (3)" [multi_line \
+ "" \
+ "Breakpoint $decimal, square \\(num=3\\) at \[^\r\n\]+:$bp_1" \
+ "$decimal.*bp1.*" \
+ "The program being debugged stopped while in a function called from GDB\\." \
+ "Evaluation of the expression containing the function" \
+ "\\(square\\) will be abandoned\\." \
+ "When the function is done executing, GDB will silently stop\\."]
+
+gdb_test "return 9" "0.*main.*" \
+ "return" \
+ "Make.*return now\\? \\(y or n\\) " "y"
+
+gdb_continue_to_breakpoint "break at bp_1" ".*$srcfile:$bp_1.*"
+gdb_continue_to_breakpoint "break at bp_2" ".*$srcfile:$bp_2.*"
+
+# We should have 2 gaps and events for each breakpoint we hit.
+# Note that due to the asynchronous nature of certain events, we use
+# gdb_test_sequence and check only for events that we can control.
+gdb_test_sequence "record function-call-history" "function-call-history" {
+ "\[0-9\]+\tmain"
+ "\\\[iret(: ip = $hex)?\\\]"
+ "\[0-9\]+\t\\\[non-contiguous\\\]"
+ "\[0-9\]+\tsquare"
+ "\\\[interrupt: vector = 0x3 \\\(#bp\\\)(, ip = 0x\[0-9a-fA-F\]+)?\\\]"
+ "\\\[iret(: ip = $hex)?\\\]"
+ "\[0-9\]+\t\\\[non-contiguous\\\]"
+ "\[0-9\]+\tmain"
+ "\[0-9\]+\tsquare"
+ "\\\[interrupt: vector = 0x3 \\\(#bp\\\)(, ip = 0x\[0-9a-fA-F\]+)?\\\]"
+ "\\\[iret(: ip = $hex)?\\\]"
+ "\[0-9\]+\tmain"
+}
diff --git a/gdb/testsuite/gdb.btrace/event-tracing.exp b/gdb/testsuite/gdb.btrace/event-tracing.exp
new file mode 100644
index 0000000..1a5eee0
--- /dev/null
+++ b/gdb/testsuite/gdb.btrace/event-tracing.exp
@@ -0,0 +1,52 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+# Test basic Intel PT event tracing
+
+require allow_btrace_pt_event_trace_tests
+
+standard_testfile null-deref.c
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
+ return -1
+}
+
+if {![runto_main]} {
+ return -1
+}
+
+gdb_test_no_output "set record btrace pt event-tracing on"
+gdb_test_no_output "record btrace pt"
+
+gdb_test "continue" "Program received signal SIGSEGV, Segmentation fault.*"
+
+# Test printing of at least one INTERRUPT and one IRET event.
+# This uses test_sequence to avoid random events failing the tests.
+gdb_test_sequence "record function-call-history" "function-call-history" {
+ "\[0-9\]+\tmain"
+ "\t \\\[iret(: ip = $hex)?\\\]"
+ "\t \\\[interrupt: vector = 0xe \\\(#pf\\\)(, cr2 = 0x0)?(, ip = 0x\[0-9a-fA-F\]+)?\\\]"
+}
+
+# Test the instruction-history. Assembly can differ between compilers. To
+# avoid creating a .S file for this test we just check the event at the end.
+gdb_test "record instruction-history" \
+ "$decimal\t \\\[interrupt: vector = 0xe \\\(#pf\\\)(, cr2 = 0x0)?(, ip = $hex)?\\\]"
+
+# Test reverse stepping and replay stepping
+gdb_test "reverse-stepi" "\\\[interrupt: vector = 0xe \\\(#pf\\\)(, cr2 = 0x0)?(, ip = $hex)?\\\].*"
+gdb_test "stepi" "\\\[interrupt: vector = 0xe \\\(#pf\\\)(, cr2 = 0x0)?(, ip = $hex)?\\\].*"
diff --git a/gdb/testsuite/gdb.btrace/null-deref.c b/gdb/testsuite/gdb.btrace/null-deref.c
new file mode 100644
index 0000000..f0de31f
--- /dev/null
+++ b/gdb/testsuite/gdb.btrace/null-deref.c
@@ -0,0 +1,26 @@
+/* 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 <http://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+
+int
+main ()
+{
+ int a = 34;
+ int *b = NULL;
+
+ a = *b; /* BP1. */
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp
index 9651691..5caf4d1 100644
--- a/gdb/testsuite/gdb.cp/rtti.exp
+++ b/gdb/testsuite/gdb.cp/rtti.exp
@@ -73,7 +73,7 @@ gdb_test_multiple "print *e1" "print *e1" {
# NOTE: carlton/2004-01-14: This test with an "<incomplete type>"
# message because, within rtt1.cc, GDB has no way of knowing that the
-# class is called 'n2::D2' instead of just 'D2'. This is an artifical
+# class is called 'n2::D2' instead of just 'D2'. This is an artificial
# test case, though: if we were using these classes in a more
# substantial way, G++ would emit more debug info. As is, I don't
# think there's anything that GDB can do about this case until G++
diff --git a/gdb/testsuite/gdb.cp/step-and-next-inline.exp b/gdb/testsuite/gdb.cp/step-and-next-inline.exp
index 446cd82..af1719d 100644
--- a/gdb/testsuite/gdb.cp/step-and-next-inline.exp
+++ b/gdb/testsuite/gdb.cp/step-and-next-inline.exp
@@ -26,7 +26,7 @@ proc do_test { use_header } {
if { $use_header } {
# This test will not pass due to poor debug information
- # generated by GCC (at least upto 10.x). See
+ # generated by GCC (at least up to 10.x). See
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94474
return
}
diff --git a/gdb/testsuite/gdb.cp/virtfunc.exp b/gdb/testsuite/gdb.cp/virtfunc.exp
index 9add69e..636497e 100644
--- a/gdb/testsuite/gdb.cp/virtfunc.exp
+++ b/gdb/testsuite/gdb.cp/virtfunc.exp
@@ -197,7 +197,7 @@ proc test_virtual_calls {} {
# wrong value "202"
# gcc 2.95.3 -gdwarf-2
# gcc 2.95.3 -gstabs+
- # attempt to take addres of value not located in memory
+ # attempt to take address of value not located in memory
# gcc 3.3.2 -gdwarf-2
# gcc 3.3.2 -gstabs+
#
diff --git a/gdb/testsuite/gdb.dap/memory.exp b/gdb/testsuite/gdb.dap/memory.exp
index 7082706..c4e4fb3 100644
--- a/gdb/testsuite/gdb.dap/memory.exp
+++ b/gdb/testsuite/gdb.dap/memory.exp
@@ -25,11 +25,12 @@ if {[build_executable ${testfile}.exp $testfile] == -1} {
return
}
-save_vars { env(ASAN_OPTIONS) } {
+save_vars { env(ASAN_OPTIONS) env(TSAN_OPTIONS) } {
# The request readMemory with count 18446744073709551615 triggers address
# sanitizer. Suppress the error, leaving us with just this warning:
# WARNING: AddressSanitizer failed to allocate 0xffffffffffffffff bytes
set_sanitizer ASAN_OPTIONS allocator_may_return_null 1
+ set_sanitizer TSAN_OPTIONS allocator_may_return_null 1
if {[dap_initialize] == ""} {
return
diff --git a/gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c b/gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c
index 45d7833..98ed952 100644
--- a/gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c
+++ b/gdb/testsuite/gdb.debuginfod/corefile-mapped-file-3.c
@@ -17,7 +17,6 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
-#include <sys/stat.h>
#include <unistd.h>
#include <sys/mman.h>
diff --git a/gdb/testsuite/gdb.debuginfod/corefile-mapped-file.exp b/gdb/testsuite/gdb.debuginfod/corefile-mapped-file.exp
index b5dee22..cf96b41 100644
--- a/gdb/testsuite/gdb.debuginfod/corefile-mapped-file.exp
+++ b/gdb/testsuite/gdb.debuginfod/corefile-mapped-file.exp
@@ -93,7 +93,7 @@ set ptr_address [get_hexadecimal_valueof "&library_ptr" "unknown"]
set ptr_offset "unknown"
gdb_test_multiple "info proc mappings" "" {
- -re "^\\s+($hex)\\s+($hex)\\s+$hex\\s+($hex)\[^\r\n\]+$library_filename\r\n" {
+ -re "^($hex)\\s+($hex)\\s+$hex\\s+($hex)\[^\r\n\]+$library_filename\\s*\r\n" {
set low_addr $expect_out(1,string)
set high_addr $expect_out(2,string)
set file_offset $expect_out(3,string)
diff --git a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
index 59b3db5..2f41db9 100644
--- a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
@@ -98,6 +98,7 @@ foreach_with_prefix worker_threads $worker_threads_list {
gdb_load $binfile
- gdb_test "maint print objfiles" "$eol$ws+qualified:$ws+ns::v$eol.*" \
+ gdb_test "pipe maint print objfiles | grep ns::v" \
+ "$ws+qualified:$ws+ns::v" \
"v has parent ns"
}
diff --git a/gdb/testsuite/gdb.dwarf2/count.exp b/gdb/testsuite/gdb.dwarf2/count.exp
index 52deb19..096e093 100644
--- a/gdb/testsuite/gdb.dwarf2/count.exp
+++ b/gdb/testsuite/gdb.dwarf2/count.exp
@@ -124,25 +124,11 @@ Dwarf::assemble $asm_file {
}
}
-if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
- object {nodebug}] != "" } {
+if { [prepare_for_testing "failed to prepare" $testfile \
+ [list $srcfile $asm_file] {nodebug}] } {
return -1
}
-if { [gdb_compile $asm_file ${binfile}2.o object {nodebug}] != "" } {
- return -1
-}
-
-if { [gdb_compile [list ${binfile}1.o ${binfile}2.o] \
- "${binfile}" executable {}] != "" } {
- return -1
-}
-
-save_vars { GDBFLAGS } {
- set GDBFLAGS [concat $GDBFLAGS " -readnow"]
- clean_restart ${testfile}
-}
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp
new file mode 100644
index 0000000..585fd54
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp
@@ -0,0 +1,51 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+# Check that GDB doesn't crash on invalid dwarf, specifically an inter-CU
+# reference pointing to a dummy CU.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+require dwarf2_support
+
+standard_testfile main.c .S
+
+# Create the DWARF.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+ declare_labels label1
+
+ cu {} {
+ compile_unit {{language @DW_LANG_C}} {
+ subprogram {
+ {MACRO_AT_range { main }}
+ {DW_AT_specification %$label1}
+ }
+ }
+ }
+
+ label1: cu {} {
+ }
+}
+
+if [prepare_for_testing "failed to prepare" $testfile \
+ [list $asm_file $srcfile] {nodebug}] {
+ return -1
+}
+
+gdb_assert \
+ { [regexp "DWARF Error: cannot follow reference" $gdb_file_cmd_msg] } \
+ "Error message"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index 1a3d53c..2be211f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -40,7 +40,7 @@ Dwarf::assemble $asm_file {
[function_range frame3 [list ${srcdir}/${subdir}/$srcfile]]
# Very simple info for this test program. We don't care about
- # this information being correct (w.r.t. funtion / argument types)
+ # this information being correct (w.r.t. function / argument types)
# just so long as the compilation using makes use of the
# .debug_ranges data then the test achieves its objective.
cu { label cu_label } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index a59c637..55f4373 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -19,7 +19,7 @@
#
# This sort of thing can occur in optimized code, f.i. here a slightly more
# elaborate case with another is-stmt=no entry (the one with line number 12)
-# inbetween:
+# in between:
# INDEX LINE ADDRESS IS-STMT
# 12 13 0x00000000004003ed
# 13 12 0x00000000004003f2
diff --git a/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp b/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp
new file mode 100644
index 0000000..1dd91ee
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp
@@ -0,0 +1,75 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+# Check that a symbol from an unused PU is not accessible.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+require dwarf2_support
+
+standard_testfile main.c -dw.S
+
+# Create the DWARF.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+ declare_labels partial_label int_label int_label2
+
+ cu {} {
+ compile_unit {{language @DW_LANG_C}} {
+ subprogram {
+ {MACRO_AT_func { main }}
+ }
+ }
+ }
+
+ cu {} {
+ partial_unit {} {
+ int_label: base_type {
+ {name int}
+ {byte_size 4 sdata}
+ {encoding @DW_ATE_signed}
+ }
+
+ constant {
+ {name the_int}
+ {type :$int_label}
+ {const_value 99 data1}
+ }
+ }
+ }
+}
+
+if { [prepare_for_testing "failed to prepare" $testfile \
+ [list $asm_file $srcfile] {nodebug}] } {
+ return -1
+}
+
+set cmd "p the_int"
+set re \
+ [string_to_regexp \
+ {No symbol "the_int" in current context.}]
+
+# Check that the unreferenced PU is not expanded.
+gdb_test $cmd $re
+
+# This should expand all CUs and referenced PUs, but not an unreferenced PU.
+gdb_test_no_output "maint expand-symtabs"
+
+# Flush the symbol cache to do a new symbol lookup.
+gdb_test_no_output "maint flush symbol-cache"
+
+# Check that the unreferenced PU is not expanded after "maint expand-symtabs".
+gdb_test $cmd $re "$cmd, again"
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type-c++.cc b/gdb/testsuite/gdb.dwarf2/enum-type-c++.cc
new file mode 100644
index 0000000..691c7fc
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/enum-type-c++.cc
@@ -0,0 +1,35 @@
+/* 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 <http://www.gnu.org/licenses/>. */
+
+namespace ns {
+
+class A {
+public:
+ enum {
+ val1 = 1
+ };
+};
+
+enum class ec
+{
+ val2 = 2,
+};
+}
+
+int u1 = ns::A::val1;
+
+int u2 = (int)ns::ec::val2;
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type-c++.exp b/gdb/testsuite/gdb.dwarf2/enum-type-c++.exp
new file mode 100644
index 0000000..4f9610c
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/enum-type-c++.exp
@@ -0,0 +1,67 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+require !readnow
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+require dwarf2_support
+
+standard_testfile main.c .cc
+
+if { [prepare_for_testing "failed to prepare" $testfile \
+ [list $srcfile $srcfile2] {debug c++}] } {
+ return -1
+}
+
+require {string equal [have_index $binfile] ""}
+
+set lines [gdb_get_lines "maint print objfiles"]
+set re_ws "\[ \t\]"
+
+# Regression test for PR31900.
+set val1 ns::A::val1
+set test "val1 has a parent"
+if { [regexp val1 $lines] } {
+ set re \
+ [multi_line \
+ "" \
+ "$re_ws+qualified:$re_ws+$val1" \
+ ".*"]
+ gdb_assert {[regexp $re $lines]} $test
+
+ gdb_test "print $val1" " = $val1"
+} else {
+ # Clang doesn't emit a DIE for val1.
+ unsupported $test
+}
+
+# Regression test for PR32158.
+set val2 ns::ec::val2
+set test "val2 has correct parent"
+if { [regexp val2 $lines] } {
+ set re \
+ [multi_line \
+ "" \
+ "$re_ws+qualified:$re_ws+$val2" \
+ ".*"]
+ gdb_assert {[regexp $re $lines]} $test
+
+ gdb_test "print $val2" " = $val2"
+} else {
+ # Clang doesn't emit a DIE for val2.
+ unsupported $test
+}
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type.exp b/gdb/testsuite/gdb.dwarf2/enum-type.exp
index 394d287..ec12db5 100644
--- a/gdb/testsuite/gdb.dwarf2/enum-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/enum-type.exp
@@ -65,6 +65,41 @@ Dwarf::assemble $asm_file {
}
}
}
+
+ cu {} {
+ DW_TAG_compile_unit {
+ {DW_AT_language @DW_LANG_C_plus_plus}
+ {DW_AT_name tmp.c}
+ {DW_AT_comp_dir /tmp}
+ } {
+ declare_labels integer_label forward
+
+ integer_label: DW_TAG_base_type {
+ {DW_AT_byte_size 4 DW_FORM_sdata}
+ {DW_AT_encoding @DW_ATE_signed}
+ {DW_AT_name int}
+ }
+
+ DW_TAG_enumeration_type {
+ {DW_AT_specification :$forward}
+ } {
+ DW_TAG_enumerator {
+ {DW_AT_name val1}
+ {DW_AT_const_value 1 DW_FORM_sdata}
+ }
+ }
+
+ DW_TAG_namespace {
+ {DW_AT_name ns}
+ } {
+ forward: DW_TAG_enumeration_type {
+ {DW_AT_name e}
+ {DW_AT_type :$integer_label}
+ {DW_AT_declaration 1 flag}
+ }
+ }
+ }
+ }
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
@@ -79,3 +114,18 @@ gdb_test "ptype enum EU" "type = enum EU {TWO = 2}" \
gdb_test_no_output "set lang c++"
gdb_test "ptype enum EU" "type = enum EU : unsigned int {TWO = 2}" \
"ptype EU in C++"
+
+gdb_test "p ns::val1" \
+ " = ns::val1"
+
+require !readnow
+require {string equal [have_index $binfile] ""}
+
+set re_ws "\[ \t\]"
+
+gdb_test_lines "maint print objfiles" \
+ "val1 has a parent" \
+ [multi_line \
+ "" \
+ "$re_ws+qualified:$re_ws+ns::val1" \
+ ".*"]
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.S b/gdb/testsuite/gdb.dwarf2/fission-reread.S
index 1763fab..279f6f3 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.S
@@ -97,7 +97,7 @@ SYMBOL(main):
.byte 0x87
.4byte .Lskeleton_debug_line0 /* DW_AT_stmt_list */
- /* Manually inserted to have a DW_AT_specification refering to
+ /* Manually inserted to have a DW_AT_specification referring to
something and appearing ahead of it. */
.uleb128 0x8 /* DW_TAG_class_type */
.4byte .Ltu_class_type - .Ltu_start_dwo
diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
index d8367b0..b734c30 100644
--- a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
@@ -98,6 +98,7 @@ foreach_with_prefix worker_threads $worker_threads_list {
gdb_load $binfile
- gdb_test "maint print objfiles" "$eol$ws+qualified:$ws+ns::v$eol.*" \
+ gdb_test "pipe maint print objfiles | grep ns::v" \
+ "$ws+qualified:$ws+ns::v" \
"v has parent ns"
}
diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec.exp b/gdb/testsuite/gdb.dwarf2/forward-spec.exp
index b045c02..5d41f87 100644
--- a/gdb/testsuite/gdb.dwarf2/forward-spec.exp
+++ b/gdb/testsuite/gdb.dwarf2/forward-spec.exp
@@ -16,6 +16,8 @@
# Check that the DWARF reader works with a a DW_AT_specification that
# refers to a later DIE.
+require !readnow
+
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
@@ -72,31 +74,13 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
return -1
}
-set in_v 0
-gdb_test_multiple "maint print objfiles" "v has a parent" {
- -re "^ *\\\[\[0-9\]\\\] *\\(\\(cooked_index_entry\[^\r\n\]*" {
- set in_v 0
- exp_continue
- }
- -re "^ *name: *v\[\r\n\]*" {
- set in_v 1
- exp_continue
- }
- -re "^ *parent: *\\(\\(cooked_index_entry \\*\\) (0|$hex)\\)" {
- if {$in_v} {
- if {$expect_out(1,string) == "0"} {
- fail $gdb_test_name
- } else {
- pass $gdb_test_name
- }
- set in_v 0
- }
- exp_continue
- }
- -re "^\[^\r\n\]*\[\r\n\]+" {
- exp_continue
- }
- -re "$gdb_prompt " {
- # Done.
- }
-}
+require {string equal [have_index $binfile] ""}
+
+set re_ws "\[ \t\]"
+
+gdb_test_lines "maint print objfiles" \
+ "v has a parent" \
+ [multi_line \
+ "" \
+ "$re_ws+qualified:$re_ws+ns::v" \
+ ".*"]
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
index 4e44227..23d60da 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
@@ -95,7 +95,13 @@ proc local_add_gdb_index { program } {
# building an index from a program already using one.
set test "check if index present"
-gdb_test_multiple "mt print objfiles ${testfile}" $test {
+set filter "gdb_index|debug_names|Psymtabs|Cooked"
+set cmd "pipe mt print objfiles ${testfile} | grep -E \"$filter\""
+set cmd_re [string_to_regexp $cmd]
+gdb_test_multiple $cmd $test {
+ -re ^$cmd_re {
+ exp_continue
+ }
-re "gdb_index.*${gdb_prompt} $" {
set binfile_with_index $binfile
set host_binfile_with_index [gdb_remote_download host $binfile]
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 8e6dbf0..541331c 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -83,18 +83,11 @@ Dwarf::assemble $asm_file {
}
}
-if { [build_executable ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
return -1
}
-# We need --readnow because otherwise we never read in the CU we
-# created above.
-save_vars { GDBFLAGS } {
- set GDBFLAGS "$GDBFLAGS -readnow"
- clean_restart ${testfile}
-}
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index 585cd74..867789f 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -101,18 +101,11 @@ Dwarf::assemble $asm_file {
}
}
-if { [build_executable ${testfile}.exp ${testfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
return -1
}
-# We need --readnow because otherwise we never read in the CU we
-# created above.
-save_vars { GDBFLAGS } {
- set GDBFLAGS "$GDBFLAGS -readnow"
- clean_restart ${testfile}
-}
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.dwarf2/multidictionary.exp b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
index 36c0bb4..4c7dc0e 100644
--- a/gdb/testsuite/gdb.dwarf2/multidictionary.exp
+++ b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
@@ -23,7 +23,7 @@ require dwarf2_support
standard_testfile main.c .S
# Create the DWARF. This is derived from the reproducer in the bug
-# mentioned above. This DIE tree is typical of compilations wtih
+# mentioned above. This DIE tree is typical of compilations with
# LTO enabled.
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/pr13961.S b/gdb/testsuite/gdb.dwarf2/pr13961.S
index 856d211..2423ee9 100644
--- a/gdb/testsuite/gdb.dwarf2/pr13961.S
+++ b/gdb/testsuite/gdb.dwarf2/pr13961.S
@@ -101,7 +101,7 @@ SYMBOL(main):
.byte 0x87
.4byte .Ldebug_line0 /* DW_AT_stmt_list */
- /* Manually inserted to have a DW_AT_specification refering to
+ /* Manually inserted to have a DW_AT_specification referring to
something and appearing ahead of it. */
.uleb128 0x8 /* DW_TAG_class_type */
.4byte .Ltu_class_type - .Ldebug_types0
@@ -185,7 +185,7 @@ SYMBOL(main):
.byte 0x3 /* DW_OP_addr */
.4byte baz
- /* Manually inserted to have a DW_AT_specification refering to
+ /* Manually inserted to have a DW_AT_specification referring to
something and appearing ahead of it. */
.uleb128 0x8 /* DW_TAG_class_type */
.4byte .Lcu_class_type - .Ldebug_info0 /* DW_AT_specification */
diff --git a/gdb/testsuite/gdb.dwarf2/pr13961.exp b/gdb/testsuite/gdb.dwarf2/pr13961.exp
index a306c45..e4ea9d0 100644
--- a/gdb/testsuite/gdb.dwarf2/pr13961.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr13961.exp
@@ -36,7 +36,8 @@ gdb_test "break -q main" "Breakpoint.*at.*"
pass $testfile
# Regression test for PR symtab/30739.
-gdb_test_multiple "maint print objfiles $binfile" "no foo::foo" {
+set cmd "pipe maint print objfiles $binfile | grep foo::foo"
+gdb_test_multiple $cmd "no foo::foo" {
-re -wrap "\r\n *qualified: *foo::foo\r\n.*" {
fail $gdb_test_name
}
diff --git a/gdb/testsuite/gdb.dwarf2/self-spec.exp b/gdb/testsuite/gdb.dwarf2/self-spec.exp
index 2e8fe6b..9bb4064 100644
--- a/gdb/testsuite/gdb.dwarf2/self-spec.exp
+++ b/gdb/testsuite/gdb.dwarf2/self-spec.exp
@@ -59,8 +59,8 @@ require {string eq $index ""}
require !readnow
-gdb_test "maint print objfiles $testfile" \
- "\r\n *qualified: *c1\r\n.*" \
+gdb_test "pipe maint print objfiles $testfile | grep c1" \
+ " *qualified: *c1" \
"class c1 in cooked index"
gdb_test "maint expand-symtabs"
diff --git a/gdb/testsuite/gdb.fortran/info-types.exp b/gdb/testsuite/gdb.fortran/info-types.exp
index 52ce7ac..ad2c988 100644
--- a/gdb/testsuite/gdb.fortran/info-types.exp
+++ b/gdb/testsuite/gdb.fortran/info-types.exp
@@ -27,10 +27,8 @@ if { [prepare_for_testing "failed to prepare" $testfile \
return -1
}
-if { ![fortran_runto_main] } {
- perror "Could not run to main."
- return
-}
+# Don't run to main to avoid increasing the search scope to include
+# debug info of shared libraries like libc, libgcc, libgfortran etc.
set integer4 [fortran_int4]
set integer8 [fortran_int8]
diff --git a/gdb/testsuite/gdb.fortran/types.exp b/gdb/testsuite/gdb.fortran/types.exp
index edbf5ab..494ed1e 100644
--- a/gdb/testsuite/gdb.fortran/types.exp
+++ b/gdb/testsuite/gdb.fortran/types.exp
@@ -60,7 +60,7 @@ proc test_float_literal_types_accepted {} {
# Test various floating point formats
# this used to guess whether to look for "real*4" or
- # "real*8" based on a target config variable, but noone
+ # "real*8" based on a target config variable, but no one
# maintained it properly.
gdb_test "pt .44" "type = real\\*\[0-9\]+"
diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
index 1ec9576..64e86ac 100644
--- a/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
+++ b/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp
@@ -27,11 +27,11 @@ if ![fortran_runto_main] {
return -1
}
-# Check VLA with arbitary length and check that elements outside of
+# Check VLA with arbitrary length and check that elements outside of
# bounds of the passed VLA can be accessed correctly.
gdb_breakpoint [gdb_get_line_number "end-of-bar"]
gdb_continue_to_breakpoint "end-of-bar"
-gdb_test "p array1(42)" " = 3" "print arbitary array1(42)"
-gdb_test "p array1(100)" " = 100" "print arbitary array1(100)"
-gdb_test "p array2(4,10)" " = 1" "print arbitary array2(4,10)"
-gdb_test "p array2(4,100)" " = 1" "print arbitary array2(4,100)"
+gdb_test "p array1(42)" " = 3" "print arbitrary array1(42)"
+gdb_test "p array1(100)" " = 100" "print arbitrary array1(100)"
+gdb_test "p array2(4,10)" " = 1" "print arbitrary array2(4,10)"
+gdb_test "p array2(4,100)" " = 1" "print arbitrary array2(4,100)"
diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp
index 4589edc..c17523a 100644
--- a/gdb/testsuite/gdb.gdb/python-helper.exp
+++ b/gdb/testsuite/gdb.gdb/python-helper.exp
@@ -263,7 +263,7 @@ proc test_python_helper {} {
# Test the htab_t pretty-printer.
gdb_test -prompt $outer_prompt_re "print all_bfds" "htab_t with ${::decimal} elements = \\{${::hex}.*\\}"
- # Test the intrusive_list pretty-printer. A bug occured in the
+ # Test the intrusive_list pretty-printer. A bug occurred in the
# pretty-printer for lists with more than one element. Verify that
# we see both elements of the inferior_list list being printed.
gdb_test -prompt $outer_prompt_re "print inferior_list" "intrusive list of inferior = {.*, num = 1,.*, num = 2,.*}"
diff --git a/gdb/testsuite/gdb.go/integers.exp b/gdb/testsuite/gdb.go/integers.exp
index fec8422..7837542 100644
--- a/gdb/testsuite/gdb.go/integers.exp
+++ b/gdb/testsuite/gdb.go/integers.exp
@@ -66,7 +66,7 @@ gdb_test "print i + k" " = 4"
gdb_test "print j + k" " = 5"
gdb_test "print i + j + k" " = 6"
-# Test substraction
+# Test subtraction
gdb_test "print j - i" " = 1"
gdb_test "print i - j" "= -1"
gdb_test "print k -i -j" " = 0"
diff --git a/gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.exp b/gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.exp
index 68cd11a..214242f 100644
--- a/gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.exp
+++ b/gdb/testsuite/gdb.linespec/cp-replace-typedefs-ns-template.exp
@@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
gdb_test_no_output "set max-completions unlimited"
# Confirm that the important global namespace typedefs were indeed
-# emited in the debug info.
+# emitted in the debug info.
gdb_test "ptype NS2" "type = int"
gdb_test "ptype object" "type = struct NS1::NS2::object {.*"
gdb_test "ptype Templ1" "type = struct NS1::NS2::Templ1<unsigned int> .*"
diff --git a/gdb/testsuite/gdb.linespec/cpcompletion.exp b/gdb/testsuite/gdb.linespec/cpcompletion.exp
index 480e034..09bd9a2 100644
--- a/gdb/testsuite/gdb.linespec/cpcompletion.exp
+++ b/gdb/testsuite/gdb.linespec/cpcompletion.exp
@@ -831,7 +831,7 @@ proc_with_prefix template-class-with-method {} {
}
}
-# Test completion of a const-overloaded funtion (const-overload).
+# Test completion of a const-overloaded function (const-overload).
# Note that "const" appears after the function/method parameters.
proc_with_prefix const-overload {} {
diff --git a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
index 73b25bd..b91f915 100644
--- a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
@@ -20,6 +20,16 @@ set MIFLAGS "-i=mi"
require dwarf2_support
+# Clang reorders global assembly labels, placing them all side by side.
+# This results in having low and high PCs what have the same value for
+# the CU and all the functions (in my system, they are all 0x1130). If
+# this test is rewritten to use the dwarf assembler instead, we can enable
+# this test with clang again.
+if {[test_compiler_info {clang-*-*}]} {
+ unsupported "can't generate debug info"
+ return
+}
+
standard_testfile .S dw2-ref-missing-frame-func.c dw2-ref-missing-frame-main.c
set objsfile [standard_output_file ${testfile}.o]
set objfuncfile [standard_output_file ${testfile}-func.o]
diff --git a/gdb/testsuite/gdb.mi/mi-break-qualified.exp b/gdb/testsuite/gdb.mi/mi-break-qualified.exp
index 7543d98..20e2bb8 100644
--- a/gdb/testsuite/gdb.mi/mi-break-qualified.exp
+++ b/gdb/testsuite/gdb.mi/mi-break-qualified.exp
@@ -69,7 +69,7 @@ proc test_break_qualified {} {
-enabled "y" \
-func "$func" \
-file ".*mi-break-qualified.cc" \
- -line="$line_no"]
+ -line $line_no]
}
set loc1 [make_loc_re "NS::func\\(int\\)" $loc_ns_func_line]
diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp
index bfe839d..86e7b57 100644
--- a/gdb/testsuite/gdb.mi/mi-break.exp
+++ b/gdb/testsuite/gdb.mi/mi-break.exp
@@ -313,7 +313,7 @@ proc_with_prefix test_explicit_breakpoints {} {
mi_create_breakpoint "-c \"intarg == 3\" --function callee2" \
"insert explicit conditional breakpoint in callee2" \
- -func callee2 ".*$srcfile" -line $line_callee2_body \
+ -func callee2 -file ".*$srcfile" -line $line_callee2_body \
-cond "intarg == 3"
# mi_create_breakpoint cannot deal with displaying canonical
@@ -357,7 +357,7 @@ proc_with_prefix test_forced_conditions {} {
"dprintf with forced condition"
# Define a plain breakpoint first, and a condition later.
- mi_create_breakpoint "callme" "define a bp" ""
+ mi_create_breakpoint "callme" "define a bp"
mi_gdb_test "-break-condition --force 16 bad == 42" \
"${warning}\\^done" \
"invalid condition is forced"
diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
index 18e19a2..305c061 100644
--- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp
@@ -172,7 +172,7 @@ with_test_prefix "test_insert_delete_modify" {
test_insert_delete_modify
}
-# Test 'breakpoint-modified' notification is emited when pending breakpoints are
+# Test 'breakpoint-modified' notification is emitted when pending breakpoints are
# resolved.
proc test_pending_resolved { } {
diff --git a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc
index be1f50f..d41b55d 100644
--- a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc
+++ b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc
@@ -43,8 +43,7 @@ foo ()
try
{
bar ();
- }
- catch (const my_exception &ex) /* Catch 1. */
+ } catch (const my_exception &ex) /* Catch 1. */
{
if (i == 1)
throw; /* Throw 2. */
@@ -60,8 +59,7 @@ main ()
try
{
foo ();
- }
- catch (const my_exception &ex) /* Catch 2. */
+ } catch (const my_exception &ex) /* Catch 2. */
{
if (i == 1)
return 1; /* Stop here. */
diff --git a/gdb/testsuite/gdb.mi/mi-complete.exp b/gdb/testsuite/gdb.mi/mi-complete.exp
index 91564a4..7fccaa2 100644
--- a/gdb/testsuite/gdb.mi/mi-complete.exp
+++ b/gdb/testsuite/gdb.mi/mi-complete.exp
@@ -28,7 +28,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
mi_clean_restart $binfile
-mi_runto_main
+# Don't run to main to avoid increasing the search scope to include
+# debug info of shared libraries like glibc, libgcc, etc.
mi_gdb_test "1-complete br" \
"1\\^done,completion=\"break\",matches=\\\[.*\"break\",.*\"break-range\".*\\\],max_completions_reached=\"0\"" \
diff --git a/gdb/testsuite/gdb.mi/mi-multi-commands.exp b/gdb/testsuite/gdb.mi/mi-multi-commands.exp
index 3a2e774..028e187 100644
--- a/gdb/testsuite/gdb.mi/mi-multi-commands.exp
+++ b/gdb/testsuite/gdb.mi/mi-multi-commands.exp
@@ -103,7 +103,7 @@ proc run_test { args } {
set seen_first_message true
exp_continue
}
- -re "\r\n$mi_gdb_prompt" {
+ -re "$mi_gdb_prompt" {
gdb_assert $seen_first_message $gdb_test_name
}
}
diff --git a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp
index ba6ff5a..270dbc1 100644
--- a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp
+++ b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp
@@ -50,7 +50,7 @@ set bkpt_line [gdb_get_line_number "set breakpoint here"]
mi_create_breakpoint "$srcfile:$bkpt_line" \
"breakpoint at thread_function" \
- -number 2 -function thread_function
+ -number 2 -func thread_function
mi_send_resuming_command "exec-continue --all" "resume all"
for {set i 0} {$i < $nthreads} {incr i} {
diff --git a/gdb/testsuite/gdb.mi/mi-nsthrexec.exp b/gdb/testsuite/gdb.mi/mi-nsthrexec.exp
index fdfdd05..dba7847 100644
--- a/gdb/testsuite/gdb.mi/mi-nsthrexec.exp
+++ b/gdb/testsuite/gdb.mi/mi-nsthrexec.exp
@@ -47,7 +47,7 @@ if { [mi_runto_main] < 0 } {
mi_create_breakpoint thread_execler \
"breakpoint at thread_execler" \
- -number 2 -function thread_execler
+ -number 2 -func thread_execler
# All threads should stop, except the main thread.
mi_send_resuming_command "exec-continue --all" "resume all"
diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp
index 99dbab4..4358c18 100644
--- a/gdb/testsuite/gdb.mi/mi-pending.exp
+++ b/gdb/testsuite/gdb.mi/mi-pending.exp
@@ -66,8 +66,8 @@ mi_create_breakpoint_pending "-f pendfunc1" \
mi_gdb_test "-break-commands 1 \"print 1\" \"print 2\" \"print 3\""\
"\\^done" \
"set breakpoint commands on pending breakpoint"
-set bp [mi_make_breakpoint_pending -number 1 -disp keep -func pendfunc1 \
- -disp keep -enabled y -original-location pendfunc1 \
+set bp [mi_make_breakpoint_pending -number 1 -disp keep \
+ -enabled y -original-location pendfunc1 \
-script {\["print 1","print 2","print 3"\]}]
mi_gdb_test "-break-info 1" \
"\\^done,[mi_make_breakpoint_table [list $bp]]" \
diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp
index 40c0644..b8db2af 100644
--- a/gdb/testsuite/gdb.mi/mi-sym-info.exp
+++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp
@@ -35,7 +35,8 @@ if {[build_executable "failed to prepare" ${testfile} \
mi_clean_restart $binfile
-mi_runto_main
+# Don't run to main to avoid increasing the search scope to include
+# debug info of shared libraries like libc, libgcc, etc.
set qstr "\"\[^\"\]+\""
set fun_re \
diff --git a/gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp b/gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp
index c048aca..08c7218 100644
--- a/gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp
+++ b/gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp
@@ -73,7 +73,7 @@ foreach_mi_ui_mode mode {
# UI.
if {$mode eq "separate"} {
with_spawn_id $gdb_main_spawn_id {
- gdb_test_multiple "" "drain CLI output upto breakpoint" {
+ gdb_test_multiple "" "drain CLI output up to breakpoint" {
-re "Thread 1 \[^\r\n\]+ hit Breakpoint $decimal,\
breakpt \\(\\) at\
\[^\r\n\]+\r\n$decimal\\s+\[^\r\n\]+\r\n" {
diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.cc b/gdb/testsuite/gdb.mi/mi-var-cp.cc
index e8dd325..c40bdcf 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cp.cc
+++ b/gdb/testsuite/gdb.mi/mi-var-cp.cc
@@ -42,7 +42,7 @@ struct S2 : S {};
int base_in_reference_test (S2& s2)
{
/*: BEGIN: base_in_reference :*/
- return s2.i;
+ int x = s2.i + s2.j;
/*:
mi_create_varobj "S2" "s2" "create varobj for s2"
mi_list_varobj_children "S2" {
@@ -62,6 +62,7 @@ int base_in_reference_test (S2& s2)
:*/
/*: END: base_in_reference :*/
+ return x;
}
void base_in_reference_test_main ()
diff --git a/gdb/testsuite/gdb.mi/mi-vla-c99.exp b/gdb/testsuite/gdb.mi/mi-vla-c99.exp
index ee4bc26..a8a77ac 100644
--- a/gdb/testsuite/gdb.mi/mi-vla-c99.exp
+++ b/gdb/testsuite/gdb.mi/mi-vla-c99.exp
@@ -37,7 +37,7 @@ set bp_lineno [gdb_get_line_number "vla-filled"]
mi_create_breakpoint "-t vla.c:$bp_lineno" \
"insert breakpoint at line $bp_lineno after vla is filled" \
- -function func -line $bp_lineno -file ".*vla.c" -disp del
+ -func func -line $bp_lineno -file ".*vla.c" -disp del
mi_run_cmd
mi_expect_stop "breakpoint-hit" "func" "\{name=\"n\",value=\"5\"\}" \
diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
index e27f0ec..6097c02 100644
--- a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
@@ -41,7 +41,7 @@ if {[mi_clean_restart $binfile]} {
set bp_lineno [gdb_get_line_number "vla1-not-allocated"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
"insert breakpoint at line $bp_lineno (vla not allocated)" \
- -number 1 -disp del -func vla ".*vla.f90" $bp_lineno $hex
+ -number 1 -disp del -func vla
mi_run_cmd
mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
{ "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -67,7 +67,7 @@ mi_list_array_varobj_children_with_index "vla1_not_allocated" "0" "1" \
set bp_lineno [gdb_get_line_number "vla1-allocated"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
"insert breakpoint at line $bp_lineno (vla allocated)" \
- -number 2 -disp del -func vla ".*vla.f90" $bp_lineno $hex
+ -number 2 -disp del -func vla
mi_run_cmd
mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
{ "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -92,7 +92,7 @@ mi_list_array_varobj_children_with_index "vla1_allocated" "5" "1" \
set bp_lineno [gdb_get_line_number "vla1-filled"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
"insert breakpoint at line $bp_lineno" \
- -number 3 -disp del -func vla ".*vla.f90" $bp_lineno $hex
+ -number 3 -disp del -func vla
mi_run_cmd
mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
{ "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -103,7 +103,7 @@ mi_gdb_test "520-data-evaluate-expression vla1" \
set bp_lineno [gdb_get_line_number "vla1-modified"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
"insert breakpoint at line $bp_lineno" \
- -number 4 -disp del -func vla ".*vla.f90" $bp_lineno $hex
+ -number 4 -disp del -func vla
mi_run_cmd
mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
{ "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -120,7 +120,7 @@ mi_gdb_test "560-data-evaluate-expression vla1(4)" \
set bp_lineno [gdb_get_line_number "vla1-deallocated"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
"insert breakpoint at line $bp_lineno" \
- -number 5 -disp del -func vla ".*vla.f90" $bp_lineno $hex
+ -number 5 -disp del -func vla
mi_run_cmd
mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
{ "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -131,7 +131,7 @@ mi_gdb_test "570-data-evaluate-expression vla1" \
set bp_lineno [gdb_get_line_number "pvla2-not-associated"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
"insert breakpoint at line $bp_lineno" \
- -number 6 -disp "del" -func "vla" ".*vla.f90" $bp_lineno $hex
+ -number 6 -disp "del" -func "vla"
mi_run_cmd
mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
{ "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -172,7 +172,7 @@ gdb_expect {
set bp_lineno [gdb_get_line_number "pvla2-associated"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
"insert breakpoint at line $bp_lineno" \
- -number 7 -disp del -func vla ".*vla.f90" $bp_lineno $hex
+ -number 7 -disp del -func vla
mi_run_cmd
mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
{ "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
@@ -196,7 +196,7 @@ mi_gdb_test "593-var-evaluate-expression pvla2_associated" \
set bp_lineno [gdb_get_line_number "pvla2-set-to-null"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
"insert breakpoint at line $bp_lineno" \
- -number 8 -disp del -func vla ".*vla.f90" $bp_lineno $hex
+ -number 8 -disp del -func vla
mi_run_cmd
mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \
{ "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno"
diff --git a/gdb/testsuite/gdb.modula2/builtin-procedure-adr.exp b/gdb/testsuite/gdb.modula2/builtin-procedure-adr.exp
new file mode 100644
index 0000000..6588020
--- /dev/null
+++ b/gdb/testsuite/gdb.modula2/builtin-procedure-adr.exp
@@ -0,0 +1,32 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite. It contains tests for printing
+# the elements of an unbounded array using the Modula-2 language mode of
+# gdb.
+
+standard_testfile unbounded1.c
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug quiet}]} {
+ return -1
+}
+
+if {![runto main]} {
+ return
+}
+
+gdb_test "set lang modula-2" ".*does not match.*" "switch to modula-2"
+
+gdb_test "print ADR(i)" ".*0x.*" "print the address of local variable i"
diff --git a/gdb/testsuite/gdb.multi/bp-thread-specific.exp b/gdb/testsuite/gdb.multi/bp-thread-specific.exp
index c1d8752..11dc248 100644
--- a/gdb/testsuite/gdb.multi/bp-thread-specific.exp
+++ b/gdb/testsuite/gdb.multi/bp-thread-specific.exp
@@ -32,9 +32,33 @@ if {![runto_main]} {
return -1
}
+delete_breakpoints
+
+# Create a thread-specific b/p on main.
+gdb_breakpoint "main thread 1"
+set bpnum [get_integer_valueof "\$bpnum" "INVALID" \
+ "get number for thread specific b/p on main"]
+
+# Check the b/p has a location and is displayed correctly.
+gdb_test "info breakpoints" \
+ [multi_line \
+ "" \
+ "$bpnum\\s+breakpoint\\s+keep\\s+y\\s+$hex\\s+in main at \[^\r\n\]+/$srcfile:$decimal"\
+ "\\s+stop only in thread 1"] \
+ "check thread b/p on main has a location"
+
gdb_test "add-inferior -exec ${binfile}" "Added inferior 2.*" "add inferior 2"
gdb_test "inferior 2"
+# The breakpoint should still have a location, but should now display
+# information indicating this breakpoint is only in inferior 1.
+gdb_test "info breakpoints" \
+ [multi_line \
+ "" \
+ "$bpnum\\s+breakpoint\\s+keep\\s+y\\s+$hex\\s+in main at \[^\r\n\]+/$srcfile:$decimal inf 1"\
+ "\\s+stop only in thread 1\\.1"] \
+ "check thread b/p on main still has updated correctly"
+
if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.multi/inferior-specific-bp-1.c b/gdb/testsuite/gdb.multi/inferior-specific-bp-1.c
index 59a6e32..16db062 100644
--- a/gdb/testsuite/gdb.multi/inferior-specific-bp-1.c
+++ b/gdb/testsuite/gdb.multi/inferior-specific-bp-1.c
@@ -35,7 +35,7 @@ foo (void)
static void
bar (void)
{
- global_var = 0;
+ global_var = 0; /* First location of bar. */
foo ();
}
diff --git a/gdb/testsuite/gdb.multi/inferior-specific-bp-2.c b/gdb/testsuite/gdb.multi/inferior-specific-bp-2.c
index cbae745..bde6fbf 100644
--- a/gdb/testsuite/gdb.multi/inferior-specific-bp-2.c
+++ b/gdb/testsuite/gdb.multi/inferior-specific-bp-2.c
@@ -36,7 +36,7 @@ main (void)
static int
bar (void)
{
- return baz ();
+ return baz (); /* Second location of bar. */
}
static int
diff --git a/gdb/testsuite/gdb.multi/inferior-specific-bp.exp b/gdb/testsuite/gdb.multi/inferior-specific-bp.exp
index 52f8418..82cc924 100644
--- a/gdb/testsuite/gdb.multi/inferior-specific-bp.exp
+++ b/gdb/testsuite/gdb.multi/inferior-specific-bp.exp
@@ -62,6 +62,73 @@ gdb_test "break foo inferior 1 inferior 2" \
# Clear out any other breakpoints.
delete_breakpoints
+# Create an inferior specific breakpoint and then change the inferior
+# using the Python API. Use 'info breakpoint' to check that the
+# breakpoint was updated as we expect.
+if { [allow_python_tests] } {
+ with_test_prefix "update breakpoint inferior" {
+ # Create the b/p and grab its number.
+ gdb_breakpoint "bar inferior 1"
+ set bpnum [get_integer_valueof "\$bpnum" "INVALID" \
+ "get b/p number for breakpoint on bar"]
+
+ # Get the line number for the two locations, the first in
+ # inferior 1, the second in inferior 2.
+ set bar_lineno_1 \
+ [gdb_get_line_number "First location of bar" $srcfile]
+ set bar_lineno_2 \
+ [gdb_get_line_number "Second location of bar" $srcfile2]
+
+ # Check the b/p was created with a single location where we
+ # expect it.
+ gdb_test "info breakpoint $bpnum" \
+ [multi_line \
+ "" \
+ "$bpnum\\s+breakpoint\\s+keep\\s+y\\s+$hex\\s+in bar at \[^\r\n\]+/$srcfile:$bar_lineno_1 inf 1" \
+ "\\s+stop only in inferior 1"] \
+ "check original details for breakpoint on bar"
+
+ # Use the Python API to update the b/p's inferior.
+ gdb_test_no_output "python bp = gdb.breakpoints()\[0\]"
+ gdb_test_no_output "python bp.inferior = 2"
+
+ # We should still only have a single location, but now in
+ # inferior 2.
+ gdb_test "info breakpoint $bpnum" \
+ [multi_line \
+ "" \
+ "$bpnum\\s+breakpoint\\s+keep\\s+y\\s+$hex\\s+in bar at \[^\r\n\]+/$srcfile2:$bar_lineno_2 inf 2" \
+ "\\s+stop only in inferior 2"] \
+ "check updated details for breakpoint on bar"
+
+ # Use the Python API to remove the inferior restriction on the
+ # breakpoint.
+ gdb_test_no_output "python bp.inferior = None"
+
+ # The breakpoint should now have multiple locations.
+ gdb_test "info breakpoint $bpnum" \
+ [multi_line \
+ "" \
+ "$bpnum\\s+breakpoint\\s+keep\\s+y\\s+<MULTIPLE>\\s*" \
+ "$bpnum.1\\s+y\\s+$hex\\s+in bar at\[^\r\n\]+$srcfile:$bar_lineno_1 inf 1" \
+ "$bpnum.2\\s+y\\s+$hex\\s+in bar at\[^\r\n\]+$srcfile2:$bar_lineno_2 inf 2"] \
+ "check breakpoint bar now inferior requirement is gone"
+
+ # Finally, add the inferior requirement back.
+ gdb_test_no_output "python bp.inferior = 1"
+
+ # Check the original location and restriction is restored.
+ gdb_test "info breakpoint $bpnum" \
+ [multi_line \
+ "" \
+ "$bpnum\\s+breakpoint\\s+keep\\s+y\\s+$hex\\s+in bar at \[^\r\n\]+/$srcfile:$bar_lineno_1 inf 1" \
+ "\\s+stop only in inferior 1"] \
+ "check original details for breakpoint on bar are back"
+
+ delete_breakpoints
+ }
+}
+
# Use 'info breakpoint' to check that the inferior specific breakpoint is
# present in the breakpoint list. TESTNAME is the name used for this test,
# BP_NUMBER is the number for the breakpoint, and EXPECTED_LOC_COUNT is the
diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.c b/gdb/testsuite/gdb.multi/multi-term-settings.c
index 6880206..e9e7e95 100644
--- a/gdb/testsuite/gdb.multi/multi-term-settings.c
+++ b/gdb/testsuite/gdb.multi/multi-term-settings.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <sys/types.h>
#include <termios.h>
-#include <unistd.h>
#include <signal.h>
int
diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.exp b/gdb/testsuite/gdb.multi/multi-term-settings.exp
index 59ff8ce..0aeba1f 100644
--- a/gdb/testsuite/gdb.multi/multi-term-settings.exp
+++ b/gdb/testsuite/gdb.multi/multi-term-settings.exp
@@ -94,7 +94,7 @@ proc create_inferior {which_inf inf_how} {
"attach"] == 0} {
# The program is now stopped, but if testing against
- # gdbserver, then the inferior's output emmitted before it
+ # gdbserver, then the inferior's output emitted before it
# stopped isn't flushed unless we explicitly do so,
# because it is on a different spawn_id. Do it now, to
# avoid confusing tests further below.
diff --git a/gdb/testsuite/gdb.opt/break-on-_exit.exp b/gdb/testsuite/gdb.opt/break-on-_exit.exp
index 59a1c61..59fecaa 100644
--- a/gdb/testsuite/gdb.opt/break-on-_exit.exp
+++ b/gdb/testsuite/gdb.opt/break-on-_exit.exp
@@ -18,7 +18,7 @@
# set past the syscall due to faulty prologue skipping, the breakpoint will not
# trigger.
#
-# In particular, we're trying to excercise the instruction analysis
+# In particular, we're trying to exercise the instruction analysis
# functionality of prologue skipping. If the non-minimal symbols are
# read for libc, then that functionality might not be used because f.i.
# line-info is used instead. Also, if the minimal symbols are not read
diff --git a/gdb/testsuite/gdb.pascal/floats.exp b/gdb/testsuite/gdb.pascal/floats.exp
index 3e836a3..d96fb9b 100644
--- a/gdb/testsuite/gdb.pascal/floats.exp
+++ b/gdb/testsuite/gdb.pascal/floats.exp
@@ -87,7 +87,7 @@ gdb_test "print r + (-1)" " = 0\\.2(499.*|5|500.*)"
gdb_test "print r + (-5)" " = -3\\.7(499.*|5|500.*)"
gdb_test "print r + (-10)" " = -8\\.7(499.*|5|500.*)"
-# Test substraction
+# Test subtraction
gdb_test "print r - s" " = -0\\.9(499.*|5|500.*)"
gdb_test "print r - t" " = 4\\.4(499.*|5|500.*)"
diff --git a/gdb/testsuite/gdb.pascal/integers.exp b/gdb/testsuite/gdb.pascal/integers.exp
index ec5f53c..974de6f 100644
--- a/gdb/testsuite/gdb.pascal/integers.exp
+++ b/gdb/testsuite/gdb.pascal/integers.exp
@@ -71,7 +71,7 @@ gdb_test "print i + k" " = 4"
gdb_test "print j + k" " = 5"
gdb_test "print i + j + k" " = 6"
-# Test substraction
+# Test subtraction
gdb_test "print j - i" " = 1"
gdb_test "print i - j" "= -1"
gdb_test "print k -i -j" " = 0"
diff --git a/gdb/testsuite/gdb.pascal/types.exp b/gdb/testsuite/gdb.pascal/types.exp
index 5b8d00b..262045e 100644
--- a/gdb/testsuite/gdb.pascal/types.exp
+++ b/gdb/testsuite/gdb.pascal/types.exp
@@ -59,7 +59,7 @@ proc test_float_literal_types_accepted {} {
# Test various floating point formats
# this used to guess whether to look for "real*4" or
- # "real*8" based on a target config variable, but noone
+ # "real*8" based on a target config variable, but no one
# maintained it properly.
gdb_test "pt .44" "type = double"
diff --git a/gdb/testsuite/gdb.python/py-arch.exp b/gdb/testsuite/gdb.python/py-arch.exp
index 3c58bf1..aef4186 100644
--- a/gdb/testsuite/gdb.python/py-arch.exp
+++ b/gdb/testsuite/gdb.python/py-arch.exp
@@ -28,7 +28,7 @@ if ![runto_main] {
# internal GDB assert.
gdb_py_test_silent_cmd "python empty = gdb.Architecture()" "get empty arch" 0
gdb_test "python print(repr (empty))" "<gdb\\.Architecture \\(invalid\\)>" \
- "Test empty achitecture __repr__ does not trigger an assert"
+ "Test empty architecture __repr__ does not trigger an assert"
gdb_test "python print(empty.name())" ".*Architecture is invalid.*" \
"Test empty architecture.name does not trigger an assert"
gdb_test "python print(empty.disassemble())" ".*Architecture is invalid.*" \
diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp
index 9209213..d0349c5 100644
--- a/gdb/testsuite/gdb.python/py-format-string.exp
+++ b/gdb/testsuite/gdb.python/py-format-string.exp
@@ -82,7 +82,7 @@ set default_pointer_regexp "0x\[a-fA-F0-9\]+"
# A regular expression for a non-expanded C++ reference.
#
-# Stringifying a C++ reference produces an address preceeded by a "@" in
+# Stringifying a C++ reference produces an address preceded by a "@" in
# Python, but, by default, the C++ reference/class is expanded by the
# GDB print command.
set default_ref_regexp "@${default_pointer_regexp}"
diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp
index ee30390..58475bd 100644
--- a/gdb/testsuite/gdb.python/py-inferior.exp
+++ b/gdb/testsuite/gdb.python/py-inferior.exp
@@ -27,12 +27,13 @@ if { [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable
}
# Start with a fresh gdb.
-save_vars { env(ASAN_OPTIONS) } {
+save_vars { env(ASAN_OPTIONS) env(TSAN_OPTIONS) } {
# The call to gdb.selected_inferior().read_memory (0, 0xffffffffffffffff)
# triggers address sanitizer. Suppress the error, leaving us with just
# this warning:
# WARNING: AddressSanitizer failed to allocate 0xffffffffffffffff bytes
set_sanitizer ASAN_OPTIONS allocator_may_return_null 1
+ set_sanitizer TSAN_OPTIONS allocator_may_return_null 1
clean_restart ${testfile}
}
diff --git a/gdb/testsuite/gdb.python/py-pp-cast.py b/gdb/testsuite/gdb.python/py-pp-cast.py
index 6eff800..c071920 100644
--- a/gdb/testsuite/gdb.python/py-pp-cast.py
+++ b/gdb/testsuite/gdb.python/py-pp-cast.py
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import gdb.printing
+
class PpIntPrinter(object):
def __init__(self, val):
diff --git a/gdb/testsuite/gdb.python/py-pp-maint.exp b/gdb/testsuite/gdb.python/py-pp-maint.exp
index f224ae7..1ee206c 100644
--- a/gdb/testsuite/gdb.python/py-pp-maint.exp
+++ b/gdb/testsuite/gdb.python/py-pp-maint.exp
@@ -55,7 +55,7 @@ gdb_test "print flt" " = x=<42> y=<43>" \
gdb_test "print ss" " = a=<a=<1> b=<$hex>> b=<a=<2> b=<$hex>>" \
"print ss enabled #1"
-set num_pp 7
+set num_pp 6
gdb_test "disable pretty-printer" \
"$num_pp printers disabled.*0 of $num_pp printers enabled"
@@ -75,7 +75,7 @@ gdb_test "disable pretty-printer global lookup_function_lookup_test" \
"1 printer disabled.*[expr $num_pp - 1] of $num_pp printers enabled"
gdb_test "disable pretty-printer global pp-test;.*" \
- "[expr $num_pp - 2] printers disabled.*1 of $num_pp printers enabled"
+ "[expr 5] printers disabled.*0 of $num_pp printers enabled"
gdb_test "info pretty-printer global .*function" \
{.*function_lookup_test \[disabled\].*} \
@@ -92,13 +92,13 @@ gdb_test "print ss" " = {a = {a = 1, b = $hex}, b = {a = 2, b = $hex}}" \
"print ss disabled"
gdb_test "enable pretty-printer global lookup_function_lookup_test" \
- "1 printer enabled.*2 of $num_pp printers enabled"
+ "1 printer enabled.*1 of $num_pp printers enabled"
# This doesn't enable any printers because each subprinter in the collection
# is still individually disabled. But this is still needed, to enable the
# collection itself.
gdb_test "enable pretty-printer global pp-test" \
- "0 printers enabled.*2 of $num_pp printers enabled"
+ "0 printers enabled.*1 of $num_pp printers enabled"
gdb_test "enable pretty-printer global pp-test;.*ss.*" \
"2 printers enabled.*[expr $num_pp - 3] of $num_pp printers enabled"
diff --git a/gdb/testsuite/gdb.python/py-pp-re-notag.py b/gdb/testsuite/gdb.python/py-pp-re-notag.py
index 6aefad1..00bc5c7 100644
--- a/gdb/testsuite/gdb.python/py-pp-re-notag.py
+++ b/gdb/testsuite/gdb.python/py-pp-re-notag.py
@@ -16,6 +16,7 @@
from time import asctime, gmtime
import gdb # silence pyflakes
+import gdb.printing
class TimePrinter:
diff --git a/gdb/testsuite/gdb.python/py-prettyprint-stub.py b/gdb/testsuite/gdb.python/py-prettyprint-stub.py
index 565ae19..2378f55 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint-stub.py
+++ b/gdb/testsuite/gdb.python/py-prettyprint-stub.py
@@ -16,6 +16,8 @@
# This file is part of the GDB testsuite.
# It tests Python-based pretty-printing of stubs.
+import gdb.printing
+
class SPrinter:
def __init__(self, val):
diff --git a/gdb/testsuite/gdb.python/py-read-memory-leak.c b/gdb/testsuite/gdb.python/py-read-memory-leak.c
new file mode 100644
index 0000000..75035cd
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-read-memory-leak.c
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2014-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 <http://www.gnu.org/licenses/>. */
+
+static struct x
+{
+ char unsigned u[4096];
+} x, *px = &x;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.python/py-read-memory-leak.exp b/gdb/testsuite/gdb.python/py-read-memory-leak.exp
new file mode 100644
index 0000000..52b072f
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-read-memory-leak.exp
@@ -0,0 +1,44 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite. It checks for memory leaks
+# associated with calling gdb.Inferior.read_memory().
+
+load_lib gdb-python.exp
+
+require allow_python_tests
+
+standard_testfile
+
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
+ return -1
+}
+
+if ![runto_main] {
+ return -1
+}
+
+# Skip this test if the tracemalloc module is not available.
+if { ![gdb_py_module_available "tracemalloc"] } {
+ unsupported "tracemalloc module not available"
+ return
+}
+
+set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
+
+# Source the Python script, this runs the test (which is written
+# completely in Python), and either prints PASS, or throws an
+# exception.
+gdb_test "source ${pyfile}" "PASS" "source python script"
diff --git a/gdb/testsuite/gdb.python/py-read-memory-leak.py b/gdb/testsuite/gdb.python/py-read-memory-leak.py
new file mode 100644
index 0000000..430c5c2
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-read-memory-leak.py
@@ -0,0 +1,93 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+import os
+import tracemalloc
+
+import gdb
+
+# A global variable in which we store a reference to the memory buffer
+# returned from gdb.Inferior.read_memory().
+mem_buf = None
+
+
+# A global filters list, we only care about memory allocations
+# originating from this script.
+filters = [tracemalloc.Filter(True, "*" + os.path.basename(__file__))]
+
+
+# Run the test. When CLEAR is True we clear the global INF variable
+# before comparing the before and after memory allocation traces.
+# When CLEAR is False we leave INF set to reference the gdb.Inferior
+# object, thus preventing the gdb.Inferior from being deallocated.
+def test(clear):
+ global filters, mem_buf
+
+ addr = gdb.parse_and_eval("px")
+ inf = gdb.inferiors()[0]
+
+ # Start tracing, and take a snapshot of the current allocations.
+ tracemalloc.start()
+ snapshot1 = tracemalloc.take_snapshot()
+
+ # Read from the inferior, this allocate a memory buffer object.
+ mem_buf = inf.read_memory(addr, 4096)
+
+ # Possibly clear the global INF variable.
+ if clear:
+ mem_buf = None
+
+ # Now grab a second snapshot of memory allocations, and stop
+ # tracing memory allocations.
+ snapshot2 = tracemalloc.take_snapshot()
+ tracemalloc.stop()
+
+ # Filter the snapshots; we only care about allocations originating
+ # from this file.
+ snapshot1 = snapshot1.filter_traces(filters)
+ snapshot2 = snapshot2.filter_traces(filters)
+
+ # Compare the snapshots, this leaves only things that were
+ # allocated, but not deallocated since the first snapshot.
+ stats = snapshot2.compare_to(snapshot1, "traceback")
+
+ # Total up all the allocated things.
+ total = 0
+ for stat in stats:
+ total += stat.size_diff
+ return total
+
+
+# The first time we run this some global state will be allocated which
+# shows up as memory that is allocated, but not released. So, run the
+# test once and discard the result.
+test(True)
+
+# Now run the test twice, the first time we clear our global reference
+# to the memory buffer object, which should allow Python to deallocate
+# the object. The second time we hold onto the global reference,
+# preventing Python from performing the deallocation.
+bytes_with_clear = test(True)
+bytes_without_clear = test(False)
+
+# The bug that used to exist in GDB was that even when we released the
+# global reference the gdb.Inferior object would not be deallocated.
+if bytes_with_clear > 0:
+ raise gdb.GdbError("memory leak when memory buffer should be released")
+if bytes_without_clear == 0:
+ raise gdb.GdbError("memory buffer object is no longer allocated")
+
+# Print a PASS message that the test script can see.
+print("PASS")
diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp
index 175a6de..e8eb9ec 100644
--- a/gdb/testsuite/gdb.python/python.exp
+++ b/gdb/testsuite/gdb.python/python.exp
@@ -561,3 +561,12 @@ if { [use_gdb_stub] == 0 } {
}
}
}
+
+# Regression test for PR python/32163: several types were not
+# previously registered with the module, so could not be inspected
+# directly.
+foreach type {Instruction LazyString Membuf Record RecordFunctionSegment \
+ RecordGap RecordInstruction TuiWindow} {
+ gdb_test "python print(type(gdb.$type))" "<class 'type'>" \
+ "gdb.$type is registered"
+}
diff --git a/gdb/testsuite/gdb.python/sys-exit.exp b/gdb/testsuite/gdb.python/sys-exit.exp
new file mode 100644
index 0000000..3396b8d
--- /dev/null
+++ b/gdb/testsuite/gdb.python/sys-exit.exp
@@ -0,0 +1,69 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+# Check that python sys.exit makes gdb exit, with the correct exit status.
+
+require allow_python_tests
+
+# Have this code in a proc avoids clashing with runtest variable exit_status.
+
+proc do_test { n {expected_exit_status ""} {msg ""}} {
+ if { $expected_exit_status == "" } {
+ set expected_exit_status $n
+ }
+
+ with_test_prefix $n {
+ clean_restart
+
+ # Regression test for PR python/31946.
+ set seen_message 0
+ gdb_test_multiple "python sys.exit ($n)" "python sys.exit" {
+ -re "\r\n$msg\r\n" {
+ set seen_message 1
+ exp_continue
+ }
+ eof {
+ set wait_status [wait -i $::gdb_spawn_id]
+ clear_gdb_spawn_id
+
+ verbose -log "GDB process exited with wait status $wait_status"
+
+ set os_error [lindex $wait_status 2]
+ set exit_status [lindex $wait_status 3]
+
+ gdb_assert \
+ { $os_error == 0 \
+ && $exit_status == $expected_exit_status } \
+ $gdb_test_name
+
+ if { $msg != "" } {
+ gdb_assert { $seen_message }
+ }
+ }
+ }
+ }
+}
+
+# Test sys.exit (<int>).
+do_test 0
+do_test 1
+do_test 2
+
+# Test sys.exit (None).
+do_test None 0
+
+# Test sys.exit (<string>).
+do_test {"Error Message"} 1 "Error Message"
+do_test {""} 1
diff --git a/gdb/testsuite/gdb.reverse/func-map-to-same-line.exp b/gdb/testsuite/gdb.reverse/func-map-to-same-line.exp
index 9949907..8f933eb 100644
--- a/gdb/testsuite/gdb.reverse/func-map-to-same-line.exp
+++ b/gdb/testsuite/gdb.reverse/func-map-to-same-line.exp
@@ -37,7 +37,7 @@ proc run_tests {} {
gdb_test_no_output "record" "turn on process record"
# This regression test verifies the reverse-step and reverse-next
- # commands work properly when executing backwards thru a source line
+ # commands work properly when executing backwards through a source line
# containing two function calls on the same source line, i.e.
# func1 (); func2 ();. This test is compiled so the dwarf info
# does not contain the line table information.
@@ -100,7 +100,7 @@ proc run_tests {} {
# the called function, stopping at the beginning of the last
# statement in the called function (typically a return statement).
# Also, as with the step command, if non-debuggable functions are
- # called, reverse-step will run thru them backward without
+ # called, reverse-step will run through them backward without
# stopping.
gdb_continue_to_breakpoint \
diff --git a/gdb/testsuite/gdb.reverse/step-precsave.exp b/gdb/testsuite/gdb.reverse/step-precsave.exp
index 9ae67b3..a3979b7 100644
--- a/gdb/testsuite/gdb.reverse/step-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/step-precsave.exp
@@ -153,7 +153,7 @@ gdb_test_multiple "stepi" "$test_message" {
}
}
-# stepi thru return of a function call
+# stepi through return of a function call
set test_message "stepi back from function call"
gdb_test_multiple "stepi" "$test_message" {
@@ -185,10 +185,10 @@ gdb_test_multiple "stepi" "$test_message" {
gdb_test_no_output "set exec-dir reverse" "set reverse execution"
-# stepi backward thru return and into a function
+# stepi backward through return and into a function
set stepi_location [gdb_get_line_number "ARRIVED IN CALLEE" "$srcfile"]
-set test_message "reverse stepi thru function return"
+set test_message "reverse stepi through function return"
gdb_test_multiple "stepi" "$test_message" {
-re "NEXTI TEST.*$gdb_prompt $" {
fail "$test_message (start statement)"
diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp
index 2db73e9..a3c3b5a 100644
--- a/gdb/testsuite/gdb.reverse/step-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/step-reverse.exp
@@ -114,7 +114,7 @@ gdb_test_multiple "stepi" "$test_message" {
}
}
-# stepi thru return of a function call
+# stepi through return of a function call
set test_message "stepi back from function call"
gdb_test_multiple "stepi" "$test_message" {
@@ -145,10 +145,10 @@ gdb_test_multiple "stepi" "$test_message" {
# Set reverse execution direction
gdb_test_no_output "set exec-dir reverse" "set reverse execution"
-# stepi backward thru return and into a function
+# stepi backward through return and into a function
set stepi_location [gdb_get_line_number "ARRIVED IN CALLEE" "$srcfile"]
-set test_message "reverse stepi thru function return"
+set test_message "reverse stepi through function return"
gdb_test_multiple "stepi" "$test_message" {
-re "NEXTI TEST.*$gdb_prompt $" {
fail "$test_message (start statement)"
diff --git a/gdb/testsuite/gdb.server/exit-multiple-threads.c b/gdb/testsuite/gdb.server/exit-multiple-threads.c
index 989f1f2..5bf0fc8 100644
--- a/gdb/testsuite/gdb.server/exit-multiple-threads.c
+++ b/gdb/testsuite/gdb.server/exit-multiple-threads.c
@@ -20,7 +20,6 @@
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
-#include <pthread.h>
/* The number of threads to create. */
int thread_count = 3;
diff --git a/gdb/testsuite/gdb.server/server-run.exp b/gdb/testsuite/gdb.server/server-run.exp
index 92eb38b..af5a5f5 100644
--- a/gdb/testsuite/gdb.server/server-run.exp
+++ b/gdb/testsuite/gdb.server/server-run.exp
@@ -52,3 +52,36 @@ if { [istarget *-*-linux*] } {
gdb_breakpoint main
gdb_test "continue" "Breakpoint.* main .*" "continue to main"
+
+if { [istarget "aarch64*-*-*"]
+ || [istarget "arm*-*-*"]
+ || [istarget "csky*-*-*"]
+ || [istarget "loongarch*-*-*"]
+ || [istarget "riscv*-*-*"] } {
+ set pc_regname "pc"
+} elseif { [is_amd64_regs_target] } {
+ set pc_regname "rip"
+} elseif { [is_x86_like_target] } {
+ set pc_regname "eip"
+} elseif { [istarget "tic6x-*-*"] } {
+ set pc_regname "PC"
+}
+
+# Sending the PC register in advance is good practice. Test that this is
+# actually done for the targets where gdbserver is supposed to.
+set expedited_pc_test_name "send PC as expedited register in stop reply"
+if { [info exists pc_regname] } {
+ set seen_line false
+ gdb_test_multiple "maintenance print remote-registers" \
+ $expedited_pc_test_name -lbl {
+ -re " ${pc_regname}\[\[:space:\]\]+${decimal}.*${decimal} yes" {
+ set seen_line true
+ exp_continue
+ }
+ -re "\r\n$gdb_prompt $" {
+ gdb_assert { $seen_line } $gdb_test_name
+ }
+ }
+} else {
+ untested $expedited_pc_test_name
+}
diff --git a/gdb/testsuite/gdb.testsuite/parse_options_args.exp b/gdb/testsuite/gdb.testsuite/parse_options_args.exp
index 19ad67a..7239ef7 100644
--- a/gdb/testsuite/gdb.testsuite/parse_options_args.exp
+++ b/gdb/testsuite/gdb.testsuite/parse_options_args.exp
@@ -38,7 +38,7 @@ with_test_prefix parse_options {
with_test_prefix parse_args {
proc test2 { args } {
- parse_args {
+ parse_some_args {
{ opt1 defval1 }
{ opt2 defval2 }
{ opt3 }
diff --git a/gdb/testsuite/gdb.threads/create-fail.c b/gdb/testsuite/gdb.threads/create-fail.c
index 01633e4..e4cd27e 100644
--- a/gdb/testsuite/gdb.threads/create-fail.c
+++ b/gdb/testsuite/gdb.threads/create-fail.c
@@ -23,10 +23,8 @@
#include <errno.h>
#include <string.h>
#include <assert.h>
-#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
-#include <assert.h>
#include <unistd.h>
/* Count the number of tasks/threads in the PID thread group. */
diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.c b/gdb/testsuite/gdb.threads/fork-thread-pending.c
index 01dcc40..a9b557a 100644
--- a/gdb/testsuite/gdb.threads/fork-thread-pending.c
+++ b/gdb/testsuite/gdb.threads/fork-thread-pending.c
@@ -21,7 +21,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
index bb05754..89c1d06 100644
--- a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
+++ b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
@@ -67,7 +67,7 @@ proc return_if_nonzero { result } {
}
}
-# Do one iteration of "c -a& -> interrupt -a". Return zero on sucess,
+# Do one iteration of "c -a& -> interrupt -a". Return zero on success,
# and non-zero if some test fails.
proc test_one_iteration {} {
diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c
index 6d82bd6..548d0d3 100644
--- a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c
+++ b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.c
@@ -21,6 +21,8 @@
#include <pthread.h>
#include <signal.h>
+static pthread_barrier_t barrier;
+
void
handler (int sig)
{
@@ -35,6 +37,13 @@ thread_function (void *arg)
usleep (1);
}
+void *
+thread_function_sync (void *arg)
+{
+ pthread_barrier_wait (&barrier);
+ return thread_function (arg);
+}
+
int
main (void)
{
@@ -42,7 +51,15 @@ main (void)
int i;
signal (SIGUSR1, handler);
- pthread_create (&child_thread, NULL, thread_function, NULL);
+
+ pthread_barrier_init (&barrier, NULL, 2);
+
+ pthread_create (&child_thread, NULL, thread_function_sync, NULL);
+
+ /* Make sure that pthread_create is done once the breakpoint on
+ thread_function triggers. */
+ pthread_barrier_wait (&barrier);
+
pthread_join (child_thread, NULL);
return 0;
diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.c b/gdb/testsuite/gdb.threads/signal-sigtrap.c
index 24625ba..7c903a1 100644
--- a/gdb/testsuite/gdb.threads/signal-sigtrap.c
+++ b/gdb/testsuite/gdb.threads/signal-sigtrap.c
@@ -20,6 +20,8 @@
#include <pthread.h>
#include <signal.h>
+static pthread_barrier_t barrier;
+
void
sigtrap_handler (int sig)
{
@@ -31,6 +33,13 @@ thread_function (void *arg)
return NULL;
}
+void *
+thread_function_sync (void *arg)
+{
+ pthread_barrier_wait (&barrier);
+ return thread_function (arg);
+}
+
int
main (void)
{
@@ -38,7 +47,13 @@ main (void)
signal (SIGTRAP, sigtrap_handler);
- pthread_create (&child_thread, NULL, thread_function, NULL);
+ pthread_barrier_init (&barrier, NULL, 2);
+
+ pthread_create (&child_thread, NULL, thread_function_sync, NULL);
+
+ /* Make sure that pthread_create is done once the breakpoint on
+ thread_function triggers. */
+ pthread_barrier_wait (&barrier);
pthread_join (child_thread, NULL);
diff --git a/gdb/testsuite/gdb.threads/thread-bp-deleted.exp b/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
index 5d15a29..3851f8f 100644
--- a/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
+++ b/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
@@ -124,7 +124,7 @@ if {$is_remote} {
#
# However, we might be too quick sending the 'info threads 99' command,
# so, if we see the output of that command without any thread exited
- # text, we wait for a short while and try again. We wait for upto 5
+ # text, we wait for a short while and try again. We wait for up to 5
# seconds (5 tries). However, this might mean on a _really_ slow
# machine that the thread still hasn't exited. I guess if we start
# seeing that then we can just update ATTEMPT_COUNT below.
diff --git a/gdb/testsuite/gdb.threads/thread_check.exp b/gdb/testsuite/gdb.threads/thread_check.exp
index 83fa86d..658f15e 100644
--- a/gdb/testsuite/gdb.threads/thread_check.exp
+++ b/gdb/testsuite/gdb.threads/thread_check.exp
@@ -47,7 +47,7 @@ if {![runto_main]} {
#
-# set breakpoint at thread fucntion tf
+# set breakpoint at thread function tf
#
gdb_test "break tf" \
"Breakpoint.*at.* file .*$srcfile, line.*" \
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
index 14a0c45..4a322e0 100644
--- a/gdb/testsuite/gdb.threads/tls-sepdebug.exp
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
@@ -65,16 +65,21 @@ if { [gdb_compile_pthreads \
}
set absdir [file dirname [standard_output_file ${binsharedbase}]]
+if { [info exists ::env(LD_LIBRARY_PATH)] } {
+ set ld_library_path $::env(LD_LIBRARY_PATH)
+} else {
+ set ld_library_path ""
+}
-foreach ld_library_path [list $absdir [relative_filename [pwd] $absdir]] \
+foreach library_path [list $absdir [relative_filename [pwd] $absdir]] \
name { absolute relative } {
with_test_prefix $name {
# Restart, but defer loading until after setting LD_LIBRARY_PATH.
clean_restart
-
- gdb_test_no_output "set env LD_LIBRARY_PATH=$ld_library_path" \
- "set env LD_LIBRARY_PATH"
+ gdb_test_no_output \
+ "set env LD_LIBRARY_PATH=$ld_library_path:$library_path" \
+ "set env LD_LIBRARY_PATH"
gdb_load ${binmainfile}
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c b/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
index b74a841..eb65d45 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
@@ -27,7 +27,6 @@
#include <pthread.h>
#include <asm/unistd.h>
-#include <unistd.h>
#define gettid() syscall (__NR_gettid)
/* Non-atomic `var++' should not hurt as we synchronize the threads by the STEP
diff --git a/gdb/testsuite/gdb.trace/basic-libipa.exp b/gdb/testsuite/gdb.trace/basic-libipa.exp
index e28f61e..c49192a 100644
--- a/gdb/testsuite/gdb.trace/basic-libipa.exp
+++ b/gdb/testsuite/gdb.trace/basic-libipa.exp
@@ -25,13 +25,9 @@ require allow_shlib_tests
standard_testfile
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
-if { ![file exists $libipa] } {
- unsupported "missing libinproctrace.so"
- return -1
-}
-
gdb_download_shlib $libipa
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp
index fb55153..1316d92 100644
--- a/gdb/testsuite/gdb.trace/change-loc.exp
+++ b/gdb/testsuite/gdb.trace/change-loc.exp
@@ -346,6 +346,7 @@ tracepoint_change_loc_2 "trace"
tracepoint_install_in_trace_disabled "trace"
# Re-compile test case with IPA.
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
gdb_load_shlib $libipa
diff --git a/gdb/testsuite/gdb.trace/collection.exp b/gdb/testsuite/gdb.trace/collection.exp
index b7d0f9f..9c6d3f5 100644
--- a/gdb/testsuite/gdb.trace/collection.exp
+++ b/gdb/testsuite/gdb.trace/collection.exp
@@ -161,7 +161,7 @@ proc gdb_collect_args_test { myargs msg } {
# collected. In C, an array as function parameters is a special
# case; it's just a pointer into the caller's array, and as such,
# that's what normally the debug info describes. Maybe this was
- # originaly written for a compiler where array parameters were
+ # originally written for a compiler where array parameters were
# really described as arrays in debug info.
setup_xfail "*-*-*"
@@ -250,7 +250,7 @@ proc gdb_collect_argarray_test { myargs msg } {
# are collected. In C, an array as function parameters is a
# special case; it's just a pointer into the caller's array,
# and as such, that's what normally the debug info describes.
- # Maybe this was originaly written for a compiler where array
+ # Maybe this was originally written for a compiler where array
# parameters were really described as arrays in debug info.
setup_xfail "*-*-*"
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index 3b358cc..82ae5a8 100644
--- a/gdb/testsuite/gdb.trace/entry-values.exp
+++ b/gdb/testsuite/gdb.trace/entry-values.exp
@@ -53,6 +53,8 @@ if { [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] } {
# returns. The only exception is JALRC, in which case execution
# resumes from `insn1' instead.
set call_insn {jalrc|[jb]al[sxr]*[ \t][^\r\n]+\r\n}
+} elseif { [istarget "riscv64*-*-*"] } {
+ set call_insn jal
} else {
set call_insn "call"
}
diff --git a/gdb/testsuite/gdb.trace/ftrace-lock.exp b/gdb/testsuite/gdb.trace/ftrace-lock.exp
index ce2b890..637d5eb 100644
--- a/gdb/testsuite/gdb.trace/ftrace-lock.exp
+++ b/gdb/testsuite/gdb.trace/ftrace-lock.exp
@@ -48,6 +48,7 @@ with_test_prefix "runtime trace support check" {
}
# Compile the test case with the in-process agent library.
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
index 9b100ce..408cd37 100644
--- a/gdb/testsuite/gdb.trace/ftrace.exp
+++ b/gdb/testsuite/gdb.trace/ftrace.exp
@@ -39,6 +39,7 @@ if ![gdb_target_supports_trace] {
return -1
}
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
index e6672db..dee7142 100644
--- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
+++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
@@ -148,7 +148,7 @@ proc test_reconnect { } {
}
}
-# Test 'breakpoint-modified' notification is emited when pending tracepoints are
+# Test 'breakpoint-modified' notification is emitted when pending tracepoints are
# resolved.
proc test_pending_resolved { } {
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index b836be0..66209ad 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -494,6 +494,7 @@ pending_tracepoint_with_action_resolved "trace"
pending_tracepoint_installed_during_trace "trace"
# Re-compile test case with IPA.
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
gdb_load_shlib $libipa
diff --git a/gdb/testsuite/gdb.trace/range-stepping.exp b/gdb/testsuite/gdb.trace/range-stepping.exp
index e3af2e5..373a0bf 100644
--- a/gdb/testsuite/gdb.trace/range-stepping.exp
+++ b/gdb/testsuite/gdb.trace/range-stepping.exp
@@ -67,6 +67,7 @@ range_stepping_with_tracepoint "trace"
require allow_shlib_tests
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp
index 99b199e..ef243a4 100644
--- a/gdb/testsuite/gdb.trace/strace.exp
+++ b/gdb/testsuite/gdb.trace/strace.exp
@@ -19,6 +19,7 @@ require allow_shlib_tests
standard_testfile
set executable $testfile
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
set lib_opts debug
diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp
index 7e5820c..cac4aa5 100644
--- a/gdb/testsuite/gdb.trace/trace-break.exp
+++ b/gdb/testsuite/gdb.trace/trace-break.exp
@@ -344,6 +344,7 @@ break_trace_same_addr_6 "trace" "disable" "trace" "enable"
require allow_shlib_tests
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp
index 42453bc..17acda8 100644
--- a/gdb/testsuite/gdb.trace/trace-condition.exp
+++ b/gdb/testsuite/gdb.trace/trace-condition.exp
@@ -39,6 +39,7 @@ if ![gdb_target_supports_trace] {
return -1
}
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/trace-enable-disable.exp b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
index 280f2e4..c2c8381 100644
--- a/gdb/testsuite/gdb.trace/trace-enable-disable.exp
+++ b/gdb/testsuite/gdb.trace/trace-enable-disable.exp
@@ -42,6 +42,7 @@ if ![gdb_target_supports_trace] {
}
# Compile the test case with the in-process agent library.
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
gdb_load_shlib $libipa
diff --git a/gdb/testsuite/gdb.trace/trace-mt.exp b/gdb/testsuite/gdb.trace/trace-mt.exp
index e56064b..7246ddc 100644
--- a/gdb/testsuite/gdb.trace/trace-mt.exp
+++ b/gdb/testsuite/gdb.trace/trace-mt.exp
@@ -103,6 +103,7 @@ step_over_tracepoint $binfile "trace"
require allow_shlib_tests
+require allow_in_proc_agent
set libipa [get_in_proc_agent]
set remote_libipa [gdb_load_shlib $libipa]
diff --git a/gdb/testsuite/gdb.trace/tspeed.exp b/gdb/testsuite/gdb.trace/tspeed.exp
index 7ade5c2..c74680b 100644
--- a/gdb/testsuite/gdb.trace/tspeed.exp
+++ b/gdb/testsuite/gdb.trace/tspeed.exp
@@ -43,6 +43,7 @@ if ![gdb_target_supports_trace] {
}
# Compile the test case with the in-process agent library.
+require allow_in_proc_agent
set ipalib [get_in_proc_agent]
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
diff --git a/gdb/testsuite/gdb.tui/info-win.exp b/gdb/testsuite/gdb.tui/info-win.exp
index 36c7815..4d71f04 100644
--- a/gdb/testsuite/gdb.tui/info-win.exp
+++ b/gdb/testsuite/gdb.tui/info-win.exp
@@ -40,7 +40,7 @@ Term::command "layout h"
Term::command "winheight cmd + 3"
# As the tuiterm.exp library just waits for the prompt and command to
-# be echo'ed bcak to the screen, multiple 'info win' calls like this
+# be echo'ed back to the screen, multiple 'info win' calls like this
# have a problem. Dejagnu will send the command to gdb, but will then
# immediately see the '(gdb) info win' output from the first use
# above. This means we end up rushing ahead, and some tests might
diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
index 7c8b0b8..344e387 100644
--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp
@@ -80,21 +80,38 @@ switch -glob -- [istarget] {
set regdir "i386/"
set core-regs {64bit-core.xml 64bit-sse.xml}
}
+ "riscv64*-*-*" {
+ set architecture "riscv:rv64"
+ set regdir "riscv/"
+ set core-regs 64bit-cpu.xml
+ }
}
-# If no core registers were specified, assume this target does not
-# support target-defined registers. Verify that we get a warning if
-# we try to use them. This not only tests the warning, but also
-# reminds maintainers to add test support when they add the feature.
-
set single_reg_xml [gdb_remote_download host \
"$srcdir/$subdir/single-reg.xml"]
if {[string equal ${core-regs} ""]} {
- gdb_test "set tdesc file $single_reg_xml" \
- "warning: Target-supplied registers are not supported.*" \
- "set tdesc file single-reg.xml"
- unsupported "register tests"
+ set test "set tdesc file single-reg.xml"
+ set feature_unsupported 0
+ set feature_test_unsupported 0
+ gdb_test_multiple "set tdesc file $single_reg_xml" $test {
+ -re -wrap "warning: Target-supplied registers are not supported" {
+ set feature_unsupported 1
+ pass $gdb_test_name
+ }
+ -re -wrap "warning: Architecture rejected target-supplied description" {
+ set feature_test_unsupported 1
+ pass $gdb_test_name
+ }
+ }
+
+ if { $feature_unsupported } {
+ unsupported "register tests"
+ } elseif { $feature_test_unsupported } {
+ # Remind maintainers to add test support.
+ unsupported "register tests (missing architecture-specific core-regs setting)"
+ }
+
return 0
}
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 995cdca..f9be6c4 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -2771,7 +2771,7 @@ namespace eval Dwarf {
# section_version n
# - section version number to emit
# default = 2
- # seg_size n - the size of the adress selector in bytes: 0, 4, or 8
+ # seg_size n - the size of the address selector in bytes: 0, 4, or 8
# default = 0
#
# LABEL is the label of the corresponding CU.
diff --git a/gdb/testsuite/lib/gdb-utils.exp b/gdb/testsuite/lib/gdb-utils.exp
index 41989da..a1fdf73 100644
--- a/gdb/testsuite/lib/gdb-utils.exp
+++ b/gdb/testsuite/lib/gdb-utils.exp
@@ -64,7 +64,7 @@ proc string_list_to_regexp { args } {
# STYLE can either be the payload part of an ANSI terminal sequence,
# or a shorthand for one of the gdb standard styles: "file",
-# "function", "variable", or "address".
+# "function", "variable", "address", etc.
proc style {str style} {
switch -exact -- $style {
@@ -76,6 +76,7 @@ proc style {str style} {
address { set style 34 }
metadata { set style 2 }
version { set style "35;1" }
+ line-number { set style 2 }
none { return $str }
}
return "\033\\\[${style}m${str}\033\\\[m"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 6c4ffc1..f0a8939 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -791,7 +791,7 @@ proc runto { linespec args } {
# the "at foo.c:36" output we get with -g.
# the "in func" output we get without -g.
gdb_expect {
- -re "(?:Break|Temporary break).* at .*:$decimal.*$gdb_prompt $" {
+ -re "(?:Break|Temporary break).* at .*:.*$decimal.*$gdb_prompt $" {
if { $print_pass } {
pass $test_name
}
@@ -1559,7 +1559,7 @@ proc gdb_test { args } {
global gdb_prompt
upvar timeout timeout
- parse_args {
+ parse_some_args {
{prompt ""}
{no-prompt-anchor}
{lbl}
@@ -1567,7 +1567,8 @@ proc gdb_test { args } {
{nonl}
}
- lassign $args command pattern message question response
+ set args [lassign $args command pattern message question response]
+ check_no_args_left
# Can't have a question without a response.
if { $question != "" && $response == "" || [llength $args] > 5 } {
@@ -1741,13 +1742,14 @@ if { [tcl_version_at_least 8 6 2] == 0 } {
proc gdb_test_no_output { args } {
global gdb_prompt
- parse_args {
+ parse_some_args {
{prompt ""}
{no-prompt-anchor}
{nopass}
}
- lassign $args command message
+ set args [lassign $args command message]
+ check_no_args_left
set prompt [fill_in_default_prompt $prompt [expr !${no-prompt-anchor}]]
@@ -1789,7 +1791,7 @@ proc gdb_test_no_output { args } {
proc gdb_test_sequence { args } {
global gdb_prompt
- parse_args {{prompt ""}}
+ parse_some_args {{prompt ""}}
if { $prompt == "" } {
set prompt "$gdb_prompt $"
@@ -1815,6 +1817,55 @@ proc gdb_test_sequence { args } {
}
+# Issue COMMAND, and return corresponding output lines. Helper function for
+# gdb_get_lines_no_pass and gdb_get_lines.
+
+proc gdb_get_lines_1 { command message } {
+ set no_pass [string equal $message ""]
+ set lines ""
+ set ok 0
+ gdb_test_multiple $command $message {
+ -re "\r\n(\[^\r\n\]*)(?=\r\n)" {
+ set line $expect_out(1,string)
+ if { $lines eq "" } {
+ append lines "$line"
+ } else {
+ append lines "\r\n$line"
+ }
+ exp_continue
+ }
+ -re -wrap "" {
+ append lines "\r\n"
+ set ok 1
+ if { ! $no_pass } {
+ pass $gdb_test_name
+ }
+ }
+ }
+
+ if { ! $ok } {
+ return ""
+ }
+
+ return $lines
+}
+
+# Issue COMMAND, and return corresponding output lines. Don't generate a pass.
+
+proc gdb_get_lines_no_pass { command } {
+ gdb_get_lines_1 $command ""
+}
+
+# Issue COMMAND, and return corresponding output lines. Generate a pass.
+
+proc gdb_get_lines { command {message ""} } {
+ if { $message == "" } {
+ set message [command_to_message $command]
+ }
+
+ gdb_get_lines_1 $command $message
+}
+
# Match output of COMMAND using RE. Read output line-by-line.
# Report pass/fail with MESSAGE.
# For a command foo with output:
@@ -1854,22 +1905,7 @@ proc gdb_test_lines { command message re args } {
set message [command_to_message $command]
}
- set lines ""
- gdb_test_multiple $command $message {
- -re "\r\n(\[^\r\n\]*)(?=\r\n)" {
- set line $expect_out(1,string)
- if { $lines eq "" } {
- append lines "$line"
- } else {
- append lines "\r\n$line"
- }
- exp_continue
- }
- -re -wrap "" {
- append lines "\r\n"
- }
- }
-
+ set lines [gdb_get_lines_no_pass $command]
gdb_assert { [regexp $re $lines] } $message
foreach re $re_not {
@@ -4436,6 +4472,62 @@ gdb_caching_proc allow_btrace_ptw_tests {} {
}
+# Run a test on the target to see if GDB supports event tracing on it.
+# Return 1 if so, 0 if it does not.
+
+gdb_caching_proc allow_btrace_pt_event_trace_tests {} {
+ global srcdir subdir
+ set me "allow_btrace_pt_event_trace_tests"
+ require allow_btrace_pt_tests
+
+ set src {
+ int
+ main ()
+ {
+ return 0;
+ }
+ }
+
+ if {![gdb_simple_compile $me $src executable]} {
+ return 0
+ }
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load "$obj"
+ if ![runto_main] {
+ return 0
+ }
+
+ set allow_event_trace_tests 0
+ gdb_test_multiple "set record btrace pt event-tracing on" "$me: first check" {
+ -re -wrap "Event-tracing is not supported by GDB." {
+ }
+ -re -wrap "" {
+ set allow_event_trace_tests 1
+ }
+ }
+
+ if { $allow_event_trace_tests == 1 } {
+ gdb_test_multiple "record btrace pt" "$me: check OS support" {
+ -re -wrap "^" {
+ }
+ -re -wrap "" {
+ verbose -log "$me: Target doesn't support event tracing."
+ set allow_event_trace_tests 0
+ }
+ }
+ }
+
+ gdb_exit
+ remote_file build delete $obj
+
+ verbose "$me: returning $allow_event_trace_tests" 2
+ return $allow_event_trace_tests
+}
+
+
# Run a test on the target to see if it supports Aarch64 SVE hardware.
# Return 1 if so, 0 if it does not. Note this causes a restart of GDB.
@@ -9290,7 +9382,7 @@ proc using_fission { } {
#
# Example:
# proc myproc {foo args} {
-# parse_list args 1 {{bar} {baz "abc"} {qux}} "-" false
+# parse_list 1 args {{bar} {baz "abc"} {qux}} "-" false
# # ...
# }
# myproc ABC -bar -baz DEF peanut butter
@@ -9351,13 +9443,32 @@ proc parse_list { level listname argset prefix eval } {
# Search the caller's args variable and set variables according to the list of
# valid options described by ARGSET.
-proc parse_args { argset } {
+proc parse_some_args { argset } {
parse_list 2 args $argset "-" false
# The remaining args should be checked to see that they match the
# number of items expected to be passed into the procedure...
}
+# Check that the caller's args variable is empty.
+
+proc check_no_args_left {} {
+ # Require no remaining args.
+ upvar 1 args args
+ if { [llength $args] != 0 } {
+ error "Args left unparsed: $args"
+ }
+}
+
+# As parse_some_args, but check that no args remain after parsing.
+
+proc parse_args { argset } {
+ uplevel parse_some_args [list $argset]
+
+ # Require no remaining args.
+ uplevel check_no_args_left
+}
+
# Process the caller's options variable and set variables according
# to the list of valid options described by OPTIONSET.
@@ -9738,18 +9849,6 @@ gdb_caching_proc supports_statement_frontiers {} {
} executable "additional_flags=-gstatement-frontiers"]
}
-# Return 1 if compiler supports -mmpx -fcheck-pointer-bounds. Otherwise,
-# return 0.
-
-gdb_caching_proc supports_mpx_check_pointer_bounds {} {
- set flags "additional_flags=-mmpx additional_flags=-fcheck-pointer-bounds"
- return [gdb_can_simple_compile supports_mpx_check_pointer_bounds {
- int main () {
- return 0;
- }
- } executable $flags]
-}
-
# Return 1 if compiler supports -fcf-protection=. Otherwise,
# return 0.
@@ -10178,83 +10277,6 @@ gdb_caching_proc supports_gnuc {} {
return [gdb_simple_compile $me $src object ""]
}
-# Return 1 if target supports mpx, otherwise return 0.
-gdb_caching_proc have_mpx {} {
- global srcdir
-
- set me "have_mpx"
- if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
- verbose "$me: target does not support mpx, returning 0" 2
- return 0
- }
-
- # Compile a test program.
- set src {
- #include "nat/x86-cpuid.h"
-
- int main() {
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- if ((ecx & bit_OSXSAVE) == bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, (void *)0) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_MPX) == bit_MPX)
- return 1;
-
- }
- return 0;
- }
- }
- set compile_flags "incdir=${srcdir}/.."
- if {![gdb_simple_compile $me $src executable $compile_flags]} {
- return 0
- }
-
- set target_obj [gdb_remote_download target $obj]
- set result [remote_exec target $target_obj]
- set status [lindex $result 0]
- set output [lindex $result 1]
- if { $output != "" } {
- set status 0
- }
-
- remote_file build delete $obj
-
- if { $status == 0 } {
- verbose "$me: returning $status" 2
- return $status
- }
-
- # Compile program with -mmpx -fcheck-pointer-bounds, try to trigger
- # 'No MPX support', in other words, see if kernel supports mpx.
- set src { int main (void) { return 0; } }
- set comp_flags {}
- append comp_flags " additional_flags=-mmpx"
- append comp_flags " additional_flags=-fcheck-pointer-bounds"
- if {![gdb_simple_compile $me-2 $src executable $comp_flags]} {
- return 0
- }
-
- set target_obj [gdb_remote_download target $obj]
- set result [remote_exec target $target_obj]
- set status [lindex $result 0]
- set output [lindex $result 1]
- set status [expr ($status == 0) \
- && ![regexp "^No MPX support\r?\n" $output]]
-
- remote_file build delete $obj
-
- verbose "$me: returning $status" 2
- return $status
-}
-
# Return 1 if target supports avx, otherwise return 0.
gdb_caching_proc have_avx {} {
global srcdir
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index a79b133..3832137 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -2680,7 +2680,7 @@ proc mi_make_info_frame_regexp {args} {
# build the regexp for matching against the -stack-info-frame output.
proc mi_info_frame { test args } {
- parse_args {{frame ""} {thread ""}}
+ parse_some_args {{frame ""} {thread ""}}
set re [eval mi_make_info_frame_regexp $args]
diff --git a/gdb/testsuite/lib/prelink-support.exp b/gdb/testsuite/lib/prelink-support.exp
index 8be5067..894af39 100644
--- a/gdb/testsuite/lib/prelink-support.exp
+++ b/gdb/testsuite/lib/prelink-support.exp
@@ -57,7 +57,7 @@ proc symlink_resolve {file} {
} else {
set src2 $target
}
- verbose -log "Resolved symlink $file targetting $target as $src2"
+ verbose -log "Resolved symlink $file targeting $target as $src2"
set file $src2
set loop [expr $loop + 1]
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index 00d7e30..0d76e2f 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -100,7 +100,7 @@ proc selftest_setup { executable function } {
# 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
+ # won't have access to the GDB's auxiliary data files
# (data-directory, etc.). It's simpler to just skip.
if { [is_remote target] || [is_remote host] } {
return
diff --git a/gdb/testsuite/lib/trace-support.exp b/gdb/testsuite/lib/trace-support.exp
index c9c9697..770a930 100644
--- a/gdb/testsuite/lib/trace-support.exp
+++ b/gdb/testsuite/lib/trace-support.exp
@@ -366,6 +366,20 @@ proc gdb_find_recursion_test_baseline { filename } {
return $baseline
}
+# Return 1 if the IPA library is available and 0 otherwise.
+
+proc allow_in_proc_agent {} {
+ global objdir
+
+ if [target_info exists in_proc_agent] {
+ return 1
+ } elseif [file exists "$objdir/../../gdbserver/libinproctrace.so"] {
+ return 1
+ } else {
+ return 0
+ }
+}
+
# Return the location of the IPA library.
proc get_in_proc_agent {} {
diff --git a/gdb/tilegx-linux-nat.c b/gdb/tilegx-linux-nat.c
index bbfeaef..440a5cc 100644
--- a/gdb/tilegx-linux-nat.c
+++ b/gdb/tilegx-linux-nat.c
@@ -57,7 +57,7 @@ static tilegx_linux_nat_target the_tilegx_linux_nat_target;
/* Mapping between the general-purpose registers in `struct user'
format and GDB's register array layout. Note that we map the
- first 56 registers (0 thru 55) one-to-one. GDB maps the pc to
+ first 56 registers (0 through 55) one-to-one. GDB maps the pc to
slot 64, but ptrace returns it in slot 56. */
static const int regmap[] =
{
diff --git a/gdb/top.c b/gdb/top.c
index d6bf1d4..d34e733 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -632,19 +632,9 @@ execute_fn_to_string (std::string &res, std::function<void(void)> fn,
{
string_file str_file (term_out);
- try
- {
- execute_fn_to_ui_file (&str_file, fn);
- }
- catch (...)
- {
- /* Finally. */
- res = str_file.release ();
- throw;
- }
+ SCOPE_EXIT { res = str_file.release (); };
- /* And finally. */
- res = str_file.release ();
+ execute_fn_to_ui_file (&str_file, fn);
}
/* See top.h. */
@@ -1389,6 +1379,11 @@ This GDB was configured as follows:\n\
configure --host=%s --target=%s\n\
"), host_name, target_name);
+#ifdef ENABLE_TARGETS
+ gdb_printf (stream, _("\
+ --enable-targets=%s\n"), ENABLE_TARGETS);
+#endif
+
gdb_printf (stream, _("\
--with-auto-load-dir=%s\n\
--with-auto-load-safe-path=%s\n\
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index a5a2e69..ca6f616 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -671,7 +671,7 @@ validate_actionline (const char *line, tracepoint *t)
p = strchr (p, ',');
continue;
}
- /* else fall thru, treat p as an expression and parse it! */
+ /* else fall through, treat p as an expression and parse it! */
}
tmp_p = p;
for (bp_location &loc : t->locations ())
@@ -2110,7 +2110,7 @@ tfind_1 (enum trace_find_type type, int num,
if you're in a user-defined command or especially in a
loop, then you need a way to detect that the command
failed WITHOUT aborting. This allows you to write
- scripts that search thru the trace buffer until the end,
+ scripts that search through the trace buffer until the end,
and then continue on to do something else. */
if (from_tty)
@@ -2351,8 +2351,9 @@ tfind_line_command (const char *args, int from_tty)
{
if (start_pc == end_pc)
{
- gdb_printf ("Line %d of \"%s\"",
- sal.line,
+ gdb_printf ("Line %ps of \"%s\"",
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)),
symtab_to_filename_for_display (sal.symtab));
gdb_stdout->wrap_here (2);
gdb_printf (" is at address ");
@@ -2363,8 +2364,9 @@ tfind_line_command (const char *args, int from_tty)
if (sal.line > 0
&& find_line_pc_range (sal, &start_pc, &end_pc)
&& start_pc != end_pc)
- gdb_printf ("Attempting to find line %d instead.\n",
- sal.line);
+ gdb_printf ("Attempting to find line %ps instead.\n",
+ styled_string (line_number_style.style (),
+ pulongest (sal.line)));
else
error (_("Cannot find a good line."));
}
@@ -3644,7 +3646,7 @@ print_one_static_tracepoint_marker (int count,
else
uiout->field_skip ("fullname");
- uiout->field_signed ("line", sal.line);
+ uiout->field_signed ("line", sal.line, line_number_style.style ());
}
else
{
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index ee64e41..503fb00 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -32,6 +32,20 @@
#include "tui/tui-winsource.h"
#include "tui/tui-source.h"
#include "tui/tui-location.h"
+#include "tui/tui-io.h"
+#include "cli/cli-style.h"
+
+tui_source_window::tui_source_window ()
+{
+ line_number_style.changed.attach
+ (std::bind (&tui_source_window::style_changed, this),
+ m_src_observable, "tui-source");
+}
+
+tui_source_window::~tui_source_window ()
+{
+ line_number_style.changed.detach (m_src_observable);
+}
/* Function to display source in the source window. */
bool
@@ -247,5 +261,7 @@ tui_source_window::show_line_number (int offset) const
tui_left_margin_verbose ? "%0*d%c" : "%*d%c", m_digits - 1,
lineno, space);
}
+ tui_apply_style (handle.get (), line_number_style.style ());
display_string (text);
+ tui_apply_style (handle.get (), ui_file_style ());
}
diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h
index f32167f..d8f7189 100644
--- a/gdb/tui/tui-source.h
+++ b/gdb/tui/tui-source.h
@@ -30,7 +30,8 @@
struct tui_source_window : public tui_source_window_base
{
- tui_source_window () = default;
+ tui_source_window ();
+ ~tui_source_window ();
DISABLE_COPY_AND_ASSIGN (tui_source_window);
@@ -81,6 +82,9 @@ private:
/* It is the resolved form as returned by symtab_to_fullname. */
gdb::unique_xmalloc_ptr<char> m_fullname;
+
+ /* A token used to register and unregister an observer. */
+ gdb::observers::token m_src_observable;
};
/* Return the instance of the source window. */
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index 29828c1..a262c63 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -189,6 +189,11 @@ public:
update_source_windows_with_addr. */
void update_source_window_with_addr (struct gdbarch *, CORE_ADDR);
+protected:
+
+ /* Called when a user style setting is changed. */
+ void style_changed ();
+
private:
/* Used for horizontal scroll. */
@@ -236,9 +241,6 @@ private:
the initial escape that sets the color will still be applied. */
void puts_to_pad_with_skip (const char *string, int skip);
- /* Called when the user "set style enabled" setting is changed. */
- void style_changed ();
-
/* A token used to register and unregister an observer. */
gdb::observers::token m_observable;
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 2e1c5ea..274f602 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -513,7 +513,7 @@ whatis_exp (const char *exp, int show)
val = expr->evaluate_type ();
type = val->type ();
- if (show == -1 && expr->first_opcode () == OP_TYPE)
+ if (show == -1 && expr->type_p ())
{
/* The user expression names a type directly. */
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 7e9f238..3330cc8 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -433,7 +433,8 @@ ui_out::end (ui_out_type type)
}
void
-ui_out::field_signed (const char *fldname, LONGEST value)
+ui_out::field_signed (const char *fldname, LONGEST value,
+ const ui_file_style &style)
{
int fldno;
int width;
@@ -441,7 +442,7 @@ ui_out::field_signed (const char *fldname, LONGEST value)
verify_field (&fldno, &width, &align);
- do_field_signed (fldno, width, align, fldname, value);
+ do_field_signed (fldno, width, align, fldname, value, style);
}
void
@@ -454,7 +455,8 @@ ui_out::field_fmt_signed (int input_width, ui_align input_align,
verify_field (&fldno, &width, &align);
- do_field_signed (fldno, input_width, input_align, fldname, value);
+ do_field_signed (fldno, input_width, input_align, fldname, value,
+ ui_file_style ());
}
/* See ui-out.h. */
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index ef9ce4f..f9d96de 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -182,7 +182,8 @@ class ui_out
void begin (ui_out_type type, const char *id);
void end (ui_out_type type);
- void field_signed (const char *fldname, LONGEST value);
+ void field_signed (const char *fldname, LONGEST value,
+ const ui_file_style &style = ui_file_style ());
void field_fmt_signed (int width, ui_align align, const char *fldname,
LONGEST value);
/* Like field_signed, but print an unsigned value. */
@@ -346,7 +347,8 @@ protected:
virtual void do_begin (ui_out_type type, const char *id) = 0;
virtual void do_end (ui_out_type type) = 0;
virtual void do_field_signed (int fldno, int width, ui_align align,
- const char *fldname, LONGEST value) = 0;
+ const char *fldname, LONGEST value,
+ const ui_file_style &style) = 0;
virtual void do_field_unsigned (int fldno, int width, ui_align align,
const char *fldname, ULONGEST value) = 0;
virtual void do_field_skip (int fldno, int width, ui_align align,
diff --git a/gdb/ui.c b/gdb/ui.c
index e5c7965..88a3a14 100644
--- a/gdb/ui.c
+++ b/gdb/ui.c
@@ -106,7 +106,7 @@ ui::input_interactive_p () const
/* When there is an event ready on the stdin file descriptor, instead
- of calling readline directly throught the callback function, or
+ of calling readline directly through the callback function, or
instead of calling gdb_readline_no_editing_callback, give gdb a
chance to detect errors and do something. */
diff --git a/gdb/unittests/intrusive_list-selftests.c b/gdb/unittests/intrusive_list-selftests.c
index b17ce92..fbd89ed 100644
--- a/gdb/unittests/intrusive_list-selftests.c
+++ b/gdb/unittests/intrusive_list-selftests.c
@@ -18,9 +18,15 @@
#include "gdbsupport/intrusive_list.h"
+#include "gdbsupport/owning_intrusive_list.h"
#include "gdbsupport/selftest.h"
#include <unordered_set>
+/* Count of how many item_with_base or item_with_member objects are
+ currently alive. */
+
+static int items_alive = 0;
+
/* An item type using intrusive_list_node by inheriting from it and its
corresponding list type. Put another base before intrusive_list_node
so that a pointer to the node != a pointer to the item. */
@@ -35,7 +41,13 @@ struct item_with_base : public other_base,
{
explicit item_with_base (const char *name)
: name (name)
- {}
+ {
+ ++items_alive;
+ }
+
+ DISABLE_COPY_AND_ASSIGN (item_with_base);
+
+ ~item_with_base () { --items_alive; }
const char *const name;
};
@@ -50,64 +62,78 @@ struct item_with_member
{
explicit item_with_member (const char *name)
: name (name)
- {}
+ {
+ ++items_alive;
+ }
+
+ DISABLE_COPY_AND_ASSIGN (item_with_member);
+
+ ~item_with_member () { --items_alive; }
const char *const name;
intrusive_list_node<item_with_member> node;
};
-using item_with_member_node
- = intrusive_member_node<item_with_member, &item_with_member::node>;
-using item_with_member_list
- = intrusive_list<item_with_member, item_with_member_node>;
+/* Verify that LIST contains exactly the items in EXPECTED.
-/* To run all tests using both the base and member methods, all tests are
- declared in this templated class, which is instantiated once for each
- list type. */
+ Traverse the list forward and backwards to exercise all links. */
template <typename ListType>
-struct intrusive_list_test
+static void
+verify_items (const ListType &list,
+ gdb::array_view<const typename ListType::value_type *> expected)
{
using item_type = typename ListType::value_type;
- /* Verify that LIST contains exactly the items in EXPECTED.
+ int i = 0;
- Traverse the list forward and backwards to exercise all links. */
+ for (typename ListType::iterator it = list.begin (); it != list.end (); ++it)
+ {
+ const item_type &item = *it;
- static void
- verify_items (const ListType &list,
- gdb::array_view<const typename ListType::value_type *> expected)
- {
- int i = 0;
+ SELF_CHECK (i < expected.size ());
+ SELF_CHECK (&item == expected[i]);
- for (typename ListType::iterator it = list.begin ();
- it != list.end ();
- ++it)
- {
- const item_type &item = *it;
+ /* Access the item, to make sure the object is still alive. */
+ SELF_CHECK (strcmp (item.name, expected[i]->name) == 0);
- SELF_CHECK (i < expected.size ());
- SELF_CHECK (&item == expected[i]);
+ ++i;
+ }
- ++i;
- }
+ SELF_CHECK (i == expected.size ());
- SELF_CHECK (i == expected.size ());
+ for (typename ListType::reverse_iterator it = list.rbegin ();
+ it != list.rend (); ++it)
+ {
+ const item_type &item = *it;
- for (typename ListType::reverse_iterator it = list.rbegin ();
- it != list.rend ();
- ++it)
- {
- const item_type &item = *it;
+ --i;
- --i;
+ SELF_CHECK (i >= 0);
+ SELF_CHECK (&item == expected[i]);
- SELF_CHECK (i >= 0);
- SELF_CHECK (&item == expected[i]);
- }
+ /* Access the item, to make sure the object is still alive. */
+ SELF_CHECK (strcmp (item.name, expected[i]->name) == 0);
+ }
- SELF_CHECK (i == 0);
- }
+ SELF_CHECK (i == 0);
+}
+
+/* intrusive_list tests
+
+ To run all tests using both the base and member methods, all tests are
+ declared in this templated class, which is instantiated once for each
+ list type. */
+
+using item_with_member_node
+ = intrusive_member_node<item_with_member, &item_with_member::node>;
+using item_with_member_list
+ = intrusive_list<item_with_member, item_with_member_node>;
+
+template <typename ListType>
+struct intrusive_list_test
+{
+ using item_type = typename ListType::value_type;
static void
test_move_constructor ()
@@ -446,15 +472,18 @@ struct intrusive_list_test
ListType list;
- list.insert (list.begin (), a);
+ auto a_it = list.insert (list.begin (), a);
+ SELF_CHECK (&*a_it == &a);
expected = {&a};
verify_items (list, expected);
- list.insert (list.begin (), b);
+ auto b_it = list.insert (list.begin (), b);
+ SELF_CHECK (&*b_it == &b);
expected = {&b, &a};
verify_items (list, expected);
- list.insert (list.begin (), c);
+ auto c_it = list.insert (list.begin (), c);
+ SELF_CHECK (&*c_it == &c);
expected = {&c, &b, &a};
verify_items (list, expected);
}
@@ -465,15 +494,18 @@ struct intrusive_list_test
ListType list;
- list.insert (list.end (), a);
+ auto a_it = list.insert (list.end (), a);
+ SELF_CHECK (&*a_it == &a);
expected = {&a};
verify_items (list, expected);
- list.insert (list.end (), b);
+ auto b_it = list.insert (list.end (), b);
+ SELF_CHECK (&*b_it == &b);
expected = {&a, &b};
verify_items (list, expected);
- list.insert (list.end (), c);
+ auto c_it = list.insert (list.end (), c);
+ SELF_CHECK (&*c_it == &c);
expected = {&a, &b, &c};
verify_items (list, expected);
}
@@ -486,7 +518,8 @@ struct intrusive_list_test
list.push_back (a);
list.push_back (b);
- list.insert (list.iterator_to (b), c);
+ auto c_it = list.insert (list.iterator_to (b), c);
+ SELF_CHECK (&*c_it == &c);
expected = {&a, &c, &b};
verify_items (list, expected);
}
@@ -496,7 +529,8 @@ struct intrusive_list_test
item_type a ("a");
ListType list;
- list.insert (list.end (), a);
+ auto a_it = list.insert (list.end (), a);
+ SELF_CHECK (&*a_it == &a);
expected = {&a};
verify_items (list, expected);
}
@@ -773,6 +807,811 @@ test_intrusive_list_1 ()
tests.test_begin_end ();
}
+/* owning_intrusive_list tests
+
+ To run all tests using both the base and member methods, all tests are
+ declared in this templated class, which is instantiated once for each
+ list type. */
+
+using item_with_base_owning_list = owning_intrusive_list<item_with_base>;
+using item_with_member_owning_list
+ = owning_intrusive_list<item_with_member, item_with_member_node>;
+
+template<typename ListType>
+struct owning_intrusive_list_test
+{
+ using item_type = typename ListType::value_type;
+
+ static void test_move_constructor ()
+ {
+ {
+ /* Other list is not empty. */
+ ListType list1;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+ auto &b = list1.emplace_back ("b");
+ auto &c = list1.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ ListType list2 (std::move (list1));
+ SELF_CHECK (items_alive == 3);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = { &a, &b, &c };
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Other list contains 1 element. */
+ ListType list1;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+
+ SELF_CHECK (items_alive == 1);
+ ListType list2 (std::move (list1));
+ SELF_CHECK (items_alive == 1);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = { &a };
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Other list is empty. */
+ ListType list1;
+ std::vector<const item_type *> expected;
+
+ SELF_CHECK (items_alive == 0);
+ ListType list2 (std::move (list1));
+ SELF_CHECK (items_alive == 0);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+ }
+
+ static void test_move_assignment ()
+ {
+ {
+ /* Both lists are not empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+ auto &b = list1.emplace_back ("b");
+ auto &c = list1.emplace_back ("c");
+
+ list2.emplace_back ("d");
+ list2.emplace_back ("e");
+
+ SELF_CHECK (items_alive == 5);
+ list2 = std::move (list1);
+ SELF_CHECK (items_alive == 3);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = { &a, &b, &c };
+ verify_items (list2, expected);
+ }
+
+ {
+ /* rhs list is empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ list2.emplace_back ("a");
+ list2.emplace_back ("b");
+ list2.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ list2 = std::move (list1);
+ SELF_CHECK (items_alive == 0);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+
+ {
+ /* lhs list is empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+ auto &b = list1.emplace_back ("b");
+ auto &c = list1.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ list2 = std::move (list1);
+ SELF_CHECK (items_alive == 3);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = { &a, &b, &c };
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Both lists contain 1 item. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+ list2.emplace_back ("b");
+
+ SELF_CHECK (items_alive == 2);
+ list2 = std::move (list1);
+ SELF_CHECK (items_alive == 1);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = { &a };
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Both lists are empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ SELF_CHECK (items_alive == 0);
+ list2 = std::move (list1);
+ SELF_CHECK (items_alive == 0);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+ }
+
+ static void test_swap ()
+ {
+ {
+ /* Two non-empty lists. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+ auto &b = list1.emplace_back ("b");
+ auto &c = list1.emplace_back ("c");
+
+ auto &d = list2.emplace_back ("d");
+ auto &e = list2.emplace_back ("e");
+
+ SELF_CHECK (items_alive == 5);
+ std::swap (list1, list2);
+ SELF_CHECK (items_alive == 5);
+
+ expected = { &d, &e };
+ verify_items (list1, expected);
+
+ expected = { &a, &b, &c };
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Other is empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+ auto &b = list1.emplace_back ("b");
+ auto &c = list1.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ std::swap (list1, list2);
+ SELF_CHECK (items_alive == 3);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = { &a, &b, &c };
+ verify_items (list2, expected);
+ }
+
+ {
+ /* *this is empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list2.emplace_back ("a");
+ auto &b = list2.emplace_back ("b");
+ auto &c = list2.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ std::swap (list1, list2);
+ SELF_CHECK (items_alive == 3);
+
+ expected = { &a, &b, &c };
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Both lists empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ SELF_CHECK (items_alive == 0);
+ std::swap (list1, list2);
+ SELF_CHECK (items_alive == 0);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Swap one element twice. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+
+ SELF_CHECK (items_alive == 1);
+ std::swap (list1, list2);
+ SELF_CHECK (items_alive == 1);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = { &a };
+ verify_items (list2, expected);
+
+ std::swap (list1, list2);
+ SELF_CHECK (items_alive == 1);
+
+ expected = { &a };
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+ }
+
+ static void test_front_back ()
+ {
+ ListType list;
+ const ListType &clist = list;
+
+ auto &a = list.emplace_back ("a");
+ list.emplace_back ("b");
+ auto &c = list.emplace_back ("c");
+
+ SELF_CHECK (&list.front () == &a);
+ SELF_CHECK (&clist.front () == &a);
+ SELF_CHECK (&list.back () == &c);
+ SELF_CHECK (&clist.back () == &c);
+ }
+
+ static void test_push_front ()
+ {
+ ListType list;
+ std::vector<const item_type *> expected;
+
+ SELF_CHECK (items_alive == 0);
+ list.push_front (std::make_unique<item_type> ("a"));
+ auto &a = list.front ();
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ list.push_front (std::make_unique<item_type> ("b"));
+ auto &b = list.front ();
+ expected = { &b, &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ list.push_front (std::make_unique<item_type> ("c"));
+ auto &c = list.front ();
+ expected = { &c, &b, &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ static void test_push_back ()
+ {
+ ListType list;
+ std::vector<const item_type *> expected;
+
+ SELF_CHECK (items_alive == 0);
+ list.push_back (std::make_unique<item_type> ("a"));
+ auto &a = list.back ();
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ list.push_back (std::make_unique<item_type> ("b"));
+ auto &b = list.back ();
+ expected = { &a, &b };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ list.push_back (std::make_unique<item_type> ("c"));
+ auto &c = list.back ();
+ expected = { &a, &b, &c };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ static void test_insert ()
+ {
+ std::vector<const item_type *> expected;
+
+ {
+ /* Insert at beginning. */
+ ListType list;
+
+ auto &a = *list.insert (list.begin (), std::make_unique<item_type> ("a"));
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ auto &b = *list.insert (list.begin (), std::make_unique<item_type> ("b"));
+ expected = { &b, &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ auto &c = *list.insert (list.begin (), std::make_unique<item_type> ("c"));
+ expected = { &c, &b, &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ {
+ /* Insert at end. */
+ ListType list;
+
+ auto &a = *list.insert (list.end (), std::make_unique<item_type> ("a"));
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ auto &b = *list.insert (list.end (), std::make_unique<item_type> ("b"));
+ expected = { &a, &b };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ auto &c = *list.insert (list.end (), std::make_unique<item_type> ("c"));
+ expected = { &a, &b, &c };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ {
+ /* Insert in the middle. */
+ ListType list;
+
+ auto &a = list.emplace_back ("a");
+ auto &b = list.emplace_back ("b");
+
+ SELF_CHECK (items_alive == 2);
+ auto &c = *list.insert (list.iterator_to (b),
+ std::make_unique<item_type> ("c"));
+ expected = { &a, &c, &b };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ {
+ /* Insert in empty list. */
+ ListType list;
+
+ SELF_CHECK (items_alive == 0);
+ auto &a = *list.insert (list.end (), std::make_unique<item_type> ("a"));
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+ }
+ }
+
+ static void test_emplace_front ()
+ {
+ ListType list;
+ std::vector<const item_type *> expected;
+
+ SELF_CHECK (items_alive == 0);
+ auto &a = list.emplace_front ("a");
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ auto &b = list.emplace_front ("b");
+ expected = { &b, &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ auto &c = list.emplace_front ("c");
+ expected = { &c, &b, &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ static void test_emplace_back ()
+ {
+ ListType list;
+ std::vector<const item_type *> expected;
+
+ SELF_CHECK (items_alive == 0);
+ auto &a = list.emplace_back ("a");
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ auto &b = list.emplace_back ("b");
+ expected = { &a, &b };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ auto &c = list.emplace_back ("c");
+ expected = { &a, &b, &c };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ static void test_emplace ()
+ {
+ std::vector<const item_type *> expected;
+
+ {
+ /* Emplace at beginning. */
+ ListType list;
+
+ auto &a = list.emplace (list.begin (), "a");
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ auto &b = list.emplace (list.begin (), "b");
+ expected = { &b, &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ auto &c = list.emplace (list.begin (), "c");
+ expected = { &c, &b, &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ {
+ /* Emplace at end. */
+ ListType list;
+
+ auto &a = list.emplace (list.end (), "a");
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ auto &b = list.emplace (list.end (), "b");
+ expected = { &a, &b };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ auto &c = list.emplace (list.end (), "c");
+ expected = { &a, &b, &c };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ {
+ /* Emplace in the middle. */
+ ListType list;
+
+ auto &a = list.emplace_back ("a");
+ auto &b = list.emplace_back ("b");
+
+ SELF_CHECK (items_alive == 2);
+ auto &c = list.emplace (list.iterator_to (b), "c");
+ expected = { &a, &c, &b };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ }
+
+ {
+ /* Emplace in empty list. */
+ ListType list;
+
+ SELF_CHECK (items_alive == 0);
+ auto &a = list.emplace (list.end (), "a");
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+ }
+ }
+
+ static void test_splice ()
+ {
+ {
+ /* Two non-empty lists. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+ auto &b = list1.emplace_back ("b");
+ auto &c = list1.emplace_back ("c");
+
+ auto &d = list2.emplace_back ("d");
+ auto &e = list2.emplace_back ("e");
+
+ SELF_CHECK (items_alive == 5);
+ list1.splice (std::move (list2));
+ SELF_CHECK (items_alive == 5);
+
+ expected = { &a, &b, &c, &d, &e };
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Receiving list empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list2.emplace_back ("a");
+ auto &b = list2.emplace_back ("b");
+ auto &c = list2.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ list1.splice (std::move (list2));
+ SELF_CHECK (items_alive == 3);
+
+ expected = { &a, &b, &c };
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Giving list empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ auto &a = list1.emplace_back ("a");
+ auto &b = list1.emplace_back ("b");
+ auto &c = list1.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ list1.splice (std::move (list2));
+ SELF_CHECK (items_alive == 3);
+
+ expected = { &a, &b, &c };
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+
+ {
+ /* Both lists empty. */
+ ListType list1;
+ ListType list2;
+ std::vector<const item_type *> expected;
+
+ SELF_CHECK (items_alive == 0);
+ list1.splice (std::move (list2));
+ SELF_CHECK (items_alive == 0);
+
+ expected = {};
+ verify_items (list1, expected);
+
+ expected = {};
+ verify_items (list2, expected);
+ }
+ }
+
+ static void test_pop_front ()
+ {
+ ListType list;
+ std::vector<const item_type *> expected;
+
+ list.emplace_back ("a");
+ auto &b = list.emplace_back ("b");
+ auto &c = list.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ list.pop_front ();
+ expected = { &b, &c };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ list.pop_front ();
+ expected = { &c };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ list.pop_front ();
+ expected = {};
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 0);
+ }
+
+ static void test_pop_back ()
+ {
+ ListType list;
+ std::vector<const item_type *> expected;
+
+ auto &a = list.emplace_back ("a");
+ auto &b = list.emplace_back ("b");
+ list.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ list.pop_back ();
+ expected = { &a, &b };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+
+ list.pop_back ();
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+
+ list.pop_back ();
+ expected = {};
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 0);
+ }
+
+ static void test_release ()
+ {
+ ListType list;
+ std::vector<const item_type *> expected;
+
+ auto &a = list.emplace_back ("a");
+ auto &b = list.emplace_back ("b");
+ auto &c = list.emplace_back ("c");
+
+ {
+ SELF_CHECK (items_alive == 3);
+ auto [next_it, released] = list.release (list.iterator_to (b));
+ SELF_CHECK (&*next_it == &c);
+ expected = { &a, &c };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 3);
+ released.reset ();
+ SELF_CHECK (items_alive == 2);
+ }
+
+ {
+ auto [next_it, released] = list.release (list.iterator_to (c));
+ SELF_CHECK (next_it == list.end ());
+ expected = { &a };
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 2);
+ released.reset ();
+ SELF_CHECK (items_alive == 1);
+ }
+
+ {
+ auto [next_it, released] = list.release (list.iterator_to (a));
+ SELF_CHECK (next_it == list.end ());
+ expected = {};
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 1);
+ released.reset ();
+ SELF_CHECK (items_alive == 0);
+ }
+ }
+
+ static void test_clear ()
+ {
+ ListType list;
+ std::vector<const item_type *> expected;
+
+ list.emplace_back ("a");
+ list.emplace_back ("b");
+ list.emplace_back ("c");
+
+ SELF_CHECK (items_alive == 3);
+ list.clear ();
+ expected = {};
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 0);
+
+ /* Verify idempotency. */
+ list.clear ();
+ expected = {};
+ verify_items (list, expected);
+ SELF_CHECK (items_alive == 0);
+ }
+
+ static void test_empty ()
+ {
+ ListType list;
+
+ SELF_CHECK (list.empty ());
+ auto &a = list.emplace_back ("a");
+ SELF_CHECK (!list.empty ());
+ list.erase (list.iterator_to (a));
+ SELF_CHECK (list.empty ());
+ }
+
+ static void test_begin_end ()
+ {
+ ListType list;
+ const ListType &clist = list;
+
+ auto &a = list.emplace_back ("a");
+ list.emplace_back ("b");
+ auto &c = list.emplace_back ("c");
+
+ SELF_CHECK (&*list.begin () == &a);
+ SELF_CHECK (&*list.cbegin () == &a);
+ SELF_CHECK (&*clist.begin () == &a);
+ SELF_CHECK (&*list.rbegin () == &c);
+ SELF_CHECK (&*list.crbegin () == &c);
+ SELF_CHECK (&*clist.rbegin () == &c);
+
+ /* At least check that they compile. */
+ list.end ();
+ list.cend ();
+ clist.end ();
+ list.rend ();
+ list.crend ();
+ clist.end ();
+ }
+};
+
+template<typename ListType>
+static void
+test_owning_intrusive_list_1 ()
+{
+ owning_intrusive_list_test<ListType> tests;
+
+ tests.test_move_constructor ();
+ tests.test_move_assignment ();
+ tests.test_swap ();
+ tests.test_front_back ();
+ tests.test_push_front ();
+ tests.test_push_back ();
+ tests.test_insert ();
+ tests.test_emplace_front ();
+ tests.test_emplace_back ();
+ tests.test_emplace ();
+ tests.test_splice ();
+ tests.test_pop_front ();
+ tests.test_pop_back ();
+ tests.test_release ();
+ tests.test_clear ();
+ tests.test_empty ();
+ tests.test_begin_end ();
+}
+
static void
test_node_is_linked ()
{
@@ -804,13 +1643,15 @@ test_intrusive_list ()
{
test_intrusive_list_1<item_with_base_list> ();
test_intrusive_list_1<item_with_member_list> ();
+ test_owning_intrusive_list_1<item_with_base_owning_list> ();
+ test_owning_intrusive_list_1<item_with_member_owning_list> ();
test_node_is_linked ();
}
void _initialize_intrusive_list_selftests ();
+
void
_initialize_intrusive_list_selftests ()
{
- selftests::register_test
- ("intrusive_list", test_intrusive_list);
+ selftests::register_test ("intrusive_list", test_intrusive_list);
}
diff --git a/gdb/user-regs.c b/gdb/user-regs.c
index ac04f63..2ace46e 100644
--- a/gdb/user-regs.c
+++ b/gdb/user-regs.c
@@ -222,9 +222,19 @@ maintenance_print_user_registers (const char *args, int from_tty)
struct gdb_user_regs *regs = get_user_regs (gdbarch);
regnum = gdbarch_num_cooked_regs (gdbarch);
- gdb_printf (" %-11s %3s\n", "Name", "Nr");
+ ui_out_emit_table emitter (current_uiout, 2, -1, "UserRegs");
+
+ current_uiout->table_header (11, ui_left, "name", "Name");
+ current_uiout->table_header (3, ui_left, "regnum", "Nr");
+ current_uiout->table_body ();
+
for (reg = regs->first; reg != NULL; reg = reg->next, ++regnum)
- gdb_printf (" %-11s %3d\n", reg->name, regnum);
+ {
+ ui_out_emit_tuple tuple_emitter (current_uiout, nullptr);
+ current_uiout->field_string ("name", reg->name);
+ current_uiout->field_signed ("regnum", regnum);
+ current_uiout->text ("\n");
+ }
}
void _initialize_user_regs ();
diff --git a/gdb/utils.c b/gdb/utils.c
index 07c5d3c..a1bf9e4 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -819,7 +819,9 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
}
/* Format the question outside of the loop, to avoid reusing args. */
- std::string question = string_vprintf (ctlstr, args);
+ string_file tem (gdb_stdout->can_emit_style_escape ());
+ gdb_vprintf (&tem, ctlstr, args);
+ std::string question = tem.release ();
std::string prompt
= string_printf (_("%s%s(%s or %s) %s"),
annotation_level > 1 ? "\n\032\032pre-query\n" : "",
@@ -1282,6 +1284,14 @@ set_screen_width_and_height (int width, int height)
set_width ();
}
+/* Import termcap variable UP (instead of readline private variable
+ _rl_term_up, which we're trying to avoid, see PR build/10723). The UP
+ variable doesn't seem be part of the regular termcap interface, but rather
+ curses-specific. But if it's missing in the termcap library, then readline
+ provides a fallback version. Let's assume the fallback is not part of the
+ private readline interface. */
+extern "C" char *UP;
+
/* Implement "maint info screen". */
static void
@@ -1340,6 +1350,46 @@ maintenance_info_screen (const char *args, int from_tty)
_("Number of lines environment thinks "
"are in a page is %s (LINES).\n"),
getenv ("LINES"));
+
+ bool have_up = UP != nullptr && *UP != '\0';
+
+ /* Fetch value of readline variable horizontal-scroll-mode. */
+ const char *horizontal_scroll_mode_value
+ = rl_variable_value ("horizontal-scroll-mode");
+ bool force_horizontal_scroll_mode
+ = (horizontal_scroll_mode_value != nullptr
+ && strcmp (horizontal_scroll_mode_value, "on") == 0);
+
+ const char *mode = nullptr;
+ const char *reason = nullptr;
+ if (batch_flag)
+ {
+ mode = "unsupported";
+ reason = "gdb batch mode";
+ }
+ else if (!have_up)
+ {
+ mode = "unsupported";
+ reason = "terminal is not Cursor Up capable";
+ }
+ else if (force_horizontal_scroll_mode)
+ {
+ mode = "disabled";
+ reason = "horizontal-scroll-mode";
+ }
+ else if (readline_hidden_cols)
+ {
+ mode = "readline";
+ reason = "terminal is not auto wrap capable, last column reserved";
+ }
+ else
+ {
+ mode = "terminal";
+ reason = "terminal is auto wrap capable";
+ }
+
+ gdb_printf (gdb_stdout, _("Readline wrapping mode: %s (%s).\n"), mode,
+ reason);
}
void
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 531fdb4..de1cc6c 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -201,7 +201,7 @@ enum
E_R149_REGNUM,
E_NUM_OF_V850E2_REGS,
- /* v850e3v5 system registers, selID 1 thru 7. */
+ /* v850e3v5 system registers, selID 1 through 7. */
E_SELID_1_R0_REGNUM = E_NUM_OF_V850E2_REGS,
E_SELID_1_R31_REGNUM = E_SELID_1_R0_REGNUM + 31,
@@ -1047,7 +1047,7 @@ v850_push_dummy_call (struct gdbarch *gdbarch,
/* Now load as many as possible of the first arguments into
registers, and push the rest onto the stack. There are 16 bytes
- in four registers available. Loop thru args from first to last. */
+ in four registers available. Loop through args from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
int len;
diff --git a/gdb/valops.c b/gdb/valops.c
index 427fbb1..88a42d3 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -40,7 +40,6 @@
#include "observable.h"
#include "objfiles.h"
#include "extension.h"
-#include "gdbtypes.h"
#include "gdbsupport/byte-vector.h"
#include "typeprint.h"
@@ -1487,7 +1486,7 @@ value_coerce_to_target (struct value *val)
nonzero lower bound.
FIXME: A previous comment here indicated that this routine should
- be substracting the array's lower bound. It's not clear to me that
+ be subtracting the array's lower bound. It's not clear to me that
this is correct. Given an array subscripting operation, it would
certainly work to do the adjustment here, essentially computing:
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 0cd0bd0..04f1fc8 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -323,10 +323,7 @@ varobj_create (const char *objname,
}
/* Don't allow variables to be created for types. */
- enum exp_opcode opcode = var->root->exp->first_opcode ();
- if (opcode == OP_TYPE
- || opcode == OP_TYPEOF
- || opcode == OP_DECLTYPE)
+ if (var->root->exp->type_p ())
{
gdb_printf (gdb_stderr, "Attempt to use a type name"
" as an expression.\n");
diff --git a/gdbserver/i387-fp.cc b/gdbserver/i387-fp.cc
index 4d8bcb5..0bf57a3 100644
--- a/gdbserver/i387-fp.cc
+++ b/gdbserver/i387-fp.cc
@@ -23,8 +23,6 @@
/* Default to SSE. */
static uint64_t x86_xcr0 = X86_XSTATE_SSE_MASK;
-static const int num_mpx_bnd_registers = 4;
-static const int num_mpx_cfg_registers = 2;
static const int num_avx512_k_registers = 8;
static const int num_pkeys_registers = 1;
@@ -118,15 +116,6 @@ public:
unsigned char *ymmh_space ()
{ return xsave () + xsave_layout.avx_offset; }
- /* Memory address of 4 bound registers values of 128 bits. */
- unsigned char *bndregs_space ()
- { return xsave () + xsave_layout.bndregs_offset; }
-
- /* Memory address of 2 MPX configuration registers of 64 bits
- plus reserved space. */
- unsigned char *bndcfg_space ()
- { return xsave () + xsave_layout.bndcfg_offset; }
-
/* Memory address of 8 OpMask register values of 64 bits. */
unsigned char *k_space ()
{ return xsave () + xsave_layout.k_offset; }
@@ -308,14 +297,6 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
if ((clear_bv & X86_XSTATE_SSE) && (clear_bv & X86_XSTATE_AVX))
memset (((char *) &fp->mxcsr), 0, 4);
- if ((clear_bv & X86_XSTATE_BNDREGS))
- for (i = 0; i < num_mpx_bnd_registers; i++)
- memset (fp->bndregs_space () + i * 16, 0, 16);
-
- if ((clear_bv & X86_XSTATE_BNDCFG))
- for (i = 0; i < num_mpx_cfg_registers; i++)
- memset (fp->bndcfg_space () + i * 8, 0, 8);
-
if ((clear_bv & X86_XSTATE_K))
for (i = 0; i < num_avx512_k_registers; i++)
memset (fp->k_space () + i * 8, 0, 8);
@@ -384,40 +365,6 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
}
}
- /* Check if any bound register has changed. */
- if ((x86_xcr0 & X86_XSTATE_BNDREGS))
- {
- int bnd0r_regnum = find_regno (regcache->tdesc, "bnd0raw");
-
- for (i = 0; i < num_mpx_bnd_registers; i++)
- {
- collect_register (regcache, i + bnd0r_regnum, raw);
- p = fp->bndregs_space () + i * 16;
- if (memcmp (raw, p, 16))
- {
- xstate_bv |= X86_XSTATE_BNDREGS;
- memcpy (p, raw, 16);
- }
- }
- }
-
- /* Check if any status register has changed. */
- if ((x86_xcr0 & X86_XSTATE_BNDCFG))
- {
- int bndcfg_regnum = find_regno (regcache->tdesc, "bndcfgu");
-
- for (i = 0; i < num_mpx_cfg_registers; i++)
- {
- collect_register (regcache, i + bndcfg_regnum, raw);
- p = fp->bndcfg_space () + i * 8;
- if (memcmp (raw, p, 8))
- {
- xstate_bv |= X86_XSTATE_BNDCFG;
- memcpy (p, raw, 8);
- }
- }
- }
-
/* Check if any K registers are changed. */
if ((x86_xcr0 & X86_XSTATE_K))
{
@@ -765,42 +712,6 @@ i387_xsave_to_cache (struct regcache *regcache, const void *buf)
}
}
- if ((x86_xcr0 & X86_XSTATE_BNDREGS))
- {
- int bnd0r_regnum = find_regno (regcache->tdesc, "bnd0raw");
-
-
- if ((clear_bv & X86_XSTATE_BNDREGS) != 0)
- {
- for (i = 0; i < num_mpx_bnd_registers; i++)
- supply_register_zeroed (regcache, i + bnd0r_regnum);
- }
- else
- {
- p = fp->bndregs_space ();
- for (i = 0; i < num_mpx_bnd_registers; i++)
- supply_register (regcache, i + bnd0r_regnum, p + i * 16);
- }
-
- }
-
- if ((x86_xcr0 & X86_XSTATE_BNDCFG))
- {
- int bndcfg_regnum = find_regno (regcache->tdesc, "bndcfgu");
-
- if ((clear_bv & X86_XSTATE_BNDCFG) != 0)
- {
- for (i = 0; i < num_mpx_cfg_registers; i++)
- supply_register_zeroed (regcache, i + bndcfg_regnum);
- }
- else
- {
- p = fp->bndcfg_space ();
- for (i = 0; i < num_mpx_cfg_registers; i++)
- supply_register (regcache, i + bndcfg_regnum, p + i * 8);
- }
- }
-
if ((x86_xcr0 & X86_XSTATE_K) != 0)
{
int k0_regnum = find_regno (regcache->tdesc, "k0");
diff --git a/gdbserver/linux-aarch32-tdesc.cc b/gdbserver/linux-aarch32-tdesc.cc
index b898775..441fe66 100644
--- a/gdbserver/linux-aarch32-tdesc.cc
+++ b/gdbserver/linux-aarch32-tdesc.cc
@@ -34,7 +34,7 @@ aarch32_linux_read_description ()
tdesc_aarch32 = aarch32_create_target_description (false);
static const char *expedite_regs[] = { "r11", "sp", "pc", 0 };
- init_target_desc (tdesc_aarch32, expedite_regs);
+ init_target_desc (tdesc_aarch32, expedite_regs, GDB_OSABI_LINUX);
}
return tdesc_aarch32;
}
diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc
index eb30c31..998ad0a 100644
--- a/gdbserver/linux-aarch64-low.cc
+++ b/gdbserver/linux-aarch64-low.cc
@@ -1538,7 +1538,7 @@ emit_add (uint32_t *buf, struct aarch64_register rd,
RD is the destination register.
RN is the input register.
- IMM is the immediate to substract to RN. */
+ IMM is the immediate to subtract to RN. */
static int
emit_sub (uint32_t *buf, struct aarch64_register rd,
diff --git a/gdbserver/linux-aarch64-tdesc.cc b/gdbserver/linux-aarch64-tdesc.cc
index 31ec785..39d5bcc 100644
--- a/gdbserver/linux-aarch64-tdesc.cc
+++ b/gdbserver/linux-aarch64-tdesc.cc
@@ -67,7 +67,8 @@ aarch64_linux_read_description (const aarch64_features &features)
expedited_registers.push_back (nullptr);
- init_target_desc (tdesc, (const char **) expedited_registers.data ());
+ init_target_desc (tdesc, (const char **) expedited_registers.data (),
+ GDB_OSABI_LINUX);
tdesc_aarch64_map[features] = tdesc;
}
diff --git a/gdbserver/linux-arc-low.cc b/gdbserver/linux-arc-low.cc
index dda224f..16d8d58 100644
--- a/gdbserver/linux-arc-low.cc
+++ b/gdbserver/linux-arc-low.cc
@@ -114,7 +114,7 @@ arc_linux_read_description (void)
target_desc_up tdesc = arc_create_target_description (features);
static const char *expedite_regs[] = { "sp", "status32", nullptr };
- init_target_desc (tdesc.get (), expedite_regs);
+ init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX);
return tdesc.release ();
}
@@ -282,7 +282,7 @@ arc_store_gregset (struct regcache *regcache, const void *buf)
unsigned long pcl = regbuf->stop_pc & ~3L;
supply_register_by_name (regcache, "pcl", &pcl);
- /* Other auxilliary registers. */
+ /* Other auxiliary registers. */
supply_register_by_name (regcache, "status32", &(regbuf->scratch.status32));
/* BTA. */
diff --git a/gdbserver/linux-arm-low.cc b/gdbserver/linux-arm-low.cc
index ee89949..af534c7 100644
--- a/gdbserver/linux-arm-low.cc
+++ b/gdbserver/linux-arm-low.cc
@@ -361,7 +361,7 @@ get_next_pcs_is_thumb (struct arm_get_next_pcs *self)
}
/* Read memory from the inferior.
- BYTE_ORDER is ignored and there to keep compatiblity with GDB's
+ BYTE_ORDER is ignored and there to keep compatibility with GDB's
read_memory_unsigned_integer. */
static ULONGEST
get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
diff --git a/gdbserver/linux-arm-tdesc.cc b/gdbserver/linux-arm-tdesc.cc
index 559f9b0..fff2e94 100644
--- a/gdbserver/linux-arm-tdesc.cc
+++ b/gdbserver/linux-arm-tdesc.cc
@@ -37,7 +37,7 @@ arm_linux_read_description (arm_fp_type fp_type)
tdesc = arm_create_target_description (fp_type, false);
static const char *expedite_regs[] = { "r11", "sp", "pc", 0 };
- init_target_desc (tdesc, expedite_regs);
+ init_target_desc (tdesc, expedite_regs, GDB_OSABI_LINUX);
tdesc_arm_list[fp_type] = tdesc;
}
diff --git a/gdbserver/linux-csky-low.cc b/gdbserver/linux-csky-low.cc
index 2eb5a2d..18a0d15 100644
--- a/gdbserver/linux-csky-low.cc
+++ b/gdbserver/linux-csky-low.cc
@@ -133,7 +133,7 @@ csky_target::low_arch_setup ()
if (tdesc->expedite_regs.empty ())
{
- init_target_desc (tdesc.get (), expedite_regs);
+ init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX);
gdb_assert (!tdesc->expedite_regs.empty ());
}
diff --git a/gdbserver/linux-loongarch-low.cc b/gdbserver/linux-loongarch-low.cc
index 584ea64..cf7d6c0 100644
--- a/gdbserver/linux-loongarch-low.cc
+++ b/gdbserver/linux-loongarch-low.cc
@@ -85,7 +85,7 @@ loongarch_target::low_arch_setup ()
if (tdesc->expedite_regs.empty ())
{
- init_target_desc (tdesc.get (), expedite_regs);
+ init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX);
gdb_assert (!tdesc->expedite_regs.empty ());
}
current_process ()->tdesc = tdesc.release ();
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 193d851..79512c0 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6970,6 +6970,8 @@ linux_process_target::read_btrace_conf (const btrace_target_info *tinfo,
string_xml_appendf (*buffer, "/>\n");
string_xml_appendf (*buffer, " ptwrite=\"%s\"",
conf->pt.ptwrite ? "yes" : "no");
+ string_xml_appendf (*buffer, " event-tracing=\"%s\"",
+ conf->pt.event_tracing ? "yes" : "no");
string_xml_appendf (*buffer, "/>\n");
break;
}
diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc
index c4554c5..7170ad9 100644
--- a/gdbserver/linux-riscv-low.cc
+++ b/gdbserver/linux-riscv-low.cc
@@ -91,7 +91,7 @@ riscv_target::low_arch_setup ()
if (tdesc->expedite_regs.empty ())
{
- init_target_desc (tdesc.get (), expedite_regs);
+ init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX);
gdb_assert (!tdesc->expedite_regs.empty ());
}
diff --git a/gdbserver/linux-tic6x-low.cc b/gdbserver/linux-tic6x-low.cc
index 707be2e..754dd00 100644
--- a/gdbserver/linux-tic6x-low.cc
+++ b/gdbserver/linux-tic6x-low.cc
@@ -228,7 +228,7 @@ tic6x_read_description (enum c6x_feature feature)
{
*tdesc = tic6x_create_target_description (feature);
static const char *expedite_regs[] = { "A15", "PC", NULL };
- init_target_desc (*tdesc, expedite_regs);
+ init_target_desc (*tdesc, expedite_regs, GDB_OSABI_LINUX);
}
return *tdesc;
diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc
index e4a455c..afb1954 100644
--- a/gdbserver/linux-x86-low.cc
+++ b/gdbserver/linux-x86-low.cc
@@ -240,6 +240,8 @@ static const int x86_64_regmap[] =
-1, -1, -1, -1, -1, -1, -1, -1,
ORIG_RAX * 8,
21 * 8, 22 * 8,
+ /* MPX is deprecated. Yet we keep this to not give the registers below
+ a new number. That could break older gdbs. */
-1, -1, -1, -1, /* MPX registers BND0 ... BND3. */
-1, -1, /* MPX registers BNDCFGU, BNDSTATUS. */
-1, -1, -1, -1, -1, -1, -1, -1, /* xmm16 ... xmm31 (AVX512) */
diff --git a/gdbserver/linux-x86-tdesc.cc b/gdbserver/linux-x86-tdesc.cc
index 13c8076..6aa5c4a 100644
--- a/gdbserver/linux-x86-tdesc.cc
+++ b/gdbserver/linux-x86-tdesc.cc
@@ -26,10 +26,21 @@
void
x86_linux_post_init_tdesc (target_desc *tdesc, bool is_64bit)
{
+ enum gdb_osabi osabi = GDB_OSABI_LINUX;
+
+#ifndef IN_PROCESS_AGENT
+ /* x86 target descriptions are created with the osabi already set.
+ However, init_target_desc requires us to override the already set
+ value. That's fine, out new string should match the old one. */
+ gdb_assert (tdesc_osabi_name (tdesc) != nullptr);
+ gdb_assert (strcmp (tdesc_osabi_name (tdesc),
+ gdbarch_osabi_name (osabi)) == 0);
+#endif /* ! IN_PROCESS_AGENT */
+
#ifdef __x86_64__
if (is_64bit)
- init_target_desc (tdesc, amd64_expedite_regs);
+ init_target_desc (tdesc, amd64_expedite_regs, osabi);
else
#endif
- init_target_desc (tdesc, i386_expedite_regs);
+ init_target_desc (tdesc, i386_expedite_regs, osabi);
}
diff --git a/gdbserver/netbsd-aarch64-low.cc b/gdbserver/netbsd-aarch64-low.cc
index f20a1a7..8834e0a 100644
--- a/gdbserver/netbsd-aarch64-low.cc
+++ b/gdbserver/netbsd-aarch64-low.cc
@@ -98,7 +98,7 @@ netbsd_aarch64_target::low_arch_setup ()
= aarch64_create_target_description ({});
static const char *expedite_regs_aarch64[] = { "x29", "sp", "pc", NULL };
- init_target_desc (tdesc, expedite_regs_aarch64);
+ init_target_desc (tdesc, expedite_regs_aarch64, GDB_OSABI_NETBSD);
current_process ()->tdesc = tdesc;
}
diff --git a/gdbserver/netbsd-amd64-low.cc b/gdbserver/netbsd-amd64-low.cc
index 2c8c711..ad7cb43 100644
--- a/gdbserver/netbsd-amd64-low.cc
+++ b/gdbserver/netbsd-amd64-low.cc
@@ -63,6 +63,8 @@ enum netbsd_x86_64_gdb_regnum
AMD64_MXCSR_REGNUM = AMD64_XMM0_REGNUM + 16,
AMD64_YMM0H_REGNUM, /* %ymm0h */
AMD64_YMM15H_REGNUM = AMD64_YMM0H_REGNUM + 15,
+ /* MPX is deprecated. Yet we keep this to not give the registers below
+ a new number. That could break older gdbservers. */
AMD64_BND0R_REGNUM = AMD64_YMM15H_REGNUM + 1,
AMD64_BND3R_REGNUM = AMD64_BND0R_REGNUM + 3,
AMD64_BNDCFGU_REGNUM,
@@ -191,7 +193,7 @@ netbsd_amd64_target::low_arch_setup ()
target_desc *tdesc
= amd64_create_target_description (X86_XSTATE_SSE_MASK, false, false, false);
- init_target_desc (tdesc, amd64_expedite_regs);
+ init_target_desc (tdesc, amd64_expedite_regs, GDB_OSABI_NETBSD);
current_process ()->tdesc = tdesc;
}
diff --git a/gdbserver/netbsd-i386-low.cc b/gdbserver/netbsd-i386-low.cc
index 247a397..ea6fce4 100644
--- a/gdbserver/netbsd-i386-low.cc
+++ b/gdbserver/netbsd-i386-low.cc
@@ -142,7 +142,7 @@ netbsd_i386_target::low_arch_setup ()
target_desc *tdesc
= i386_create_target_description (X86_XSTATE_SSE_MASK, false, false);
- init_target_desc (tdesc, i386_expedite_regs);
+ init_target_desc (tdesc, i386_expedite_regs, GDB_OSABI_NETBSD);
current_process ()->tdesc = tdesc;
}
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index ee53776..69ffb72 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -550,6 +550,19 @@ handle_btrace_conf_general_set (char *own_buf)
return -1;
}
}
+ else if (strncmp (op, "pt:event-tracing=", strlen ("pt:event-tracing=")) == 0)
+ {
+ op += strlen ("pt:event-tracing=");
+ if (strncmp (op, "\"yes\"", strlen ("\"yes\"")) == 0)
+ current_btrace_conf.pt.event_tracing = true;
+ else if (strncmp (op, "\"no\"", strlen ("\"no\"")) == 0)
+ current_btrace_conf.pt.event_tracing = false;
+ else
+ {
+ strcpy (own_buf, "E.Bad event-tracing value.");
+ return -1;
+ }
+ }
else
{
strcpy (own_buf, "E.Bad Qbtrace configuration option.");
@@ -1773,7 +1786,7 @@ struct qxfer
the starting point. The ANNEX can be used to provide additional
data-specific information to the target.
- Return the number of bytes actually transfered, zero when no
+ Return the number of bytes actually transferred, zero when no
further transfer is possible, -1 on error, -2 when the transfer
is not supported, and -3 on a verbose error message that should
be preserved. Return of a positive value smaller than LEN does
@@ -2498,6 +2511,7 @@ supported_btrace_packets (char *buf)
strcat (buf, ";Qbtrace:pt+");
strcat (buf, ";Qbtrace-conf:pt:size+");
strcat (buf, ";Qbtrace-conf:pt:ptwrite+");
+ strcat (buf, ";Qbtrace-conf:pt:event-tracing+");
strcat (buf, ";Qbtrace:off+");
strcat (buf, ";qXfer:btrace:read+");
strcat (buf, ";qXfer:btrace-conf:read+");
diff --git a/gdbserver/tdesc.cc b/gdbserver/tdesc.cc
index 3265793..da1287a 100644
--- a/gdbserver/tdesc.cc
+++ b/gdbserver/tdesc.cc
@@ -20,12 +20,6 @@
#ifndef IN_PROCESS_AGENT
-target_desc::~target_desc ()
-{
- xfree ((char *) arch);
- xfree ((char *) osabi);
-}
-
bool target_desc::operator== (const target_desc &other) const
{
if (reg_defs != other.reg_defs)
@@ -59,7 +53,8 @@ void target_desc::accept (tdesc_element_visitor &v) const
void
init_target_desc (struct target_desc *tdesc,
- const char **expedite_regs)
+ const char **expedite_regs,
+ enum gdb_osabi osabi)
{
int offset = 0;
@@ -94,6 +89,8 @@ init_target_desc (struct target_desc *tdesc,
int expedite_count = 0;
while (expedite_regs[expedite_count] != nullptr)
tdesc->expedite_regs.push_back (expedite_regs[expedite_count++]);
+
+ set_tdesc_osabi (tdesc, osabi);
#endif
}
@@ -162,7 +159,7 @@ tdesc_compatible_info_arch_name (const tdesc_compatible_info_up &c_info)
const char *
tdesc_architecture_name (const struct target_desc *target_desc)
{
- return target_desc->arch;
+ return target_desc->arch.get ();
}
/* See gdbsupport/tdesc.h. */
@@ -171,7 +168,7 @@ void
set_tdesc_architecture (struct target_desc *target_desc,
const char *name)
{
- target_desc->arch = xstrdup (name);
+ target_desc->arch = make_unique_xstrdup (name);
}
/* See gdbsupport/tdesc.h. */
@@ -179,15 +176,16 @@ set_tdesc_architecture (struct target_desc *target_desc,
const char *
tdesc_osabi_name (const struct target_desc *target_desc)
{
- return target_desc->osabi;
+ return target_desc->osabi.get ();
}
/* See gdbsupport/tdesc.h. */
void
-set_tdesc_osabi (struct target_desc *target_desc, const char *name)
+set_tdesc_osabi (struct target_desc *target_desc, enum gdb_osabi osabi)
{
- target_desc->osabi = xstrdup (name);
+ const char *name = gdbarch_osabi_name (osabi);
+ target_desc->osabi = make_unique_xstrdup (name);
}
/* See gdbsupport/tdesc.h. */
@@ -198,7 +196,7 @@ tdesc_get_features_xml (const target_desc *tdesc)
/* Either .xmltarget or .features is not NULL. */
gdb_assert (tdesc->xmltarget != NULL
|| (!tdesc->features.empty ()
- && tdesc->arch != NULL));
+ && tdesc_architecture_name (tdesc) != nullptr));
if (tdesc->xmltarget == NULL)
{
diff --git a/gdbserver/tdesc.h b/gdbserver/tdesc.h
index 534b8b0..e6cefe5 100644
--- a/gdbserver/tdesc.h
+++ b/gdbserver/tdesc.h
@@ -54,18 +54,16 @@ struct target_desc final : tdesc_element
mutable const char *xmltarget = NULL;
/* The value of <architecture> element in the XML, replying GDB. */
- const char *arch = NULL;
+ gdb::unique_xmalloc_ptr<char> arch;
/* The value of <osabi> element in the XML, replying GDB. */
- const char *osabi = NULL;
+ gdb::unique_xmalloc_ptr<char> osabi;
public:
target_desc ()
: registers_size (0)
{}
- ~target_desc ();
-
bool operator== (const target_desc &other) const;
bool operator!= (const target_desc &other) const
@@ -83,10 +81,11 @@ void copy_target_description (struct target_desc *dest,
const struct target_desc *src);
/* Initialize TDESC, and then set its expedite_regs field to
- EXPEDITE_REGS. */
+ EXPEDITE_REGS and its osabi to OSABI. */
void init_target_desc (struct target_desc *tdesc,
- const char **expedite_regs);
+ const char **expedite_regs,
+ enum gdb_osabi osabi);
/* Return the current inferior's target description. Never returns
NULL. */
diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc
index 0a761ca..13f9aca 100644
--- a/gdbserver/win32-i386-low.cc
+++ b/gdbserver/win32-i386-low.cc
@@ -596,12 +596,12 @@ i386_arch_setup (void)
#ifdef __x86_64__
tdesc = amd64_create_target_description (X86_XSTATE_SSE_MASK, false,
false, false);
- init_target_desc (tdesc, amd64_expedite_regs);
+ init_target_desc (tdesc, amd64_expedite_regs, WINDOWS_OSABI);
win32_tdesc = tdesc;
#endif
tdesc = i386_create_target_description (X86_XSTATE_SSE_MASK, false, false);
- init_target_desc (tdesc, i386_expedite_regs);
+ init_target_desc (tdesc, i386_expedite_regs, WINDOWS_OSABI);
#ifdef __x86_64__
wow64_win32_tdesc = tdesc;
#else
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h
index ff997df..daed16a 100644
--- a/gdbserver/win32-low.h
+++ b/gdbserver/win32-low.h
@@ -21,6 +21,7 @@
#include <windows.h>
#include "nat/windows-nat.h"
+#include "gdbsupport/osabi.h"
struct target_desc;
@@ -31,6 +32,12 @@ extern const struct target_desc *win32_tdesc;
extern const struct target_desc *wow64_win32_tdesc;
#endif
+#ifdef __CYGWIN__
+constexpr enum gdb_osabi WINDOWS_OSABI = GDB_OSABI_CYGWIN;
+#else
+constexpr enum gdb_osabi WINDOWS_OSABI = GDB_OSABI_WINDOWS;
+#endif
+
struct win32_target_ops
{
/* Architecture-specific setup. */
diff --git a/gdbsupport/Makefile.am b/gdbsupport/Makefile.am
index 36e561e..e772987 100644
--- a/gdbsupport/Makefile.am
+++ b/gdbsupport/Makefile.am
@@ -76,6 +76,7 @@ libgdbsupport_a_SOURCES = \
job-control.cc \
netstuff.cc \
new-op.cc \
+ osabi.cc \
pathstuff.cc \
print-utils.cc \
ptid.cc \
diff --git a/gdbsupport/Makefile.in b/gdbsupport/Makefile.in
index 9cff86b..db3d6f6 100644
--- a/gdbsupport/Makefile.in
+++ b/gdbsupport/Makefile.in
@@ -162,12 +162,13 @@ am_libgdbsupport_a_OBJECTS = agent.$(OBJEXT) btrace-common.$(OBJEXT) \
gdb-dlfcn.$(OBJEXT) gdb_obstack.$(OBJEXT) gdb_regex.$(OBJEXT) \
gdb_tilde_expand.$(OBJEXT) gdb_wait.$(OBJEXT) \
gdb_vecs.$(OBJEXT) job-control.$(OBJEXT) netstuff.$(OBJEXT) \
- new-op.$(OBJEXT) pathstuff.$(OBJEXT) print-utils.$(OBJEXT) \
- ptid.$(OBJEXT) rsp-low.$(OBJEXT) run-time-clock.$(OBJEXT) \
- safe-strerror.$(OBJEXT) scoped_mmap.$(OBJEXT) search.$(OBJEXT) \
- signals.$(OBJEXT) signals-state-save-restore.$(OBJEXT) \
- task-group.$(OBJEXT) tdesc.$(OBJEXT) thread-pool.$(OBJEXT) \
- xml-utils.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+ new-op.$(OBJEXT) osabi.$(OBJEXT) pathstuff.$(OBJEXT) \
+ print-utils.$(OBJEXT) ptid.$(OBJEXT) rsp-low.$(OBJEXT) \
+ run-time-clock.$(OBJEXT) safe-strerror.$(OBJEXT) \
+ scoped_mmap.$(OBJEXT) search.$(OBJEXT) signals.$(OBJEXT) \
+ signals-state-save-restore.$(OBJEXT) task-group.$(OBJEXT) \
+ tdesc.$(OBJEXT) thread-pool.$(OBJEXT) xml-utils.$(OBJEXT) \
+ $(am__objects_1) $(am__objects_2)
libgdbsupport_a_OBJECTS = $(am_libgdbsupport_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -433,6 +434,7 @@ libgdbsupport_a_SOURCES = \
job-control.cc \
netstuff.cc \
new-op.cc \
+ osabi.cc \
pathstuff.cc \
print-utils.cc \
ptid.cc \
@@ -542,6 +544,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job-control.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netstuff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/new-op.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pathstuff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-utils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptid.Po@am__quote@
diff --git a/gdbsupport/btrace-common.h b/gdbsupport/btrace-common.h
index 967c673..490a176 100644
--- a/gdbsupport/btrace-common.h
+++ b/gdbsupport/btrace-common.h
@@ -123,6 +123,9 @@ struct btrace_config_pt
If both gdb and gdbserver support this, gdb will try to enable ptwrite
packets when tracing is started. */
bool ptwrite;
+
+ /* Event tracing setting. */
+ bool event_tracing;
};
/* A branch tracing configuration.
diff --git a/gdbsupport/gdb_signals.h b/gdbsupport/gdb_signals.h
index 7a71f0d..305290e 100644
--- a/gdbsupport/gdb_signals.h
+++ b/gdbsupport/gdb_signals.h
@@ -35,9 +35,9 @@ extern int gdb_signal_to_host_p (enum gdb_signal signo);
gdb_signal_to_host() returns 0 and prints a warning() on GDB's
console if SIGNO has no equivalent host representation. */
/* FIXME: cagney/1999-11-22: Here ``host'' is used incorrectly, it is
- refering to the target operating system's signal numbering.
+ referring to the target operating system's signal numbering.
Similarly, ``enum gdb_signal'' is named incorrectly, ``enum
- gdb_signal'' would probably be better as it is refering to GDB's
+ gdb_signal'' would probably be better as it is referring to GDB's
internal representation of a target operating system's signal. */
extern enum gdb_signal gdb_signal_from_host (int);
extern int gdb_signal_to_host (enum gdb_signal);
diff --git a/gdbsupport/intrusive_list.h b/gdbsupport/intrusive_list.h
index 2262d9f..345fd7d 100644
--- a/gdbsupport/intrusive_list.h
+++ b/gdbsupport/intrusive_list.h
@@ -27,7 +27,7 @@ template<typename T>
class intrusive_list_node
{
public:
- bool is_linked () const
+ bool is_linked () const noexcept
{
return next != INTRUSIVE_LIST_UNLINKED_VALUE;
}
@@ -56,7 +56,7 @@ private:
template<typename T>
struct intrusive_base_node
{
- static intrusive_list_node<T> *as_node (T *elem)
+ static intrusive_list_node<T> *as_node (T *elem) noexcept
{ return elem; }
};
@@ -65,7 +65,7 @@ struct intrusive_base_node
template<typename T, intrusive_list_node<T> T::*MemberNode>
struct intrusive_member_node
{
- static intrusive_list_node<T> *as_node (T *elem)
+ static intrusive_list_node<T> *as_node (T *elem) noexcept
{ return &(elem->*MemberNode); }
};
@@ -86,29 +86,29 @@ struct intrusive_list_base_iterator
using node_type = intrusive_list_node<T>;
/* Create an iterator pointing to ELEM. */
- explicit intrusive_list_base_iterator (pointer elem)
+ explicit intrusive_list_base_iterator (pointer elem) noexcept
: m_elem (elem)
{}
/* Create a past-the-end iterator. */
- intrusive_list_base_iterator ()
+ intrusive_list_base_iterator () noexcept
: m_elem (nullptr)
{}
- reference operator* () const
+ reference operator* () const noexcept
{ return *m_elem; }
- pointer operator-> () const
+ pointer operator-> () const noexcept
{ return m_elem; }
- bool operator== (const self_type &other) const
+ bool operator== (const self_type &other) const noexcept
{ return m_elem == other.m_elem; }
- bool operator!= (const self_type &other) const
+ bool operator!= (const self_type &other) const noexcept
{ return m_elem != other.m_elem; }
protected:
- static node_type *as_node (pointer elem)
+ static node_type *as_node (pointer elem) noexcept
{ return AsNode::as_node (elem); }
/* A past-end-the iterator points to the list's head. */
@@ -131,14 +131,14 @@ struct intrusive_list_iterator
using base::base;
using base::m_elem;
- self_type &operator++ ()
+ self_type &operator++ () noexcept
{
node_type *node = this->as_node (m_elem);
m_elem = node->next;
return *this;
}
- self_type operator++ (int)
+ self_type operator++ (int) noexcept
{
self_type temp = *this;
node_type *node = this->as_node (m_elem);
@@ -146,14 +146,14 @@ struct intrusive_list_iterator
return temp;
}
- self_type &operator-- ()
+ self_type &operator-- () noexcept
{
node_type *node = this->as_node (m_elem);
m_elem = node->prev;
return *this;
}
- self_type operator-- (int)
+ self_type operator-- (int) noexcept
{
self_type temp = *this;
node_type *node = this->as_node (m_elem);
@@ -178,14 +178,14 @@ struct intrusive_list_reverse_iterator
using base::m_elem;
using node_type = typename base::node_type;
- self_type &operator++ ()
+ self_type &operator++ () noexcept
{
node_type *node = this->as_node (m_elem);
m_elem = node->prev;
return *this;
}
- self_type operator++ (int)
+ self_type operator++ (int) noexcept
{
self_type temp = *this;
node_type *node = this->as_node (m_elem);
@@ -193,14 +193,14 @@ struct intrusive_list_reverse_iterator
return temp;
}
- self_type &operator-- ()
+ self_type &operator-- () noexcept
{
node_type *node = this->as_node (m_elem);
m_elem = node->next;
return *this;
}
- self_type operator-- (int)
+ self_type operator-- (int) noexcept
{
self_type temp = *this;
node_type *node = this->as_node (m_elem);
@@ -243,14 +243,14 @@ public:
= const intrusive_list_reverse_iterator<T, AsNode>;
using node_type = intrusive_list_node<T>;
- intrusive_list () = default;
+ intrusive_list () noexcept = default;
~intrusive_list ()
{
clear ();
}
- intrusive_list (intrusive_list &&other)
+ intrusive_list (intrusive_list &&other) noexcept
: m_front (other.m_front),
m_back (other.m_back)
{
@@ -258,7 +258,7 @@ public:
other.m_back = nullptr;
}
- intrusive_list &operator= (intrusive_list &&other)
+ intrusive_list &operator= (intrusive_list &&other) noexcept
{
m_front = other.m_front;
m_back = other.m_back;
@@ -268,47 +268,47 @@ public:
return *this;
}
- void swap (intrusive_list &other)
+ void swap (intrusive_list &other) noexcept
{
std::swap (m_front, other.m_front);
std::swap (m_back, other.m_back);
}
- iterator iterator_to (reference value)
+ iterator iterator_to (reference value) noexcept
{
return iterator (&value);
}
- const_iterator iterator_to (const_reference value)
+ const_iterator iterator_to (const_reference value) noexcept
{
return const_iterator (&value);
}
- reference front ()
+ reference front () noexcept
{
gdb_assert (!this->empty ());
return *m_front;
}
- const_reference front () const
+ const_reference front () const noexcept
{
gdb_assert (!this->empty ());
return *m_front;
}
- reference back ()
+ reference back () noexcept
{
gdb_assert (!this->empty ());
return *m_back;
}
- const_reference back () const
+ const_reference back () const noexcept
{
gdb_assert (!this->empty ());
return *m_back;
}
- void push_front (reference elem)
+ void push_front (reference elem) noexcept
{
intrusive_list_node<T> *elem_node = as_node (&elem);
@@ -321,7 +321,7 @@ public:
this->push_front_non_empty (elem);
}
- void push_back (reference elem)
+ void push_back (reference elem) noexcept
{
intrusive_list_node<T> *elem_node = as_node (&elem);
@@ -334,8 +334,10 @@ public:
this->push_back_non_empty (elem);
}
- /* Inserts ELEM before POS. */
- void insert (const_iterator pos, reference elem)
+ /* Inserts ELEM before POS.
+
+ Returns an iterator to the inserted element. */
+ iterator insert (const_iterator pos, reference elem) noexcept
{
if (this->empty ())
return this->push_empty (elem);
@@ -359,10 +361,12 @@ public:
prev_node->next = &elem;
elem_node->next = pos_elem;
pos_node->prev = &elem;
+
+ return this->iterator_to (elem);
}
/* Move elements from LIST at the end of the current list. */
- void splice (intrusive_list &&other)
+ void splice (intrusive_list &&other) noexcept
{
if (other.empty ())
return;
@@ -388,21 +392,21 @@ public:
other.m_back = nullptr;
}
- void pop_front ()
+ void pop_front () noexcept
{
gdb_assert (!this->empty ());
- erase_element (*m_front);
+ unlink_element (*m_front);
}
- void pop_back ()
+ void pop_back () noexcept
{
gdb_assert (!this->empty ());
- erase_element (*m_back);
+ unlink_element (*m_back);
}
private:
/* Push ELEM in the list, knowing the list is empty. */
- void push_empty (reference elem)
+ iterator push_empty (reference elem) noexcept
{
gdb_assert (this->empty ());
@@ -415,10 +419,12 @@ private:
m_back = &elem;
elem_node->prev = nullptr;
elem_node->next = nullptr;
+
+ return this->iterator_to (elem);
}
/* Push ELEM at the front of the list, knowing the list is not empty. */
- void push_front_non_empty (reference elem)
+ iterator push_front_non_empty (reference elem) noexcept
{
gdb_assert (!this->empty ());
@@ -432,10 +438,12 @@ private:
front_node->prev = &elem;
elem_node->prev = nullptr;
m_front = &elem;
+
+ return this->iterator_to (elem);
}
/* Push ELEM at the back of the list, knowing the list is not empty. */
- void push_back_non_empty (reference elem)
+ iterator push_back_non_empty (reference elem) noexcept
{
gdb_assert (!this->empty ());
@@ -449,9 +457,12 @@ private:
back_node->next = &elem;
elem_node->next = nullptr;
m_back = &elem;
+
+ return this->iterator_to (elem);
}
- void erase_element (reference elem)
+protected:
+ void unlink_element (reference elem) noexcept
{
intrusive_list_node<T> *elem_node = as_node (&elem);
@@ -489,18 +500,18 @@ private:
public:
/* Remove the element pointed by I from the list. The element
pointed by I is not destroyed. */
- iterator erase (const_iterator i)
+ iterator erase (const_iterator i) noexcept
{
iterator ret = i;
++ret;
- erase_element (*i);
+ unlink_element (*i);
return ret;
}
/* Erase all the elements. The elements are not destroyed. */
- void clear ()
+ void clear () noexcept
{
while (!this->empty ())
pop_front ();
@@ -509,7 +520,7 @@ public:
/* Erase all the elements. Disposer::operator()(pointer) is called
for each of the removed elements. */
template<typename Disposer>
- void clear_and_dispose (Disposer disposer)
+ void clear_and_dispose (Disposer disposer) noexcept
{
while (!this->empty ())
{
@@ -519,7 +530,7 @@ public:
}
}
- bool empty () const
+ bool empty () const noexcept
{
return m_front == nullptr;
}
@@ -585,7 +596,7 @@ public:
}
private:
- static node_type *as_node (pointer elem)
+ static node_type *as_node (pointer elem) noexcept
{
return AsNode::as_node (elem);
}
diff --git a/gdbsupport/offset-type.h b/gdbsupport/offset-type.h
index 256703c..b49310f 100644
--- a/gdbsupport/offset-type.h
+++ b/gdbsupport/offset-type.h
@@ -33,7 +33,7 @@
- You can compare offsets of the same type for equality and order.
You can't compare an offset with an unrelated type.
- - You can add/substract an integer to/from an offset, which gives
+ - You can add/subtract an integer to/from an offset, which gives
you back a shifted offset.
- You can subtract two offsets of the same type, which gives you
diff --git a/gdbsupport/osabi.cc b/gdbsupport/osabi.cc
new file mode 100644
index 0000000..1e41b5f
--- /dev/null
+++ b/gdbsupport/osabi.cc
@@ -0,0 +1,98 @@
+/* OS ABI variant handling for GDB and gdbserver.
+
+ Copyright (C) 2001-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 <http://www.gnu.org/licenses/>. */
+
+#include "gdbsupport/osabi.h"
+
+/* Names associated with each osabi. */
+
+struct osabi_names
+{
+ /* The "pretty" name. */
+
+ const char *pretty;
+
+ /* The triplet regexp, or NULL if not known. */
+
+ const char *regexp;
+};
+
+/* This table matches the indices assigned to enum gdb_osabi. Keep
+ them in sync. */
+static const struct osabi_names gdb_osabi_names[] =
+{
+#define GDB_OSABI_DEF_FIRST(Enum, Name, Regex) \
+ { Name, Regex },
+
+#define GDB_OSABI_DEF(Enum, Name, Regex) \
+ { Name, Regex },
+
+#define GDB_OSABI_DEF_LAST(Enum, Name, Regex) \
+ { Name, Regex }
+
+#include "gdbsupport/osabi.def"
+
+#undef GDB_OSABI_DEF_LAST
+#undef GDB_OSABI_DEF
+#undef GDB_OSABI_DEF_FIRST
+};
+
+/* See gdbsupport/osabi.h. */
+
+const char *
+gdbarch_osabi_name (enum gdb_osabi osabi)
+{
+ if (osabi >= GDB_OSABI_UNKNOWN && osabi < GDB_OSABI_INVALID)
+ return gdb_osabi_names[osabi].pretty;
+
+ return gdb_osabi_names[GDB_OSABI_INVALID].pretty;
+}
+
+/* See gdbsupport/osabi.h. */
+
+enum gdb_osabi
+osabi_from_tdesc_string (const char *name)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE (gdb_osabi_names); i++)
+ if (strcmp (name, gdb_osabi_names[i].pretty) == 0)
+ {
+ /* See note above: the name table matches the indices assigned
+ to enum gdb_osabi. */
+ enum gdb_osabi osabi = (enum gdb_osabi) i;
+
+ if (osabi == GDB_OSABI_INVALID)
+ return GDB_OSABI_UNKNOWN;
+ else
+ return osabi;
+ }
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+/* See gdbsupport/osabi.h. */
+
+const char *
+osabi_triplet_regexp (enum gdb_osabi osabi)
+{
+ if (osabi >= GDB_OSABI_UNKNOWN && osabi < GDB_OSABI_INVALID)
+ return gdb_osabi_names[osabi].regexp;
+
+ return gdb_osabi_names[GDB_OSABI_INVALID].regexp;
+}
diff --git a/gdbsupport/osabi.def b/gdbsupport/osabi.def
new file mode 100644
index 0000000..637da26
--- /dev/null
+++ b/gdbsupport/osabi.def
@@ -0,0 +1,57 @@
+/* OS ABI variant definitions for GDB and gdbserver.
+
+ Copyright (C) 2001-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 <http://www.gnu.org/licenses/>. */
+
+/* Each definition in this file is an osabi known to GDB.
+
+ The first argument is used to create the enum name and is appended
+ to 'GDB_OSABI_'.
+
+ The second argument is the osabi name. These strings can't be
+ changed _ever_ as gdbserver will emit these. Changing these
+ strings would break compatibility with already released versions of
+ GDB and/or gdbserver.
+
+ The third argument is a regexp which matches against a target
+ triplet. */
+
+GDB_OSABI_DEF_FIRST (UNKNOWN, "unknown", nullptr)
+
+GDB_OSABI_DEF (NONE, "none", nullptr)
+
+GDB_OSABI_DEF (SVR4, "SVR4", nullptr)
+GDB_OSABI_DEF (HURD, "GNU/Hurd", nullptr)
+GDB_OSABI_DEF (SOLARIS, "Solaris", nullptr)
+GDB_OSABI_DEF (LINUX, "GNU/Linux", "linux(-gnu[^-]*)?")
+GDB_OSABI_DEF (FREEBSD, "FreeBSD", nullptr)
+GDB_OSABI_DEF (NETBSD, "NetBSD", nullptr)
+GDB_OSABI_DEF (OPENBSD, "OpenBSD", nullptr)
+GDB_OSABI_DEF (WINCE, "WindowsCE", nullptr)
+GDB_OSABI_DEF (GO32, "DJGPP", nullptr)
+GDB_OSABI_DEF (CYGWIN, "Cygwin", nullptr)
+GDB_OSABI_DEF (WINDOWS, "Windows", nullptr)
+GDB_OSABI_DEF (AIX, "AIX", nullptr)
+GDB_OSABI_DEF (DICOS, "DICOS", nullptr)
+GDB_OSABI_DEF (DARWIN, "Darwin", nullptr)
+GDB_OSABI_DEF (OPENVMS, "OpenVMS", nullptr)
+GDB_OSABI_DEF (LYNXOS178, "LynxOS178", nullptr)
+GDB_OSABI_DEF (NEWLIB, "Newlib", nullptr)
+GDB_OSABI_DEF (SDE, "SDE", nullptr)
+GDB_OSABI_DEF (PIKEOS, "PikeOS", nullptr)
+
+GDB_OSABI_DEF_LAST (INVALID, "<invalid>", nullptr)
diff --git a/gdbsupport/osabi.h b/gdbsupport/osabi.h
new file mode 100644
index 0000000..6763bd8
--- /dev/null
+++ b/gdbsupport/osabi.h
@@ -0,0 +1,54 @@
+/* OS ABI variant handling for GDB and gdbserver.
+
+ Copyright (C) 2001-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 <http://www.gnu.org/licenses/>. */
+
+#ifndef OSABI_COMMON_H
+#define OSABI_COMMON_H
+
+/* List of known OS ABIs. If you change this, make sure to update the
+ table in osabi.cc. */
+enum gdb_osabi
+{
+#define GDB_OSABI_DEF_FIRST(Enum, Name, Regex) \
+ GDB_OSABI_ ## Enum = 0,
+
+#define GDB_OSABI_DEF(Enum, Name, Regex) \
+ GDB_OSABI_ ## Enum,
+
+#define GDB_OSABI_DEF_LAST(Enum, Name, Regex) \
+ GDB_OSABI_ ## Enum
+
+#include "gdbsupport/osabi.def"
+
+#undef GDB_OSABI_DEF_LAST
+#undef GDB_OSABI_DEF
+#undef GDB_OSABI_DEF_FIRST
+};
+
+/* Lookup the OS ABI corresponding to the specified target description
+ string. */
+enum gdb_osabi osabi_from_tdesc_string (const char *text);
+
+/* Return the name of the specified OS ABI. */
+const char *gdbarch_osabi_name (enum gdb_osabi);
+
+/* Return a regular expression that matches the OS part of a GNU
+ configury triplet for the given OSABI. */
+const char *osabi_triplet_regexp (enum gdb_osabi osabi);
+
+#endif /* OSABI_COMMON_H */
diff --git a/gdbsupport/owning_intrusive_list.h b/gdbsupport/owning_intrusive_list.h
new file mode 100644
index 0000000..4c72d9b
--- /dev/null
+++ b/gdbsupport/owning_intrusive_list.h
@@ -0,0 +1,168 @@
+/* Owning version of intrusive_list for GDB, the GNU debugger.
+ Copyright (C) 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 <http://www.gnu.org/licenses/>. */
+
+#ifndef GDBSUPPORT_OWNING_INTRUSIVE_LIST_H
+#define GDBSUPPORT_OWNING_INTRUSIVE_LIST_H
+
+#include "intrusive_list.h"
+
+/* An owning version of intrusive_list. */
+
+template<typename T, typename AsNode = intrusive_base_node<T>>
+class owning_intrusive_list : private intrusive_list<T, AsNode>
+{
+ using base = intrusive_list<T, AsNode>;
+
+public:
+ using value_type = typename base::value_type;
+ using reference = typename base::reference;
+ using iterator = typename base::iterator;
+ using reverse_iterator = typename base::reverse_iterator;
+ using const_iterator = typename base::const_iterator;
+ using unique_pointer = std::unique_ptr<T>;
+
+ using base::iterator_to;
+ using base::front;
+ using base::back;
+ using base::empty;
+ using base::begin;
+ using base::cbegin;
+ using base::end;
+ using base::cend;
+ using base::rbegin;
+ using base::crbegin;
+ using base::rend;
+ using base::crend;
+
+ owning_intrusive_list () noexcept = default;
+
+ owning_intrusive_list (owning_intrusive_list &&other) noexcept
+ : base (std::move (other))
+ {
+ }
+
+ ~owning_intrusive_list ()
+ { this->clear (); }
+
+ owning_intrusive_list &operator= (owning_intrusive_list &&other) noexcept
+ {
+ this->clear ();
+ this->base::operator= (std::move (other));
+ return *this;
+ }
+
+ void swap (owning_intrusive_list &other) noexcept
+ { this->base::swap (other); }
+
+ /* Insert ELEM at the front of the list.
+
+ The list takes ownership of ELEM. */
+ void push_front (unique_pointer elem) noexcept
+ { this->base::push_front (*elem.release ()); }
+
+ /* Insert ELEM at the back of the list.
+
+ The list takes ownership of ELEM. */
+ void push_back (unique_pointer elem) noexcept
+ { this->base::push_back (*elem.release ()); }
+
+ /* Insert ELEM before POS in the list.
+
+ The list takes ownership of ELEM. */
+ iterator insert (const_iterator pos, unique_pointer elem) noexcept
+ { return this->base::insert (pos, *elem.release ()); }
+
+ void splice (owning_intrusive_list &&other) noexcept
+ { this->base::splice (std::move (other)); }
+
+ /* Remove the element at the front of the list. The element is destroyed. */
+ void pop_front () noexcept
+ {
+ unique_pointer holder (&this->front ());
+ this->base::pop_front ();
+ }
+
+ /* Remove the element at the back of the list. The element is destroyed. */
+ void pop_back () noexcept
+ {
+ unique_pointer holder (&this->back ());
+ this->base::pop_back ();
+ }
+
+ /* Remove the element pointed by I from the list. The element
+ pointed by I is destroyed. */
+ iterator erase (const_iterator i) noexcept
+ {
+ unique_pointer holder (&*i);
+ return this->base::erase (i);
+ }
+
+ /* Remove all elements from the list. All elements are destroyed. */
+ void clear () noexcept
+ {
+ while (!this->empty ())
+ this->pop_front ();
+ }
+
+ /* Construct an element in-place at the front of the list.
+
+ Return a reference to the new element. */
+ template<typename... Args>
+ reference emplace_front (Args &&...args)
+ { return this->emplace (this->begin (), std::forward<Args> (args)...); }
+
+ /* Construct an element in-place at the back of the list.
+
+ Return a reference to the new element. */
+ template<typename... Args>
+ reference emplace_back (Args &&...args)
+ { return this->emplace (this->end (), std::forward<Args> (args)...); }
+
+ /* Construct an element in-place in the list, before POS.
+
+ Return a reference to the new element. */
+ template<typename... Args>
+ reference emplace (const_iterator pos, Args &&...args)
+ {
+ return *this->insert (pos,
+ std::make_unique<T> (std::forward<Args> (args)...));
+ }
+
+ /* Return type for the release method. */
+ struct release_ret
+ {
+ /* Iterator to the following element in the list. */
+ iterator next;
+
+ /* The released element. */
+ unique_pointer released;
+ };
+
+ release_ret release (const_iterator i) noexcept
+ {
+ iterator next = i;
+ ++next;
+ unique_pointer released (&*i);
+
+ this->unlink_element (*i);
+
+ return { next, std::move (released) };
+ }
+};
+
+#endif /* GDBSUPPORT_OWNING_INTRUSIVE_LIST_H */
diff --git a/gdbsupport/scope-exit.h b/gdbsupport/scope-exit.h
index 86b2969..2871a59 100644
--- a/gdbsupport/scope-exit.h
+++ b/gdbsupport/scope-exit.h
@@ -109,6 +109,9 @@ public:
/* "If the initialization of exit_function throws an exception,
calls f()." */
f ();
+ /* "throws: Nothing, unless the initialization of exit_function
+ throws." */
+ throw;
}
template<typename EFP,
diff --git a/gdbsupport/tdesc.h b/gdbsupport/tdesc.h
index fa9431b..c9e7603 100644
--- a/gdbsupport/tdesc.h
+++ b/gdbsupport/tdesc.h
@@ -18,6 +18,8 @@
#ifndef COMMON_TDESC_H
#define COMMON_TDESC_H
+#include "gdbsupport/osabi.h"
+
struct tdesc_feature;
struct tdesc_type;
struct tdesc_type_builtin;
@@ -338,8 +340,8 @@ void set_tdesc_architecture (target_desc *target_desc,
or NULL if no architecture was specified. */
const char *tdesc_architecture_name (const struct target_desc *target_desc);
-/* Set TARGET_DESC's osabi by NAME. */
-void set_tdesc_osabi (target_desc *target_desc, const char *name);
+/* Set TARGET_DESC's osabi to OSABI. */
+void set_tdesc_osabi (target_desc *target_desc, enum gdb_osabi osabi);
/* Return the osabi associated with this target description as a string,
or NULL if no osabi was specified. */
diff --git a/gdbsupport/x86-xstate.h b/gdbsupport/x86-xstate.h
index 11b3754..b9a9b6c 100644
--- a/gdbsupport/x86-xstate.h
+++ b/gdbsupport/x86-xstate.h
@@ -24,8 +24,6 @@
#define X86_XSTATE_X87_ID 0
#define X86_XSTATE_SSE_ID 1
#define X86_XSTATE_AVX_ID 2
-#define X86_XSTATE_BNDREGS_ID 3
-#define X86_XSTATE_BNDCFG_ID 4
#define X86_XSTATE_K_ID 5
#define X86_XSTATE_ZMM_H_ID 6
#define X86_XSTATE_ZMM_ID 7
@@ -35,9 +33,6 @@
#define X86_XSTATE_X87 (1ULL << X86_XSTATE_X87_ID)
#define X86_XSTATE_SSE (1ULL << X86_XSTATE_SSE_ID)
#define X86_XSTATE_AVX (1ULL << X86_XSTATE_AVX_ID)
-#define X86_XSTATE_BNDREGS (1ULL << X86_XSTATE_BNDREGS_ID)
-#define X86_XSTATE_BNDCFG (1ULL << X86_XSTATE_BNDCFG_ID)
-#define X86_XSTATE_MPX (X86_XSTATE_BNDREGS | X86_XSTATE_BNDCFG)
/* AVX 512 adds three feature bits. All three must be enabled. */
#define X86_XSTATE_K (1ULL << X86_XSTATE_K_ID)
@@ -56,8 +51,6 @@ struct x86_xsave_layout
{
int sizeof_xsave = 0;
int avx_offset = 0;
- int bndregs_offset = 0;
- int bndcfg_offset = 0;
int k_offset = 0;
int zmm_h_offset = 0;
int zmm_offset = 0;
@@ -69,8 +62,6 @@ constexpr bool operator== (const x86_xsave_layout &lhs,
{
return lhs.sizeof_xsave == rhs.sizeof_xsave
&& lhs.avx_offset == rhs.avx_offset
- && lhs.bndregs_offset == rhs.bndregs_offset
- && lhs.bndcfg_offset == rhs.bndcfg_offset
&& lhs.k_offset == rhs.k_offset
&& lhs.zmm_h_offset == rhs.zmm_h_offset
&& lhs.zmm_offset == rhs.zmm_offset
@@ -88,21 +79,17 @@ constexpr bool operator!= (const x86_xsave_layout &lhs,
#define X86_XSTATE_X87_MASK X86_XSTATE_X87
#define X86_XSTATE_SSE_MASK (X86_XSTATE_X87 | X86_XSTATE_SSE)
#define X86_XSTATE_AVX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_AVX)
-#define X86_XSTATE_MPX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_MPX)
-#define X86_XSTATE_AVX_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
#define X86_XSTATE_AVX_AVX512_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_AVX512)
-#define X86_XSTATE_AVX_MPX_AVX512_PKU_MASK (X86_XSTATE_AVX_MPX_MASK\
+#define X86_XSTATE_AVX_AVX512_PKU_MASK (X86_XSTATE_AVX_MASK\
| X86_XSTATE_AVX512 | X86_XSTATE_PKRU)
-#define X86_XSTATE_ALL_MASK (X86_XSTATE_AVX_MPX_AVX512_PKU_MASK)
+#define X86_XSTATE_ALL_MASK (X86_XSTATE_AVX_AVX512_PKU_MASK)
#define X86_XSTATE_SSE_SIZE 576
#define X86_XSTATE_AVX_SIZE 832
-/* In case one of the MPX XCR0 bits is set we consider we have MPX. */
-#define HAS_MPX(XCR0) (((XCR0) & X86_XSTATE_MPX) != 0)
#define HAS_AVX(XCR0) (((XCR0) & X86_XSTATE_AVX) != 0)
#define HAS_AVX512(XCR0) (((XCR0) & X86_XSTATE_AVX512) != 0)
#define HAS_PKRU(XCR0) (((XCR0) & X86_XSTATE_PKRU) != 0)
diff --git a/gprof/po/pt_BR.po b/gprof/po/pt_BR.po
index 6735cb8..b3e9ad2 100644
--- a/gprof/po/pt_BR.po
+++ b/gprof/po/pt_BR.po
@@ -1,22 +1,23 @@
# Brazilian Portuguese translation for gprof
-# Copyright (C) 2020 Free Software Foundation, Inc.
+# Copyright (C) 2024 Free Software Foundation, Inc.
# This file is distributed under the same license as the binutils package.
# Alexandre Folle de Menezes <afmenez@terra.com.br>, 2002.
-# Rafael Fontenelle <rafaelff@gnome.org>, 2013-2020.
+# Rafael Fontenelle <rafaelff@gnome.org>, 2013-2024.
+#
msgid ""
msgstr ""
-"Project-Id-Version: gprof 2.33.90\n"
-"Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
-"POT-Creation-Date: 2020-01-18 14:04+0000\n"
-"PO-Revision-Date: 2020-01-19 22:46-0300\n"
+"Project-Id-Version: gprof 2.41.90\n"
+"Report-Msgid-Bugs-To: https://sourceware.org/bugzilla/\n"
+"POT-Creation-Date: 2024-01-15 14:58+0000\n"
+"PO-Revision-Date: 2024-09-23 13:18-0300\n"
"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge.net>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Virtaal 1.0.0-beta1\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"X-Generator: Gtranslator 46.1\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
#: alpha.c:102 mips.c:54
@@ -28,12 +29,12 @@ msgstr "<filho indireto>"
msgid "[find_call] %s: 0x%lx to 0x%lx\n"
msgstr "[find_call] %s: 0x%lx até 0x%lx\n"
-#: alpha.c:129
+#: alpha.c:131
#, c-format
msgid "[find_call] 0x%lx: jsr%s <indirect_child>\n"
msgstr "[find_call] 0x%lx: jsr%s <filho_indireto>\n"
-#: alpha.c:139
+#: alpha.c:141
#, c-format
msgid "[find_call] 0x%lx: bsr"
msgstr "[find_call] 0x%lx: bsr"
@@ -58,7 +59,7 @@ msgstr "%s:%d: (%s:0x%lx) %lu execuções\n"
msgid "<unknown>"
msgstr "<desconhecido>"
-#: basic_blocks.c:543
+#: basic_blocks.c:539
#, c-format
msgid ""
"\n"
@@ -75,7 +76,7 @@ msgstr ""
" Linha Contador\n"
"\n"
-#: basic_blocks.c:567
+#: basic_blocks.c:563
#, c-format
msgid ""
"\n"
@@ -86,22 +87,22 @@ msgstr ""
"Resumo da execução:\n"
"\n"
-#: basic_blocks.c:568
+#: basic_blocks.c:564
#, c-format
msgid "%9ld Executable lines in this file\n"
msgstr "%9ld Linhas executáveis neste arquivo\n"
-#: basic_blocks.c:570
+#: basic_blocks.c:566
#, c-format
msgid "%9ld Lines executed\n"
msgstr "%9ld Linhas executadas\n"
-#: basic_blocks.c:571
+#: basic_blocks.c:567
#, c-format
msgid "%9.2f Percent of the file executed\n"
msgstr "%9.2f Percentagem executada do arquivo\n"
-#: basic_blocks.c:575
+#: basic_blocks.c:571
#, c-format
msgid ""
"\n"
@@ -110,7 +111,7 @@ msgstr ""
"\n"
"%9lu Número total de execuções de linha\n"
-#: basic_blocks.c:577
+#: basic_blocks.c:573
#, c-format
msgid "%9.2f Average executions per line\n"
msgstr "%9.2f Média de execuções por linha\n"
@@ -241,7 +242,7 @@ msgstr "<ciclo %d>"
msgid "%s: unable to parse mapping file %s.\n"
msgstr "%s: não foi possível analisar o arquivo de mapeamento %s.\n"
-#: corefile.c:89 corefile.c:523
+#: corefile.c:89 corefile.c:524
#, c-format
msgid "%s: could not open %s.\n"
msgstr "%s: não foi possível abrir %s.\n"
@@ -271,107 +272,107 @@ msgstr "%s: impossível fazer -c\n"
msgid "%s: -c not supported on architecture %s\n"
msgstr "%s: -c não tem suporte na arquitetura %s\n"
-#: corefile.c:532 corefile.c:637
+#: corefile.c:533 corefile.c:640
#, c-format
msgid "%s: file `%s' has no symbols\n"
msgstr "%s: o arquivo \"%s\" não tem sí­mbolos\n"
-#: corefile.c:537
+#: corefile.c:538
#, c-format
msgid "%s: file `%s' has too many symbols\n"
msgstr "%s: o arquivo \"%s\" símbolos demais\n"
-#: corefile.c:904
+#: corefile.c:907
#, c-format
msgid "%s: somebody miscounted: ltab.len=%d instead of %ld\n"
msgstr "%s: alguém contou mal: ltab.len=%d em lugar de %ld\n"
-#: gmon_io.c:83
+#: gmon_io.c:81
#, c-format
msgid "%s: address size has unexpected value of %u\n"
msgstr "%s: tamanho do endereço tem valor inesperado de %u\n"
-#: gmon_io.c:318 gmon_io.c:414
+#: gmon_io.c:298 gmon_io.c:394
#, c-format
msgid "%s: file too short to be a gmon file\n"
msgstr "%s: o arquivo é muito pequeno para ser um arquivo gmon\n"
-#: gmon_io.c:328 gmon_io.c:457
+#: gmon_io.c:308 gmon_io.c:437
#, c-format
msgid "%s: file `%s' has bad magic cookie\n"
msgstr "%s: o arquivo \"%s\" tem um magic cookie inválido\n"
-#: gmon_io.c:339
+#: gmon_io.c:319
#, c-format
msgid "%s: file `%s' has unsupported version %d\n"
msgstr "%s: o arquivo \"%s\" tem a versão sem suporte %d\n"
-#: gmon_io.c:369
+#: gmon_io.c:349
#, c-format
msgid "%s: %s: found bad tag %d (file corrupted?)\n"
msgstr "%s: %s: marca %d inválida encontrada (arquivo corrompido?)\n"
-#: gmon_io.c:436
+#: gmon_io.c:416
#, c-format
msgid "%s: profiling rate incompatible with first gmon file\n"
msgstr "%s: taxa de análises de perfil incompatível com o primeiro arquivo gmon\n"
-#: gmon_io.c:487
+#: gmon_io.c:467
#, c-format
msgid "%s: incompatible with first gmon file\n"
msgstr "%s: incompatível com o primeiro arquivo gmon\n"
-#: gmon_io.c:517
+#: gmon_io.c:497
#, c-format
msgid "%s: file '%s' does not appear to be in gmon.out format\n"
msgstr "%s: o arquivo \"%s\" não parece estar no formato gmon.out\n"
-#: gmon_io.c:530
+#: gmon_io.c:510
#, c-format
msgid "%s: unexpected EOF after reading %d/%d bins\n"
msgstr "%s: final de arquivo inesperado depois de ler %d/%d binários\n"
-#: gmon_io.c:562
+#: gmon_io.c:542
#, c-format
msgid "time is in ticks, not seconds\n"
msgstr "o tempo está em tiques, não em segundos\n"
-#: gmon_io.c:568 gmon_io.c:748
+#: gmon_io.c:548 gmon_io.c:728
#, c-format
msgid "%s: don't know how to deal with file format %d\n"
msgstr "%s: não sei como lidar com o arquivo de formato %d\n"
-#: gmon_io.c:578
+#: gmon_io.c:558
#, c-format
msgid "File `%s' (version %d) contains:\n"
msgstr "O arquivo \"%s\" (versão %d) contém:\n"
-#: gmon_io.c:581
+#: gmon_io.c:561
#, c-format
msgid "\t%d histogram record\n"
msgstr "\t%d registro de histograma\n"
-#: gmon_io.c:582
+#: gmon_io.c:562
#, c-format
msgid "\t%d histogram records\n"
msgstr "\t%d registros de histogramas\n"
-#: gmon_io.c:584
+#: gmon_io.c:564
#, c-format
msgid "\t%d call-graph record\n"
msgstr "\t%d registro de gráfico de chamadas\n"
-#: gmon_io.c:585
+#: gmon_io.c:565
#, c-format
msgid "\t%d call-graph records\n"
msgstr "\t%d registros de gráficos de chamadas\n"
-#: gmon_io.c:587
+#: gmon_io.c:567
#, c-format
msgid "\t%d basic-block count record\n"
msgstr "\t%d registro de contagem de blocos básicos\n"
-#: gmon_io.c:588
+#: gmon_io.c:568
#, c-format
msgid "\t%d basic-block count records\n"
msgstr "\t%d registros de contagens de blocos básicos\n"
@@ -379,7 +380,7 @@ msgstr "\t%d registros de contagens de blocos básicos\n"
#: gprof.c:162
#, c-format
msgid ""
-"Usage: %s [-[abcDhilLrsTvwxyz]] [-[ACeEfFJnNOpPqQRStZ][name]] [-I dirs]\n"
+"Usage: %s [-[abcDhilLrsTvwxyz]] [-[ABCeEfFJnNOpPqQRStZ][name]] [-I dirs]\n"
"\t[-d[num]] [-k from/to] [-m min-count] [-t table-length]\n"
"\t[--[no-]annotated-source[=name]] [--[no-]exec-counts[=name]]\n"
"\t[--[no-]flat-profile[=name]] [--[no-]graph[=name]]\n"
@@ -393,8 +394,8 @@ msgid ""
"\t[--demangle[=STYLE]] [--no-demangle] [--external-symbol-table=name] [@FILE]\n"
"\t[image-file] [profile-file...]\n"
msgstr ""
-"Uso: %s [-[abcDhilLrsTvwxyz]] [-[ACeEfFJnNOpPqQRStZ][nome]] [-I dirs]\n"
-"\t[-d[num]] [-k de/a] [-m contagem-mín] [-t tamanho-tabela]\n"
+"Uso: %s [-[abcDhilLrsTvwxyz]] [-[ABCeEfFJnNOpPqQRStZ][nome]] [-I dirs]\n"
+"\t[-d[num]] [-k de/para] [-m contagem-mín] [-t tamanho-tabela]\n"
"\t[--[no-]annotated-source[=nome]] [--[no-]exec-counts[=nome]]\n"
"\t[--[no-]flat-profile[=nome]] [--[no-]graph[=nome]]\n"
"\t[--[no-]time=nome] [--all-lines] [--brief] [--debug[=nível]]\n"
@@ -402,7 +403,7 @@ msgstr ""
"\t[--directory-path=dirs] [--display-unused-functions]\n"
"\t[--file-format=nome] [--file-info] [--help] [--line] [--min-count=n]\n"
"\t[--no-static] [--print-path] [--separate-files]\n"
-"\t[--static-call-graph] [--sum] [--table-length=long] [--traditional]\n"
+"\t[--static-call-graph] [--sum] [--table-length=tam] [--traditional]\n"
"\t[--version] [--width=n] [--ignore-non-functions]\n"
"\t[--demangle[=ESTILO]] [--no-demangle] [--external-symbol-table=nome] [@ARQ]\n"
"\t[arquivo-imagem] [arquivo-perfil...]\n"
@@ -414,53 +415,53 @@ msgstr ""
"Relate erros para %s\n"
"Relate erros de tradução para <https://translationproject.org/team/pt_BR.html>\n"
-#: gprof.c:254
+#: gprof.c:252
#, c-format
msgid "%s: debugging not supported; -d ignored\n"
msgstr "%s: não há suporte para depuração; -d ignorado\n"
-#: gprof.c:340
+#: gprof.c:338
#, c-format
msgid "%s: unknown file format %s\n"
msgstr "%s: formato de arquivo %s desconhecido\n"
#. This output is intended to follow the GNU standards document.
-#: gprof.c:428
+#: gprof.c:426
#, c-format
msgid "GNU gprof %s\n"
msgstr "GNU gprof %s\n"
-#: gprof.c:429
+#: gprof.c:427
#, c-format
msgid "Based on BSD gprof, copyright 1983 Regents of the University of California.\n"
msgstr "Baseado no BSD gprof, copyright 1983 Regents of the University of California.\n"
-#: gprof.c:430
+#: gprof.c:428
#, c-format
msgid "This program is free software. This program has absolutely no warranty.\n"
msgstr "Este programa é software livre. Este programa tem absolutamente nenhuma garantia.\n"
-#: gprof.c:471
+#: gprof.c:469
#, c-format
msgid "%s: unknown demangling style `%s'\n"
msgstr "%s: estilo de desembaralhamento desconhecido \"%s\"\n"
-#: gprof.c:494
+#: gprof.c:492
#, c-format
msgid "%s: Only one of --function-ordering and --file-ordering may be specified.\n"
msgstr "%s: Apenas um de --function-ordering e --file-ordering pode ser especificado.\n"
-#: gprof.c:546
+#: gprof.c:544
#, c-format
msgid "%s: sorry, file format `prof' is not yet supported\n"
msgstr "%s: sinto muito, mas não há suporte ao formato de arquivo \"prof\"\n"
-#: gprof.c:600
+#: gprof.c:598
#, c-format
msgid "%s: gmon.out file is missing histogram\n"
msgstr "%s: falta o histograma do arquivo gmon.out\n"
-#: gprof.c:607
+#: gprof.c:605
#, c-format
msgid "%s: gmon.out file is missing call-graph data\n"
msgstr "%s: faltam os dados do gráfico de chamadas do arquivo gmon.out\n"
@@ -577,27 +578,27 @@ msgstr "Perfil plano:\n"
msgid "%s: found a symbol that covers several histogram records"
msgstr "%s: encontrado um sí­mbolo que cobre vários registros de histogramas"
-#: mips.c:71
+#: mips.c:73
#, c-format
msgid "[find_call] 0x%lx: jal"
msgstr "[find_call] 0x%lx: jal"
-#: mips.c:99
+#: mips.c:101
#, c-format
msgid "[find_call] 0x%lx: jalr\n"
msgstr "[find_call] 0x%lx: jalr\n"
-#: source.c:162
+#: source.c:166
#, c-format
msgid "%s: could not locate `%s'\n"
msgstr "%s: não foi possível encontrar \"%s\"\n"
-#: source.c:237
+#: source.c:244
#, c-format
msgid "*** File %s:\n"
msgstr "*** Arquivo %s:\n"
-#: utils.c:106
+#: utils.c:105
#, c-format
msgid " <cycle %d>"
msgstr " <ciclo %d>"
diff --git a/gprofng/common/hwc_cpus.h b/gprofng/common/hwc_cpus.h
index d2253e9..3d22d92 100644
--- a/gprofng/common/hwc_cpus.h
+++ b/gprofng/common/hwc_cpus.h
@@ -131,6 +131,8 @@ extern cpu_info_t *read_cpuinfo();
// Arm
#define CPC_ARM_GENERIC 3500
#define CPC_ARM64_AMCC 3501 /* Applied Micro Circuits Corporation (ARM) */
+#define CPC_ARM_NEOVERSE_N1 3502
+#define CPC_ARM_AMPERE_1 3503
#define AMD_FAM_19H_ZEN3_NAME "AMD Family 19h (Zen3)"
#define AMD_FAM_19H_ZEN4_NAME "AMD Family 19h (Zen4)"
diff --git a/gprofng/common/hwctable.c b/gprofng/common/hwctable.c
index 8909153..b2b4a99 100644
--- a/gprofng/common/hwctable.c
+++ b/gprofng/common/hwctable.c
@@ -1309,6 +1309,8 @@ static Hwcentry generic_list[] = {
#include "hwc_intel_icelake.h"
#elif defined(__aarch64__)
#include "hwc_arm64_amcc.h"
+ #include "hwc_arm_neoverse_n1.h"
+ #include "hwc_arm_ampere_1.h"
#endif
/* structure defining the counters for a CPU type */
@@ -1364,6 +1366,8 @@ static cpu_list_t cputabs[] = {
{CPC_AMD_FAM_19H_ZEN4, amd_zen4_list, {"insts,,cycles", 0}},
#elif defined(__aarch64__)
{CPC_ARM64_AMCC, arm64_amcc_list, {"insts,,cycles", 0}},
+ {CPC_ARM_NEOVERSE_N1, arm_neoverse_n1_list, {"insts,,cycles", 0}},
+ {CPC_ARM_AMPERE_1, arm_ampere_1_list, {"insts,,cycles", 0}},
{CPC_ARM_GENERIC, generic_list, {"insts,,cycles", 0}},
#endif
{0, generic_list, {"insts,,cycles", 0}},
@@ -1869,6 +1873,10 @@ setup_cpc_general (int skip_hwc_test)
{
if (cpu_p->cpu_family == 0x50)
cpcx_cpuver = CPC_ARM64_AMCC;
+ else if (cpu_p->cpu_family == 0x41)
+ cpcx_cpuver = CPC_ARM_NEOVERSE_N1;
+ else if (cpu_p->cpu_family == 0xc0)
+ cpcx_cpuver = CPC_ARM_AMPERE_1;
else
cpcx_cpuver = CPC_ARM_GENERIC;
}
diff --git a/gprofng/doc/Makefile.am b/gprofng/doc/Makefile.am
index 7c88e14..83e6006 100644
--- a/gprofng/doc/Makefile.am
+++ b/gprofng/doc/Makefile.am
@@ -59,3 +59,12 @@ MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
EXTRA_DIST = $(man_MANS) version.texi
info: $(man_MANS)
+
+examples.tar.gz:
+ $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
+
+install-examples: examples.tar.gz
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
+ $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng
+
+install-am: install-examples
diff --git a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in
index 9b9f81c..98aa105 100644
--- a/gprofng/doc/Makefile.in
+++ b/gprofng/doc/Makefile.in
@@ -667,9 +667,6 @@ install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
@@ -893,6 +890,15 @@ gprofng-display-text.1: $(srcdir)/gprofng-display-text.texi
info: $(man_MANS)
+examples.tar.gz:
+ $(AM_V_at)( tar czf $@ $(srcdir)/../examples )
+
+install-examples: examples.tar.gz
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng
+ $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng
+
+install-am: install-examples
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/gprofng/gp-display-html/gp-display-html.in b/gprofng/gp-display-html/gp-display-html.in
index 306c99a..8894449 100644
--- a/gprofng/gp-display-html/gp-display-html.in
+++ b/gprofng/gp-display-html/gp-display-html.in
@@ -197,7 +197,7 @@ my $thresh = 0;
$driver_cmd = "gprofng display html";
$tool_name = "gp-display-html";
#$binutils_version = "2.38.50";
-$binutils_version = "BINUTILS_VERSION";
+$binutils_version = "2.43.0";
$version_info = $tool_name . " GNU binutils version " . $binutils_version;
#------------------------------------------------------------------------------
@@ -908,7 +908,8 @@ sub main
#------------------------------------------------------------------------------
$outputdir = append_forward_slash ($outputdir);
- gp_message ("debug", $subr_name, "prepared outputdir = $outputdir");
+ $msg = "prepared outputdir = ". $outputdir;
+ gp_message ("debug", $subr_name, $msg);
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
@@ -921,6 +922,13 @@ sub main
$detail_metrics_system = 'e.totalcpu:e.system';
$call_metrics = 'a.totalcpu';
+ $msg = "set detail_metrics_system = " . $detail_metrics_system;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "set detail_metrics = " . $detail_metrics;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "set call_metrics = " . $call_metrics;
+ gp_message ("debug", $subr_name, $msg);
+
my $cmd_options;
my $metrics_cmd;
@@ -1029,15 +1037,15 @@ sub main
$number_of_metrics = split (":", $summary_metrics);
$msg = "summary_metrics = " . $summary_metrics;
- gp_message ("debugXL", $subr_name, $msg);
+ gp_message ("debugM", $subr_name, $msg);
$msg = "detail_metrics = " . $detail_metrics;
- gp_message ("debugXL", $subr_name, $msg);
+ gp_message ("debugM", $subr_name, $msg);
$msg = "detail_metrics_system = " . $detail_metrics_system;
- gp_message ("debugXL", $subr_name, $msg);
+ gp_message ("debugM", $subr_name, $msg);
$msg = "call_metrics = " . $call_metrics;
- gp_message ("debugXL", $subr_name, $msg);
+ gp_message ("debugM", $subr_name, $msg);
$msg = "number_of_metrics = " . $number_of_metrics;
- gp_message ("debugXL", $subr_name, $msg);
+ gp_message ("debugM", $subr_name, $msg);
#------------------------------------------------------------------------------
# TBD Find a way to better handle this situation:
@@ -1488,6 +1496,9 @@ sub check_and_define_cmds
{
$target_cmd = "(command -v $cmd; echo \$\?)";
+ $msg = "check target_cmd = " . $target_cmd;
+ gp_message ("debug", $subr_name, $msg);
+
($error_code, $output_cmd) = execute_system_cmd ($target_cmd);
if ($error_code != 0)
@@ -4098,8 +4109,7 @@ sub extract_info_from_map_xml
} #-- End of subroutine extract_info_from_map_xml
#------------------------------------------------------------------------------
-# This routine analyzes the metric line and extracts the metric specifics
-# from it.
+# This routine analyzes the metric line and extracts the metric details.
# Example input: Exclusive Total CPU Time: e.%totalcpu
#------------------------------------------------------------------------------
sub extract_metric_specifics
@@ -4113,11 +4123,13 @@ sub extract_metric_specifics
my $metric_visibility;
my $metric_name;
my $metric_spec;
+ my $msg;
# Ruud if (($metric =~ /\s*(.*):\s+(\S)((\.\S+)|(\+\S+))/) && !($metric =~/^Current/)){
if (($metric_line =~ /\s*(.+):\s+([ei])([\.\+%]+)(\S*)/) and !($metric_line =~/^Current/))
{
- gp_message ("debug", $subr_name, "line of interest: $metric_line");
+ $msg = "input line = " . $metric_line;
+ gp_message ("debug", $subr_name, $msg);
$metric_description = $1;
$metric_flavor = $2;
@@ -4153,6 +4165,17 @@ sub extract_metric_specifics
# $metric_spec =~ s/\%//;
# print "DB: after \$metric_spec = $metric_spec\n";
+ $msg = "on return: metric_spec = " . $metric_spec;
+ gp_message ("debugM", $subr_name, $msg);
+ $msg = "on return: metric_flavor = " . $metric_flavor;
+ gp_message ("debugM", $subr_name, $msg);
+ $msg = "on return: metric_visibility = " . $metric_visibility;
+ gp_message ("debugM", $subr_name, $msg);
+ $msg = "on return: metric_name = " . $metric_name;
+ gp_message ("debugM", $subr_name, $msg);
+ $msg = "on return: metric_description = " . $metric_description;
+ gp_message ("debugM", $subr_name, $msg);
+
return ($metric_spec, $metric_flavor, $metric_visibility,
$metric_name, $metric_description);
}
@@ -4402,7 +4425,7 @@ sub extract_option_value
$msg .= " in a future update";
gp_message ("warning", $subr_name, $msg);
- $msg = "please check the man page of gp-display-html";
+ $msg = "please check the gprofng-display-html man page";
$msg .= " for more details";
gp_message ("warning", $subr_name, $msg);
$g_total_warning_count++;
@@ -7034,7 +7057,19 @@ sub generate_function_level_info
#------------------------------------------------------------------------------
print SCRIPT_PC "# outfile $outputdir"."gp-metrics-calls-PC\n";
print SCRIPT_PC "outfile $outputdir"."gp-metrics-calls-PC\n";
- $script_pc_metrics = "address:$call_metrics";
+#------------------------------------------------------------------------------
+# TBD: fix the situation that call_metrics is empty.
+#------------------------------------------------------------------------------
+ if ($call_metrics ne "")
+ {
+ $script_pc_metrics = "address:$call_metrics";
+ }
+ else
+ {
+ $script_pc_metrics = "address";
+ $msg = "warning: call_metrics is empty - only address field printed";
+ gp_message ("debug", $subr_name, $msg);
+ }
print SCRIPT_PC "# metrics $script_pc_metrics\n";
print SCRIPT_PC "metrics $script_pc_metrics\n";
@@ -9106,6 +9141,7 @@ sub get_hot_functions
my $expr_name;
my $first_metric;
my $gp_display_text_cmd;
+ my $msg;
my $ignore_value;
my @sort_fields = ();
@@ -9123,6 +9159,15 @@ sub get_hot_functions
@sort_fields = split (":", $summary_metrics);
+#-- RUUD
+
+ $msg = "summary_metrics = " . $summary_metrics;
+ gp_message ("debug", $subr_name, $msg);
+ for my $field (@sort_fields)
+ {
+ $msg = "metric field = " . $field;
+ gp_message ("debug", $subr_name, $msg);
+ }
#------------------------------------------------------------------------------
# This is extremely unlikely to happen, but if so, it is a fatal error.
#------------------------------------------------------------------------------
@@ -10469,7 +10514,7 @@ sub msg_display_text_failure
} #-- End of subroutine msg_display_text_failure
#------------------------------------------------------------------------------
-# TBD.
+# TBD. Still needed? I think this entire function and usage can be removed.
#------------------------------------------------------------------------------
sub name_regex
{
@@ -10479,16 +10524,21 @@ sub name_regex
my %metric_description = %{ $metric_description_ref };
+ my $msg;
+
my @splitted_metrics;
my $splitted_metrics;
my $m;
my $mf;
my $nf;
- my $re;
+ my $re = "This value should never show up anywhere";
my $Xre;
- my $noPCfile;
+#------------------------------------------------------------------------------
+# Make sure to check for these to have a value.
+#------------------------------------------------------------------------------
+ my $noPCfile = undef;
+ my $reported_metrics = undef;
my @reported_metrics;
- my $reported_metrics;
my $hdr_regex;
my $hdr_href_regex;
my $hdr_src_regex;
@@ -10606,152 +10656,174 @@ sub name_regex
#
# TBD: This should be done only once!
#------------------------------------------------------------------------------
- @reported_metrics = split (":", $reported_metrics);
- for my $i (@reported_metrics)
+ if (not defined($reported_metrics))
{
- gp_message ("debugXL", $subr_name, "reported_metrics = $i");
+ $msg = "reported_metrics is not defined";
+ gp_message ("debug", $subr_name, $msg);
}
-
- $hdr_regex = "^\\s*";
- $hdr_href_regex = "^\\s*";
- $hdr_src_regex = "^(\\s+|<i>\\s+)";
-
- for my $m (@reported_metrics)
+ else
{
+ $msg = "reported_metrics = " . $reported_metrics;
+ gp_message ("debug", $subr_name, $msg);
- my $description = ${ retrieve_metric_description (\$m, \%metric_description) };
- gp_message ("debugXL", $subr_name, "m = $m description = $description");
- if (substr ($m,0,1) eq "e")
+ @reported_metrics = split (":", $reported_metrics);
+ for my $i (@reported_metrics)
{
- push (@moo,"$m:$description\n");
- $hdr_regex .= "(Excl\\.\.*)";
- $hdr_href_regex .= "(<a.*>)(Excl\\.)(<\/a>)([^<]+)";
- $hdr_src_regex .= "(Excl\\.\.*)";
- next;
- }
- if (substr ($m,0,1) eq "i")
- {
- push (@moo,"$m:$description\n");
- $hdr_regex .= "(Incl\\.\.*)";
- $hdr_href_regex .= "(<a.*>)(Incl\\.)(<\/a>)([^<]+)";
- $hdr_src_regex .= "(Incl\\.\.*)";
- next;
+ gp_message ("debugXL", $subr_name, "reported_metrics = $i");
}
- if (substr ($m,0,1) eq "a")
+
+ $hdr_regex = "^\\s*";
+ $hdr_href_regex = "^\\s*";
+ $hdr_src_regex = "^(\\s+|<i>\\s+)";
+
+ for my $m (@reported_metrics)
{
- my $a;
- my $am;
- $a = $m;
- $a =~ s/^a/e/;
- $am = ${ retrieve_metric_description (\$a, \%metric_description) };
- $am =~ s/Exclusive/Attributed/;
- push (@moo,"$m:$am\n");
- $hdr_regex .= "(Attr\\.\.*)";
- $hdr_href_regex .= "(<a.*>)(Attr\\.)(<\/a>)([^<]+)";
- $hdr_src_regex .= "(Attr\\.\.*)";next;
+
+ my $description = ${ retrieve_metric_description (\$m, \%metric_description) };
+ gp_message ("debugXL", $subr_name, "m = $m description = $description");
+ if (substr ($m,0,1) eq "e")
+ {
+ push (@moo,"$m:$description\n");
+ $hdr_regex .= "(Excl\\.\.*)";
+ $hdr_href_regex .= "(<a.*>)(Excl\\.)(<\/a>)([^<]+)";
+ $hdr_src_regex .= "(Excl\\.\.*)";
+ next;
+ }
+ if (substr ($m,0,1) eq "i")
+ {
+ push (@moo,"$m:$description\n");
+ $hdr_regex .= "(Incl\\.\.*)";
+ $hdr_href_regex .= "(<a.*>)(Incl\\.)(<\/a>)([^<]+)";
+ $hdr_src_regex .= "(Incl\\.\.*)";
+ next;
+ }
+ if (substr ($m,0,1) eq "a")
+ {
+ my $a;
+ my $am;
+ $a = $m;
+ $a =~ s/^a/e/;
+ $am = ${ retrieve_metric_description (\$a, \%metric_description) };
+ $am =~ s/Exclusive/Attributed/;
+ push (@moo,"$m:$am\n");
+ $hdr_regex .= "(Attr\\.\.*)";
+ $hdr_href_regex .= "(<a.*>)(Attr\\.)(<\/a>)([^<]+)";
+ $hdr_src_regex .= "(Attr\\.\.*)";next;
+ }
}
}
+
+ $hdr_regex .= "(Name\.*)";
+ $hdr_href_regex .= "(Name\.*)";
- $hdr_regex .= "(Name\.*)";
- $hdr_href_regex .= "(Name\.*)";
-
- @splitted_metrics = split (":","$metrics");
- $nf = scalar (@splitted_metrics);
- gp_message ("debug", $subr_name,"number of fields in $metrics -> $nf");
-
- open (ZMETRICS, ">", "$noPCfile.metrics")
- or die ("Not able to open file $noPCfile.metrics for writing - '$!'");
- gp_message ("debug", $subr_name, "$noPCfile - opened file $noPCfile.metrics for writing");
-
- print ZMETRICS @moo;
- close (ZMETRICS);
-
- gp_message ("debug", $subr_name, "wrote file $noPCfile.metrics");
+ @splitted_metrics = split (":","$metrics");
+ $nf = scalar (@splitted_metrics);
+ gp_message ("debug", $subr_name,"number of fields in $metrics -> $nf");
- open (XREGEXP, ">", "$noPCfile.c.regex")
- or die ("Not able to open file $noPCfile.c.regex for writing - '$!'");
- gp_message ("debug", $subr_name, "$noPCfile - opened file $noPCfile.c.regex for writing");
-
- print XREGEXP "\# Number of metric fields\n";
- print XREGEXP "$nf\n";
- print XREGEXP "\# Header regex\n";
- print XREGEXP "$hdr_regex\n";
- print XREGEXP "\# href Header regex\n";
- print XREGEXP "$hdr_href_regex\n";
- print XREGEXP "\# src Header regex\n";
- print XREGEXP "$hdr_src_regex\n";
+ if (not defined($noPCfile))
+ {
+ $msg = "noPCfile is not defined";
+ gp_message ("debug", $subr_name, $msg);
+ }
+ else
+ {
+ $msg = "noPCfile = " . $noPCfile;
+ gp_message ("debug", $subr_name, $msg);
- $mf = 1;
+ open (ZMETRICS, ">", "$noPCfile.metrics")
+ or die ("Not able to open file $noPCfile.metrics for writing - '$!'");
+ gp_message ("debug", $subr_name, "$noPCfile - opened file $noPCfile.metrics for writing");
+
+ print ZMETRICS @moo;
+ close (ZMETRICS);
+
+ gp_message ("debug", $subr_name, "wrote file $noPCfile.metrics");
+
+ open (XREGEXP, ">", "$noPCfile.c.regex")
+ or die ("Not able to open file $noPCfile.c.regex for writing - '$!'");
+ gp_message ("debug", $subr_name, "$noPCfile - opened file $noPCfile.c.regex for writing");
+
+ print XREGEXP "\# Number of metric fields\n";
+ print XREGEXP "$nf\n";
+ print XREGEXP "\# Header regex\n";
+ print XREGEXP "$hdr_regex\n";
+ print XREGEXP "\# href Header regex\n";
+ print XREGEXP "$hdr_href_regex\n";
+ print XREGEXP "\# src Header regex\n";
+ print XREGEXP "$hdr_src_regex\n";
+
+ $mf = 1;
#---------------------------------------------------------------------------
# Find the index of "field" in the metric list, plus one.
#---------------------------------------------------------------------------
- if ( ($field eq "functions") or ($field eq "calls") or ($field eq "calltree"))
- {
- $mf = $nf + 1;
- }
- else
- {
- for my $candidate_metric (@splitted_metrics)
- {
- gp_message ("debugXL", $subr_name, "field = $field candidate_metric = $candidate_metric and mf = $mf");
- if ($candidate_metric eq $field)
+ if ( ($field eq "functions") or ($field eq "calls") or ($field eq "calltree"))
{
- last;
+ $mf = $nf + 1;
}
- $mf++;
- }
- }
- gp_message ("debugXL", $subr_name, "Final value mf = $mf");
-
- if ($mf == 1)
- {
- $re = "^\\s*(\\S+)"; # metric value
- }
- else
- {
- $re = "^\\s*\\S+";
- }
- $Xre = "^\\s*(\\S+)";
+ else
+ {
+ for my $candidate_metric (@splitted_metrics)
+ {
+ gp_message ("debugXL", $subr_name, "field = $field candidate_metric = $candidate_metric and mf = $mf");
+ if ($candidate_metric eq $field)
+ {
+ last;
+ }
+ $mf++;
+ }
+ }
+ gp_message ("debugXL", $subr_name, "Final value mf = $mf");
- $m = 2;
- while (--$nf)
- {
- if ($nf)
- {
- if ($m == $mf)
+ if ($mf == 1)
{
- $re .= "\\s+(\\S+)"; # metric value
+ $re = "^\\s*(\\S+)"; # metric value
}
else
{
- $re .= "\\s+\\S+";
+ $re = "^\\s*\\S+";
}
- if ($nf != 1)
+ $Xre = "^\\s*(\\S+)";
+
+ $m = 2;
+ while (--$nf)
{
- $Xre .= "\\s+(\\S+)";
+ if ($nf)
+ {
+ if ($m == $mf)
+ {
+ $re .= "\\s+(\\S+)"; # metric value
+ }
+ else
+ {
+ $re .= "\\s+\\S+";
+ }
+ if ($nf != 1)
+ {
+ $Xre .= "\\s+(\\S+)";
+ }
+ $m++;
+ }
}
- $m++;
- }
- }
-
- if ($field eq "calltree")
- {
- $re .= "\\s+.*\\+-(.*)"; # name
- $Xre .= "\\s+.*\\+-(.*)\$"; # name (Right?)
- }
- else
- {
- $re .= "\\s+(.*)"; # name
- $Xre .= "\\s+(.*)\$"; # name
- }
- print XREGEXP "\# Metrics and Name regex\n";
- print XREGEXP "$Xre\n";
- close (XREGEXP);
+ if ($field eq "calltree")
+ {
+ $re .= "\\s+.*\\+-(.*)"; # name
+ $Xre .= "\\s+.*\\+-(.*)\$"; # name (Right?)
+ }
+ else
+ {
+ $re .= "\\s+(.*)"; # name
+ $Xre .= "\\s+(.*)\$"; # name
+ }
- gp_message ("debug", $subr_name, "wrote file $noPCfile.c.regex");
- gp_message ("debugXL", $subr_name, "on return Xre = $Xre");
- gp_message ("debugXL", $subr_name, "on return re = $re");
+ print XREGEXP "\# Metrics and Name regex\n";
+ print XREGEXP "$Xre\n";
+ close (XREGEXP);
+
+ gp_message ("debug", $subr_name, "wrote file $noPCfile.c.regex");
+ gp_message ("debugXL", $subr_name, "on return Xre = $Xre");
+ gp_message ("debugXL", $subr_name, "on return re = $re");
+ }
return ($re);
@@ -11388,7 +11460,7 @@ sub prepend_backslashes
} #-- End of subroutine prepend_backslashes
#------------------------------------------------------------------------------
-# TBD
+# TBD Still needed?
#------------------------------------------------------------------------------
sub preprocess_function_files
{
@@ -12467,6 +12539,7 @@ sub process_function_files
#------------------------------------------------------------------------------
# TBD: Name cleanup needed.
#------------------------------------------------------------------------------
+ my $msg;
my $number_of_metrics;
my $expr_name;
@@ -12669,7 +12742,11 @@ sub process_function_files
#------------------------------------------------------------------------------
# Strip the internal number from the address field.
#------------------------------------------------------------------------------
+ $msg = "address_field before regex = " . $address_field;
+ gp_message ("debugXL", $subr_name, $msg);
$address_field =~ s/$remove_number_regex//;
+ $msg = "address_field after regex = " . $address_field;
+ gp_message ("debugXL", $subr_name, $msg);
## $disfile = "file\.$routine_index\.dis";
$disfile = "file." . $routine_index . "." . $g_html_base_file_name{"disassembly"};
@@ -13553,6 +13630,13 @@ sub process_metrics_data
my $detail_metrics_system;
my $call_metrics;
+#------------------------------------------------------------------------------
+# The regex section.
+#------------------------------------------------------------------------------
+ my $metrics_line_regex = '\s*(.*):\s+(\d+\.?\d*)';
+ my $metric_of_interest_1_regex = '^Exclusive\ *';
+ my $metric_of_interest_2_regex = '^Inclusive\ *';
+
if ($g_user_settings{"default_metrics"}{"current_value"} eq "off")
{
$msg = "g_user_settings{default_metrics}{current_value} = ";
@@ -13575,104 +13659,103 @@ sub process_metrics_data
gp_message ("debug", $subr_name, "opened $outfile2 to parse metric value data");
#------------------------------------------------------------------------------
-# Below an example of the file that has just been opened. The lines I marked
-# with a * has been wrapped by my for readability. This is not the case in the
-# file, but makes for a really long line.
-#
-# Also, the data comes from one PC experiment and two HWC experiments.
+# Below an example of the file that has just been opened.
#------------------------------------------------------------------------------
# <Total>
-# Exclusive Total CPU Time: 32.473 (100.0%)
-# Inclusive Total CPU Time: 32.473 (100.0%)
-# Exclusive CPU Cycles: 23.586 (100.0%)
-# " count: 47054706905
-# Inclusive CPU Cycles: 23.586 (100.0%)
-# " count: 47054706905
-# Exclusive Instructions Executed: 54417033412 (100.0%)
-# Inclusive Instructions Executed: 54417033412 (100.0%)
-# Exclusive Last-Level Cache Misses: 252730685 (100.0%)
-# Inclusive Last-Level Cache Misses: 252730685 (100.0%)
-# * Exclusive Instructions Per Cycle: Inclusive Instructions Per Cycle:
-# * Exclusive Cycles Per Instruction:
-# * Inclusive Cycles Per Instruction:
-# * Size: 0
-# PC Address: 1:0x00000000
-# Source File: (unknown)
-# Object File: (unknown)
-# Load Object: <Total>
-# Mangled Name:
-# Aliases:
+# Exclusive Total CPU Time: 3.232 (100.0%)
+# Inclusive Total CPU Time: 3.232 (100.0%)
+# Exclusive insts Events: 7628146366 (100.0%)
+# Inclusive insts Events: 7628146366 (100.0%)
+# Exclusive cycles Events: 5167454376 (100.0%)
+# Inclusive cycles Events: 5167454376 (100.0%)
+# Exclusive dTLB-load-misses Events: 0 ( 0. %)
+# Inclusive dTLB-load-misses Events: 0 ( 0. %)
+# Exclusive Instructions Per Cycle: 1.476
+# Inclusive Instructions Per Cycle: 1.476
+# Exclusive Cycles Per Instruction: 0.677
+# Inclusive Cycles Per Instruction: 0.677
+# Exclusive branch-instructions Events: 1268741580 (100.0%)
+# Inclusive branch-instructions Events: 1268741580 (100.0%)
+# Size: 0
+# PC Address: 1:0x00000000
+# Source File: (unknown)
+# Object File: (unknown)
+# Load Object: <Total>
+# Mangled Name:
+# Aliases:
#------------------------------------------------------------------------------
while (<METRICTOTALS>)
{
$metricdata = $_; chomp ($metricdata);
- gp_message ("debug", $subr_name, "file metrictotals: $metricdata");
+
+ $msg = "file metrictotals: input line = " . $metricdata;
+ gp_message ("debug", $subr_name, $msg);
#------------------------------------------------------------------------------
# Ignoring whitespace, search for any line with a ":" in it, followed by
-# a number with or without a dot. So, an integer or floating-point number.
+# a number with, or without, a dot. So, an integer or floating-point number.
#------------------------------------------------------------------------------
- if ($metricdata =~ /\s*(.*):\s+(\d+\.*\d*)/)
+ if ($metricdata =~ /$metrics_line_regex/)
{
- gp_message ("debug", $subr_name, " candidate => $metricdata");
- $metric = $1;
- $value = $2;
- if ( ($metric eq "PC Address") or ($metric eq "Size"))
+ $msg = "selected input line for processing";
+ gp_message ("debug", $subr_name, $msg);
+
+ if (defined($1) and defined($2))
{
- gp_message ("debug", $subr_name, " skipped => $metric $value");
- next;
+ $metric = $1;
+ $value = $2;
+ $msg = "metric = " . $metric;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "value = " . $value;
+ gp_message ("debug", $subr_name, $msg);
}
- gp_message ("debug", $subr_name, " proceed => $metric $value");
- if ($metric eq '" count')
+ else
+ {
+ $msg = "unexpected input in " . $metricdata;
+ gp_message ("assertion", $subr_name, $msg);
+ }
+
#------------------------------------------------------------------------------
-# Hardware counter experiments have this info. Note that this line is not the
-# first one to be encountered, so $last_metric has been defined already.
+# Select the metrics of interest.
#------------------------------------------------------------------------------
+ if (($metric =~ /$metric_of_interest_1_regex/) or
+ ($metric =~ /$metric_of_interest_2_regex/) )
{
- $metric = $last_metric." Count"; # we presume .......
- gp_message ("debug", $subr_name, "last_metric = $last_metric metric = $metric");
+ $msg = "metric of interest = " . $metric;
+ $msg .= " - proceed with processing";
+ gp_message ("debug", $subr_name, $msg);
}
- $i=index ($metricdata,":");
- $r=rindex ($metricdata,":");
- gp_message ("debug", $subr_name, "metricdata = $metricdata => i = $i r = $r");
- if ($i == $r)
+ else
{
- if ($value > 0) # Not interested in metrics contributing zero
- {
- $metric_value{$metric} = $value;
- gp_message ("debug", $subr_name, "archived metric_value{$metric} = $metric_value{$metric}");
- # e.g. $metric_value{Exclusive Total Thread Time} = 302.562
- # e.g. $metric_value{Exclusive Instructions Executed} = 2415126222484
- }
+ $msg = "metric = " . $metric;
+ $msg .= " - ignored and further processing is skipped";
+ gp_message ("debug", $subr_name, $msg);
+ next;
}
- else
+
#------------------------------------------------------------------------------
-# TBD This code deals with an old bug and may be removed.
+# When we get here, it means that this is a metric we want to process.
#------------------------------------------------------------------------------
- { # er_print bug - e.g.
-# Exclusive Instructions Per Cycle: Inclusive Instructions Per Cycle: Exclusive Cycles Per Instruction: Inclusive Cycles Per Instruction: Exclusive OpenMP Work Time: 162.284 (100.0%)
- gp_message ("debug", $subr_name, "metrictotals odd line:->$metricdata<-");
- $r=rindex ($metricdata,":",$r-1);
- if ($r == -1)
- { # ignore
- gp_message ("debug", $subr_name, "metrictotals odd line ignored<-");
- $last_metric = "foo";
- next;
- }
- my ($good_part)=substr ($metricdata,$r+1);
- if ($good_part =~ /\s*(.*):\s+(\d+\.*\d*)/)
- {
- $metric = $1;
- $value = $2;
- if ($value>0) # Not interested in metrics contributing zero
- {
- $metric_value{$metric} = $value;
- $msg = "metrictotals odd line rescued '$metric'=$value";
- gp_message ("debug", $subr_name, $msg);
- }
- }
+
+#------------------------------------------------------------------------------
+# TBD - Still needed? Don't see it in the input anymore (?)
+#------------------------------------------------------------------------------
+ if ($metric eq '" count')
+#------------------------------------------------------------------------------
+# Hardware counter experiments have this info. Note that this line is not the
+# first one to be encountered, so $last_metric has been defined already.
+#------------------------------------------------------------------------------
+ {
+ $metric = $last_metric . " Count";
+ $msg = "last_metric = $last_metric metric = $metric";
+ gp_message ("debug", $subr_name, $msg);
}
+
+ $metric_value{$metric} = $value;
+ $msg = "archived: metric_value{$metric} = " .
+ $metric_value{$metric};
+ gp_message ("debug", $subr_name, $msg);
#------------------------------------------------------------------------------
# Preserve the current metric.
#------------------------------------------------------------------------------
@@ -13684,20 +13767,26 @@ sub process_metrics_data
if (scalar (keys %metric_value) == 0)
#------------------------------------------------------------------------------
-# If we have no metrics > 0, fudge a "Exclusive Total CPU Time", else we
-# blow up later.
-#
-# TBD: See if this can be handled differently.
+# This means that there are no metrics in the input file. That is a fatal
+# error and execution is terminated.
#------------------------------------------------------------------------------
{
- $metric_value{"Exclusive Total CPU Time"} = 0;
- gp_message ("debug", $subr_name, "no metrics found and a stub was added");
+ $msg = "no metrics have been found in the input file";
+ gp_message ("assertion", $subr_name, $msg);
+ }
+ else
+#------------------------------------------------------------------------------
+# All is well. Print the metrics that have been found.
+#------------------------------------------------------------------------------
+ {
+ $msg = "stored the following metrics and values:";
+ gp_message ("debug", $subr_name, $msg);
+ for my $metric (sort keys %metric_value)
+ {
+ $msg = "metric_value{$metric} = " . $metric_value{$metric};
+ gp_message ("debug", $subr_name, $msg);
+ }
}
-
- for my $metric (sort keys %metric_value)
- {
- gp_message ("debug", $subr_name, "Stored metric_value{$metric} = $metric_value{$metric}");
- }
gp_message ("debug", $subr_name, "proceed to process file $outfile1");
@@ -13740,7 +13829,7 @@ sub process_metrics_data
$metric_line = $_;
chomp ($metric_line);
- gp_message ("debug", $subr_name, "processing line $metric_line");
+ gp_message ("debug", $subr_name, "processing line: $metric_line");
#------------------------------------------------------------------------------
# The original regex has bugs because the line should not be allowed to start
# with a ":". So this is wrong:
@@ -13759,113 +13848,113 @@ sub process_metrics_data
#------------------------------------------------------------------------------
# Ruud if (($metric =~ /\s*(.*):\s+(\S)((\.\S+)|(\+\S+))/) && !($metric =~/^Current/)){
- ($metric_spec, $metric_flavor, $metric_visibility, $metric_name, $metric_text) =
+ ($metric_spec, $metric_flavor, $metric_visibility, $metric_name,
+ $metric_text) =
extract_metric_specifics ($metric_line);
# if (($metric_line =~ /\s*(.+):\s+([ei])([\.\+%]+)(\S*)/) and !($metric_line =~/^Current/))
if ($metric_spec eq "skipped")
{
- gp_message ("debug", $subr_name, "skipped line: $metric_line");
+ $msg = "skipped processing line: " . $metric_line;
+ gp_message ("debug", $subr_name, $msg);
+ next
}
- else
- {
- gp_message ("debug", $subr_name, "line of interest: $metric_line");
+ $msg = "line of interest: " . $metric_line;
+ gp_message ("debug", $subr_name, $msg);
- $metric_found{$metric_spec} = 1;
+ $metric_found{$metric_spec} = $TRUE;
- if ($g_user_settings{"ignore_metrics"}{"defined"})
+#------------------------------------------------------------------------------
+# TBD
+# Currently always FALSE since this feature has not been fully implemented yet.
+#------------------------------------------------------------------------------
+ if ($g_user_settings{"ignore_metrics"}{"defined"})
+ {
+ gp_message ("debug", $subr_name, "check for $metric_spec");
+ if (exists ($ignored_metrics{$metric_name}))
{
- gp_message ("debug", $subr_name, "check for $metric_spec");
- if (exists ($ignored_metrics{$metric_name}))
- {
- gp_message ("debug", $subr_name, "user asked to ignore metric $metric_name");
- next;
- }
- }
+ $msg = "user asked to ignore metric " . $metric_name;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "further processing of line of interest is skipped";
+ gp_message ("debug", $subr_name, $msg);
+ next;
+ }
+ }
#------------------------------------------------------------------------------
# This metric is not on the ignored list and qualifies, so store it.
#------------------------------------------------------------------------------
- $metric_description{$metric_spec} = $metric_text;
+ $metric_description{$metric_spec} = $metric_text;
# TBD: add for other visibilities too, like +
- gp_message ("debug", $subr_name, "stored $metric_description{$metric_spec} = $metric_description{$metric_spec}");
+ $msg = "stored metric_description{$metric_spec} = ";
+ $msg .= $metric_description{$metric_spec};
+ gp_message ("debug", $subr_name, $msg);
- if ($metric_flavor ne "e")
- {
- gp_message ("debug", $subr_name, "metric $metric_spec is ignored");
- }
- else
+ if ($metric_flavor ne "e")
+ {
+ $msg = "metric $metric_spec is ignored";
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "further processing of this line is skipped";
+ gp_message ("debug", $subr_name, $msg);
+ }
+ else
#------------------------------------------------------------------------------
# Only the exclusive metrics are shown.
#------------------------------------------------------------------------------
- {
- gp_message ("debug", $subr_name, "metric $metric_spec ($metric_text) is considered");
+ {
+ $msg = "metric $metric_spec ($metric_text) is considered";
+ gp_message ("debug", $subr_name, $msg);
- if ($metric_spec =~ /user/)
- {
- $user_metrics = $TRUE;
- gp_message ("debug", $subr_name, "m: user_metrics set to TRUE");
- }
- elsif ($metric_spec =~ /system/)
- {
- $system_metrics = $TRUE;
- gp_message ("debug", $subr_name, "m: system_metrics set to TRUE");
- }
- elsif ($metric_spec =~ /wall/)
- {
- $wall_metrics = $TRUE;
- gp_message ("debug", $subr_name, "m: wall_metrics set to TRUE");
- }
#------------------------------------------------------------------------------
-# TBD I don't see why these need to be skipped. Also, should be totalcpu.
+# Legacy metrics, but may re-appear one day and so the code is left in here.
#------------------------------------------------------------------------------
- elsif (($metric_spec =~ /^e\.total$/) or ($metric_spec =~/^e\.total_cpu$/))
- {
- # skip total thread time and total CPU time
- gp_message ("debug", $subr_name, "m: skip above");
- }
- elsif (defined ($metric_value{$metric_text}))
+ if ($metric_spec =~ /user/)
+ {
+ $user_metrics = $TRUE;
+ $msg = "user_metrics set to TRUE";
+ gp_message ("debug", $subr_name, $msg);
+ }
+ elsif ($metric_spec =~ /system/)
+ {
+ $system_metrics = $TRUE;
+ $msg = "system_metrics set to TRUE";
+ gp_message ("debug", $subr_name, $msg);
+ }
+ elsif ($metric_spec =~ /wall/)
+ {
+ $wall_metrics = $TRUE;
+ $msg = "wall_metrics set to TRUE";
+ gp_message ("debug", $subr_name, $msg);
+ }
+ elsif (defined ($metric_value{$metric_text}))
+ {
+ $msg = "total attributed to this metric ";
+ $msg .= "metric_value{" . $metric_text . "} = ";
+ $msg .= $metric_value{$metric_text};
+ gp_message ("debug", $subr_name, $msg);
+
+ if ($summary_metrics ne '')
{
- gp_message ("debug", $subr_name, "Total attributed to this metric metric_value{$metric_text} = $metric_value{$metric_text}");
- if ($summary_metrics ne '')
- {
- $summary_metrics = $summary_metrics.':'.$metric_spec;
- gp_message ("debug", $subr_name, "updated summary_metrics = $summary_metrics - 1");
- if ($metric_spec !~ /\.wait$|\.ulock$|\.text$|\.data$|\.owait$|total$|mpiwork$|mpiwait$|ompwork$|ompwait$/)
- {
- $detail_metrics = $detail_metrics.':'.$metric_spec;
- gp_message ("debug", $subr_name, "updated m:detail_metrics=$detail_metrics - 1");
- $detail_metrics_system = $detail_metrics_system.':'.$metric_spec;
- gp_message ("debug", $subr_name, "updated m:detail_metrics_system=$detail_metrics_system - 1");
- }
- else
- {
- gp_message ("debug", $subr_name, "m: no want above metric for detail_metrics or detail_metrics_system");
- }
- }
- else
- {
- $summary_metrics = $metric_spec;
- gp_message ("debug", $subr_name, "initialized summary_metrics = $summary_metrics - 2");
- if ($metric_spec !~ /\.wait$|\.ulock$|\.text$|\.data$|\.owait$|total$|mpiwork$|mpiwait$|ompwork$|ompwait$/)
- {
- $detail_metrics = $metric_spec;
- gp_message ("debug", $subr_name, "m:detail_metrics=$detail_metrics - 2");
- $detail_metrics_system = $metric_spec;
- gp_message ("debug", $subr_name, "m:detail_metrics_system=$detail_metrics_system - 2");
- }
- else
- {
- gp_message ("debug", $subr_name, "m: no want above metric for detail_metrics or detail_metrics_system");
- }
- }
- gp_message ("debug", $subr_name, " metric $metric_spec added");
+ $summary_metrics .= ':' . $metric_spec;
+ $msg = "updated summary_metrics = " . $summary_metrics;
+ gp_message ("debug", $subr_name, $msg);
}
else
{
- gp_message ("debug", $subr_name, "m: no want above metric was a 0 total");
+ $summary_metrics = $metric_spec;
+ $msg = "initialized summary_metrics = " . $summary_metrics;
+ gp_message ("debug", $subr_name, $msg);
}
+ gp_message ("debug", $subr_name, "metric $metric_spec added");
+ }
+ else
+ {
+#------------------------------------------------------------------------------
+# TBD: This doesn't seem to make much sense.
+#------------------------------------------------------------------------------
+ $msg = "no action taken for " . $metric_spec;
+ gp_message ("debug", $subr_name, $msg);
}
}
}
@@ -13874,21 +13963,32 @@ sub process_metrics_data
if ($wall_metrics > 0)
{
- gp_message ("debug", $subr_name,"m:wall_metrics set adding to summary_metrics");
+ $msg = "adding e.wall to summary_metrics";
+ gp_message ("debug", $subr_name, $msg);
$summary_metrics = "e.wall:".$summary_metrics;
- gp_message ("debug", $subr_name,"m:summary_metrics=$summary_metrics - 3");
+ $msg = "after update summary_metrics = " . $summary_metrics;
+ gp_message ("debug", $subr_name, $msg);
}
if ($system_metrics > 0)
{
- gp_message ("debug", $subr_name,"m:system_metrics set adding to summary_metrics,call_metrics and detail_metrics_system");
- $summary_metrics = "e.system:".$summary_metrics;
- $call_metrics = "i.system:".$call_metrics;
- $detail_metrics_system ='e.system:'.$detail_metrics_system;
+ $msg = "adding e.system to summary_metrics and detail_metrics_system";
+ gp_message ("debug", $subr_name, $msg);
+
+ $summary_metrics = "e.system:" . $summary_metrics;
+ $detail_metrics_system = "e.system:" . $detail_metrics_system;
+
+ $msg = "adding i.system to call_metrics";
+ gp_message ("debug", $subr_name, $msg);
- gp_message ("debug", $subr_name,"m:summary_metrics=$summary_metrics - 4");
- gp_message ("debug", $subr_name,"m:call_metrics=$call_metrics");
- gp_message ("debug", $subr_name,"m:detail_metrics_system=$detail_metrics_system - 3");
+ $call_metrics = "i.system:" . $call_metrics;
+
+ $msg = "after update summary_metrics = " . $summary_metrics;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "after update call_metrics = " . $call_metrics;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "after update detail_metrics_system = " . $detail_metrics_system;
+ gp_message ("debug", $subr_name, $msg);
}
@@ -13898,7 +13998,6 @@ sub process_metrics_data
if ($user_metrics > 0)
{
- gp_message ("debug", $subr_name,"m:user_metrics set adding to summary_metrics,detail_metrics,detail_metrics_system and call_metrics");
# Ruud if (!exists ($IMETRICS{"i.user"})){
if ($g_user_settings{"ignore_metrics"}{"defined"} and exists ($ignored_metrics{"user"}))
{
@@ -13908,14 +14007,12 @@ sub process_metrics_data
{
$summary_metrics = "e.user:i.user:".$summary_metrics;
}
+
$detail_metrics = "e.user:".$detail_metrics;
$detail_metrics_system = "e.user:".$detail_metrics_system;
- gp_message ("debug", $subr_name,"m:summary_metrics=$summary_metrics - 5");
- gp_message ("debug", $subr_name,"m:detail_metrics=$detail_metrics - 3");
- gp_message ("debug", $subr_name,"m:detail_metrics_system=$detail_metrics_system - 4");
-
- if ($g_user_settings{"ignore_metrics"}{"defined"} and exists ($ignored_metrics{"user"}))
+ if ($g_user_settings{"ignore_metrics"}{"defined"} and
+ exists ($ignored_metrics{"user"}))
{
$call_metrics = "a.user:".$call_metrics;
}
@@ -13923,28 +14020,47 @@ sub process_metrics_data
{
$call_metrics = "a.user:i.user:".$call_metrics;
}
- gp_message ("debug", $subr_name,"m:call_metrics=$call_metrics - 2");
+ $msg = "updated summary_metrics = " . $summary_metrics;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "updated detail_metrics = " . $detail_metrics;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "updated detail_metrics_system = " . $detail_metrics_system;
+ gp_message ("debug", $subr_name, $msg);
+ $msg = "updated call_metrics = " . $call_metrics;
+ gp_message ("debug", $subr_name, $msg);
+
}
+#------------------------------------------------------------------------------
+# TBD
+# It doesn't look right in case call_metrics ends up being set to ""
+#------------------------------------------------------------------------------
if ($call_metrics eq "")
{
$call_metrics = $detail_metrics;
-
- gp_message ("debug", $subr_name,"m:call_metrics is not set, setting it to detail_metrics ");
- gp_message ("debug", $subr_name,"m:call_metrics=$call_metrics - 3");
+ $msg = "call_metrics is not set, setting it to " . $call_metrics;
+ gp_message ("debug", $subr_name, $msg);
+ if ($detail_metrics eq '')
+ {
+ $msg = "detail_metrics and call_metrics are blank and could";
+ $msg .= " cause trouble later on";
+ gp_message ("debug", $subr_name, $msg);
+ }
}
for my $metric (sort keys %ignored_metrics)
{
if ($ignored_metrics{$metric})
{
- gp_message ("debug", $subr_name, "active metric, but ignored: $metric");
+ $msg = "active metric, but ignored: " . $metric;
+ gp_message ("debug", $subr_name, $msg);
}
}
- return (\%metric_value, \%metric_description, \%metric_found, $user_metrics, $system_metrics, $wall_metrics,
- $summary_metrics, $detail_metrics, $detail_metrics_system, $call_metrics);
+ return (\%metric_value, \%metric_description, \%metric_found, $user_metrics,
+ $system_metrics, $wall_metrics, $summary_metrics, $detail_metrics,
+ $detail_metrics_system, $call_metrics);
} #-- End of subroutine process_metrics_data
diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
index 55fa2e9..952d262 100644
--- a/gprofng/libcollector/unwind.c
+++ b/gprofng/libcollector/unwind.c
@@ -1555,8 +1555,8 @@ read_int (unsigned char *pc, int w)
if (w == 1)
return *((char *) pc);
if (w == 2)
- return *(short*) pc;
- return *(int*) pc;
+ return pc[0] | (pc[1] << 8);
+ return pc[0] | (pc[1] << 8) | (pc[2] << 16) | (pc[3] << 24);
}
/* Return codes */
diff --git a/gprofng/src/BaseMetric.cc b/gprofng/src/BaseMetric.cc
index 08ab883..ae0ee32 100644
--- a/gprofng/src/BaseMetric.cc
+++ b/gprofng/src/BaseMetric.cc
@@ -212,7 +212,7 @@ BaseMetric::BaseMetric (const char *_cmd, const char *_username,
clock_unit = CUNIT_NULL; // should it be CUNIT_TIME or 0 or something?
/* we're not going to process packets for derived metrics */
- packet_type = (ProfData_type) (-1);
+ packet_type = DATA_NONE;
value_styles = VAL_VALUE;
valtype = VT_DOUBLE;
precision = 1000;
@@ -443,7 +443,7 @@ BaseMetric::specify ()
char buf[256];
char buf2[256];
- packet_type = (ProfData_type) - 1; // illegal value
+ packet_type = DATA_NONE;
clock_unit = CUNIT_TIME;
switch (type)
{
diff --git a/gprofng/src/BaseMetric.h b/gprofng/src/BaseMetric.h
index 4a86687..2d7d2f7 100644
--- a/gprofng/src/BaseMetric.h
+++ b/gprofng/src/BaseMetric.h
@@ -194,7 +194,7 @@ private:
ValueTag valtype; // e.g. VT_LLONG
long long precision; // e.g. METRIC_SIG_PRECISION, 1, etc.
Hwcentry *hw_ctr; // HWC definition
- ProfData_type packet_type; // e.g. DATA_HWC, or -1 for N/A
+ ProfData_type packet_type; // e.g. DATA_HWC, or DATA_NONE for N/A
bool zeroThreshold; // deadlock stuff
Presentation_clock_unit clock_unit;
diff --git a/gprofng/src/CallStack.cc b/gprofng/src/CallStack.cc
index 6212b5b..5bfafb7 100644
--- a/gprofng/src/CallStack.cc
+++ b/gprofng/src/CallStack.cc
@@ -146,13 +146,17 @@ private:
CallStackNode *find_preg_stack (uint64_t);
// objs are in the root..leaf order
void *add_stack_d (Vector<Histable*> *objs);
- void add_stack_java (DataDescriptor *dDscr, long idx, FramePacket *frp, hrtime_t tstamp, uint32_t thrid, Vector<DbeInstr*>* natpcs, bool natpc_added, cstk_ctx_chunk *cstCtxChunk);
- void add_stack_java_epilogue (DataDescriptor *dDscr, long idx, FramePacket *frp, hrtime_t tstamp, uint32_t thrid, Vector<DbeInstr*>* natpcs, Vector<Histable*>* jpcs, bool natpc_added);
+ void add_stack_java (DataDescriptor *dDscr, long idx, FramePacket *frp,
+ hrtime_t tstamp, uint32_t thrid, Vector<Histable*>* natpcs,
+ bool natpc_added, cstk_ctx_chunk *cstCtxChunk);
+ void add_stack_java_epilogue (DataDescriptor *dDscr, long idx,
+ FramePacket *frp, hrtime_t tstamp, uint32_t thrid,
+ Vector<Histable*>* natpcs, Vector<Histable*>* jpcs, bool natpc_added);
// Adjust HW counter event to find better trigger PC, etc.
DbeInstr *adjustEvent (DbeInstr *leafPC, DbeInstr * candPC,
Vaddr &eventEA, int abst_type);
- Vector<DbeInstr*> *natpcsP;
+ Vector<Histable*> *natpcsP;
Vector<Histable*> *jpcsP;
};
@@ -335,7 +339,7 @@ CallStackP::find_preg_stack (uint64_t prid)
void
CallStackP::add_stack_java (DataDescriptor *dDscr, long idx, FramePacket *frp,
hrtime_t tstamp, uint32_t thrid,
- Vector<DbeInstr*>* natpcs, bool natpc_added,
+ Vector<Histable*>* natpcs, bool natpc_added,
cstk_ctx_chunk *cstCtxChunk)
{
Vector<Histable*> *jpcs = NULL;
@@ -387,7 +391,7 @@ CallStackP::add_stack_java (DataDescriptor *dDscr, long idx, FramePacket *frp,
bool found = false;
for (; nind >= 0; nind--)
{
- DbeInstr *nat_addr = natpcs->fetch (nind);
+ DbeInstr *nat_addr = (DbeInstr *) natpcs->fetch (nind);
if (0 == nat_addr)
continue;
Function *nat_func = nat_addr->func;
@@ -415,12 +419,14 @@ CallStackP::add_stack_java (DataDescriptor *dDscr, long idx, FramePacket *frp,
// It adds the native and java stacks to the stackmap
void
-CallStackP::add_stack_java_epilogue (DataDescriptor *dDscr, long idx, FramePacket *frp, hrtime_t tstamp, uint32_t thrid, Vector<DbeInstr*>* natpcs, Vector<Histable*> *jpcs, bool natpc_added)
+CallStackP::add_stack_java_epilogue (DataDescriptor *dDscr, long idx,
+ FramePacket *frp, hrtime_t tstamp, uint32_t thrid,
+ Vector<Histable*>* natpcs, Vector<Histable*> *jpcs, bool natpc_added)
{
CallStackNode *node = NULL;
if (!natpc_added)
{
- node = (CallStackNode *) add_stack ((Vector<Histable*>*)natpcs);
+ node = (CallStackNode *) add_stack (natpcs);
dDscr->setObjValue (PROP_MSTACK, idx, node);
dDscr->setObjValue (PROP_XSTACK, idx, node);
dDscr->setObjValue (PROP_USTACK, idx, node);
@@ -469,7 +475,7 @@ void
CallStackP::add_stack (DataDescriptor *dDscr, long idx, FramePacket *frp,
cstk_ctx_chunk* cstCtxChunk)
{
- Vector<DbeInstr*> *natpcs = NULL;
+ Vector<Histable*> *natpcs = NULL;
cstk_ctx *cstctx = NULL;
int stack_size = frp->stackSize ();
if (cstCtxChunk != NULL)
@@ -485,7 +491,7 @@ CallStackP::add_stack (DataDescriptor *dDscr, long idx, FramePacket *frp,
// [leaf_pc .. root_pc] == [0..stack_size-1]
// Leave room for a possible "truncated" frame
if (natpcsP == NULL)
- natpcsP = new Vector<DbeInstr*>;
+ natpcsP = new Vector<Histable*>;
natpcs = natpcsP;
natpcs->reset ();
}
@@ -632,7 +638,7 @@ CallStackP::add_stack (DataDescriptor *dDscr, long idx, FramePacket *frp,
natpcs->append (funwf->find_dbeinstr (0, 0));
}
- CallStackNode *node = (CallStackNode*) add_stack ((Vector<Histable*>*)natpcs);
+ CallStackNode *node = (CallStackNode*) add_stack (natpcs);
dDscr->setObjValue (PROP_MSTACK, idx, node);
dDscr->setObjValue (PROP_XSTACK, idx, node);
dDscr->setObjValue (PROP_USTACK, idx, node);
@@ -813,7 +819,8 @@ CallStackP::add_stack (DataDescriptor *dDscr, long idx, FramePacket *frp,
bool inOMP = false;
for (btm = 0; btm < natpcs->size (); btm++)
{
- LoadObject *lo = natpcs->fetch (btm)->func->module->loadobject;
+ DbeInstr *instr = (DbeInstr *) natpcs->fetch (btm);
+ LoadObject *lo = instr->func->module->loadobject;
if (!inOMP)
{
if (lo->flags & SEG_FLAG_OMP)
@@ -854,7 +861,7 @@ CallStackP::add_stack (DataDescriptor *dDscr, long idx, FramePacket *frp,
// Process the entire nat_stack. Skip libthread.
for (top = natpcs->size () - 1; top >= 0; top--)
{
- DbeInstr *instr = natpcs->fetch (top);
+ DbeInstr *instr = (DbeInstr *) natpcs->fetch (top);
if (instr->func->module->loadobject->flags & SEG_FLAG_OMP)
break;
}
@@ -886,7 +893,7 @@ CallStackP::add_stack (DataDescriptor *dDscr, long idx, FramePacket *frp,
}
for (int i = btm; i <= top; ++i)
{
- DbeInstr *instr = natpcs->fetch (i);
+ DbeInstr *instr = (DbeInstr *) natpcs->fetch (i);
if (instr->func->module->loadobject->flags & SEG_FLAG_OMP)
continue; // Skip all frames from libmtsk
omppcs->append (instr);
diff --git a/gprofng/src/Emsg.h b/gprofng/src/Emsg.h
index 2bd40f9..bc56227 100644
--- a/gprofng/src/Emsg.h
+++ b/gprofng/src/Emsg.h
@@ -38,6 +38,7 @@ class StringBuilder;
typedef enum
{
+ CMSG_NONE = -1,
CMSG_WARN = 0,
CMSG_ERROR,
CMSG_FATAL,
diff --git a/gprofng/src/Experiment.cc b/gprofng/src/Experiment.cc
index 627a755c..3e1e1a7 100644
--- a/gprofng/src/Experiment.cc
+++ b/gprofng/src/Experiment.cc
@@ -315,7 +315,7 @@ Experiment::ExperimentHandler::ExperimentHandler (Experiment *_exp)
pDscr = NULL;
propDscr = NULL;
text = NULL;
- mkind = (Cmsg_warn) - 1; // CMSG_NONE
+ mkind = CMSG_NONE;
mnum = -1;
mec = -1;
}
@@ -368,8 +368,7 @@ Experiment::ExperimentHandler::pushElem (Element elem)
void
Experiment::ExperimentHandler::popElem ()
{
- stack->remove (stack->size () - 1);
- curElem = stack->fetch (stack->size () - 1);
+ curElem = stack->remove (stack->size () - 1);
}
void
@@ -1240,7 +1239,7 @@ Experiment::ExperimentHandler::characters (char *ch, int start, int length)
void
Experiment::ExperimentHandler::endElement (char*, char*, char*)
{
- if (curElem == EL_EVENT && mkind >= 0 && mnum >= 0)
+ if (curElem == EL_EVENT && mkind != CMSG_NONE && mnum >= 0)
{
char *str;
if (mec > 0)
@@ -1262,7 +1261,7 @@ Experiment::ExperimentHandler::endElement (char*, char*, char*)
exp->commentq->append (msg);
else
delete msg;
- mkind = (Cmsg_warn) - 1;
+ mkind = CMSG_NONE;
mnum = -1;
mec = -1;
}
@@ -1398,7 +1397,7 @@ Experiment::Experiment ()
archiveMap = NULL;
nnodes = 0;
nchunks = 0;
- chunks = 0;
+ chunks = NULL;
uidHTable = NULL;
uidnodes = new Vector<UIDnode*>;
mrecs = new Vector<MapRecord*>;
@@ -4688,26 +4687,36 @@ Experiment::readPacket (Data_window *dwin, Data_window::Span *span)
return size;
}
+static uint32_t get_v32(char *p)
+{
+ uint32_t v;
+ memcpy (&v, p, sizeof(uint32_t));
+ return v;
+}
+
+static uint64_t get_v64(char *p)
+{
+ uint64_t v;
+ memcpy (&v, p, sizeof(uint64_t));
+ return v;
+}
+
void
Experiment::readPacket (Data_window *dwin, char *ptr, PacketDescriptor *pDscr,
DataDescriptor *dDscr, int arg, uint64_t pktsz)
{
- union Value
- {
- uint32_t val32;
- uint64_t val64;
- } *v;
-
long recn = dDscr->addRecord ();
Vector<FieldDescr*> *fields = pDscr->getFields ();
+ uint32_t v32;
+ uint64_t v64;
int sz = fields->size ();
for (int i = 0; i < sz; i++)
{
FieldDescr *field = fields->fetch (i);
- v = (Value*) (ptr + field->offset);
if (field->propID == arg)
{
- dDscr->setValue (PROP_NTICK, recn, dwin->decode (v->val32));
+ v32 = get_v32(ptr + field->offset);
+ dDscr->setValue (PROP_NTICK, recn, dwin->decode (v32));
dDscr->setValue (PROP_MSTATE, recn, (uint32_t) (field->propID - PROP_UCPU));
}
if (field->propID == PROP_THRID || field->propID == PROP_LWPID
@@ -4718,11 +4727,13 @@ Experiment::readPacket (Data_window *dwin, char *ptr, PacketDescriptor *pDscr,
{
case TYPE_INT32:
case TYPE_UINT32:
- tmp64 = dwin->decode (v->val32);
+ v32 = get_v32 (ptr + field->offset);
+ tmp64 = dwin->decode (v32);
break;
case TYPE_INT64:
case TYPE_UINT64:
- tmp64 = dwin->decode (v->val64);
+ v64 = get_v64 (ptr + field->offset);
+ tmp64 = dwin->decode (v64);
break;
case TYPE_STRING:
case TYPE_DOUBLE:
@@ -4743,11 +4754,13 @@ Experiment::readPacket (Data_window *dwin, char *ptr, PacketDescriptor *pDscr,
{
case TYPE_INT32:
case TYPE_UINT32:
- dDscr->setValue (field->propID, recn, dwin->decode (v->val32));
+ v32 = get_v32 (ptr + field->offset);
+ dDscr->setValue (field->propID, recn, dwin->decode (v32));
break;
case TYPE_INT64:
case TYPE_UINT64:
- dDscr->setValue (field->propID, recn, dwin->decode (v->val64));
+ v64 = get_v64 (ptr + field->offset);
+ dDscr->setValue (field->propID, recn, dwin->decode (v64));
break;
case TYPE_STRING:
{
@@ -5039,7 +5052,8 @@ Experiment::new_uid_node (uint64_t uid, uint64_t val)
// Reallocate Node chunk array
UIDnode** old_chunks = chunks;
chunks = new UIDnode*[nchunks + NCHUNKSTEP];
- memcpy (chunks, old_chunks, nchunks * sizeof (UIDnode*));
+ if (old_chunks)
+ memcpy (chunks, old_chunks, nchunks * sizeof (UIDnode*));
nchunks += NCHUNKSTEP;
delete[] old_chunks;
// Clean future pointers
@@ -5854,20 +5868,20 @@ SegMemCmp (const void *a, const void *b)
SegMem*
Experiment::update_ts_in_maps (Vaddr addr, hrtime_t ts)
{
- Vector<SegMem *> *segMems = (Vector<SegMem *> *) maps->values ();
- if (!segMems->is_sorted ())
+ Vector<void *> *segMems = maps->values ();
+ if (segMems && !segMems->is_sorted ())
{
Dprintf (DEBUG_MAPS, NTXT ("update_ts_in_maps: segMems.size=%lld\n"), (long long) segMems->size ());
segMems->sort (SegMemCmp);
}
for (int i = 0, sz = segMems ? segMems->size () : 0; i < sz; i++)
{
- SegMem *sm = segMems->fetch (i);
+ SegMem *sm = (SegMem *) segMems->fetch (i);
if (ts < sm->unload_time)
{
for (; i < sz; i++)
{
- sm = segMems->fetch (i);
+ sm = (SegMem *) segMems->fetch (i);
if ((addr >= sm->base) && (addr < sm->base + sm->size))
{
Dprintf (DEBUG_MAPS,
diff --git a/gprofng/src/Experiment.h b/gprofng/src/Experiment.h
index e2fa30d..b98d373 100644
--- a/gprofng/src/Experiment.h
+++ b/gprofng/src/Experiment.h
@@ -65,7 +65,7 @@ template <class ITEM> class Vector;
// operate on the next stage
typedef struct
{
- Vector<DbeInstr*> *natpcs;
+ Vector<Histable*> *natpcs;
Vector<Histable*> *jpcs;
long idx;
FramePacket *frp;
diff --git a/gprofng/src/Table.h b/gprofng/src/Table.h
index e720343..92f1e78 100644
--- a/gprofng/src/Table.h
+++ b/gprofng/src/Table.h
@@ -71,7 +71,8 @@ enum VType_type
enum ProfData_type
{ // a.k.a "data_id" (not the same as Pckt_type "kind")
- DATA_SAMPLE, // Traditional collect "Samples"
+ DATA_NONE = -1,
+ DATA_SAMPLE = 0, // Traditional collect "Samples"
DATA_GCEVENT, // Java Garbage Collection events
DATA_HEAPSZ, // heap size tracking based on heap tracing data
DATA_CLOCK, // clock profiling data
diff --git a/gprofng/src/collctrl.cc b/gprofng/src/collctrl.cc
index d341cb0..2fa9a88 100644
--- a/gprofng/src/collctrl.cc
+++ b/gprofng/src/collctrl.cc
@@ -2422,7 +2422,7 @@ Coll_Ctrl::preprocess_names ()
}
else
{
- expt_dir = dbe_strndup (expt_name, s - expt_name - 1);
+ expt_dir = dbe_strndup (expt_name, s - expt_name);
base_name = strdup (s + 1);
}
diff --git a/gprofng/src/hwc_arm_ampere_1.h b/gprofng/src/hwc_arm_ampere_1.h
new file mode 100644
index 0000000..9d3f826
--- /dev/null
+++ b/gprofng/src/hwc_arm_ampere_1.h
@@ -0,0 +1,419 @@
+/* Copyright (C) 2024 Free Software Foundation, Inc.
+ Contributed by Oracle.
+
+ This file is part of GNU Binutils.
+
+ 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, 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, 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#ifndef _HWC_ARM_AMPERE_1_H_
+#define _HWC_ARM_AMPERE_1_H_
+
+#define I(nm, event, mtr) INIT_HWC(nm, mtr, (event), PERF_TYPE_RAW)
+
+static Hwcentry arm_ampere_1_list[] = {
+ HWC_GENERIC
+/* branch: */
+ { I("br_immed_spec", 0x78,
+ STXT("Branch speculatively executed, immediate branch")) },
+ { I("br_indirect_spec", 0x7a,
+ STXT("Branch speculatively executed, indirect branch")) },
+ { I("br_mis_pred", 0x10,
+ STXT("Mispredicted or not predicted branch speculatively executed. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("br_pred", 0x12,
+ STXT("Predictable branch speculatively executed. Unit: armv8_pmuv3_0")) },
+ { I("br_return_spec", 0x79,
+ STXT("Branch speculatively executed, procedure return")) },
+/* bus: */
+ { I("bus_access", 0x19,
+ STXT("Attributable Bus access. Unit: armv8_pmuv3_0")) },
+ { I("bus_access_normal", 0x64, STXT("Bus access, Normal")) },
+ { I("bus_access_not_shared", 0x63,
+ STXT("Bus access, not Normal, Cacheable, Shareable")) },
+ { I("bus_access_periph", 0x65, STXT("Bus access, peripheral")) },
+ { I("bus_access_rd", 0x60, STXT("Bus access read")) },
+ { I("bus_access_shared", 0x62,
+ STXT("Bus access, Normal, Cacheable, Shareable")) },
+ { I("bus_access_wr", 0x61, STXT("Bus access write")) },
+ { I("bus_cycles", 0x1d, STXT("Bus cycle. Unit: armv8_pmuv3_0")) },
+ { I("cnt_cycles", 0x4004,
+ STXT("Constant frequency cycles. Unit: armv8_pmuv3_0")) },
+ { I("cpu_cycles", 0x11, STXT("Cycle. Unit: armv8_pmuv3_0")) },
+/* cache: */
+ { I("dtlb_walk", 0x34,
+ STXT("Access to data TLB causes a translation table walk. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("itlb_walk", 0x35,
+ STXT("Access to instruction TLB that causes a translation table walk. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("l1d_cache", 0x4,
+ STXT("Level 1 data cache access. Unit: armv8_pmuv3_0")) },
+ { I("l1d_cache_inval", 0x48, STXT("L1D cache invalidate")) },
+ { I("l1d_cache_lmiss_rd", 0x39,
+ STXT("Level 1 data cache long-latency read miss. Unit: armv8_pmuv3_0")) },
+ { I("l1d_cache_rd", 0x40, STXT("L1D cache access, read")) },
+ { I("l1d_cache_refill", 0x3,
+ STXT("Level 1 data cache refill. Unit: armv8_pmuv3_0")) },
+ { I("l1d_cache_refill_rd", 0x42, STXT("L1D cache refill, read")) },
+ { I("l1d_cache_wr", 0x41, STXT("L1D cache access, write")) },
+ { I("l1d_tlb", 0x25,
+ STXT("Attributable Level 1 data or unified TLB access. Unit: armv8_pmuv3_0")) },
+ { I("l1d_tlb_refill", 0x5,
+ STXT("Attributable Level 1 data TLB refill. Unit: armv8_pmuv3_0")) },
+ { I("l1d_tlb_refill_rd", 0x4c, STXT("L1D tlb refill, read")) },
+ { I("l1d_tlb_refill_wr", 0x4d, STXT("L1D tlb refill, write")) },
+ { I("l1i_cache", 0x14,
+ STXT("Attributable Level 1 instruction cache access. Unit: armv8_pmuv3_0")) },
+ { I("l1i_cache_lmiss", 0x4006,
+ STXT("Level 1 instruction cache long-latency read miss. Unit: armv8_pmuv3_0")) },
+ { I("l1i_cache_refill", 0x1,
+ STXT("Level 1 instruction cache refill. Unit: armv8_pmuv3_0")) },
+ { I("l1i_tlb", 0x26,
+ STXT("Attributable Level 1 instruction TLB access. Unit: armv8_pmuv3_0")) },
+ { I("l1i_tlb_refill", 0x2,
+ STXT("Attributable Level 1 instruction TLB refill. Unit: armv8_pmuv3_0")) },
+ { I("l2d_cache", 0x16,
+ STXT("Level 2 data cache access. Unit: armv8_pmuv3_0")) },
+ { I("l2d_cache_inval", 0x58, STXT("L2D cache invalidate")) },
+ { I("l2d_cache_lmiss_rd", 0x4009,
+ STXT("Level 2 data cache long-latency read miss. Unit: armv8_pmuv3_0")) },
+ { I("l2d_cache_rd", 0x50, STXT("L2D cache access, read")) },
+ { I("l2d_cache_refill", 0x17,
+ STXT("Level 2 data refill. Unit: armv8_pmuv3_0")) },
+ { I("l2d_cache_refill_rd", 0x52, STXT("L2D cache refill, read")) },
+ { I("l2d_cache_refill_wr", 0x53, STXT("L2D cache refill, write")) },
+ { I("l2d_cache_wb", 0x18,
+ STXT("Attributable Level 2 data cache write-back. Unit: armv8_pmuv3_0")) },
+ { I("l2d_cache_wb_clean", 0x57,
+ STXT("L2D cache Write-Back, cleaning and coherency")) },
+ { I("l2d_cache_wb_victim", 0x56, STXT("L2D cache Write-Back, victim")) },
+ { I("l2d_cache_wr", 0x51, STXT("L2D cache access, write")) },
+ { I("l2d_tlb", 0x2f,
+ STXT("Attributable Level 2 data or unified TLB access. Unit: armv8_pmuv3_0")) },
+ { I("l2d_tlb_refill", 0x2d,
+ STXT("Attributable Level 2 data TLB refill. Unit: armv8_pmuv3_0")) },
+ { I("l2i_tlb", 0x30,
+ STXT("Attributable Level 2 instruction TLB access. Unit: armv8_pmuv3_0")) },
+ { I("l2i_tlb_refill", 0x2e,
+ STXT("Attributable Level 2 instruction TLB refill. Unit: armv8_pmuv3_0")) },
+/* core imp def: */
+ { I("bpu_branch_no_hit", 0x115,
+ STXT("Predictable branch speculatively executed, unpredicted")) },
+ { I("bpu_btb_update", 0x11c,
+ STXT("Predictable branch speculatively executed, unpredicted, that"
+ " mispredict")) },
+ { I("bpu_conditional_branch_hit_btb", 0x111,
+ STXT("Predictable conditional branch speculatively executed that hit any"
+ " level of BTB")) },
+ { I("bpu_conditional_branch_hit_btb_and_mispredict", 0x117,
+ STXT("Predictable conditional branch speculatively executed that hit any"
+ " level of BTB that (direction) mispredict")) },
+ { I("bpu_flush_mem_fault", 0x121, STXT("Flushes due to memory hazards")) },
+ { I("bpu_hit_btb", 0x110,
+ STXT("Predictable branch speculatively executed that hit any level of BTB")) },
+ { I("bpu_hit_btb_and_mispredict", 0x116,
+ STXT("Predictable branch speculatively executed that hit any level of BTB"
+ " that mispredict")) },
+ { I("bpu_hit_indirect_predictor", 0x112,
+ STXT("Predictable taken branch speculatively executed that hit any level of"
+ " BTB that access the indirect predictor")) },
+ { I("bpu_hit_rsb", 0x113,
+ STXT("Predictable taken branch speculatively executed that hit any level of"
+ " BTB that access the return predictor")) },
+ { I("bpu_hit_rsb_and_mispredict", 0x119,
+ STXT("Predictable taken branch speculatively executed that hit any level of"
+ " BTB that access the return predictor that mispredict")) },
+ { I("bpu_indirect_branch_hit_btb_and_mispredict", 0x118,
+ STXT("Predictable taken branch speculatively executed that hit any level of"
+ " BTB that access the indirect predictor that mispredict")) },
+ { I("bpu_miss_rsb_and_mispredict", 0x11a,
+ STXT("Predictable taken branch speculatively executed that hit any level of"
+ " BTB that access the overflow/underflow return predictor that"
+ " mispredict")) },
+ { I("bpu_no_prediction_mispredict", 0x11b,
+ STXT("Predictable branch speculatively executed, unpredicted, that"
+ " mispredict")) },
+ { I("bpu_rsb_full_stall", 0x11d,
+ STXT("Count predict pipe stalls due to speculative return address predictor"
+ " full")) },
+ { I("bpu_unconditional_branch_miss_btb", 0x114,
+ STXT("Predictable unconditional branch speculatively executed that did not"
+ " hit any level of BTB")) },
+ { I("breakpoint_match", 0xd501,
+ STXT("GPC detected a Breakpoint instruction match")) },
+ { I("fsu_cancel", 0xd404, STXT("Uops canceled (load cancels)")) },
+ { I("fsu_div_sqrt_stall", 0xd405,
+ STXT("Count scheduler stalls due to divide/sqrt")) },
+ { I("fsu_fsx_issued", 0xd401,
+ STXT("Uops issued by the scheduler on pipe X")) },
+ { I("fsu_fsy_issued", 0xd402,
+ STXT("Uops issued by the scheduler on pipe Y")) },
+ { I("fsu_fsz_issued", 0xd403,
+ STXT("Uops issued by the scheduler on pipe Z")) },
+ { I("fsu_issued", 0xd400, STXT("Uops issued by the FSU scheduler")) },
+ { I("gpc_flush", 0x120, STXT("Flushes")) },
+ { I("gpc_swob_drain", 0xd500, STXT("Number of SWOB drains")) },
+ { I("icf_early_mis_pred", 0xd100, STXT("Early mispredict")) },
+ { I("icf_feq_full", 0xd101, STXT("FEQ full cycles")) },
+ { I("icf_inst_fifo_full", 0xd102, STXT("Instruction FIFO Full")) },
+ { I("icf_inst_spec_decode", 0x11f,
+ STXT("Macro-ops speculatively decoded")) },
+ { I("icf_pc_fifo_full", 0xd105, STXT("PC FIFO Full")) },
+ { I("icf_stall", 0xd104,
+ STXT("ICF sent 0 instructions to IDR this cycle")) },
+ { I("idr_stall_bob_id", 0xd200, STXT("Stall due to BOB ID")) },
+ { I("idr_stall_flush", 0xd206,
+ STXT("Dispatch stall due to flush (6 cycles)")) },
+ { I("idr_stall_fsu_sched", 0xd204,
+ STXT("Dispatch stall due to FSU scheduler entries")) },
+ { I("idr_stall_ixu_sched", 0xd203,
+ STXT("Dispatch stall due to IXU scheduler entries")) },
+ { I("idr_stall_lob_id", 0xd201, STXT("Dispatch stall due to LOB entries")) },
+ { I("idr_stall_rob_id", 0xd205, STXT("Dispatch stall due to ROB entries")) },
+ { I("idr_stall_sob_id", 0xd202, STXT("Dispatch stall due to SOB entries")) },
+ { I("idr_stall_swob_full", 0xd20a,
+ STXT("Number of SWOB drains triggered by system register write when SWOB"
+ " full")) },
+ { I("idr_stall_swob_raw", 0xd209,
+ STXT("Number of SWOB drains triggered by system register or special-purpose"
+ " register read-after-write or specific special-purpose register writes"
+ " that cause SWOB drain")) },
+ { I("idr_stall_swob_timeout", 0xd208,
+ STXT("Number of SWOB drains triggered by timeout")) },
+ { I("idr_stall_wfi", 0xd207, STXT("Dispatch stall due to WFI")) },
+ { I("ixu_issue_cancel", 0xd301,
+ STXT("Any uop issued was canceled for any reason")) },
+ { I("ixu_ixa_issued", 0xd304, STXT("Uops issued by the scheduler on IXA")) },
+ { I("ixu_ixa_par0_issued", 0xd305,
+ STXT("Uops issued by the scheduler on IXA Par 0")) },
+ { I("ixu_ixa_par1_issued", 0xd306,
+ STXT("Uops issued by the scheduler on IXA Par 1")) },
+ { I("ixu_ixb_issued", 0xd307, STXT("Uops issued by the scheduler on IXB")) },
+ { I("ixu_ixb_par0_issued", 0xd308,
+ STXT("Uops issued by the scheduler on IXB Par 0")) },
+ { I("ixu_ixb_par1_issued", 0xd309,
+ STXT("Uops issued by the scheduler on IXB Par 1")) },
+ { I("ixu_ixc_issued", 0xd30a, STXT("Uops issued by the scheduler on IXC")) },
+ { I("ixu_ixc_par0_issued", 0xd30b,
+ STXT("Uops issued by the scheduler on IXC Par 0")) },
+ { I("ixu_ixc_par1_issued", 0xd30c,
+ STXT("Uops issued by the scheduler on IXC Par 1")) },
+ { I("ixu_ixd_issued", 0xd30d, STXT("Uops issued by the scheduler on IXD")) },
+ { I("ixu_ixd_par0_issued", 0xd30e,
+ STXT("Uops issued by the scheduler on IXD Par 0")) },
+ { I("ixu_ixd_par1_issued", 0xd30f,
+ STXT("Uops issued by the scheduler on IXD Par 1")) },
+ { I("ixu_load_cancel", 0xd302,
+ STXT("A load wakeup to the scheduler has been cancelled")) },
+ { I("ixu_num_uops_issued", 0xd300,
+ STXT("Instructions issued by the scheduler")) },
+ { I("ixu_slow_cancel", 0xd303,
+ STXT("The scheduler had to cancel one slow Uop due to resource conflict")) },
+ { I("l1_pfetch_dist_inc", 0xd60a,
+ STXT("L1 prefetcher, distance was increased")) },
+ { I("l1_pfetch_dist_rst", 0xd609,
+ STXT("L1 prefetcher, distance was reset")) },
+ { I("l1_pfetch_entry_trained", 0xd60b,
+ STXT("L1 prefetcher, table entry is trained")) },
+ { I("l1_pfetch_l2_req", 0xd608,
+ STXT("L1 prefetcher, load prefetch to L2 generated")) },
+ { I("l1_pfetch_ld_fill", 0xd607,
+ STXT("L1 prefetcher, load prefetch fills into the L1 cache")) },
+ { I("l1_pfetch_ld_gen", 0xd606,
+ STXT("L1 prefetcher, load prefetch requests generated")) },
+ { I("l1d_tlb_miss", 0xd600, STXT("L1D TLB miss")) },
+ { I("l1i_tlb_miss", 0xd103, STXT("L1I TLB miss")) },
+ { I("l2_prefetch_refill", 0x10a,
+ STXT("Level 2 prefetch requests, refilled to L2 cache")) },
+ { I("l2_prefetch_req", 0xd703,
+ STXT("L2 prefetcher, load prefetch requests generated")) },
+ { I("l2_prefetch_upgrade", 0x10b, STXT("Level 2 prefetch requests, late")) },
+ { I("l2c_dat_crd_stall", 0x169, STXT("L2 TXDAT LCRD blocked")) },
+ { I("l2c_data_refill", 0xd702, STXT("L2 refill from D-side miss")) },
+ { I("l2c_inst_refill", 0xd701, STXT("L2 refill from I-side miss")) },
+ { I("l2c_pipe_replay", 0xd700, STXT("L2 pipeline replay")) },
+ { I("l2c_req_crd_stall", 0x16b, STXT("L2 TXREQ LCRD blocked")) },
+ { I("l2c_rsp_crd_stall", 0x16a, STXT("L2 TXRSP LCRD blocked")) },
+ { I("l2c_snoop", 0x156, STXT("Bus request sn")) },
+ { I("ld_from_st_fwd", 0xd605,
+ STXT("Load satisified from store forwarded data")) },
+ { I("lsu_st_retire_stall", 0xd60c, STXT("Store retirement pipe stall")) },
+ { I("mmu_d_otb_alloc", 0xd800, STXT("L2D OTB allocate")) },
+ { I("mmu_d_s1_walk_fault", 0xd80b, STXT("D-side Stage1 tablewalk fault")) },
+ { I("mmu_d_s2_walk_fault", 0xd80c, STXT("D-side Stage2 tablewalk fault")) },
+ { I("mmu_d_walk_steps", 0xd80d,
+ STXT("D-side Tablewalk steps or descriptor fetches")) },
+ { I("mmu_i_otb_alloc", 0xd900, STXT("L2I OTB allocate")) },
+ { I("mmu_i_s1_walk_fault", 0xd90b, STXT("I-side Stage1 tablewalk fault")) },
+ { I("mmu_i_s2_walk_fault", 0xd90c, STXT("I-side Stage2 tablewalk fault")) },
+ { I("mmu_i_walk_steps", 0xd90d,
+ STXT("I-side Tablewalk steps or descriptor fetches")) },
+ { I("msc_etm_extout0", 0x141, STXT("ETM extout bit 0")) },
+ { I("msc_etm_extout1", 0x142, STXT("ETM extout bit 1")) },
+ { I("msc_etm_extout2", 0x143, STXT("ETM extout bit 2")) },
+ { I("msc_etm_extout3", 0x144, STXT("ETM extout bit 3")) },
+ { I("ofb_full", 0xd601, STXT("OFB full cycles")) },
+ { I("stall_backend_cache", 0xd20d,
+ STXT("Dispatch stall due to L1 data cache miss")) },
+ { I("stall_backend_resource", 0xd20f,
+ STXT("Dispatch stall due to lack of any core resource")) },
+ { I("stall_backend_tlb", 0xd20e,
+ STXT("Dispatch stall due to L1 data TLB miss")) },
+ { I("stall_frontend_cache", 0xd20b,
+ STXT("Dispatch stall due to L1 instruction cache miss")) },
+ { I("stall_frontend_tlb", 0xd20c,
+ STXT("Dispatch stall due to L1 instruction TLB miss")) },
+ { I("watchpoint_match", 0xd60d,
+ STXT("LSU detected a Watchpoint data match")) },
+/* exception: */
+ { I("exc_dabort", 0x84, STXT("Exception taken, Data Abort and SError")) },
+ { I("exc_fiq", 0x87, STXT("Exception taken, FIQ")) },
+ { I("exc_hvc", 0x8a, STXT("Exception taken, Hypervisor Call")) },
+ { I("exc_irq", 0x86, STXT("Exception taken, IRQ")) },
+ { I("exc_pabort", 0x83, STXT("Exception taken, Instruction Abort")) },
+ { I("exc_return", 0xa,
+ STXT("Instruction architecturally executed, condition check pass, exception"
+ " return. Unit: armv8_pmuv3_0")) },
+ { I("exc_svc", 0x82, STXT("Exception taken, Supervisor Call")) },
+ { I("exc_taken", 0x9, STXT("Exception taken. Unit: armv8_pmuv3_0")) },
+ { I("exc_trap_dabort", 0x8c,
+ STXT("Exception taken, Data Abort or SError not taken locally")) },
+ { I("exc_trap_fiq", 0x8f, STXT("Exception taken, FIQ not taken locally")) },
+ { I("exc_trap_irq", 0x8e, STXT("Exception taken, IRQ not taken locally")) },
+ { I("exc_trap_other", 0x8d,
+ STXT("Exception taken, Other traps not taken locally")) },
+ { I("exc_trap_pabort", 0x8b,
+ STXT("Exception taken, Instruction Abort not taken locally")) },
+ { I("exc_undef", 0x81, STXT("Exception taken, Other synchronous")) },
+/* instruction: */
+ { I("ase_spec", 0x74,
+ STXT("Operation speculatively executed, Advanced SIMD instruction")) },
+ { I("br_immed_retired", 0xd,
+ STXT("Instruction architecturally executed, immediate branch. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("br_mis_pred_retired", 0x22,
+ STXT("Instruction architecturally executed, mispredicted branch. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("br_retired", 0x21,
+ STXT("Instruction architecturally executed, branch. Unit: armv8_pmuv3_0")) },
+ { I("br_return_retired", 0xe,
+ STXT("Instruction architecturally executed, condition code check pass,"
+ " procedure return. Unit: armv8_pmuv3_0")) },
+ { I("cid_write_retired", 0xb,
+ STXT("Instruction architecturally executed, condition code check pass, write"
+ " to CONTEXTIDR. Unit: armv8_pmuv3_0")) },
+ { I("crypto_spec", 0x77,
+ STXT("Operation speculatively executed, Cryptographic instruction")) },
+ { I("dmb_spec", 0x7e, STXT("Barrier speculatively executed, DMB")) },
+ { I("dp_spec", 0x73,
+ STXT("Operation speculatively executed, integer data processing")) },
+ { I("dsb_spec", 0x7d, STXT("Barrier speculatively executed, DSB")) },
+ { I("inst_retired", 0x8,
+ STXT("Instruction architecturally executed. Unit: armv8_pmuv3_0")) },
+ { I("inst_spec", 0x1b,
+ STXT("Operation speculatively executed. Unit: armv8_pmuv3_0")) },
+ { I("isb_spec", 0x7c, STXT("Barrier speculatively executed, ISB")) },
+ { I("ld_spec", 0x70, STXT("Operation speculatively executed, load")) },
+ { I("ldst_spec", 0x72,
+ STXT("Operation speculatively executed, load or store")) },
+ { I("nop_spec", 0x100, STXT("Speculatively executed, NOP")) },
+ { I("op_retired", 0x3a,
+ STXT("Micro-operation architecturally executed. Unit: armv8_pmuv3_0")) },
+ { I("op_spec", 0x3b,
+ STXT("Micro-operation speculatively executed. Unit: armv8_pmuv3_0")) },
+ { I("pc_write_retired", 0xc,
+ STXT("Instruction architecturally executed, condition code check pass,"
+ " software change of the PC. Unit: armv8_pmuv3_0")) },
+ { I("pc_write_spec", 0x76,
+ STXT("Operation speculatively executed, software change of the PC")) },
+ { I("rc_ld_spec", 0x90,
+ STXT("Release consistency operation speculatively executed, Load-Acquire")) },
+ { I("rc_st_spec", 0x91,
+ STXT("Release consistency operation speculatively executed, Store-Release")) },
+ { I("st_retired", 0x7,
+ STXT("Instruction architecturally executed, condition code check pass,"
+ " store. Unit: armv8_pmuv3_0")) },
+ { I("st_spec", 0x71, STXT("Operation speculatively executed, store")) },
+ { I("sw_incr", 0,
+ STXT("Instruction architecturally executed, Condition code check pass,"
+ " software increment")) },
+ { I("ttbr_write_retired", 0x1c,
+ STXT("Instruction architecturally executed, Condition code check pass, write"
+ " to TTBR. Unit: armv8_pmuv3_0")) },
+ { I("vfp_spec", 0x75,
+ STXT("Operation speculatively executed, floating-point instruction")) },
+/* intrinsic: */
+ { I("ldrex_spec", 0x6c,
+ STXT("Exclusive operation speculatively executed, LDREX or LDX")) },
+ { I("strex_fail_spec", 0x6e,
+ STXT("Exclusive operation speculatively executed, STREX or STX fail")) },
+ { I("strex_pass_spec", 0x6d,
+ STXT("Exclusive operation speculatively executed, STREX or STX pass")) },
+ { I("strex_spec", 0x6f,
+ STXT("Exclusive operation speculatively executed, STREX or STX")) },
+/* memory: */
+ { I("ld_align_lat", 0x4021,
+ STXT("Load with additional latency from alignment. Unit: armv8_pmuv3_0")) },
+ { I("ld_retired", 0x6,
+ STXT("Instruction architecturally executed, condition code check pass, load."
+ " Unit: armv8_pmuv3_0")) },
+ { I("ldst_align_lat", 0x4020,
+ STXT("Access with additional latency from alignment. Unit: armv8_pmuv3_0")) },
+ { I("mem_access", 0x13, STXT("Data memory access. Unit: armv8_pmuv3_0")) },
+ { I("mem_access_checked", 0x4024,
+ STXT("Checked data memory access. Unit: armv8_pmuv3_0")) },
+ { I("mem_access_checked_rd", 0x4025,
+ STXT("Checked data memory access, read. Unit: armv8_pmuv3_0")) },
+ { I("mem_access_checked_wr", 0x4026,
+ STXT("Checked data memory access, write. Unit: armv8_pmuv3_0")) },
+ { I("mem_access_rd", 0x66, STXT("Data memory access, read")) },
+ { I("mem_access_wr", 0x67, STXT("Data memory access, write")) },
+ { I("memory_error", 0x1a, STXT("Local memory error. Unit: armv8_pmuv3_0")) },
+ { I("st_align_lat", 0x4022,
+ STXT("Store with additional latency from alignment. Unit: armv8_pmuv3_0")) },
+ { I("unaligned_ld_spec", 0x68, STXT("Unaligned access, read")) },
+ { I("unaligned_ldst_spec", 0x6a, STXT("Unaligned access")) },
+ { I("unaligned_st_spec", 0x69, STXT("Unaligned access, write")) },
+/* pipeline: */
+ { I("stall", 0x3c,
+ STXT("Impacted by errata, use metrics instead - Spec update: Errata"
+ " AC03_CPU_29. Unit: armv8_pmuv3_0")) },
+ { I("stall_backend", 0x24,
+ STXT("No operation issued due to the backend. Unit: armv8_pmuv3_0")) },
+ { I("stall_backend_mem", 0x4005,
+ STXT("Memory stall cycles. Unit: armv8_pmuv3_0")) },
+ { I("stall_frontend", 0x23,
+ STXT("Impacted by errata, use metrics instead - Spec update: Errata"
+ " AC03_CPU_29. Unit: armv8_pmuv3_0")) },
+ { I("stall_slot", 0x3f, STXT("No operation sent for execution on a slot")) },
+ { I("stall_slot_backend", 0x3d,
+ STXT("No operation sent for execution on a slot due to the backend. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("stall_slot_frontend", 0x3e,
+ STXT("Impacted by errata, use metrics instead - Spec update: Errata"
+ " AC03_CPU_29. Unit: armv8_pmuv3_0")) },
+/* spe: */
+ { I("sample_collision", 0x4003,
+ STXT("Sample collided with previous sample. Unit: armv8_pmuv3_0")) },
+ { I("sample_feed", 0x4001, STXT("Sample Taken. Unit: armv8_pmuv3_0")) },
+ { I("sample_filtrate", 0x4002,
+ STXT("Sample Taken and not removed by filtering. Unit: armv8_pmuv3_0")) },
+ { I("sample_pop", 0x4000, STXT("Sample Population. Unit: armv8_pmuv3_0")) },
+ { NULL, NULL, 0, NULL }
+};
+
+#undef I
+#endif
diff --git a/gprofng/src/hwc_arm_neoverse_n1.h b/gprofng/src/hwc_arm_neoverse_n1.h
new file mode 100644
index 0000000..08378b8
--- /dev/null
+++ b/gprofng/src/hwc_arm_neoverse_n1.h
@@ -0,0 +1,220 @@
+/* Copyright (C) 2024 Free Software Foundation, Inc.
+ Contributed by Oracle.
+
+ This file is part of GNU Binutils.
+
+ 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, 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, 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#ifndef _HWC_ARM_NEOVERSEN1_H_
+#define _HWC_ARM_NEOVERSEN1_H_
+
+#define I(nm, event, mtr) INIT_HWC(nm, mtr, (event), PERF_TYPE_RAW)
+
+static Hwcentry arm_neoverse_n1_list[] = {
+ HWC_GENERIC
+/* bus: */
+ { I("bus_access", 0x19,
+ STXT("Attributable Bus access. Unit: armv8_pmuv3_0")) },
+ { I("bus_access_rd", 0x60, STXT("Bus access read")) },
+ { I("bus_access_wr", 0x61, STXT("Bus access write")) },
+ { I("bus_cycles", 0x1d, STXT("Bus cycle. Unit: armv8_pmuv3_0")) },
+/* exception: */
+ { I("exc_dabort", 0x84, STXT("Exception taken, Data Abort and SError")) },
+ { I("exc_fiq", 0x87, STXT("Exception taken, FIQ")) },
+ { I("exc_hvc", 0x8a, STXT("Exception taken, Hypervisor Call")) },
+ { I("exc_irq", 0x86, STXT("Exception taken, IRQ")) },
+ { I("exc_pabort", 0x83, STXT("Exception taken, Instruction Abort")) },
+ { I("exc_return", 0xa,
+ STXT("Instruction architecturally executed, condition check pass, exception"
+ " return. Unit: armv8_pmuv3_0")) },
+ { I("exc_smc", 0x88, STXT("Exception taken, Secure Monitor Call")) },
+ { I("exc_svc", 0x82, STXT("Exception taken, Supervisor Call")) },
+ { I("exc_taken", 0x9, STXT("Exception taken. Unit: armv8_pmuv3_0")) },
+ { I("exc_trap_dabort", 0x8c,
+ STXT("Exception taken, Data Abort or SError not taken locally")) },
+ { I("exc_trap_fiq", 0x8f, STXT("Exception taken, FIQ not taken locally")) },
+ { I("exc_trap_irq", 0x8e, STXT("Exception taken, IRQ not taken locally")) },
+ { I("exc_trap_other", 0x8d,
+ STXT("Exception taken, Other traps not taken locally")) },
+ { I("exc_trap_pabort", 0x8b,
+ STXT("Exception taken, Instruction Abort not taken locally")) },
+ { I("exc_undef", 0x81, STXT("Exception taken, Other synchronous")) },
+/* general: */
+ { I("cpu_cycles", 0x11, STXT("Cycle. Unit: armv8_pmuv3_0")) },
+/* l1d_cache: */
+ { I("l1d_cache", 0x4,
+ STXT("Level 1 data cache access. Unit: armv8_pmuv3_0")) },
+ { I("l1d_cache_inval", 0x48, STXT("L1D cache invalidate")) },
+ { I("l1d_cache_rd", 0x40, STXT("L1D cache access, read")) },
+ { I("l1d_cache_refill", 0x3,
+ STXT("Level 1 data cache refill. Unit: armv8_pmuv3_0")) },
+ { I("l1d_cache_refill_inner", 0x44, STXT("L1D cache refill, inner")) },
+ { I("l1d_cache_refill_outer", 0x45, STXT("L1D cache refill, outer")) },
+ { I("l1d_cache_refill_rd", 0x42, STXT("L1D cache refill, read")) },
+ { I("l1d_cache_refill_wr", 0x43, STXT("L1D cache refill, write")) },
+ { I("l1d_cache_wb", 0x15,
+ STXT("Attributable Level 1 data cache write-back. Unit: armv8_pmuv3_0")) },
+ { I("l1d_cache_wb_clean", 0x47,
+ STXT("L1D cache Write-Back, cleaning and coherency")) },
+ { I("l1d_cache_wb_victim", 0x46, STXT("L1D cache Write-Back, victim")) },
+ { I("l1d_cache_wr", 0x41, STXT("L1D cache access, write")) },
+/* l1i_cache: */
+ { I("l1i_cache", 0x14,
+ STXT("Attributable Level 1 instruction cache access. Unit: armv8_pmuv3_0")) },
+ { I("l1i_cache_refill", 0x1,
+ STXT("Level 1 instruction cache refill. Unit: armv8_pmuv3_0")) },
+/* l2_cache: */
+ { I("l2d_cache", 0x16,
+ STXT("Level 2 data cache access. Unit: armv8_pmuv3_0")) },
+ { I("l2d_cache_allocate", 0x20,
+ STXT("Attributable Level 2 data cache allocation without refill. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("l2d_cache_inval", 0x58, STXT("L2D cache invalidate")) },
+ { I("l2d_cache_rd", 0x50, STXT("L2D cache access, read")) },
+ { I("l2d_cache_refill", 0x17,
+ STXT("Level 2 data refill. Unit: armv8_pmuv3_0")) },
+ { I("l2d_cache_refill_rd", 0x52, STXT("L2D cache refill, read")) },
+ { I("l2d_cache_refill_wr", 0x53, STXT("L2D cache refill, write")) },
+ { I("l2d_cache_wb", 0x18,
+ STXT("Attributable Level 2 data cache write-back. Unit: armv8_pmuv3_0")) },
+ { I("l2d_cache_wb_clean", 0x57,
+ STXT("L2D cache Write-Back, cleaning and coherency")) },
+ { I("l2d_cache_wb_victim", 0x56, STXT("L2D cache Write-Back, victim")) },
+ { I("l2d_cache_wr", 0x51, STXT("L2D cache access, write")) },
+/* l3_cache: */
+ { I("l3d_cache", 0x2b,
+ STXT("Attributable Level 3 data cache access. Unit: armv8_pmuv3_0")) },
+ { I("l3d_cache_allocate", 0x29,
+ STXT("Attributable Level 3 data cache allocation without refill. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("l3d_cache_rd", 0xa0,
+ STXT("Attributable Level 3 data or unified cache access, read")) },
+ { I("l3d_cache_refill", 0x2a,
+ STXT("Attributable Level 3 data cache refill. Unit: armv8_pmuv3_0")) },
+/* ll_cache: */
+ { I("ll_cache_miss_rd", 0x37, STXT("Last level cache miss, read")) },
+ { I("ll_cache_rd", 0x36,
+ STXT("Attributable Last level cache memory read")) },
+/* memory: */
+ { I("mem_access", 0x13, STXT("Data memory access. Unit: armv8_pmuv3_0")) },
+ { I("mem_access_rd", 0x66, STXT("Data memory access, read")) },
+ { I("mem_access_wr", 0x67, STXT("Data memory access, write")) },
+ { I("memory_error", 0x1a, STXT("Local memory error. Unit: armv8_pmuv3_0")) },
+ { I("remote_access", 0x31,
+ STXT("Access to another socket in a multi-socket system")) },
+/* retired: */
+ { I("br_mis_pred_retired", 0x22,
+ STXT("Instruction architecturally executed, mispredicted branch. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("br_retired", 0x21,
+ STXT("Instruction architecturally executed, branch. Unit: armv8_pmuv3_0")) },
+ { I("cid_write_retired", 0xb,
+ STXT("Instruction architecturally executed, condition code check pass, write"
+ " to CONTEXTIDR. Unit: armv8_pmuv3_0")) },
+ { I("inst_retired", 0x8,
+ STXT("Instruction architecturally executed. Unit: armv8_pmuv3_0")) },
+ { I("sw_incr", 0,
+ STXT("Instruction architecturally executed, Condition code check pass,"
+ " software increment. Unit: armv8_pmuv3_0")) },
+ { I("ttbr_write_retired", 0x1c,
+ STXT("Instruction architecturally executed, Condition code check pass, write"
+ " to TTBR. Unit: armv8_pmuv3_0")) },
+/* spe: */
+ { I("sample_collision", 0x4003,
+ STXT("Sample collided with previous sample. Unit: armv8_pmuv3_0")) },
+ { I("sample_feed", 0x4001, STXT("Sample Taken. Unit: armv8_pmuv3_0")) },
+ { I("sample_filtrate", 0x4002,
+ STXT("Sample Taken and not removed by filtering. Unit: armv8_pmuv3_0")) },
+ { I("sample_pop", 0x4000, STXT("Sample Population. Unit: armv8_pmuv3_0")) },
+/* spec_operation: */
+ { I("ase_spec", 0x74,
+ STXT("Operation speculatively executed, Advanced SIMD instruction")) },
+ { I("br_immed_spec", 0x78,
+ STXT("Branch speculatively executed, immediate branch")) },
+ { I("br_indirect_spec", 0x7a,
+ STXT("Branch speculatively executed, indirect branch")) },
+ { I("br_mis_pred", 0x10,
+ STXT("Mispredicted or not predicted branch speculatively executed. Unit:"
+ " armv8_pmuv3_0")) },
+ { I("br_pred", 0x12,
+ STXT("Predictable branch speculatively executed. Unit: armv8_pmuv3_0")) },
+ { I("br_return_spec", 0x79,
+ STXT("Branch speculatively executed, procedure return")) },
+ { I("crypto_spec", 0x77,
+ STXT("Operation speculatively executed, Cryptographic instruction")) },
+ { I("dmb_spec", 0x7e, STXT("Barrier speculatively executed, DMB")) },
+ { I("dp_spec", 0x73,
+ STXT("Operation speculatively executed, integer data processing")) },
+ { I("dsb_spec", 0x7d, STXT("Barrier speculatively executed, DSB")) },
+ { I("inst_spec", 0x1b,
+ STXT("Operation speculatively executed. Unit: armv8_pmuv3_0")) },
+ { I("isb_spec", 0x7c, STXT("Barrier speculatively executed, ISB")) },
+ { I("ld_spec", 0x70, STXT("Operation speculatively executed, load")) },
+ { I("ldrex_spec", 0x6c,
+ STXT("Exclusive operation speculatively executed, LDREX or LDX")) },
+ { I("pc_write_spec", 0x76,
+ STXT("Operation speculatively executed, software change of the PC")) },
+ { I("rc_ld_spec", 0x90,
+ STXT("Release consistency operation speculatively executed, Load-Acquire")) },
+ { I("rc_st_spec", 0x91,
+ STXT("Release consistency operation speculatively executed, Store-Release")) },
+ { I("st_spec", 0x71, STXT("Operation speculatively executed, store")) },
+ { I("strex_fail_spec", 0x6e,
+ STXT("Exclusive operation speculatively executed, STREX or STX fail")) },
+ { I("strex_pass_spec", 0x6d,
+ STXT("Exclusive operation speculatively executed, STREX or STX pass")) },
+ { I("strex_spec", 0x6f,
+ STXT("Exclusive operation speculatively executed, STREX or STX")) },
+ { I("unaligned_ld_spec", 0x68, STXT("Unaligned access, read")) },
+ { I("unaligned_ldst_spec", 0x6a, STXT("Unaligned access")) },
+ { I("unaligned_st_spec", 0x69, STXT("Unaligned access, write")) },
+ { I("vfp_spec", 0x75,
+ STXT("Operation speculatively executed, floating-point instruction")) },
+/* stall: */
+ { I("stall_backend", 0x24,
+ STXT("No operation issued due to the backend. Unit: armv8_pmuv3_0")) },
+ { I("stall_frontend", 0x23,
+ STXT("No operation issued because of the frontend. Unit: armv8_pmuv3_0")) },
+/* tlb: */
+ { I("dtlb_walk", 0x34,
+ STXT("Access to data TLB causes a translation table walk")) },
+ { I("itlb_walk", 0x35,
+ STXT("Access to instruction TLB that causes a translation table walk")) },
+ { I("l1d_tlb", 0x25,
+ STXT("Attributable Level 1 data or unified TLB access. Unit: armv8_pmuv3_0")) },
+ { I("l1d_tlb_rd", 0x4e, STXT("L1D tlb access, read")) },
+ { I("l1d_tlb_refill", 0x5,
+ STXT("Attributable Level 1 data TLB refill. Unit: armv8_pmuv3_0")) },
+ { I("l1d_tlb_refill_rd", 0x4c, STXT("L1D tlb refill, read")) },
+ { I("l1d_tlb_refill_wr", 0x4d, STXT("L1D tlb refill, write")) },
+ { I("l1d_tlb_wr", 0x4f, STXT("L1D tlb access, write")) },
+ { I("l1i_tlb", 0x26,
+ STXT("Attributable Level 1 instruction TLB access. Unit: armv8_pmuv3_0")) },
+ { I("l1i_tlb_refill", 0x2,
+ STXT("Attributable Level 1 instruction TLB refill. Unit: armv8_pmuv3_0")) },
+ { I("l2d_tlb", 0x2f,
+ STXT("Attributable Level 2 data or unified TLB access. Unit: armv8_pmuv3_0")) },
+ { I("l2d_tlb_rd", 0x5e, STXT("L2D cache access, read")) },
+ { I("l2d_tlb_refill", 0x2d,
+ STXT("Attributable Level 2 data TLB refill. Unit: armv8_pmuv3_0")) },
+ { I("l2d_tlb_refill_rd", 0x5c, STXT("L2D cache refill, read")) },
+ { I("l2d_tlb_refill_wr", 0x5d, STXT("L2D cache refill, write")) },
+ { I("l2d_tlb_wr", 0x5f, STXT("L2D cache access, write")) },
+ { NULL, NULL, 0, NULL }
+};
+
+#undef I
+#endif
diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Makefile.skel
index 8ea994d..2c98720 100644
--- a/gprofng/testsuite/lib/Makefile.skel
+++ b/gprofng/testsuite/lib/Makefile.skel
@@ -23,7 +23,7 @@ CFLAGS = -g -Wall
SHAREDOPT = -fpic -shared
#JAVABIN = /usr/java/latest/bin
-JAVABIN = $(shell dirname `which java`)
+JAVABIN = $(shell dirname `command -v java`)
JAVA = $(JAVABIN)/java
JAVAC = $(JAVABIN)/javac
diff --git a/include/coff/i386.h b/include/coff/i386.h
index 982c152..a576d2a 100644
--- a/include/coff/i386.h
+++ b/include/coff/i386.h
@@ -17,11 +17,7 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-#include "coff/external.h"
-
-#define COFF_PAGE_SIZE 0x1000
+#include "coff/x86.h"
/* Bits for f_flags:
F_RELFLG Relocation info stripped from file
@@ -43,15 +39,6 @@
#define LYNXCOFFMAGIC 0415
-/* .NET DLLs XOR the Machine number (above) with an override to
- indicate that the DLL contains OS-specific machine code rather
- than just IL or bytecode. See
- https://github.com/dotnet/coreclr/blob/6f7aa7967c607b8c667518314ab937c0d7547025/src/inc/pedecoder.h#L94-L107. */
-#define IMAGE_FILE_MACHINE_NATIVE_APPLE_OVERRIDE 0x4644
-#define IMAGE_FILE_MACHINE_NATIVE_FREEBSD_OVERRIDE 0xadc4
-#define IMAGE_FILE_MACHINE_NATIVE_LINUX_OVERRIDE 0x7b79
-#define IMAGE_FILE_MACHINE_NATIVE_NETBSD_OVERRIDE 0x1993
-
/* Used in some .NET DLLs that target a specific OS. */
#define I386_APPLE_MAGIC (I386MAGIC ^ IMAGE_FILE_MACHINE_NATIVE_APPLE_OVERRIDE)
#define I386_FREEBSD_MAGIC (I386MAGIC ^ IMAGE_FILE_MACHINE_NATIVE_FREEBSD_OVERRIDE)
@@ -72,25 +59,6 @@
#define STMAGIC 0401 /* Target shlib. */
#define SHMAGIC 0443 /* Host shlib. */
-/* Define some NT default values. */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/* Relocation directives. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
/* i386 Relocations. */
#define R_DIR32 6
diff --git a/include/coff/pe.h b/include/coff/pe.h
index 37446e4..9d79090 100644
--- a/include/coff/pe.h
+++ b/include/coff/pe.h
@@ -338,6 +338,7 @@ typedef struct
#define IMPORT_NAME 1
#define IMPORT_NAME_NOPREFIX 2
#define IMPORT_NAME_UNDECORATE 3
+#define IMPORT_NAME_EXPORTAS 4
/* Weak external characteristics. */
#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
diff --git a/include/coff/x86.h b/include/coff/x86.h
new file mode 100644
index 0000000..b62b176
--- /dev/null
+++ b/include/coff/x86.h
@@ -0,0 +1,59 @@
+/* COFF information shared by Intel 386/486 and AMD 64 (aka x86-64).
+ Copyright (C) 2001-2024 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#ifndef COFF_X86_H
+#define COFF_X86_H
+
+#define L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+
+#include "coff/external.h"
+
+#define COFF_PAGE_SIZE 0x1000
+
+/* .NET DLLs XOR the Machine number (above) with an override to
+ indicate that the DLL contains OS-specific machine code rather
+ than just IL or bytecode. See
+ https://github.com/dotnet/coreclr/blob/6f7aa7967c607b8c667518314ab937c0d7547025/src/inc/pedecoder.h#L94-L107. */
+#define IMAGE_FILE_MACHINE_NATIVE_APPLE_OVERRIDE 0x4644
+#define IMAGE_FILE_MACHINE_NATIVE_FREEBSD_OVERRIDE 0xadc4
+#define IMAGE_FILE_MACHINE_NATIVE_LINUX_OVERRIDE 0x7b79
+#define IMAGE_FILE_MACHINE_NATIVE_NETBSD_OVERRIDE 0x1993
+
+/* Define some NT default values. */
+/* #define NT_IMAGE_BASE 0x400000 moved to internal.h. */
+#define NT_SECTION_ALIGNMENT 0x1000
+#define NT_FILE_ALIGNMENT 0x200
+#define NT_DEF_RESERVE 0x100000
+#define NT_DEF_COMMIT 0x1000
+
+/* Relocation directives. */
+
+struct external_reloc
+{
+ char r_vaddr[4];
+ char r_symndx[4];
+ char r_type[2];
+};
+
+#define RELOC struct external_reloc
+#define RELSZ 10
+
+#endif /* COFF_X86_H */
diff --git a/include/coff/x86_64.h b/include/coff/x86_64.h
index 72f3417..76b914f 100644
--- a/include/coff/x86_64.h
+++ b/include/coff/x86_64.h
@@ -23,24 +23,10 @@
#ifndef COFF_X86_64_H
#define COFF_X86_64_H
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-
-#include "coff/external.h"
-
-#define COFF_PAGE_SIZE 0x1000
+#include "coff/x86.h"
#define AMD64MAGIC 0x8664
-/* .NET DLLs XOR the Machine number (above) with an override to
- indicate that the DLL contains OS-specific machine code rather
- than just IL or bytecode. See
- https://github.com/dotnet/coreclr/blob/6f7aa7967c607b8c667518314ab937c0d7547025/src/inc/pedecoder.h#L94-L107. */
-#define IMAGE_FILE_MACHINE_NATIVE_APPLE_OVERRIDE 0x4644
-#define IMAGE_FILE_MACHINE_NATIVE_FREEBSD_OVERRIDE 0xadc4
-#define IMAGE_FILE_MACHINE_NATIVE_LINUX_OVERRIDE 0x7b79
-#define IMAGE_FILE_MACHINE_NATIVE_NETBSD_OVERRIDE 0x1993
-
/* Used in some .NET DLLs that target a specific OS. */
#define AMD64_APPLE_MAGIC (AMD64MAGIC ^ IMAGE_FILE_MACHINE_NATIVE_APPLE_OVERRIDE)
#define AMD64_FREEBSD_MAGIC (AMD64MAGIC ^ IMAGE_FILE_MACHINE_NATIVE_FREEBSD_OVERRIDE)
@@ -60,25 +46,6 @@
#define STMAGIC 0401 /* Target shlib. */
#define SHMAGIC 0443 /* Host shlib. */
-/* Define some NT default values. */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h. */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/* Relocation directives. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
/* X86-64 relocations. */
#define R_AMD64_ABS 0 /* Reference is absolute, no relocation is necessary. */
#define R_AMD64_DIR64 1 /* 64-bit address (VA). */
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 5e16fe2..4a5d363 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -516,237 +516,241 @@ mips_opcode_32bit_p (const struct mips_opcode *mo)
return mo->mask >> 16 != 0;
}
-/* These are the characters which may appear in the args field of an
- instruction. They appear in the order in which the fields appear
- when the instruction is used. Commas and parentheses in the args
- string are ignored when assembling, and written into the output
+/* These are the characters which may appear in the args field of a
+ regular MIPS instruction. They appear in the order in which the fields
+ appear when the instruction is used. Commas and parentheses in the
+ args string are ignored when assembling, and written into the output
when disassembling.
- Each of these characters corresponds to a mask field defined above.
-
- "1" 5 bit sync type (OP_*_STYPE)
- "<" 5 bit shift amount (OP_*_SHAMT)
- ">" shift amount between 32 and 63, stored after subtracting 32 (OP_*_SHAMT)
- "a" 26 bit target address (OP_*_TARGET)
- "+i" likewise, but flips bit 0
- "b" 5 bit base register (OP_*_RS)
- "c" 10 bit breakpoint code (OP_*_CODE)
- "d" 5 bit destination register specifier (OP_*_RD)
- "h" 5 bit prefx hint (OP_*_PREFX)
- "i" 16 bit unsigned immediate (OP_*_IMMEDIATE)
- "j" 16 bit signed immediate (OP_*_DELTA)
- "k" 5 bit cache opcode in target register position (OP_*_CACHE)
- "o" 16 bit signed offset (OP_*_DELTA)
- "p" 16 bit PC relative branch target address (OP_*_DELTA)
- "q" 10 bit extra breakpoint code (OP_*_CODE2)
- "r" 5 bit same register used as both source and target (OP_*_RS)
- "s" 5 bit source register specifier (OP_*_RS)
- "t" 5 bit target register (OP_*_RT)
- "u" 16 bit upper 16 bits of address (OP_*_IMMEDIATE)
- "v" 5 bit same register used as both source and destination (OP_*_RS)
- "w" 5 bit same register used as both target and destination (OP_*_RT)
- "U" 5 bit same destination register in both OP_*_RD and OP_*_RT
- (used by clo and clz)
- "C" 25 bit coprocessor function code (OP_*_COPZ)
- "B" 20 bit syscall/breakpoint function code (OP_*_CODE20)
- "J" 19 bit wait function code (OP_*_CODE19)
- "x" accept and ignore register name
- "z" must be zero register
- "K" 5 bit Hardware Register (rdhwr instruction) (OP_*_RD)
- "+A" 5 bit ins/ext/dins/dext/dinsm/dextm position, which becomes
- LSB (OP_*_SHAMT; OP_*_EXTLSB or OP_*_STYPE may be used for
- microMIPS compatibility).
+ "1" 5-bit SYNC type at bit 6.
+ "<" 5-bit shift amount at bit 6 (SHAMT).
+ ">" Shift amount between 32 and 63, stored after subtracting 32, at bit 6
+ (SHAMT).
+ "a" 26-bit target address at bit 0 (TARGET).
+ "+i" Likewise, but flips bit 0.
+ "b" 5-bit base register at bit 21 (RS).
+ "c" 10-bit breakpoint code at bit 16.
+ "d" 5-bit destination register at bit 11 (RD).
+ "h" 5-bit PREFX hint at bit 11.
+ "i" 16-bit unsigned immediate at bit 0 (IMMEDIATE).
+ "j" 16-bit signed immediate at bit 0 (DELTA).
+ "k" 5-bit CACHE opcode in target register position at bit 16.
+ "o" 16-bit signed offset at bit 0 (DELTA).
+ "p" 16-bit PC relative branch target address at bit 0 (DELTA).
+ "q" 10-bit extra breakpoint code at bit 6.
+ "r" 5-bit same register used as both source and target at bit 21 (RS).
+ "s" 5-bit source register at bit 21 (RS).
+ "t" 5-bit target register at bit 16 (RT).
+ "u" 16-bit upper 16 bits of address at bit 0 (IMMEDIATE).
+ "v" 5-bit same register used as both source and destination at bit 21 (RS).
+ "w" 5-bit same register used as both target and destination at bit 16 (RT).
+ "U" 5-bit same destination register at both bit 11 and 16 (both RD and RT)
+ (used by CLO and CLZ).
+ "C" 25-bit coprocessor function code at bit 0.
+ "B" 20-bit syscall/breakpoint function code at bit 6.
+ "J" 19-bit WAIT function code at bit 6.
+ "x" Accept and ignore register name.
+ "z" Must be zero register.
+ "K" 5-bit Hardware Register (RDHWR instruction) at bit 11 (RD).
+ "+A" 5-bit INS/EXT/DINS/DEXT/DINSM/DEXTM position at bit 6,
+ which becomes LSB (SHAMT).
Enforces: 0 <= pos < 32.
- "+B" 5 bit ins/dins size, which becomes MSB (OP_*_INSMSB).
+ "+B" 5-bit INS/DINS size at bit 11, which becomes MSB.
Requires that "+A" or "+E" occur first to set position.
Enforces: 0 < (pos+size) <= 32.
- "+C" 5 bit ext/dext size, which becomes MSBD (OP_*_EXTMSBD).
+ "+C" 5-bit EXT/DEXT size at bit 11, which becomes MSBD.
Requires that "+A" or "+E" occur first to set position.
Enforces: 0 < (pos+size) <= 32.
- (Also used by "dext" w/ different limits, but limits for
+ (Also used by DEXT w/ different limits, but limits for
that are checked by the M_DEXT macro.)
- "+E" 5 bit dinsu/dextu position, which becomes LSB-32 (OP_*_SHAMT).
+ "+E" 5-bit DINSU/DEXTU position at bit 6, which becomes LSB-32 (SHAMT).
Enforces: 32 <= pos < 64.
- "+F" 5 bit "dinsm/dinsu" size, which becomes MSB-32 (OP_*_INSMSB).
+ "+F" 5-bit DINSM/DINSU size at bit 11, which becomes MSB-32.
Requires that "+A" or "+E" occur first to set position.
Enforces: 32 < (pos+size) <= 64.
- "+G" 5 bit "dextm" size, which becomes MSBD-32 (OP_*_EXTMSBD).
+ "+G" 5-bit DEXTM size at bit 11, which becomes MSBD-32.
Requires that "+A" or "+E" occur first to set position.
Enforces: 32 < (pos+size) <= 64.
- "+H" 5 bit "dextu" size, which becomes MSBD (OP_*_EXTMSBD).
+ "+H" 5-bit DEXTU size at bit 11, which becomes MSBD.
Requires that "+A" or "+E" occur first to set position.
Enforces: 32 < (pos+size) <= 64.
Floating point instructions:
- "D" 5 bit destination register (OP_*_FD)
- "M" 3 bit compare condition code (OP_*_CCC) (only used for mips4 and up)
- "N" 3 bit branch condition code (OP_*_BCC) (only used for mips4 and up)
- "S" 5 bit fs source 1 register (OP_*_FS)
- "T" 5 bit ft source 2 register (OP_*_FT)
- "R" 5 bit fr source 3 register (OP_*_FR)
- "V" 5 bit same register used as floating source and destination (OP_*_FS)
- "W" 5 bit same register used as floating target and destination (OP_*_FT)
+ "D" 5-bit destination register at bit 6 (FD).
+ "M" 3-bit compare condition code at bit 8 (only used for mips4 and up).
+ "N" 3-bit branch condition code at bit 18 (only used for mips4 and up).
+ "S" 5-bit fs source 1 register at bit 11 (FS).
+ "T" 5-bit ft source 2 register at bit 16 (FT).
+ "R" 5-bit fr source 3 register at bit 21 (FR).
+ "V" 5-bit same register used as floating source and destination at bit 11
+ (FS).
+ "W" 5-bit same register used as floating target and destination at bit 16
+ (FT).
Coprocessor instructions:
- "E" 5 bit target register (OP_*_RT)
- "G" 5 bit destination register (OP_*_RD)
- "H" 3 bit sel field for (d)mtc* and (d)mfc* (OP_*_SEL)
- "P" 5 bit performance-monitor register (OP_*_PERFREG)
- "e" 5 bit vector register byte specifier (OP_*_VECBYTE)
- "g" 5 bit control destination register (OP_*_RD)
- "%" 3 bit immediate vr5400 vector alignment operand (OP_*_VECALIGN)
+ "E" 5-bit target register at bit 16 (RT).
+ "G" 5-bit destination register at bit 11 (RD).
+ "H" 3-bit sel field for (D)MTC* and (D)MFC* at bit 0.
+ "P" 5-bit performance-monitor register at bit 1.
+ "e" 3-bit vector register byte specifier at bit 22.
+ "g" 5-bit control destination register at bit 11 (RD).
+ "%" 3-bit immediate vr5400 vector alignment operand at bit 21.
Macro instructions:
- "A" General 32 bit expression
- "I" 32 bit immediate (value placed in imm_expr).
- "F" 64 bit floating point constant in .rdata
- "L" 64 bit floating point constant in .lit8
- "f" 32 bit floating point constant
- "l" 32 bit floating point constant in .lit4
+ "A" General 32-bit expression.
+ "I" 32-bit immediate (value placed in imm_expr).
+ "F" 64-bit floating point constant in .rdata.
+ "L" 64-bit floating point constant in .lit8.
+ "f" 32-bit floating point constant.
+ "l" 32-bit floating point constant in .lit4.
MDMX and VR5400 instruction operands (note that while these use the
FP register fields, the MDMX instructions accept both $fN and $vN names
for the registers):
- "O" alignment offset (OP_*_ALN)
- "Q" vector/scalar/immediate source (OP_*_VSEL and OP_*_FT)
- "X" destination register (OP_*_FD)
- "Y" source register (OP_*_FS)
- "Z" source register (OP_*_FT)
+ "O" 3-bit alignment offset at bit 21.
+ "Q" 10-bit vector/scalar/immediate source at bit 16.
+ "X" 5-bit destination register at bit 6 (FD).
+ "Y" 5-bit source register at bit 11 (FS).
+ "Z" 5-bit source register at bit 16 (FT).
R5900 VU0 Macromode instructions:
- "+5" 5 bit floating point register (FD)
- "+6" 5 bit floating point register (FS)
- "+7" 5 bit floating point register (FT)
- "+8" 5 bit integer register (FD)
- "+9" 5 bit integer register (FS)
- "+0" 5 bit integer register (FT)
- "+K" match an existing 4-bit channel mask starting at bit 21
- "+L" 2-bit channel index starting at bit 21
- "+M" 2-bit channel index starting at bit 23
- "+N" match an existing 2-bit channel index starting at bit 0
- "+f" 15 bit immediate for VCALLMS
- "+g" 5 bit signed immediate for VIADDI
- "+m" $ACC register (syntax only)
- "+q" $Q register (syntax only)
- "+r" $R register (syntax only)
- "+y" $I register (syntax only)
- "#+" "++" decorator in ($reg++) sequence
- "#-" "--" decorator in (--$reg) sequence
+ "+5" 5-bit floating point register at bit 6 (FD).
+ "+6" 5-bit floating point register at bit 11 (FS).
+ "+7" 5-bit floating point register at bit 16 (FT).
+ "+8" 5-bit integer register at bit 6 (FD).
+ "+9" 5-bit integer register at bit 11 (FS).
+ "+0" 5-bit integer register at bit 16 (FT).
+ "+K" Match an existing 4-bit channel mask starting at bit 21.
+ "+L" 2-bit channel index starting at bit 21.
+ "+M" 2-bit channel index starting at bit 23.
+ "+N" Match an existing 2-bit channel index starting at bit 0.
+ "+f" 15-bit immediate for VCALLMS at bit 6.
+ "+g" 5-bit signed immediate for VIADDI at bit 6.
+ "+m" $ACC register (syntax only).
+ "+q" $Q register (syntax only).
+ "+r" $R register (syntax only).
+ "+y" $I register (syntax only).
+ "#+" "++" decorator in ($reg++) sequence.
+ "#-" "--" decorator in (--$reg) sequence.
DSP ASE usage:
- "2" 2 bit unsigned immediate for byte align (OP_*_BP)
- "3" 3 bit unsigned immediate (OP_*_SA3)
- "4" 4 bit unsigned immediate (OP_*_SA4)
- "5" 8 bit unsigned immediate (OP_*_IMM8)
- "6" 5 bit unsigned immediate (OP_*_RS)
- "7" 2 bit dsp accumulator register (OP_*_DSPACC)
- "8" 6 bit unsigned immediate (OP_*_WRDSP)
- "9" 2 bit dsp accumulator register (OP_*_DSPACC_S)
- "0" 6 bit signed immediate (OP_*_DSPSFT)
- ":" 7 bit signed immediate (OP_*_DSPSFT_7)
- "'" 6 bit unsigned immediate (OP_*_RDDSP)
- "@" 10 bit signed immediate (OP_*_IMM10)
+ "2" 2-bit unsigned immediate for byte align at bit 11.
+ "3" 3-bit unsigned immediate at bit 21.
+ "4" 4-bit unsigned immediate at bit 21.
+ "5" 8-bit unsigned immediate at bit 16.
+ "6" 5-bit unsigned immediate at bit 21 (RS).
+ "7" 2-bit DSP accumulator register at bit 11.
+ "8" 6-bit unsigned immediate at bit 11.
+ "9" 2-bit DSP accumulator register at bit 21.
+ "0" 6-bit signed immediate at bit 20.
+ ":" 7-bit signed immediate at bit 19.
+ "'" 6-bit unsigned immediate at bit 16.
+ "@" 10-bit signed immediate at bit 16.
MT ASE usage:
- "!" 1 bit usermode flag (OP_*_MT_U)
- "$" 1 bit load high flag (OP_*_MT_H)
- "*" 2 bit dsp/smartmips accumulator register (OP_*_MTACC_T)
- "&" 2 bit dsp/smartmips accumulator register (OP_*_MTACC_D)
- "y" 5 bit control target register (OP_*_RT)
+ "!" 1-bit usermode flag at bit 5.
+ "$" 1-bit load high flag at bit 4.
+ "*" 2-bit DSP/SmartMIPS accumulator register at bit 18.
+ "&" 2-bit DSP/SmartMIPS accumulator register at bit 13.
+ "y" 5-bit control target register at bit 16 (RT).
MCU ASE usage:
- "~" 12 bit offset (OP_*_OFFSET12)
- "\" 3 bit position for aset and aclr (OP_*_3BITPOS)
+ "~" 12-bit offset at bit 0.
+ "\" 3-bit position for ASET and ACLR at bit 12.
VIRT ASE usage:
- "+J" 10-bit hypcall code (OP_*CODE10)
+ "+J" 10-bit HYPCALL code at bit 11.
UDI immediates:
- "+1" UDI immediate bits 6-10
- "+2" UDI immediate bits 6-15
- "+3" UDI immediate bits 6-20
- "+4" UDI immediate bits 6-25
+ "+1" UDI immediate bits 6-10.
+ "+2" UDI immediate bits 6-15.
+ "+3" UDI immediate bits 6-20.
+ "+4" UDI immediate bits 6-25.
Octeon:
- "+x" Bit index field of bbit. Enforces: 0 <= index < 32.
- "+X" Bit index field of bbit aliasing bbit32. Matches if 32 <= index < 64,
- otherwise skips to next candidate.
- "+p" Position field of cins/cins32/exts/exts32. Enforces 0 <= pos < 32.
- "+P" Position field of cins/exts aliasing cins32/exts32. Matches if
- 32 <= pos < 64, otherwise skips to next candidate.
- "+Q" Immediate field of seqi/snei. Enforces -512 <= imm < 512.
- "+s" Length-minus-one field of cins32/exts32. Requires msb position
- of the field to be <= 31.
- "+S" Length-minus-one field of cins/exts. Requires msb position
- of the field to be <= 63.
+ "+x" Bit index field of BBITx at bit 16.
+ Enforces: 0 <= index < 32.
+ "+X" Bit index field of BBITx aliasing BBITx32 at bit 16.
+ Matches if 32 <= index < 64, otherwise skips to next candidate.
+ "+p" Position field of CINS/CINS32/EXTS/EXTS32 at bit 6.
+ Enforces 0 <= pos < 32.
+ "+P" Position field of CINS/EXTS aliasing CINS32/EXTS32 at bit 6.
+ Matches if 32 <= pos < 64, otherwise skips to next candidate.
+ "+Q" Immediate field of SEQI/SNEI at bit 6.
+ Enforces -512 <= imm < 512.
+ "+s" Length-minus-one field of CINS32/EXTS32 at bit 11.
+ Requires MSB position of the field to be <= 31.
+ "+S" Length-minus-one field of CINS/EXTS at bit 11.
+ Requires MSB position of the field to be <= 63.
Loongson-ext ASE:
- "+a" 8-bit signed offset in bit 6 (OP_*_OFFSET_A)
- "+b" 8-bit signed offset in bit 3 (OP_*_OFFSET_B)
- "+c" 9-bit signed offset in bit 6 (OP_*_OFFSET_C)
- "+z" 5-bit rz register (OP_*_RZ)
- "+Z" 5-bit fz register (OP_*_FZ)
+ "+a" 8-bit signed offset at bit 6.
+ "+b" 8-bit signed offset at bit 3.
+ "+c" 9-bit signed offset at bit 6.
+ "+z" 5-bit rz register at bit 0.
+ "+Z" 5-bit fz register at bit 0.
interAptiv MR2:
- "-m" register list for SAVE/RESTORE instruction
+ "-m" Register list for SAVE/RESTORE instruction.
Enhanced VA Scheme:
- "+j" 9-bit signed offset in bit 7 (OP_*_EVAOFFSET)
+ "+j" 9-bit signed offset at bit 7.
MSA Extension:
- "+d" 5-bit MSA register (FD)
- "+e" 5-bit MSA register (FS)
- "+h" 5-bit MSA register (FT)
- "+k" 5-bit GPR at bit 6
- "+l" 5-bit MSA control register at bit 6
- "+n" 5-bit MSA control register at bit 11
- "+o" 4-bit vector element index at bit 16
- "+u" 3-bit vector element index at bit 16
- "+v" 2-bit vector element index at bit 16
- "+w" 1-bit vector element index at bit 16
- "+T" (-512 .. 511) << 0 at bit 16
- "+U" (-512 .. 511) << 1 at bit 16
- "+V" (-512 .. 511) << 2 at bit 16
- "+W" (-512 .. 511) << 3 at bit 16
- "+~" 2 bit LSA/DLSA shift amount from 1 to 4 at bit 6
- "+!" 3 bit unsigned bit position at bit 16
- "+@" 4 bit unsigned bit position at bit 16
- "+#" 6 bit unsigned bit position at bit 16
- "+$" 5 bit unsigned immediate at bit 16
- "+%" 5 bit signed immediate at bit 16
- "+^" 10 bit signed immediate at bit 11
- "+&" 0 vector element index
- "+*" 5-bit register vector element index at bit 16
- "+|" 8-bit mask at bit 16
+ "+d" 5-bit MSA register at bit 6 (FD).
+ "+e" 5-bit MSA register at bit 11 (FS).
+ "+h" 5-bit MSA register at bit 16 (FT).
+ "+k" 5-bit GPR at bit 6.
+ "+l" 5-bit MSA control register at bit 6.
+ "+n" 5-bit MSA control register at bit 11.
+ "+o" 4-bit vector element index at bit 16.
+ "+u" 3-bit vector element index at bit 16.
+ "+v" 2-bit vector element index at bit 16.
+ "+w" 1-bit vector element index at bit 16.
+ "+T" (-512 .. 511) << 0 at bit 16.
+ "+U" (-512 .. 511) << 1 at bit 16.
+ "+V" (-512 .. 511) << 2 at bit 16.
+ "+W" (-512 .. 511) << 3 at bit 16.
+ "+~" 2-bit LSA/DLSA shift amount from 1 to 4 at bit 6.
+ "+!" 3-bit unsigned bit position at bit 16.
+ "+@" 4-bit unsigned bit position at bit 16.
+ "+#" 6-bit unsigned bit position at bit 16.
+ "+$" 5-bit unsigned immediate at bit 16.
+ "+%" 5-bit signed immediate at bit 16.
+ "+^" 10-bit signed immediate at bit 11.
+ "+&" 0 vector element index.
+ "+*" 5-bit register vector element index at bit 16.
+ "+|" 8-bit mask at bit 16.
MIPS R6:
- "+:" 11-bit mask at bit 0
- "+'" 26 bit PC relative branch target address
- "+"" 21 bit PC relative branch target address
- "+;" 5 bit same register in both OP_*_RS and OP_*_RT
- "+I" 2bit unsigned bit position at bit 6
- "+O" 3bit unsigned bit position at bit 6
- "+R" must be program counter
- "-a" (-262144 .. 262143) << 2 at bit 0
- "-b" (-131072 .. 131071) << 3 at bit 0
- "-d" Same as destination register GP
- "-s" 5 bit source register specifier (OP_*_RS) not $0
- "-t" 5 bit target register specifier (OP_*_RT) not $0
- "-u" 5 bit target register specifier (OP_*_RT) greater than OP_*_RS
- "-v" 5 bit target register specifier (OP_*_RT) not $0 not OP_*_RS
- "-w" 5 bit target register specifier (OP_*_RT) less than or equal to OP_*_RS
- "-x" 5 bit source register specifier (OP_*_RS) greater than OP_*_RT
- "-y" 5 bit source register specifier (OP_*_RS) not $0 less than OP_*_RT
- "-A" symbolic offset (-262144 .. 262143) << 2 at bit 0
- "-B" symbolic offset (-131072 .. 131071) << 3 at bit 0
+ "+:" 11-bit mask at bit 0.
+ "+'" 26-bit PC relative branch target address at bit 0.
+ "+"" 21-bit PC relative branch target address at bit 0.
+ "+;" 5-bit same register at both bit 16 and 21 (both RT and RS).
+ "+I" 2-bit unsigned bit position at bit 6.
+ "+O" 3-bit unsigned bit position at bit 6.
+ "+R" Must be program counter.
+ "-a" (-262144 .. 262143) << 2 at bit 0.
+ "-b" (-131072 .. 131071) << 3 at bit 0.
+ "-d" Same as destination register GP.
+ "-s" 5-bit source register at bit 21 (RS) not $0.
+ "-t" 5-bit target register at bit 16 (RT) not $0
+ "-u" 5-bit target register at bit 16 (RT) greater than RS.
+ "-v" 5-bit target register at bit 16 (RT) not $0 not RS.
+ "-w" 5-bit target register at bit 16 (RT) less than or equal to RS.
+ "-x" 5-bit source register at bit 21 (RS) greater than RT.
+ "-y" 5-bit source register at bit 21 (RS) not $0 less than RT.
+ "-A" Symbolic offset (-262144 .. 262143) << 2 at bit 0.
+ "-B" Symbolic offset (-131072 .. 131071) << 3 at bit 0.
GINV ASE usage:
- "+\" 2 bit Global TLB invalidate type at bit 8
+ "+\" 2-bit Global TLB invalidate type at bit 8.
Other:
- "()" parens surrounding optional value
- "," separates operands
+ "()" Parens surrounding optional value.
+ "," Separates operands.
"+" Start of extension sequence.
+ "-" Start of extension sequence.
Characters used so far, for quick reference when adding more:
"1234567890"
@@ -758,13 +762,13 @@ mips_opcode_32bit_p (const struct mips_opcode *mo)
following), for quick reference when adding more:
"1234567890"
"~!@#$%^&*|:'";\"
- "ABCEFGHIJKLMNOPQRSTUVWXZ"
+ "ABC EFGHIJKLMNOPQRSTUVWX Z"
"abcdefghijklmnopqrs uvwxyz"
Extension character sequences used so far ("-" followed by the
following), for quick reference when adding more:
- "AB"
- "abdmstuvwxy"
+ "AB "
+ "ab d m stuvwxy "
*/
/* These are the bits which may be set in the pinfo field of an
@@ -1589,80 +1593,81 @@ extern int bfd_mips_num_opcodes;
#define MIPS16OP_MASK_RZ 0x7
#define MIPS16OP_SH_RZ 2
-/* These are the characters which may appears in the args field of a MIPS16
- instruction. They appear in the order in which the fields appear when the
- instruction is used. Commas and parentheses in the args string are ignored
- when assembling, and written into the output when disassembling.
-
- "y" 3 bit register (MIPS16OP_*_RY)
- "x" 3 bit register (MIPS16OP_*_RX)
- "z" 3 bit register (MIPS16OP_*_RZ)
- "Z" 3 bit register (MIPS16OP_*_MOVE32Z)
- "v" 3 bit same register as source and destination (MIPS16OP_*_RX)
- "w" 3 bit same register as source and destination (MIPS16OP_*_RY)
- "." zero register ($0)
- "S" stack pointer ($sp or $29)
- "P" program counter
- "R" return address register ($ra or $31)
- "X" 5 bit MIPS register (MIPS16OP_*_REGR32)
- "Y" 5 bit MIPS register (MIPS16OP_*_REG32R)
- "0" 5-bit ASMACRO p0 immediate
- "1" 3-bit ASMACRO p1 immediate
- "2" 3-bit ASMACRO p2 immediate
- "3" 5-bit ASMACRO p3 immediate
- "4" 3-bit ASMACRO p4 immediate
- "6" 6 bit unsigned break code (MIPS16OP_*_IMM6)
- "a" 26 bit jump address
- "i" likewise, but flips bit 0
- "e" 11 bit extension value
- "l" register list for entry instruction
- "L" register list for exit instruction
- ">" 5-bit SYNC code
- "9" 9-bit signed immediate
- "G" global pointer ($gp or $28)
- "N" 5-bit coprocessor register
- "O" 3-bit sel field for MFC0/MTC0
- "Q" 5-bit hardware register
- "T" 5-bit CACHE opcode or PREF hint
- "b" 5-bit INS/EXT position, which becomes LSB
+/* These are the characters which may appears in the args field of a
+ MIPS16 instruction. They appear in the order in which the fields
+ appear when the instruction is used. Commas and parentheses in the
+ args string are ignored when assembling, and written into the output
+ when disassembling.
+
+ "y" 3-bit register at bit 5 (RY).
+ "x" 3-bit register at bit 8 (RX).
+ "z" 3-bit register at bit 2 (RZ).
+ "Z" 3-bit register at bit 0 (MOV32Z).
+ "v" 3-bit same register as source and destination at bit 8 (RX).
+ "w" 3-bit same register as source and destination at bit 5 (RY).
+ "." Zero register ($0).
+ "S" Stack pointer ($sp or $29).
+ "P" Program counter.
+ "R" Return address register ($ra or $31).
+ "X" 5-bit MIPS register at bit 0 (REGR32).
+ "Y" 5-bit shuffled MIPS register at bit 3 (REG32R).
+ "0" 5-bit ASMACRO p0 immediate.
+ "1" 3-bit ASMACRO p1 immediate.
+ "2" 3-bit ASMACRO p2 immediate.
+ "3" 5-bit ASMACRO p3 immediate.
+ "4" 3-bit ASMACRO p4 immediate.
+ "6" 6-bit unsigned break code at bit 5.
+ "a" 26-bit jump address.
+ "i" Likewise, but flips bit 0.
+ "e" 11-bit extension value.
+ "l" Register list for ENTRY instruction.
+ "L" Register list for EXIT instruction.
+ ">" 5-bit SYNC code.
+ "9" 9-bit signed immediate.
+ "G" global pointer ($gp or $28).
+ "N" 5-bit coprocessor register.
+ "O" 3-bit sel field for MFC0/MTC0.
+ "Q" 5-bit hardware register.
+ "T" 5-bit CACHE opcode or PREF hint.
+ "b" 5-bit INS/EXT position, which becomes LSB.
Enforces: 0 <= pos < 32.
- "c" 5-bit INS size, which becomes MSB
+ "c" 5-bit INS size, which becomes MSB.
Requires that "b" occurs first to set position.
Enforces: 0 < (pos+size) <= 32.
- "d" 5-bit EXT size, which becomes MSBD
+ "d" 5-bit EXT size, which becomes MSBD.
Requires that "b" occurs first to set position.
Enforces: 0 < (pos+size) <= 32.
- "n" 2-bit immediate (1 .. 4)
- "o" 5-bit unsigned immediate * 16
- "r" 3-bit register
- "s" 3-bit ASMACRO select immediate
- "u" 16-bit unsigned immediate
+ "n" 2-bit immediate (1 .. 4).
+ "o" 5-bit unsigned immediate * 16.
+ "r" 3-bit register.
+ "s" 3-bit ASMACRO select immediate.
+ "u" 16-bit unsigned immediate.
- "I" an immediate value used for macros
+ "I" An immediate value used for macros.
The remaining codes may be extended. Except as otherwise noted,
the full extended operand is a 16 bit signed value.
- "<" 3 bit unsigned shift count * 0 (MIPS16OP_*_RZ) (full 5 bit unsigned)
- "[" 3 bit unsigned shift count * 0 (MIPS16OP_*_RZ) (full 6 bit unsigned)
- "]" 3 bit unsigned shift count * 0 (MIPS16OP_*_RX) (full 6 bit unsigned)
- "5" 5 bit unsigned immediate * 0 (MIPS16OP_*_IMM5)
- "F" 4 bit signed immediate * 0 (MIPS16OP_*_IMM4) (full 15 bit signed)
- "H" 5 bit unsigned immediate * 2 (MIPS16OP_*_IMM5)
- "W" 5 bit unsigned immediate * 4 (MIPS16OP_*_IMM5)
- "D" 5 bit unsigned immediate * 8 (MIPS16OP_*_IMM5)
- "j" 5 bit signed immediate * 0 (MIPS16OP_*_IMM5)
- "8" 8 bit unsigned immediate * 0 (MIPS16OP_*_IMM8)
- "V" 8 bit unsigned immediate * 4 (MIPS16OP_*_IMM8)
- "C" 8 bit unsigned immediate * 8 (MIPS16OP_*_IMM8)
- "U" 8 bit unsigned immediate * 0 (MIPS16OP_*_IMM8) (full 16 bit unsigned)
- "k" 8 bit signed immediate * 0 (MIPS16OP_*_IMM8)
- "K" 8 bit signed immediate * 8 (MIPS16OP_*_IMM8)
- "p" 8 bit conditional branch address (MIPS16OP_*_IMM8)
- "q" 11 bit branch address (MIPS16OP_*_IMM11)
- "A" 8 bit PC relative address * 4 (MIPS16OP_*_IMM8)
- "B" 5 bit PC relative address * 8 (MIPS16OP_*_IMM5)
- "E" 5 bit PC relative address * 4 (MIPS16OP_*_IMM5)
- "m" 7 bit register list for SAVE/RESTORE instruction (18 bit extended)
+ "<" 3-bit unsigned shift count * 1 at bit 2 (SHAMT) (full 5-bit unsigned).
+ "[" 3-bit unsigned shift count * 1 at bit 2 (SHAMT) (full 6-bit unsigned).
+ "]" 3-bit unsigned shift count * 1 at bit 8 (RX) (full 6-bit unsigned).
+ "5" 5-bit unsigned immediate * 1 at bit 0 (IMM5).
+ "F" 4-bit signed immediate * 1 a bit 0 (IMM4) (full 15-bit signed).
+ "H" 5-bit unsigned immediate * 2 at bit 0 (IMM5).
+ "W" 5-bit unsigned immediate * 4 at bit 0 (IMM5).
+ "D" 5-bit unsigned immediate * 8 at bit 0 (IMM5).
+ "j" 5-bit signed immediate * 1 at bit 0 (IMM5).
+ "8" 8-bit unsigned immediate * 1 at bit 0 (IMM8).
+ "V" 8-bit unsigned immediate * 4 at bit 0 (IMM8).
+ "C" 8-bit unsigned immediate * 8 at bit 0 (IMM8).
+ "U" 8-bit unsigned immediate * 1 at bit 0 (IMM8) (full 16-bit unsigned).
+ "k" 8-bit signed immediate * 1 at bit 0 (IMM8).
+ "K" 8-bit signed immediate * 8 at bit 0 (IMM8).
+ "p" 8-bit conditional branch address at bit 0 (IMM8).
+ "q" 11-bit branch address at bit 0 (IMM11).
+ "A" 8-bit PC relative address * 4 at bit 0 (IMM8).
+ "B" 5-bit PC relative address * 8 at bit 0 (IMM5).
+ "E" 5-bit PC relative address * 4 at bit 0 (IMM5).
+ "m" 7-bit register list for SAVE/RESTORE instruction (18-bit extended).
Characters used so far, for quick reference when adding more:
"0123456 89"
@@ -1713,190 +1718,186 @@ extern const int bfd_mips16_num_opcodes;
#define MICROMIPSOP_MASK_MJ 0x1f
#define MICROMIPSOP_SH_MJ 0
-/* These are the characters which may appears in the args field of a microMIPS
- instruction. They appear in the order in which the fields appear
- when the instruction is used. Commas and parentheses in the args
- string are ignored when assembling, and written into the output
+/* These are the characters which may appears in the args field of a
+ microMIPS instruction. They appear in the order in which the fields
+ appear when the instruction is used. Commas and parentheses in the
+ args string are ignored when assembling, and written into the output
when disassembling.
The followings are for 16-bit microMIPS instructions.
- "ma" must be $28
- "mc" 3-bit MIPS registers 2-7, 16, 17 (MICROMIPSOP_*_MC) at bit 4
- The same register used as both source and target.
- "md" 3-bit MIPS registers 2-7, 16, 17 (MICROMIPSOP_*_MD) at bit 7
- "me" 3-bit MIPS registers 2-7, 16, 17 (MICROMIPSOP_*_ME) at bit 1
- The same register used as both source and target.
- "mf" 3-bit MIPS registers 2-7, 16, 17 (MICROMIPSOP_*_MF) at bit 3
- "mg" 3-bit MIPS registers 2-7, 16, 17 (MICROMIPSOP_*_MG) at bit 0
- "mh" 3-bit MIPS register pair (MICROMIPSOP_*_MH) at bit 7
- "mj" 5-bit MIPS registers (MICROMIPSOP_*_MJ) at bit 0
- "ml" 3-bit MIPS registers 2-7, 16, 17 (MICROMIPSOP_*_ML) at bit 4
- "mm" 3-bit MIPS registers 0, 2, 3, 16-20 (MICROMIPSOP_*_MM) at bit 1
- "mn" 3-bit MIPS registers 0, 2, 3, 16-20 (MICROMIPSOP_*_MN) at bit 4
- "mp" 5-bit MIPS registers (MICROMIPSOP_*_MP) at bit 5
- "mq" 3-bit MIPS registers 0, 2-7, 17 (MICROMIPSOP_*_MQ) at bit 7
- "mr" must be program counter
- "ms" must be $29
- "mt" must be the same as the previous register
- "mx" must be the same as the destination register
- "my" must be $31
- "mz" must be $0
-
- "mA" 7-bit immediate (-64 .. 63) << 2 (MICROMIPSOP_*_IMMA)
- "mB" 3-bit immediate (-1, 1, 4, 8, 12, 16, 20, 24) (MICROMIPSOP_*_IMMB)
+ "ma" Must be $28.
+ "mc" 3-bit registers 2-7, 16, 17 at bit 4.
+ The same register used as both source and target.
+ "md" 3-bit registers 2-7, 16, 17 at bit 7.
+ "me" 3-bit registers 2-7, 16, 17 at bit 1.
+ The same register used as both source and target.
+ "mf" 3-bit registers 2-7, 16, 17 at bit 3.
+ "mg" 3-bit registers 2-7, 16, 17 at bit 0.
+ "mh" 3-bit register pair at bit 7.
+ "mj" 5-bit registers at bit 0.
+ "ml" 3-bit registers 2-7, 16, 17 at bit 4.
+ "mm" 3-bit registers 0, 2, 3, 16-20 at bit 1.
+ "mn" 3-bit registers 0, 2, 3, 16-20 at bit 4.
+ "mp" 5-bit registers at bit 5.
+ "mq" 3-bit registers 0, 2-7, 17 at bit 7.
+ "mr" Must be program counter.
+ "ms" Must be $29.
+ "mt" Must be the same as the previous register.
+ "mx" Must be the same as the destination register.
+ "my" Must be $31.
+ "mz" Must be $0.
+
+ "mA" 7-bit immediate (-64 .. 63) << 2 at bit 0.
+ "mB" 3-bit immediate (-1, 1, 4, 8, 12, 16, 20, 24) at bit 1.
"mC" 4-bit immediate (1, 2, 3, 4, 7, 8, 15, 16, 31, 32, 63, 64, 128, 255,
- 32768, 65535) (MICROMIPSOP_*_IMMC)
- "mD" 10-bit branch address (-512 .. 511) << 1 (MICROMIPSOP_*_IMMD)
- "mE" 7-bit branch address (-64 .. 63) << 1 (MICROMIPSOP_*_IMME)
- "mF" 4-bit immediate (0 .. 15) (MICROMIPSOP_*_IMMF)
- "mG" 4-bit immediate (-1 .. 14) (MICROMIPSOP_*_IMMG)
- "mH" 4-bit immediate (0 .. 15) << 1 (MICROMIPSOP_*_IMMH)
- "mI" 7-bit immediate (-1 .. 126) (MICROMIPSOP_*_IMMI)
- "mJ" 4-bit immediate (0 .. 15) << 2 (MICROMIPSOP_*_IMMJ)
- "mL" 4-bit immediate (0 .. 15) (MICROMIPSOP_*_IMML)
- "mM" 3-bit immediate (1 .. 8) (MICROMIPSOP_*_IMMM)
- "mN" 2-bit immediate (0 .. 3) for register list (MICROMIPSOP_*_IMMN)
- "mO" 4-bit immediate (0 .. 15) (MICROMIPSOP_*_IMML)
- "mP" 5-bit immediate (0 .. 31) << 2 (MICROMIPSOP_*_IMMP)
- "mU" 5-bit immediate (0 .. 31) << 2 (MICROMIPSOP_*_IMMU)
- "mW" 6-bit immediate (0 .. 63) << 2 (MICROMIPSOP_*_IMMW)
- "mX" 4-bit immediate (-8 .. 7) (MICROMIPSOP_*_IMMX)
- "mY" 9-bit immediate (-258 .. -3, 2 .. 257) << 2 (MICROMIPSOP_*_IMMY)
- "mZ" must be zero
+ 32768, 65535) at bit 0.
+ "mD" 10-bit branch address (-512 .. 511) << 1 at bit 0.
+ "mE" 7-bit branch address (-64 .. 63) << 1 at bit 0.
+ "mF" 4-bit immediate (0 .. 15) at bit 0.
+ "mG" 4-bit immediate (-1 .. 14) at bit 0.
+ "mH" 4-bit immediate (0 .. 15) << 1 at bit 0.
+ "mI" 7-bit immediate (-1 .. 126) at bit 0.
+ "mJ" 4-bit immediate (0 .. 15) << 2 at bit 0.
+ "mL" 4-bit immediate (0 .. 15) at bit 0.
+ "mM" 3-bit immediate (1 .. 8) at bit 1.
+ "mN" 2-bit immediate (0 .. 3) for register list at bit 4.
+ "mO" 4-bit immediate (0 .. 15) at bit 0.
+ "mP" 5-bit immediate (0 .. 31) << 2 at bit 0.
+ "mU" 5-bit immediate (0 .. 31) << 2 at bit 0.
+ "mW" 6-bit immediate (0 .. 63) << 2 at bit 1.
+ "mX" 4-bit immediate (-8 .. 7) at bit 1.
+ "mY" 9-bit immediate (-258 .. -3, 2 .. 257) << 2 at bit 1.
+ "mZ" Must be zero.
In most cases 32-bit microMIPS instructions use the same characters
as MIPS (with ADDIUPC being a notable exception, but there are some
others too).
- "." 10-bit signed offset/number (MICROMIPSOP_*_OFFSET10)
- "1" 5-bit sync type (MICROMIPSOP_*_STYPE)
- "<" 5-bit shift amount (MICROMIPSOP_*_SHAMT)
- ">" shift amount between 32 and 63, stored after subtracting 32
- (MICROMIPSOP_*_SHAMT)
- "\" 3-bit position for ASET and ACLR (MICROMIPSOP_*_3BITPOS)
- "|" 4-bit trap code (MICROMIPSOP_*_TRAP)
- "~" 12-bit signed offset (MICROMIPSOP_*_OFFSET12)
- "a" 26-bit target address (MICROMIPSOP_*_TARGET)
- "+i" likewise, but flips bit 0
- "b" 5-bit base register (MICROMIPSOP_*_RS)
- "c" 10-bit higher breakpoint code (MICROMIPSOP_*_CODE)
- "d" 5-bit destination register specifier (MICROMIPSOP_*_RD)
- "h" 5-bit PREFX hint (MICROMIPSOP_*_PREFX)
- "i" 16-bit unsigned immediate (MICROMIPSOP_*_IMMEDIATE)
- "j" 16-bit signed immediate (MICROMIPSOP_*_DELTA)
- "k" 5-bit cache opcode in target register position (MICROMIPSOP_*_CACHE)
- "n" register list for 32-bit LWM/SWM instruction (MICROMIPSOP_*_RT)
- "o" 16-bit signed offset (MICROMIPSOP_*_DELTA)
- "p" 16-bit PC-relative branch target address (MICROMIPSOP_*_DELTA)
- "q" 10-bit lower breakpoint code (MICROMIPSOP_*_CODE2)
- "r" 5-bit same register used as both source and target (MICROMIPSOP_*_RS)
- "s" 5-bit source register specifier (MICROMIPSOP_*_RS)
- "t" 5-bit target register (MICROMIPSOP_*_RT)
- "u" 16-bit upper 16 bits of address (MICROMIPSOP_*_IMMEDIATE)
- "v" 5-bit same register used as both source and destination
- (MICROMIPSOP_*_RS)
- "w" 5-bit same register used as both target and destination
- (MICROMIPSOP_*_RT)
- "x" 5-bit source 3 register for ALNV.PS (MICROMIPSOP_*_RS3)
- "z" must be zero register
- "C" 23-bit coprocessor function code (MICROMIPSOP_*_COPZ)
- "K" 5-bit Hardware Register (RDHWR instruction) (MICROMIPSOP_*_RS)
-
- "+A" 5-bit INS/EXT/DINS/DEXT/DINSM/DEXTM position, which becomes
- LSB (MICROMIPSOP_*_EXTLSB).
+ "." 10-bit signed offset/number at bit 6.
+ "1" 5-bit SYNC type at bit 16.
+ "<" 5-bit shift amount at bit 11.
+ ">" Shift amount between 32 and 63, stored after subtracting 3, at bit 11.
+ "\" 3-bit position for ASET and ACLR at bit 21.
+ "|" 4-bit trap code at bit 12.
+ "~" 12-bit signed offset at bit 0.
+ "a" 26-bit target address at bit 0.
+ "+i" Likewise, but flips bit 0.
+ "b" 5-bit base register at bit 16 (RS).
+ "c" 10-bit higher breakpoint code at bit 16.
+ "d" 5-bit destination register at bit 11 (RD).
+ "h" 5-bit PREFX hint at bit 11.
+ "i" 16-bit unsigned immediate at bit 0.
+ "j" 16-bit signed immediate at bit 0.
+ "k" 5-bit CACHE opcode in target register position at bit 21.
+ "n" 5-bit register list for 32-bit LWM/SWM instruction at bit 21 (RT).
+ "o" 16-bit signed offset at bit 0.
+ "p" 16-bit PC-relative branch target address at bit 0.
+ "q" 10-bit lower breakpoint code at bit 6.
+ "r" 5-bit same register used as both source and target at bit 16 (RS).
+ "s" 5-bit source register at bit 16 (RS).
+ "t" 5-bit target register at bit 21 (RT).
+ "u" 16-bit upper 16 bits of address at bit 0.
+ "v" 5-bit same register used as both source and destination at bit 16 (RS).
+ "w" 5-bit same register used as both target and destination at bit 21 (RT).
+ "x" 5-bit source 3 register for ALNV.PS at bit 6.
+ "z" Must be zero register.
+ "C" 23-bit coprocessor function code at bit 3.
+ "K" 5-bit Hardware Register (RDHWR instruction) at bit 16 (RS).
+
+ "+A" 5-bit INS/EXT/DINS/DEXT/DINSM/DEXTM position at bit 6,
+ which becomes LSB.
Enforces: 0 <= pos < 32.
- "+B" 5-bit INS/DINS size, which becomes MSB (MICROMIPSOP_*_INSMSB).
+ "+B" 5-bit INS/DINS size at bit 11, which becomes MSB.
Requires that "+A" or "+E" occur first to set position.
Enforces: 0 < (pos+size) <= 32.
- "+C" 5-bit EXT/DEXT size, which becomes MSBD (MICROMIPSOP_*_EXTMSBD).
+ "+C" 5-bit EXT/DEXT size at bit 11, which becomes MSBD.
Requires that "+A" or "+E" occur first to set position.
Enforces: 0 < (pos+size) <= 32.
(Also used by DEXT w/ different limits, but limits for
that are checked by the M_DEXT macro.)
- "+E" 5-bit DINSU/DEXTU position, which becomes LSB-32 (MICROMIPSOP_*_EXTLSB).
+ "+E" 5-bit DINSU/DEXTU position at bit 6, which becomes LSB-32.
Enforces: 32 <= pos < 64.
- "+F" 5-bit DINSM/DINSU size, which becomes MSB-32 (MICROMIPSOP_*_INSMSB).
+ "+F" 5-bit DINSM/DINSU size at bit 11., which becomes MSB-32.
Requires that "+A" or "+E" occur first to set position.
Enforces: 32 < (pos+size) <= 64.
- "+G" 5-bit DEXTM size, which becomes MSBD-32 (MICROMIPSOP_*_EXTMSBD).
+ "+G" 5-bit DEXTM size at bit 11, which becomes MSBD-32.
Requires that "+A" or "+E" occur first to set position.
Enforces: 32 < (pos+size) <= 64.
- "+H" 5-bit DEXTU size, which becomes MSBD (MICROMIPSOP_*_EXTMSBD).
+ "+H" 5-bit DEXTU size at bit 11, which becomes MSBD.
Requires that "+A" or "+E" occur first to set position.
Enforces: 32 < (pos+size) <= 64.
- "+J" 10-bit SYSCALL/WAIT/SDBBP/HYPCALL function code
- (MICROMIPSOP_*_CODE10)
+ "+J" 10-bit SYSCALL/WAIT/SDBBP/HYPCALL function code at bit 16.
PC-relative addition (ADDIUPC) instruction:
- "mQ" 23-bit offset (-4194304 .. 4194303) << 2 (MICROMIPSOP_*_IMMQ)
- "mb" 3-bit MIPS registers 2-7, 16, 17 (MICROMIPSOP_*_MB) at bit 23
+ "mQ" 23-bit offset (-4194304 .. 4194303) << 2 at bit 0.
+ "mb" 3-bit MIPS registers 2-7, 16, 17 at bit 23.
Floating point instructions:
- "D" 5-bit destination register (MICROMIPSOP_*_FD)
- "M" 3-bit compare condition code (MICROMIPSOP_*_CCC)
- "N" 3-bit branch condition code (MICROMIPSOP_*_BCC)
- "R" 5-bit fr source 3 register (MICROMIPSOP_*_FR)
- "S" 5-bit fs source 1 register (MICROMIPSOP_*_FS)
- "T" 5-bit ft source 2 register (MICROMIPSOP_*_FT)
+ "D" 5-bit destination register at bit 11 (FD).
+ "M" 3-bit compare condition code at bit 13 (CCC).
+ "N" 3-bit branch condition code at bit 18 (BCC).
+ "R" 5-bit fr source 3 register at bit 6 (FR).
+ "S" 5-bit fs source 1 register at bit 16 (FS).
+ "T" 5-bit ft source 2 register at bit 21 (FT).
"V" 5-bit same register used as floating source and destination or target
- (MICROMIPSOP_*_FS)
+ at bit 16 (FS).
Coprocessor instructions:
- "E" 5-bit target register (MICROMIPSOP_*_RT)
- "G" 5-bit source register (MICROMIPSOP_*_RS)
- "H" 3-bit sel field for (D)MTC* and (D)MFC* (MICROMIPSOP_*_SEL)
- "g" 5-bit control source register (MICROMIPSOP_*_RS)
+ "E" 5-bit target register at bit 21 (RT).
+ "G" 5-bit source register at bit 16 (RS).
+ "H" 3-bit sel field for (D)MTC* and (D)MFC* at bit 11.
+ "g" 5-bit control source register at bit 16 (RS).
Macro instructions:
- "A" general 32 bit expression
+ "A" General 32-bit expression.
"I" 32-bit immediate (value placed in imm_expr).
- "F" 64-bit floating point constant in .rdata
- "L" 64-bit floating point constant in .lit8
- "f" 32-bit floating point constant
- "l" 32-bit floating point constant in .lit4
+ "F" 64-bit floating point constant in .rdata.
+ "L" 64-bit floating point constant in .lit8.
+ "f" 32-bit floating point constant.
+ "l" 32-bit floating point constant in .lit4.
DSP ASE usage:
- "2" 2-bit unsigned immediate for byte align (MICROMIPSOP_*_BP)
- "3" 3-bit unsigned immediate (MICROMIPSOP_*_SA3)
- "4" 4-bit unsigned immediate (MICROMIPSOP_*_SA4)
- "5" 8-bit unsigned immediate (MICROMIPSOP_*_IMM8)
- "6" 5-bit unsigned immediate (MICROMIPSOP_*_RS)
- "7" 2-bit DSP accumulator register (MICROMIPSOP_*_DSPACC)
- "8" 6-bit unsigned immediate (MICROMIPSOP_*_WRDSP)
- "0" 6-bit signed immediate (MICROMIPSOP_*_DSPSFT)
- "@" 10-bit signed immediate (MICROMIPSOP_*_IMM10)
- "^" 5-bit unsigned immediate (MICROMIPSOP_*_RD)
+ "2" 2-bit unsigned immediate for byte align at bit 14.
+ "3" 3-bit unsigned immediate at bit 13.
+ "4" 4-bit unsigned immediate at bit 12.
+ "5" 8-bit unsigned immediate at bit 13.
+ "6" 5-bit unsigned immediate at bit 16 (RS).
+ "7" 2-bit DSP accumulator register at bit 14.
+ "8" 6-bit unsigned immediate at bit 14.
+ "0" 6-bit signed immediate at bit 16.
+ "@" 10-bit signed immediate at bit 16.
+ "^" 5-bit unsigned immediate at bit 11 (RD).
microMIPS Enhanced VA Scheme:
- "+j" 9-bit signed offset in bit 0 (OP_*_EVAOFFSET)
+ "+j" 9-bit signed offset in bit 0.
MSA Extension:
- "+d" 5-bit MSA register (FD)
- "+e" 5-bit MSA register (FS)
- "+h" 5-bit MSA register (FT)
- "+k" 5-bit GPR at bit 6
- "+l" 5-bit MSA control register at bit 6
- "+n" 5-bit MSA control register at bit 11
- "+o" 4-bit vector element index at bit 16
- "+u" 3-bit vector element index at bit 16
- "+v" 2-bit vector element index at bit 16
- "+w" 1-bit vector element index at bit 16
- "+x" 5-bit shift amount at bit 16
- "+T" (-512 .. 511) << 0 at bit 16
- "+U" (-512 .. 511) << 1 at bit 16
- "+V" (-512 .. 511) << 2 at bit 16
- "+W" (-512 .. 511) << 3 at bit 16
- "+~" 2 bit LSA/DLSA shift amount from 1 to 4 at bit 6
- "+!" 3 bit unsigned bit position at bit 16
- "+@" 4 bit unsigned bit position at bit 16
- "+#" 6 bit unsigned bit position at bit 16
- "+$" 5 bit unsigned immediate at bit 16
- "+%" 5 bit signed immediate at bit 16
- "+^" 10 bit signed immediate at bit 11
- "+&" 0 vector element index
- "+*" 5-bit register vector element index at bit 16
- "+|" 8-bit mask at bit 16
+ "+d" 5-bit MSA register at bit 6 (FD).
+ "+e" 5-bit MSA register at bit 11 (FS).
+ "+h" 5-bit MSA register at bit 16 (FT).
+ "+k" 5-bit GPR at bit 6.
+ "+l" 5-bit MSA control register at bit 6.
+ "+n" 5-bit MSA control register at bit 11.
+ "+o" 4-bit vector element index at bit 16.
+ "+u" 3-bit vector element index at bit 16.
+ "+v" 2-bit vector element index at bit 16.
+ "+w" 1-bit vector element index at bit 16.
+ "+x" 5-bit shift amount at bit 16.
+ "+T" (-512 .. 511) << 0 at bit 16.
+ "+U" (-512 .. 511) << 1 at bit 16.
+ "+V" (-512 .. 511) << 2 at bit 16.
+ "+W" (-512 .. 511) << 3 at bit 16.
+ "+~" 2-bit LSA/DLSA shift amount from 1 to 4 at bit 6.
+ "+!" 3-bit unsigned bit position at bit 16.
+ "+@" 4-bit unsigned bit position at bit 16.
+ "+#" 6-bit unsigned bit position at bit 16.
+ "+$" 5-bit unsigned immediate at bit 16.
+ "+%" 5-bit signed immediate at bit 16.
+ "+^" 10-bit signed immediate at bit 11.
+ "+&" 0 vector element index.
+ "+*" 5-bit register vector element index at bit 16.
+ "+|" 8-bit mask at bit 16.
MT ASE usage:
"!" 1-bit usermode flag at bit 10.
@@ -1907,10 +1908,11 @@ extern const int bfd_mips16_num_opcodes;
"y" 5-bit control target register at bit 21 (RT).
Other:
- "()" parens surrounding optional value
- "," separates operands
- "+" start of extension sequence
- "m" start of microMIPS extension sequence
+ "()" Parens surrounding optional value.
+ "," Separates operands.
+ "m" Start of microMIPS extension sequence.
+ "+" Start of extension sequence.
+ "-" Start of extension sequence.
Characters used so far, for quick reference when adding more:
"12345678 0"
@@ -1918,13 +1920,6 @@ extern const int bfd_mips16_num_opcodes;
"ABCDEFGHIJKLMN RST V "
"abcd fghijklmnopqrstuvwxyz"
- Extension character sequences used so far ("+" followed by the
- following), for quick reference when adding more:
- ""
- "~!@#$%^&*|"
- "ABCEFGHJTUVW"
- "dehijklnouvwx"
-
Extension character sequences used so far ("m" followed by the
following), for quick reference when adding more:
""
@@ -1932,6 +1927,13 @@ extern const int bfd_mips16_num_opcodes;
" BCDEFGHIJ LMNOPQ U WXYZ"
" bcdefghij lmn pq st xyz"
+ Extension character sequences used so far ("+" followed by the
+ following), for quick reference when adding more:
+ ""
+ "~!@#$%^&*|"
+ "ABC EFGH J TUVW "
+ " de hijkl no uvwx "
+
Extension character sequences used so far ("-" followed by the
following), for quick reference when adding more:
""
diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
index 73ee811..2209e1a 100644
--- a/include/opcode/riscv-opc.h
+++ b/include/opcode/riscv-opc.h
@@ -4074,6 +4074,11 @@
#define CSR_MINSTRETCFG 0x322
#define CSR_MCYCLECFGH 0x721
#define CSR_MINSTRETCFGH 0x722
+/* Smrnmi extension. */
+#define CSR_MNSCRATCH 0x740
+#define CSR_MNEPC 0x741
+#define CSR_MNCAUSE 0x742
+#define CSR_MNSTATUS 0x744
/* Smstateen extension */
#define CSR_MSTATEEN0 0x30c
#define CSR_MSTATEEN1 0x30d
@@ -5172,6 +5177,11 @@ DECLARE_CSR(mcyclecfg, CSR_MCYCLECFG, CSR_CLASS_SMCNTRPMF, PRIV_SPEC_CLASS_1P10,
DECLARE_CSR(minstretcfg, CSR_MINSTRETCFG, CSR_CLASS_SMCNTRPMF, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT)
DECLARE_CSR(mcyclecfgh, CSR_MCYCLECFGH, CSR_CLASS_SMCNTRPMF_32, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT)
DECLARE_CSR(minstretcfgh, CSR_MINSTRETCFGH, CSR_CLASS_SMCNTRPMF_32, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT)
+/* Smrnmi extensions. */
+DECLARE_CSR(mnepc, CSR_MNEPC, CSR_CLASS_SMRNMI, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mncause, CSR_MNCAUSE, CSR_CLASS_SMRNMI, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mnscratch, CSR_MNSCRATCH, CSR_CLASS_SMRNMI, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+DECLARE_CSR(mnstatus, CSR_MNSTATUS, CSR_CLASS_SMRNMI, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
/* Smstateen/Ssstateen extensions. */
DECLARE_CSR(mstateen0, CSR_MSTATEEN0, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
DECLARE_CSR(mstateen1, CSR_MSTATEEN1, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
diff --git a/include/opcode/s390.h b/include/opcode/s390.h
index e5dfcb2..8322882 100644
--- a/include/opcode/s390.h
+++ b/include/opcode/s390.h
@@ -45,6 +45,7 @@ enum s390_opcode_cpu_val
S390_OPCODE_ARCH12,
S390_OPCODE_ARCH13,
S390_OPCODE_ARCH14,
+ S390_OPCODE_ARCH15,
S390_OPCODE_MAXCPU
};
@@ -193,8 +194,4 @@ extern const struct s390_operand s390_operands[];
#define S390_OPERAND_CP16 0x1000
-#define S390_OPERAND_OR1 0x2000
-#define S390_OPERAND_OR2 0x4000
-#define S390_OPERAND_OR8 0x8000
-
#endif /* S390_H */
diff --git a/ld/NEWS b/ld/NEWS
index bad8c3e..1f14dd6 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,5 +1,10 @@
-*- text -*-
+Changes in 2.44:
+
+* Add a "--build-id=xx" option, if built with the xxhash library. This
+ produces a 128-bit hash, 2-4x faster than md5 or sha1.
+
Changes in 2.43:
* Add support for LoongArch DT_RELR (compressed R_LARCH_RELATIVE).
diff --git a/ld/config.in b/ld/config.in
index f7c9da3..f2aaf0a 100644
--- a/ld/config.in
+++ b/ld/config.in
@@ -269,6 +269,9 @@
/* Version number of package */
#undef VERSION
+/* whether to use inline xxhash */
+#undef WITH_XXHASH
+
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#undef YYTEXT_POINTER
diff --git a/ld/configure b/ld/configure
index bf58214..d905f1c 100755
--- a/ld/configure
+++ b/ld/configure
@@ -872,6 +872,7 @@ with_libiconv_prefix
with_libiconv_type
with_libintl_prefix
with_libintl_type
+with_xxhash
with_system_zlib
with_zstd
'
@@ -1589,6 +1590,8 @@ Optional Packages:
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and libdir
--with-libintl-type=TYPE type of library to search for (auto/static/shared)
+ --with-xxhash use inlined libxxhash for hashing (faster)
+ (auto/yes/no)
--with-system-zlib use installed libz
--with-zstd support zstd compressed debug sections
(default=auto)
@@ -11683,7 +11686,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11686 "configure"
+#line 11689 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11789,7 +11792,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11792 "configure"
+#line 11795 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19086,6 +19089,45 @@ $as_echo "#define HAVE_DECL_GETOPT 1" >>confdefs.h
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
+$as_echo_n "checking whether to use xxhash... " >&6; }
+
+# Check whether --with-xxhash was given.
+if test "${with_xxhash+set}" = set; then :
+ withval=$with_xxhash;
+else
+ with_xxhash=auto
+fi
+
+if test "x$with_xxhash" != "xno"; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define XXH_INLINE_ALL
+#include <xxhash.h>
+XXH128_hash_t r;
+void foo (void) { r = XXH128("foo", 3, 0); }
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ with_xxhash=yes
+
+$as_echo "#define WITH_XXHASH 1" >>confdefs.h
+
+
+else
+
+ if test "$with_xxhash" = yes; then
+ as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
+ fi
+ with_xxhash=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
+$as_echo "$with_xxhash" >&6; }
+
# Link in zlib/zstd if we can. This allows us to read and write
# compressed debug sections.
diff --git a/ld/configure.ac b/ld/configure.ac
index bdf51a0..5d10b38 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -424,6 +424,28 @@ if test $ld_cv_decl_getopt_unistd_h = yes; then
[Is the prototype for getopt in <unistd.h> in the expected format?])
fi
+dnl xxhash support from gdbsupport/common.m4
+AC_MSG_CHECKING([whether to use xxhash])
+AC_ARG_WITH(xxhash,
+ AS_HELP_STRING([--with-xxhash], [use inlined libxxhash for hashing (faster) (auto/yes/no)]),
+ [], [with_xxhash=auto])
+if test "x$with_xxhash" != "xno"; then
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#define XXH_INLINE_ALL
+#include <xxhash.h>
+XXH128_hash_t r;
+void foo (void) { r = XXH128("foo", 3, 0); }
+])],[
+ with_xxhash=yes
+ AC_DEFINE([WITH_XXHASH], 1, [whether to use inline xxhash])
+],[
+ if test "$with_xxhash" = yes; then
+ AC_MSG_ERROR([xxhash is missing or unusable])
+ fi
+ with_xxhash=no])
+fi
+AC_MSG_RESULT([$with_xxhash])
+
# Link in zlib/zstd if we can. This allows us to read and write
# compressed debug sections.
AM_ZLIB
diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em
index 863657e..2e86572 100644
--- a/ld/emultempl/elf.em
+++ b/ld/emultempl/elf.em
@@ -1084,6 +1084,7 @@ fragment <<EOF
link_info.relro = false;
EOF
fi
+fi
fragment <<EOF
else if (strcmp (optarg, "separate-code") == 0)
link_info.separate_code = true;
@@ -1100,7 +1101,6 @@ fragment <<EOF
else if (strcmp (optarg, "textoff") == 0)
link_info.textrel_check = textrel_check_none;
EOF
-fi
if test -n "$PARSE_AND_LIST_ARGS_CASE_Z" ; then
fragment <<EOF
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index a726b15..556f03e 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -64,50 +64,50 @@
# following suffixes might be generated as well:
#
# xdwe: -pie -z combreloc -z separate-code -z relro -z now
-# xdwer: -pie -z combreloc -z separate-code -z relro -z now -z one-rosegment
+# xdwer: -pie -z combreloc -z separate-code -z relro -z now --rosegment
# xdw: -pie -z combreloc -z relro -z now
# xdceo: -pie -z combreloc -z separate-code -z relro
-# xdceor: -pie -z combreloc -z separate-code -z relro -z one-rosegment
+# xdceor: -pie -z combreloc -z separate-code -z relro --rosegment
# xdce: -pie -z combreloc -z separate-code
-# xdcer: -pie -z combreloc -z separate-code -z one-rosegment
+# xdcer: -pie -z combreloc -z separate-code --rosegment
# xdco: -pie -z combreloc -z relro
# xdc: -pie -z combreloc
# xdeo: -pie -z separate-code -z relro
-# xdeor: -pie -z separate-code -z relro -z one-rosegment
+# xdeor: -pie -z separate-code -z relro --rosegment
# xde: -pie -z separate-code
-# xder: -pie -z separate-code -z one-rosegment
+# xder: -pie -z separate-code --rosegment
# xdo: -pie -z relro
# xd: -pie
#
# xswe: -shared -z combreloc -z separate-code -z relro -z now
-# xswer: -shared -z combreloc -z separate-code -z relro -z now -z one-rosegment
+# xswer: -shared -z combreloc -z separate-code -z relro -z now --rosegment
# xsw: -shared -z combreloc -z relro -z now
# xsceo: -shared -z combreloc -z separate-code -z relro
-# xsceor: -shared -z combreloc -z separate-code -z relro -z one-rosegment
+# xsceor: -shared -z combreloc -z separate-code -z relro --rosegment
# xsce: -shared -z combreloc -z separate-code
-# xscer: -shared -z combreloc -z separate-code -z one-rosegment
+# xscer: -shared -z combreloc -z separate-code --rosegment
# xsco: -shared -z combreloc -z relro
# xsc: -shared -z combreloc
# xseo: -shared -z separate-code -z relro
-# xseor: -shared -z separate-code -z relro -z one-rosegment
+# xseor: -shared -z separate-code -z relro --rosegment
# xse: -shared -z separate-code
-# xser: -shared -z separate-code -z one-rosegment
+# xser: -shared -z separate-code --rosegment
# xso: -shared -z relro
# xs: -shared
#
-# xwe: -z combreloc -z separate-code -z relro -z now -z one-rosegment
+# xwe: -z combreloc -z separate-code -z relro -z now --rosegment
# xwer: -z combreloc -z separate-code -z relro -z now
# xw: -z combreloc -z relro -z now
# xceo: -z combreloc -z separate-code -z relro
-# xceor: -z combreloc -z separate-code -z relro -z one-rosegment
+# xceor: -z combreloc -z separate-code -z relro --rosegment
# xce: -z combreloc -z separate-code
-# xcer: -z combreloc -z separate-code -z one-rosegment
+# xcer: -z combreloc -z separate-code --rosegment
# xco: -z combreloc -z relro
# xc: -z combreloc
# xeo: -z separate-code -z relro
-# xeor: -z separate-code -z relro -z one-rosegment
+# xeor: -z separate-code -z relro --rosegment
# xe: -z separate-code
-# xer: -z separate-code -z one-rosegment
+# xer: -z separate-code --rosegment
# xo: -z relro
#
#
@@ -343,7 +343,7 @@ LD_FLAG=textonly
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xe
LD_FLAG=rotextonly
-( echo "/* Script for -z separate-code -z one-rosegment */"
+( echo "/* Script for -z separate-code --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xer
@@ -364,7 +364,7 @@ if test -n "$GENERATE_RELRO_SCRIPT"; then
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xeo
LD_FLAG=rotextonly
- ( echo "/* Script for -z separate-code -z relro -z one-rosegment */"
+ ( echo "/* Script for -z separate-code -z relro --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xeor
@@ -406,7 +406,7 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=roctextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xcer.tmp
- ( echo "/* Script for -z combreloc -z separate-code -z one-rosegment */"
+ ( echo "/* Script for -z combreloc -z separate-code --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xcer
@@ -433,7 +433,7 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=rowtextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xwer.tmp
- ( echo "/* Script for -z combreloc -z separate-code -z relro -z now -z one-rosegment */"
+ ( echo "/* Script for -z combreloc -z separate-code -z relro -z now --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xwer
@@ -464,7 +464,7 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=roctextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xceor.tmp
- ( echo "/* Script for -z combreloc -z separate-code -z relro -z one-rosegment */"
+ ( echo "/* Script for -z combreloc -z separate-code -z relro --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xceor
@@ -492,7 +492,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xse
LD_FLAG=rosharedtextonly
- ( echo "/* Script for -shared -z separate-code -z one-rosegment */"
+ ( echo "/* Script for -shared -z separate-code --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xser
@@ -513,7 +513,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xseo
LD_FLAG=rosharedtextonly
- ( echo "/* Script for -shared -z separate-code -z relro -z one-rosegment */"
+ ( echo "/* Script for -shared -z separate-code -z relro --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xseor
@@ -541,7 +541,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
LD_FLAG=rocsharedtextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xscer.tmp
- ( echo "/* Script for -shared -z combreloc -z separate-code -z one-rosegment */"
+ ( echo "/* Script for -shared -z combreloc -z separate-code --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xscer
@@ -567,7 +567,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
LD_FLAG=rowsharedtextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xswe.tmp
- ( echo "/* Script for -shared -z combreloc -z separate-code -z relro -z now -z one-rosegment */"
+ ( echo "/* Script for -shared -z combreloc -z separate-code -z relro -z now --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xswer
@@ -596,7 +596,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
LD_FLAG=rowsharedtextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xsceor.tmp
- ( echo "/* Script for -shared -z combreloc -z separate-code -z relro -z one-rosegment */"
+ ( echo "/* Script for -shared -z combreloc -z separate-code -z relro --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsceor
@@ -628,7 +628,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xde
LD_FLAG=ropietextonly
- ( echo "/* Script for -pie -z separate-code -z one-rosegment */"
+ ( echo "/* Script for -pie -z separate-code --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xder
@@ -649,7 +649,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdeo
LD_FLAG=ropietextonly
- ( echo "/* Script for -pie -z separate-code -z relro -z one-rosegment */"
+ ( echo "/* Script for -pie -z separate-code -z relro --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdeor
@@ -677,7 +677,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
LD_FLAG=rocpietextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xdcer.tmp
- ( echo "/* Script for -pie -z combreloc -z separate-code -z one-rosegment */"
+ ( echo "/* Script for -pie -z combreloc -z separate-code --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdcer
@@ -703,7 +703,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
LD_FLAG=rowpietextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xdwer.tmp
- ( echo "/* Script for -pie -z combreloc -z separate-code -z relro -z now -z one-rosegment */"
+ ( echo "/* Script for -pie -z combreloc -z separate-code -z relro -z now --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdwer
@@ -732,7 +732,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
LD_FLAG=rowpietextonly
COMBRELOC=ldscripts/${EMULATION_NAME}.xdceor.tmp
- ( echo "/* Script for -pie -z combreloc -z separate-code -z relro -z one-rosegment */"
+ ( echo "/* Script for -pie -z combreloc -z separate-code -z relro --rosegment */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdceor
diff --git a/ld/ld.texi b/ld/ld.texi
index 89e3913..90182c4 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -3216,20 +3216,20 @@ maximum cache size to @var{size}.
Request the creation of a @code{.note.gnu.build-id} ELF note section
or a @code{.buildid} COFF section. The contents of the note are
unique bits identifying this linked file. @var{style} can be
-@code{uuid} to use 128 random bits, @code{sha1} to use a 160-bit
-@sc{SHA1} hash on the normative parts of the output contents,
-@code{md5} to use a 128-bit @sc{MD5} hash on the normative parts of
-the output contents, or @code{0x@var{hexstring}} to use a chosen bit
-string specified as an even number of hexadecimal digits (@code{-} and
+@code{uuid} to use 128 random bits; @code{sha1} to use a 160-bit
+@sc{SHA1} hash, @code{md5} to use a 128-bit @sc{MD5} hash, or @code{xx}
+to use a 128-bit @sc{XXHASH} on the normative parts of the output
+contents; or @code{0x@var{hexstring}} to use a chosen bit string
+specified as an even number of hexadecimal digits (@code{-} and
@code{:} characters between digit pairs are ignored). If @var{style}
is omitted, @code{sha1} is used.
-The @code{md5} and @code{sha1} styles produces an identifier
-that is always the same in an identical output file, but will be
-unique among all nonidentical output files. It is not intended
-to be compared as a checksum for the file's contents. A linked
-file may be changed later by other tools, but the build ID bit
-string identifying the original linked file does not change.
+The @code{md5}, @code{sha1}, and @code{xx} styles produces an
+identifier that is always the same in an identical output file, but
+are almost certainly unique among all nonidentical output files. It
+is not intended to be compared as a checksum for the file's contents.
+A linked file may be changed later by other tools, but the build ID
+bit string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -4048,6 +4048,13 @@ a similar fashion by the @code{gcc} linker wrapper program. The default
may be overridden by the @samp{--demangle} and @samp{--no-demangle}
options.
+@kindex SOURCE_DATE_EPOCH
+@cindex timestamps
+If the PE/COFF specific @option{--insert-timestamp} is active and the
+@env{SOURCE_DATE_EPOCH} environment variable is defined, then the
+timestamp value in this variable will be inserted into the COFF header
+instead of the current time.
+
@c man end
@end ifset
diff --git a/ld/ldbuildid.c b/ld/ldbuildid.c
index 5ba9e50..2571f1a 100644
--- a/ld/ldbuildid.c
+++ b/ld/ldbuildid.c
@@ -23,6 +23,10 @@
#include "safe-ctype.h"
#include "md5.h"
#include "sha1.h"
+#ifdef WITH_XXHASH
+#define XXH_INLINE_ALL
+#include <xxhash.h>
+#endif
#include "ldbuildid.h"
#ifdef __MINGW32__
#include <windows.h>
@@ -35,6 +39,9 @@ bool
validate_build_id_style (const char *style)
{
if ((streq (style, "md5")) || (streq (style, "sha1"))
+#ifdef WITH_XXHASH
+ || (streq (style, "xx"))
+#endif
|| (streq (style, "uuid")) || (startswith (style, "0x")))
return true;
@@ -47,6 +54,11 @@ compute_build_id_size (const char *style)
if (streq (style, "md5") || streq (style, "uuid"))
return 128 / 8;
+#ifdef WITH_XXHASH
+ if (streq (style, "xx"))
+ return 128 / 8;
+#endif
+
if (streq (style, "sha1"))
return 160 / 8;
@@ -93,6 +105,16 @@ read_hex (const char xdigit)
return 0;
}
+
+#ifdef WITH_XXHASH
+static void
+xx_process_bytes(const void* buffer, size_t size, void* state)
+{
+ XXH3_128bits_update ((XXH3_state_t*) state, buffer, size);
+}
+#endif
+
+
bool
generate_build_id (bfd *abfd,
const char *style,
@@ -100,7 +122,31 @@ generate_build_id (bfd *abfd,
unsigned char *id_bits,
int size ATTRIBUTE_UNUSED)
{
- if (streq (style, "md5"))
+#ifdef WITH_XXHASH
+ if (streq (style, "xx"))
+ {
+ XXH3_state_t* state = XXH3_createState ();
+ if (!state)
+ {
+ return false;
+ }
+ XXH3_128bits_reset (state);
+ if (!(*checksum_contents) (abfd, &xx_process_bytes, state))
+ {
+ XXH3_freeState (state);
+ return false;
+ }
+ XXH128_hash_t result = XXH3_128bits_digest (state);
+ XXH3_freeState (state);
+ /* Use canonical-endianness output. */
+ XXH128_canonical_t result_canon;
+ XXH128_canonicalFromHash (&result_canon, result);
+ memcpy (id_bits, &result_canon,
+ (size_t) size < sizeof (result) ? (size_t) size : sizeof (result));
+ }
+ else
+#endif
+ if (streq (style, "md5"))
{
struct md5_ctx ctx;
diff --git a/ld/ldelf.c b/ld/ldelf.c
index 0969160..2371af3 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -2118,7 +2118,7 @@ ldelf_place_orphan (asection *s, const char *secname, int constraint)
{ ".bss",
SEC_ALLOC,
0, 0, 0, 0 },
- { 0,
+ { NULL,
SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
0, 0, 0, 0 },
{ ".interp",
@@ -2328,7 +2328,18 @@ ldelf_place_orphan (asection *s, const char *secname, int constraint)
&& (elfinput
? sh_type == SHT_NOTE
: startswith (secname, ".note")))
- place = &hold[orphan_interp];
+ {
+ /* PR 32219: Check that the .interp section
+ exists before attaching orphans to it. */
+ if (lang_output_section_find (hold[orphan_interp].name))
+ place = &hold[orphan_interp];
+ /* Next best place: after .rodata. */
+ else if (lang_output_section_find (hold[orphan_rodata].name))
+ place = &hold[orphan_rodata];
+ /* Last attempt: the .text section. */
+ else
+ place = &hold[orphan_text];
+ }
else if ((flags & (SEC_LOAD | SEC_HAS_CONTENTS | SEC_THREAD_LOCAL)) == 0)
place = &hold[orphan_bss];
else if ((flags & SEC_SMALL_DATA) != 0)
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 9e8cc22..343c4de 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2047,13 +2047,25 @@ lang_insert_orphan (asection *s,
place orphan note section after non-note sections. */
first_orphan_note = NULL;
+
+ /* NB: When --rosegment is used, the .note.gnu.build-id
+ section is placed before text sections. Ignore the
+ .note.gnu.build-id section if -z separate-code and
+ --rosegment are used together to avoid putting any
+ note sections between the .note.gnu.build-id section
+ and text sections in the same PT_LOAD segment. */
+ bool ignore_build_id = (link_info.separate_code
+ && link_info.one_rosegment);
+
for (sec = link_info.output_bfd->sections;
(sec != NULL
&& !bfd_is_abs_section (sec));
sec = sec->next)
if (sec != snew
&& elf_section_type (sec) == SHT_NOTE
- && (sec->flags & SEC_LOAD) != 0)
+ && (sec->flags & SEC_LOAD) != 0
+ && (!ignore_build_id
+ || strcmp (sec->name, ".note.gnu.build-id") != 0))
{
if (!first_orphan_note)
first_orphan_note = sec;
@@ -4883,9 +4895,6 @@ ld_is_local_symbol (asymbol * sym)
if (name == NULL || *name == 0)
return false;
- if (strcmp (name, "(null)") == 0)
- return false;
-
/* Skip .Lxxx and such like. */
if (bfd_is_local_label (link_info.output_bfd, sym))
return false;
@@ -9000,7 +9009,7 @@ lang_record_phdrs (void)
continue;
/* Don't add orphans to PT_INTERP header. */
- if (l->type == 3)
+ if (l->type == PT_INTERP)
continue;
if (last == NULL)
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 4aa0124..8982073 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -2278,6 +2278,15 @@ elf_static_list_options (FILE *file)
{
fprintf (file, _("\
--build-id[=STYLE] Generate build ID note\n"));
+ /* DEFAULT_BUILD_ID_STYLE n/a here */
+#ifdef WITH_XXHASH
+ fprintf (file, _("\
+ Styles: none,md5,sha1,xx,uuid,0xHEX\n"));
+ /* NB: testsuite/ld-elf/build-id.exp depends on this syntax */
+#else
+ fprintf (file, _("\
+ Styles: none,md5,sha1,uuid,0xHEX\n"));
+#endif
fprintf (file, _("\
--package-metadata[=JSON] Generate package metadata note\n"));
fprintf (file, _("\
diff --git a/ld/pdb.c b/ld/pdb.c
index a15da9d..5fd55fb 100644
--- a/ld/pdb.c
+++ b/ld/pdb.c
@@ -161,6 +161,9 @@ static const uint32_t crc_table[] =
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
+static bool remap_type (void *data, struct type_entry **map,
+ uint32_t type_num, uint32_t num_types);
+
/* Add a new stream to the PDB archive, and return its BFD. */
static bfd *
add_stream (bfd *pdb, const char *name, uint16_t *stream_num)
@@ -1836,6 +1839,76 @@ calculate_symbols_size (uint8_t *data, uint32_t size, uint32_t *sym_size)
return true;
}
+/* Parse the DEBUG_S_INLINEELINES data, which records the line numbers that
+ correspond to inlined functions. This is similar to DEBUG_S_LINES (see
+ handle_debugs_section), but rather than just copying we also need to remap
+ the numbers of the referenced LF_FUNC_ID types. */
+
+static bool
+parse_inlinee_lines (uint8_t *data, uint32_t size, uint8_t **bufptr,
+ struct type_entry **map, uint32_t num_types)
+{
+ uint32_t version;
+ uint8_t *ptr;
+ unsigned int num_entries;
+
+ bfd_putl32 (DEBUG_S_INLINEELINES, *bufptr);
+ *bufptr += sizeof (uint32_t);
+
+ bfd_putl32 (size, *bufptr);
+ *bufptr += sizeof (uint32_t);
+
+ /* The inlinee lines data consists of a version uint32_t (0), followed by an
+ array of struct inlinee_source_line:
+
+ struct inlinee_source_line
+ {
+ uint32_t function_id;
+ uint32_t file_id;
+ uint32_t line_no;
+ };
+
+ (see InlineeSourceLine in cvinfo.h)
+
+ We're only interested here in the function_id, as we need to remap its
+ type number.
+ */
+
+ if (size < sizeof (uint32_t))
+ {
+ einfo (_("%P: warning: truncated DEBUG_S_INLINEELINES data\n"));
+ return false;
+ }
+
+ version = bfd_getl32 (data + sizeof (uint32_t) + sizeof (uint32_t));
+ if (version != CV_INLINEE_SOURCE_LINE_SIGNATURE)
+ {
+ einfo (_("%P: warning: unexpected DEBUG_S_INLINEELINES version %u\n"),
+ version);
+ return false;
+ }
+
+ memcpy (*bufptr, data, size);
+ ptr = *bufptr + sizeof (uint32_t);
+ *bufptr += size;
+
+ num_entries = (size - sizeof (uint32_t)) / (3 * sizeof (uint32_t));
+
+ for (unsigned int i = 0; i < num_entries; i++)
+ {
+ uint32_t func_id;
+
+ func_id = bfd_getl32 (ptr);
+
+ if (!remap_type (ptr, map, func_id, num_types))
+ return false;
+
+ ptr += 3 * sizeof (uint32_t);
+ }
+
+ return true;
+}
+
/* Parse the .debug$S section within an object file. */
static bool
handle_debugs_section (asection *s, bfd *mod, struct string_table *strings,
@@ -1951,6 +2024,7 @@ handle_debugs_section (asection *s, bfd *mod, struct string_table *strings,
switch (type)
{
case DEBUG_S_FILECHKSMS:
+ case DEBUG_S_INLINEELINES:
c13_size += sizeof (uint32_t) + sizeof (uint32_t) + size;
if (c13_size % sizeof (uint32_t))
@@ -2088,6 +2162,16 @@ handle_debugs_section (asection *s, bfd *mod, struct string_table *strings,
}
break;
+
+ case DEBUG_S_INLINEELINES:
+ if (!parse_inlinee_lines (data + off, size, &bufptr, map, num_types))
+ {
+ free (data);
+ free (symbuf);
+ return false;
+ }
+
+ break;
}
off += size;
diff --git a/ld/pdb.h b/ld/pdb.h
index a9b518a..06a58bb 100644
--- a/ld/pdb.h
+++ b/ld/pdb.h
@@ -241,10 +241,13 @@ struct optional_dbg_header
#define DEBUG_S_LINES 0xf2
#define DEBUG_S_STRINGTABLE 0xf3
#define DEBUG_S_FILECHKSMS 0xf4
+#define DEBUG_S_INLINEELINES 0xf6
#define STRING_TABLE_SIGNATURE 0xeffeeffe
#define STRING_TABLE_VERSION 1
+#define CV_INLINEE_SOURCE_LINE_SIGNATURE 0
+
/* VHdr in nmt.h */
struct string_table_header
{
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 5b27439..93229e0 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -185,6 +185,9 @@ typedef struct
const char *target_name;
const char *object_target;
unsigned int imagebase_reloc;
+ unsigned int secrel_reloc_lo;
+ unsigned int secrel_reloc_hi;
+ unsigned int section_reloc;
int pe_arch;
int bfd_arch;
bool underscored;
@@ -257,11 +260,16 @@ static pe_details_type pe_detail_list[] =
#ifdef pe_use_plus
"pei-x86-64",
"pe-x86-64",
- 3 /* R_IMAGEBASE */,
+ 3 /* R_AMD64_IMAGEBASE */,
+ 11 /* R_AMD64_SECREL32 */,
+ 12 /* R_AMD64_SECREL7 */,
+ 10 /* R_AMD64_SECTION */,
#else
"pei-i386",
"pe-i386",
7 /* R_IMAGEBASE */,
+ 11, 11 /* R_SECREL32 */,
+ 10 /* R_SECTION */,
#endif
PE_ARCH_i386,
bfd_arch_i386,
@@ -276,7 +284,10 @@ static pe_details_type pe_detail_list[] =
{
"pei-x86-64",
"pe-bigobj-x86-64",
- 3 /* R_IMAGEBASE */,
+ 3 /* R_AMD64_IMAGEBASE */,
+ 11 /* R_AMD64_SECREL32 */,
+ 12 /* R_AMD64_SECREL7 */,
+ 10 /* R_AMD64_SECTION */,
PE_ARCH_i386,
bfd_arch_i386,
false,
@@ -287,6 +298,8 @@ static pe_details_type pe_detail_list[] =
"pei-i386",
"pe-bigobj-i386",
7 /* R_IMAGEBASE */,
+ 11, 11 /* R_SECREL32 */,
+ 10 /* R_SECTION */,
PE_ARCH_i386,
bfd_arch_i386,
true,
@@ -297,6 +310,7 @@ static pe_details_type pe_detail_list[] =
"pei-shl",
"pe-shl",
16 /* R_SH_IMAGEBASE */,
+ ~0, 0, ~0, /* none */
PE_ARCH_sh,
bfd_arch_sh,
true,
@@ -306,6 +320,7 @@ static pe_details_type pe_detail_list[] =
"pei-mips",
"pe-mips",
34 /* MIPS_R_RVA */,
+ ~0, 0, ~0, /* none */
PE_ARCH_mips,
bfd_arch_mips,
false,
@@ -315,6 +330,7 @@ static pe_details_type pe_detail_list[] =
"pei-arm-little",
"pe-arm-little",
11 /* ARM_RVA32 */,
+ ~0, 0, ~0, /* none */
PE_ARCH_arm,
bfd_arch_arm,
true,
@@ -324,6 +340,8 @@ static pe_details_type pe_detail_list[] =
"pei-arm-wince-little",
"pe-arm-wince-little",
2, /* ARM_RVA32 on Windows CE, see bfd/coff-arm.c. */
+ 15, 15, /* ARM_SECREL (dito) */
+ 14, /* ARM_SECTION (dito) */
PE_ARCH_arm_wince,
bfd_arch_arm,
false,
@@ -332,13 +350,16 @@ static pe_details_type pe_detail_list[] =
{
"pei-aarch64-little",
"pe-aarch64-little",
- 2, /* ARM64_RVA32 */
+ 2, /* IMAGE_REL_ARM64_ADDR32NB */
+ 8, /* IMAGE_REL_ARM64_SECREL */
+ 11, /* IMAGE_REL_ARM64_SECREL_LOW12L */
+ 13, /* IMAGE_REL_ARM64_SECTION */
PE_ARCH_aarch64,
bfd_arch_aarch64,
false,
autofilter_symbollist_generic
},
- { NULL, NULL, 0, 0, 0, false, NULL }
+ { NULL, NULL, 0, 0, 0, 0, 0, 0, false, NULL }
};
static const pe_details_type *pe_details;
@@ -1596,7 +1617,10 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
printf ("rel: %s\n", sym->name);
}
if (!relocs[i]->howto->pc_relative
- && relocs[i]->howto->type != pe_details->imagebase_reloc)
+ && relocs[i]->howto->type != pe_details->imagebase_reloc
+ && (relocs[i]->howto->type < pe_details->secrel_reloc_lo
+ || relocs[i]->howto->type > pe_details->secrel_reloc_hi)
+ && relocs[i]->howto->type != pe_details->section_reloc)
{
struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr;
const struct bfd_link_hash_entry *blhe
diff --git a/ld/scripttempl/arclinux.sc b/ld/scripttempl/arclinux.sc
index 36ba5a6..245e020 100644
--- a/ld/scripttempl/arclinux.sc
+++ b/ld/scripttempl/arclinux.sc
@@ -661,6 +661,7 @@ source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
+ .ARC.attributes 0 : { KEEP (*(.ARC.attributes)) }
${OTHER_SECTIONS}
${RELOCATING+${OTHER_SYMBOLS}}
${RELOCATING+${DISCARDED}}
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 5471611..6ef93dc 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -397,6 +397,19 @@ fi
# ===========================================================================
# Functions for generating parts of the linker script
+# Helper function for putting comments into scripts.
+# Useful when trying to track down script composition problems.
+# Use by adding:
+# emit_comment "a message"
+# wherever necessary.
+
+emit_comment()
+{
+cat <<EOF
+ /* $1 */
+EOF
+}
+
emit_header()
{
cat <<EOF
@@ -425,7 +438,6 @@ emit_early_ro()
{
cat <<EOF
${INITIAL_READONLY_SECTIONS}
- .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) }
EOF
}
@@ -436,6 +448,11 @@ cat <<EOF
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}}
${CREATE_PIE+${RELOCATING+PROVIDE (__executable_start = ${SHLIB_TEXT_START_ADDR}); . = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}}
+
+ /* Place build-id as close to the ELF headers as possible. This
+ maximises the chance the build-id will be present in core files,
+ which GDB can then use to locate the associated debuginfo file. */
+ .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) }
EOF
}
@@ -557,6 +574,7 @@ EOF
align_text()
{
cat <<EOF
+ ${RELOCATING+/* Align the text segment. */}
${RELOCATING+${TEXT_SEGMENT_ALIGN}}
EOF
}
@@ -798,11 +816,28 @@ EOF
emit_executable_start
if test -z "${ALL_TEXT_BEFORE_RO}"; then
+ # We are allowed to put R/O sections before code sections.
+
test -n "${SEPARATE_CODE}" || emit_early_ro
test -n "${NON_ALLOC_DYN}${SEPARATE_CODE}" || emit_dyn
+
+ # We only need the alignment if we have emitted some sections.
+ if test -z "${SEPARATE_CODE}"; then
+ align_text
+ elif test -z "${NON_ALLOC_DYN}${SEPARATE_CODE}"; then
+ align_text
+ fi
fi
- align_text
+ # We do not align the code segment here as doing so will increase the file size.
+ # Normally having the text segment at the start of the file will automatically
+ # mean that it is aligned(*), and if we have emitted any r/o sections due to the
+ # tests of SEPARATE_CODE above, then extra alignment will have already been
+ # generated.
+ #
+ # *: Including the ELF headers and .note.gnu.build-id section in the code segment
+ # is a very small theoretical risk.
+
emit_text
align_rodata
diff --git a/ld/scripttempl/elf32cr16.sc b/ld/scripttempl/elf32cr16.sc
index 3e7d92a..305f1f2 100644
--- a/ld/scripttempl/elf32cr16.sc
+++ b/ld/scripttempl/elf32cr16.sc
@@ -171,7 +171,7 @@ SECTIONS
EOF
-source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/misc-sections.sc rom
source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
diff --git a/ld/scripttempl/elf32crx.sc b/ld/scripttempl/elf32crx.sc
index 1b13166..0dcf6ad 100644
--- a/ld/scripttempl/elf32crx.sc
+++ b/ld/scripttempl/elf32crx.sc
@@ -169,7 +169,7 @@ SECTIONS
EOF
-source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/misc-sections.sc rom
source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
diff --git a/ld/scripttempl/elfd10v.sc b/ld/scripttempl/elfd10v.sc
index 1ecf4a1..8d139de 100644
--- a/ld/scripttempl/elfd10v.sc
+++ b/ld/scripttempl/elfd10v.sc
@@ -102,6 +102,10 @@ EOF
cat <<EOF
SECTIONS
{
+ /* PR 32100: GDB makes use of the fact that the .note.gnu.build-id
+ section is typically placed next to the ELF headers. */
+ .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) } ${RELOCATING+ >INSN}
+
.text ${RELOCATING+${TEXT_START_ADDR}} :
{
${RELOCATING+${TEXT_START_SYMBOLS}
@@ -175,7 +179,7 @@ SECTIONS
EOF
-source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/misc-sections.sc DATA
source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc
index 231f53b..046e872 100644
--- a/ld/scripttempl/elfxtensa.sc
+++ b/ld/scripttempl/elfxtensa.sc
@@ -305,6 +305,10 @@ ${RELOCATING- /* For some reason, the Solaris linker makes bad executables
SECTIONS
{
+ /* PR 32100: GDB makes use of the fact that the .note.gnu.build-id
+ section is typically placed next to the ELF headers. */
+ .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) }
+
/* Read-only sections, merged into text segment: */
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
@@ -549,6 +553,7 @@ source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
+ .xtensa.info : { *(.xtensa.info) }
${OTHER_SECTIONS}
${RELOCATING+${OTHER_SYMBOLS}}
${RELOCATING+${DISCARDED}}
diff --git a/ld/scripttempl/mep.sc b/ld/scripttempl/mep.sc
index 39e4d64..2f085d7 100644
--- a/ld/scripttempl/mep.sc
+++ b/ld/scripttempl/mep.sc
@@ -230,6 +230,11 @@ SECTIONS
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
+
+ /* PR 32100: GDB makes use of the fact that the .note.gnu.build-id
+ section is typically placed next to the ELF headers. */
+ .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) }
+
${CREATE_SHLIB-${INTERP}}
${INITIAL_READONLY_SECTIONS}
${TEXT_DYNAMIC+${DYNAMIC}}
diff --git a/ld/scripttempl/misc-sections.sc b/ld/scripttempl/misc-sections.sc
index 94ad715..71b1a6b 100644
--- a/ld/scripttempl/misc-sections.sc
+++ b/ld/scripttempl/misc-sections.sc
@@ -3,10 +3,23 @@
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-#
+
+# This script fragment gathers together some of the more miscellaneous
+# sections that might appear in a linker's input. It can be invoked
+# with a single parameter which is the memory region into which loadable
+# sections should be placed. If the parameter is missing, no memory
+# section placement is used.
+
+if test "x$2" = "x" ;
+then
+ REGION=""
+else
+ REGION="> $2"
+fi
+
cat <<EOF
/* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
+ .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
@@ -17,4 +30,15 @@ cat <<EOF
.gnu.build.attributes : { *(.gnu.build.attributes${RELOCATING+ .gnu.build.attributes.*}) }
+ /* Various note sections. Placed here so that they do not get
+ treated as orphan sections. */
+ .note.build-id : { *(.note.build-id) } ${RELOCATING+${REGION}}
+ .note.GNU-stack : { *(.note.GNU-stack) } ${RELOCATING+${REGION}}
+ .note.gnu-property : { *(.note.gnu-property) } ${RELOCATING+${REGION}}
+ .note.ABI-tag : { *(.note.ABI-tag) } ${RELOCATING+${REGION}}
+ .note.package : { *(.note.package) } ${RELOCATING+${REGION}}
+ .note.dlopen : { *(.note.dlopen) } ${RELOCATING+${REGION}}
+ .note.netbsd.ident : { *(.note.netbsd.ident) } ${RELOCATING+${REGION}}
+ .note.openbsd.ident : { *(.note.openbsd.ident) } ${RELOCATING+${REGION}}
+
EOF
diff --git a/ld/scripttempl/nds32elf.sc b/ld/scripttempl/nds32elf.sc
index 0f8366d..ac7de72 100644
--- a/ld/scripttempl/nds32elf.sc
+++ b/ld/scripttempl/nds32elf.sc
@@ -597,6 +597,8 @@ SHLIB_LARGE_DATA_ADDR=". = SEGMENT_START(\"ldata-segment\", ${SHLIB_LARGE_DATA_A
${TINY_DATA_SECTION}
${TINY_BSS_SECTION}
${STACK_ADDR+${STACK}}
+
+ ${RELOCATING+${DISCARDED}}
EOF
test -z "${NON_ALLOC_DYN}" || emit_dyn
@@ -608,6 +610,5 @@ cat <<EOF
${ATTRS_SECTIONS}
${OTHER_SECTIONS}
${RELOCATING+${OTHER_SYMBOLS}}
- ${RELOCATING+${DISCARDED}}
}
EOF
diff --git a/ld/scripttempl/v850.sc b/ld/scripttempl/v850.sc
index 10d1da8..7daea32 100644
--- a/ld/scripttempl/v850.sc
+++ b/ld/scripttempl/v850.sc
@@ -19,6 +19,10 @@ SEARCH_DIR(.);
${RELOCATING+EXTERN(__ctbp __ep __gp)};
SECTIONS
{
+ /* PR 32100: GDB makes use of the fact that the .note.gnu.build-id
+ section is typically placed next to the ELF headers. */
+ .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) }
+
/* This saves a little space in the ELF file, since the zda starts
at a higher location that the ELF headers take up. */
diff --git a/ld/scripttempl/v850_rh850.sc b/ld/scripttempl/v850_rh850.sc
index e63e7db..dd9d832 100644
--- a/ld/scripttempl/v850_rh850.sc
+++ b/ld/scripttempl/v850_rh850.sc
@@ -19,6 +19,10 @@ SEARCH_DIR(.);
${RELOCATING+EXTERN(__ctbp __ep __gp)};
SECTIONS
{
+ /* PR 32100: GDB makes use of the fact that the .note.gnu.build-id
+ section is typically placed next to the ELF headers. */
+ .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) }
+
/* This saves a little space in the ELF file, since the zda starts
at a higher location that the ELF headers take up. */
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 5f380e3..7fa4520 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -1208,6 +1208,7 @@ run_dump_test "attr-merge-wchar-42-nowarn"
run_dump_test "attr-merge-wchar-44-nowarn"
run_dump_test "farcall-section"
run_dump_test "farcall-missing-type"
+run_dump_test "farcall-missing-type-undefweak"
run_dump_test "attr-merge-unknown-1"
run_dump_test "attr-merge-unknown-2"
run_dump_test "attr-merge-unknown-2r"
diff --git a/ld/testsuite/ld-arm/farcall-missing-type-main-undefweak.s b/ld/testsuite/ld-arm/farcall-missing-type-main-undefweak.s
new file mode 100644
index 0000000..cf72722
--- /dev/null
+++ b/ld/testsuite/ld-arm/farcall-missing-type-main-undefweak.s
@@ -0,0 +1,10 @@
+ .thumb
+ .cpu cortex-m33
+ .syntax unified
+ .global __start
+ .weak bad
+ .type __start, function
+__start:
+ push {r4, lr}
+ bl bad
+ pop {r4, pc}
diff --git a/ld/testsuite/ld-arm/farcall-missing-type-undefweak.d b/ld/testsuite/ld-arm/farcall-missing-type-undefweak.d
new file mode 100644
index 0000000..b6e123f
--- /dev/null
+++ b/ld/testsuite/ld-arm/farcall-missing-type-undefweak.d
@@ -0,0 +1,11 @@
+#source: farcall-missing-type-main-undefweak.s
+#as:
+#ld:-T farcall-missing-type.ld
+#objdump: -dr
+#...
+Disassembly of section .text:
+
+.* <__start>:
+ +[0-9a-f]+: .... .... push {r4, lr}
+ +[0-9a-f]+: .... .... nop.w
+ +[0-9a-f]+: .... .... pop {r4, pc}
diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp
index 1bf258b..6bf8f3d 100644
--- a/ld/testsuite/ld-elf/build-id.exp
+++ b/ld/testsuite/ld-elf/build-id.exp
@@ -36,42 +36,71 @@ if { !([istarget *-*-linux*]
return
}
-run_ld_link_tests [list \
- [list \
- "pr28639a.o" \
- "-r --build-id=md5" \
- "" \
- "" \
- {start.s} \
- {{readelf {--notes} pr28639a.rd}} \
- "pr28639a.o" \
- ] \
- [list \
- "pr28639a.o" \
- "-r --build-id" \
- "" \
- "" \
- {dummy.s} \
- {{readelf {--notes} pr28639b.rd}} \
- "pr28639b.o" \
- ] \
- [list \
- "pr28639a" \
- "--build-id tmpdir/pr28639a.o tmpdir/pr28639b.o" \
- "" \
- "" \
- {dummy.s} \
- {{readelf {--notes} pr28639b.rd} \
- {readelf {--notes} pr28639c.rd}} \
- "pr28639a" \
- ] \
- [list \
- "pr28639b" \
- "--build-id=none tmpdir/pr28639a.o tmpdir/pr28639b.o" \
- "" \
- "" \
- {dummy.s} \
- {{readelf {--notes} pr28639d.rd}} \
- "pr28639b" \
- ] \
-]
+
+set stylelist {"" "--build-id" "--build-id=none" "--build-id=md5"
+ "--build-id=sha1" "--build-id=guid" "--build-id=0xdeadbeef"}
+
+run_ld_link_tests {
+ {
+ "pr28639a.o"
+ "-r --build-id=md5"
+ ""
+ ""
+ {start.s}
+ {{readelf {--notes} pr28639a.rd}}
+ "pr28639a.o"
+ }
+ {
+ "pr28639b.o"
+ "-r --build-id"
+ ""
+ ""
+ {dummy.s}
+ {{readelf {--notes} pr28639b.rd}}
+ "pr28639b.o"
+ }
+ {
+ "pr28639a.o deadbeef"
+ "-r --build-id=0xdeadbeef"
+ ""
+ ""
+ {start.s}
+ {{readelf {--notes} pr28639e.rd}}
+ "pr28639a.o"
+ }
+ {
+ "pr28639a"
+ "--build-id tmpdir/pr28639a.o tmpdir/pr28639b.o"
+ ""
+ ""
+ {dummy.s}
+ {{readelf {--notes} pr28639b.rd}
+ {readelf {--notes} pr28639c.rd}}
+ "pr28639a"
+ }
+ {
+ "pr28639b"
+ "--build-id=none tmpdir/pr28639a.o tmpdir/pr28639b.o"
+ ""
+ ""
+ {dummy.s}
+ {{readelf {--notes} pr28639d.rd}}
+ "pr28639b"
+ }
+}
+
+# see if linker supports xx style also
+catch "exec $ld --help | grep -A2 -- --build-id | grep Styles" tmp
+if {[string first ",xx," $tmp] >= 0} then {
+ run_ld_link_tests {
+ {
+ "pr28639a.o xx"
+ "-r --build-id=xx"
+ ""
+ ""
+ {start.s}
+ {{readelf {--notes} pr28639a.rd}} # 16 bytes
+ "pr28639a.o"
+ }
+ }
+}
diff --git a/ld/testsuite/ld-elf/pr22393-1e.d b/ld/testsuite/ld-elf/pr22393-1e.d
index 51d74fa..55f7e9a 100644
--- a/ld/testsuite/ld-elf/pr22393-1e.d
+++ b/ld/testsuite/ld-elf/pr22393-1e.d
@@ -2,7 +2,7 @@
#ld: -z separate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
-#xfail: h8300-*-* rx-*-linux*
+#xfail: rx-*-linux*
#failif
#...
diff --git a/ld/testsuite/ld-elf/pr22393-1f.d b/ld/testsuite/ld-elf/pr22393-1f.d
index 2a44955..bc61b63 100644
--- a/ld/testsuite/ld-elf/pr22393-1f.d
+++ b/ld/testsuite/ld-elf/pr22393-1f.d
@@ -2,7 +2,7 @@
#ld: -z separate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
-#xfail: h8300-*-* rx-*-linux*
+#xfail: rx-*-linux*
#failif
#...
diff --git a/ld/testsuite/ld-elf/pr22393-2a.rd b/ld/testsuite/ld-elf/pr22393-2a.rd
index 0050f1b..a9c5478 100644
--- a/ld/testsuite/ld-elf/pr22393-2a.rd
+++ b/ld/testsuite/ld-elf/pr22393-2a.rd
@@ -1,5 +1,5 @@
#source: pr22393-1.s
-#ld: -shared -z separate-code
+#ld: -shared -z separate-code --no-rosegment
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
diff --git a/ld/testsuite/ld-elf/pr22393-2b.rd b/ld/testsuite/ld-elf/pr22393-2b.rd
index 0050f1b..a9c5478 100644
--- a/ld/testsuite/ld-elf/pr22393-2b.rd
+++ b/ld/testsuite/ld-elf/pr22393-2b.rd
@@ -1,5 +1,5 @@
#source: pr22393-1.s
-#ld: -shared -z separate-code
+#ld: -shared -z separate-code --no-rosegment
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
diff --git a/ld/testsuite/ld-elf/pr23658-1a.d b/ld/testsuite/ld-elf/pr23658-1a.d
index 10c6ef3..21847f9 100644
--- a/ld/testsuite/ld-elf/pr23658-1a.d
+++ b/ld/testsuite/ld-elf/pr23658-1a.d
@@ -3,16 +3,14 @@
#source: pr23658-1c.s
#source: pr23658-1d.s
#source: start.s
-#ld: --build-id
+#ld: --build-id --no-rosegment
#readelf: -l --wide
# Since generic linker targets don't place SHT_NOTE sections as orphan,
# SHT_NOTE sections aren't grouped nor sorted.
#xfail: [uses_genelf]
#xfail: m68hc12-*
-# The following targets don't support --build-id.
-#xfail: cr16-* crx-* visium-*
# The following targets place .note.gnu.build-id in unusual places.
-#xfail: pru-*
+#xfail: d10v-* pru-*
#...
+[0-9]+ +\.note\.4 \.note\.1 +
diff --git a/ld/testsuite/ld-elf/pr23658-1c.d b/ld/testsuite/ld-elf/pr23658-1c.d
index 87aceca..6ab72dc 100644
--- a/ld/testsuite/ld-elf/pr23658-1c.d
+++ b/ld/testsuite/ld-elf/pr23658-1c.d
@@ -3,7 +3,7 @@
#source: pr23658-1c.s
#source: pr23658-1d.s
#source: start.s
-#ld: --build-id -shared
+#ld: --build-id --no-rosegment -shared
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: ![check_shared_lib_support]
diff --git a/ld/testsuite/ld-elf/pr23658-1e.d b/ld/testsuite/ld-elf/pr23658-1e.d
new file mode 100644
index 0000000..992c748
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr23658-1e.d
@@ -0,0 +1,24 @@
+#source: pr23658-1a.s
+#source: pr23658-1b.s
+#source: pr23658-1c.s
+#source: pr23658-1d.s
+#source: start.s
+#ld: --build-id -z separate-code --rosegment
+#readelf: -l --wide
+# Since generic linker targets don't place SHT_NOTE sections as orphan,
+# SHT_NOTE sections aren't grouped nor sorted. .note.gnu.build-id is
+# placed before text sections and there should no other note sections
+# between .note.gnu.build-id and text sections.
+#xfail: [uses_genelf]
+#xfail: m68hc12-*
+# The following targets don't support --build-id.
+#xfail: cr16-* crx-* visium-*
+# The following targets place .note.gnu.build-id in unusual places.
+#xfail: *-*-hpux* arc*-* avr-* microblaze-*-* nds32*-* spu-*-*
+
+#...
+ +[0-9]+ +\.note.gnu.build-id +
+#...
+ +[0-9]+ +\.note\.4 \.note\.1 +
+ +[0-9]+ +\.note\.2 \.note\.3 +
+#pass
diff --git a/ld/testsuite/ld-elf/pr23658-1f.d b/ld/testsuite/ld-elf/pr23658-1f.d
new file mode 100644
index 0000000..1823111
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr23658-1f.d
@@ -0,0 +1,17 @@
+#source: pr23658-1a.s
+#source: pr23658-1b.s
+#source: pr23658-1c.s
+#source: pr23658-1d.s
+#source: start.s
+#ld: --build-id -z separate-code --rosegment -shared
+# .note.gnu.build-id is placed before text sections and there should
+# no other note sections between .note.gnu.build-id and text sections.
+#readelf: -l --wide
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
+#xfail: ![check_shared_lib_support]
+
+#...
+ +[0-9]+ +\.note.gnu.build-id +
+ +[0-9]+ +\.note\.4 \.note\.1 +
+ +[0-9]+ +\.note\.2 \.note\.3 +
+#pass
diff --git a/ld/testsuite/ld-elf/pr28639e.rd b/ld/testsuite/ld-elf/pr28639e.rd
new file mode 100644
index 0000000..15157ba
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr28639e.rd
@@ -0,0 +1,6 @@
+#...
+Displaying notes found in: \.note\.gnu\.build-id
+ Owner Data size Description
+ GNU 0x00000004 NT_GNU_BUILD_ID \(unique build ID bitstring\)
+ Build ID: deadbeef
+#pass
diff --git a/ld/testsuite/ld-elf/pr30508.d b/ld/testsuite/ld-elf/pr30508.d
index 325ff40..1692780 100644
--- a/ld/testsuite/ld-elf/pr30508.d
+++ b/ld/testsuite/ld-elf/pr30508.d
@@ -2,7 +2,7 @@
#objcopy_linked_file: -R .foo
#readelf: -lW
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
-#xfail: h8300-*-* mips*-*-* rx-*-linux*
+#xfail: mips*-*-* rx-*-linux*
#...
Section to Segment mapping:
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 281c3f5..e13e7e0 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -1410,7 +1410,7 @@ if { [istarget *-*-linux*]
] \
[list \
"Build pr22393-2a.so" \
- "-shared -Wl,-z,separate-code" \
+ "-shared -Wl,-z,separate-code,--no-rosegment" \
"-fPIC" \
{pr22393-2a.c} \
{{readelf -lW pr22393-2a.rd} \
@@ -1419,7 +1419,7 @@ if { [istarget *-*-linux*]
] \
[list \
"Build pr22393-2a-now.so" \
- "-shared -Wl,-z,separate-code,-z,now" \
+ "-shared -Wl,-z,separate-code,-z,now,--no-rosegment" \
"-fPIC" \
{pr22393-2a.c} \
{{readelf -lW pr22393-2a.rd} \
@@ -1428,7 +1428,7 @@ if { [istarget *-*-linux*]
] \
[list \
"Build pr22393-2" \
- "$NOPIE_LDFLAGS -Wl,-z,separate-code,--no-as-needed tmpdir/pr22393-2a.so" \
+ "$NOPIE_LDFLAGS -Wl,-z,separate-code,--no-rosegment,--no-as-needed tmpdir/pr22393-2a.so" \
"$NOPIE_CFLAGS" \
{pr22393-2b.c} \
{{readelf -lW pr22393-2a.rd} \
@@ -1437,7 +1437,7 @@ if { [istarget *-*-linux*]
] \
[list \
"Build pr22393-2 (PIE)" \
- "-pie -Wl,-z,separate-code,--no-as-needed tmpdir/pr22393-2a-now.so" \
+ "-pie -Wl,-z,separate-code,--no-rosegment,--no-as-needed tmpdir/pr22393-2a-now.so" \
"-fPIE" \
{pr22393-2b.c} \
{{readelf -lW pr22393-2a.rd} \
@@ -1446,7 +1446,7 @@ if { [istarget *-*-linux*]
] \
[list \
"Build pr22393-2 (static)" \
- "-static -Wl,-z,separate-code" \
+ "-static -Wl,-z,separate-code,--no-rosegment" \
"" \
{pr22393-2a.c pr22393-2b.c} \
{{readelf -lW pr22393-2a.rd} \
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index a66d67a..9029322 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -514,6 +514,7 @@ run_dump_test "pr28870"
run_dump_test "pr28894"
run_dump_test "pr30787"
run_dump_test "pr31047"
+run_dump_test "pr32191"
if { !([istarget "i?86-*-linux*"]
|| [istarget "i?86-*-gnu*"]
diff --git a/ld/testsuite/ld-i386/pr32191.d b/ld/testsuite/ld-i386/pr32191.d
new file mode 100644
index 0000000..8d7838a
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr32191.d
@@ -0,0 +1,9 @@
+#source: ../ld-x86-64/pr32191.s
+#as: --32 -mx86-used-note=yes
+#ld: -shared -m elf_i386 -z separate-code --build-id --rosegment
+#readelf: -lW
+
+#...
+ +[0-9]+ +\.note\.gnu\.build-id \.text
+ +[0-9]+ +\..* \.note\.gnu\.property .*
+#pass
diff --git a/ld/testsuite/ld-i386/tlsgdesc1.d b/ld/testsuite/ld-i386/tlsgdesc1.d
index 2a70e81..0c853ab 100644
--- a/ld/testsuite/ld-i386/tlsgdesc1.d
+++ b/ld/testsuite/ld-i386/tlsgdesc1.d
@@ -1,4 +1,4 @@
#name: TLS GDesc->LE transition check (LEA)
-#as: --32
+#as: --32 -mtls-check=no
#ld: -melf_i386
#error: .*: relocation R_386_TLS_GOTDESC against `foo' must be used in LEA only
diff --git a/ld/testsuite/ld-i386/tlsgdesc2.d b/ld/testsuite/ld-i386/tlsgdesc2.d
index bbf93be..99e1b18 100644
--- a/ld/testsuite/ld-i386/tlsgdesc2.d
+++ b/ld/testsuite/ld-i386/tlsgdesc2.d
@@ -1,4 +1,4 @@
#name: TLS GDesc->LE transition check (indirect CALL)
-#as: --32
+#as: --32 -mtls-check=no
#ld: -melf_i386
#error: .*: relocation R_386_TLS_DESC_CALL against `foo' must be used in indirect CALL with EAX register only
diff --git a/ld/testsuite/ld-i386/tlsgdesc3.d b/ld/testsuite/ld-i386/tlsgdesc3.d
index f2c29d8..4bb99c4 100644
--- a/ld/testsuite/ld-i386/tlsgdesc3.d
+++ b/ld/testsuite/ld-i386/tlsgdesc3.d
@@ -1,5 +1,5 @@
#source: tlsgdesc2.s
#name: TLS GDesc call (indirect CALL)
-#as: --32
+#as: --32 -mtls-check=no
#ld: -shared -melf_i386
#error: .*: relocation R_386_TLS_DESC_CALL against `foo' must be used in indirect CALL with EAX register only
diff --git a/ld/testsuite/ld-i386/tlsie2.d b/ld/testsuite/ld-i386/tlsie2.d
index 9f9e630..4e7dc6e 100644
--- a/ld/testsuite/ld-i386/tlsie2.d
+++ b/ld/testsuite/ld-i386/tlsie2.d
@@ -1,4 +1,4 @@
#name: TLS IE->LE transition check (R_386_TLS_GOTIE with %eax)
-#as: --32
+#as: --32 -mtls-check=no
#ld: -melf_i386
#error: .*: relocation R_386_TLS_GOTIE against `foo' must be used in ADD, SUB or MOV only
diff --git a/ld/testsuite/ld-i386/tlsie3.d b/ld/testsuite/ld-i386/tlsie3.d
index 506f1a0..6bfc78e 100644
--- a/ld/testsuite/ld-i386/tlsie3.d
+++ b/ld/testsuite/ld-i386/tlsie3.d
@@ -1,4 +1,4 @@
#name: TLS IE->LE transition check (R_386_TLS_GOTIE)
-#as: --32
+#as: --32 -mtls-check=no
#ld: -melf_i386
#error: .*: relocation R_386_TLS_GOTIE against `foo' must be used in ADD, SUB or MOV only
diff --git a/ld/testsuite/ld-i386/tlsie4.d b/ld/testsuite/ld-i386/tlsie4.d
index a516d00..98293f4 100644
--- a/ld/testsuite/ld-i386/tlsie4.d
+++ b/ld/testsuite/ld-i386/tlsie4.d
@@ -1,4 +1,4 @@
#name: TLS IE->LE transition check (R_386_TLS_IE with %eax)
-#as: --32
+#as: --32 -mtls-check=no
#ld: -melf_i386
#error: .*: relocation R_386_TLS_IE against `foo' must be used in ADD or MOV only
diff --git a/ld/testsuite/ld-i386/tlsie5.d b/ld/testsuite/ld-i386/tlsie5.d
index d344718..4e9c9a8 100644
--- a/ld/testsuite/ld-i386/tlsie5.d
+++ b/ld/testsuite/ld-i386/tlsie5.d
@@ -1,4 +1,4 @@
#name: TLS IE->LE transition check (R_386_TLS_IE)
-#as: --32
+#as: --32 -mtls-check=no
#ld: -melf_i386
#error: .*: relocation R_386_TLS_IE against `foo' must be used in ADD or MOV only
diff --git a/ld/testsuite/ld-pe/pdb-inlineelines1-c13-info2.d b/ld/testsuite/ld-pe/pdb-inlineelines1-c13-info2.d
new file mode 100644
index 0000000..ac4e49b
--- /dev/null
+++ b/ld/testsuite/ld-pe/pdb-inlineelines1-c13-info2.d
@@ -0,0 +1,10 @@
+
+tmpdir/pdb-inlineelines1-c13-info2: file format binary
+
+Contents of section .data:
+ 0000 f4000000 30000000 02000000 10016745 ....0.........gE
+ 0010 2301efcd ab8998ba dcfe1023 45670000 #..........#Eg..
+ 0020 08000000 100198ba dcfe1023 45676745 ...........#EggE
+ 0030 2301efcd ab890000 f6000000 1c000000 #...............
+ 0040 00000000 02100000 00000000 2a000000 ............*...
+ 0050 03100000 18000000 1c000000 ............
diff --git a/ld/testsuite/ld-pe/pdb-inlineelines1a.s b/ld/testsuite/ld-pe/pdb-inlineelines1a.s
new file mode 100644
index 0000000..1ab2617
--- /dev/null
+++ b/ld/testsuite/ld-pe/pdb-inlineelines1a.s
@@ -0,0 +1,20 @@
+.equ CV_SIGNATURE_C13, 4
+
+.equ LF_STRING_ID, 0x1605
+
+.equ CV_INLINEE_SOURCE_LINE_SIGNATURE, 0
+
+.section ".debug$T", "rn"
+
+.long CV_SIGNATURE_C13
+
+/* Type 1000, string "hello" */
+.string1:
+.short .types_end - .string1 - 2
+.short LF_STRING_ID
+.long 0 /* sub-string */
+.asciz "hello"
+.byte 0xf2 /* padding */
+.byte 0xf1 /* padding */
+
+.types_end:
diff --git a/ld/testsuite/ld-pe/pdb-inlineelines1b.s b/ld/testsuite/ld-pe/pdb-inlineelines1b.s
new file mode 100644
index 0000000..d8d9170
--- /dev/null
+++ b/ld/testsuite/ld-pe/pdb-inlineelines1b.s
@@ -0,0 +1,160 @@
+.equ CV_SIGNATURE_C13, 4
+
+.equ DEBUG_S_STRINGTABLE, 0xf3
+.equ DEBUG_S_FILECHKSMS, 0xf4
+.equ DEBUG_S_INLINEELINES, 0xf6
+.equ CHKSUM_TYPE_MD5, 1
+
+.equ NUM_MD5_BYTES, 16
+
+.equ T_VOID, 0x0003
+.equ T_UINT4, 0x0075
+
+.equ LF_ARGLIST, 0x1201
+.equ LF_PROCEDURE, 0x1008
+.equ LF_FUNC_ID, 0x1601
+.equ LF_STRING_ID, 0x1605
+
+.equ CV_INLINEE_SOURCE_LINE_SIGNATURE, 0
+
+.section ".debug$T", "rn"
+
+.long CV_SIGNATURE_C13
+
+/* Type 1000, string "world" */
+.string1:
+.short .arglist1 - .string1 - 2
+.short LF_STRING_ID
+.long 0 /* sub-string */
+.asciz "world"
+.byte 0xf2 /* padding */
+.byte 0xf1 /* padding */
+
+/* Type 1001, arglist (uint32_t) */
+.arglist1:
+.short .proctype1 - .arglist1 - 2
+.short LF_ARGLIST
+.long 1 /* no. entries */
+.long T_UINT4
+
+/* Type 1002, procedure (return type T_VOID, arglist 1001) */
+.proctype1:
+.short .funcid1 - .proctype1 - 2
+.short LF_PROCEDURE
+.long T_VOID
+.byte 0 /* calling convention */
+.byte 0 /* attributes */
+.short 1 /* no. parameters */
+.long 0x1001
+
+/* Type 1003, func ID for proc1 */
+.funcid1:
+.short .funcid2 - .funcid1 - 2
+.short LF_FUNC_ID
+.long 0 /* parent scope */
+.long 0x1002 /* type */
+.asciz "proc1"
+.byte 0xf2 /* padding */
+.byte 0xf1 /* padding */
+
+/* Type 1004, func ID for proc2 */
+.funcid2:
+.short .types_end - .funcid2 - 2
+.short LF_FUNC_ID
+.long 0 /* parent scope */
+.long 0x1002 /* type */
+.asciz "proc2"
+.byte 0xf2 /* padding */
+.byte 0xf1 /* padding */
+
+.types_end:
+
+.section ".debug$S", "rn"
+.long CV_SIGNATURE_C13
+
+/*
+ *** STRINGTABLE
+
+ 00000000
+ 00000001 foo.c
+ 00000007 bar.c
+*/
+
+.long DEBUG_S_STRINGTABLE
+.long .strings_end - .strings_start
+
+.strings_start:
+
+.asciz ""
+
+.src1:
+.asciz "foo.c"
+
+.src2:
+.asciz "bar.c"
+
+.strings_end:
+
+.balign 4
+
+/*
+ *** FILECHKSUMS
+
+ FileId St.Offset Cb Type ChksumBytes
+ 0 00000001 10 MD5 67452301EFCDAB8998BADCFE10234567
+ 18 00000007 10 MD5 98BADCFE1023456767452301EFCDAB89
+*/
+
+.long DEBUG_S_FILECHKSMS
+.long .chksms_end - .chksms_start
+
+.chksms_start:
+
+.file1:
+.long .src1 - .strings_start
+.byte NUM_MD5_BYTES
+.byte CHKSUM_TYPE_MD5
+.long 0x01234567
+.long 0x89abcdef
+.long 0xfedcba98
+.long 0x67452310
+.short 0 /* padding */
+
+.file2:
+.long .src2 - .strings_start
+.byte NUM_MD5_BYTES
+.byte CHKSUM_TYPE_MD5
+.long 0xfedcba98
+.long 0x67452310
+.long 0x01234567
+.long 0x89abcdef
+.short 0 /* padding */
+
+.chksms_end:
+
+.balign 4
+
+/*
+ *** INLINEE LINES
+
+ InlineeId FileId StaringLine
+ 1003 0 42
+ 1004 18 28
+*/
+
+.long DEBUG_S_INLINEELINES
+.long .lines_end - .lines_start
+
+.lines_start:
+
+.long CV_INLINEE_SOURCE_LINE_SIGNATURE
+
+.long 0x1003
+.long .file1 - .chksms_start
+.long 42
+
+.long 0x1004
+.long .file2 - .chksms_start
+.long 28
+
+.lines_end:
diff --git a/ld/testsuite/ld-pe/pdb.exp b/ld/testsuite/ld-pe/pdb.exp
index 7ca0fb6..803ec8a 100644
--- a/ld/testsuite/ld-pe/pdb.exp
+++ b/ld/testsuite/ld-pe/pdb.exp
@@ -611,26 +611,6 @@ proc test_mod_info { mod_info } {
if { [expr $off % 4] != 0 } {
set off [expr $off + 4 - ($off % 4)]
}
-
- incr off 64
-
- set obj3 [string range $mod_info $off [expr [string first \000 $mod_info $off] - 1]]
- incr off [expr [string length $obj3] + 1]
-
- set ar3 [string range $mod_info $off [expr [string first \000 $mod_info $off] - 1]]
- incr off [expr [string length $ar3] + 1]
-
- if [string equal $obj3 "* Linker *"] {
- pass "Correct name for dummy object file"
- } else {
- fail "Incorrect name for dummy object file"
- }
-
- if [string equal $ar3 ""] {
- pass "Correct archive name for dummy object file"
- } else {
- fail "Incorrect archive name for dummy object file"
- }
}
proc test_section_contrib { section_contrib } {
@@ -677,7 +657,7 @@ proc test2 { } {
return
}
- if ![ld_link $ld "tmpdir/pdb2.exe" "--pdb=tmpdir/pdb2.pdb --gc-sections -e foo tmpdir/pdb2a.o tmpdir/pdb2b.a"] {
+ if ![ld_link $ld "tmpdir/pdb2.exe" "--pdb=tmpdir/pdb2.pdb --gc-sections --disable-reloc-section -e foo tmpdir/pdb2a.o tmpdir/pdb2b.a"] {
unsupported "Create PE image with PDB file"
return
}
@@ -1764,6 +1744,99 @@ proc test9 { } {
}
}
+proc test10 { } {
+ global as
+ global ar
+ global ld
+ global objdump
+ global srcdir
+ global subdir
+
+ if ![ld_assemble $as $srcdir/$subdir/pdb-inlineelines1a.s tmpdir/pdb-inlineelines1a.o] {
+ unsupported "Build pdb-inlineelines1a.o"
+ return
+ }
+
+ if ![ld_assemble $as $srcdir/$subdir/pdb-inlineelines1b.s tmpdir/pdb-inlineelines1b.o] {
+ unsupported "Build pdb-inlineelines1a.o"
+ return
+ }
+
+ if ![ld_link $ld "tmpdir/pdb-inlineelines1.exe" "--pdb=tmpdir/pdb-inlineelines1.pdb tmpdir/pdb-inlineelines1a.o tmpdir/pdb-inlineelines1b.o"] {
+ unsupported "Create PE image with PDB file"
+ return
+ }
+
+ # read relevant bits from DBI stream
+
+ set exec_output [run_host_cmd "$ar" "x --output tmpdir tmpdir/pdb-inlineelines1.pdb 0003"]
+
+ if ![string match "" $exec_output] {
+ fail "Could not extract DBI stream"
+ return
+ } else {
+ pass "Extracted DBI stream"
+ }
+
+ set fi [open tmpdir/0003]
+ fconfigure $fi -translation binary
+
+ seek $fi 24
+
+ # read substream sizes
+
+ set data [read $fi 4]
+ binary scan $data i mod_info_size
+
+ seek $fi 36 current
+
+ set mod_info [read $fi $mod_info_size]
+
+ close $fi
+
+ # check C13 info in second module
+
+ # We're interested here that the inlinee function IDs get rewritten:
+ # 1003 -> 1002, 1004 -> 1003. The numbers are lower because linking splits
+ # the types into two separate streams, numbered individually.
+
+ # This is what cvdump.exe -inll pdb-inlineelines1.pdb should look like:
+
+ # *** INLINEE LINES
+ #
+ # InlineeId FileId StaringLine
+ # 1002 0 42
+ # 1003 1 28
+
+ # For some reason it numbers file IDs in bytes for object files but as an
+ # index for PDBs, but they're stored on disk the same way.
+
+ set fn1_end [string first \000 $mod_info 64]
+ set fn2_end [string first \000 $mod_info [expr $fn1_end + 1]]
+
+ set off [expr $fn2_end + 1]
+
+ if { [expr $off % 4] != 0 } {
+ set off [expr $off + 4 - ($off % 4)]
+ }
+
+ set c13_info [extract_c13_info "tmpdir/pdb-inlineelines1.pdb" [string range $mod_info $off [expr $off + 63]]]
+
+ set fi [open tmpdir/pdb-inlineelines1-c13-info2 w]
+ fconfigure $fi -translation binary
+ puts -nonewline $fi $c13_info
+ close $fi
+
+ set exp [file_contents "$srcdir/$subdir/pdb-inlineelines1-c13-info2.d"]
+ set got [run_host_cmd "$objdump" "-s --target=binary tmpdir/pdb-inlineelines1-c13-info2"]
+
+ if [string match $exp $got] {
+ pass "Correct C13 info for second module"
+ } else {
+ fail "Incorrect C13 info for second module"
+ }
+}
+
test1
test2
test3
@@ -1773,3 +1846,4 @@ test6
test7
test8
test9
+test10
diff --git a/ld/testsuite/ld-pe/pdb2-section-contrib.d b/ld/testsuite/ld-pe/pdb2-section-contrib.d
index 5b1df9f..214eb11 100644
--- a/ld/testsuite/ld-pe/pdb2-section-contrib.d
+++ b/ld/testsuite/ld-pe/pdb2-section-contrib.d
@@ -7,6 +7,4 @@ Contents of section .data:
0020 01000000 10000000 10000000 20000060 ............ ..`
0030 01000000 00000000 00000000 02000000 ................
0040 00000000 3d000000 40000040 00000000 ....=...@..@....
- 0050 00000000 00000000 04000000 00000000 ................
- 0060 0c000000 40000042 02000000 00000000 ....@..B........
- 0070 00000000 ....
+ 0050 00000000 00000000 ........
diff --git a/ld/testsuite/ld-pe/pe.exp b/ld/testsuite/ld-pe/pe.exp
index 6a1afef..725b58c 100644
--- a/ld/testsuite/ld-pe/pe.exp
+++ b/ld/testsuite/ld-pe/pe.exp
@@ -29,6 +29,7 @@ if {[istarget i*86-*-cygwin*]
|| [istarget i*86-*-pe]
|| [istarget i*86-*-mingw*]
|| [istarget x86_64-*-mingw*]
+ || [istarget x86_64-*-cygwin*]
|| [istarget arm-wince-pe] } {
if {[istarget x86_64-*-mingw*] } {
@@ -37,6 +38,25 @@ if {[istarget i*86-*-cygwin*]
{{objdump -s secrel_64.d}} "secrel.x"}
{".secidx" "--disable-reloc-section" "" "" {secidx1.s secidx2.s}
{{objdump -s secidx_64.d}} "secidx.x"}
+ {".secrel32 w/ relocs" "--enable-reloc-section" "" "" {secrel1.s secrel2.s}
+ {{objdump -p secrel-reloc.d}} "secrel.x"}
+ {".secidx w/ relocs" "--enable-reloc-section" "" "" {secidx1.s secidx2.s}
+ {{objdump -p secidx-reloc.d}} "secidx.x"}
+ {"Empty export table" "" "" "" "exports.s"
+ {{objdump -p exports64.d}} "exports.dll"}
+ {"TLS directory entry" "" "" "" "tlssec.s"
+ {{objdump -p tlssec64.d}} "tlssec.dll"}
+ }
+ } elseif {[istarget x86_64-*-cygwin*]} {
+ set pe_tests {
+ {".secrel32" "--disable-auto-import --disable-reloc-section" "" "" {secrel1.s secrel2.s}
+ {{objdump -s secrel_64.d}} "secrel.x"}
+ {".secidx" "--disable-auto-import --disable-reloc-section" "" "" {secidx1.s secidx2.s}
+ {{objdump -s secidx_64.d}} "secidx.x"}
+ {".secrel32 w/ relocs" "--disable-auto-import --enable-reloc-section" "" "" {secrel1.s secrel2.s}
+ {{objdump -p secrel-reloc.d}} "secrel.x"}
+ {".secidx w/ relocs" "--disable-auto-import --enable-reloc-section" "" "" {secidx1.s secidx2.s}
+ {{objdump -p secidx-reloc.d}} "secidx.x"}
{"Empty export table" "" "" "" "exports.s"
{{objdump -p exports64.d}} "exports.dll"}
{"TLS directory entry" "" "" "" "tlssec.s"
@@ -48,6 +68,10 @@ if {[istarget i*86-*-cygwin*]
{{objdump -s secrel.d}} "secrel.x"}
{".secidx" "--disable-auto-import --disable-reloc-section" "" "" {secidx1.s secidx2.s}
{{objdump -s secidx.d}} "secidx.x"}
+ {".secrel32 w/ relocs" "--disable-auto-import --enable-reloc-section" "" "" {secrel1.s secrel2.s}
+ {{objdump -p secrel-reloc.d}} "secrel-reloc.x"}
+ {".secidx w/ relocs" "--disable-auto-import --enable-reloc-section" "" "" {secidx1.s secidx2.s}
+ {{objdump -p secidx-reloc.d}} "secidx-reloc.x"}
{"Empty export table" "" "" "" "exports.s"
{{objdump -p exports.d}} "exports.dll"}
{"TLS directory entry" "" "" "" "tlssec.s"
@@ -57,6 +81,8 @@ if {[istarget i*86-*-cygwin*]
set pe_tests {
{".secrel32" "--disable-reloc-section" "" "" {secrel1.s secrel2.s}
{{objdump -s secrel.d}} "secrel.x"}
+ {".secrel32 w/ relocs" "" "" "" {secrel1.s secrel2.s}
+ {{objdump -p secrel-reloc.d}} "secrel-reloc.x"}
{"Empty export table" "" "" "" "exports.s"
{{objdump -p exports.d}} "exports.dll"}
{"TLS directory entry" "" "" "" "tlssec.s"
@@ -68,6 +94,10 @@ if {[istarget i*86-*-cygwin*]
{{objdump -s secrel.d}} "secrel.x"}
{".secidx" "--disable-reloc-section" "" "" {secidx1.s secidx2.s}
{{objdump -s secidx.d}} "secidx.x"}
+ {".secrel32 w/ relocs" " --enable-reloc-section" "" "" {secrel1.s secrel2.s}
+ {{objdump -p secrel-reloc.d}} "secrel-reloc.x"}
+ {".secidx w/ relocs" " --enable-reloc-section" "" "" {secidx1.s secidx2.s}
+ {{objdump -p secidx-reloc.d}} "secidx-reloc.x"}
{"Empty export table" "" "" "" "exports.s"
{{objdump -p exports.d}} "exports.dll"}
{"TLS directory entry" "" "" "" "tlssec.s"
diff --git a/ld/testsuite/ld-pe/secidx-reloc.d b/ld/testsuite/ld-pe/secidx-reloc.d
new file mode 100644
index 0000000..043182d
--- /dev/null
+++ b/ld/testsuite/ld-pe/secidx-reloc.d
@@ -0,0 +1,5 @@
+#...
+The Data Directory
+#...
+Entry 5 0+ 0+ Base Relocation Directory \[\.reloc\]
+#...
diff --git a/ld/testsuite/ld-pe/secrel-reloc.d b/ld/testsuite/ld-pe/secrel-reloc.d
new file mode 100644
index 0000000..043182d
--- /dev/null
+++ b/ld/testsuite/ld-pe/secrel-reloc.d
@@ -0,0 +1,5 @@
+#...
+The Data Directory
+#...
+Entry 5 0+ 0+ Base Relocation Directory \[\.reloc\]
+#...
diff --git a/ld/testsuite/ld-x86-64/lam-u48.rd b/ld/testsuite/ld-x86-64/lam-u48.rd
index ad31262..8fac904 100644
--- a/ld/testsuite/ld-x86-64/lam-u48.rd
+++ b/ld/testsuite/ld-x86-64/lam-u48.rd
@@ -1,3 +1,4 @@
+#...
Displaying notes found in: .note.gnu.property
[ ]+Owner[ ]+Data size[ ]+Description
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
diff --git a/ld/testsuite/ld-x86-64/lam-u57.rd b/ld/testsuite/ld-x86-64/lam-u57.rd
index 8b77e63..dd8d1da 100644
--- a/ld/testsuite/ld-x86-64/lam-u57.rd
+++ b/ld/testsuite/ld-x86-64/lam-u57.rd
@@ -1,3 +1,4 @@
+#...
Displaying notes found in: .note.gnu.property
[ ]+Owner[ ]+Data size[ ]+Description
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
diff --git a/ld/testsuite/ld-x86-64/plt3.s b/ld/testsuite/ld-x86-64/plt3.s
new file mode 100644
index 0000000..c3a29b5
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/plt3.s
@@ -0,0 +1,27 @@
+ .text
+ .global _start
+_start:
+ movq $foo@PLT, %rax
+ leaq -11(%rip), %rbx
+ leaq (%rbx, %rax), %rax
+ call *%rax
+
+ # Write out "PASS\n".
+ movl $5, %edx
+ movl $.LC0, %esi
+ movl $1, %edi
+ movl $1, %eax
+ syscall
+
+ # exit
+ movq $60, %rax
+ movq $0, %rdi
+ syscall
+
+foo:
+ ret
+
+ .section .rodata.str1.1,"aMS",@progbits,1
+.LC0:
+ .string "PASS\n"
+ .section .note.GNU-stack,"",@progbits
diff --git a/ld/testsuite/ld-x86-64/pr22393-3a.rd b/ld/testsuite/ld-x86-64/pr22393-3a.rd
index b17e09b..4027ed3 100644
--- a/ld/testsuite/ld-x86-64/pr22393-3a.rd
+++ b/ld/testsuite/ld-x86-64/pr22393-3a.rd
@@ -1,5 +1,5 @@
#source: pr22393-1.s
-#ld: -shared -z separate-code
+#ld: -shared -z separate-code --no-rosegment
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu*
diff --git a/ld/testsuite/ld-x86-64/pr22393-3b.rd b/ld/testsuite/ld-x86-64/pr22393-3b.rd
index b17e09b..4027ed3 100644
--- a/ld/testsuite/ld-x86-64/pr22393-3b.rd
+++ b/ld/testsuite/ld-x86-64/pr22393-3b.rd
@@ -1,5 +1,5 @@
#source: pr22393-1.s
-#ld: -shared -z separate-code
+#ld: -shared -z separate-code --no-rosegment
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu*
diff --git a/ld/testsuite/ld-x86-64/pr32189.s b/ld/testsuite/ld-x86-64/pr32189.s
new file mode 100644
index 0000000..3d0f682
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr32189.s
@@ -0,0 +1,35 @@
+ .text
+ .global _start
+_start:
+ leaq 1f(%rip), %r11
+1:
+ movabs $_GLOBAL_OFFSET_TABLE_, %r15
+ leaq (%r11,%r15), %r15
+
+ movabs $ptr@GOT, %rax
+ movabs $Ldst@GOTOFF, %rdx
+ movq (%rax,%r15), %rax
+ leaq (%rdx,%r15), %rcx
+ movq %rcx, (%rax)
+
+ # Write out "PASS\n".
+ movl $5, %edx
+ movl $.LC0, %esi
+ movl $1, %edi
+ movl $1, %eax
+ syscall
+
+ # exit
+ movq $60, %rax
+ movq $0, %rdi
+ syscall
+
+ .data
+Ldst:
+ .quad 0
+ptr:
+ .quad 0
+ .section .rodata.str1.1,"aMS",@progbits,1
+.LC0:
+ .string "PASS\n"
+ .section .note.GNU-stack,"",@progbits
diff --git a/ld/testsuite/ld-x86-64/pr32191-x32.d b/ld/testsuite/ld-x86-64/pr32191-x32.d
new file mode 100644
index 0000000..19e06a2
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr32191-x32.d
@@ -0,0 +1,9 @@
+#source: pr32191.s
+#as: --x32 -mx86-used-note=yes
+#ld: -shared -m elf32_x86_64 -z separate-code --build-id --rosegment
+#readelf: -lW
+
+#...
+ +[0-9]+ +\.note\.gnu\.build-id \.text
+ +[0-9]+ +\..* \.note\.gnu\.property .*
+#pass
diff --git a/ld/testsuite/ld-x86-64/pr32191.d b/ld/testsuite/ld-x86-64/pr32191.d
new file mode 100644
index 0000000..9038ccd
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr32191.d
@@ -0,0 +1,9 @@
+#source: pr32191.s
+#as: --64 -mx86-used-note=yes
+#ld: -shared -m elf_x86_64 -z separate-code --build-id --rosegment
+#readelf: -lW
+
+#...
+ +[0-9]+ +\.note\.gnu\.build-id \.text
+ +[0-9]+ +\..* \.note\.gnu\.property .*
+#pass
diff --git a/ld/testsuite/ld-x86-64/pr32191.s b/ld/testsuite/ld-x86-64/pr32191.s
new file mode 100644
index 0000000..953f0de
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr32191.s
@@ -0,0 +1,5 @@
+ .text
+ .global foo
+foo:
+ .nops 4
+ .section .note.GNU-stack,"",@progbits
diff --git a/ld/testsuite/ld-x86-64/tlsdesc3.d b/ld/testsuite/ld-x86-64/tlsdesc3.d
index bbf22eb..9558848 100644
--- a/ld/testsuite/ld-x86-64/tlsdesc3.d
+++ b/ld/testsuite/ld-x86-64/tlsdesc3.d
@@ -1,4 +1,4 @@
#name: TLS GDesc->LE transition check (LEA)
-#as: --64
+#as: --64 -mtls-check=no
#ld: -melf_x86_64
#error: .*: relocation R_X86_64_GOTPC32_TLSDESC against `foo' must be used in LEA only
diff --git a/ld/testsuite/ld-x86-64/tlsdesc4.d b/ld/testsuite/ld-x86-64/tlsdesc4.d
index c882c87..ccaa525 100644
--- a/ld/testsuite/ld-x86-64/tlsdesc4.d
+++ b/ld/testsuite/ld-x86-64/tlsdesc4.d
@@ -1,4 +1,4 @@
#name: TLS GDesc->LE transition check (indirect CALL)
-#as: --64
+#as: --64 -mtls-check=no
#ld: -melf_x86_64
#error: .*: relocation R_X86_64_TLSDESC_CALL against `foo' must be used in indirect CALL with RAX register only
diff --git a/ld/testsuite/ld-x86-64/tlsdesc5.d b/ld/testsuite/ld-x86-64/tlsdesc5.d
index 6a0158b..0876993 100644
--- a/ld/testsuite/ld-x86-64/tlsdesc5.d
+++ b/ld/testsuite/ld-x86-64/tlsdesc5.d
@@ -1,5 +1,5 @@
#source: tlsdesc4.s
#name: TLS GDesc call (indirect CALL)
-#as: --64
+#as: --64 -mtls-check=no
#ld: -shared -melf_x86_64
#error: .*: relocation R_X86_64_TLSDESC_CALL against `foo' must be used in indirect CALL with RAX register only
diff --git a/ld/testsuite/ld-x86-64/tlsie2.d b/ld/testsuite/ld-x86-64/tlsie2.d
index bf8a819..2e6d41c 100644
--- a/ld/testsuite/ld-x86-64/tlsie2.d
+++ b/ld/testsuite/ld-x86-64/tlsie2.d
@@ -1,4 +1,4 @@
#name: TLS IE->LE transition check
-#as: --64
+#as: --64 -mtls-check=no
#ld: -melf_x86_64
#error: .*: relocation R_X86_64_GOTTPOFF against `foo' must be used in ADD or MOV only
diff --git a/ld/testsuite/ld-x86-64/tlsie3.d b/ld/testsuite/ld-x86-64/tlsie3.d
index 49d8464..b59cc64 100644
--- a/ld/testsuite/ld-x86-64/tlsie3.d
+++ b/ld/testsuite/ld-x86-64/tlsie3.d
@@ -1,4 +1,4 @@
#name: TLS IE->LE transition check (%r12)
-#as: --64
+#as: --64 -mtls-check=no
#ld: -melf_x86_64
#error: .*: relocation R_X86_64_GOTTPOFF against `foo' must be used in ADD or MOV only
diff --git a/ld/testsuite/ld-x86-64/tlsie5.d b/ld/testsuite/ld-x86-64/tlsie5.d
index 29de1ce..d7ab5ab 100644
--- a/ld/testsuite/ld-x86-64/tlsie5.d
+++ b/ld/testsuite/ld-x86-64/tlsie5.d
@@ -1,4 +1,4 @@
#name: TLS IE->LE transition check (APX)
-#as: --64
+#as: --64 -mtls-check=no
#ld: -melf_x86_64
#error: .*: relocation R_X86_64_CODE_6_GOTTPOFF against `foo' must be used in ADD only
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index e729b69..bd7574d 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -541,6 +541,8 @@ run_dump_test "tlsie5"
run_dump_test "tlsdesc3"
run_dump_test "tlsdesc4"
run_dump_test "tlsdesc5"
+run_dump_test "pr32191"
+run_dump_test "pr32191-x32"
if { ![skip_sframe_tests] } {
run_dump_test "sframe-simple-1"
@@ -1219,7 +1221,7 @@ if { [isnative] && [check_compiler_available] } {
] \
[list \
"Build pr22393-3a.so" \
- "-shared -Wl,-z,separate-code,-z,max-page-size=0x1000" \
+ "-shared -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-rosegment" \
"-fPIC -Wa,-mx86-used-note=yes" \
{pr22393-3a.c} \
{{readelf -lW pr22393-3a.rd} \
@@ -1228,7 +1230,7 @@ if { [isnative] && [check_compiler_available] } {
] \
[list \
"Build pr22393-3a-now.so" \
- "-shared -Wl,-z,separate-code,-z,now,-z,max-page-size=0x1000" \
+ "-shared -Wl,-z,separate-code,-z,now,-z,max-page-size=0x1000,--no-rosegment" \
"-fPIC -Wa,-mx86-used-note=yes" \
{pr22393-3a.c} \
{{readelf -lW pr22393-3a.rd} \
@@ -1237,7 +1239,7 @@ if { [isnative] && [check_compiler_available] } {
] \
[list \
"Build pr22393-3" \
- "$NOPIE_LDFLAGS -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-as-needed tmpdir/pr22393-3a.so" \
+ "$NOPIE_LDFLAGS -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-rosegment,--no-as-needed tmpdir/pr22393-3a.so" \
"$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
{pr22393-3b.c} \
{{readelf -lW pr22393-3a.rd} \
@@ -1246,7 +1248,7 @@ if { [isnative] && [check_compiler_available] } {
] \
[list \
"Build pr22393-3 (PIE)" \
- "-pie -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-as-needed tmpdir/pr22393-3a-now.so" \
+ "-pie -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-rosegment,--no-as-needed tmpdir/pr22393-3a-now.so" \
"-fPIE -Wa,-mx86-used-note=yes" \
{pr22393-3b.c} \
{{readelf -lW pr22393-3a.rd} \
@@ -1255,7 +1257,7 @@ if { [isnative] && [check_compiler_available] } {
] \
[list \
"Build pr22393-3 (static)" \
- "-static -Wl,-z,separate-code,-z,max-page-size=0x1000" \
+ "-static -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-rosegment" \
"-Wa,-mx86-used-note=yes" \
{pr22393-3a.c pr22393-3b.c} \
{{readelf -lW pr22393-3a.rd} \
@@ -1921,6 +1923,22 @@ if { [isnative] && [check_compiler_available] } {
"pass.out" \
"-fPIE" \
] \
+ [list \
+ "Run pr32189" \
+ "$NOPIE_LDFLAGS -nostdlib -nostartfiles" \
+ "" \
+ { pr32189.s } \
+ "pr32189" \
+ "pass.out" \
+ ] \
+ [list \
+ "Run plt3" \
+ "$NOPIE_LDFLAGS -nostdlib -nostartfiles" \
+ "" \
+ { plt3.s } \
+ "plt3" \
+ "pass.out" \
+ ] \
]
# Run-time tests which require working ifunc attribute support.
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index c540940..4c43425 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1141,6 +1141,7 @@ proc uses_genelf { } {
|| [istarget "ft32-*-*"]
|| [istarget "iq2000-*-*"]
|| [istarget "mn10200-*-*"]
+ || [istarget "moxie-*-moxiebox*"]
|| [istarget "msp430-*-*"]
|| [istarget "mt-*-*"]
|| [istarget "pj*-*-*"]
@@ -1151,6 +1152,14 @@ proc uses_genelf { } {
return 0
}
+# Return true if target uses elf.em.
+proc uses_elf_em { } {
+ if { [is_elf_format] && ![uses_genelf] } {
+ return 1;
+ }
+ return 0;
+}
+
proc is_underscore_target { } {
global is_underscore_target_saved
global target_triplet
diff --git a/libctf/testsuite/lib/ctf-lib.exp b/libctf/testsuite/lib/ctf-lib.exp
index cfd36be..966c5a9 100644
--- a/libctf/testsuite/lib/ctf-lib.exp
+++ b/libctf/testsuite/lib/ctf-lib.exp
@@ -136,11 +136,13 @@ proc run_lookup_test { name } {
} else {
set file "$srcdir/$subdir/$name"
}
+ # strip off the srcdir, which contains build host specific pathnames
+ set file4log [string map [list $srcdir/ ""] $file]
set opt_array [slurp_options "${file}.lk"]
if { $opt_array == -1 } {
perror "error reading options from $file.lk"
- unresolved $subdir/$name
+ unresolved $file4log
return
}
set run_ld 0
@@ -166,7 +168,7 @@ proc run_lookup_test { name } {
}
if ![info exists opts($opt_name)] {
perror "unknown option $opt_name in file $file.lk"
- unresolved $subdir/$name
+ unresolved $file4log
return
}
@@ -175,12 +177,12 @@ proc run_lookup_test { name } {
if { [llength $opts(no_cross)] != 0
&& "$TEST_CROSS" eq "yes" } {
- untested "$subdir/$name not tested when cross-compiling"
+ untested "$file4log not tested when cross-compiling"
return
}
if { [llength $opts(host)] != 0 && ![ishost $opts(host)] } {
- untested "$subdir/$name only runs on $opts(host)"
+ untested "$file4log only runs on $opts(host)"
return
}
@@ -203,10 +205,7 @@ proc run_lookup_test { name } {
set shared ""
}
- set testname $opts(name)
- if { $opts(name) == "" } {
- set testname "$subdir/$name"
- }
+ set testname $file4log
# Compile and link the lookup program.
set comp_output [prune_warnings [compile_link_one_host_cc $opts(lookup) "tmpdir/lookup" "libctf.la $opts(lookup_link)"]]
diff --git a/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp b/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp
index 2f14119..6bfeac3 100644
--- a/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp
+++ b/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp
@@ -25,7 +25,7 @@ global testname
global subsrcdir
set subsrcdir "$srcdir/$subdir/"
-set testname "$dir/libctf-repeat-cu.exp"
+set testname "libctf-repeat-cu.exp"
if ![is_elf_format] {
unsupported "CTF needs bfd changes to be emitted on non-ELF"
diff --git a/ltmain.sh b/ltmain.sh
index 7099074..1a71017 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -4968,19 +4968,41 @@ func_mode_link ()
arg="$func_quote_for_eval_result"
;;
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # -F/path gives path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- # -tp=* Portland pgcc target processor selection
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # -fstack-protector* stack protector flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
+ # -stdlib=* select c++ std lib with clang
+ # -fdiagnostics-color* simply affects output
+ # -frecord-gcc-switches used to verify flags were respected
+ # -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fno-sanitize* Clang/GCC memory and address sanitizer
+ # -shared-libsan Link with shared sanitizer runtimes (Clang)
+ # -static-libsan Link with static sanitizer runtimes (Clang)
+ # -fuse-ld=* Linker select flags for GCC
+ # -rtlib=* select c runtime lib with clang
+ # --unwindlib=* select unwinder library with clang
+ # -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
+ # -Wa,* Pass flags directly to the assembler
+ # -Werror, -Werror=* Report (specified) warnings as errors
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*| \
+ -stdlib=*|-rtlib=*|--unwindlib=*| \
+ -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
+ -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \
+ -fdiagnostics-color*|-frecord-gcc-switches| \
+ -fuse-ld=*|-Wa,*|-Werror|-Werror=*)
func_quote_for_eval "$arg"
arg="$func_quote_for_eval_result"
func_append compile_command " $arg"
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 26d667a..e2c7b1b 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -13012,14 +13012,15 @@ 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);
if ((ins->rex & REX_X))
reg += 16;
+ ins->rex2_used &= ~REX_B;
}
+ else if (ins->rex2 & REX_B)
+ reg += 16;
if ((sizeflag & SUFFIX_ALWAYS)
&& (bytemode == x_swap_mode
diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl
index 5049a3b..0cd8538 100644
--- a/opcodes/i386-opc.tbl
+++ b/opcodes/i386-opc.tbl
@@ -1176,12 +1176,19 @@ pxor<MMX>, 0x<MMX:pfx>0fef, <MMX:cpu>, Modrm|<MMX:attr>|C|NoSuf, { <MMX:reg>|<MM
$avx:0xf30f53:0xf30f52:AVX:VexLIG|VexW0|Src1VVVV|SSE2AVX, +
$apx:0x660f384d:0x660f384f:AVX512F:EVexLIG|VexW0|Src1VVVV|Disp8MemShift=2|SSE2AVX, +
$sse:0xf30f53:0xf30f52:SSE:::>
+<fop:opc:sr:ne, +
+ add:58:StaticRounding:ne, +
+ sub:5c:StaticRounding:ne, +
+ mul:59:StaticRounding:ne, +
+ div:5e:StaticRounding:ne, +
+ min:5d::, +
+ max:5f::>
+<flog:opc:comm:optim, and:54:C:, andn:55::Optimize, or:56:C:, xor:57:C:Optimize>
<frel:imm:comm, eq:0:C, lt:1:, le:2:, unord:3:C, neq:4:C, nlt:5:, nle:6:, ord:7:C>
-addps<SSE>, 0x0f58, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-addss<SSE>, 0xf30f58, <SSE:cpu>, Modrm|<SSE:scal>|<SSE:vvvv>|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
-andnps<SSEDQ>, 0x0f55, <SSEDQ:cpu>, Modrm|<SSEDQ:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-andps<SSEDQ>, 0x0f54, <SSEDQ:cpu>, Modrm|<SSEDQ:attr>|C|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
+<fop>ps<SSE>, 0x0f<fop:opc>, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
+<fop>ss<SSE>, 0xf30f<fop:opc>, <SSE:cpu>, Modrm|<SSE:scal>|<SSE:vvvv>|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM }
+<flog>ps<SSEDQ>, 0x0f<flog:opc>, <SSEDQ:cpu>, Modrm|<SSEDQ:attr>|<flog:comm>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
cmp<frel>ps<sse>, 0x0fc2/<frel:imm>, <sse:cpu>, Modrm|<sse:attr>|<sse:vvvv>|<frel:comm>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
cmp<frel>ss<sse>, 0xf30fc2/<frel:imm>, <sse:cpu>, Modrm|<sse:scal>|<sse:vvvv>|<frel:comm>|NoSuf|ImmExt, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM }
cmpps<sse>, 0x0fc2, <sse:cpu>, Modrm|<sse:attr>|<sse:vvvv>|NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM }
@@ -1199,14 +1206,8 @@ cvtss2si, 0xf30f2d, SSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Dword|Unspe
cvttps2pi, 0xf2c, SSE, Modrm|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegMMX }
cvttss2si, 0xf32c, AVX|AVX512F, Modrm|VexLIG|EVexLIG|Space0F|Disp8MemShift=2|No_bSuf|No_wSuf|No_sSuf|SSE2AVX, { Dword|Unspecified|BaseIndex|RegXMM, Reg32|Reg64 }
cvttss2si, 0xf30f2c, SSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf, { Dword|Unspecified|BaseIndex|RegXMM, Reg32|Reg64 }
-divps<SSE>, 0x0f5e, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-divss<SSE>, 0xf30f5e, <SSE:cpu>, Modrm|<SSE:scal>|<SSE:vvvv>|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
ldmxcsr<sse>, 0x0fae/2, <sse:cpu>, Modrm|<sse:attr>|NoSuf, { Dword|Unspecified|BaseIndex }
maskmovq, 0xff7, SSE|3dnowA, Modrm|NoSuf, { RegMMX, RegMMX }
-maxps<SSE>, 0x0f5f, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-maxss<SSE>, 0xf30f5f, <SSE:cpu>, Modrm|<SSE:scal>|<SSE:vvvv>|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
-minps<SSE>, 0x0f5d, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-minss<SSE>, 0xf30f5d, <SSE:cpu>, Modrm|<SSE:scal>|<SSE:vvvv>|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
movaps<SSE>, 0x0f28, <SSE:cpu>, D|Modrm|<SSE:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
movhlps<SSE>, 0x0f12, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM, RegXMM }
movhps, 0x16, AVX|AVX512F, Modrm|Vex128|EVex128|Space0F|Src1VVVV|VexW0|Disp8MemShift=3|NoSuf|SSE2AVX, { Qword|Unspecified|BaseIndex, RegXMM }
@@ -1224,9 +1225,6 @@ movss, 0xf310, AVX|AVX512F, D|Modrm|VexLIG|EVexLIG|Space0F|VexW0|Disp8MemShift=2
movss, 0xf310, AVX|AVX512F, D|Modrm|VexLIG|EVexLIG|Space0F|Src1VVVV|VexW0|NoSuf|SSE2AVX, { RegXMM, RegXMM }
movss, 0xf30f10, SSE, D|Modrm|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
movups<SSE>, 0x0f10, <SSE:cpu>, D|Modrm|<SSE:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-mulps<SSE>, 0x0f59, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-mulss<SSE>, 0xf30f59, <SSE:cpu>, Modrm|<SSE:scal>|<SSE:vvvv>|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
-orps<SSEDQ>, 0x0f56, <SSEDQ:cpu>, Modrm|<SSEDQ:attr>|C|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
pavg<bw>, 0xfe0 | (3 * <bw:opc>), SSE|3dnowA, Modrm|NoSuf, { Qword|Unspecified|BaseIndex|RegMMX, RegMMX }
pavg<bw><SSE2BW>, 0x660fe0 | (3 * <bw:opc>), <SSE2BW:cpu>, Modrm|<SSE2BW:attr>|<SSE2BW:vvvv>|C|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
pextrw<SSE2D>, 0x660fc5, <SSE2D:cpu>, Load|Modrm|<SSE2D:attr>|No_bSuf|No_wSuf|No_sSuf|IgnoreSize|NoRex64, { Imm8, RegXMM, Reg32|Reg64 }
@@ -1263,12 +1261,9 @@ shufps<SSE>, 0x0fc6, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { Imm8|Imm8S,
sqrtps<SSE>, 0x0f51, <SSE:cpu>, Modrm|<SSE:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
sqrtss<SSE>, 0xf30f51, <SSE:cpu>, Modrm|<SSE:scal>|<SSE:vvvv>|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
stmxcsr<sse>, 0x0fae/3, <sse:cpu>, Modrm|<sse:attr>|NoSuf, { Dword|Unspecified|BaseIndex }
-subps<SSE>, 0x0f5c, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-subss<SSE>, 0xf30f5c, <SSE:cpu>, Modrm|<SSE:scal>|<SSE:vvvv>|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
ucomiss<SSE>, 0x0f2e, <SSE:cpu>, Modrm|<SSE:scal>|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
unpckhps<SSE>, 0x0f15, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
unpcklps<SSE>, 0x0f14, <SSE:cpu>, Modrm|<SSE:attr>|<SSE:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-xorps<SSEDQ>, 0x0f57, <SSEDQ:cpu>, Modrm|<SSEDQ:attr>|C|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
// SSE2 instructions.
@@ -1277,10 +1272,9 @@ xorps<SSEDQ>, 0x0f57, <SSEDQ:cpu>, Modrm|<SSEDQ:attr>|C|NoSuf, { RegXMM|Unspecif
$apx:AVX512DQ&AVX512VL:EVex128|VexW1|Src1VVVV|Disp8MemShift=4|SSE2AVX, +
$sse:SSE2:>
-addpd<SSE2Q>, 0x660f58, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-addsd<SSE2Q>, 0xf20f58, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|<SSE2Q:vvvv>|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-andnpd<SSE2DQ>, 0x660f55, <SSE2DQ:cpu>, Modrm|<SSE2DQ:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-andpd<SSE2DQ>, 0x660f54, <SSE2DQ:cpu>, Modrm|<SSE2DQ:attr>|C|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
+<fop>pd<SSE2Q>, 0x660f<fop:opc>, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
+<fop>sd<SSE2Q>, 0xf20f<fop:opc>, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM }
+<flog>pd<SSE2DQ>, 0x660f<flog:opc>, <SSE2DQ:cpu>, Modrm|<SSE2DQ:attr>|<flog:comm>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
cmp<frel>pd<sse2>, 0x660fc2/<frel:imm>, <sse2:cpu>, Modrm|<sse2:attr>|<sse2:vvvv>|<frel:comm>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
cmp<frel>sd<sse2>, 0xf20fc2/<frel:imm>, <sse2:cpu>, Modrm|<sse2:scal>|<sse2:vvvv>|<frel:comm>|NoSuf|ImmExt, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM }
cmppd<sse2>, 0x660fc2, <sse2:cpu>, Modrm|<sse2:attr>|<sse2:vvvv>|NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM }
@@ -1294,12 +1288,6 @@ cvtsi2sd, 0xf22a, x64&(AVX|AVX512F), Modrm|VexLIG|EVexLIG|Space0F|Src1VVVV|Disp8
cvtsi2sd, 0xf22a, x64&(AVX|AVX512F), Modrm|VexLIG|EVexLIG|Space0F|Src1VVVV|Disp8ShiftVL|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<SSE2Q>, 0x660f5e, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-divsd<SSE2Q>, 0xf20f5e, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|<SSE2Q:vvvv>|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-maxpd<SSE2Q>, 0x660f5f, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-maxsd<SSE2Q>, 0xf20f5f, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|<SSE2Q:vvvv>|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-minpd<SSE2Q>, 0x660f5d, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-minsd<SSE2Q>, 0xf20f5d, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|<SSE2Q:vvvv>|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
movapd<SSE2Q>, 0x660f28, <SSE2Q:cpu>, D|Modrm|<SSE2Q:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
movhpd, 0x6616, AVX, Modrm|Vex|Space0F|Src1VVVV|VexW0|NoSuf|SSE2AVX, { Qword|Unspecified|BaseIndex, RegXMM }
movhpd, 0x6616, AVX512F, Modrm|EVex128|Space0F|Src1VVVV|VexW1|Disp8MemShift=3|NoSuf|SSE2AVX, { Qword|Unspecified|BaseIndex, RegXMM }
@@ -1319,18 +1307,12 @@ movsd, 0xf210, AVX, D|Modrm|VexLIG|Space0F|Src1VVVV|VexW0|NoSuf|SSE2AVX, { RegXM
movsd, 0xf210, AVX512F, D|Modrm|EVexLIG|Space0F|Src1VVVV|VexW1|NoSuf|SSE2AVX, { RegXMM, RegXMM }
movsd, 0xf20f10, SSE2, D|Modrm|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
movupd<SSE2Q>, 0x660f10, <SSE2Q:cpu>, D|Modrm|<SSE2Q:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-mulpd<SSE2Q>, 0x660f59, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-mulsd<SSE2Q>, 0xf20f59, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|<SSE2Q:vvvv>|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-orpd<SSE2DQ>, 0x660f56, <SSE2DQ:cpu>, Modrm|<SSE2DQ:attr>|C|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
shufpd<SSE2Q>, 0x660fc6, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { Imm8|Imm8S, RegXMM|Unspecified|BaseIndex, RegXMM }
sqrtpd<SSE2Q>, 0x660f51, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
sqrtsd<SSE2Q>, 0xf20f51, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|<SSE2Q:vvvv>|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-subpd<SSE2Q>, 0x660f5c, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-subsd<SSE2Q>, 0xf20f5c, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|<SSE2Q:vvvv>|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
ucomisd<SSE2Q>, 0x660f2e, <SSE2Q:cpu>, Modrm|<SSE2Q:scal>|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
unpckhpd<SSE2Q>, 0x660f15, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
unpcklpd<SSE2Q>, 0x660f14, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|<SSE2Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-xorpd<SSE2DQ>, 0x660f57, <SSE2DQ:cpu>, Modrm|<SSE2DQ:attr>|C|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
cvtdq2pd<SSE2D>, 0xf30fe6, <SSE2D:cpu>, Modrm|<SSE2D:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
cvtpd2dq<SSE2Q>, 0xf20fe6, <SSE2Q:cpu>, Modrm|<SSE2Q:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
cvtdq2ps<SSE2D>, 0x0f5b, <SSE2D:cpu>, Modrm|<SSE2D:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
@@ -1509,11 +1491,11 @@ blendvp<sd>, 0x664a | <sd:opc>, AVX, Modrm|Vex128|Space0F3A|Src1VVVV|VexW0|NoSuf
blendvp<sd>, 0x660f3814 | <sd:opc>, SSE4_1, Modrm|NoSuf, { Acc|Xmmword, RegXMM|Unspecified|BaseIndex, RegXMM }
blendvp<sd>, 0x660f3814 | <sd:opc>, SSE4_1, Modrm|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
dpp<sd><sse41>, 0x660f3a40 | <sd:opc>, <sse41:cpu>, Modrm|<sse41:attr>|<sse41:vvvv>|NoSuf, { Imm8|Imm8S, RegXMM|Unspecified|BaseIndex, RegXMM }
-extractps, 0x6617, AVX|AVX512F, Modrm|Vex128|EVex128|Space0F3A|VexW0|Disp8MemShift=2|NoSuf|SSE2AVX, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex }
-extractps, 0x6617, x64&(AVX|AVX512F), RegMem|Vex128|EVex128|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<SSE41D>, 0x660f3a21, <SSE41D:cpu>, Modrm|<SSE41D:attr>|<SSE41D:vvvv>|Disp8MemShift|NoSuf, { Imm8, Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
+extractps, 0x6617, AVX|AVX512F, Modrm|Vex128|EVex128|Space0F3A|VexW0|Disp8MemShift=2|NoSuf|SSE2AVX|Optimize, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex }
+extractps, 0x6617, x64&(AVX|AVX512F), RegMem|Vex128|EVex128|Space0F3A|VexW1|NoSuf|SSE2AVX|Optimize, { Imm8, RegXMM, Reg64 }
+extractps, 0x660f3a17, SSE4_1, Modrm|IgnoreSize|NoSuf|Optimize, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex }
+extractps, 0x660f3a17, SSE4_1&x64, RegMem|NoSuf|Optimize|NoRex64, { Imm8, RegXMM, Reg64 }
+insertps<SSE41D>, 0x660f3a21, <SSE41D:cpu>, Modrm|<SSE41D:attr>|<SSE41D:vvvv>|Disp8MemShift|NoSuf|Optimize, { Imm8, Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
movntdqa<SSE41D>, 0x660f382a, <SSE41D:cpu>, Modrm|<SSE41D:attr>|NoSuf, { Xmmword|Unspecified|BaseIndex, RegXMM }
mpsadbw<sse41>, 0x660f3a42, <sse41:cpu>, Modrm|<sse41:attr>|<sse41:vvvv>|NoSuf, { Imm8|Imm8S, RegXMM|Unspecified|BaseIndex, RegXMM }
packusdw<SSE41BW>, 0x660f382b, <SSE41BW:cpu>, Modrm|<SSE41BW:attr>|<SSE41BW:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
@@ -1544,18 +1526,13 @@ pminsb<SSE41BW>, 0x660f3838, <SSE41BW:cpu>, Modrm|<SSE41BW:attr>|<SSE41BW:vvvv>|
pminsd<SSE41D>, 0x660f3839, <SSE41D:cpu>, Modrm|<SSE41D:attr>|<SSE41D:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
pminud<SSE41D>, 0x660f383b, <SSE41D:cpu>, Modrm|<SSE41D:attr>|<SSE41D:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
pminuw<SSE41BW>, 0x660f383a, <SSE41BW:cpu>, Modrm|<SSE41BW:attr>|<SSE41BW:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
-pmovsxbw<SSE41BW>, 0x660f3820, <SSE41BW:cpu>, Modrm|<SSE41BW:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovsxbd<SSE41D>, 0x660f3821, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovsxbq<SSE41D>, 0x660f3822, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Word|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovsxwd<SSE41D>, 0x660f3823, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovsxwq<SSE41D>, 0x660f3824, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovsxdq<SSE41D>, 0x660f3825, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovzxbw<SSE41BW>, 0x660f3830, <SSE41BW:cpu>, Modrm|<SSE41BW:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovzxbd<SSE41D>, 0x660f3831, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovzxbq<SSE41D>, 0x660f3832, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Word|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovzxwd<SSE41D>, 0x660f3833, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovzxwq<SSE41D>, 0x660f3834, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
-pmovzxdq<SSE41D>, 0x660f3835, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
+<movx:opc, movsx:2, movzx:3>
+p<movx>bw<SSE41BW>, 0x660f38<movx:opc>0, <SSE41BW:cpu>, Modrm|<SSE41BW:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
+p<movx>bd<SSE41D>, 0x660f38<movx:opc>1, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
+p<movx>bq<SSE41D>, 0x660f38<movx:opc>2, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Word|Unspecified|BaseIndex|RegXMM, RegXMM }
+p<movx>wd<SSE41D>, 0x660f38<movx:opc>3, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
+p<movx>wq<SSE41D>, 0x660f38<movx:opc>4, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM }
+p<movx>dq<SSE41D>, 0x660f38<movx:opc>5, <SSE41D:cpu>, Modrm|<SSE41D:attr>|Disp8MemShift|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
pmuldq<SSE41Q>, 0x660f3828, <SSE41Q:cpu>, Modrm|<SSE41Q:attr>|<SSE41Q:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
pmulld<SSE41D>, 0x660f3840, <SSE41D:cpu>, Modrm|<SSE41D:attr>|<SSE41D:vvvv>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
ptest<sse41>, 0x660f3817, <sse41:cpu>, Modrm|<sse41:attr>|NoSuf, { RegXMM|Unspecified|BaseIndex, RegXMM }
@@ -1654,17 +1631,14 @@ gf2p8mulb<gfni>, 0x660f38cf, GFNI<gfni:cpu>, Modrm|<gfni:attr>|<gfni:vexw0>|NoSu
x:Vex128:ATTSyntax:RegXMM|Unspecified|BaseIndex, +
y:Vex256:ATTSyntax:RegYMM|Unspecified|BaseIndex>
-vaddp<sd>, 0x<sd:ppfx>58, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vadds<sd>, 0x<sd:spfx>58, AVX, Modrm|VexLIG|Space0F|Src1VVVV|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
+v<fop>p<sd>, 0x<sd:ppfx><fop:opc>, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
+v<fop>s<sd>, 0x<sd:spfx><fop:opc>, AVX, Modrm|VexLIG|Space0F|Src1VVVV|VexWIG|NoSuf, { RegXMM|<sd:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
vaddsubpd, 0x66d0, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vaddsubps, 0xf2d0, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vandnp<sd>, 0x<sd:ppfx>55, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf|Optimize, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vandp<sd>, 0x<sd:ppfx>54, AVX, Modrm|C|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
+v<flog>p<sd>, 0x<sd:ppfx><flog:opc>, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|<flog:comm>|CheckOperandSize|NoSuf|<flog:optim>, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
vblendp<sd>, 0x660c | <sd:opc>, AVX, Modrm|Vex|Space0F3A|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vblendvp<sd>, 0x664a | <sd:opc>, AVX, Modrm|Vex|Space0F3A|Src1VVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|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 }
vcmp<frel>p<sd>, 0x<sd:ppfx>c2/0x<frel:imm>, AVX, Modrm|<frel:comm>|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf|ImmExt, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
@@ -1688,32 +1662,22 @@ vcvtss2sd, 0xf35a, AVX, Modrm|Vex=3|Space0F|Src1VVVV|VexWIG|NoSuf, { Dword|Unspe
vcvttpd2dq<Vxy>, 0x66e6, AVX, Modrm|<Vxy:vex>|Space0F|VexWIG|NoSuf|<Vxy:syntax>, { <Vxy:src>, RegXMM }
vcvttps2dq, 0xf35b, AVX, Modrm|Vex|Space0F|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vcvtts<sd>2si, 0x<sd:spfx>2c, AVX, Modrm|VexLIG|Space0F|No_bSuf|No_wSuf|No_sSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, Reg32|Reg64 }
-vdivp<sd>, 0x<sd:ppfx>5e, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vdivs<sd>, 0x<sd:spfx>5e, AVX, Modrm|VexLIG|Space0F|Src1VVVV|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vdppd, 0x6641, AVX, Modrm|Vex|Space0F3A|Src1VVVV|VexWIG|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vdpps, 0x6640, AVX, Modrm|Vex|Space0F3A|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-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 }
+vextractf128, 0x6619, AVX, Modrm|Vex256|Space0F3A|VexW0|NoSuf|Optimize, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM }
+vextractps, 0x6617, AVX|AVX512F, Modrm|Vex128|EVex128|Space0F3A|VexWIG|Disp8MemShift=2|NoSuf|Optimize, { Imm8, RegXMM, Reg32|Unspecified|BaseIndex }
+vextractps, 0x6617, x64&(AVX|AVX512F), RegMem|Vex128|EVex128|Space0F3A|VexWIG|NoSuf|Optimize, { Imm8, RegXMM, Reg64 }
vhaddpd, 0x667c, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vhaddps, 0xf27c, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vhsubpd, 0x667d, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vhsubps, 0xf27d, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vinsertf128, 0x6618, AVX, Modrm|Vex256|Space0F3A|Src1VVVV|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|Src1VVVV|VexW0|Disp8MemShift=4|NoSuf, { Imm8, Xmmword|Unspecified|BaseIndex, RegYMM, RegYMM }
-vinsertps, 0x6621, AVX, Modrm|Vex|Space0F3A|Src1VVVV|VexWIG|NoSuf, { Imm8, Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
+vinsertps, 0x6621, AVX, Modrm|Vex|Space0F3A|Src1VVVV|VexWIG|NoSuf|Optimize, { 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 }
vmaskmovdqu, 0x66f7, AVX, Modrm|Vex|Space0F|VexWIG|NoSuf, { RegXMM, RegXMM }
vmaskmovp<sd>, 0x662e | <sd:opc>, AVX, Modrm|Vex|Space0F38|Src1VVVV|VexW0|CheckOperandSize|NoSuf, { RegXMM|RegYMM, RegXMM|RegYMM, Xmmword|Ymmword|Unspecified|BaseIndex }
vmaskmovp<sd>, 0x662c | <sd:opc>, AVX, Modrm|Vex|Space0F38|Src1VVVV|VexW0|CheckOperandSize|NoSuf, { Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
-vmaxp<sd>, 0x<sd:ppfx>5f, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vmaxs<sd>, 0x<sd:spfx>5f, AVX, Modrm|VexLIG|Space0F|Src1VVVV|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
-vminp<sd>, 0x<sd:ppfx>5d, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vmins<sd>, 0x<sd:spfx>5d, AVX, Modrm|VexLIG|Space0F|Src1VVVV|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vmovap<sd>, 0x<sd:ppfx>28, AVX, D|Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
// vmovd really shouldn't allow for 64bit operand (vmovq is the right
// mnemonic for copying between Reg64/Mem64 and RegXMM, as is mandated
@@ -1745,9 +1709,6 @@ vmovshdup, 0xf316, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspe
vmovsldup, 0xf312, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vmovup<sd>, 0x<sd:ppfx>10, AVX, D|Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vmpsadbw, 0x6642, AVX|AVX2, Modrm|Vex|Space0F3A|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vmulp<sd>, 0x<sd:ppfx>59, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vmuls<sd>, 0x<sd:spfx>59, AVX, Modrm|VexLIG|Space0F|Src1VVVV|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
-vorp<sd>, 0x<sd:ppfx>56, AVX, Modrm|C|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vpabs<bw>, 0x661c | <bw:opc>, AVX|AVX2, Modrm|Vex|Space0F38|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vpabsd, 0x661e, AVX|AVX2, Modrm|Vex|Space0F38|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vpackssdw, 0x666b, AVX|AVX2, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
@@ -1813,18 +1774,12 @@ vpminub, 0x66da, AVX|AVX2, Modrm|C|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|
vpminud, 0x663b, AVX|AVX2, Modrm|Vex|Space0F38|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vpminuw, 0x663a, AVX|AVX2, Modrm|Vex|Space0F38|Src1VVVV|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|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|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|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 }
+vp<movx>bd, 0x66<movx:opc>1, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM }
+vp<movx>bq, 0x66<movx:opc>2, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=1|NoSuf, { RegXMM|Word|Unspecified|BaseIndex, RegXMM }
+vp<movx>bw, 0x66<movx:opc>0, AVX, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
+vp<movx>dq, 0x66<movx:opc>5, AVX, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Qword|Unspecified|BaseIndex|RegXMM, RegXMM }
+vp<movx>wd, 0x66<movx:opc>3, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM }
+vp<movx>wq, 0x66<movx:opc>4, AVX|AVX512VL, Modrm|Vex128|EVex128|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegXMM }
vpmuldq, 0x6628, AVX|AVX2, Modrm|Vex|Space0F38|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vpmulhrsw, 0x660b, AVX|AVX2, Modrm|Vex|Space0F38|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vpmulhuw, 0x66e4, AVX|AVX2, Modrm|C|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
@@ -1872,47 +1827,32 @@ vrcpps, 0x53, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecifie
vrcpss, 0xf353, AVX, Modrm|Vex=3|Space0F|Src1VVVV|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vroundp<sd>, 0x6608 | <sd:opc>, AVX, Modrm|Vex|Space0F3A|VexWIG|CheckOperandSize|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vrounds<sd>, 0x660a | <sd:opc>, AVX, Modrm|VexLIG|Space0F3A|Src1VVVV|VexWIG|NoSuf, { Imm8, <sd:elem>|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<sd>, 0x6608 | <sd:opc>, APX_F&AVX512VL, Modrm|Space0F3A|<sd:vexw>|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM }
-vrounds<sd>, 0x660a | <sd:opc>, APX_F&AVX512F, Modrm|EVexLIG|Space0F3A|Src1VVVV|<sd:vexw>|Disp8MemShift|NoSuf, { Imm8, <sd:elem>|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|Src1VVVV|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vshufp<sd>, 0x<sd:ppfx>c6, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vsqrtp<sd>, 0x<sd:ppfx>51, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vsqrts<sd>, 0x<sd:spfx>51, AVX, Modrm|VexLIG|Space0F|Src1VVVV|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vstmxcsr, 0xae/3, AVX, Modrm|Vex128|Space0F|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex }
-vsubp<sd>, 0x<sd:ppfx>5c, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vsubs<sd>, 0x<sd:spfx>5c, AVX, Modrm|VexLIG|Space0F|Src1VVVV|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
vtestp<sd>, 0x660e | <sd:opc>, AVX, Modrm|Vex|Space0F38|VexW0|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
vucomis<sd>, 0x<sd:ppfx>2e, AVX, Modrm|VexLIG|Space0F|VexWIG|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM }
vunpckhp<sd>, 0x<sd:ppfx>15, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vunpcklp<sd>, 0x<sd:ppfx>14, AVX, Modrm|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vxorp<sd>, 0x<sd:ppfx>57, AVX, Modrm|C|Vex|Space0F|Src1VVVV|VexWIG|CheckOperandSize|NoSuf|Optimize, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vzeroall, 0x77, AVX, Vex=2|Space0F|VexWIG|NoSuf, {}
vzeroupper, 0x77, AVX, Vex|Space0F|VexWIG|NoSuf, {}
// 256bit integer AVX2 instructions.
-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|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|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 }
+vp<movx>bd, 0x66<movx:opc>1, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM }
+vp<movx>bq, 0x66<movx:opc>2, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=2|NoSuf, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM }
+vp<movx>bw, 0x66<movx:opc>0, AVX2, Modrm|Vex=2|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegYMM }
+vp<movx>dq, 0x66<movx:opc>5, AVX2, Modrm|Vex=2|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegYMM }
+vp<movx>wd, 0x66<movx:opc>3, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM }
+vp<movx>wq, 0x66<movx:opc>4, AVX2|AVX512VL, Modrm|Vex256|EVex256|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM }
// New AVX2 instructions.
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|Src1VVVV|VexW0|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
@@ -1924,12 +1864,8 @@ vpermd, 0x6636, AVX2|AVX512F, Modrm|Vex256|EVexDYN|Masking|Space0F38|Src1VVVV|Ve
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|Src1VVVV|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|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 }
+vextracti128, 0x6639, AVX2, Modrm|Vex256|Space0F3A|VexW0|NoSuf|Optimize, { Imm8, RegYMM, Unspecified|BaseIndex|RegXMM }
vinserti128, 0x6638, AVX2, Modrm|Vex256|Space0F3A|Src1VVVV|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|Src1VVVV|VexW0|Disp8MemShift=4|NoSuf, { Imm8, Xmmword|Unspecified|BaseIndex, RegYMM, RegYMM }
vpmaskmov<dq>, 0x668e, AVX2, Modrm|Vex|Space0F38|Src1VVVV|<dq:vexw>|CheckOperandSize|NoSuf, { RegXMM|RegYMM, RegXMM|RegYMM, Xmmword|Ymmword|Unspecified|BaseIndex }
vpmaskmov<dq>, 0x668c, AVX2, Modrm|Vex|Space0F38|Src1VVVV|<dq:vexw>|CheckOperandSize|NoSuf, { Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM }
vpsllv<dq>, 0x6647, AVX2|AVX512F, Modrm|Vex|EVexDYN|Masking|Space0F38|Src1VVVV|<dq:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|<dq:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
@@ -1987,6 +1923,8 @@ vcvtps2ph, 0x661d, F16C, Modrm|Vex=2|Space0F3A|VexW=1|NoSuf, { Imm8, RegYMM, Uns
// FMA instructions
+<fm:opc3:opc4, fmadd:88:68, fmsub:8a:6c, fnmadd:8c:78, fnmsub:8e:7c>
+
<fma:opc, 132:10, 213:20, 231:30>
<sdh:cpu:cpudq:fma:ppfx:spfx:pfx:spc1:spc2:opc:vex:vexlig:vexw:elem, +
@@ -1994,16 +1932,10 @@ vcvtps2ph, 0x661d, F16C, Modrm|Vex=2|Space0F3A|VexW=1|NoSuf, { Imm8, RegYMM, Uns
d:AVX512F:AVX512DQ:FMA|AVX512F:66:f2:66:Space0F:Space0F38:1:Vex|EVexDYN:VexLIG|EVexLIG:VexW1:Qword, +
h:AVX512_FP16:AVX512_FP16:AVX512_FP16::f3::EVexMap5:EVexMap6:0::EVexLIG:VexW0:Word>
-vfmadd<fma>p<sdh>, 0x6688 | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vex>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vfmadd<fma>s<sdh>, 0x6689 | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vexlig>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
+v<fm><fma>p<sdh>, 0x66<fm:opc3> | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vex>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
+v<fm><fma>s<sdh>, 0x66<fm:opc3> | 1 | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vexlig>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
vfmaddsub<fma>p<sdh>, 0x6686 | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vex>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vfmsub<fma>p<sdh>, 0x668a | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vex>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vfmsub<fma>s<sdh>, 0x668b | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vexlig>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
vfmsubadd<fma>p<sdh>, 0x6687 | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vex>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vfnmadd<fma>p<sdh>, 0x668c | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vex>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vfnmadd<fma>s<sdh>, 0x668d | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vexlig>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
-vfnmsub<fma>p<sdh>, 0x668e | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vex>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vfnmsub<fma>s<sdh>, 0x668f | 0x<fma:opc>, <sdh:fma>, Modrm|<sdh:vexlig>|Masking|<sdh:spc2>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
// HLE prefixes
@@ -2029,16 +1961,10 @@ shrx, 0xf2f7, APX_F(BMI2), Modrm|CheckOperandSize|Vex128|EVex128|Space0F38|Src2V
// FMA4 instructions
-vfmaddp<sd>, 0x6668 | <sd:opc>, FMA4, D|Modrm|Vex|Space0F3A|Src1VVVV|VexW1|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vfmadds<sd>, 0x666a | <sd:opc>, FMA4, D|Modrm|VexLIG|Space0F3A|Src1VVVV|VexW1|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM, RegXMM }
+v<fm>p<sd>, 0x66<fm:opc4> | <sd:opc>, FMA4, D|Modrm|Vex|Space0F3A|Src1VVVV|VexW1|CheckOperandSize|NoSuf, { RegXMM|RegYMM|Unspecified|BaseIndex, RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
+v<fm>s<sd>, 0x66<fm:opc4> | 2 | <sd:opc>, FMA4, D|Modrm|VexLIG|Space0F3A|Src1VVVV|VexW1|NoSuf, { RegXMM|<sd:elem>|Unspecified|BaseIndex, RegXMM, RegXMM, RegXMM }
vfmaddsubp<sd>, 0x665c | <sd:opc>, FMA4, D|Modrm|Vex|Space0F3A|Src1VVVV|VexW1|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
vfmsubaddp<sd>, 0x665e | <sd:opc>, FMA4, D|Modrm|Vex|Space0F3A|Src1VVVV|VexW1|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vfmsubp<sd>, 0x666c | <sd:opc>, FMA4, D|Modrm|Vex|Space0F3A|Src1VVVV|VexW1|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vfmsubs<sd>, 0x666e | <sd:opc>, FMA4, D|Modrm|VexLIG|Space0F3A|Src1VVVV|VexW1|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM, RegXMM }
-vfnmaddp<sd>, 0x6678 | <sd:opc>, FMA4, D|Modrm|Vex|Space0F3A|Src1VVVV|VexW1|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vfnmadds<sd>, 0x667a | <sd:opc>, FMA4, D|Modrm|VexLIG|Space0F3A|Src1VVVV|VexW1|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM, RegXMM }
-vfnmsubp<sd>, 0x667c | <sd:opc>, FMA4, D|Modrm|Vex|Space0F3A|Src1VVVV|VexW1|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
-vfnmsubs<sd>, 0x667e | <sd:opc>, FMA4, D|Modrm|VexLIG|Space0F3A|Src1VVVV|VexW1|NoSuf, { <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM, RegXMM }
// XOP instructions
@@ -2314,17 +2240,11 @@ kshiftr<bw>, 0x6630, <bw:kcpu>, Modrm|Vex128|Space0F3A|<bw:vexw>|NoSuf, { Imm8,
kunpckbw, 0x664B, AVX512F, Modrm|Vex=2|Space0F|Src1VVVV|VexW0|NoSuf, { RegMask, RegMask, RegMask }
-vaddp<sdh>, 0x<sdh:ppfx>58, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vdivp<sdh>, 0x<sdh:ppfx>5e, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vmulp<sdh>, 0x<sdh:ppfx>59, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vsqrtp<sdh>, 0x<sdh:ppfx>51, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
-vsubp<sdh>, 0x<sdh:ppfx>5c, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
+v<fop>p<sdh>, 0x<sdh:ppfx><fop:opc>, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|<fop:sr>|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
+v<fop>s<sdh>, 0x<sdh:spfx><fop:opc>, <sdh:cpu>, Modrm|EVexLIG|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|<fop:sr>|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
-vadds<sdh>, 0x<sdh:spfx>58, <sdh:cpu>, Modrm|EVexLIG|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
-vdivs<sdh>, 0x<sdh:spfx>5e, <sdh:cpu>, Modrm|EVexLIG|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
-vmuls<sdh>, 0x<sdh:spfx>59, <sdh:cpu>, Modrm|EVexLIG|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
+vsqrtp<sdh>, 0x<sdh:ppfx>51, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|StaticRounding|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
vsqrts<sdh>, 0x<sdh:spfx>51, <sdh:cpu>, Modrm|EVexLIG|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
-vsubs<sdh>, 0x<sdh:spfx>5C, <sdh:cpu>, Modrm|EVexLIG|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|StaticRounding|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
valign<dq>, 0x6603, AVX512F, Modrm|Masking|Space0F3A|Src1VVVV|<dq:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, RegXMM|RegYMM|RegZMM|<dq:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
vblendmp<sd>, 0x6665, AVX512F, Modrm|Masking|Space0F38|Src1VVVV|<sd:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|<sd:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
@@ -2436,11 +2356,11 @@ vpexpandq, 0x6689, AVX512F, Modrm|Masking|Space0F38|VexW=2|Disp8MemShift=3|Check
vexpandps, 0x6688, AVX512F, Modrm|Masking|Space0F38|VexW=1|Disp8MemShift=2|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
vpexpandd, 0x6689, AVX512F, Modrm|Masking|Space0F38|VexW=1|Disp8MemShift=2|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
-vextractf32x4, 0x6619, AVX512F, Modrm|Masking|Space0F3A|VexW=1|Disp8MemShift=4|NoSuf, { Imm8, RegYMM|RegZMM, RegXMM|Unspecified|BaseIndex }
-vextracti32x4, 0x6639, AVX512F, Modrm|Masking|Space0F3A|VexW=1|Disp8MemShift=4|NoSuf, { Imm8, RegYMM|RegZMM, RegXMM|Unspecified|BaseIndex }
+vextractf32x4, 0x6619, AVX512F, Modrm|Masking|Space0F3A|VexW=1|Disp8MemShift=4|NoSuf|Optimize, { Imm8, RegYMM|RegZMM, RegXMM|Unspecified|BaseIndex }
+vextracti32x4, 0x6639, AVX512F, Modrm|Masking|Space0F3A|VexW=1|Disp8MemShift=4|NoSuf|Optimize, { Imm8, RegYMM|RegZMM, RegXMM|Unspecified|BaseIndex }
-vextractf64x4, 0x661B, AVX512F, Modrm|EVex=1|Masking|Space0F3A|VexW=2|Disp8MemShift=5|NoSuf, { Imm8, RegZMM, RegYMM|Unspecified|BaseIndex }
-vextracti64x4, 0x663B, AVX512F, Modrm|EVex=1|Masking|Space0F3A|VexW=2|Disp8MemShift=5|NoSuf, { Imm8, RegZMM, RegYMM|Unspecified|BaseIndex }
+vextractf64x4, 0x661B, AVX512F, Modrm|EVex=1|Masking|Space0F3A|VexW=2|Disp8MemShift=5|NoSuf|Optimize, { Imm8, RegZMM, RegYMM|Unspecified|BaseIndex }
+vextracti64x4, 0x663B, AVX512F, Modrm|EVex=1|Masking|Space0F3A|VexW=2|Disp8MemShift=5|NoSuf|Optimize, { Imm8, RegZMM, RegYMM|Unspecified|BaseIndex }
vfixupimmp<sd>, 0x6654, AVX512F, Modrm|Masking|Space0F3A|Src1VVVV|<sd:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM|<sd:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
vfixupimms<sd>, 0x6655, AVX512F, Modrm|EVexLIG|Masking|Space0F3A|Src1VVVV|<sd:vexw>|Disp8MemShift|NoSuf|SAE, { Imm8|Imm8S, RegXMM|<sd:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
@@ -2474,13 +2394,7 @@ vinserti32x4, 0x6638, AVX512F, Modrm|Masking|Space0F3A|Src1VVVV|VexW0|Disp8MemSh
vinsertf64x4, 0x661A, AVX512F, Modrm|EVex=1|Masking|Space0F3A|Src1VVVV|VexW1|Disp8MemShift=5|NoSuf, { Imm8, RegYMM|Unspecified|BaseIndex, RegZMM, RegZMM }
vinserti64x4, 0x663A, AVX512F, Modrm|EVex=1|Masking|Space0F3A|Src1VVVV|VexW1|Disp8MemShift=5|NoSuf, { Imm8, RegYMM|Unspecified|BaseIndex, RegZMM, RegZMM }
-vinsertps, 0x6621, AVX512F, Modrm|EVex128|Space0F3A|Src1VVVV|VexW0|Disp8MemShift=2|NoSuf, { Imm8, RegXMM|Dword|Unspecified|BaseIndex, RegXMM, RegXMM }
-
-vmaxp<sdh>, 0x<sdh:ppfx>5f, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vmaxs<sdh>, 0x<sdh:spfx>5f, <sdh:cpu>, Modrm|EVexLIG|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
-
-vminp<sdh>, 0x<sdh:ppfx>5d, <sdh:cpu>, Modrm|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|SAE, { RegXMM|RegYMM|RegZMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vmins<sdh>, 0x<sdh:spfx>5d, <sdh:cpu>, Modrm|EVexLIG|Masking|<sdh:spc1>|Src1VVVV|<sdh:vexw>|Disp8MemShift|NoSuf|SAE, { RegXMM|<sdh:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
+vinsertps, 0x6621, AVX512F, Modrm|EVex128|Space0F3A|Src1VVVV|VexW0|Disp8MemShift=2|NoSuf|Optimize, { Imm8, RegXMM|Dword|Unspecified|BaseIndex, RegXMM, RegXMM }
vmovap<sd>, 0x<sd:ppfx>28, AVX512F, D|Modrm|Masking|Space0F|<sd:vexw>|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
vmovntp<sd>, 0x<sd:ppfx>2B, AVX512F, Modrm|Space0F|<sd:vexw>|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM, XMMword|YMMword|ZMMword|Unspecified|BaseIndex }
@@ -2545,40 +2459,19 @@ vpermilpd, 0x660d, AVX512F, Modrm|Masking|Space0F38|Src1VVVV|VexW1|Broadcast|Dis
vpermpd, 0x6616, AVX512F, Modrm|Masking|Space0F38|Src1VVVV|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM }
vpermq, 0x6636, AVX512F, Modrm|Masking|Space0F38|Src1VVVV|VexW1|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegYMM|RegZMM|Qword|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM }
-vpmovdb, 0xF331, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegZMM, RegXMM|Unspecified|BaseIndex }
-vpmovsdb, 0xF321, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegZMM, RegXMM|Unspecified|BaseIndex }
-vpmovusdb, 0xF311, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegZMM, RegXMM|Unspecified|BaseIndex }
-
-vpmovdw, 0xF333, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
-vpmovsdw, 0xF323, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
-vpmovusdw, 0xF313, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
-
-vpmovqb, 0xF332, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegZMM, RegXMM|Qword|Unspecified|BaseIndex }
-vpmovsqb, 0xF322, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegZMM, RegXMM|Qword|Unspecified|BaseIndex }
-vpmovusqb, 0xF312, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegZMM, RegXMM|Qword|Unspecified|BaseIndex }
-
-vpmovqd, 0xF335, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
-vpmovsqd, 0xF325, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
-vpmovusqd, 0xF315, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
-
-vpmovqw, 0xF334, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegZMM, RegXMM|Unspecified|BaseIndex }
-vpmovsqw, 0xF324, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegZMM, RegXMM|Unspecified|BaseIndex }
-vpmovusqw, 0xF314, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=4|NoSuf, { RegZMM, RegXMM|Unspecified|BaseIndex }
-
-vpmovsxbd, 0x6621, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegZMM }
-vpmovzxbd, 0x6631, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegZMM }
+<movn:opc, mov:3, movs:2, movus:1>
-vpmovsxbq, 0x6622, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegZMM }
-vpmovzxbq, 0x6632, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegZMM }
+vp<movn>db, 0xf3<movn:opc>1, AVX512F, Modrm|EVex512|Masking|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { RegZMM, RegXMM|Unspecified|BaseIndex }
+vp<movn>dw, 0xf3<movn:opc>3, AVX512F, Modrm|EVex512|Masking|Space0F38|VexW0|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
+vp<movn>qb, 0xf3<movn:opc>2, AVX512F, Modrm|EVex512|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegZMM, RegXMM|Qword|Unspecified|BaseIndex }
+vp<movn>qd, 0xf3<movn:opc>5, AVX512F, Modrm|EVex512|Masking|Space0F38|VexW0|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
+vp<movn>qw, 0xf3<movn:opc>4, AVX512F, Modrm|EVex512|Masking|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { RegZMM, RegXMM|Unspecified|BaseIndex }
-vpmovsxdq, 0x6625, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM }
-vpmovzxdq, 0x6635, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM }
-
-vpmovsxwd, 0x6623, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM }
-vpmovzxwd, 0x6633, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM }
-
-vpmovsxwq, 0x6624, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegZMM }
-vpmovzxwq, 0x6634, AVX512F, Modrm|EVex=1|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegZMM }
+vp<movx>bd, 0x66<movx:opc>1, AVX512F, Modrm|EVex512|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegZMM }
+vp<movx>bq, 0x66<movx:opc>2, AVX512F, Modrm|EVex512|Masking|Space0F38|VexWIG|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegZMM }
+vp<movx>dq, 0x66<movx:opc>5, AVX512F, Modrm|EVex512|Masking|Space0F38|VexW0|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM }
+vp<movx>wd, 0x66<movx:opc>3, AVX512F, Modrm|EVex512|Masking|Space0F38|VexWIG|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM }
+vp<movx>wq, 0x66<movx:opc>4, AVX512F, Modrm|EVex512|Masking|Space0F38|VexWIG|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegZMM }
vprol<dq>, 0x6672/1, AVX512F, Modrm|Masking|Space0F|DstVVVV|<dq:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM|<dq:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
vpror<dq>, 0x6672/0, AVX512F, Modrm|Masking|Space0F|DstVVVV|<dq:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8|Imm8S, RegXMM|RegYMM|RegZMM|<dq:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
@@ -2732,45 +2625,23 @@ vcvtps2ph, 0x661D, AVX512VL, Modrm|EVex256|Masking|Space0F3A|VexW0|Disp8MemShift
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 }
+vp<movn>db, 0xf3<movn:opc>1, AVX512VL, Modrm|EVex128|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex }
+vp<movn>db, 0xf3<movn:opc>1, AVX512VL, Modrm|EVex256|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex }
+
+vp<movn>dw, 0xf3<movn:opc>3, AVX512VL, Modrm|EVex128|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex }
+vp<movn>dw, 0xf3<movn:opc>3, AVX512VL, Modrm|EVex256|Masking|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex }
+
+vp<movn>qb, 0xf3<movn:opc>2, AVX512VL, Modrm|EVex128|Masking|Space0F38|VexW0|Disp8MemShift=1|NoSuf, { RegXMM, RegXMM|Word|Unspecified|BaseIndex }
+vp<movn>qb, 0xf3<movn:opc>2, AVX512VL, Modrm|EVex256|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegYMM, RegXMM|Dword|Unspecified|BaseIndex }
+
+vp<movn>qd, 0xf3<movn:opc>5, AVX512VL, Modrm|EVex128|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex }
+vp<movn>qd, 0xf3<movn:opc>5, AVX512VL, Modrm|EVex256|Masking|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { RegYMM, RegXMM|Unspecified|BaseIndex }
+
+vp<movn>qw, 0xf3<movn:opc>4, AVX512VL, Modrm|EVex128|Masking|Space0F38|VexW0|Disp8MemShift=2|NoSuf, { RegXMM, RegXMM|Dword|Unspecified|BaseIndex }
+vp<movn>qw, 0xf3<movn:opc>4, AVX512VL, Modrm|EVex256|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegYMM, RegXMM|Qword|Unspecified|BaseIndex }
+
+vp<movx>dq, 0x66<movx:opc>5, AVX512VL, Modrm|EVex128|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM }
+vp<movx>dq, 0x66<movx:opc>5, AVX512VL, Modrm|EVex256|Masking|Space0F38|VexW0|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM }
// AVX512VL instructions end.
@@ -2876,24 +2747,13 @@ vpmaddwd, 0x66F5, AVX512BW, Modrm|Masking|Space0F|Src1VVVV|VexWIG|Disp8ShiftVL|C
vpmov<bw>2m, 0xf329, AVX512BW, Modrm|EVexDYN|Space0F38|<bw:vexw>|NoSuf, { RegXMM|RegYMM|RegZMM, RegMask }
vpmovm2<bw>, 0xf328, AVX512BW, Modrm|EVexDYN|Space0F38|<bw:vexw>|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 }
-
-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 }
-
-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 }
+vp<movn>wb, 0xf3<movn:opc>0, AVX512BW, Modrm|EVex512|Masking|Space0F38|VexW0|Disp8MemShift=5|NoSuf, { RegZMM, RegYMM|Unspecified|BaseIndex }
+vp<movn>wb, 0xf3<movn:opc>0, AVX512BW&AVX512VL, Modrm|EVex128|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM, RegXMM|Qword|Unspecified|BaseIndex }
+vp<movn>wb, 0xf3<movn:opc>0, AVX512BW&AVX512VL, Modrm|EVex256|Masking|Space0F38|VexW0|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 }
-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 }
+vp<movx>bw, 0x66<movx:opc>0, AVX512BW, Modrm|EVex512|Masking|Space0F38|VexWIG|Disp8MemShift=5|NoSuf, { RegYMM|Unspecified|BaseIndex, RegZMM }
+vp<movx>bw, 0x66<movx:opc>0, AVX512BW&AVX512VL, Modrm|EVex128|Masking|VexWIG|Space0F38|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegXMM }
+vp<movx>bw, 0x66<movx:opc>0, AVX512BW&AVX512VL, Modrm|EVex256|Masking|VexWIG|Space0F38|Disp8MemShift=4|NoSuf, { RegXMM|Unspecified|BaseIndex, RegYMM }
vpsadbw, 0x66F6, AVX512BW, Modrm|Space0F|Src1VVVV|VexWIG|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
@@ -2917,10 +2777,7 @@ vptestnm<bw>, 0xf326, AVX512BW, Modrm|Masking|Space0F38|Src1VVVV|<bw:vexw>|Disp8
kadd<bw>, 0x<bw:kpfx>4A, AVX512DQ, Modrm|Vex256|Space0F|Src1VVVV|VexW0|NoSuf, { RegMask, RegMask, RegMask }
ktest<bw>, 0x<bw:kpfx>99, AVX512DQ, Modrm|Vex128|Space0F|VexW0|NoSuf, { RegMask, RegMask }
-vandnp<sd>, 0x<sd:ppfx>55, AVX512DQ, Modrm|Masking|Space0F|Src1VVVV|<sd:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|Optimize, { RegXMM|RegYMM|RegZMM|<sd:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vandp<sd>, 0x<sd:ppfx>54, AVX512DQ, Modrm|Masking|Space0F|Src1VVVV|<sd:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|<sd:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vorp<sd>, 0x<sd:ppfx>56, AVX512DQ, Modrm|Masking|Space0F|Src1VVVV|<sd:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf, { RegXMM|RegYMM|RegZMM|<sd:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
-vxorp<sd>, 0x<sd:ppfx>57, AVX512DQ, Modrm|Masking|Space0F|Src1VVVV|<sd:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|Optimize, { RegXMM|RegYMM|RegZMM|<sd:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
+v<flog>p<sd>, 0x<sd:ppfx><flog:opc>, AVX512DQ, Modrm|Masking|Space0F|Src1VVVV|<sd:vexw>|Broadcast|Disp8ShiftVL|CheckOperandSize|NoSuf|<flog:optim>, { RegXMM|RegYMM|RegZMM|<sd:elem>|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM, RegXMM|RegYMM|RegZMM }
vbroadcastf32x2, 0x6619, AVX512DQ, Modrm|Masking|Space0F38|VexW0|Disp8MemShift=3|NoSuf, { RegXMM|Qword|Unspecified|BaseIndex, RegYMM|RegZMM }
vbroadcastf32x8, 0x661B, AVX512DQ, Modrm|EVex=1|Masking|Space0F38|VexW=1|Disp8MemShift=5|NoSuf, { YMMword|Unspecified|BaseIndex, RegZMM }
@@ -2957,16 +2814,16 @@ vcvttps2uqq, 0x6678, AVX512DQ&AVX512VL, Modrm|EVex256|Masking|Space0F|VexW0|Broa
vcvtuqq2ps<Exy>, 0xf27a, AVX512DQ&<Exy:vl>, Modrm|<Exy:attr>|Masking|Space0F|VexW1|Broadcast|NoSuf|<Exy:sr>, { <Exy:src>|Qword, <Exy:dst> }
-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 }
+vextractf32x8, 0x661B, AVX512DQ, Modrm|EVex=1|Masking|Space0F3A|VexW=1|Disp8MemShift=5|NoSuf|Optimize, { Imm8, RegZMM, RegYMM|Unspecified|BaseIndex }
+vextracti32x8, 0x663B, AVX512DQ, Modrm|EVex=1|Masking|Space0F3A|VexW=1|Disp8MemShift=5|NoSuf|Optimize, { Imm8, RegZMM, RegYMM|Unspecified|BaseIndex }
vinsertf32x8, 0x661A, AVX512DQ, Modrm|EVex512|Masking|Space0F3A|Src1VVVV|VexW0|Disp8MemShift=5|NoSuf, { Imm8, RegYMM|Unspecified|BaseIndex, RegZMM, RegZMM }
vinserti32x8, 0x663A, AVX512DQ, Modrm|EVex512|Masking|Space0F3A|Src1VVVV|VexW0|Disp8MemShift=5|NoSuf, { Imm8, RegYMM|Unspecified|BaseIndex, RegZMM, RegZMM }
vpextr<dq>, 0x6616, AVX512DQ&<dq:cpu64>, Modrm|EVex128|Space0F3A|<dq:vexw64>|Disp8MemShift|NoSuf|Optimize, { Imm8, RegXMM, <dq:gpr>|Unspecified|BaseIndex }
vpinsr<dq>, 0x6622, AVX512DQ&<dq:cpu64>, Modrm|EVex128|Space0F3A|Src1VVVV|<dq:vexw64>|Disp8MemShift|NoSuf, { Imm8, <dq:gpr>|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 }
+vextractf64x2, 0x6619, AVX512DQ, Modrm|Masking|Space0F3A|VexW=2|Disp8MemShift=4|NoSuf|Optimize, { Imm8, RegYMM|RegZMM, RegXMM|Unspecified|BaseIndex }
+vextracti64x2, 0x6639, AVX512DQ, Modrm|Masking|Space0F3A|VexW=2|Disp8MemShift=4|NoSuf|Optimize, { Imm8, RegYMM|RegZMM, RegXMM|Unspecified|BaseIndex }
vinsertf64x2, 0x6618, AVX512DQ, Modrm|Masking|Space0F3A|Src1VVVV|VexW1|Disp8MemShift=4|CheckOperandSize|NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM }
vinserti64x2, 0x6638, AVX512DQ, Modrm|Masking|Space0F3A|Src1VVVV|VexW1|Disp8MemShift=4|CheckOperandSize|NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegYMM|RegZMM, RegYMM|RegZMM }
diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h
index 631e2a6..4de9578 100644
--- a/opcodes/i386-tbl.h
+++ b/opcodes/i386-tbl.h
@@ -12752,6 +12752,106 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
+ { MN_subps, 0x5c, 2, SPACE_0F, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 1, 1, 0, 0, 1, 2, 0, 0, 0, 0, 4, 0, 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0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -12802,7 +13032,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_andps, 0x54, 2, SPACE_0F, None,
+ { MN_orps, 0x56, 2, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -12812,7 +13042,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_andps, 0x54, 2, SPACE_0F, None,
+ { MN_orps, 0x56, 2, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0,
0, 0 },
@@ -12822,7 +13052,37 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_andps, 0x54, 2, SPACE_0F, None,
+ { MN_orps, 0x56, 2, SPACE_0F, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0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0 } },
+ { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0 } } } },
+ { MN_xorps, 0x57, 2, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0 },
@@ -13350,46 +13610,6 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0 } } } },
- { MN_divps, 0x5e, 2, SPACE_0F, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 1, 0, 0, 1, 2, 0, 0, 0, 0, 4, 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, 1, 0, 0, 0 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0 } } } },
- { MN_divps, 0x5e, 2, SPACE_0F, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0 } },
{ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_addpd, 0x58, 2, SPACE_0F, None,
+ { MN_divpd, 0x5e, 2, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -14728,7 +14818,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_addpd, 0x58, 2, SPACE_0F, None,
+ { MN_divpd, 0x5e, 2, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 2, 1, 0, 1, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
0, 0 },
@@ -14738,7 +14828,67 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_addpd, 0x58, 2, SPACE_0F, None,
+ { MN_divpd, 0x5e, 2, SPACE_0F, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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PACE_0F, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0 },
+ { { 17, 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 } },
+ { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0 } } } },
{ MN_andnpd, 0x55, 2, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -14808,7 +15138,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_andpd, 0x54, 2, SPACE_0F, None,
+ { MN_orpd, 0x56, 2, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -14818,7 +15148,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_andpd, 0x54, 2, SPACE_0F, None,
+ { MN_orpd, 0x56, 2, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 2, 1, 0, 1, 2, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0,
0, 0 },
@@ -14828,7 +15158,37 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_andpd, 0x54, 2, SPACE_0F, None,
+ { MN_orpd, 0x56, 2, SPACE_0F, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0 },
+ { { 17, 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 } },
+ { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0 } } } },
+ { MN_xorpd, 0x57, 2, SPACE_0F, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
+ 0, 0 },
+ { { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 } },
+ { { 0, 0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 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0 } } } },
- { MN_minsd, 0x5d, 2, SPACE_0F, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0 },
- { { 17, 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 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
- 1, 0, 0, 0, 1, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0 } } } },
{ MN_movapd, 0x28, 2, SPACE_0F, None,
{ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -15766,96 +15946,6 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_mulpd, 0x59, 2, SPACE_0F, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 } },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { { 7, 0,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,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } } } },
{ MN_extractps, 0x17, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 2, 1, 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, 1, 0, 0, 0, 0 } },
@@ -18026,7 +18026,7 @@ static const insn_template i386_optab[] =
0, 0, 0, 0, 1, 0 } } } },
{ MN_extractps, 0x17, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0,
- 0, 0, 0, 1, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0 },
{ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 } },
@@ -18038,7 +18038,7 @@ static const insn_template i386_optab[] =
0, 0, 0, 0, 0, 0 } } } },
{ MN_extractps, 0x17, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,
0, 0 },
{ { 28, 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 } },
@@ -18050,7 +18050,7 @@ static const insn_template i386_optab[] =
0, 0, 0, 0, 1, 0 } } } },
{ MN_extractps, 0x17, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0,
- 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,
0, 0 },
{ { 28, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -18062,7 +18062,7 @@ static const insn_template i386_optab[] =
0, 0, 0, 0, 0, 0 } } } },
{ MN_insertps, 0x21, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 1, 1, 0, 1, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 1, 1, 1, 0, 1, 2, 0, 0, 0, 0, 2, 1, 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, 1, 0, 0, 0 } },
@@ -18074,7 +18074,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } } } },
{ MN_insertps, 0x21, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
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, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_pmovsxwd, 0x23, 2, SPACE_0F38, None,
+ { MN_pmovsxbd, 0x21, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
{ { 28, 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 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
+ { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_pmovsxwq, 0x24, 2, SPACE_0F38, None,
+ { MN_pmovzxbd, 0x31, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 1, 1, 0, 1, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
0, 0 },
@@ -18854,7 +18844,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_pmovsxwq, 0x24, 2, SPACE_0F38, None,
+ { MN_pmovzxbd, 0x31, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0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 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,
@@ -19936,7 +20464,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vandps, 0x54, 3, SPACE_0F, None,
+ { MN_vorps, 0x56, 3, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -19948,7 +20476,7 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vandps, 0x54, 3, SPACE_0F, None,
+ { MN_vorps, 0x56, 3, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 0, 0, 0, 5, 1, 3, 0, 0, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -19960,7 +20488,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vandpd, 0x54, 3, SPACE_0F, None,
+ { MN_vorpd, 0x56, 3, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 3, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -19972,7 +20500,7 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vandpd, 0x54, 3, SPACE_0F, None,
+ { MN_vorpd, 0x56, 3, SPACE_0F, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 2, 1, 0, 0, 5, 1, 4, 0, 0, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -19984,6 +20512,54 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
+ { MN_vxorps, 0x57, 3, SPACE_0F, None,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 1, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1,
+ 0, 0 },
+ { { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
+ 1, 1, 0, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 0, 0, 0, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 0, 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,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 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, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 0 } },
- { { 7, 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 } } } },
{ MN_vbroadcastsd, 0x19, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -25356,102 +25922,6 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0 } } } },
- { MN_vdivps, 0x5e, 3, SPACE_0F, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 } },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 1, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 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0 } },
{ { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 } },
@@ -25518,7 +25976,7 @@ static const insn_template i386_optab[] =
0, 0, 0, 0, 1, 0 } } } },
{ MN_vextractps, 0x17, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0,
- 0, 0, 0, 1, 0, 3, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0, 3, 1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0 },
{ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 } },
@@ -25590,23 +26048,9 @@ static const insn_template i386_optab[] =
0, 1, 0, 0, 0, 0 } },
{ { 7, 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 } } } },
- { MN_vinsertf128, 0x18, 4, SPACE_0F3A, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 1, 1, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { { 0, 0, 0, 1, 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, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 0 } },
- { { 7, 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 } },
- { { 7, 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 } } } },
{ MN_vinsertps, 0x21, 4, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 0, 0, 0, 1, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,
0, 0 },
{ { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -25620,7 +26064,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } } } },
{ MN_vinsertps, 0x21, 4, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0,
0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -25708,198 +26152,6 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vmaxps, 0x5f, 3, SPACE_0F, None,
- { 0, 0, 0, 1, 0, 0, 0, 1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{ MN_vmovaps, 0x28, 2, SPACE_0F, None,
{ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -26576,150 +26828,6 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vmulps, 0x59, 3, SPACE_0F, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 } },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 1, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0 } } } },
- { MN_vmulps, 0x59, 3, SPACE_0F, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 1, 0, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
- { { 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0 } } } },
+ { MN_vpmovzxbq, 0x32, 2, SPACE_0F38, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0,
+ 0, 0 },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
+ 1, 0, 0, 0, 1, 0 } },
+ { { 7, 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 } } } },
{ MN_vpmovsxbw, 0x20, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -28468,7 +28636,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 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 } } } },
- { MN_vpmovsxdq, 0x25, 2, SPACE_0F38, None,
+ { MN_vpmovzxbw, 0x30, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -28478,7 +28646,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vpmovsxdq, 0x25, 2, SPACE_0F38, None,
+ { MN_vpmovzxbw, 0x30, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -28488,59 +28656,59 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 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 } } } },
- { MN_vpmovsxdq, 0x25, 2, SPACE_0F38, None,
+ { MN_vpmovzxbw, 0x30, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
0, 0 },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
+ { { 35, 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 } },
{ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 1, 0 } },
{ { 7, 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 } } } },
- { MN_vpm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 0, 0, 0 } },
- { { 30, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 } },
{ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0 } },
{ { 7, 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 } } } },
- { MN_vpmovsxwd, 0x23, 2, SPACE_0F38, None,
+ { MN_vpmovsxdq, 0x25, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -28548,97 +28716,27 @@ static const insn_template i386_optab[] =
0, 1, 0, 0, 1, 0 } },
{ { 7, 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 } } } },
- { MN_vpmovsxwq, 0x24, 2, SPACE_0F38, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 3, 1, 0, 0, 2, 1, 0, 0, 0, 2, 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, 1, 0, 0, 0 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1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 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 2, 0, 3, 1, 0, 0, 3, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { 30, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0,
- 1, 0, 0, 0, 1, 0 } },
- { { 7, 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 } } } },
- { MN_vpmovzxbq, 0x32, 2, SPACE_0F38, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
- 1, 0, 0, 0, 1, 0 } },
- { { 7, 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 } } } },
- { MN_vpmovzxbw, 0x30, 2, SPACE_0F38, None,
+ { MN_vpmovzxdq, 0x35, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -28648,7 +28746,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vpmovzxbw, 0x30, 2, SPACE_0F38, None,
+ { MN_vpmovzxdq, 0x35, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -28658,59 +28756,59 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } },
{ { 7, 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 } } } },
- { MN_vpmovzxbw, 0x30, 2, SPACE_0F38, None,
+ { MN_vpmovzxdq, 0x35, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 3, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
0, 0 },
- { { 35, 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 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
{ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 1, 0 } },
{ { 7, 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 } } } },
- { M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 { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vroundps, 0x08 | 0, 3, SPACE_0F3A, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { { 0, 0, 0, 1, 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, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 1, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0 } } } },
{ MN_vroundpd, 0x08 | 1, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -30030,18 +30126,6 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vroundpd, 0x08 | 1, 3, SPACE_0F3A, None,
- { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2, 1,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, 0, 0, 0, 0, 0 } },
@@ -30830,18 +30732,6 @@ static const insn_template i386_optab[] =
0, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0 } } } },
- { MN_vextracti128, 0x39, 3, SPACE_0F3A, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0,
- 0, 0 },
- { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0 } },
- { { 7, 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 } },
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 0 } } } },
{ MN_vinserti128, 0x38, 4, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -30856,20 +30746,6 @@ static const insn_template i386_optab[] =
0, 1, 0, 0, 0, 0 } },
{ { 7, 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 } } } },
- { MN_vinserti128, 0x38, 4, SPACE_0F3A, None,
- { 0, 0, 0, 1, 0, 0, 0,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XMAP6, None,
+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
{ { 86, 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 } },
{ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0,
- 1, 0, 0, 0, 1, 0 } },
+ 1, 1, 1, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0 } },
+ 1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmaddsub132ps, 0x86 | 0x10, 3, SPACE_0F38, None,
+ 1, 1, 1, 0, 0, 0 } } } },
+ { MN_vfnmadd132ps, 0x8c | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32054,7 +31930,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmaddsub132pd, 0x86 | 0x10, 3, SPACE_0F38, None,
+ { MN_vfnmadd132pd, 0x8c | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32066,7 +31942,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmaddsub132ph, 0x86 | 0x10, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmadd132ph, 0x8c | 0x10, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32078,7 +31954,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmaddsub213ps, 0x86 | 0x20, 3, SPACE_0F38, None,
+ { MN_vfnmadd213ps, 0x8c | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32090,7 +31966,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmaddsub213pd, 0x86 | 0x20, 3, SPACE_0F38, None,
+ { MN_vfnmadd213pd, 0x8c | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32102,7 +31978,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmaddsub213ph, 0x86 | 0x20, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmadd213ph, 0x8c | 0x20, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32114,7 +31990,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmaddsub231ps, 0x86 | 0x30, 3, SPACE_0F38, None,
+ { MN_vfnmadd231ps, 0x8c | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32126,7 +32002,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmaddsub231pd, 0x86 | 0x30, 3, SPACE_0F38, None,
+ { MN_vfnmadd231pd, 0x8c | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32138,7 +32014,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmaddsub231ph, 0x86 | 0x30, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmadd231ph, 0x8c | 0x30, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32150,7 +32026,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub132ps, 0x8a | 0x10, 3, SPACE_0F38, None,
+ { MN_vfnmsub132ps, 0x8e | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32162,7 +32038,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub132pd, 0x8a | 0x10, 3, SPACE_0F38, None,
+ { MN_vfnmsub132pd, 0x8e | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32174,7 +32050,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub132ph, 0x8a | 0x10, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmsub132ph, 0x8e | 0x10, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32186,7 +32062,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub213ps, 0x8a | 0x20, 3, SPACE_0F38, None,
+ { MN_vfnmsub213ps, 0x8e | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32198,7 +32074,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub213pd, 0x8a | 0x20, 3, SPACE_0F38, None,
+ { MN_vfnmsub213pd, 0x8e | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32210,7 +32086,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub213ph, 0x8a | 0x20, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmsub213ph, 0x8e | 0x20, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32222,7 +32098,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub231ps, 0x8a | 0x30, 3, SPACE_0F38, None,
+ { MN_vfnmsub231ps, 0x8e | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32234,7 +32110,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub231pd, 0x8a | 0x30, 3, SPACE_0F38, None,
+ { MN_vfnmsub231pd, 0x8e | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32246,7 +32122,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub231ph, 0x8a | 0x30, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmsub231ph, 0x8e | 0x30, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32258,7 +32134,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfmsub132ss, 0x8b | 0x10, 3, SPACE_0F38, None,
+ { MN_vfmadd132ss, 0x88 | 1 | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0,
0, 0 },
@@ -32270,7 +32146,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsub132sd, 0x8b | 0x10, 3, SPACE_0F38, None,
+ { MN_vfmadd132sd, 0x88 | 1 | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 4, 1, 0, 1, 1, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -32282,7 +32158,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsub132sh, 0x8b | 0x10, 3, SPACE_EVEXMAP6, None,
+ { MN_vfmadd132sh, 0x88 | 1 | 0x10, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -32294,7 +32170,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsub213ss, 0x8b | 0x20, 3, SPACE_0F38, None,
+ { MN_vfmadd213ss, 0x88 | 1 | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0,
0, 0 },
@@ -32306,7 +32182,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsub213sd, 0x8b | 0x20, 3, SPACE_0F38, None,
+ { MN_vfmadd213sd, 0x88 | 1 | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 4, 1, 0, 1, 1, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -32318,7 +32194,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsub213sh, 0x8b | 0x20, 3, SPACE_EVEXMAP6, None,
+ { MN_vfmadd213sh, 0x88 | 1 | 0x20, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -32330,7 +32206,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsub231ss, 0x8b | 0x30, 3, SPACE_0F38, None,
+ { MN_vfmadd231ss, 0x88 | 1 | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0,
0, 0 },
@@ -32342,7 +32218,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsub231sd, 0x8b | 0x30, 3, SPACE_0F38, None,
+ { MN_vfmadd231sd, 0x88 | 1 | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 4, 1, 0, 1, 1, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -32354,7 +32230,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsub231sh, 0x8b | 0x30, 3, SPACE_EVEXMAP6, None,
+ { MN_vfmadd231sh, 0x88 | 1 | 0x30, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -32366,223 +32242,223 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsubadd132ps, 0x87 | 0x10, 3, SPACE_0F38, None,
- { 0, 0, 0, 1, 0, 0, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
{ { 86, 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 } },
{ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0,
- 1, 1, 1, 0, 1, 0 } },
+ 1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 0, 0, 0 } },
+ 1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmadd132ss, 0x8d | 0x10, 3, SPACE_0F38, None,
+ 1, 0, 0, 0, 0, 0 } } } },
+ { MN_vfnmsub132ss, 0x8e | 1 | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0,
0, 0 },
@@ -32594,7 +32470,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmadd132sd, 0x8d | 0x10, 3, SPACE_0F38, None,
+ { MN_vfnmsub132sd, 0x8e | 1 | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 4, 1, 0, 1, 1, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -32606,7 +32482,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmadd132sh, 0x8d | 0x10, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmsub132sh, 0x8e | 1 | 0x10, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -32618,7 +32494,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmadd213ss, 0x8d | 0x20, 3, SPACE_0F38, None,
+ { MN_vfnmsub213ss, 0x8e | 1 | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0,
0, 0 },
@@ -32630,7 +32506,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmadd213sd, 0x8d | 0x20, 3, SPACE_0F38, None,
+ { MN_vfnmsub213sd, 0x8e | 1 | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 4, 1, 0, 1, 1, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -32642,7 +32518,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmadd213sh, 0x8d | 0x20, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmsub213sh, 0x8e | 1 | 0x20, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -32654,7 +32530,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmadd231ss, 0x8d | 0x30, 3, SPACE_0F38, None,
+ { MN_vfnmsub231ss, 0x8e | 1 | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0,
0, 0 },
@@ -32666,7 +32542,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmadd231sd, 0x8d | 0x30, 3, SPACE_0F38, None,
+ { MN_vfnmsub231sd, 0x8e | 1 | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 4, 1, 0, 1, 1, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -32678,7 +32554,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmadd231sh, 0x8d | 0x30, 3, SPACE_EVEXMAP6, None,
+ { MN_vfnmsub231sh, 0x8e | 1 | 0x30, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -32690,7 +32566,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmsub132ps, 0x8e | 0x10, 3, SPACE_0F38, None,
+ { MN_vfmaddsub132ps, 0x86 | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32702,7 +32578,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub132pd, 0x8e | 0x10, 3, SPACE_0F38, None,
+ { MN_vfmaddsub132pd, 0x86 | 0x10, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32714,7 +32590,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub132ph, 0x8e | 0x10, 3, SPACE_EVEXMAP6, None,
+ { MN_vfmaddsub132ph, 0x86 | 0x10, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32726,7 +32602,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub213ps, 0x8e | 0x20, 3, SPACE_0F38, None,
+ { MN_vfmaddsub213ps, 0x86 | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32738,7 +32614,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub213pd, 0x8e | 0x20, 3, SPACE_0F38, None,
+ { MN_vfmaddsub213pd, 0x86 | 0x20, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32750,7 +32626,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub213ph, 0x8e | 0x20, 3, SPACE_EVEXMAP6, None,
+ { MN_vfmaddsub213ph, 0x86 | 0x20, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32762,7 +32638,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub231ps, 0x8e | 0x30, 3, SPACE_0F38, None,
+ { MN_vfmaddsub231ps, 0x86 | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 5, 1, 3, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32774,7 +32650,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub231pd, 0x8e | 0x30, 3, SPACE_0F38, None,
+ { MN_vfmaddsub231pd, 0x86 | 0x30, 3, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 5, 1, 4, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32786,7 +32662,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub231ph, 0x8e | 0x30, 3, SPACE_EVEXMAP6, None,
+ { MN_vfmaddsub231ph, 0x86 | 0x30, 3, SPACE_EVEXMAP6, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -32798,114 +32674,114 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vfnmsub132ss, 0x8f | 0x10, 3, SPACE_0F38, None,
- { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 3, 1, 1, 1, 0, 0, 4, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0,
+ { MN_vfmsubadd132ps, 0x87 | 0x10, 3, SPACE_0F38, None,
+ { 0, 0,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, 0, 0, 0 } } } },
- { MN_vfmaddsubps, 0x5c | 0, 4, SPACE_0F3A, None,
+ { MN_vfmsubps, 0x6c | 0, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33120,7 +32968,7 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vfmaddsubpd, 0x5c | 1, 4, SPACE_0F3A, None,
+ { MN_vfmsubpd, 0x6c | 1, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33134,7 +32982,7 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vfmsubaddps, 0x5e | 0, 4, SPACE_0F3A, None,
+ { MN_vfnmaddps, 0x78 | 0, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33148,7 +32996,7 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vfmsubaddpd, 0x5e | 1, 4, SPACE_0F3A, None,
+ { MN_vfnmaddpd, 0x78 | 1, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33162,7 +33010,7 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vfmsubps, 0x6c | 0, 4, SPACE_0F3A, None,
+ { MN_vfnmsubps, 0x7c | 0, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33176,7 +33024,7 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vfmsubpd, 0x6c | 1, 4, SPACE_0F3A, None,
+ { MN_vfnmsubpd, 0x7c | 1, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33190,7 +33038,7 @@ static const insn_template i386_optab[] =
1, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0 } } } },
- { MN_vfmsubss, 0x6e | 0, 4, SPACE_0F3A, None,
+ { MN_vfmaddss, 0x68 | 2 | 0, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33204,7 +33052,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfmsubsd, 0x6e | 1, 4, SPACE_0F3A, None,
+ { MN_vfmaddsd, 0x68 | 2 | 1, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33218,35 +33066,35 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmaddps, 0x78 | 0, 4, SPACE_0F3A, None,
- { 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ { MN_vfmsubss, 0x6c | 2 | 0, 4, SPACE_0F3A, None,
+ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 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 } },
- { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 1, 0 } },
+ { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
+ 1, 0, 0, 0, 1, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0 } },
+ 1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0 } },
+ 1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0 } } } },
- { MN_vfnmaddss, 0x7a | 0, 4, SPACE_0F3A, None,
+ 1, 0, 0, 0, 0, 0 } } } },
+ { MN_vfnmaddss, 0x78 | 2 | 0, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 3, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0 },
@@ -33260,7 +33108,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vfnmaddsd, 0x7a | 1, 4, SPACE_0F3A, None,
+ { MN_vfnmaddsd, 0x78 | 2 | 1, 4, SPACE_0F3A, None,
{ 1, 0, 0, 1, 0, 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PACE_XOP09, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
@@ -36378,7 +36254,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vdivph, 0x5e, 3, SPACE_EVEXMAP5, None,
+ { MN_vsubph, 0x5c, 3, SPACE_EVEXMAP5, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 0, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
@@ -36402,19 +36278,33 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vsqrtph, 0x51, 2, SPACE_EVEXMAP5, None,
+ { MN_vdivph, 0x5e, 3, SPACE_EVEXMAP5, None,
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 0, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
0, 0 },
{ { 86, 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 } },
{ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 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 } },
@@ -36436,7 +36326,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vdivsh, 0x5e, 3, SPACE_EVEXMAP5, None,
+ { MN_vsubsh, 0x5c, 3, SPACE_EVEXMAP5, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 2, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -36460,7 +36350,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vsqrtsh, 0x51, 3, SPACE_EVEXMAP5, None,
+ { MN_vdivsh, 0x5e, 3, SPACE_EVEXMAP5, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 2, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -36472,7 +36362,41 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0 } } } },
- { MN_vsubsh, 0x5c, 3, SPACE_EVEXMAP5, None,
+ { MN_vminsh, 0x5d, 3, SPACE_EVEXMAP5, None,
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,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+ { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 1, 2, 1, 1, 7, 0, 0, 0, 0, 0,
+ 0, 0 },
+ { { 86, 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 } },
+ { { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0,
+ 1, 1, 1, 0, 1, 0 } },
+ { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 0, 0, 0 } } } },
+ { MN_vsqrtsh, 0x51, 3, SPACE_EVEXMAP5, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 2, 0, 0, 4, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0 },
@@ -37446,7 +37370,7 @@ static const insn_template i386_optab[] =
1, 1, 1, 0, 0, 0 } } } },
{ MN_vextractf32x4, 0x19, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0,
0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -37458,7 +37382,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } } } },
{ MN_vextracti32x4, 0x39, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0,
0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -37470,7 +37394,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } } } },
{ MN_vextractf64x4, 0x1b, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 5, 1, 0, 0, 0, 0,
0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@@ -37482,7 +37406,7 @@ static const insn_template i386_optab[] =
0, 1, 0, 0, 1, 0 } } } },
{ MN_vextracti64x4, 0x3b, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 5, 1, 0, 0, 0, 0,
0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0,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, 0, 0,
- 1, 0, 0, 0, 1, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0 } },
- { { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0 } } } },
{ MN_vmovdqa64, 0x6f, 2, SPACE_0F, None,
{ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 2, 1, 0, 0, 5, 1, 0, 0, 0, 7, 1, 0, 0, 0, 0,
@@ -40394,7 +40270,7 @@ static const insn_template i386_optab[] =
0, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0 } } } },
- { MN_vpmovswb, 0x20, 2, SPACE_0F38, None,
+ { MN_vpmovwb, 0x30, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
0, 0 },
@@ -40404,7 +40280,7 @@ static const insn_template i386_optab[] =
0, 0, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 1, 0 } } } },
- { MN_vpmovswb, 0x20, 2, SPACE_0F38, None,
+ { MN_vpmovwb, 0x30, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 2, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -40414,7 +40290,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
1, 0, 0, 0, 1, 0 } } } },
- { MN_vpmovswb, 0x20, 2, SPACE_0F38, None,
+ { MN_vpmovwb, 0x30, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 3, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0,
0, 0 },
@@ -40424,7 +40300,7 @@ static const insn_template i386_optab[] =
0, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0 } } } },
- { MN_vpmovuswb, 0x10, 2, SPACE_0F38, None,
+ { MN_vpmovswb, 0x20, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
0, 0 },
@@ -40434,7 +40310,7 @@ static const insn_template i386_optab[] =
0, 0, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 1, 0 } } } },
- { MN_vpmovuswb, 0x10, 2, SPACE_0F38, None,
+ { MN_vpmovswb, 0x20, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 2, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -40444,7 +40320,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
1, 0, 0, 0, 1, 0 } } } },
- { MN_vpmovuswb, 0x10, 2, SPACE_0F38, None,
+ { MN_vpmovswb, 0x20, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 3, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0,
0, 0 },
@@ -40454,7 +40330,7 @@ static const insn_template i386_optab[] =
0, 1, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0 } } } },
- { MN_vpmovwb, 0x30, 2, SPACE_0F38, None,
+ { MN_vpmovuswb, 0x10, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
0, 0 },
@@ -40464,7 +40340,7 @@ static const insn_template i386_optab[] =
0, 0, 1, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 1, 0 } } } },
- { MN_vpmovwb, 0x30, 2, SPACE_0F38, None,
+ { MN_vpmovuswb, 0x10, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 2, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0 },
@@ -40474,7 +40350,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } },
{ { 7, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0,
1, 0, 0, 0, 1, 0 } } } },
- { MN_vpmovwb, 0x30, 2, SPACE_0F38, None,
+ { MN_vpmovuswb, 0x10, 2, SPACE_0F38, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 2, 0, 0, 3, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0,
0, 0 },
@@ -40918,7 +40794,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 0, 0 } } } },
{ MN_vextractf32x8, 0x1b, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 5, 1, 0, 0, 0, 0,
0, 0 },
{ { 34, 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 } },
@@ -40930,7 +40806,7 @@ static const insn_template i386_optab[] =
0, 1, 0, 0, 1, 0 } } } },
{ MN_vextracti32x8, 0x3b, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 5, 1, 0, 0, 0, 0,
0, 0 },
{ { 34, 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 } },
@@ -40970,7 +40846,7 @@ static const insn_template i386_optab[] =
0, 0, 1, 0, 0, 0 } } } },
{ MN_vextractf64x2, 0x19, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2, 1, 0, 0, 5, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 1, 0, 0, 5, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0,
0, 0 },
{ { 34, 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 } },
@@ -40982,7 +40858,7 @@ static const insn_template i386_optab[] =
1, 0, 0, 0, 1, 0 } } } },
{ MN_vextracti64x2, 0x39, 3, SPACE_0F3A, None,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2, 1, 0, 0, 5, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 1, 0, 0, 5, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0,
0, 0 },
{ { 34, 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 } },
@@ -45981,22 +45857,22 @@ static const i386_op_off_t i386_op_sets[] =
1261, 1269, 1277, 1283, 1291, 1297, 1305, 1309,
1313, 1316, 1320, 1324, 1328, 1332, 1336, 1340,
1344, 1347, 1351, 1355, 1358, 1361, 1363, 1365,
- 1368, 1371, 1373, 1375, 1377, 1379, 1381, 1383,
- 1385, 1387, 1389, 1391, 1393, 1395, 1397, 1399,
- 1401, 1403, 1405, 1407, 1409, 1410, 1411, 1417,
- 1419, 1420, 1422, 1424, 1426, 1428, 1429, 1431,
- 1433, 1435, 1437, 1439, 1441, 1444, 1446, 1449,
- 1451, 1453, 1454, 1456, 1459, 1461, 1463, 1465,
- 1468, 1472, 1476, 1485, 1491, 1495, 1499, 1503,
- 1507, 1510, 1514, 1515, 1516, 1517, 1518, 1522,
- 1523, 1526, 1529, 1532, 1535, 1536, 1538, 1540,
- 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1557,
- 1560, 1563, 1566, 1569, 1571, 1573, 1575, 1577,
- 1579, 1581, 1583, 1585, 1587, 1589, 1591, 1593,
- 1595, 1597, 1599, 1601, 1603, 1605, 1608, 1611,
- 1617, 1620, 1623, 1626, 1629, 1632, 1635, 1638,
- 1643, 1648, 1650, 1653, 1658, 1661, 1664, 1667,
- 1670, 1673, 1676, 1679, 1682, 1685, 1688, 1691,
+ 1367, 1369, 1371, 1373, 1375, 1377, 1379, 1381,
+ 1383, 1385, 1388, 1391, 1394, 1397, 1399, 1401,
+ 1403, 1405, 1407, 1409, 1411, 1413, 1415, 1417,
+ 1419, 1421, 1423, 1425, 1427, 1429, 1431, 1433,
+ 1435, 1436, 1437, 1443, 1445, 1446, 1448, 1450,
+ 1451, 1453, 1455, 1458, 1460, 1463, 1465, 1467,
+ 1468, 1470, 1473, 1475, 1479, 1483, 1492, 1498,
+ 1502, 1506, 1510, 1514, 1517, 1521, 1522, 1523,
+ 1524, 1525, 1529, 1530, 1533, 1536, 1539, 1542,
+ 1543, 1545, 1547, 1549, 1551, 1553, 1555, 1557,
+ 1560, 1563, 1566, 1569, 1572, 1575, 1578, 1581,
+ 1584, 1587, 1590, 1593, 1596, 1599, 1602, 1605,
+ 1607, 1609, 1611, 1613, 1615, 1617, 1619, 1621,
+ 1623, 1625, 1627, 1629, 1631, 1633, 1635, 1637,
+ 1639, 1641, 1644, 1647, 1653, 1656, 1661, 1666,
+ 1668, 1671, 1676, 1679, 1682, 1685, 1688, 1691,
1694, 1697, 1699, 1702, 1704, 1705, 1708, 1710,
1712, 1714, 1717, 1719, 1720, 1722, 1725, 1727,
1729, 1731, 1733, 1734, 1735, 1739, 1741, 1744,
@@ -46010,210 +45886,210 @@ static const i386_op_off_t i386_op_sets[] =
1883, 1887, 1889, 1891, 1893, 1896, 1900, 1902,
1904, 1910, 1913, 1916, 1918, 1924, 1927, 1930,
1933, 1935, 1937, 1940, 1943, 1945, 1947, 1950,
- 1953, 1955, 1957, 1959, 1961, 1963, 1966, 1968,
+ 1953, 1956, 1958, 1960, 1962, 1964, 1966, 1968,
1970, 1972, 1974, 1976, 1979, 1981, 1983, 1986,
1988, 1991, 1993, 1995, 1999, 2003, 2005, 2007,
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018,
2019, 2021, 2023, 2025, 2027, 2029, 2031, 2033,
2035, 2037, 2039, 2041, 2043, 2045, 2047, 2049,
- 2051, 2053, 2055, 2056, 2057, 2059, 2061, 2063,
- 2065, 2066, 2067, 2068, 2069, 2071, 2074, 2076,
- 2078, 2080, 2082, 2084, 2086, 2088, 2090, 2092,
- 2094, 2096, 2098, 2100, 2102, 2104, 2106, 2108,
- 2110, 2112, 2114, 2116, 2118, 2120, 2122, 2124,
- 2126, 2128, 2130, 2132, 2134, 2136, 2138, 2140,
- 2142, 2144, 2146, 2148, 2150, 2152, 2154, 2156,
- 2158, 2160, 2162, 2164, 2166, 2168, 2170, 2172,
- 2174, 2176, 2178, 2180, 2182, 2184, 2186, 2188,
- 2190, 2192, 2194, 2196, 2198, 2200, 2202, 2204,
- 2206, 2208, 2210, 2212, 2214, 2216, 2218, 2220,
- 2222, 2224, 2226, 2228, 2230, 2232, 2234, 2236,
- 2238, 2240, 2242, 2244, 2246, 2248, 2250, 2252,
- 2254, 2256, 2258, 2260, 2262, 2264, 2266, 2268,
- 2270, 2272, 2274, 2276, 2278, 2280, 2282, 2284,
- 2286, 2288, 2290, 2292, 2294, 2296, 2298, 2300,
- 2302, 2304, 2306, 2308, 2310, 2312, 2314, 2316,
- 2318, 2320, 2322, 2324, 2326, 2328, 2330, 2332,
- 2334, 2336, 2338, 2340, 2342, 2344, 2346, 2348,
- 2350, 2352, 2354, 2356, 2358, 2360, 2362, 2364,
- 2366, 2368, 2370, 2372, 2374, 2376, 2378, 2380,
- 2382, 2384, 2386, 2388, 2390, 2392, 2394, 2396,
- 2398, 2400, 2402, 2404, 2406, 2408, 2410, 2412,
- 2414, 2416, 2418, 2420, 2422, 2424, 2426, 2428,
- 2430, 2432, 2434, 2436, 2438, 2440, 2442, 2444,
- 2446, 2448, 2450, 2452, 2454, 2456, 2461, 2463,
- 2468, 2470, 2472, 2477, 2479, 2481, 2483, 2488,
- 2490, 2492, 2494, 2498, 2504, 2506, 2511, 2513,
- 2515, 2517, 2519, 2521, 2523, 2525, 2527, 2529,
- 2530, 2531, 2533, 2535, 2536, 2537, 2538, 2539,
- 2541, 2543, 2544, 2545, 2546, 2548, 2550, 2552,
- 2554, 2556, 2558, 2560, 2562, 2564, 2566, 2568,
- 2570, 2572, 2576, 2577, 2578, 2580, 2584, 2588,
- 2590, 2594, 2598, 2599, 2600, 2602, 2604, 2606,
- 2608, 2613, 2617, 2621, 2623, 2625, 2627, 2629,
- 2630, 2632, 2634, 2636, 2638, 2640, 2642, 2644,
- 2646, 2648, 2650, 2652, 2654, 2656, 2658, 2660,
- 2662, 2664, 2666, 2668, 2670, 2672, 2674, 2675,
- 2676, 2678, 2680, 2681, 2682, 2685, 2688, 2691,
- 2694, 2696, 2698, 2700, 2702, 2704, 2706, 2707,
- 2708, 2709, 2711, 2715, 2717, 2719, 2725, 2729,
- 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2740,
- 2742, 2744, 2748, 2750, 2752, 2754, 2756, 2758,
- 2760, 2762, 2764, 2766, 2768, 2770, 2772, 2774,
- 2776, 2777, 2780, 2783, 2788, 2793, 2796, 2799,
- 2802, 2805, 2810, 2815, 2818, 2821, 2823, 2825,
- 2827, 2829, 2831, 2833, 2835, 2836, 2838, 2840,
- 2842, 2844, 2846, 2847, 2848, 2849, 2853, 2857,
- 2859, 2863, 2867, 2871, 2875, 2879, 2881, 2885,
- 2887, 2889, 2891, 2893, 2895, 2897, 2899, 2901,
- 2902, 2904, 2906, 2908, 2910, 2912, 2914, 2916,
- 2918, 2919, 2920, 2921, 2923, 2925, 2927, 2929,
- 2930, 2931, 2933, 2935, 2937, 2939, 2941, 2943,
- 2944, 2946, 2948, 2950, 2952, 2953, 2954, 2956,
- 2958, 2960, 2962, 2964, 2966, 2968, 2970, 2971,
- 2972, 2974, 2975, 2978, 2981, 2983, 2986, 2987,
- 2988, 2990, 2991, 2993, 2995, 2997, 2999, 3001,
- 3002, 3003, 3004, 3005, 3006, 3009, 3014, 3019,
- 3024, 3029, 3032, 3037, 3042, 3044, 3046, 3048,
- 3050, 3051, 3052, 3054, 3056, 3058, 3060, 3062,
- 3064, 3066, 3067, 3068, 3069, 3070, 3071, 3072,
- 3077, 3082, 3083, 3084, 3085, 3086, 3087, 3088,
- 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096,
- 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104,
- 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112,
- 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120,
- 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128,
- 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136,
- 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144,
- 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152,
- 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160,
- 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168,
- 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176,
- 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184,
- 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192,
- 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200,
- 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208,
- 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216,
- 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224,
- 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232,
- 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240,
- 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248,
- 3249, 3250, 3251, 3252, 3253, 3254, 3255, 3256,
- 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264,
- 3265, 3266, 3267, 3268, 3269, 3270, 3271, 3272,
- 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280,
- 3281, 3282, 3283, 3285, 3287, 3288, 3289, 3290,
- 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298,
- 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306,
- 3307, 3308, 3309, 3310, 3311, 3312, 3313, 3314,
- 3315, 3317, 3319, 3321, 3323, 3324, 3325, 3326,
- 3327, 3328, 3329, 3330, 3331, 3332, 3333, 3334,
- 3335, 3336, 3338, 3339, 3340, 3341, 3343, 3344,
- 3345, 3346, 3347, 3348, 3349, 3350, 3351, 3352,
- 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360,
- 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368,
- 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376,
- 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384,
- 3386, 3388, 3389, 3390, 3392, 3393, 3395, 3397,
- 3398, 3399, 3401, 3403, 3405, 3407, 3408, 3409,
- 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417,
- 3418, 3419, 3420, 3421, 3422, 3423, 3426, 3429,
- 3430, 3431, 3432, 3433, 3434, 3435, 3437, 3439,
- 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3449,
- 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457,
- 3458, 3459, 3460, 3461, 3462, 3463, 3464, 3465,
- 3466, 3467, 3468, 3469, 3472, 3475, 3476, 3477,
- 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485,
- 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3493,
- 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501,
- 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509,
- 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517,
- 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525,
- 3526, 3527, 3528, 3529, 3532, 3534, 3537, 3540,
- 3542, 3545, 3548, 3551, 3554, 3555, 3558, 3559,
- 3560, 3561, 3562, 3563, 3567, 3569, 3572, 3573,
- 3574, 3575, 3576, 3577, 3578, 3579, 3580, 3581,
- 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589,
- 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597,
- 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605,
- 3606, 3607, 3608, 3609, 3610, 3611, 3612, 3613,
- 3614, 3615, 3616, 3617, 3618, 3619, 3620, 3621,
- 3622, 3623, 3624, 3625, 3626, 3627, 3629, 3630,
- 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638,
- 3639, 3640, 3641, 3642, 3643, 3644, 3645, 3646,
- 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654,
- 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662,
- 3663, 3664, 3665, 3666, 3667, 3668, 3671, 3674,
- 3677, 3680, 3683, 3686, 3689, 3692, 3695, 3698,
- 3701, 3704, 3707, 3710, 3713, 3714, 3715, 3716,
- 3717, 3719, 3720, 3721, 3722, 3723, 3724, 3725,
- 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733,
- 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741,
- 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749,
- 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757,
- 3758, 3759, 3760, 3761, 3762, 3763, 3764, 3765,
- 3766, 3767, 3768, 3769, 3770, 3771, 3772, 3773,
- 3774, 3775, 3776, 3777, 3778, 3779, 3780, 3783,
- 3786, 3787, 3788, 3789, 3790, 3791, 3792, 3793,
- 3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801,
- 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809,
- 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817,
- 3818, 3819, 3820, 3821, 3822, 3823, 3824, 3825,
- 3826, 3827, 3828, 3829, 3830, 3831, 3832, 3833,
- 3834, 3835, 3836, 3837, 3838, 3839, 3840, 3841,
- 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3851,
- 3854, 3857, 3858, 3859, 3860, 3861, 3862, 3863,
- 3864, 3865, 3866, 3867, 3868, 3869, 3870, 3871,
- 3872, 3873, 3876, 3879, 3880, 3881, 3884, 3885,
- 3886, 3887, 3888, 3891, 3894, 3897, 3898, 3899,
- 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907,
- 3909, 3911, 3912, 3913, 3914, 3915, 3916, 3917,
- 3918, 3919, 3920, 3921, 3922, 3923, 3924, 3925,
- 3926, 3927, 3928, 3929, 3930, 3931, 3932, 3933,
- 3934, 3935, 3936, 3938, 3940, 3941, 3942, 3943,
- 3944, 3945, 3946, 3947, 3948, 3949, 3950, 3951,
- 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959,
- 3960, 3961, 3962, 3963, 3964, 3965, 3967, 3969,
- 3971, 3973, 3974, 3975, 3976, 3977, 3978, 3979,
- 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987,
- 3988, 3990, 3991, 3993, 3996, 3998, 3999, 4000,
- 4002, 4004, 4005, 4006, 4007, 4008, 4009, 4010,
- 4012, 4014, 4016, 4018, 4019, 4020, 4021, 4022,
- 4023, 4024, 4025, 4026, 4027, 4029, 4031, 4032,
- 4034, 4036, 4037, 4042, 4044, 4046, 4047, 4048,
- 4049, 4050, 4051, 4052, 4053, 4055, 4057, 4058,
- 4059, 4060, 4062, 4065, 4068, 4071, 4073, 4074,
- 4075, 4076, 4077, 4078, 4079, 4080, 4081, 4082,
- 4083, 4084, 4085, 4086, 4087, 4088, 4089, 4090,
- 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098,
- 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106,
- 4107, 4108, 4109, 4110, 4111, 4112, 4113, 4114,
- 4115, 4116, 4117, 4118, 4119, 4120, 4121, 4122,
- 4123, 4124, 4125, 4126, 4127, 4128, 4129, 4130,
- 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138,
- 4139, 4140, 4141, 4142, 4143, 4144, 4145, 4146,
- 4147, 4148, 4149, 4150, 4151, 4152, 4153, 4154,
- 4155, 4156, 4157, 4158, 4159, 4160, 4161, 4162,
- 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170,
- 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178,
- 4179, 4180, 4181, 4182, 4183, 4184, 4185, 4186,
- 4187, 4188, 4189, 4190, 4191, 4192, 4193, 4194,
- 4195, 4196, 4197, 4198, 4199, 4200, 4201, 4202,
- 4203, 4204, 4205, 4206, 4207, 4208, 4209, 4210,
- 4211, 4212, 4213, 4214, 4215, 4218, 4219, 4220,
- 4223, 4224, 4225, 4227, 4228, 4229, 4230, 4232,
- 4233, 4234, 4235, 4237, 4238, 4239, 4240, 4243,
- 4244, 4245, 4246, 4247, 4250, 4253, 4256, 4259,
- 4262, 4263, 4264, 4265, 4266, 4268, 4270, 4271,
- 4272, 4273, 4276, 4279, 4282, 4285, 4288, 4289,
- 4290, 4291, 4293, 4294, 4295, 4296, 4298, 4299,
- 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307,
- 4308, 4309, 4310, 4311, 4312, 4313, 4314, 4315,
- 4316, 4317, 4318, 4319, 4320, 4321, 4322, 4323,
- 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331,
- 4332, 4333, 4334, 4335, 4336, 4337, 4339, 4341,
- 4343, 4345, 4347, 4348, 4349, 4352, 4355, 4356,
- 4357, 4358, 4359
+ 2051, 2053, 2055, 2057, 2059, 2061, 2063, 2065,
+ 2067, 2069, 2071, 2073, 2075, 2077, 2079, 2081,
+ 2083, 2085, 2087, 2089, 2091, 2093, 2095, 2096,
+ 2097, 2099, 2101, 2103, 2105, 2107, 2109, 2111,
+ 2113, 2114, 2115, 2116, 2117, 2118, 2121, 2123,
+ 2125, 2127, 2129, 2131, 2133, 2135, 2137, 2139,
+ 2141, 2143, 2145, 2147, 2149, 2151, 2153, 2155,
+ 2157, 2159, 2161, 2163, 2165, 2167, 2169, 2171,
+ 2173, 2175, 2177, 2179, 2181, 2183, 2185, 2187,
+ 2189, 2191, 2193, 2195, 2197, 2199, 2201, 2203,
+ 2205, 2207, 2209, 2211, 2213, 2215, 2217, 2219,
+ 2221, 2223, 2225, 2227, 2229, 2231, 2233, 2235,
+ 2237, 2239, 2241, 2243, 2245, 2247, 2249, 2251,
+ 2253, 2255, 2257, 2259, 2261, 2263, 2265, 2267,
+ 2269, 2271, 2273, 2275, 2277, 2279, 2281, 2283,
+ 2285, 2287, 2289, 2291, 2293, 2295, 2297, 2299,
+ 2301, 2303, 2305, 2307, 2309, 2311, 2313, 2315,
+ 2317, 2319, 2321, 2323, 2325, 2327, 2329, 2331,
+ 2333, 2335, 2337, 2339, 2341, 2343, 2345, 2347,
+ 2349, 2351, 2353, 2355, 2357, 2359, 2361, 2363,
+ 2365, 2367, 2369, 2371, 2373, 2375, 2377, 2379,
+ 2381, 2383, 2385, 2387, 2389, 2391, 2393, 2395,
+ 2397, 2399, 2401, 2403, 2405, 2407, 2409, 2411,
+ 2413, 2415, 2417, 2419, 2421, 2423, 2425, 2427,
+ 2429, 2431, 2433, 2435, 2437, 2439, 2441, 2443,
+ 2445, 2447, 2449, 2451, 2453, 2455, 2457, 2459,
+ 2461, 2463, 2465, 2467, 2469, 2471, 2473, 2475,
+ 2477, 2479, 2481, 2483, 2485, 2487, 2489, 2491,
+ 2493, 2495, 2497, 2499, 2501, 2503, 2508, 2510,
+ 2515, 2517, 2519, 2524, 2526, 2528, 2530, 2535,
+ 2537, 2539, 2541, 2545, 2551, 2553, 2558, 2560,
+ 2562, 2564, 2566, 2568, 2569, 2570, 2571, 2573,
+ 2574, 2575, 2576, 2577, 2578, 2580, 2581, 2582,
+ 2583, 2585, 2587, 2589, 2591, 2593, 2597, 2598,
+ 2599, 2601, 2605, 2609, 2611, 2615, 2619, 2620,
+ 2621, 2623, 2625, 2627, 2629, 2634, 2638, 2642,
+ 2644, 2646, 2648, 2650, 2651, 2653, 2655, 2657,
+ 2659, 2661, 2663, 2665, 2667, 2669, 2671, 2673,
+ 2675, 2677, 2679, 2681, 2683, 2684, 2685, 2687,
+ 2689, 2690, 2691, 2694, 2697, 2700, 2703, 2705,
+ 2707, 2709, 2711, 2713, 2715, 2716, 2717, 2718,
+ 2720, 2724, 2726, 2728, 2734, 2738, 2739, 2740,
+ 2741, 2742, 2743, 2744, 2745, 2749, 2751, 2753,
+ 2757, 2759, 2761, 2763, 2765, 2767, 2769, 2771,
+ 2773, 2775, 2777, 2779, 2781, 2783, 2785, 2786,
+ 2789, 2792, 2795, 2798, 2803, 2808, 2813, 2818,
+ 2821, 2824, 2827, 2830, 2832, 2834, 2836, 2838,
+ 2840, 2842, 2844, 2845, 2847, 2849, 2851, 2853,
+ 2855, 2856, 2857, 2858, 2862, 2866, 2868, 2872,
+ 2876, 2880, 2884, 2888, 2890, 2894, 2896, 2898,
+ 2900, 2902, 2904, 2906, 2908, 2910, 2911, 2913,
+ 2915, 2917, 2919, 2921, 2923, 2925, 2927, 2928,
+ 2929, 2930, 2931, 2932, 2933, 2934, 2935, 2936,
+ 2938, 2940, 2942, 2944, 2946, 2948, 2949, 2950,
+ 2951, 2953, 2955, 2957, 2959, 2961, 2963, 2964,
+ 2965, 2966, 2967, 2970, 2973, 2975, 2978, 2979,
+ 2980, 2982, 2983, 2985, 2986, 2987, 2989, 2991,
+ 2992, 2993, 2994, 2995, 2996, 2999, 3004, 3009,
+ 3014, 3019, 3022, 3027, 3032, 3034, 3036, 3038,
+ 3040, 3041, 3042, 3044, 3046, 3048, 3050, 3052,
+ 3054, 3056, 3057, 3058, 3059, 3060, 3061, 3062,
+ 3067, 3072, 3073, 3074, 3075, 3076, 3077, 3078,
+ 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086,
+ 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094,
+ 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102,
+ 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110,
+ 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118,
+ 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126,
+ 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134,
+ 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142,
+ 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150,
+ 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158,
+ 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166,
+ 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174,
+ 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182,
+ 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190,
+ 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198,
+ 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206,
+ 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214,
+ 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222,
+ 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230,
+ 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238,
+ 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246,
+ 3247, 3248, 3249, 3250, 3251, 3252, 3253, 3254,
+ 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262,
+ 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270,
+ 3271, 3272, 3273, 3275, 3277, 3278, 3279, 3280,
+ 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288,
+ 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296,
+ 3297, 3298, 3299, 3300, 3301, 3302, 3303, 3304,
+ 3305, 3307, 3309, 3311, 3313, 3314, 3315, 3316,
+ 3317, 3318, 3319, 3320, 3321, 3322, 3323, 3324,
+ 3325, 3326, 3328, 3329, 3330, 3331, 3333, 3334,
+ 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342,
+ 3343, 3344, 3345, 3346, 3347, 3348, 3349, 3350,
+ 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358,
+ 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366,
+ 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374,
+ 3376, 3378, 3379, 3380, 3382, 3383, 3385, 3387,
+ 3388, 3389, 3391, 3393, 3395, 3397, 3398, 3399,
+ 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407,
+ 3408, 3409, 3410, 3411, 3412, 3413, 3416, 3419,
+ 3420, 3421, 3422, 3423, 3424, 3425, 3427, 3429,
+ 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3439,
+ 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447,
+ 3448, 3449, 3450, 3451, 3452, 3453, 3454, 3455,
+ 3456, 3457, 3458, 3459, 3462, 3465, 3466, 3467,
+ 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475,
+ 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483,
+ 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491,
+ 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499,
+ 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507,
+ 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515,
+ 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523,
+ 3526, 3528, 3531, 3534, 3536, 3539, 3542, 3545,
+ 3548, 3549, 3552, 3553, 3554, 3555, 3556, 3557,
+ 3561, 3563, 3566, 3567, 3568, 3569, 3570, 3571,
+ 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579,
+ 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587,
+ 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595,
+ 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3603,
+ 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611,
+ 3612, 3613, 3614, 3615, 3616, 3617, 3619, 3620,
+ 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628,
+ 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636,
+ 3637, 3638, 3639, 3640, 3641, 3642, 3643, 3644,
+ 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652,
+ 3653, 3654, 3655, 3656, 3657, 3658, 3661, 3664,
+ 3667, 3670, 3673, 3676, 3679, 3682, 3685, 3688,
+ 3691, 3694, 3697, 3700, 3703, 3704, 3705, 3706,
+ 3707, 3709, 3710, 3711, 3712, 3713, 3714, 3715,
+ 3716, 3717, 3718, 3719, 3720, 3721, 3722, 3723,
+ 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731,
+ 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739,
+ 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747,
+ 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755,
+ 3756, 3757, 3758, 3759, 3760, 3761, 3762, 3763,
+ 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3773,
+ 3776, 3777, 3778, 3779, 3780, 3781, 3782, 3783,
+ 3784, 3785, 3786, 3787, 3788, 3789, 3790, 3791,
+ 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799,
+ 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807,
+ 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815,
+ 3816, 3817, 3818, 3819, 3820, 3821, 3822, 3823,
+ 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3831,
+ 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3841,
+ 3844, 3847, 3848, 3849, 3850, 3851, 3852, 3853,
+ 3854, 3855, 3856, 3857, 3858, 3859, 3860, 3861,
+ 3862, 3863, 3866, 3869, 3870, 3871, 3874, 3875,
+ 3876, 3877, 3878, 3881, 3884, 3887, 3888, 3889,
+ 3890, 3891, 3892, 3893, 3894, 3895, 3896, 3897,
+ 3899, 3901, 3902, 3903, 3904, 3905, 3906, 3907,
+ 3908, 3909, 3910, 3911, 3912, 3913, 3914, 3915,
+ 3916, 3917, 3918, 3919, 3920, 3921, 3922, 3923,
+ 3924, 3925, 3926, 3928, 3930, 3931, 3932, 3933,
+ 3934, 3935, 3936, 3937, 3938, 3939, 3940, 3941,
+ 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949,
+ 3950, 3951, 3952, 3953, 3954, 3955, 3957, 3959,
+ 3961, 3963, 3964, 3965, 3966, 3967, 3968, 3969,
+ 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977,
+ 3978, 3980, 3981, 3983, 3986, 3988, 3989, 3990,
+ 3992, 3994, 3995, 3996, 3997, 3998, 3999, 4000,
+ 4002, 4004, 4006, 4008, 4009, 4010, 4011, 4012,
+ 4013, 4014, 4015, 4016, 4017, 4019, 4021, 4022,
+ 4024, 4026, 4027, 4032, 4034, 4036, 4037, 4038,
+ 4039, 4040, 4041, 4042, 4043, 4045, 4047, 4048,
+ 4049, 4050, 4052, 4055, 4058, 4061, 4063, 4064,
+ 4065, 4066, 4067, 4068, 4069, 4070, 4071, 4072,
+ 4073, 4074, 4075, 4076, 4077, 4078, 4079, 4080,
+ 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088,
+ 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4096,
+ 4097, 4098, 4099, 4100, 4101, 4102, 4103, 4104,
+ 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4112,
+ 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4120,
+ 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128,
+ 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136,
+ 4137, 4138, 4139, 4140, 4141, 4142, 4143, 4144,
+ 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152,
+ 4153, 4154, 4155, 4156, 4157, 4158, 4159, 4160,
+ 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168,
+ 4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176,
+ 4177, 4178, 4179, 4180, 4181, 4182, 4183, 4184,
+ 4185, 4186, 4187, 4188, 4189, 4190, 4191, 4192,
+ 4193, 4194, 4195, 4196, 4197, 4198, 4199, 4200,
+ 4201, 4202, 4203, 4204, 4205, 4208, 4209, 4210,
+ 4213, 4214, 4215, 4217, 4218, 4219, 4220, 4222,
+ 4223, 4224, 4225, 4227, 4228, 4229, 4230, 4233,
+ 4234, 4235, 4236, 4237, 4240, 4243, 4246, 4249,
+ 4252, 4253, 4254, 4255, 4256, 4258, 4260, 4261,
+ 4262, 4263, 4266, 4269, 4272, 4275, 4278, 4279,
+ 4280, 4281, 4283, 4284, 4285, 4286, 4288, 4289,
+ 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297,
+ 4298, 4299, 4300, 4301, 4302, 4303, 4304, 4305,
+ 4306, 4307, 4308, 4309, 4310, 4311, 4312, 4313,
+ 4314, 4315, 4316, 4317, 4318, 4319, 4320, 4321,
+ 4322, 4323, 4324, 4325, 4326, 4327, 4329, 4331,
+ 4333, 4335, 4337, 4338, 4339, 4342, 4345, 4346,
+ 4347, 4348, 4349
};
/* i386 mnemonics table. */
diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c
index bc2f820..7e9b087 100644
--- a/opcodes/m68k-dis.c
+++ b/opcodes/m68k-dis.c
@@ -991,6 +991,8 @@ print_insn_arg (const char *d,
else
return PRINT_INSN_ARG_INVALID_OP_TABLE;
+ info->target = addr + disp;
+
(*info->print_address_func) (addr + disp, info);
break;
@@ -1442,6 +1444,27 @@ print_insn_arg (const char *d,
return p - p0;
}
+/* Return the insn type determined from the opcode information. */
+
+static enum dis_insn_type
+m68k_opcode_to_insn_type (const struct m68k_opcode *opc)
+{
+ /* All branches have an operand in 'B' format (the 'B' place only comes
+ with the 'B' format). */
+ if (strchr (opc->args, 'B') == NULL)
+ return dis_nonbranch;
+
+ /* Most branches are conditional branches, detect the ones that aren't
+ from the opcode name. */
+ if (strncmp (opc->name, "bra", 3) == 0)
+ return dis_branch;
+
+ if (strncmp (opc->name, "bsr", 3) == 0)
+ return dis_jsr;
+
+ return dis_condbranch;
+}
+
/* Try to match the current instruction to best and if so, return the
number of bytes consumed from the instruction stream, else zero.
Return -1 on memory error. */
@@ -1573,6 +1596,7 @@ match_insn_m68k (bfd_vma memaddr,
p = save_p;
info->fprintf_styled_func = save_printer;
info->print_address_func = save_print_address;
+ info->insn_type = m68k_opcode_to_insn_type (best);
d = args;
@@ -1730,6 +1754,7 @@ print_insn_m68k (bfd_vma memaddr, disassemble_info *info)
bfd_byte *buffer = priv.the_buffer;
+ info->insn_info_valid = 1;
info->private_data = & priv;
/* Tell objdump to use two bytes per chunk
and six bytes per line for displaying raw data. */
@@ -1761,6 +1786,8 @@ print_insn_m68k (bfd_vma memaddr, disassemble_info *info)
info->fprintf_styled_func (info->stream, dis_style_text, " ");
info->fprintf_styled_func (info->stream, dis_style_immediate,
"0x%04x", (buffer[0] << 8) + buffer[1]);
+
+ info->insn_type = dis_noninsn;
}
return val ? val : 2;
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index 8ab138e..551d57e 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -1030,7 +1030,7 @@ riscv_disassemble_insn (bfd_vma memaddr,
{
i -= 2;
word = bfd_get_bits (packet + i, 16, false);
- if (!word && !printed)
+ if (!word && !printed && i)
continue;
(*info->fprintf_styled_func) (info->stream, dis_style_immediate,
diff --git a/opcodes/s390-dis.c b/opcodes/s390-dis.c
index ee2f2cb..852d2f6 100644
--- a/opcodes/s390-dis.c
+++ b/opcodes/s390-dis.c
@@ -299,12 +299,14 @@ s390_print_insn_with_opcode (bfd_vma memaddr,
{
enum disassembler_style style;
- if (flags & S390_OPERAND_OR1)
- val.u &= ~1;
- if (flags & S390_OPERAND_OR2)
- val.u &= ~2;
- if (flags & S390_OPERAND_OR8)
- val.u &= ~8;
+ if (!(flags & S390_OPERAND_LENGTH))
+ {
+ union operand_value insn_opval;
+
+ /* Mask any constant operand bits set in insn template. */
+ insn_opval = s390_extract_operand (opcode->opcode, operand);
+ val.u &= ~insn_opval.u;
+ }
if ((opcode->flags & S390_INSTR_FLAG_OPTPARM)
&& val.u == 0
diff --git a/opcodes/s390-mkopc.c b/opcodes/s390-mkopc.c
index 1f5729a..8251884 100644
--- a/opcodes/s390-mkopc.c
+++ b/opcodes/s390-mkopc.c
@@ -443,6 +443,8 @@ main (void)
else if (strcmp (cpu_string, "z16") == 0
|| strcmp (cpu_string, "arch14") == 0)
min_cpu = S390_OPCODE_ARCH14;
+ else if (strcmp (cpu_string, "arch15") == 0)
+ min_cpu = S390_OPCODE_ARCH15;
else {
print_error ("Mnemonic \"%s\": Couldn't parse CPU string: %s\n",
mnemonic, cpu_string);
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 10482fb..9d9f097 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -208,31 +208,17 @@ const struct s390_operand s390_operands[] =
{ 4, 20, 0 },
#define U4_24 (U4_20 + 1) /* 4 bit unsigned value starting at 24 */
{ 4, 24, 0 },
-#define U4_OR1_24 (U4_24 + 1) /* 4 bit unsigned value ORed with 1 */
- { 4, 24, S390_OPERAND_OR1 }, /* starting at 24 */
-#define U4_OR2_24 (U4_OR1_24+1) /* 4 bit unsigned value ORed with 2 */
- { 4, 24, S390_OPERAND_OR2 }, /* starting at 24 */
-#define U4_OR3_24 (U4_OR2_24+1) /* 4 bit unsigned value ORed with 3 */
- { 4, 24, S390_OPERAND_OR1 | S390_OPERAND_OR2 }, /* starting at 24 */
-#define U4_28 (U4_OR3_24+1) /* 4 bit unsigned value starting at 28 */
+#define U4_28 (U4_24+1) /* 4 bit unsigned value starting at 28 */
{ 4, 28, 0 },
-#define U4_OR8_28 (U4_28 + 1) /* 4 bit unsigned value ORed with 8 */
- { 4, 28, S390_OPERAND_OR8 }, /* starting at 28 */
-#define U4_32 (U4_OR8_28+1) /* 4 bit unsigned value starting at 32 */
+#define U4_32 (U4_28+1) /* 4 bit unsigned value starting at 32 */
{ 4, 32, 0 },
#define U4_36 (U4_32 + 1) /* 4 bit unsigned value starting at 36 */
{ 4, 36, 0 },
#define U8_8 (U4_36 + 1) /* 8 bit unsigned value starting at 8 */
{ 8, 8, 0 },
-#define U6_18 (U8_8 + 1) /* 6 bit unsigned value starting at 18 */
- { 6, 18, 0 },
-#define U8_16 (U6_18 + 1) /* 8 bit unsigned value starting at 16 */
+#define U8_16 (U8_8 + 1) /* 8 bit unsigned value starting at 16 */
{ 8, 16, 0 },
-#define U5_27 (U8_16 + 1) /* 5 bit unsigned value starting at 27 */
- { 5, 27, 0 },
-#define U6_26 (U5_27 + 1) /* 6 bit unsigned value starting at 26 */
- { 6, 26, 0 },
-#define U8_24 (U6_26 + 1) /* 8 bit unsigned value starting at 24 */
+#define U8_24 (U8_16 + 1) /* 8 bit unsigned value starting at 24 */
{ 8, 24, 0 },
#define U8_28 (U8_24 + 1) /* 8 bit unsigned value starting at 28 */
{ 8, 28, 0 },
@@ -242,7 +228,9 @@ const struct s390_operand s390_operands[] =
{ 12, 16, 0 },
#define U16_16 (U12_16 + 1) /* 16 bit unsigned value starting at 16 */
{ 16, 16, 0 },
-#define U16_32 (U16_16 + 1) /* 16 bit unsigned value starting at 32 */
+#define U16_20 (U16_16 + 1) /* 16 bit unsigned value starting at 20 */
+ { 16, 20, 0 },
+#define U16_32 (U16_20 + 1) /* 16 bit unsigned value starting at 32 */
{ 16, 32, 0 },
#define U32_16 (U16_32 + 1) /* 32 bit unsigned value starting at 16 */
{ 32, 16, 0 },
@@ -296,7 +284,7 @@ unused_s390_operands_static_asserts (void)
p - pc relative
r - general purpose register
re - gpr extended operand, a valid general purpose register pair
- u - unsigned integer, 4, 6, 8, 16 or 32 bit
+ u - unsigned integer, 4, 8, 16 or 32 bit
m - mode field, 4 bit
0 - operand skipped.
The order of the letters reflects the layout of the format in
@@ -332,9 +320,9 @@ unused_s390_operands_static_asserts (void)
#define INSTR_RIE_R0U0 6, { R_8,U16_16,0,0,0,0 } /* e.g. clfitne */
#define INSTR_RIE_RUI0 6, { R_8,I16_16,U4_12,0,0,0 } /* e.g. lochi */
#define INSTR_RIE_RRUUU 6, { R_8,R_12,U8_16,U8_24,U8_32,0 } /* e.g. rnsbg */
-#define INSTR_RIE_RRUUU2 6, { R_8,R_12,U8_16,U6_26,U8_32,0 } /* e.g. risbgz */
-#define INSTR_RIE_RRUUU3 6, { R_8,R_12,U8_16,U5_27,U8_32,0 } /* e.g. risbhg */
-#define INSTR_RIE_RRUUU4 6, { R_8,R_12,U6_18,U8_24,U8_32,0 } /* e.g. rnsbgt */
+#define INSTR_RIE_RRUUU2 INSTR_RIE_RRUUU /* e.g. risbgz */
+#define INSTR_RIE_RRUUU3 INSTR_RIE_RRUUU /* e.g. risbhg */
+#define INSTR_RIE_RRUUU4 INSTR_RIE_RRUUU /* e.g. rnsbgt */
#define INSTR_RIL_0P 6, { J32_16,0,0,0,0 } /* e.g. jg */
#define INSTR_RIL_RP 6, { R_8,J32_16,0,0,0,0 } /* e.g. brasl */
#define INSTR_RIL_UP 6, { U4_8,J32_16,0,0,0,0 } /* e.g. brcl */
@@ -498,6 +486,8 @@ unused_s390_operands_static_asserts (void)
#define INSTR_VRI_VVUUU 6, { V_8,V_12,U12_16,U4_32,U4_28,0 } /* e.g. vftci */
#define INSTR_VRI_VVUUU2 6, { V_8,V_12,U8_28,U8_16,U4_24,0 } /* e.g. vpsop */
#define INSTR_VRI_VR0UU 6, { V_8,R_12,U8_28,U4_24,0,0 } /* e.g. vcvd */
+#define INSTR_VRI_VV0UU 6, { V_8,V_12,U8_28,U4_24,0,0 } /* e.g. vcvdq */
+#define INSTR_VRI_VVV0UV 6, { V_8,V_12,V_16,V_32,U8_24,0 } /* e.g. veval */
#define INSTR_VRX_VRRD 6, { V_8,D_20,X_12,B_16,0,0 } /* e.g. vl */
#define INSTR_VRX_VV 6, { V_8,V_12,0,0,0,0 } /* e.g. vlr */
#define INSTR_VRX_VRRDU 6, { V_8,D_20,X_12,B_16,U4_32,0 } /* e.g. vlrep */
@@ -508,27 +498,27 @@ unused_s390_operands_static_asserts (void)
#define INSTR_VRS_VRRDU 6, { V_8,R_12,D_20,B_16,U4_32,0 } /* e.g. vlvg */
#define INSTR_VRS_VRRD 6, { V_8,R_12,D_20,B_16,0,0 } /* e.g. vlvgb */
#define INSTR_VRS_RRDV 6, { V_32,R_12,D_20,B_16,0,0 } /* e.g. vlrlr */
-#define INSTR_VRR_0V 6, { V_12,0,0,0,0,0 } /* e.g. vtp */
#define INSTR_VRR_VRR 6, { V_8,R_12,R_16,0,0,0 } /* e.g. vlvgp */
#define INSTR_VRR_VVV0U 6, { V_8,V_12,V_16,U4_32,0,0 } /* e.g. vmrh */
#define INSTR_VRR_VVV0U0 6, { V_8,V_12,V_16,U4_24,0,0 } /* e.g. vfaeb */
-#define INSTR_VRR_VVV0U1 6, { V_8,V_12,V_16,U4_OR1_24,0,0 } /* e.g. vfaebs*/
-#define INSTR_VRR_VVV0U2 6, { V_8,V_12,V_16,U4_OR2_24,0,0 } /* e.g. vfaezb*/
-#define INSTR_VRR_VVV0U3 6, { V_8,V_12,V_16,U4_OR3_24,0,0 } /* e.g. vfaezbs*/
+#define INSTR_VRR_VVV0U02 6, { V_8,V_12,V_16,U4_28,0,0 } /* e.g. vd */
+#define INSTR_VRR_VVV0U1 INSTR_VRR_VVV0U0 /* e.g. vfaebs*/
+#define INSTR_VRR_VVV0U2 INSTR_VRR_VVV0U0 /* e.g. vfaezb*/
+#define INSTR_VRR_VVV0U3 INSTR_VRR_VVV0U0 /* e.g. vfaezbs*/
#define INSTR_VRR_VVV 6, { V_8,V_12,V_16,0,0,0 } /* e.g. vmrhb */
#define INSTR_VRR_VVV2 6, { V_8,V_CP16_12,0,0,0,0 } /* e.g. vnot */
#define INSTR_VRR_VV0U 6, { V_8,V_12,U4_32,0,0,0 } /* e.g. vseg */
#define INSTR_VRR_VV0U2 6, { V_8,V_12,U4_24,0,0,0 } /* e.g. vistrb*/
#define INSTR_VRR_VV0UU 6, { V_8,V_12,U4_28,U4_24,0,0 } /* e.g. vcdgb */
#define INSTR_VRR_VV0UU2 6, { V_8,V_12,U4_32,U4_28,0,0 } /* e.g. wfc */
-#define INSTR_VRR_VV0UU8 6, { V_8,V_12,U4_OR8_28,U4_24,0,0 } /* e.g. wcdgb */
+#define INSTR_VRR_VV0UU8 INSTR_VRR_VV0UU /* e.g. wcdgb */
#define INSTR_VRR_VV 6, { V_8,V_12,0,0,0,0 } /* e.g. vsegb */
#define INSTR_VRR_VVVUU0V 6, { V_8,V_12,V_16,V_32,U4_20,U4_24 } /* e.g. vstrc */
#define INSTR_VRR_VVVU0V 6, { V_8,V_12,V_16,V_32,U4_20,0 } /* e.g. vac */
#define INSTR_VRR_VVVU0VB 6, { V_8,V_12,V_16,V_32,U4_24,0 } /* e.g. vstrcb*/
-#define INSTR_VRR_VVVU0VB1 6, { V_8,V_12,V_16,V_32,U4_OR1_24,0 } /* e.g. vstrcbs*/
-#define INSTR_VRR_VVVU0VB2 6, { V_8,V_12,V_16,V_32,U4_OR2_24,0 } /* e.g. vstrczb*/
-#define INSTR_VRR_VVVU0VB3 6, { V_8,V_12,V_16,V_32,U4_OR3_24,0 } /* e.g. vstrczbs*/
+#define INSTR_VRR_VVVU0VB1 INSTR_VRR_VVVU0VB /* e.g. vstrcbs*/
+#define INSTR_VRR_VVVU0VB2 INSTR_VRR_VVVU0VB /* e.g. vstrczb*/
+#define INSTR_VRR_VVVU0VB3 INSTR_VRR_VVVU0VB /* e.g. vstrczbs*/
#define INSTR_VRR_VVV0V 6, { V_8,V_12,V_16,V_32,0,0 } /* e.g. vacq */
#define INSTR_VRR_VVV0U0U 6, { V_8,V_12,V_16,U4_32,U4_24,0 } /* e.g. vfae */
#define INSTR_VRR_VVVV 6, { V_8,V_12,V_16,V_32,0,0 } /* e.g. vfmadb*/
@@ -537,6 +527,9 @@ unused_s390_operands_static_asserts (void)
#define INSTR_VRR_VV0UUU 6, { V_8,V_12,U4_32,U4_28,U4_24,0 } /* e.g. vcdg */
#define INSTR_VRR_VVVU0UV 6, { V_8,V_12,V_16,V_32,U4_28,U4_20 } /* e.g. vfma */
#define INSTR_VRR_VV0U0U 6, { V_8,V_12,U4_32,U4_24,0,0 } /* e.g. vistr */
+#define INSTR_VRR_0V 6, { V_12,0,0,0,0,0 } /* e.g. vtp */
+#define INSTR_VRR_0V0U 6, { V_12,U16_20,0,0,0,0 } /* e.g. vtp */
+#define INSTR_VRR_0VVU 6, { V_12,V_16,U16_20,0,0,0 } /* e.g. vtz */
#define INSTR_VRR_0VV0U 6, { V_12,V_16,U4_24,0,0,0 } /* e.g. vcp */
#define INSTR_VRR_RV0U 6, { R_8,V_12,U4_24,0,0,0 } /* e.g. vcvb */
#define INSTR_VRR_RV0UU 6, { R_8,V_12,U4_24,U4_28,0,0 } /* e.g. vcvb */
@@ -559,9 +552,9 @@ unused_s390_operands_static_asserts (void)
#define MASK_RIE_R0U0 { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff }
#define MASK_RIE_RUI0 { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
#define MASK_RIE_RRUUU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
-#define MASK_RIE_RRUUU2 { 0xff, 0x00, 0x00, 0xc0, 0x00, 0xff }
-#define MASK_RIE_RRUUU3 { 0xff, 0x00, 0x00, 0xe0, 0x00, 0xff }
-#define MASK_RIE_RRUUU4 { 0xff, 0x00, 0xc0, 0x00, 0x00, 0xff }
+#define MASK_RIE_RRUUU2 { 0xff, 0x00, 0x00, 0x80, 0x00, 0xff }
+#define MASK_RIE_RRUUU3 { 0xff, 0x00, 0x00, 0x80, 0x00, 0xff }
+#define MASK_RIE_RRUUU4 { 0xff, 0x00, 0x80, 0x00, 0x00, 0xff }
#define MASK_RIL_0P { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RIL_RP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RIL_UP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
@@ -725,6 +718,8 @@ unused_s390_operands_static_asserts (void)
#define MASK_VRI_VVUUU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_VRI_VVUUU2 { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_VRI_VR0UU { 0xff, 0x00, 0xff, 0x00, 0x00, 0xff }
+#define MASK_VRI_VV0UU { 0xff, 0x00, 0xff, 0x00, 0x00, 0xff }
+#define MASK_VRI_VVV0UV { 0xff, 0x00, 0x0f, 0x00, 0x00, 0xff }
#define MASK_VRX_VRRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
#define MASK_VRX_VV { 0xff, 0x00, 0xff, 0xff, 0xf0, 0xff }
#define MASK_VRX_VRRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
@@ -735,10 +730,10 @@ unused_s390_operands_static_asserts (void)
#define MASK_VRS_VRRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_VRS_VRRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
#define MASK_VRS_RRDV { 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff }
-#define MASK_VRR_0V { 0xff, 0xf0, 0xff, 0xff, 0xf0, 0xff }
#define MASK_VRR_VRR { 0xff, 0x00, 0x0f, 0xff, 0xf0, 0xff }
#define MASK_VRR_VVV0U { 0xff, 0x00, 0x0f, 0xff, 0x00, 0xff }
#define MASK_VRR_VVV0U0 { 0xff, 0x00, 0x0f, 0x0f, 0xf0, 0xff }
+#define MASK_VRR_VVV0U02 { 0xff, 0x00, 0x0f, 0xf0, 0xf0, 0xff }
#define MASK_VRR_VVV0U1 { 0xff, 0x00, 0x0f, 0x1f, 0xf0, 0xff }
#define MASK_VRR_VVV0U2 { 0xff, 0x00, 0x0f, 0x2f, 0xf0, 0xff }
#define MASK_VRR_VVV0U3 { 0xff, 0x00, 0x0f, 0x3f, 0xf0, 0xff }
@@ -764,6 +759,9 @@ unused_s390_operands_static_asserts (void)
#define MASK_VRR_VV0UUU { 0xff, 0x00, 0xff, 0x00, 0x00, 0xff }
#define MASK_VRR_VVVU0UV { 0xff, 0x00, 0x00, 0xf0, 0x00, 0xff }
#define MASK_VRR_VV0U0U { 0xff, 0x00, 0xff, 0x0f, 0x00, 0xff }
+#define MASK_VRR_0V { 0xff, 0xf0, 0xff, 0xff, 0xf0, 0xff }
+#define MASK_VRR_0V0U { 0xff, 0xf0, 0xf0, 0x00, 0x00, 0xff }
+#define MASK_VRR_0VVU { 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff }
#define MASK_VRR_0VV0U { 0xff, 0xf0, 0x0f, 0x0f, 0xf0, 0xff }
#define MASK_VRR_RV0U { 0xff, 0x00, 0xff, 0x0f, 0xf0, 0xff }
#define MASK_VRR_RV0UU { 0xff, 0x00, 0xff, 0x00, 0xf0, 0xff }
diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
index 1182e19..bbc00b1 100644
--- a/opcodes/s390-opc.txt
+++ b/opcodes/s390-opc.txt
@@ -2061,7 +2061,7 @@ e60000000055 vcnf VRR_VV0UU2 "vector fp convert to nnp" arch14 zarch
# Reset-DAT-Protection Facility
-b98B rdp RRF_RURR2 "reset dat protection" arch14 zarch optparm
+b98b rdp RRF_RURR2 "reset dat protection" arch14 zarch optparm
# BEAR-Enhancement Facility
@@ -2072,3 +2072,113 @@ b201 stbear S_RD "store bear" arch14 zarch
# Processor-Activity-Instrumentation Facility
b28f qpaci S_RD "query processor activity counter information" arch14 zarch
+
+
+# arch15 instructions
+
+e70000000089 vblend VRR_VVVU0V " " arch15 zarch
+e70000000089 vblendb VRR_VVV0V " " arch15 zarch
+e70001000089 vblendh VRR_VVV0V " " arch15 zarch
+e70002000089 vblendf VRR_VVV0V " " arch15 zarch
+e70003000089 vblendg VRR_VVV0V " " arch15 zarch
+e70004000089 vblendq VRR_VVV0V " " arch15 zarch
+
+e70000000088 veval VRI_VVV0UV " " arch15 zarch
+
+e70000000054 vgem VRR_VV0U " " arch15 zarch
+e70000000054 vgemb VRR_VV " " arch15 zarch
+e70000001054 vgemh VRR_VV " " arch15 zarch
+e70000002054 vgemf VRR_VV " " arch15 zarch
+e70000003054 vgemg VRR_VV " " arch15 zarch
+e70000004054 vgemq VRR_VV " " arch15 zarch
+
+e700000030d7 vuphg VRR_VV " " arch15 zarch
+e700000030d5 vuplhg VRR_VV " " arch15 zarch
+e700000030d6 vuplg VRR_VV " " arch15 zarch
+e700000030d4 vupllg VRR_VV " " arch15 zarch
+
+e700000040f2 vavgq VRR_VVV " " arch15 zarch
+e700000040f0 vavglq VRR_VVV " " arch15 zarch
+e700000040db vecq VRR_VV " " arch15 zarch
+e700000040d9 veclq VRR_VV " " arch15 zarch
+e700000040f8 vceqq VRR_VVV " " arch15 zarch
+e700001040f8 vceqqs VRR_VVV " " arch15 zarch
+e700000040fb vchq VRR_VVV " " arch15 zarch
+e700001040fb vchqs VRR_VVV " " arch15 zarch
+e700000040f9 vchlq VRR_VVV " " arch15 zarch
+e700001040f9 vchlqs VRR_VVV " " arch15 zarch
+e70000004053 vclzq VRR_VV " " arch15 zarch
+e70000004052 vctzq VRR_VV " " arch15 zarch
+e700000040de vlcq VRR_VV " " arch15 zarch
+e700000040df vlpq VRR_VV " " arch15 zarch
+e700000040ff vmxq VRR_VVV " " arch15 zarch
+e700000040fd vmxlq VRR_VVV " " arch15 zarch
+e700000040fe vmnq VRR_VVV " " arch15 zarch
+e700000040fc vmnlq VRR_VVV " " arch15 zarch
+e700030000aa vmalg VRR_VVV0V " " arch15 zarch
+e700040000aa vmalq VRR_VVV0V " " arch15 zarch
+e700030000ab vmahg VRR_VVV0V " " arch15 zarch
+e700040000ab vmahq VRR_VVV0V " " arch15 zarch
+e700030000a9 vmalhg VRR_VVV0V " " arch15 zarch
+e700040000a9 vmalhq VRR_VVV0V " " arch15 zarch
+e700030000ae vmaeg VRR_VVV0V " " arch15 zarch
+e700030000ac vmaleg VRR_VVV0V " " arch15 zarch
+e700030000af vmaog VRR_VVV0V " " arch15 zarch
+e700030000ad vmalog VRR_VVV0V " " arch15 zarch
+e700000030a3 vmhg VRR_VVV " " arch15 zarch
+e700000040a3 vmhq VRR_VVV " " arch15 zarch
+e700000030a1 vmlhg VRR_VVV " " arch15 zarch
+e700000040a1 vmlhq VRR_VVV " " arch15 zarch
+e700000030a2 vmlg VRR_VVV " " arch15 zarch
+e700000040a2 vmlq VRR_VVV " " arch15 zarch
+e700000030a6 vmeg VRR_VVV " " arch15 zarch
+e700000030a4 vmleg VRR_VVV " " arch15 zarch
+e700000030a7 vmog VRR_VVV " " arch15 zarch
+e700000030a5 vmlog VRR_VVV " " arch15 zarch
+
+e700000000b2 vd VRR_VVV0UU " " arch15 zarch
+e700000020b2 vdf VRR_VVV0U02 " " arch15 zarch
+e700000030b2 vdg VRR_VVV0U02 " " arch15 zarch
+e700000040b2 vdq VRR_VVV0U02 " " arch15 zarch
+
+e700000000b0 vdl VRR_VVV0UU " " arch15 zarch
+e700000020b0 vdlf VRR_VVV0U02 " " arch15 zarch
+e700000030b0 vdlg VRR_VVV0U02 " " arch15 zarch
+e700000040b0 vdlq VRR_VVV0U02 " " arch15 zarch
+
+e700000000b3 vr VRR_VVV0UU " " arch15 zarch
+e700000020b3 vrf VRR_VVV0U02 " " arch15 zarch
+e700000030b3 vrg VRR_VVV0U02 " " arch15 zarch
+e700000040b3 vrq VRR_VVV0U02 " " arch15 zarch
+
+e700000000b1 vrl VRR_VVV0UU " " arch15 zarch
+e700000020b1 vrlf VRR_VVV0U02 " " arch15 zarch
+e700000030b1 vrlg VRR_VVV0U02 " " arch15 zarch
+e700000040b1 vrlq VRR_VVV0U02 " " arch15 zarch
+
+b968 clzg RRE_RR " " arch15 zarch
+b969 ctzg RRE_RR " " arch15 zarch
+
+e30000000060 lxab RXY_RRRD " " arch15 zarch
+e30000000062 lxah RXY_RRRD " " arch15 zarch
+e30000000064 lxaf RXY_RRRD " " arch15 zarch
+e30000000066 lxag RXY_RRRD " " arch15 zarch
+e30000000068 lxaq RXY_RRRD " " arch15 zarch
+
+e30000000061 llxab RXY_RRRD " " arch15 zarch
+e30000000063 llxah RXY_RRRD " " arch15 zarch
+e30000000065 llxaf RXY_RRRD " " arch15 zarch
+e30000000067 llxag RXY_RRRD " " arch15 zarch
+e30000000069 llxaq RXY_RRRD " " arch15 zarch
+
+b96c bextg RRF_R0RR2 " " arch15 zarch
+b96d bdepg RRF_R0RR2 " " arch15 zarch
+
+b93e kimd RRF_U0RR " " arch15 zarch optparm
+b93f klmd RRF_U0RR " " arch15 zarch optparm
+
+e6000000004e vcvbq VRR_VV0U2 " " arch15 zarch
+e6000000004a vcvdq VRI_VV0UU " " arch15 zarch
+
+e6000000005f vtp VRR_0V0U " " arch15 zarch optparm
+e6000000007f vtz VRR_0VVU " " arch15 zarch