aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-08-18gdb: add linux_nat_debug_printf macroSimon Marchi2-393/+231
The debug prints inside linux-nat.c almost all have a prefix that indicate in which function they are located. This prefix is an abbreviation of the function name. For example, this print is in the `linux_nat_post_attach_wait` function: if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, "LNPAW: Attaching to a stopped process\n"); Over time, the code has changed, things were moved, and many of these prefixes are not accurate anymore. Also, unless you know the linux-nat.c file by heart, it's a bit cryptic what LLR, LNW, RSRL, etc, all mean. To address both of these issues, I suggest adding this macro for printing debug statements, which automatically includes the function name. It also includes the `[linux-nat]` prefix to clarify which part of GDB printed this (I think that, ideally, all debug prints would include such a tag). The `__func__` magic symbol is used to get the function name. Unfortunately, in the case of methods, it only contains the method name, not the class name. So we'll get "wait", where I would have liked to get "linux_nat_target::wait". But at least with the `[linux-nat]` tag in the front, it's not really ambiguous. I've made the macro automatically include the trailing newline, because it wouldn't make sense to call it twice to print two parts of one line, the `[linux-nat]` tag would be printed in the middle. An advantage of this (IMO) is that it's less verbose, we don't have to check for `if (debug_linux_nat)` everywhere. Another advantage is that it's easier to customize the output later, without having to touch all call sites. Here's an example of what it looks like in the end: [linux-nat] linux_nat_wait_1: enter [linux-nat] wait: [process -1], [TARGET_WNOHANG] gdb/ChangeLog: * linux-nat.c (linux_nat_debug_printf): New function. (linux_nat_debug_printf_1): New macro. Use throughout the file. Change-Id: Ifcea3255b91400d3ad093cd0b75d3fac241cb998
2020-08-19Automatic date update in version.inGDB Administrator1-1/+1
2020-08-19Correct vcmpsq, vcmpuq and xvtlsbb BF fieldAlan Modra6-6/+17
These shouldn't be optional. The record form of vector instructions set CR6, giving an expectation that omitting BF should be the same as specifying CR6. opcodes/ * ppc-opc.c (powerpc_opcodes): Replace OBF with BF for vcmpsq, vcmpuq and xvtlsbb. gas/ * testsuite/gas/ppc/int128.s: Correct vcmpuq. * testsuite/gas/ppc/int128.d: Update. * testsuite/gas/ppc/xvtlsbb.d: Update.
2020-08-18gdb/Makefile.in: Add DEBUGINFOD_CFLAGS, DEBUGINFOD_LIBS variables.Aaron Merey2-2/+12
Introduce Makefile variables DEBUGINFOD_CFLAGS and DEBUGINFOD_LIBS that map to the configuration variables of the same names. Replace @DEBUGINFOD_LIBS@ with $(DEBUGINFOD_LIBS) in the definition of CLIBS in order to conform to the usage of other *_LIBS variables in Makefile.in. Add DEBUGINFOD_CFLAGS to INTERNAL_CFLAGS_BASE. This fixes an issue where GDB would fail to find debuginfod.h if it was not installed in a default location searched by the compiler. gdb/ChangeLog: * Makefile.in (DEBUGINFOD_CFLAGS, DEBUGINFOD_LIBS): New variables. (INTERNAL_CFLAGS_BASE): Add DEBUGINFOD_CFLAGS. (CLIBS): Add DEBUGINFOD_LIBS.
2020-08-18Add ChangeLog entries for previous commit.Peter Bergner2-0/+10
2020-08-18PowerPC: Rename xvcvbf16sp to xvcvbf16spnPeter Bergner3-3/+3
The xvcvbf16sp mnemonic has been renamed to xvcvbf16spn, to be consistent with the other non-signaling conversion instructions which all end with "n". opcodes/ * ppc-opc.c (powerpc_opcodes) <xvcvbf16sp>: Rename from this... <xvcvbf16spn>: ...to this. gas/ * testsuite/gas/ppc/vsx4.s: Update test to use new mnemonic. * testsuite/gas/ppc/vsx4.d: Likewise.
2020-08-18Automatic date update in version.inGDB Administrator1-1/+1
2020-08-17gdb: fix IA64 build failure of linux-natSergei Trofimovich2-0/+6
On IA64 built failed as: ``` ia64-linux-nat.c:352:29: error: 'gdbarch_num_regs' was not declared in this scope 352 | if (regno < 0 || regno >= gdbarch_num_regs (gdbarch)) | ^~~~~~~~~~~~~~~~ ``` The fix includes "gdbarch.h" header where symbol is declared. * ia64-linux-nat.c: Include "gdbarch.h" to declare used 'gdbarch_num_regs'. Signed-off-by: Sergei Trofimovich <siarheit@google.com>
2020-08-17Update xfail pattern in gdb.rust/simple.expTom Tromey2-1/+8
In PR rust/26197, Tom de Vries notes that the variant part rewrite caused some regressions for the Rust compiler he has. This compiler is unusual in that it combines a relatively recent rustc with a relatively old LLVM -- so variant parts are not emitted using DWARF. Most of the bugs in that PR were already fixed by earlier patches, but some lingered. After some research we found that some of these never did work -- which is consistent with the investigations we did into the debug info -- but instead were xfail'd. This patch updates the xfails to cope with the new output. (After this, just one failure remains.) Tom de Vries tested this using his rustc and suggested a fix that appears in this version. gdb/testsuite/ChangeLog 2020-08-17 Tom de Vries <tdevries@suse.de> Tom Tromey <tromey@adacore.com> PR rust/26197: * gdb.rust/simple.exp (xfail_pattern): Update for new failure.
2020-08-17Fix MI crash with Ada string accessTom Tromey7-4/+154
I happened to notice that using -var-create at a certain spot in an Ada program caused a crash. This happens because ada_get_decoded_value can return NULL -- in particular, deeper in the code it can hit this return in ada_type_of_array: descriptor = desc_bounds (arr); if (value_as_long (descriptor) == 0) return NULL; This patch avoids the crash by handling this NULL return. gdb/ChangeLog 2020-08-17 Tom Tromey <tromey@adacore.com> * ada-varobj.c (ada_varobj_decode_var): Handle case where ada_get_decoded_value returns NULL. gdb/testsuite/ChangeLog 2020-08-17 Tom Tromey <tromey@adacore.com> * gdb.ada/mi_var_access.exp: New file. * gdb.ada/mi_var_access/mi_access.adb: New file. * gdb.ada/mi_var_access/pck.adb: New file. * gdb.ada/mi_var_access/pck.ads: New file.
2020-08-17Convert CORE_ADDR to Python using gdb_py_object_from_ulongestTom Tromey4-4/+14
An internal test failed on a riscv64-elf cross build because Inferior.search_memory returned a negative value. I tracked this down to to use of PyLong_FromLong in infpy_search_memory. Then, I looked at other conversions of CORE_ADDR to Python and fixed these as well. I don't think there is a good way to write a test for this. gdb/ChangeLog 2020-08-17 Tom Tromey <tromey@adacore.com> * python/py-inferior.c (infpy_search_memory): Use gdb_py_object_from_ulongest. * python/py-infevents.c (create_inferior_call_event_object) (create_memory_changed_event_object): Use gdb_py_object_from_ulongest. * python/py-linetable.c (ltpy_entry_get_pc): Use gdb_py_object_from_ulongest.
2020-08-17gdb: fix wrong indentation in symbol_needs_eval_contextSimon Marchi2-13/+17
gdb/ChangeLog: * loc.c (class symbol_needs_eval_context): Fix indentation. Change-Id: Ibf4e6a9ca9573b498737a61db116ee10b287b7f5
2020-08-17gdb: use bool in dwarf2_loc_desc_get_symbol_read_needsSimon Marchi2-4/+8
This variable is really a boolean, so use the bool type. gdb/ChangeLog: * dwarf2/loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use bool. Change-Id: I814a47d1200f3b88722c54c822fd49607a6b77be
2020-08-17gas: Fix internal error in S_SET_SEGMENTAlex Coplan5-1/+26
This patch fixes an internal error in GAS when defining a section using a symbol that has already been named but not defined. For a minimal reproducer, try the following input: a=b .sect a The problem is that obj_elf_change_section() happily reuses the symbol "a" created by equals() without clearing the sy_value field: prior to this patch, it just set bsym. This caused a problem when attempting to resolve the section symbol, since resolve_symbol_value() ended up resolving the symbol as if it were the original symbol created by equals(), which ends up leaving the section symbol in the undefined section instead of in section a, hence the call to abort() in S_SET_SEGMENT(). gas/ChangeLog: * config/obj-elf.c (obj_elf_change_section): When repurposing an existing symbol, ensure that we set sy_value as per other (fresh) section symbols. * testsuite/gas/elf/elf.exp: Add new test. * testsuite/gas/elf/section-symbol-redef.d: New test. * testsuite/gas/elf/section-symbol-redef.s: Input for test.
2020-08-17[gdb] Fix printing of unresolved dynamic typeTom de Vries2-7/+34
When debugging gdb in batch mode with executable mixed-lang-stack and doing a backtrace at breakpt: ... $ gdb --args gdb \ -batch \ outputs/gdb.fortran/mixed-lang-stack/mixed-lang-stack \ -ex "b breakpt" \ -ex r \ -ex bt ... and stopping at resolve_dynamic_type to print the type: ... (gdb) b resolve_dynamic_type Breakpoint 1 at 0x6b020c: file gdbtypes.c, line 2633. (gdb) commands Type commands for breakpoint(s) 1, one per line. End with a line saying just "end". >call recursive_dump_type (type, 0) >continue >end (gdb) run ... we eventually run into an assert for the dynamic type of "str": ... Thread 1 "gdb" hit Breakpoint 1, resolve_dynamic_type (type=0x22204f0, \ valaddr=..., addr=4199408) at gdbtypes.c:2633 2633 = {check_typedef (type), valaddr, addr, NULL}; type node 0x22204f0 name '<NULL>' (0x0) code 0xd (TYPE_CODE_STRING) length 0 ... nfields 0 0x22204b0 gdbtypes.h:526: internal-error: LONGEST dynamic_prop::const_val() const: \ Assertion `m_kind == PROP_CONST' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ... when trying to print the high bound of a TYPE_CODE_RANGE, which has m_kind PROP_LOCEXPR, while the code in resolve_dynamic_type assumes PROP_CONST. Fix this by extending the printing of TYPE_CODE_RANGE to allow PROP_LOCEXPR/PROP_LOCLIST as well, such that we have instead: ... nfields 0 0x1fbc020 low 1 high (dynamic) ... Tested on x86_64-linux. gdb/ChangeLog: 2020-08-17 Tom de Vries <tdevries@suse.de> PR gdb/26393 * gdbtypes.c (dump_dynamic_prop): New function. (recursive_dump_type): Use dump_dynamic_prop for TYPE_CODE_RANGE.
2020-08-17Automatic date update in version.inGDB Administrator1-1/+1
2020-08-16PowerPC64 inline PLT call testsAlan Modra11-0/+173
* testsuite/ld-powerpc/inline.s, * testsuite/ld-powerpc/inline-1.d, * testsuite/ld-powerpc/inline-2.d, * testsuite/ld-powerpc/inline-3.d, * testsuite/ld-powerpc/inline-4.d, * testsuite/ld-powerpc/inlinepcrel.s, * testsuite/ld-powerpc/inlinepcrel-1.d, * testsuite/ld-powerpc/inlinepcrel-2.d, * testsuite/ld-powerpc/inlinepcrel-3.d: New tests. * testsuite/ld-powerpc/powerpc.exp: Run them.
2020-08-16ld: Add a PR binutils/26389 testH.J. Lu4-0/+15
PR binutils/26389 * testsuite/ld-plugin/lto.exp: Run PR binutils/26389 test. * testsuite/ld-plugin/pr26389.c: New file. * testsuite/ld-plugin/pr26389.d: Likewise.
2020-08-16[gdb/testsuite] Add gdb.base/eh_return.expTom de Vries3-0/+151
In PR25350, an internal error was reported: ... (gdb) break *eh2+0x7e Breakpoint 1 at 0x13e2: file small.c, line 38. (gdb) run Starting program: a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Breakpoint 1, 0x00005555555553e2 in eh2 ( frame.c:558: internal-error: frame_id get_frame_id(frame_info*): \ Assertion `stashed' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ... The internal error does not reproduce after recent commit 547ce8f00b "[gdb/backtrace] Fix printing of fortran string args". Add the corresponding test-case as regression test, given that the code is rather atypical. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-08-16 Tom de Vries <tdevries@suse.de> PR gdb/25350 * gdb.base/eh_return.c: New test. * gdb.base/eh_return.exp: New file.
2020-08-16Automatic date update in version.inGDB Administrator1-1/+1
2020-08-15[gdb/testsuite] Fix charlen type in mixed-lang-stack.cTom de Vries2-1/+14
In gdb.fortran/mixed-lang-stack.f90, we have fortran function mixed_func_1d: ... subroutine mixed_func_1d(a, b, c, d, str) use, intrinsic :: iso_c_binding, only: c_int, c_float, c_double use, intrinsic :: iso_c_binding, only: c_float_complex implicit none integer(c_int) :: a real(c_float) :: b real(c_double) :: c complex(c_float_complex) :: d character(len=*) :: str ... which we declare in C in gdb.fortran/mixed-lang-stack.c like this: ... extern void mixed_func_1d_ (int *, float *, double *, complex float *, char *, size_t); ... The fortran string parameter str is passed as a char *, and an additional argument str_ for the string length. The type used for the string length argument is size_t, but for gcc 7 and earlier, the actual type is int instead ( see https://gcc.gnu.org/onlinedocs/gfortran/Argument-passing-conventions.html ). Fix this by declaring the string length type depending on the gcc version: ... #if !defined (__GNUC__) || __GNUC__ > 7 typedef size_t fortran_charlen_t; #else typedef int fortran_charlen_t; ... Tested on x86_64-linux, with gcc-7 and gcc-8. gdb/testsuite/ChangeLog: 2020-08-15 Tom de Vries <tdevries@suse.de> * gdb.fortran/mixed-lang-stack.c (fortran_charlen_t): New type. (mixed_func_1d_): Use fortran_charlen_t in decl.
2020-08-15[gdb/backtrace] Fix printing of fortran string argsTom de Vries4-13/+35
When running test-case gdb.fortran/mixed-lang-stack.exp, it passes, but we find in gdb.log: ... (gdb) bt^M ... #7 0x000000000040113c in mixed_func_1b (a=1, b=2, c=3, d=(4,5), \ e=<error reading variable: value requires 140737488341744 bytes, which \ is more than max-value-size>, g=..., _e=6) at mixed-lang-stack.f90:87^M ... while a bit later in gdb.log, we have instead for the same frame (after adding a gdb_test_no_output "set print frame-arguments all" to prevent getting "e=..."): ... (gdb) up^M #7 0x000000000040113c in mixed_func_1b (a=1, b=2, c=3, d=(4,5), \ e='abcdef', g=( a = 1.5, b = 2.5 ), _e=6) at mixed-lang-stack.f90:87^M ... The difference is that in the latter case, we print the frame while it's selected, while in the former, it's not. The problem is that while trying to resolve the dynamic type of e in resolve_dynamic_type, we call dwarf2_evaluate_property with a frame == NULL argument, and then use the selected frame as the context in which to evaluate the dwarf property, effectively evaluating a DW_OP_fbreg operation in the wrong frame context. Fix this by temporarily selecting the frame of which we're trying to print the arguments in print_frame_args, borrowing code from print_frame_local_vars that was added to fix a similar issue in commit 16c3b12f19 "error/internal-error printing local variable during "bt full". Build and tested on x86_64-linux. gdb/ChangeLog: 2020-08-15 Tom de Vries <tdevries@suse.de> PR backtrace/26390 * stack.c (print_frame_args): Temporarily set the selected frame to FRAME while printing the frame's arguments. gdb/testsuite/ChangeLog: 2020-08-15 Tom de Vries <tdevries@suse.de> PR backtrace/26390 * gdb.fortran/mixed-lang-stack.exp: Call bt with -frame-arguments all. Update expected pattern.
2020-08-15Set SEC_SMALL_DATA on small commonAlan Modra15-14/+37
Unlike the previous patch setting SEC_SMALL_DATA during elf_backend_symbol_processing, this patch is mostly cosmetic. * elf32-frv.c (elf32_frv_add_symbol_hook): Set SEC_SMALL_DATA on small common section. * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise. * elf32-microblaze.c (microblaze_elf_add_symbol_hook): Likewise. * elf32-nds32.c (nds32_elf_add_symbol_hook): Likewise. * elf32-nios2.c (nios2_elf_add_symbol_hook): Likewise. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-score.c (s3_bfd_score_elf_add_symbol_hook): Likewise. * elf32-score7.c (s7_bfd_score_elf_add_symbol_hook): Likewise. * elf32-tic6x.c (elf32_tic6x_add_symbol_hook): Likewise. * elf32-v850.c (v850_elf_check_relocs): Likewise. (v850_elf_add_symbol_hook): Likewise. * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise. * elf64-ia64-vms.c (elf64_ia64_add_symbol_hook): Likewise. * elfnn-ia64.c (elfNN_ia64_add_symbol_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
2020-08-15PR26389, nm prints "c" for a common symbol with -flto and -fcommonAlan Modra9-13/+28
git commit 49d9fd42acef chose to make nm print 'C' for the normal common section, and 'c' for other commons. This was an attempt to make common symbols in .scommon and other small common sections show a 'c' type without a section name comparison, but it failed for nm --plugin on lto objects where normal common symbols are stashed in a "plug" section. It's also wrong for large common symbols. So instead set SEC_SMALL_DATA on sections created for small commons, and key off that flag to show 'c' type. If your ELF target doesn't have an elf_backend_symbol_processing function, then you won't see 'c' for symbols in .scommon. Note that due to bfd_decode_symclass decoding common symbols without a chance for coff_section_type to treat .scommon specially, then having .scommon in the array of special sections handled by coff_section_type prior to 49d9fd42acef was entirely ineffective. That fact escaped me when writing 49d9fd42acef. Unless .scommon didn't have SEC_IS_COMMON set, which would be a little weird. PR 26389 * syms.c (bfd_decode_symclass): Choose 'c' for commons only when SEC_SMALL_DATA. * elf32-m32r.c (_bfd_m32r_elf_symbol_processing): Set SEC_SMALL_DATA on small common section. * elf32-score.c (s3_bfd_score_elf_symbol_processing): Likewise. * elf32-score7.c (s7_bfd_score_elf_symbol_processing): Likewise. * elf32-tic6x.c (elf32_tic6x_symbol_processing): Likewise. * elf32-v850.c (v850_elf_symbol_processing): Likewise. * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Likewise. * ecoff.c (ecoff_set_symbol_info, ecoff_link_add_externals): Likewise.
2020-08-15Automatic date update in version.inGDB Administrator1-1/+1
2020-08-14[PowerPC] Always clear watchpoint with PTRACE_SET_DEBUGREGPedro Franco de Carvalho2-9/+18
This patches changes low_prepare_to_resume in the ppc linux native target to always clear the watchpoint when the old PTRACE_SET_DEBUGREG interface is used, even if another watchpoint GDB requested to the target is written right after using the same call. The reason for this is that there were some older kernel versions for which overwriting a watchpoint with PTRACE_SET_DEBUGREG would not re-activate the watchpoint if it was previouly disabled following a hit. This happened when the kernel was configured with CONFIG_HW_BREAKPOINT on and uses perf events to install watchpoints. Previously, the ppc linux native target would immediately remove or insert watchpoints following a request from the upper layers. This was changed in commit 227c0bf4b3dd0cf65dceb58e729e9da81b38b5a7 to fix other issues, which caused watchpoint requests to be applied to the inferior only in low_prepare_to_resume, right before the inferior is resumed. Usually, but maybe not always, after a hit, GDB will remove the watchpoint, resume the inferior for a single-step, possibly report the watchpoint hit to the user, and then re-insert the watchpoint before the inferior is next resumed. In this case there would be no problems, but since I can't guarantee that there aren't other paths in GDB that allow the user to set a new watchpoint after the first one hit, and after its deletion by GDB, but before the inferior is resumed, there is a chance that PTRACE_SET_DEBUGREG could be called directly without the watchpoint first having been cleared, which could cause a false negative with the older kernel versions. This issue would affect kernel versions starting from this commit: 5aae8a53708025d4e718f0d2e7c2f766779ddc71 Up to the fix in this commit: a53fd61ac2f411745471c1c877d5e072fbbf0e5c gdb/ChangeLog: PR breakpoints/26385 * ppc-linux-nat.c (ppc_linux_nat_target::low_prepare_to_resume): Always clear watchpoint with PTRACE_SET_DEBUGREG.
2020-08-14[PowerPC] Use < 0 and >= 0 for watchpoint ptrace callsPedro Franco de Carvalho2-4/+10
In commit 227c0bf4b3dd0cf65dceb58e729e9da81b38b5a7, which fixed some watchpoint bugs, I compared the return value of some ptrace calls with == -1 and != -1. Althought this should be correct, since the rest of the file uses < 0 and >= 0, I have modified this for consistency. gdb/ChangeLog: * ppc-linux-nat.c (ppc_linux_dreg_interface::detect) (ppc_linux_nat_target::low_prepare_to_resume): Use ptrace () < 0 and >= to check return value instead of == -1 and != -1.
2020-08-14gdb: add gdb_argv::as_array_view methodSimon Marchi4-1/+42
Introduce the gdb_argv::as_array_view method, as a way to easily pass the parsed arguments array to a function taking an array view. There is currently one caller where we can use this (which prompted the suggestion to implement this method). Add some selftests for the new method, which at the same time test a little bit gdb_argv. As far as I know, it's not tested currently. gdb/ChangeLog: * utils.h (class gdb_argv) <as_array_view>: New method. * utils.c (gdb_argv_as_array_view_test): New. (_initialize_utils): Register selftest. * maint.c (maintenance_selftest): Use the new method. Change-Id: I0645037613ed6549aabe60f14a36f3494513b177
2020-08-14Allow larger bfd_default_hash_table_sizeAlan Modra2-13/+18
* hash.c (bfd_hash_set_default_size): Use higher_prime_number rather than another copy of primes. Increase maximum default size allowed.
2020-08-14PR26388, objdump debug dump memory leaksAlan Modra3-13/+21
num_debug_info_entries is used not just as a count but also as a flag (DEBUG_INFO_UNAVAILABLE) after some errors. That means num_debug_info_entries can't be used when cleaning up malloc'd info. PR 26388 * dwarf.c (free_debug_memory): Free alloc_num_debug_info_entries of debug_information. Correct test of max_loc_offsets and max_range_lists. * rddbg.c (read_debugging_info): Free dhandle on error.
2020-08-14Readelf demangling test typoAlan Modra2-3/+6
Using floating point data results in cris failing the test. * testsuite/binutils-all/mangled.s: Use dc.a rather than dc.d.
2020-08-14AArch64: Relax thumb-plt testcases regexpr.Tamar Christina3-4/+9
The regexpr in these two files are a bit strict in that they don't account for the slight changes in tags in certain arm targets which cause our address offsets to change. This changes the tests to allow slight movement in locations while still strictly checking the rest. ld/ChangeLog: 2020-08-03 Tamar Christina <tamar.christina@arm.com> * testsuite/ld-arm/thumb-plt-got.d: Relax regexpr. * testsuite/ld-arm/thumb-plt.d: Likewise.
2020-08-14Automatic date update in version.inGDB Administrator1-1/+1
2020-08-14gdb: Implement native dumpcore function for NetBSDKamil Rytarowski2-0/+22
Define supports_dumpcore and dumpcore for NetBSD, that wraps the ptrace(2) call with the PT_DUMPCORE operation. gdb/ChangeLog: * nbsd-nat.h (nbsd_nat_target::supports_dumpcore) (nbsd_nat_target::dumpcore): New declarations. * nbsd-nat.c (nbsd_nat_target::supports_dumpcore) (nbsd_nat_target::dumpcore): New functions.
2020-08-14gdb: Implement native dumpcore functionKamil Rytarowski4-8/+91
Add new API for systems with native kernel support for dumping a process on demand. Wire it into the gdb's gcore functionality. gdb/ChangeLog: * target.h (supports_dumpcore, dumpcore): New function declarations. * target.c (supports_dumpcore, dumpcore): New functions. * target-delegates.c: Rebuild. * gcore.c (gcore_command): Use target_supports_dumpcore () and target_dumpcore ().
2020-08-13debuginfod-support.c: Replace globals with user_dataAaron Merey2-16/+26
Store query information in user_data struct instead of global variables. gdb/ChangeLog: * debuginfod-support.c: Replace global variables with user_data.
2020-08-13Add skip_fortran_tests to more Fortran testcasesPedro Alves18-1/+56
This adds missing skip_fortran_tests checks to Fortran testcases, using the exact same pattern the existing files that do check it use. gdb/testsuite/ChangeLog: * gdb.fortran/complex.exp: Check skip_fortran_tests. * gdb.fortran/library-module.exp: Likewise. * gdb.fortran/logical.exp: Likewise. * gdb.fortran/module.exp: Likewise. * gdb.fortran/print_type.exp: Likewise. * gdb.fortran/vla-alloc-assoc.exp: Likewise. * gdb.fortran/vla-datatypes.exp: Likewise. * gdb.fortran/vla-history.exp: Likewise. * gdb.fortran/vla-ptr-info.exp: Likewise. * gdb.fortran/vla-ptype-sub.exp: Likewise. * gdb.fortran/vla-ptype.exp: Likewise. * gdb.fortran/vla-sizeof.exp: Likewise. * gdb.fortran/vla-type.exp: Likewise. * gdb.fortran/vla-value-sub-arbitrary.exp: Likewise. * gdb.fortran/vla-value-sub-finish.exp: Likewise. * gdb.fortran/vla-value-sub.exp: Likewise. * gdb.fortran/vla-value.exp: Likewise.
2020-08-13Add skip_ada_tests to more Ada testcasesPedro Alves145-1/+436
This adds missing skip_ada_tests checks to Ada testcases, using the exact same pattern the existing files that do check it use. gdb/testsuite/ChangeLog: * gdb.ada/access_tagged_param.exp: Check skip_ada_tests. * gdb.ada/access_to_packed_array.exp: Likewise. * gdb.ada/access_to_unbounded_array.exp: Likewise. * gdb.ada/addr_arith.exp: Likewise. * gdb.ada/arr_acc_idx_w_gap.exp: Likewise. * gdb.ada/arr_arr.exp: Likewise. * gdb.ada/arr_enum_idx_w_gap.exp: Likewise. * gdb.ada/array_bounds.exp: Likewise. * gdb.ada/array_of_variable_length.exp: Likewise. * gdb.ada/array_ptr_renaming.exp: Likewise. * gdb.ada/array_subscript_addr.exp: Likewise. * gdb.ada/arraydim.exp: Likewise. * gdb.ada/arrayparam.exp: Likewise. * gdb.ada/arrayptr.exp: Likewise. * gdb.ada/assign_1.exp: Likewise. * gdb.ada/assign_arr.exp: Likewise. * gdb.ada/atomic_enum.exp: Likewise. * gdb.ada/attr_ref_and_charlit.exp: Likewise. * gdb.ada/bad-task-bp-keyword.exp: Likewise. * gdb.ada/bias.exp: Likewise. * gdb.ada/boolean_expr.exp: Likewise. * gdb.ada/bp_c_mixed_case.exp: Likewise. * gdb.ada/bp_enum_homonym.exp: Likewise. * gdb.ada/bp_inlined_func.exp: Likewise. * gdb.ada/bp_on_var.exp: Likewise. * gdb.ada/bp_range_type.exp: Likewise. * gdb.ada/bp_reset.exp: Likewise. * gdb.ada/call_pn.exp: Likewise. * gdb.ada/catch_assert_if.exp: Likewise. * gdb.ada/catch_ex.exp: Likewise. * gdb.ada/catch_ex_std.exp: Likewise. * gdb.ada/char_enum.exp: Likewise. * gdb.ada/char_param.exp: Likewise. * gdb.ada/complete.exp: Likewise. * gdb.ada/cond_lang.exp: Likewise. * gdb.ada/convvar_comp.exp: Likewise. * gdb.ada/dgopt.exp: Likewise. * gdb.ada/disc_arr_bound.exp: Likewise. * gdb.ada/display_nested.exp: Likewise. * gdb.ada/dot_all.exp: Likewise. * gdb.ada/dyn_loc.exp: Likewise. * gdb.ada/dyn_stride.exp: Likewise. * gdb.ada/excep_handle.exp: Likewise. * gdb.ada/expr_delims.exp: Likewise. * gdb.ada/expr_with_funcall.exp: Likewise. * gdb.ada/exprs.exp: Likewise. * gdb.ada/fin_fun_out.exp: Likewise. * gdb.ada/fixed_cmp.exp: Likewise. * gdb.ada/formatted_ref.exp: Likewise. * gdb.ada/frame_arg_lang.exp: Likewise. * gdb.ada/frame_args.exp: Likewise. * gdb.ada/fullname_bp.exp: Likewise. * gdb.ada/fun_addr.exp: Likewise. * gdb.ada/fun_in_declare.exp: Likewise. * gdb.ada/fun_overload_menu.exp: Likewise. * gdb.ada/fun_renaming.exp: Likewise. * gdb.ada/funcall_char.exp: Likewise. * gdb.ada/funcall_param.exp: Likewise. * gdb.ada/funcall_ptr.exp: Likewise. * gdb.ada/funcall_ref.exp: Likewise. * gdb.ada/homonym.exp: Likewise. * gdb.ada/info_addr_mixed_case.exp: Likewise. * gdb.ada/info_auto_lang.exp: Likewise. * gdb.ada/info_exc.exp: Likewise. * gdb.ada/info_types.exp: Likewise. * gdb.ada/int_deref.exp: Likewise. * gdb.ada/interface.exp: Likewise. * gdb.ada/iwide.exp: Likewise. * gdb.ada/lang_switch.exp: Likewise. * gdb.ada/length_cond.exp: Likewise. * gdb.ada/maint_with_ada.exp: Likewise. * gdb.ada/mi_catch_assert.exp: Likewise. * gdb.ada/mi_catch_ex.exp: Likewise. * gdb.ada/mi_catch_ex_hand.exp: Likewise. * gdb.ada/mi_dyn_arr.exp: Likewise. * gdb.ada/mi_ex_cond.exp: Likewise. * gdb.ada/mi_exc_info.exp: Likewise. * gdb.ada/mi_interface.exp: Likewise. * gdb.ada/mi_prot.exp: Likewise. * gdb.ada/mi_ref_changeable.exp: Likewise. * gdb.ada/mi_string_access.exp: Likewise. * gdb.ada/mi_task_arg.exp: Likewise. * gdb.ada/mi_task_info.exp: Likewise. * gdb.ada/mi_var_array.exp: Likewise. * gdb.ada/mi_var_union.exp: Likewise. * gdb.ada/mi_variant.exp: Likewise. * gdb.ada/minsyms.exp: Likewise. * gdb.ada/mod_from_name.exp: Likewise. * gdb.ada/nested.exp: Likewise. * gdb.ada/null_array.exp: Likewise. * gdb.ada/optim_drec.exp: Likewise. * gdb.ada/out_of_line_in_inlined.exp: Likewise. * gdb.ada/packed_array_assign.exp: Likewise. * gdb.ada/packed_tagged.exp: Likewise. * gdb.ada/pp-rec-component.exp: Likewise. * gdb.ada/print_chars.exp: Likewise. * gdb.ada/print_pc.exp: Likewise. * gdb.ada/ptr_typedef.exp: Likewise. * gdb.ada/ptype_arith_binop.exp: Likewise. * gdb.ada/ptype_array.exp: Likewise. * gdb.ada/ptype_field.exp: Likewise. * gdb.ada/ptype_tagged_param.exp: Likewise. * gdb.ada/ptype_union.exp: Likewise. * gdb.ada/py_range.exp: Likewise. * gdb.ada/py_taft.exp: Likewise. * gdb.ada/rdv_wait.exp: Likewise. * gdb.ada/rec_comp.exp: Likewise. * gdb.ada/rec_return.exp: Likewise. * gdb.ada/ref_param.exp: Likewise. * gdb.ada/ref_tick_size.exp: Likewise. * gdb.ada/rename_subscript_param.exp: Likewise. * gdb.ada/repeat_dyn.exp: Likewise. * gdb.ada/same_component_name.exp: Likewise. * gdb.ada/same_enum.exp: Likewise. * gdb.ada/scalar_storage.exp: Likewise. * gdb.ada/set_wstr.exp: Likewise. * gdb.ada/small_reg_param.exp: Likewise. * gdb.ada/str_binop_equal.exp: Likewise. * gdb.ada/str_ref_cmp.exp: Likewise. * gdb.ada/str_uninit.exp: Likewise. * gdb.ada/sub_variant.exp: Likewise. * gdb.ada/sym_print_name.exp: Likewise. * gdb.ada/taft_type.exp: Likewise. * gdb.ada/tagged.exp: Likewise. * gdb.ada/tagged_access.exp: Likewise. * gdb.ada/task_bp.exp: Likewise. * gdb.ada/task_switch_in_core.exp: Likewise. * gdb.ada/tasks.exp: Likewise. * gdb.ada/tick_last_segv.exp: Likewise. * gdb.ada/tick_length_array_enum_idx.exp: Likewise. * gdb.ada/type_coercion.exp: Likewise. * gdb.ada/unc_arr_ptr_in_var_rec.exp: Likewise. * gdb.ada/unchecked_union.exp: Likewise. * gdb.ada/uninitialized_vars.exp: Likewise. * gdb.ada/var_arr_attrs.exp: Likewise. * gdb.ada/var_arr_typedef.exp: Likewise. * gdb.ada/var_rec_arr.exp: Likewise. * gdb.ada/variant-record.exp: Likewise. * gdb.ada/variant.exp: Likewise. * gdb.ada/variant_record_packed_array.exp: Likewise. * gdb.ada/varsize_limit.exp: Likewise. * gdb.ada/whatis_array_val.exp: Likewise. * gdb.ada/widewide.exp: Likewise. * gdb.ada/win_fu_syms.exp: Likewise.
2020-08-13[ARM, sim] Fix build failure with -Werror (PR26365)Luis Machado2-12/+38
There is a bit of a situation in the ARM sim with regards to the handling of argv. sim_open () gets a const char **argv, but ARM's sim_open gets clever and decides to modify argv in place via sim_target_parse_command_line. I'm not sure why. In any case, here's a fix that makes the code modify a copy of argv instead. sim/arm/ChangeLog: 2020-08-13 Luis Machado <luis.machado@linaro.org> PR sim/26365 * wrapper.c (sim_target_parse_command_line): Free discarded argv entries. (sim_open): Use a duplicate of argv instead of the original argv.
2020-08-13gdb: allow specifying multiple filters when running selftestsSimon Marchi7-10/+48
I found myself wanting to run a few specific selftests while developing. I thought it would be nice to be able to provide multiple test names when running `maintenant selftests`. The arguments to that command is currently interpreted as a single filter (not split by spaces), it now becomes a list a filters, split by spaces. A test is executed when it matches at least one filter. Here's an example of the result in GDB: (gdb) maintenance selftest xml Running selftest xml_escape_text. Running selftest xml_escape_text_append. Ran 2 unit tests, 0 failed (gdb) maintenance selftest xml unord Running selftest unordered_remove. Running selftest xml_escape_text. Running selftest xml_escape_text_append. Ran 3 unit tests, 0 failed (gdb) maintenance selftest xml unord foobar Running selftest unordered_remove. Running selftest xml_escape_text. Running selftest xml_escape_text_append. Ran 3 unit tests, 0 failed Since the selftest machinery is also shared with gdbserver, I also adapted gdbserver. It accepts a `--selftest` switch, which accepts an optional filter argument. I made it so you can now pass `--selftest` multiple time to add filters. It's not so useful right now though: there's only a single selftest right now in GDB and it's for an architecture I can't compile. So I tested by adding dummy tests, here's an example of the result: $ ./gdbserver --selftest=foo Running selftest foo. foo Running selftest foobar. foobar Ran 2 unit tests, 0 failed $ ./gdbserver --selftest=foo --selftest=bar Running selftest bar. bar Running selftest foo. foo Running selftest foobar. foobar Ran 3 unit tests, 0 failed gdbsupport/ChangeLog: * selftest.h (run_tests): Change parameter to array_view. * selftest.c (run_tests): Change parameter to array_view and use it. gdb/ChangeLog: * maint.c (maintenance_selftest): Split args and pass array_view to run_tests. gdbserver/ChangeLog: * server.cc (captured_main): Accept multiple `--selftest=` options. Pass all `--selftest=` arguments to run_tests. Change-Id: I422bd49f08ea8095ae174c5d66a2dd502a59613a
2020-08-13Fix an internal compiler error when attempting to create a second ↵Nick Clifton2-1/+11
$GDB_DEBUG$ section. PR 26359 * config/obj-som.c (obj_som_init_stab_section): Do nothing if the $GDB_DEBUG$ section has already been created.
2020-08-13Obsolete ia64Alan Modra2-1/+2
* config.bfd: Obsolete ia64*-*-*.
2020-08-13Obsolete arm-symbianelfAlan Modra2-0/+5
* config.bfd: Obsolete arm*-*-symbianelf*.
2020-08-13Automatic date update in version.inGDB Administrator1-1/+1
2020-08-13PowerPC64 --no-pcrel-optimizeAlan Modra5-59/+86
This new option effectively ignores R_PPC64_PCREL_OPT, disabling the optimization of instructions marked by that relocation. The patch also disables GOT indirect to GOT/TOC pointer relative code editing when --no-toc-optimize. bfd/ * elf64-ppc.h (struct ppc64_elf_params): Add no_pcrel_opt. * elf64-ppc.c (ppc64_elf_relocate_section): Disable GOT reloc optimizations when --no-toc-optimize. Disable R_PPC64_PCREL_OPT optimization when --no-pcrel-optimize. ld/ * emultempl/ppc64elf.em (params): Init new field. (enum ppc64_opt): Add OPTION_NO_PCREL_OPT. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS), (PARSE_AND_LIST_ARGS_CASES): Support --no-pcrel-optimize.
2020-08-13PR26348, Malloc error in write_zerosAlan Modra6-6/+50
This adds a few more sanity checks on ELF objects, and a BFD flag to disable objcopy and strip when fuzzed input files belong in the "too hard" basket. bfd/ PR 26348 * bfd.c (struct bfd): Add read_only. * elfcode.h (elf_swap_shdr_in): Test both sh_offset and sh_size. Set read_only on warning. (elf_object_p): Sanity check program header alignment. Set read_only on warning. * bfd-in2.h: Regenerate. binutils/ PR 26348 * objcopy.c (copy_object): Report file name with endian error. Error and return on abfd->read_only.
2020-08-12Fix malloc allocation size sanity checkLuis Machado2-5/+11
During debugging of PR26362, it was noticed that the malloc size check in check_type_length_before_alloc wasn't detecting an allocation attempt of a huge amount of bytes, making GDB run into an internal error. This happens because we're using an int to store a type's length. When the type length is large enough, the int will overflow and the max_value_size check won't work anymore. The following patch fixes this by making the length variable a ULONGEST. Printing statements were also updated to show the correct number of bytes. gdb/ChangeLog: 2020-08-12 Luis Machado <luis.machado@linaro.org> * value.c (check_type_length_before_alloc): Use ULONGEST to store a type's length. Use %s and pulongest to print the length.
2020-08-12Move multi-target NEWS entry to GDB 10 featuresPedro Alves2-15/+20
Simon noticed that I managed to put this in the "Changes in GDB 9" section by mistake instead of in the "Changes since GDB 9" section where it belongs. gdb/ChangeLog: * NEWS: Move "Multi-target debugging support" item to the "Changes since GDB 9" section.
2020-08-12gdb.base/corefile.exp regression for unix/-m32 on x86_64 (PR 26336)Pedro Alves2-0/+12
gdb.base/corefile.exp is showing an unexpected failure and an unresolved testcase when testing against unix/-m32: (gdb) PASS: gdb.base/corefile.exp: attach: sanity check we see the core file attach 15741 gdb/dwarf2-frame.c:1009: internal-error: dwarf2_frame_cache* dwarf2_frame_cache(frame_info*, void**): Assertion `fde != NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) FAIL: gdb.base/corefile.exp: attach: with core (GDB internal error) Resyncing due to internal error. This regressed with: From 5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2 Mon Sep 17 00:00:00 2001 From: Pedro Alves <palves@redhat.com> Date: Fri, 10 Jan 2020 20:06:08 +0000 Subject: [PATCH] Multi-target support The assertion is here: #0 internal_error (file=0xbffffccb0 <error: Cannot access memory at address 0xbffffccb0>, line=0, fmt=0x555556327320 "en_US.UTF-8") at sr c/gdbsupport/errors.cc:51 #1 0x00005555557d4e45 in dwarf2_frame_cache (this_frame=0x55555672f950, this_cache=0x55555672f968) at src/gdb/dwarf2/frame.c:1013 #2 0x00005555557d5886 in dwarf2_frame_this_id (this_frame=0x55555672f950, this_cache=0x55555672f968, this_id=0x55555672f9b0) at src/gdb/d warf2/frame.c:1226 #3 0x00005555558b184e in compute_frame_id (fi=0x55555672f950) at src/gdb/frame.c:558 #4 0x00005555558b19b2 in get_frame_id (fi=0x55555672f950) at src/gdb/frame.c:588 #5 0x0000555555bda338 in scoped_restore_current_thread::scoped_restore_current_thread (this=0x7fffffffd0d8) at src/gdb/thread.c:1458 #6 0x00005555556ce41f in scoped_restore_current_pspace_and_thread::scoped_restore_current_pspace_and_thread (During symbol reading: .debug_line address at offset 0x1db2d3 is 0 [in module /home/pedro/gdb/cascais-builds/binutils-gdb/gdb/gdb] this=0x7fffffffd0d0) at src/gdb/progspace-and-thread.h:29 #7 0x0000555555898ea6 in remove_target_sections (owner=0x555556935550) at src/gdb/exec.c:798 #8 0x0000555555b700b6 in symfile_free_objfile (objfile=0x555556935550) at src/gdb/symfile.c:3742 #9 0x000055555565050e in std::_Function_handler<void (objfile*), void (*)(objfile*)>::_M_invoke(std::_Any_data const&, objfile*&&) (__functor=..., __args#0=@0x7fffffffd190 : 0x555556935550) at /usr/include/c++/9/bits/std_function.h:300 #10 0x0000555555a3053d in std::function<void (objfile*)>::operator()(objfile*) const (this=0x555556752a20, __args#0=0x555556935550) at /usr/include/c++/9/bits/std_function. h:688 #11 0x0000555555a2ff01 in gdb::observers::observable<objfile*>::notify (this=0x5555562eaa80 <gdb::observers::free_objfile>, args#0=0x555556935550) at /net/cascais.nfs/gdb/b inutils-gdb/src/gdb/../gdbsupport/observable.h:106 #12 0x0000555555a2c56a in objfile::~objfile (this=0x555556935550, __in_chrg=<optimized out>) at src/gdb/objfiles.c:521 #13 0x0000555555a31d46 in std::_Sp_counted_ptr<objfile*, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x555556c1f6f0) at /usr/include/c++/9/bits/shared_ptr_base.h:377 #14 0x00005555556d3444 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x555556c1f6f0) at /usr/include/c++/9/bits/shared_ptr_base.h:155 #15 0x00005555556cec77 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x555556b99ee8, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:730 #16 0x0000555555a2f8da in std::__shared_ptr<objfile, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x555556b99ee0, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169 #17 0x0000555555a2f8fa in std::shared_ptr<objfile>::~shared_ptr (this=0x555556b99ee0, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr.h:103 #18 0x0000555555a63fba in __gnu_cxx::new_allocator<std::_List_node<std::shared_ptr<objfile> > >::destroy<std::shared_ptr<objfile> > (this=0x55555679f0c0, __p=0x555556b99ee0) at /usr/include/c++/9/ext/new_allocator.h:153 #19 0x0000555555a638fb in std::allocator_traits<std::allocator<std::_List_node<std::shared_ptr<objfile> > > >::destroy<std::shared_ptr<objfile> > (__a=..., __p=0x555556b99ee0) at /usr/include/c++/9/bits/alloc_traits.h:497 #20 0x0000555555a6351c in std::__cxx11::list<std::shared_ptr<objfile>, std::allocator<std::shared_ptr<objfile> > >::_M_erase (this=0x55555679f0c0, __position=std::shared_ptr<objfile> (expired, weak count 1) = {get() = 0x555556935550}) at /usr/include/c++/9/bits/stl_list.h:1921 #21 0x0000555555a62dab in std::__cxx11::list<std::shared_ptr<objfile>, std::allocator<std::shared_ptr<objfile> > >::erase (this=0x55555679f0c0, __position=std::shared_ptr<objfile> (expired, weak count 1) = {get() = 0x555556935550}) at /usr/include/c++/9/bits/list.tcc:158 #22 0x0000555555a614dd in program_space::remove_objfile (this=0x55555679f080, objfile=0x555556935550) at src/gdb/progspace.c:207 #23 0x0000555555a2c4dc in objfile::unlink (this=0x555556935550) at src/gdb/objfiles.c:497 #24 0x0000555555a2da65 in objfile_purge_solibs () at src/gdb/objfiles.c:904 #25 0x0000555555b3af74 in no_shared_libraries (ignored=0x0, from_tty=1) at src/gdb/solib.c:1236 #26 0x0000555555bbafc7 in target_pre_inferior (from_tty=1) at src/gdb/target.c:1900 #27 0x0000555555940afb in attach_command (args=0x5555563277c7 "15741", from_tty=1) at src/gdb/infcmd.c:2582 ... The problem is that the multi-target commit added a scoped_restore_current_thread to remove_target_sections (frame #7 above). scoped_restore_current_thread's ctor fetches the selected frame's frame id. If the frame had not had its frame id computed yet, it is computed then (frame #4 above). Because it has been determined earlier that the frame's unwinder is the DWARF unwinder, we end up here: static struct dwarf2_frame_cache * dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache) { ... /* Find the correct FDE. */ fde = dwarf2_frame_find_fde (&pc1, &cache->per_objfile); gdb_assert (fde != NULL); And, that assertion fails. The assertion is reasonable, because the DWARF unwinder only claims the frame if it managed to find the FDE earlier (in dwarf2_frame_sniffer). (unix/-m32 is thus really a red herring here -- it's just that on x86_64 -m64, the frame is not claimed by the DWARF unwinder.) The reason the assertion is failing, is because the objfile that contains the FDE has been removed from the objfiles list already when we get here (frame #22 above). This suggests that the fix should be to invalidate DWARF frames when their objfile is removed. Or to keep it simple and safe, invalidate the frame cache when an objfile is removed. That is what this commit does. OOC, I checked why is it that when you unload a file with plain "(gdb) file", we don't hit the assertion. It must be because we're already flushing the frame cache somewhere else in that case. And indeed, we flush the frame cache here: (gdb) bt #0 reinit_frame_cache () at src/gdb/frame.c:1857 #1 0x0000555555ad1ad6 in registers_changed_ptid (target=0x0, ptid=...) at src/gdb/regcache.c:470 #2 0x0000555555ad1b58 in registers_changed () at src/gdb/regcache.c:485 #3 0x00005555558d095e in set_target_gdbarch (new_gdbarch=0x555556d5f5b0) at src/gdb/gdbarch.c:5528 #4 0x0000555555677175 in set_gdbarch_from_file (abfd=0x0) at src/gdb/arch-utils.c:601 #5 0x0000555555897c6b in exec_file_attach (filename=0x0, from_tty=1) at src/gdb/exec.c:409 #6 0x000055555589852d in exec_file_command (args=0x0, from_tty=1) at src/gdb/exec.c:571 #7 0x00005555558985a1 in file_command (arg=0x0, from_tty=1) at src/gdb/exec.c:583 #8 0x000055555572b55f in do_const_cfunc (c=0x55555672e200, args=0x0, from_tty=1) at src/gdb/cli/cli-decode.c:95 #9 0x000055555572f3d3 in cmd_func (cmd=0x55555672e200, args=0x0, from_tty=1) at src/gdb/cli/cli-decode.c:2181 #10 0x0000555555be1ecc in execute_command (p=0x555556327804 "", from_tty=1) at src/gdb/top.c:668 #11 0x0000555555895427 in command_handler (command=0x555556327800 "file") at src/gdb/event-top.c:588 #12 0x00005555558958af in command_line_handler (rl=...) at src/gdb/event-top.c:773 #13 0x0000555555894b3e in gdb_rl_callback_handler (rl=0x55555a09e240 "file") at src/gdb/event-top.c:219 #14 0x0000555555ccfeec in rl_callback_read_char () at src/readline/readline/callback.c:281 #15 0x000055555589495a in gdb_rl_callback_read_char_wrapper_noexcept () at src/gdb/event-top.c:177 #16 0x0000555555894a08 in gdb_rl_callback_read_char_wrapper (client_data=0x555556327520) at src/gdb/event-top.c:194 #17 0x00005555558952a5 in stdin_event_handler (error=0, client_data=0x555556327520) at src/gdb/event-top.c:516 #18 0x0000555555e027d6 in handle_file_event (file_ptr=0x555558d20840, ready_mask=1) at src/gdbsupport/event-loop.cc:548 #19 0x0000555555e02d88 in gdb_wait_for_event (block=1) at src/gdbsupport/event-loop.cc:673 #20 0x0000555555e01c42 in gdb_do_one_event () at src/gdbsupport/event-loop.cc:215 #21 0x00005555559c47c2 in start_event_loop () at src/gdb/main.c:356 #22 0x00005555559c490d in captured_command_loop () at src/gdb/main.c:416 #23 0x00005555559c6217 in captured_main (data=0x7fffffffdc00) at src/gdb/main.c:1253 #24 0x00005555559c6289 in gdb_main (args=0x7fffffffdc00) at src/gdb/main.c:1268 #25 0x0000555555621756 in main (argc=3, argv=0x7fffffffdd18) at src/gdb/gdb.c:32 gdb/ChangeLog: PR gdb/26336 * progspace.c (program_space::remove_objfile): Invalidate the frame cache.
2020-08-12[PATCH] gas: arm: Fix IT-predicated MVE vcvtJoe Ramsay7-8/+43
* config/tc-arm.c (do_neon_cvt_1): Parse vcvtne as vcvt-ne for NS_FD shape when MVE is present * testsuite/gas/arm/mve-vcvtne-it-bad.d: New test. * testsuite/gas/arm/mve-vcvtne-it-bad.l: New test. * testsuite/gas/arm/mve-vcvtne-it-bad.s: New test. * testsuite/gas/arm/mve-vcvtne-it.d: New test. * testsuite/gas/arm/mve-vcvtne-it.s: New test.