aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-07-25Clarify doc for .arch/.cpuThomas Preud'homme2-2/+10
Documentation for .arch and .cpu directives currently says that it accepts the same name as -march/-mcpu command-line options respectively. However it only accept the architecture/CPU part of those options: it does not accept specifying an extension which is done via .arch_extension. This patch clarifies that the extension is not accepted. 2018-07-25 Thomas Preud'homme <thomas.preudhomme@linaro.org> gas/ * doc/c-arm.texi (.arch directive): Clarify that name must not include an extension. (.cpu directive): Likewise.
2018-07-25Fix potential memory leaks in some of the binutils source files.Nick Clifton4-61/+120
* rdcoff.c (parse_coff_struct_type): Free fields array upon early exit. (parse_coff_enum_type): Free names and vals arrays upon early exit. * rddbg.c (read_section_stabs_debugging_info): Free shandle and strings and stabs arrays upon early exit. * readelf.c (get_32bit_section_headers): Free shdrs structure upon early exit. (get_64bit_section_headers): Likewise. (get_32bit_elf_symbols): Generate an error if multiple symbol table index sections are associated with the same symbol section. (get_64bit_elf_symbols): Likewise. (process_dynamic_section): Generate an error if there are multiple dynamic symbol table sections, multiple dynamic string tables or multiple dynamic symbol information sections.
2018-07-25Enhance powerpc ld -r --relaxAlan Modra7-24/+81
One of the ill effects of ld -r is to mash together sections. That can result in reduced icache performance at runtime due to unexpected movement of code. Another problem is that sections can become too large to link on targets that have limited relative addressing. ld -r --relax attempts to overcome the large section problem for branches by inserting trampolines, but the powerpc support added lots of unnecessary trampolines. This patch trims them somewhat. bfd/ * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals. Avoid trashing toff with added when used as a symbol index. Ignore R_PPC_PLTREL24 addends in unused example code. Avoid creating unnecessary fixups when relocatable. ld/ * testsuite/ld-powerpc/big.s: New file. * testsuite/ld-powerpc/relaxrl.d: New test. * testsuite/ld-powerpc/powerpc.exp: Run new test. * testsuite/ld-powerpc/relaxr.d: Adjust.
2018-07-25Suppress string diagnostics for pre-release GCCAlan Modra7-14/+24
Extends commit 898ade12ee8 to cover other targets. * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable -Wstringop-truncation warning for gcc-8.0 too. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Comment fix. * elf64-s390.c (elf_s390_write_core_note): Likewise.
2018-07-25Automatic date update in version.inGDB Administrator1-1/+1
2018-07-24Set CU language before processing any DIEs (symtab/23010 et al)Keith Seitz2-6/+31
This patch is another attempt at really fixing the multitude of assertions being seen where symbols of one language are being added to symbol lists of another language. In this specific case, the backtrace command (thread apply all bt full) that is looking for the compunit containing the PC of the thread. That calls get_prev_frame several times. This function calls (eventually) dwarf2_frame_prev_register. That eventually ends up calling find_pc_compunit_symtab. In this function (find_pc_sect_compunit_symtab actually), we loop over all compunits, calling the "quick" function dw2_find_pc_sect_compunit_symtab. That function calls dw2_instantiate_symtab to read in all the CU's symbols. Now the fun begins. dw2_do_instantiate_symtab queues the per_cu for reading, using a default "pretend" language of language_minimal with the expectation that this will be set later. The DIEs of this (only queued) CU are then processed. The first DIE is DW_TAG_compile_unit. That's handled by read_file_scope. (Nearly) The first thing read_file_scope does is: get_scope_pc_bounds (die, &lowpc, &highpc, cu); This function loops over the children of the current DIE (a compile_unit), looking for bounds. The first such child is a subprogram, and we attempt to get its bounds. We use dwarf2_attr to get at DW_AT_high_pc. This subprogram has DW_AT_specification set, so dwarf_attr (via follow_die_ref/follow_die_offset) will follow that, but follow_die_offset *also* attempts to load the containing CU for the spec DIE. That spec DIE lives inside a CU that is a partial_unit and has no language attribute. So it simply inherits the language from the CU that elicited the read. [That all happens in follow_die_offset.] The original CU's language is still language_minimal -- we haven't gotten to the line in read_file_scope that actually sets the language yet! And that is the cause of these problems. The call to prepare_one_comp_unit needs to be the *first* thing that is done when reading a CU so that the CU's language can be recorded (and inherited by any referenced partial_units). Since a test reproducer for this has been so elusive, this patch also adds a wrapper function around add_symbol_to_list which asserts when adding a symbol of one language to a list containing symbols of a different language. gdb/ChangeLog: 2017-07-24 Keith Seitz <keiths@redhat.com> PR symtab/23010 * dwarf2read.c (dw2_add_symbol_to_list): New function. (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list instead of add_symbol_to_list. (read_file_scope): Call prepare_one_comp_unit before reading any other DIEs.
2018-07-24Fix indentation in scoped_mmap.hSimon Marchi2-19/+24
gdb/ChangeLog: * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2018-07-24Remove some unnecessary declarations and configuryTom Tromey5-53/+8
configure checks for declarations of free, malloc, and realloc; but the results are only used in a single spot: utils.c. I think these checks are long since obsolete, so this patch removes them. Grepping the entire tree for these HAVE_DECL_ symbols, the only uses of possible interest to gdb come from bfd/sysdep.h; but this is not (nor should be) included by gdb. (And furthermore I think the code there is probably also obsolete.) gdb/ChangeLog 2018-07-24 Tom Tromey <tom@tromey.com> * utils.c (malloc, realloc, free): Don't declare. * configure, config.in: Rebuild. * configure.ac: Don't check for declarations of free, malloc, or realloc.
2018-07-24x86: Use unsigned int to iterate through vector operandsH.J. Lu2-5/+11
Use unsigned int to iterate through multi-length vector operands to avoid sign-extension. * config/tc-i386.c (build_vex_prefix): Use unsigned int to iterate through multi-length vector operands. (build_evex_prefix): Likewise.
2018-07-24Updated French translation for ld/ and Swedish translation for binutils/Nick Clifton5-1281/+6287
bin * po/sv.po: Updated Swedish translation. ld * po/fr.po: Updated French translation.
2018-07-24PR23431, Messages composed from pieces can't be properly translatedAlan Modra3-10/+33
PR 23431 * dwarf.c (display_formatted_table): Replace "what" parameter with "is_dir". Expand messages. Fix capitalisation. * testsuite/binutils-all/dw5.W: Update expected output.
2018-07-24PR23430, Indices misspelledAlan Modra13-14/+46
PR 23430 include/ * elf/common.h (SHT_SYMTAB_SHNDX): Fix comment typo. bfd/ * dwarf2.c (dwarf_debug_section_enum): Fix comment typo. * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise. binutils/ * elfcomm.h (struct archive_info): Rename uses_64bit_indicies to uses_64bit_indices. * elfcomm.c (setup_archive): Update uses of above. * readelf.c (process_archive): Likewise. (get_section_type_name): Rename indicies to indices. (get_32bit_elf_symbols, get_64bit_elf_symbols): Likewise. (process_section_groups): Likewise. cpu/ * or1kcommon.cpu (spr-reg-indices): Fix description typo. opcodes/ * or1k-desc.h: Regenerate.
2018-07-24x86-64: correct AVX512F vcvtsi2s{d,s} handlingJan Beulich15-404/+453
Just like for their AVX counterparts and CVTSI2S{D,S}, a memory source here is ambiguous and hence - in source files should be qualified with a suitable suffix or operand size specifier (not doing so is an error in Intel mode, and will gain a diagnostic in AT&T mode in the future), - in disassembly should be properly suffixed (the Intel operand size specifiers were emitted correctly already).
2018-07-24Automatic date update in version.inGDB Administrator1-1/+1
2018-07-23xtensa: ld: convert tests to run_dump_testMax Filippov8-257/+38
Three tests with individual .exp files can be implemented in less verbose way with run_dump_test infrastructure. Convert them. ld/ 2018-07-23 Max Filippov <jcmvbkbc@gmail.com> * testsuite/ld-xtensa/coalesce.d: New file. * testsuite/ld-xtensa/coalesce.exp: Remove file. * testsuite/ld-xtensa/diff_overflow.d: New file. * testsuite/ld-xtensa/diff_overflow.exp: Remove file. * testsuite/ld-xtensa/lcall.d: New file. * testsuite/ld-xtensa/lcall.exp: Remove file. * testsuite/ld-xtensa/xtensa.exp (coalesce, diff_overflow) (lcall): New tests.
2018-07-23xtensa: ld: add tests for static linkage relaxationMax Filippov15-0/+249
ld/ 2018-07-23 Max Filippov <jcmvbkbc@gmail.com> * testsuite/ld-xtensa/relax-static-defs.s: New file. * testsuite/ld-xtensa/relax-static-local-pie.d: New file. * testsuite/ld-xtensa/relax-static-local-shared.d: New file. * testsuite/ld-xtensa/relax-static-local.s: New file. * testsuite/ld-xtensa/relax-static-pie.d: New file. * testsuite/ld-xtensa/relax-static-shared.d: New file. * testsuite/ld-xtensa/relax-static.s: New file. * testsuite/ld-xtensa/relax-undef-weak-local-pie.d: New file. * testsuite/ld-xtensa/relax-undef-weak-local-shared.d: New file. * testsuite/ld-xtensa/relax-undef-weak-local.s: New file. * testsuite/ld-xtensa/relax-undef-weak-pie.d: New file. * testsuite/ld-xtensa/relax-undef-weak-shared.d: New file. * testsuite/ld-xtensa/relax-undef-weak.s: New file. * testsuite/ld-xtensa/xtensa.exp: New file.
2018-07-23xtensa: ld: rename xtensa.exp to xtensa-linux.expMax Filippov2-0/+4
xtensa.exp in fact only checks xtensa*-*-linux* configurations, rename it to xtensa-linux.exp to allow xtensa.exp to check xtensa*-*-*. ld/ 2018-07-23 Max Filippov <jcmvbkbc@gmail.com> * testsuite/ld-xtensa/xtensa.exp: Rename to xtensa-linux.exp.
2018-07-23xtensa: move dynamic relocations sections consistency checkMax Filippov2-11/+18
The function elf_xtensa_finish_dynamic_sections checks that sizes of sections .rela.dyn and .rela.plt match number of corresponding relocation records, but the check is only done when .rela.plt is non-empty, so, e.g. it is never run for the static PIE. Rearrange the test so that .rela.dyn and .rela.plt are checked always. bfd/ 2018-07-23 Max Filippov <jcmvbkbc@gmail.com> * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move relocation sections consistency check to always check both .rela.dyn and .rela.plt when they exist. Rearrange variable definition and assignment places.
2018-07-23xtensa: fix relaxation of undefined weak references in shared objectsMax Filippov2-1/+8
The change c451bb34ae8b ("xtensa: don't emit dynamic relocation for weak undefined symbol") didn't properly handle shrinking of relocation sections due to coalescing of references to a dynamic undefined weak symbol in a shared object, which resulted in the following assertion failure in ld when linking uClibc-ng libthread_db for xtensa: BFD (GNU Binutils) 2.31 internal error, aborting at elf32-xtensa.c:3269 in elf_xtensa_finish_dynamic_sections Shrink dynamic relocations section for dynamic undefined weak symbols when linking a shared object. bfd/ 2018-07-23 Max Filippov <jcmvbkbc@gmail.com> * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic relocations section for dynamic undefined weak symbols when linking a shared object.
2018-07-23Avoid ubsan complaint in BFDTom Tromey2-2/+7
I built gdb with ubsan and ran the test suite. One complaint was due to bfd_get_elf_phdrs passing NULL to memcpy. This patch avoids the complaint. bfd/ChangeLog 2018-07-23 Tom Tromey <tom@tromey.com> * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
2018-07-23x86: Add a test for missing broadcastH.J. Lu5-0/+19
For .intel_syntax noprefix vcvtps2qq xmm0, DWORD PTR [rax] we should get Error: broadcast is needed for operand of such type for `vcvtps2qq' * testsuite/gas/i386/inval-avx512f.s: Add a test for missing broadcast. * testsuite/gas/i386/x86-64-inval-avx512f.s: Likewise. * testsuite/gas/i386/inval-avx512f.l: Updated. * testsuite/gas/i386/x86-64-inval-avx512f.l: Likewise.
2018-07-23x86: Remove broadcast_not_on_src_operandH.J. Lu2-4/+6
Remove broadcast_not_on_src_operand since it is unused. * config/tc-i386.c (i386_error): Remove broadcast_not_on_src_operand. (match_template): Likewse.
2018-07-23[ARC] Fix decoding of w6 signed short immediate.Claudiu Zissulescu4-2/+14
gas/ Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/st.d: Fix test. opcodes/ Claudiu Zissulescu <claziss@synopsys.com> * arc-opc.c (extract_w6): Fix extending the sign.
2018-07-23[ARC] Allow vewt instruction for ARC EM family.Claudiu Zissulescu2-2/+9
opcode/ Claudiu Zissulescu <claziss@synopsys.com> * arc-tbl.h (vewt): Allow it for ARC EM family.
2018-07-23[ARC] Fix case-sensitivity for extension instructions.claziss4-0/+26
In ARC assembler, we accept case insensitive mnemonics, but this was not the case for extension instruction, fix it and add a test. gas/ Claudiu Zissulescu <claziss@synopsys.com> * config/tc-arc.c (tokenize_extinsn): Convert to lower case the name of extension instructions. * testsuite/gas/arc/textinsn_case.d: New file. * testsuite/gas/arc/textinsn_case.s: Likewise.
2018-07-23S/390: Suppress string diagnostics for pre-release GCCAndreas Krebbel2-4/+4
Building for S/390 currently fails when using a GCC 8.1 pre-release version like 8.0.1 (as it is used by F28). Fixed with the attached patch. bfd/ChangeLog: 2018-07-23 Andreas Krebbel <krebbel@linux.ibm.com> * elf32-s390.c (elf_s390_write_core_note): Make GCC version 8.0 to be covered by the check as well. * elf64-s390.c (elf_s390_write_core_note): Likewise.
2018-07-23PowerPC64 fails reloc-discard testAlan Modra3-0/+18
PowerPC64 fails here due to emitting a warning about discarded dynamic relocations. That's a good thing, since accidentally discarding dynamic relocations will likely result in a non-working binary. * testsuite/ld-elf/reloc-discard-warn.d: New. * testsuite/ld-elf/reloc-discard.d: Skip test on PowerPC64.
2018-07-23power9 mfupmc/mtupmcAlan Modra2-0/+24
PR 23419 * ppc-opc.c (powerpc_opcodes): Add mtupmc/mfupmc/mfpmc extended opcode variants for mtspr/mfspr encodings.
2018-07-22Remove some unused variablesSimon Marchi9-26/+37
Found using the newly-enabled -Wunused-variable. gdb/ChangeLog: * aarch64-linux-nat.c (aarch64_linux_nat_target::stopped_data_address): Remove unused variable. * arm-linux-nat.c (fetch_regs): Likewise. (store_regs): Likewise. (fetch_vfp_regs): Likewise. (store_vfp_regs): Likewise. (arm_linux_nat_target::insert_hw_breakpoint): Likewise. (arm_linux_nat_target::remove_hw_breakpoint): Likewise. (arm_linux_nat_target::insert_watchpoint): Likewise. (arm_linux_nat_target::remove_watchpoint): Likewise. * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint): Likewise. * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): Likewise. * ppc-linux-nat.c (fetch_register): Likewise. (fetch_all_gp_regs): Likewise. (fetch_ppc_registers): Likewise. (store_all_gp_regs): Likewise. (store_ppc_registers): Likewise. (hwdebug_insert_point): Likewise. (can_use_watchpoint_cond_accel): Likewise. * remote-sim.c (gdb_os_write_stdout): Likewise. gdb/gdbserver/ChangeLog: * linux-mips-low.c (mips_collect_ptrace_register): Remove unused variable. (mips_supply_ptrace_register): Likewise.
2018-07-23Automatic date update in version.inGDB Administrator1-1/+1
2018-07-22Add -Wunused-variable to warnings.m4Tom Tromey5-6/+78
This adds -Wunused-variable to the build. This required a special check in configure in order to work around a bug in GCC 4.9. Simon ound the correct test to use, so I've added him to the ChangeLog. gdb/ChangeLog 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca> Tom Tromey <tom@tromey.com> * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special test for it. * configure: Rebuild. gdb/gdbserver/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * configure: Rebuild.
2018-07-22Conditionally define xmltarget_${name} variable in regdat.shTom Tromey2-1/+7
This changes regdat.sh to emit the xmltarget_${name} variable inside the #ifndef IN_PROCESS_AGENT block. This avoids a -Wunused-variable warning for some builds. Thanks to Pedro for investigating this one. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * regformats/regdat.sh: Define xmltarget_${name} inside #ifndef IN_PROCESS_AGENT.
2018-07-22Remove unused variables from gdbserverTom Tromey6-9/+21
This removes a few unused variables from gdbserver. The x86-tdesc.h change is a bit unusual for this series. This file was not defining the multiple-include guard symbol, so I've added that here. Also, it is hard to determine when i386_expedite_regs will be needed, so this patch simply marks it ATTRIBUTE_UNUSED. gdb/gdbserver/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * win32-low.c (win32_create_inferior): Remove unused variables. * gdbreplay.c (remote_open): Remove unused variable. * remote-utils.c (remote_prepare): Remove unused variable. * x86-tdesc.h (X86_TDESC_H): Define. (amd64_expedite_regs): Define conditionally. (i386_expedite_regs): Mark ATTRIBUTE_UNUSED. * linux-x86-tdesc.c (i386_tdescs): Move inside #if. * remote-utils.c (readchar): Remove unused variable.
2018-07-22Remove unused declaration from value.cTom Tromey2-1/+4
This removes an unused declaration from value_fetch_lazy_bitfield. Because it is not completely clear if the check_typedef call is needed somewhere beneath this function, this is broken out into a separate patch. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2018-07-22Pass the correct argument to the observer in reread_symbolsTom Tromey2-1/+5
This is actually a patch I found via another route. Joel had asked me to write a test, but I still have not found the time to do this. Meanwhile, -Wunused-variable also found this error. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * symfile.c (reread_symbols): Notify iter, not objfile.
2018-07-22Fix ravenscar-thread.c to use arch_opsTom Tromey2-2/+8
The change to turn target ops into methods accidentally introduced a bug in ravenscar-thread.c, changing some calls that were using "arch_ops" to use the target beneath. This patch changes ravenscar-thread.c to use these variables where appropriate. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * ravenscar-thread.c (ravenscar_thread_target::store_registers): Use arch_ops. (ravenscar_thread_target::prepare_to_store): Likewise.
2018-07-22Call value_fetch_lazy when needed in pretty-printersTom Tromey3-2/+13
This removes some unused variables, and replaces the calls to value_contents_for_printing with a call to value_fetch_lazy, when needed. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove unused variable. Call value_fetch_lazy when needed. * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Remove unused variable. Call value_fetch_lazy when needed.
2018-07-22Remove declarations from m32c-tdep.cTom Tromey2-13/+17
This removes some unused declarations from m32c-tdep.c. Initially I had thought that this entire code block was dead, but Simon pointed out that it is not; so this patch simply removes some declarations. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * m32c-tdep.c (mark_dma): Return void. (make_regs): Remove unused declarations.
2018-07-22Call some functions in guile/ for effectTom Tromey3-6/+12
This changes a couple of spots in guile/ to remove a variable declaration but to still call a function for effect. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * guile/scm-cmd.c (gdbscm_dont_repeat): Call cmdscm_get_valid_command_smob_arg_unsafe for effect. * guile/scm-block.c (gdbscm_make_block_syms_iter): Call bkscm_get_valid_block_smob_arg_unsafe for effect.
2018-07-22Use a previously unused variable in bfin-tdep.cTom Tromey2-1/+6
This changes bfin_push_dummy_call to use the result of check_typedef. Calling check_typedef for effect was probably ok as well, but this seemed a little nicer. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not value_type.
2018-07-22Unused variable fixes related to conditional compilationTom Tromey7-9/+28
This patch fixes various unused variable warnings that are related to conditional compilation. In these cases, either the variable is now protected by the same #if as its uses, or the declaration is simply lowered into the conditionally-compiled block. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * windows-nat.c (saved_context): Conditionally define. * remote.c (remote_target::remote_btrace_maybe_reopen): Conditionally declare "warned". * inflow.c (sigquit_ours): Conditionally define. (new_tty): Move "tty" declaration inside #if. * guile/guile.c (guile_datadir): Conditionally define. * charset.c (set_be_le_names): Move some declarations inside #if. * btrace.c (parse_xml_btrace): Move "errcode" declaration inside #if. (parse_xml_btrace_conf): Likewise.
2018-07-22Remove an unused variable from spu_get_overlay_tableTom Tromey2-2/+6
This removes an unused variable from spu_get_overlay_table, replacing it with an explanatory comment. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2018-07-22Simple unused variable removalsTom Tromey50-100/+97
This patch holds all the straightforward unused variable deletions. gdb/ChangeLog 2018-07-22 Tom Tromey <tom@tromey.com> * guile/scm-value.c (gdbscm_value_call): Remove unused variables. * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow) (vlscm_convert_typed_value_from_scheme): Remove unused variable. * buildsym-legacy.c (get_macro_table): Remove unused variable. * stack.c (frame_apply_level_command): Remove unused variable. * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable. * sparc64-tdep.c (adi_examine_command): Remove unused variable. * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove unused variable. * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable. * mep-tdep.c (mep_push_dummy_call): Remove unused variable. * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused variable. * amd64-tdep.c (amd64_supply_xsave): Remove unused variable. * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused variable. * breakpoint.c (check_no_tracepoint_commands, update_watchpoint): Remove unused variable. * cli/cli-script.c (recurse_read_control_structure): Remove unused variable. * common/tdesc.c (print_xml_feature::visit): Remove unused variable. * compile/compile-object-load.c (store_regs): Remove unused variables. * complaints.c (clear_complaints): Remove unused variable. * corelow.c (core_target_open): Remove unused variable. * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused variable. * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused variable. * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused variable. * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused variable. * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused variable. * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused variable. * ia64-tdep.c (examine_prologue): Remove unused variable. * infcall.c (run_inferior_call): Remove unused variable. * inferior.c (exit_inferior): Remove unused variable. * infrun.c (infrun_thread_ptid_changed): Remove unused variable. * linespec.c (decode_line_2): Remove unused variable. * linux-nat.c (super_close): Remove. * linux-tdep.c (linux_info_proc): Remove unused variable. * mi/mi-main.c (mi_execute_command): Remove unused variable. * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache): Remove unused variable. * parse.c (find_minsym_type_and_address): Remove unused variable. * printcmd.c (info_symbol_command, printf_floating): Remove unused variable. * python/py-breakpoint.c (bppy_set_commands): Remove unused variable. * python/py-unwind.c (unwind_infopy_dealloc): Remove unused variables. * record-btrace.c (record_btrace_target::store_registers): Remove unused variable. (cmd_show_record_btrace_cpu): Remove unused variable. * riscv-tdep.c (riscv_register_reggroup_p) (riscv_push_dummy_call, riscv_return_value): Remove unused variable. * rust-exp.y (literal): Remove unused variable. * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove unused variable. <STRUCTOP_ANONYMOUS>: Likewise. * s390-linux-tdep.c (s390_linux_init_abi_31) (s390_linux_init_abi_64): Remove unused variable. * ser-ming2.c (ser_windows_read_prim, pipe_select_thread) (file_select_thread, net_windows_open, _initialize_ser_windows): Remove unused variables. * symtab.c (find_pc_sect_line): Remove unused variable. * target-memory.c (compute_garbled_blocks): Remove unused variable. (target_write_memory_blocks): Remove unused variable. * target.c (target_stack::unpush): Remove unused variables. * tracepoint.c (start_tracing, all_tracepoint_actions) (merge_uploaded_trace_state_variables) (print_one_static_tracepoint_marker): Remove unused variable. * unittests/basic_string_view/element_access/char/1.cc (test01): Remove unused variable. * windows-nat.c (windows_continue, windows_add_all_dlls) (do_initial_windows_stuff, windows_nat_target::create_inferior): Remove unused variables.
2018-07-22x86: Determine vector length from the last vector operandH.J. Lu2-10/+31
Determine VEX/EVEXE vector length from the last multi-length vector operand. * config/tc-i386.c (build_vex_prefix): Determine vector length from the last multi-length vector operand. (build_evex_prefix): Likewise.
2018-07-21Fix -Wunused-variable warnings related to conditional compilationSimon Marchi3-9/+16
Some variables are not used when !HAVE_ELF, so avoid declaring them in that case. gdb/ChangeLog: * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and attr_profile in HAVE_ELF. * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in HAVE_ELF.
2018-07-22Automatic date update in version.inGDB Administrator1-1/+1
2018-07-21gas/config/tc-i386.c: Break long lineH.J. Lu2-4/+11
* config/tc-i386.c (match_simd_size): Break long line. (match_mem_size): Likewise.
2018-07-21Initialize GOT slot for local symbol in non-PIC link.Eric Botcazou2-28/+45
On ARM/VxWorks 7, the R_ARM_TARGET2 relocation used for exception handling is R_ARM_GOT_PREL; moreover in Ada you can define local exceptions. In this case, you may end up with a GOT relocation against a local symbol in a non-PIC link and the ARM linker leaves the GOT slot uninitialized, unlike for example the i386 or the SPARC linkers in the same situation. bfd/ * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small cleanup for the case of a global symbol that binds locally. Also install a value in the GOT slot in the case of a local symbol in a non-PIC link.
2018-07-20Rename some frame unwind function parametersSimon Marchi3-25/+41
I am currently working with these functions, and though this renaming could help to reason about the code. Some functions take a frame and will return the value associated to that frame, others will return the value associated to the previous frame. Those usually conveniently contain "unwind" in their name, but naming the variable next_frame instead of frame helps remembering which frame we are dealing with. I also included a little typo fix at the top of frame.h. gdb/ChangeLog: * frame.c (frame_register_unwind): Change parameter name. (frame_unwind_register): Likewise. (frame_unwind_register_value): Likewise. (frame_unwind_register_signed): Likewise. (frame_unwind_register_unsigned): Likewise. * frame.h (frame_register_unwind): Likewise. (frame_unwind_register): Likewise. (frame_unwind_register_value): Likewise. (frame_unwind_register_signed): Likewise. (frame_unwind_register_unsigned): Likewise. (frame_unwind_arch): Likewise.
2018-07-21Automatic date update in version.inGDB Administrator1-1/+1