aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-07Move elf_backend_always_size_sections earlierAlan Modra1-15/+15
* elflink.c (bfd_elf_size_dynamic_sections): Move plt/got init earlier and call elf_backend_always_size_sections at the start of this function.
2022-01-07Automatic date update in version.inGDB Administrator1-1/+1
2022-01-06ldelfgen.c: Add missing newlines when calling einfoH.J. Lu1-3/+3
* ldelfgen.c (ldelf_map_segments): Add the missing newline to einfo.
2022-01-06Fix a stack exhaustion bug parsing malicious STABS format debug information.Nick Clifton2-2/+22
PR 28718 * debug.c (debug_write_type): Allow for malicious recursion via indirect debug types.
2022-01-06aarch64: Add support for new SME instructionsRichard Sandiford4-302/+394
This patch adds support for three new SME instructions: ADDSPL, ADDSVL and RDSVL. They behave like ADDPL, ADDVL and RDVL, but read the streaming vector length instead of the current vector length. opcodes/ * aarch64-tbl.h (aarch64_opcode_table): Add ADDSPL, ADDSVL and RDSVL. * aarch64-dis-2.c: Regenerate. gas/ * testsuite/gas/aarch64/sme.s, testsuite/gas/aarch64/sme.d: Add tests for ADDSPL, ADDSVL and RDSVL.
2022-01-06Use target_announce_detach in more targetsTom Tromey4-37/+11
target_announce_detach was added in commit 0f48b757 ("Factor out "Detaching from program" message printing"). There, Pedro wrote: (For now, I left the couple targets that print this a bit differently alone. Maybe this could be further pulled out into infcmd.c. If we did that, and those targets want to continue printing differently, this new function could be converted to a target method.) It seems to me that the differences aren't very big, and in some cases other targets handled the output a bit more nicely. In particular, some targets will print a different message when exec_file==NULL, rather than printing the same output with an empty string as exec_file. This patch incorporates the nicer output into target_announce_detach, then changes the remaining ports to use this function.
2022-01-06Introduce target_announce_attachTom Tromey9-77/+30
This introduces target_announce_attach, by analog with target_announce_detach. Then it converts existing targets to use this, rather than emitting their own output by hand.
2022-01-06gdb: make use add_setshow_prefix_cmd in gnu-nat.cAndrew Burgess1-46/+13
In gnu-nat.c we currently implement some set/show prefix commands "manually", that is, we call add_prefix_cmd, and assign a set and show function to each prefix command. These set/show functions print an error indicating that the user didn't type a complete command. If we instead switch to using add_setshow_prefix_cmd then we can delete the set/show functions, GDB provides some default functions, which give a nice help style summary that lists all of the available sub-commands, along with a one line summary of what each does. Though this clearly changes the existing behaviour, I think this change is acceptable as the new behaviour is more inline with other set/show prefix commands, and the new behaviour is more informative. This change will conflict with Tom's change here: https://sourceware.org/pipermail/gdb-patches/2022-January/184724.html Where Tom changes the set/show functions that I delete. My suggestion is that the set/show functions still be deleted even after Tom's patch (or instead of Tom's patch). For testing I've build GDB on GNU/Hurd, and manually tested these functions. I did a grep over the testsuite, and don't believe the existing error messages are being checked for in any tests.
2022-01-06Use warning in windows-nat error messagesTom Tromey1-5/+2
A warning in windows-nat.c can be converted to use the warning function. As a side effect, this arranges for the output to be sent to gdb_stderr.
2022-01-06Clean up some dead code in windows-tdep.cTom Tromey1-24/+20
windows-tdep.c checks the result of xmalloc, which isn't necessary. I initially removed this dead check, but then went a bit further and modified the code so that some "goto"s and explicit memory management could be removed. Then, I added a couple of missing bounds checks. I believe this also fixes a possible bug with a missing 0-termination of a string. I am not certain, but that is why I think the existing code allocates a buffer that is 1 byte too long -- but then it fails to set this byte to 0.
2022-01-06Avoid crash in language_infoTom Tromey2-1/+10
language_info calls: show_language_command (NULL, 1, NULL, NULL); ... "knowing" that show_language_command does not use its ui_file parameter. However, this was changed in commit 7514a661 ("Consistently Use ui_file parameter to show callbacks"). This patch changes language_info to pass a ui_file. It took a while to write the test -- this function is only called when 'verbose' is on and when switching the "expected" language in auto mode.
2022-01-06Fix some failures in langs.expTom Tromey1-3/+3
langs.exp currently has some fails for me because the stack trace includes full paths to the source files. FAIL: gdb.base/langs.exp: up to foo in langs.exp FAIL: gdb.base/langs.exp: up to cppsub_ in langs.exp FAIL: gdb.base/langs.exp: up to fsub in langs.exp This fixes the failures by making the filename regexps a bit more lax.
2022-01-06x86: drop NoAVX insn attributeJan Beulich5-4537/+4537
To avoid issues like that addressed by 6e3e5c9e4181 ("x86: extend SSE check to PCLMULQDQ, AES, and GFNI insns"), base the check on opcode attributes and operand types.
2022-01-06x86: drop NoAVX from POPCNTJan Beulich2-2/+2
With the introduction of CpuPOPCNT the NoAVX attribute has become meaningless for POPCNT.
2022-01-06x86: drop some "comm" template parametersJan Beulich2-90/+90
As already indicated in a remark when introducing these templates, the "commutative" attribute is ignored for legacy encoding templates. Hence it is possible to shorten a number of templates by specifying C directly rather than through a template parameter. I think this helps readability a bit.
2022-01-06x86: templatize FMA insn templatesJan Beulich2-1016/+830
The operand ordering portion of the mnemonics repeats, causing a flurry of almost identical templates. Abstract this out.
2022-01-06x86-64: restrict PC32 -> PLT32 conversionJan Beulich2-3/+7
Neither non-64-bit code nor uses with a non-zero offset from a symbol should be converted to PLT32, as an eventual PLT entry would not express what was requested.
2022-01-06gdb: Fix copyright year in gdb/testsuite/gdb.base/inferior-clone.expLancelot SIX1-1/+1
I just realized that I forgot to update the year before pushing the patch that created this file. Since it landed after the global copyright year update have been done, this file’s copyright year is updated. This patch fixes that. Change-Id: I280f7d86e02d38425f7afdcf19a1c3500d51c23f
2022-01-06sim: ppc: migrate to standard uintXX_t typesMike Frysinger37-1343/+1332
Drop the sim-specific unsignedXX types and move to the standard uintXX_t types that C11 provides.
2022-01-06sim: common: migrate to standard uintXX_t typesMike Frysinger22-432/+425
Drop the sim-specific unsignedXX types and move to the standard uintXX_t types that C11 provides.
2022-01-06sim: igen: migrate to standard uintXX_t typesMike Frysinger6-27/+9
Move off the custom local 64-bit types and to the standard uintXX_t types that C11 provides.
2022-01-06sim: mips: migrate to standard uintXX_t typesMike Frysinger17-1083/+1083
Move off the sim-specific unsignedXX types and to the standard uintXX_t types that C11 provides.
2022-01-06sim: cris: migrate to standard uintXX_t typesMike Frysinger7-80/+80
Move off the sim-specific unsignedXX types and to the standard uintXX_t types that C11 provides.
2022-01-06sim: iq2000: migrate to standard uintXX_t typesMike Frysinger1-4/+4
Move off the sim-specific unsignedXX types and to the standard uintXX_t types that C11 provides.
2022-01-06sim: synacor: migrate to standard uintXX_t typesMike Frysinger2-27/+27
Move off the sim-specific unsignedXX types and to the standard uintXX_t types that C11 provides.
2022-01-06sim: msp430: migrate to standard uintXX_t typesMike Frysinger2-15/+15
Move off the sim-specific unsignedXX types and to the standard uintXX_t types that C11 provides.
2022-01-06sim: riscv: migrate to standard uintXX_t typesMike Frysinger1-28/+28
Move off the sim-specific unsignedXX types and to the standard uintXX_t types that C11 provides.
2022-01-06sim: bfin: migrate to standard uintXX_t typesMike Frysinger1-2/+2
Move off the sim-specific unsignedXX types and to the standard uintXX_t types that C11 provides.
2022-01-06sim: testsuite: migrate to standard uintXX_t typesMike Frysinger4-19/+19
This old code setup its own uintXX types, but since we require C11 now, we can assume the standard uintXX_t types exist and use them.
2022-01-06sim: erc32: migrate to standard uintXX_t typesMike Frysinger7-312/+305
This old port setup its own uintXX types, but since we require C11 now, we can assume the standard uintXX_t types exist and use them.
2022-01-06sim: mn10300: migrate to standard uintXX_t typesMike Frysinger11-505/+498
This old port setup its own uintXX types, but since we require C11 now, we can assume the standard uintXX_t types exist and use them.
2022-01-06sim: v850: migrate to standard uintXX_t typesMike Frysinger5-111/+105
This old port setup its own uintXX types, but since we require C11 now, we can assume the standard uintXX_t types exist and use them.
2022-01-06sim: m68hc11: migrate to standard uintXX_t typesMike Frysinger13-273/+265
This old port setup its own uintXX types, but since we require C11 now, we can assume the standard uintXX_t types exist and use them. Also migrate off the sim-specific unsignedXX types.
2022-01-06sim: d10v: migrate to standard uintXX_t typesMike Frysinger4-273/+265
This old port setup its own uintXX types, but since we require C11 now, we can assume the standard uintXX_t types exist and use them. Also migrate off the sim-specific unsignedXX types.
2022-01-06sim: cr16: migrate to standard uintXX_t typesMike Frysinger3-630/+621
This old port setup its own uintXX types, but since we require C11 now, we can assume the standard uintXX_t types exist and use them. Also migrate off the sim-specific unsignedXX types.
2022-01-06Automatic date update in version.inGDB Administrator1-1/+1
2022-01-05x86: Add elf_x86_allocate_local_got_infoH.J. Lu3-34/+30
Add elf_x86_allocate_local_got_info to allocate x86 GOT info for local symbols. * elf32-i386.c (elf_i386_check_relocs): Call elf_x86_allocate_local_got_info. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. * elfxx-x86.h (elf_x86_allocate_local_got_info): New.
2022-01-05opcodes: Make i386-dis.c thread-safeVladimir Mezentsev1-1738/+1774
Improve thread safety in print_insn_i386_att, print_insn_i386_intel and print_insn_i386 by removing the use of static variables. Tested on x86_64-pc-linux-gnu. 2022-01-04 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * i386-dis.c: Make print_insn_i386_att, print_insn_i386_intel and print_insn_i386 thread-safe
2022-01-05doc: Replace =frame-interp with =frames-interpH.J. Lu1-1/+1
The actual objdump and readelf option name is =frames-interp, not =frames-interp. PR binutils/28747 * doc/debug.options.texi: Replace =frame-interp with =frames-interp.
2022-01-05Change riscv_return_value to use RETURN_VALUE_ABI_PRESERVES_ADDRESSTom Tromey1-1/+1
Internally, AdaCore has a test that is equivalent to (really a direct translation of) gdb.base/gnu_vector.exp. On 32-bit RISC-V, the "return" part of this test fails. Joel tracked this down to riscv_return_value returning RETURN_VALUE_ABI_RETURNS_ADDRESS. Using RETURN_VALUE_ABI_PRESERVES_ADDRESS is more correct here, and fixes the bug. I tested this for both 32- and 64-bit RISC-V using the AdaCore internal test suite, and Andrew Burgess tested it using gnu_vector.exp.
2022-01-05Filtered output cleanup in expression dumpingTom Tromey1-13/+13
Most of the expression-dumping code uses filtered output, but a few functions did not. This patch cleans up these instance. Note that this won't cause any behavior change, because the only calls to dump_prefix_expression pass in gdb_stdlog. However, in the long run it's easier to audit the code if the number of uses of _unfiltered is reduced.
2022-01-05Use filtered output in terminal_info implementationsTom Tromey2-8/+8
This changes one terminal_info implementation, and default_terminal_info, to use filtered output. Other implementations of this method already use filtered output. I can't compile go32-nat.c, so this is a 'best effort' patch.
2022-01-05Use filtered output in gnu-nat.c commandsTom Tromey1-49/+53
gnu-nat.c has a number of ordinary commands that should use filtered output. In a few cases, I changed the output to use gdb_stderr as well. I can't compile this file, so this patch is split out as a "best effort".
2022-01-05Use filtered output in *-tdep commandsTom Tromey5-23/+23
Various targets introduce their own commands, which then use unfiltered output. It's better to use filtered output by default, so this patch fixes the instances I found.
2022-01-05Use filtered output in btrace-related commandsTom Tromey2-86/+86
This changes btrace.c and record-btrace.c to use filtered output in the commands implemented there.
2022-01-05Use filtered output in some dumping commandsTom Tromey5-61/+61
There are several commands that may optionally send their output to a file -- they take an optional filename argument and open a file. This patch changes these commands to use filtered output. The rationale here is that, when printing to gdb_stdout, filtering is appropriate -- it is, and should be, the default for all commands. And, when writing to a file, paging will not happen anyway (it only happens when the stream==gdb_stdout), so using the _filtered form will not change anything.
2022-01-05Use filtered output in kill commandTom Tromey1-4/+3
This changes the kill command to use filtered output. I split this one into its own patch because, out of an abundance of caution, I changed the function to call bfd_cache_close_all a bit earlier, in case pagination caused an exception.
2022-01-05Use filtered output in ordinary commandsTom Tromey18-89/+89
Many otherwise ordinary commands choose to use unfiltered output rather than filtered. I don't think there's any reason for this, so this changes many such commands to use filtered output instead. Note that complete_command is not touched due to a comment there explaining why unfiltered output is believed to be used.
2022-01-05Use filtered output in language_infoTom Tromey1-1/+1
Change language_info to use filtered output. This is ok because the sole caller uses filtered output elsewhere, and because this function calls show_language_command, which also uses filtered output.
2022-01-05Use filtered output in files_info implementationsTom Tromey5-15/+15
This changes the implementations of the target files_info method to use filtered output. This makes sense because the sole caller of this method is an ordinary command (info_program_command). This patch changes this command to use filtered output as well.