aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-04gdb/testsuite: use clean_restart in gdb.server/ext-run.expSimon Marchi2-7/+7
I think the sequence of commands here could be replaced with clean_restart. The test starts with GDB not started, so it should not be started when we reach gdb_skip_xml_test. gdb/testsuite/ChangeLog: * gdb.server/ext-run.exp: Use clean_restart. Change-Id: I8c033bad6c52f3d58d6aa377b8355fc633c7aede
2021-01-04gdb/testsuite: use build_executable in gdb.server/stop-reply-no-thread.expSimon Marchi2-1/+6
This test uses prepare_for_testing, then does a clean_restart for each test configuration. prepare_for_testing does a build_executable plus a clean_restart. So the clean_restart inside prepare_for_testing is done for nothing. Change prepare_for_testing to just build_executable to avoid the unnecessary clean_restart. gdb/testsuite/ChangeLog: * gdb.server/stop-reply-no-thread.exp: Use build_executable instead of prepare_for_testing. Change-Id: I8b2a2e90353c57c39c49a3665083331b4882fdd0
2021-01-04gdb/testsuite: use clean_restart in gdb.server/solib-list.expSimon Marchi2-6/+5
I think this sequence of commands can be replaced by clean_restart, despite what the comment says, as long as we don't use the `binfile` argument to clean_restart. gdb/testsuite/ChangeLog: * gdb.server/solib-list.exp: Use clean_restart. Change-Id: I4930564c50a1865cbffe0d660a4296c9d2158084
2021-01-04[gdb/testsuite] Don't require gold for gdb.base/morestack.expTom de Vries3-11/+7
While working on PR26935 I noticed that the test-case requires the gold linker, but doesn't really need it. The -fuse-ld=gold was added to support the printf in the test-case, which prints some information but is not otherwise needed for the test-case. Fix this by removing the printf and the corresponding -fuse-ld=gold. Tested on x86_64-linux. Also checked that the test still fails when the fix from the commit that added the test-case is reverted. gdb/testsuite/ChangeLog: 2021-01-04 Tom de Vries <tdevries@suse.de> * gdb.base/morestack.c: Remove printf. * gdb.base/morestack.exp: Don't use -fuse-ld=gold.
2021-01-04Refactor struct trad_frame_saved_regsLuis Machado37-403/+555
The following patch drops the overloading going on with the trad_frame_saved_reg struct and defines a new struct with a KIND enum and a union of different fields. The new struct looks like this: struct trad_frame_saved_reg { setters/getters ... private: trad_frame_saved_reg_kind m_kind; union { LONGEST value; int realreg; LONGEST addr; const gdb_byte *value_bytes; } m_reg; }; And the enums look like this: /* Describes the kind of encoding a stored register has. */ enum class trad_frame_saved_reg_kind { /* Register value is unknown. */ UNKNOWN = 0, /* Register value is a constant. */ VALUE, /* Register value is in another register. */ REALREG, /* Register value is at an address. */ ADDR, /* Register value is a sequence of bytes. */ VALUE_BYTES }; The patch also adds setters/getters and updates all the users of the old struct. It is worth mentioning that due to the previous overloaded nature of the fields, some tdep files like to store negative offsets and indexes in the ADDR field, so I kept the ADDR as LONGEST instead of CORE_ADDR. Those cases may be better supported by a new enum entry. I have not addressed those cases in this patch to prevent unwanted breakage, given I have no way to test some of the targets. But it would be nice to clean those up eventually. The change to frame-unwind.* is to constify the parameter being passed to the unwinding functions, given we now accept a "const gdb_byte *" for value bytes. Tested on aarch64-linux/Ubuntu 20.04/18.04 and by building GDB with --enable-targets=all. gdb/ChangeLog: 2021-01-04 Luis Machado <luis.machado@linaro.org> Update all users of trad_frame_saved_reg to use the new member functions. Remote all struct keywords from declarations of trad_frame_saved_reg types, except on forward declarations. * aarch64-tdep.c: Update. * alpha-mdebug-tdep.c: Update. * alpha-tdep.c: Update. * arc-tdep.c: Update. * arm-tdep.c: Update. * avr-tdep.c: Update. * cris-tdep.c: Update. * csky-tdep.c: Update. * frv-tdep.c: Update. * hppa-linux-tdep.c: Update. * hppa-tdep.c: Update. * hppa-tdep.h: Update. * lm32-tdep.c: Update. * m32r-linux-tdep.c: Update. * m32r-tdep.c: Update. * m68hc11-tdep.c: Update. * mips-tdep.c: Update. * moxie-tdep.c: Update. * riscv-tdep.c: Update. * rs6000-tdep.c: Update. * s390-linux-tdep.c: Update. * s390-tdep.c: Update. * score-tdep.c: Update. * sparc-netbsd-tdep.c: Update. * sparc-sol2-tdep.c: Update. * sparc64-fbsd-tdep.c: Update. * sparc64-netbsd-tdep.c: Update. * sparc64-obsd-tdep.c: Update. * sparc64-sol2-tdep.c: Update. * tilegx-tdep.c: Update. * v850-tdep.c: Update. * vax-tdep.c: Update. * frame-unwind.c (frame_unwind_got_bytes): Make parameter const. * frame-unwind.h (frame_unwind_got_bytes): Likewise. * trad-frame.c: Update. Remove TF_REG_* enum. (trad_frame_alloc_saved_regs): Add a static assertion to check for a trivially-constructible struct. (trad_frame_reset_saved_regs): Adjust to use member function. (trad_frame_value_p): Likewise. (trad_frame_addr_p): Likewise. (trad_frame_realreg_p): Likewise. (trad_frame_value_bytes_p): Likewise. (trad_frame_set_value): Likewise. (trad_frame_set_realreg): Likewise. (trad_frame_set_addr): Likewise. (trad_frame_set_unknown): Likewise. (trad_frame_set_value_bytes): Likewise. (trad_frame_get_prev_register): Likewise. * trad-frame.h: Update. (trad_frame_saved_reg_kind): New enum. (struct trad_frame_saved_reg) <addr, realreg, data>: Remove. <m_kind, m_reg>: New member fields. <set_value, set_realreg, set_addr, set_unknown, set_value_bytes> <kind, value, realreg, addr, value_bytes, is_value, is_realreg> <is_addr, is_unknown, is_value_bytes>: New member functions.
2021-01-04When displaying ARM private file flag bits, use a 0x prefix.Alexander Fedotov3-4/+10
* elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value of private flags with 0x. * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise.
2021-01-04PR26822, How to prevent a STT_FILE with absolute path in the linked imageAlan Modra40-78/+127
bfd/ PR 26822 * elflink.c (elf_link_input_bfd): Use the file base name in linker generated STT_FILE symbols. ld/ PR 26822 * testsuite/ld-arm/non-contiguous-arm2.d: Adjust STT_FILE symbol match. * testsuite/ld-arm/non-contiguous-arm3.d: Likewise. * testsuite/ld-arm/non-contiguous-arm5.d: Likewise. * testsuite/ld-arm/non-contiguous-arm6.d: Likewise. * testsuite/ld-i386/tlsbin.rd: Likewise. * testsuite/ld-i386/tlsbin2.rd: Likewise. * testsuite/ld-i386/tlsbindesc.rd: Likewise. * testsuite/ld-i386/tlsdesc.rd: Likewise. * testsuite/ld-i386/tlsnopic.rd: Likewise. * testsuite/ld-i386/tlspic.rd: Likewise. * testsuite/ld-i386/tlspic2.rd: Likewise. * testsuite/ld-mips-elf/global-local-symtab-sort-n64.d: Likewise. * testsuite/ld-mips-elf/global-local-symtab-sort-n64t.d: Likewise. * testsuite/ld-mips-elf/global-local-symtab-sort-o32.d: Likewise. * testsuite/ld-mips-elf/global-local-symtab-sort-o32t.d: Likewise. * testsuite/ld-plugin/pr17973.d: Likewise. * testsuite/ld-tic6x/shlib-1.rd: Likewise. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise. * testsuite/ld-x86-64/tlsbin.rd: Likewise. * testsuite/ld-x86-64/tlsbin2.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise. * testsuite/ld-x86-64/tlsdesc.rd: Likewise. * testsuite/ld-x86-64/tlspic.rd: Likewise. * testsuite/ld-x86-64/tlspic2.rd: Likewise. * testsuite/ld-xtensa/tlsbin.rd: Likewise. * testsuite/ld-xtensa/tlspic.rd: Likewise.
2021-01-04PR27102, gas: "section symbols are already global"Alan Modra2-3/+8
PR 27102 * symbols.c (S_SET_EXTERNAL): Revise section symbol warning message and register symbol error message.
2021-01-04RISC-V: Fix the merged orders of Z* extension for linker.Nelson Chu4-35/+14
Similar to the commit 6729e2c2af2bd94408430734316597843718a484, we have to check the first char of the Z* extensions, to make sure that they follow the order of the standard extensions. bfd/ * elfxx-riscv.c (riscv_compare_subsets): Removed static. * elfxx-riscv.h: Add declaration. * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use riscv_compare_subsets to check the orders. (riscv_skip_prefix): Removed. (riscv_prefix_cmp): Removed.
2021-01-04PR26741, benign use after free in riscv_parse_prefixed_extAlan Modra2-1/+7
ISO/IEC 9899:1999 C standard "J.2 Undefined behavior" says the following is undefined behaviour: "The value of a pointer that refers to space deallocated by a call to the free or realloc function is used (7.20.3)." PR 26741 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after calculating subset version length.
2021-01-04In libctf, make AC_CONFIG_MACRO_DIR consistent with ACLOCAL_AMFLAGSNicolas Boulenguez3-2/+11
PR 27117 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with ACLOCAL_AMFLAGS -I dirs. * configure: Regenerate.
2021-01-04PR27101, as: Reject (byte) .align 0x100000000Alan Modra2-2/+8
This allows alignments up to 2**TC_ALIGN_LIMIT, which might be larger than an unsigned int can hold. PR 27101 * read.c (s_align): Use a large enough type for "align" to hold the result of get_absolute_expression.
2021-01-04Automatic date update in version.inGDB Administrator1-1/+1
2021-01-02gdb: fix typos in comments in target-float.cSimon Marchi2-2/+6
gdb/ChangeLog: * target-float.c: Fix typos. Change-Id: Ib65e90746d0a7c77c3fbead81139facb40b91977
2021-01-03PR27140, ppc32 segmentation fault in make_stubAlan Modra2-4/+13
This fixes a thinko in commit fa40fbe4849. st_other global entry bits are relevant only for 64-bit ELFv2. PowerPC gold leaves local sym vector of st_other bits as NULL for 32-bit, hence the segfault. PR 27140 * powerpc.cc (Target_powerpc::Branch_info::make_stub): Only access object->st_other() when 64-bit. (Stub_table::add_long_branch_entry): Ignore "other" when 32-bit.
2021-01-02sim: common: add align_{up,down} to match gdbMike Frysinger5-18/+19
We have ALIGN_{8,16,PAGE} and FLOOR_PAGE macros (where PAGE is defined as 4k) which were imported from the ppc sim. But no other sim utilizes these and hardcoding the sizes in the name is a bit limiting. Let's delete these and import the two general macros that gdb uses: align_up(addr, bytes) align_down(addr, bytes) This in turn allows us to cut over the Blackfin code immediately.
2021-01-03Automatic date update in version.inGDB Administrator1-1/+1
2021-01-02Fix pretty printer of main_type.flds_bnds.boundsHannes Domani2-5/+10
In struct dynamic_prop the members kind and data were renamed to m_kind and m_data. And flag_upper_bound_is_count is actually in bounds directly, not in its high member. gdb/ChangeLog: 2021-01-02 Hannes Domani <ssbssa@yahoo.de> * gdb-gdb.py.in: Fix main_type.flds_bnds.bounds pretty printer.
2021-01-02Automatic date update in version.inGDB Administrator1-1/+1
2021-01-01Manual updates of copyright year range not covered by gdb/copyright.pyJoel Brobecker5-5/+13
gdb/ChangeLog: * gdbarch.sh: Update copyright year range. gdb/doc/ChangeLog: * gdb.texinfo, refcard.tex: Update copyright year range.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker6323-6322/+6326
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2021-01-01gdb/copyright.py: Also update sources in "gdbserver" and "gdbsupport"Joel Brobecker2-1/+8
This commit adjusts GDB's copyright.py script, following two past changes: - gdb/gdbserver/ being move to the toplevel directory; - gdb/common/ being renamed to gdbsupport/. gdb/ChangeLog: * copyright.py (get_update_list): Add "gdbserver" and "gdbsupport" to the list of directories to update.
2021-01-01Update copyright year in version message for gdb, gdbserver and gdbreplayJoel Brobecker5-3/+12
gdb/ChangeLog: * top.c (print_gdb_version): Update copyright year. gdbserver/ChangeLog: * server.cc (gdbserver_version): Update copyright year. * gdbreplay.cc (gdbreplay_version): Likewise.
2021-01-01Rotate gdb/ChangeLogJoel Brobecker3-18741/+18755
As a results of the rotation, this introduces a new file which needed to be added to DJGPP's fnchange.lst. gdb/ChangeLog * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2020.
2021-01-01PR27116, Spelling errors found by Debian style checkerAlan Modra38-43/+88
PR 27116 bfd/ * xcofflink.c: Correct spelling in comments. binutils/ * coffgrok.c (do_type): Correct spelling of auxiliary in errors. * doc/binutils.texi: Correct grammar. * readelf.c (process_version_sections): Correct spelling of auxiliary in warning. * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix. config/ * override.m4: Correct comment grammar. gas/ * config/tc-i386.c: Correct comment spelling. * config/tc-riscv.c: Likewise. * config/tc-s390.c: Correct comment grammar. * doc/c-i386.texi: Correct spelling. * doc/c-s390.texi: Correct grammar. gold/ * tilegx.cc: Correct comment spelling. gprof/ * README: Correct grammar. * gprof.texi: Likewise. include/ * coff/internal.h: Correct comment spelling. * coff/sym.h: Likewise. * opcode/aarch64.h: Likewise. ld/ * configure.tgt: Correct comment grammar. * emultempl/m68hc1xelf.em: Likewise. * ld.texi: Correct grammar.
2021-01-01Update year range in copyright notice of binutils filesAlan Modra2726-2794/+2834
2021-01-01Add libctf to update-copyright.pyAlan Modra2-0/+6
2021-01-01ChangeLog rotationAlan Modra20-24674/+24814
2021-01-01Automatic date update in version.inGDB Administrator1-1/+1
2021-01-01gas: Change to "swym 0" as canonical nop insn for MMIXHans-Peter Nilsson2-1/+5
While "set $0, $0" works, that's not the documented instruction to do nothing for MMIX. However, I'm not changing it for "nop_type 5" as seen in gas.exp and org-1.s, because "set $0, $0" seems like it could be re-used there, for some future ISA. gas/ * config/tc-mmix.h (md_single_noop_insn): Change to "swym 0".
2020-12-31Update gdb.rust tests for Rust 1.49Tom Tromey2-4/+14
Rust 1.49 was released today, and it includes some library changes which caused some gdb.rust tests to fail. This patch adapts the test suite to the new output. I also verified that this continues to work with Rust 1.48. gdb/testsuite/ChangeLog 2020-12-31 Tom Tromey <tom@tromey.com> * gdb.rust/simple.exp: Update output for Rust 1.49.
2020-12-31PR27128, nm -P portable output format regressionAlan Modra10-13/+133
binutils/ PR 27128 * nm.c (print_symname): Append version string to symbol name before printing the lot under control of "form". Append version to demangled names too. ld/ PR 27128 * testsuite/ld-elf/pr27128.s: New file. * testsuite/ld-elf/pr27128.t: Likewise. * testsuite/ld-elf/pr27128a.d: Likewise. * testsuite/ld-elf/pr27128b.d: Likewise. * testsuite/ld-elf/pr27128c.d: Likewise. * testsuite/ld-elf/pr27128d.d: Likewise. * testsuite/ld-elf/pr27128e.d: Likewise.
2020-12-31Fix passing debug options for gccBernd Edlinger2-1/+5
Fix a bug in the test where we were missing "additional_flags=", causing -gstatement-frontiers not to be passed to the compiler. The issue was introduced in eb24648c453c28f2898fb599311ba004394a8b41 ("Fix gdb.cp/step-and-next-inline.exp with Clang"). gdb/testsuite: 2020-12-31 Bernd Edlinger <bernd.edlinger@hotmail.de> * gdb.cp/step-and-next-inline.exp: Fix test case.
2020-12-30gdb/testsuite: de-duplicate test names in gdb.python/py-frame-args.expSimon Marchi2-22/+30
Use with_test_prefix to de-duplicate test names. gdb/testsuite/ChangeLog: * gdb.python/py-frame-args.exp: De-duplicate test names. Change-Id: I5cc8bee692a0d071cb78258aca80ea642e00e7a8
2020-12-31sim/mips/sim-main.c: Include <stdlib.h> (for abort() declaration)Pavel I. Kryukov2-0/+5
sim/mips/ChangeLog: * sim-main.c: Include <stdlib.h>.
2020-12-31Automatic date update in version.inGDB Administrator1-1/+1
2020-12-30Automatic date update in version.inGDB Administrator1-1/+1
2020-12-29elfedit: Pass osabi to reconcatH.J. Lu2-1/+5
Pass osabi to reconcat to get Usage: elfedit <option(s)> elffile(s) ... --input-osabi [none|HPUX|NetBSD|GNU|Linux|Solaris|AIX|Irix|FreeBSD|TRU64|Modesto|OpenBSD|OpenVMS|NSK|AROS|FenixOS] Set input OSABI instead of --input-osabi [|FenixOS] Set input OSABI * elfedit (usage): Pass osabi to reconcat.
2020-12-29Fix wrong method nameHannes Domani2-1/+5
The objects returned by FrameDecorator.frame_args need to implement a method named symbol, not argument. gdb/doc/ChangeLog: 2020-12-29 Hannes Domani <ssbssa@yahoo.de> * python.texi (Frame Decorator API): Fix method name.
2020-12-29Automatic date update in version.inGDB Administrator1-1/+1
2020-12-28binutils: Use the newly built assembler and linkerH.J. Lu2-1/+15
Use the newly built assembler and linker in test_gnu_debuglink by passing $gcc_gas_flag to target_compile. * testsuite/binutils-all/compress.exp (test_gnu_debuglink): Pass $gcc_gas_flag to target_compile.
2020-12-28Automatic date update in version.inGDB Administrator1-1/+1
2020-12-27Simplify MULTI_SUBSCRIPT implementationTom Tromey2-29/+12
The MULTI_SUBSCRIPT code in evaluate_subexp_standard has a comment saying that perhaps the EVAL_SKIP handling is incorrect. This patch simplifies this code. In particular, it precomputes all the indices in a separate loop and removes some complicated flow-control. Tested using the gdb.modula2 and gdb.dlang test suites, as these are the only parsers that emit MULTI_SUBSCRIPT. gdb/ChangeLog 2020-12-27 Tom Tromey <tom@tromey.com> * eval.c (evaluate_subexp_standard) <case MULTI_SUBSCRIPT>: Simplify.
2020-12-27Automatic date update in version.inGDB Administrator1-1/+1
2020-12-26Automatic date update in version.inGDB Administrator1-1/+1
2020-12-25gas: Update 80387 floating point 's' suffixH.J. Lu1-1/+1
Update 80387 floating point 's' suffix to read: * Integer constructors are '.word', '.long' or '.int', and '.quad' for the 16-, 32-, and 64-bit integer formats. The corresponding instruction mnemonic suffixes are 's' (short), 'l' (long), and 'q' (quad). instead of 's' (single). PR gas/27106 * doc/c-i386.texi: Update 80387 floating point 's' suffix
2020-12-25Automatic date update in version.inGDB Administrator1-1/+1
2020-12-24gdb: avoid resolving dynamic properties for non-allocated arraysAndrew Burgess7-24/+240
In PR gdb/27059 an issue was discovered where GDB would sometimes trigger undefined behaviour in the form of signed integer overflow. The problem here is that GDB was reading random garbage from the inferior memory space, assuming this data was valid, and performing arithmetic on it. This bug raises an interesting general problem with GDB's DWARF expression evaluator, which is this: We currently assume that the DWARF expressions being evaluated are well formed, and well behaving. As an example, this is the expression that the bug was running into problems on, this was used as the expression for a DW_AT_byte_stride of a DW_TAG_subrange_type: DW_OP_push_object_address; DW_OP_plus_uconst: 88; DW_OP_deref; DW_OP_push_object_address; DW_OP_plus_uconst: 32; DW_OP_deref; DW_OP_mul Two values are read from the inferior and multiplied together. GDB should not assume that any value read from the inferior is in any way sane, as such the implementation of DW_OP_mul should be guarding against overflow and doing something semi-sane here. However, it turns out that the original bug PR gdb/27059, is hitting a more specific case, which doesn't require changes to the DWARF expression evaluator, so I'm going to leave the above issue for another day. In the test mentioned in the bug GDB is actually trying to resolve the dynamic type of a Fortran array that is NOT allocated. A non-allocated Fortran array is one that does not have any data allocated for it yet, and even the upper and lower bounds of the array are not yet known. It turns out that, at least for gfortran compiled code, the data fields that describe the byte-stride are not initialised until the array is allocated. This leads me to the following conclusion: GDB should not try to resolve the bounds, or stride information for an array that is not allocated (or not associated, a similar, but slightly different Fortran feature). Instead, each of these properties should be set to undefined if the array is not allocated (or associated). That is what this commit does. There's a new flag that is passed around during the dynamic array resolution. When this flag is true the dynamic properties are resolved using the DWARF expressions as they currently are, but when this flag is false the expressions are not evaluated, and instead the properties are set to undefined. gdb/ChangeLog: PR gdb/27059 * eval.c (evaluate_subexp_for_sizeof): Handle not allocated and not associated arrays. * f-lang.c (fortran_adjust_dynamic_array_base_address_hack): Don't adjust arrays that are not allocated/associated. * gdbtypes.c (resolve_dynamic_range): Update header comment. Add new parameter which is used to sometimes set dynamic properties to undefined. (resolve_dynamic_array_or_string): Update header comment. Add new parameter which is used to guard evaluating dynamic properties. Resolve allocated/associated properties first. gdb/testsuite/ChangeLog: PR gdb/27059 * gdb.dwarf2/dyn-type-unallocated.c: New file. * gdb.dwarf2/dyn-type-unallocated.exp: New file.
2020-12-24gdb: include allocated/associated properties in 'maint print type'Andrew Burgess2-0/+23
Adds the allocated and associated dynamic properties into the output of the 'maintenance print type' command. gdb/ChangeLog: * gdbtypes (recursive_dump_type): Include allocated and associated properties.
2020-12-24gdb/gdbtypes.h: Fix comparison of uninitialized valuesLancelot SIX2-3/+10
When called with an array type of unknown dimensions, is_scalar_type_recursive ended up comparing uninitialized values. This was picked up by the following compiler warning: CXX gdbtypes.o /binutils-gdb/gdb/gdbtypes.c: In function int is_scalar_type_recursive(type*): /binutils-gdb/gdb/gdbtypes.c:3670:38: warning: high_bound may be used uninitialized in this function [-Wmaybe-uninitialized] 3670 | return high_bound == low_bound && is_scalar_type_recursive (elt_type); | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /binutils-gdb/gdb/gdbtypes.c:3670:38: warning: low_bound may be used uninitialized in this function [-Wmaybe-uninitialized] This patch makes sure that when dealing with an array of unknown size (or an array of more than 1 element), is_scalar_type_recursive returns false. gdb/ChangeLog: * gdbtypes.c (is_scalar_type_recursive): Prevent comparison between uninitialized values. Change-Id: Ifc005ced166aa7a065fef3e652977bae67625bf4