aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-06-10Automatic date update in version.inGDB Administrator1-1/+1
2024-06-09Automatic date update in version.inGDB Administrator1-1/+1
2024-06-08gdb: Avoid compilation warning in gcore.c.Eli Zaretskii1-1/+1
See https://sourceware.org/pipermail/gdb-patches/2024-June/209726.html for the details. Approved-By: Tom Tromey <tom@tromey.com> (cherry picked from commit e222ed2ce5b5359bfc6d8fd125534ccb507d7fb0)
2024-06-08Automatic date update in version.inGDB Administrator1-1/+1
2024-06-07gdb/testsuite: Add gdb.arch/aarch64-mops-watchpoint.expThiago Jung Bauermann2-0/+145
Test behaviour of watchpoints triggered by MOPS instructions. This test is similar to gdb.base/memops-watchpoint.exp, but specifically for MOPS instructions rather than whatever instructions are used in the libc's implementation of memset/memcpy/memmove. There's a separate watched variable for each set of instructions so that the testcase can test whether GDB correctly identified the watchpoint that triggered in each case. Approved-By: Luis Machado <luis.machado@arm.com> Tested-By: Luis Machado <luis.machado@arm.com> (cherry picked from commit 55e3fcf5e523007bd97868214e00324db42c11f6)
2024-06-07gdb/aarch64: Add record support for MOPS instructions.Thiago Jung Bauermann3-0/+333
There are two kinds of MOPS instructions: set instructions and copy instructions. Within each group there are variants with minor differences in how they read or write to memory — e.g., non-temporal read and/or write, unprivileged read and/or write and permutations of those — but they work in the same way in terms of the registers and regions of memory that they modify. The new gdb.reverse/aarch64-mops.exp testcase verifies that MOPS instructions are recorded and correctly reversed. Not all variants of the copy and set instructions are tested, since there are many and the record and replay target processes them in the same way. PR tdep/31666 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31666 Approved-By: Luis Machado <luis.machado@arm.com> Tested-By: Luis Machado <luis.machado@arm.com> (cherry picked from commit ebd06ca6b9bb2327e1269b52eb99b2f012faabf9)
2024-06-07gdb/aarch64: Disable displaced single-step for MOPS instructionsThiago Jung Bauermann4-3/+275
The AArch64 MOPS (Memory Operation) instructions provide a standardised instruction sequence to perform a memset, memcpy or memmove. A sequence is always composed of three instructions: a prologue instruction, a main instruction and an epilogue instruction. As an illustration, here are the implementations of these memory operations in glibc 2.39: (gdb) disassemble/r Dump of assembler code for function __memset_mops: => 0x0000fffff7e8d780 <+0>: d503201f nop 0x0000fffff7e8d784 <+4>: aa0003e3 mov x3, x0 0x0000fffff7e8d788 <+8>: 19c10443 setp [x3]!, x2!, x1 0x0000fffff7e8d78c <+12>: 19c14443 setm [x3]!, x2!, x1 0x0000fffff7e8d790 <+16>: 19c18443 sete [x3]!, x2!, x1 0x0000fffff7e8d794 <+20>: d65f03c0 ret End of assembler dump. (gdb) disassemble/r Dump of assembler code for function __memcpy_mops: => 0x0000fffff7e8c580 <+0>: d503201f nop 0x0000fffff7e8c584 <+4>: aa0003e3 mov x3, x0 0x0000fffff7e8c588 <+8>: 19010443 cpyfp [x3]!, [x1]!, x2! 0x0000fffff7e8c58c <+12>: 19410443 cpyfm [x3]!, [x1]!, x2! 0x0000fffff7e8c590 <+16>: 19810443 cpyfe [x3]!, [x1]!, x2! 0x0000fffff7e8c594 <+20>: d65f03c0 ret End of assembler dump. (gdb) disassemble/r Dump of assembler code for function __memmove_mops: => 0x0000fffff7e8d180 <+0>: d503201f nop 0x0000fffff7e8d184 <+4>: aa0003e3 mov x3, x0 0x0000fffff7e8d188 <+8>: 1d010443 cpyp [x3]!, [x1]!, x2! 0x0000fffff7e8d18c <+12>: 1d410443 cpym [x3]!, [x1]!, x2! 0x0000fffff7e8d190 <+16>: 1d810443 cpye [x3]!, [x1]!, x2! 0x0000fffff7e8d194 <+20>: d65f03c0 ret End of assembler dump. The Arm Architecture Reference Manual says that "the prologue, main, and epilogue instructions are expected to be run in succession and to appear consecutively in memory". Therefore this patch disables displaced stepping on them. The testcase verifies that MOPS sequences are correctly single-stepped. PR tdep/31666 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31666 Approved-By: Luis Machado <luis.machado@arm.com> Tested-By: Luis Machado <luis.machado@arm.com> (cherry picked from commit b995344c116e04bd6bfeaf53364cd791d0dae45d)
2024-06-07Automatic date update in version.inGDB Administrator1-1/+1
2024-06-06gdb/doc: use POD2MAN5 when appropriateAndrew Burgess1-1/+1
In commit: commit 824083f34c222aa7419e2ea58e82d6f230d5f531 Date: Fri Apr 12 17:47:20 2024 +0100 gdb/doc: use silent-rules.mk in the Makefile I rewrote the rules for building the man pages. While doing this I accidentally switched from using MAN2POD5 to MAN2POD1 for generating the file gdbinit.5. Restore use of MAN2POD5 where appropriate.
2024-06-06Automatic date update in version.inGDB Administrator1-1/+1
2024-06-05Automatic date update in version.inGDB Administrator1-1/+1
2024-06-04Automatic date update in version.inGDB Administrator1-1/+1
2024-06-03Automatic date update in version.inGDB Administrator1-1/+1
2024-06-02Automatic date update in version.inGDB Administrator1-1/+1
2024-06-01Bump GDB's version number to 15.0.91.DATE-git.Joel Brobecker1-1/+1
This commit changes gdb/version.in to 15.0.91.DATE-git.
2024-06-01Set GDB version number to 15.0.91.Joel Brobecker1-1/+1
This commit changes gdb/version.in to 15.0.91.
2024-06-01Automatic date update in version.inGDB Administrator1-1/+1
2024-05-31Automatic date update in version.inGDB Administrator1-1/+1
2024-05-30Automatic date update in version.inGDB Administrator1-1/+1
2024-05-29gdb/doc: don't have .pod targets separate to man page targetsAndrew Burgess1-6/+19
While preparing the new release it was discovered that commit: commit 824083f34c222aa7419e2ea58e82d6f230d5f531 Date: Fri Apr 12 17:47:20 2024 +0100 gdb/doc: use silent-rules.mk in the Makefile was causing problems. Given a release tar file, an attempt to build and install GDB would give an error like this: [...] TEXI2POD gdb.pod cannot find GDBvn.texi at ../../../gdb-15.0.50.20240508/gdb/doc/../../etc/texi2pod.pl line 251, <GEN0> line 16. make[5]: *** [Makefile:663: gdb.pod] Error 2 The problem here is how the man pages are built, and how they are distributed within a release. Within the development (git) tree, the man page files are not part of the source tree, these files are built as needed. Within a release tar file though, the man pages are included. The idea being that a user can build and install GDB, including getting the man pages, without having to install the tools needed to generate the man pages. The man pages are generated in a two step process. First the .texi file is processed with texi2pod to create a .pod file, then this .pod file is processed to create the .1 or .5 man file. Prior to the above commit these two steps were combined into a single recipe, this meant that when a user performed a build/install from a release tree all of the dependencies, as well as the final result, were all present in the source tree, and so nothing needed to be rebuilt. However, the above commit split the two steps apart. Now we had a separate rule for building the .pod files, and the .1/.5 man page files depended on the relevant .pod file. As the .pod files are not shipped in a GDB release, this meant that one of the dependencies of the man page files was now missing. As a result if a user tried to install from a release tree a rebuild of the .pod files would be attempted, and if that succeeded then building the man pages would follow that. Unfortunately, building the .pod files would fail as the GDBvn.texi file, though present in the source tree, was not present in the build tree, which is where it is needed for the .pod file generation to work. To fix this, I propose merging the .pod creation and the .1/.5 man page creation back into a single recipe. Having these two steps split is probably the "cleaner" solution, but makes it harder for us to achieve our goal of shipping the prebuilt man page files. I've added a comment explaining what's going on (such a comment would have prevented this mistake having been made in the first place). One possibly weird thing here is that I have left both an ECHO_TEXI2POD and a ECHO_TEXI2MAN in the rule $(MAN1S) and $(MAN5S) recipes. This is 100% not going to break anything, these just print two different progress messages while executing the recipes, but I'm not sure if this is considered poor style or not. Maybe we're only supposed to have a single ECHO_* per recipe? Anyway, even if this is poor style, I figure it really is just a style thing. We can tweak this later as needed. Otherwise, this commit should fix the current issue blocking the next GDB release. Approved-By: Tom Tromey <tom@tromey.com>
2024-05-29Automatic date update in version.inGDB Administrator1-1/+1
2024-05-28Automatic date update in version.inGDB Administrator1-1/+1
2024-05-27Automatic date update in version.inGDB Administrator1-1/+1
2024-05-26Set GDB version number to 15.0.90.Joel Brobecker1-1/+1
This commit changes gdb/version.in to 15.0.90.
2024-05-26gdb/NEWS: Replace "Chagnes since GDB 14" to "Changes in GDB 15"Joel Brobecker1-1/+1
This commit changes the title of the section to refer to the actual release version number, now that all changes listed are confirmed to be part of the upcoming GDB 15 release.
2024-05-26Set development mode to "off" by default.Joel Brobecker1-1/+1
This is done by setting the "development" variable to "false" in bfd/development.sh.
2024-05-26Bump version to 15.0.90.DATE-git.Joel Brobecker1-1/+1
Now that the GDB 15 branch has been created, this commit bumps the version number in gdb/version.in to 15.0.90.DATE-git For the record, the GDB 15 branch was created from commit 3a624d9f1c5ccd8cefdd5b7ef12b41513f9006cd.
2024-05-26Automatic date update in version.ingdb-15-branchpointGDB Administrator1-1/+1
2024-05-25ld: Document -pie -Ttext-segment=ORG generates ET_EXECH.J. Lu1-1/+4
This is the v2 patch I am checking in. H.J.
2024-05-25Automatic date update in version.inGDB Administrator1-1/+1
2024-05-24Re: LoongArch: gas: Adjust DWARF CIE alignment factorsAlan Modra1-22/+22
Adjust the gas testsuite to suit commit de203ed568f6. * testsuite/gas/loongarch/relax-cfi-fde-DW_CFA_advance_loc.d: Expect data alignment of -8. Tidy.
2024-05-24gas: extend \+ support to .irp / .irpcJan Beulich6-23/+24
PR gas/31752 These are effectively macro-like, without any separate macro definition. They already support \@, so they would better also support \+. This allows, where desired, to get away without maintaining an explicit count variable in source code. With this the recently introduced testcase doesn't need any xfails anymore.
2024-05-24gas: adjust handling of quotes for .irpcJan Beulich5-21/+40
The present handling of inner double quotes can lead to very strange diagnostics. Follow one of the two possible interpretations of the doc: @dots{} referring to possibly multiple white space separated @var{values}, each of which may be quoted. The original implementation, prior to 465e5617233f ("PR gas/3856"), hints at the other possible interpretation: When quoted there's only a single @var{values}, with inner quotes taken as ordinary characters. That, however, seems overall less useful to me. While touching the documentation, mirror the (inverse) spelling correction (@section line inconsistent with actual description) to .irp as well.
2024-05-24x86: simplify VexVVVV_SRC2 handling for the XOP caseJan Beulich1-9/+5
As already suggested during review, rather than having an extra conditional in build_modrm_byte() (a code path used for quite a few more insns, including even certain GPR ones), adjust the attribute in the installed template to properly describe things with operands swapped.
2024-05-24x86: simplify / consolidate check_{word,long,qword}_reg()Jan Beulich1-16/+4
These run after template matching. Therefore operands are already known to match the template in use. With the loop bodies skipping anything not a GPR in the actual operands, there's therefore no need to check the template's operand type for permitting Reg or Accum. At the same time bring the three functions in sync for the "byte" part of the logic, as far as checking the template for other sizes (qword specifically) goes. Plus drop a stale comment from check_qword_reg(), when all three are now behaving the same in this regard.
2024-05-24x86: correct VCVT{,U}SI2SDJan Beulich5-21/+72
Properly reject inappropriate suffixes (No_lSuf / No_qSuf mistakenly omitted by cf665fee1d6c ["x86: re-work AVX512 embedded rounding / SAE"]), to avoid emitting bad or arbitrarily guessed instructions. Interestingly check_{long,qword}_suffix() don't help here, which perhaps is another indication that the way they work right now isn't quite appropriate. Sadly correcting just the templates breaks operand ambiguity detection, since so far that worked from a single template permitting more than one suffix. Here we have ambiguity though which can now be noticed only when taking all (matching) templates together. Therefore we need to determine further matching templates (see code comments for constraints), to then accumulate permitted suffixes across all of them.
2024-05-24[gdb/testsuite] Add PR26286 kfail in ↵Tom de Vries1-1/+24
gdb.threads/attach-many-short-lived-threads.exp When running test-case gdb.threads/attach-many-short-lived-threads.exp, I run regularly into PR26286: ... (gdb) continue^M Continuing.^M [LWP ... exited]^M ... [LWP ... exited]^M ^M Program terminated with signal SIGTRAP, Trace/breakpoint trap.^M The program no longer exists.^M (gdb) FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 9: \ break at break_fn: 1 ... Add a kfail for this, such that we have: ... (gdb) KFAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 9: \ break at break_fn: 1 (PRMS: threads/26286) ... Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org> Tested on x86_64-linux.
2024-05-24Automatic date update in version.inGDB Administrator1-1/+1
2024-05-23gdb, testsuite: Fix return value in gdb.base/foll-fork.expFelix Willgerodt1-1/+1
In a remote testing setup, I saw this error: ~~~ (gdb) FAIL: gdb.base/foll-fork.exp: check_fork_catchpoints: runto: run to main ERROR: tcl error sourcing gdb/gdb/testsuite/gdb.base/foll-fork.exp. ERROR: expected boolean value but got "" while executing "if { ![check_fork_catchpoints] } { untested "follow-fork not supported" return }" (file "gdb/gdb/testsuite/gdb.base/foll-fork.exp" line 434) invoked from within "source gdb/gdb/testsuite/gdb.base/foll-fork.exp" ("uplevel" body line 1) invoked from within "uplevel #0 source gdb/gdb/testsuite/gdb.base/foll-fork.exp" invoked from within "catch "uplevel #0 source $test_file_name"" Remote debugging from host 172.0.1.3, port 37766 Killing process(es): 1171 Quit ~~~ The actual reason for this were some connection problems. Though the function check_fork_catchpoints shouldn't return an empty string, especially as it promises to always return 0 or 1. Fix that. Approved-By: Tom Tromey <tom@tromey.com>
2024-05-23gdb/testsuite: Restore libc_has_debug_info's less strict behaviourThiago Jung Bauermann1-11/+10
The code that was factored out from gdb.base/relativedebug.exp assumed that libc has debug info and only determined that it doesn't if it saw a specific message from GDB to that effect. In the process of factoring it into a require predicate, I made it stricter by trying to make a specific determination of whether or not debug info is available. Pedro noticed that "It'll disable the testcase on systems that link with their libc statically (even if has debug info), or systems that name their libc something else." Which is something I hadn't considered. This patch returns libc_has_debug_info to the original behaviour. Also, remove a verbose message that is redundant with the $message variable. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31700 Approved-By: Tom Tromey <tom@tromey.com>
2024-05-23Automatic date update in version.inGDB Administrator1-1/+1
2024-05-23libctf testsuite compilation failureAlan Modra1-1/+1
* testsuite/libctf-regression/open-error-free.c (main): Correct format length modifier.
2024-05-22Default dwarf_synchronous to trueTom Tromey1-1/+1
Unfortunately the background DWARF reading series introduced a number of races, as repored by thread sanitizer. This patch changes gdb to disable this feature for the time being -- in particular for the gdb 15 release. I've filed a bug and linked all the known races to it. Once those are fixed we can re-enable this feature by default. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31751
2024-05-22restore build with --enable-maintainer-modeIndu Bhagat3-3/+0
A build with --enable-maintainer-mode is currently failing with: make[4]: *** No rule to make target '<SRC>/gas/config/te-ia64aix.h', needed by '<SRC>/gas/po/gas.pot'. Stop. make[4]: Leaving directory '<$OBJ>/gas/po' make[3]: *** [Makefile:1695: all-recursive] Error 1 ... As config/te-ia64aix.h is now removed, remove the corresponding fragment from the makefile. gas/ * Makefile.am: Remove config/te-ia64aix.h. * Makefile.in: Regenerate. * po/POTFILES.in: Regenerate.
2024-05-22aarch64: fix incorrect encoding for system register pmsdsfr_el1Matthieu Longo2-3/+3
This patch fixes a mistake in the encoding of the system register pmsdsfr_el1. Reference: https://developer.arm.com/documentation/ddi0601/2022-09/AArch64-Registers/PMSDSFR-EL1--Sampling-Data-Source-Filter-Register?lang=en
2024-05-22Support APX zero-upperCui, Lili15-6245/+7273
This patch is to enable ZU for IMUL (opcodes 0x69 and 0x6B) and SETcc. Since the spec only recommends one form of setzu, I won't be adding set<cc>reg32/reg64 support in this patch. gas/ChangeLog: * config/tc-i386.c (build_apx_evex_prefix): Handle ZU. * testsuite/gas/i386/x86-64.exp: Added new tests for ZU. * testsuite/gas/i386/x86-64.exp: Added new tests for ZU. * testsuite/gas/i386/x86-64-apx-zu-intel.d: New test. * testsuite/gas/i386/x86-64-apx-zu-inval.l: Ditto. * testsuite/gas/i386/x86-64-apx-zu-inval.s: Ditto. * testsuite/gas/i386/x86-64-apx-zu.d: Ditto. * testsuite/gas/i386/x86-64-apx-zu.s: Ditto. opcodes/ChangeLog: * i386-dis-evex-prefix.h: Handle PREFIX_EVEX_MAP4_40 ~ PREFIX_EVEX_MAP4_4F. * i386-dis-evex.h: Ditto. * i386-dis.c (struct dis386): Add new micro 'ZU'. (putop): Handle %ZU. * i386-gen.c: Added ZU. * i386-opc.h: Ditto. * i386-opc.tbl: Added new templates to support ZU.
2024-05-22X86: Remove "i.rex" to eliminate extra conditional branchCui, Lili1-1/+1
Resulting code will do better without the extra conditional branch. Remove "i.rex" to eliminate extra conditional branch. gas/ChangeLog: * config/tc-i386.c (establish_rex): Remove i.rex.
2024-05-21gprofng: use StringBuilder to create long messagesVladimir Mezentsev2-283/+179
ChangeLog 2024-05-20 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/collctrl.cc: Use StringBuilder to create messages. Remove unused variables and arrays. * src/collctrl.h: Remove unused variables.
2024-05-21gprofng: Remove hardware counter tables for unsupported hardware (Sparc)Vladimir Mezentsev1-1180/+1
ChangeLog 2024-05-20 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/31123 * common/hwctable.c: Remove hardware counter tables for Sparc machines.
2024-05-21gprofng: remove memset() in libcollectorVladimir Mezentsev6-50/+24
ChangeLog 2024-05-20 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * libcollector/collector.c: Use static initialization instead of memset. * libcollector/dispatcher.c: Likewise. * libcollector/hwprofile.c: Likewise. * libcollector/jprofile.c: Likewise. * libcollector/profile.c: Likewise. * libcollector/synctrace.c: Likewise.