aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-10-08Automatic date update in version.inGDB Administrator1-1/+1
2016-10-07Document the GDB 7.12 release in gdb/ChangeLogJoel Brobecker1-0/+4
gdb/ChangeLog: GDB 7.12 released.
2016-10-07Fold arithmetic integer expressions falloutAlan Modra2-6/+14
* ldexp.c (MAX): Define. (exp_unop, exp_binop, exp_trinop): Alloc at least enough for etree_type.value.
2016-10-07[AArch64] PR target/20667, fix disassembler for the "special" optional ↵Jiong Wang5-4/+176
SYS_Rt operand for "ic"/"tlbi" gas/ PR target/20667 * testsuite/gas/aarch64/sys-rt-reg.s: Test source for instructions using SYS_Rt reg. * testsuite/gas/aarch64/sys-rt-reg.d: New testcase. opcodes/ PR target/20667 * aarch64-opc.c (aarch64_print_operand): Always print operand if it's available.
2016-10-07Set regdir in tdesc-regs.exp or armYao Qi2-0/+5
0a69eedb (Clean up the XML files for ARM) moves arm-*.xml files to arm/ directory, so need update gdb.xml/tdesc-regs.exp accordingly. gdb/testsuite: 2016-10-07 Yao Qi <yao.qi@linaro.org> * gdb.xml/tdesc-regs.exp: Set regdir to "arm/".
2016-10-07python: accept address and explicit locations in gdb.decode_lineMarkus Metzger4-1/+17
The gdb.decode_line python function is documented to support the same location expressions as the "break" command. It currently expects a linespec location. Instead of creating a linespec location directly, create the location via string_to_event_location_basic.
2016-10-07Pass link_info to _bfd_merge_private_bfd_dataAlan Modra63-139/+275
Most BFD linker functions take a bfd_link_info param, which reinforces the fact that they are linker functions and allow access to linker callbacks, eg. einfo for printing errors. I was going to use einfo for --fatal-warnings support before I decided a better way was the patch commit 4519d071. bfd/ * targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace obfd param with struct bfd_link_info param. Update all callers. * linker.c (bfd_merge_private_bfd_data): Likewise. (_bfd_generic_verify_endian_match): Likewise. * aoutf1.h (sunos_merge_private_bfd_data): Likewise. * coff-arm.c (coff_arm_merge_private_bfd_data): Likewise. * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise. * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise. (_bfd_elf_merge_object_attributes): Likewise. * elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise. * elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise. * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise. (elf32_arm_merge_private_bfd_data): Likewise. * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise. * elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise. * elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise. * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise. * elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise. * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise. * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise. * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise. * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise. * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise. * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise. * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise. * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise. (elf32_msp430_merge_private_bfd_data): Likewise. * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise. * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise. * elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise. * elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise. (ppc_elf_merge_obj_attributes): Likewise. (ppc_elf_merge_private_bfd_data): Likewise. * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise. * elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise. * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise. (elf32_score_merge_private_bfd_data): Likewise. * elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise. * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise. * elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise. * elf32-sh64.c (sh64_elf_merge_private_data): Likewise. * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise. * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise. (elf32_tic6x_merge_private_bfd_data): Likewise. * elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise. * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise. * elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise. * elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise. * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise. * elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise. * elf64-sh64.c (sh_elf64_merge_private_data): Likewise. * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise. * elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise. * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise. * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise. (mips_elf_merge_obj_attributes): Likewise. (_bfd_mips_elf_merge_private_bfd_data): Likewise. * elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise. * elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise. * elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. * elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise. * elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise. * libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. ld/ * ldlang.c (lang_check): Update bfd_merge_private_bfd_data call.
2016-10-07bfd_merge_private_bfd_data tidyAlan Modra21-163/+159
bfd_merge_private_bfd_data and _bfd_generic_verify_endian_match are linker functions, so move them to linker.c. bfd/ * Makefile.am (LIBBFD_H_FILES): Update. * doc/Makefile.am (LIBBFD_H_DEP): Likewise. * cpu-sh.c (sh_merge_bfd_arch): Move to.. * elf32-sh.c: ..here, and make static. * elf32-arc.c (arc_elf_merge_private_bfd_data): Delete extraneous error. * elf32-cris.c (cris_elf_merge_private_bfd_data): Don't call _bfd_generic_verify_endian_match. * elf32-microblaze.c (microblaze_elf_merge_private_bfd_data): Delete. (bfd_elf32_bfd_merge_private_bfd_data): Define as _bfd_generic_verify_endian_match. * elf32-mt.c (mt_elf_merge_private_bfd_data): Don't test boolean == FALSE. * elf32-xgate.c (_bfd_xgate_elf_merge_private_bfd_data): Delete. (bfd_elf32_bfd_merge_private_bfd_data): Don't define. * elf32-xgate.h (_bfd_xgate_elf_merge_private_bfd_data): Delete. * libbfd-in.h (_bfd_generic_verify_endian_match): Delete. * libbfd.c (_bfd_generic_verify_endian_match): Move to.. * linker.c: ..here, and make internal. * bfd.c (bfd_merge_private_bfd_data): Move to.. * linker.c: ..here. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. opcodes/ * sh-opc.h (sh_merge_bfd_arch): Delete prototype.
2016-10-07Add is_generic_elf to ld/ld-lib.expAlan Modra3-13/+26
* testsuite/lib/ld-lib.exp (is_generic_elf): New, extracted from.. * testsuite/ld-elf/elf.exp: ..here.
2016-10-07Automatic date update in version.inGDB Administrator1-1/+1
2016-10-06Consolidate API of target_supports_multi_processSergio Durigan Junior7-10/+37
This simple commit consolidates the API of target_supports_multi_process. Since both GDB and gdbserver use the same function prototype, all that was needed was to move create this prototype on gdb/target/target.h and turn the macros declared on gdb/{,gdbserver/}target.h into actual functions. Regtested (clean pass) on the BuildBot. gdb/ChangeLog: 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com> * target.c (target_supports_multi_process): New function, moved from... * target.h (target_supports_multi_process): ... here. Remove macro. * target/target.h (target_supports_multi_process): New prototype. gdb/gdbserver/ChangeLog: 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com> * target.c (target_supports_multi_process): New function, moved from... * target.h (target_supports_multi_process): ... here. Remove macro.
2016-10-06gdb: Remove some C compiler support leftoversPedro Alves8-44/+30
Remove some __cplusplus checks, inline EXPORTED_CONST, and update some comments. gdb/ChangeLog: 2016-10-06 Pedro Alves <palves@redhat.com> * cp-valprint.c (vtbl_ptr_name): Write "extern const" instead of EXPORTED_CONST. * stub-termcap.c: Remove __cplusplus checks. * common/common-defs.h [!__cplusplus] (EXTERN_C, EXTERN_C_PUSH, EXTERN_C_POP): Delete. * common/common-exceptions.h (GDB_XCPT_SJMP): Update comments. (GDB_XCPT) [!__cplusplus]: Delete. (throw_exception, throw_exception_sjlj): Update comments. * guile/guile-internal.h (as_a_scm_t_subr) [!__cplusplus]: Delete. * guile/guile.c (extension_language_guile): Write "extern const" instead of EXPORTED_CONST. * features/feature_to_c.sh: Don't emit !__cplusplus code. Write "extern const" instead of EXPORTED_CONST.
2016-10-06Fix gdb.Value->python conversion for large unsigned ints.Doug Evans4-1/+18
gdb/ChangeLog: * python/py-value.c (valpy_long): Handle unsigned values. gdb/testsuite/ChangeLog: * gdb.python/py-value.exp (test_value_creation): Add test for large unsigned 64-bit value.
2016-10-06frame.h: Forward-declare struct ui_outSimon Marchi2-0/+5
Fixes this failure when building in C mode. I think it's relevant for master as well, since it's a good practice to include (or forward-declare) what you use. In file included from ../../binutils-gdb/gdb/gdbarch.h:38:0, from ../../binutils-gdb/gdb/defs.h:653, from ../../binutils-gdb/gdb/dictionary.c:23: ../../binutils-gdb/gdb/frame.h:710:48: warning: ‘struct ui_out’ declared inside parameter list will not be visible outside of this definition or declaration extern void print_stack_frame_to_uiout (struct ui_out *uiout, gdb/ChangeLog: * frame.h: Forward-declare struct ui_out.
2016-10-06Remove Java supportTom Tromey47-4808/+126
This patch removes the Java support from gdb. gcj has not seen much development or use for years now, and was recently removed from GCC. This patch changes gdb to follow; in the unlikely event that there are still users using gcj, they can continue to use an older gdb to debug. Or, they can debug in C++ mode. Built and regtested on x86-64 Fedora 24. 2016-10-06 Tom Tromey <tom@tromey.com> * MAINTAINERS: Remove Java test maintainer. * varobj.h (java_varobj_ops): Don't declare. * valprint.h (struct value_print_options) <pascal_static_field_print>: Update comment. * utils.c (producer_is_gcc): Remove java reference. * symtab.h (struct general_symbol_info): Remove java references. (SYMBOL_SEARCH_NAME): Likewise. * objfiles.c (allocate_objfile): Update comment. * linespec.c (find_linespec_symbols): Remove java references. * gnu-v3-abi.c (gnuv3_rtti_type, gnuv3_baseclass_offset): Remove java references. * gdbtypes.h (struct cplus_struct_type) <is_java>: Remove. (TYPE_CPLUS_REALLY_JAVA): Remove. * c-varobj.c (enum vsections): Update comment. * symtab.c (symbol_set_language, symbol_set_names) (symbol_natural_name, symbol_demangled_name) (demangle_for_lookup, symbol_matches_domain) (default_make_symbol_completion_list_break_on_1): Remove java references. (JAVA_PREFIX, JAVA_PREFIX_LEN): Remove. * psymtab.c (match_partial_symbol, psymtab_search_name) (lookup_partial_symbol): Remove java references. * dwarf2read.c (find_slot_in_mapped_hash): Remove java references. (add_partial_symbol, dwarf2_compute_name, dwarf2_physname) (dwarf2_add_member_fn, is_vtable_name, read_structure_type) (process_structure_scope, read_subroutine_type) (read_subrange_type, load_partial_dies) (new_symbol_full, determine_prefix, typename_concat) (dwarf2_name): Remove java references. (set_cu_language): Treat Java as C++. * c-typeprint.c (c_type_print_args): Remove java reference. * defs.h (enum language) <language_java>: Remove. * Makefile.in (SFILES, HFILES_NO_SRCDIR, COMMON_OBS, YYFILES) (YYOBJ, local-maintainer-clean): Don't mention java files. * jv-exp.y, jv-lang.c, jv-lang.h, jv-typeprint.c, jv-valprint.c, jv-varobj.c: Remove. 2016-10-06 Tom Tromey <tom@tromey.com> * guile.texi (Types In Guile): Remove Java mentions. * python.texi (Types In Python): Remove Java mentions. * gdb.texinfo (Address Locations, Supported Languages) (Index Section Format): Remove Java mentions. 2016-10-06 Tom Tromey <tom@tromey.com> * gdb.compile/compile.exp: Change java tests to rust. * gdb.base/setshow.exp: Change java tests to rust. * gdb.base/default.exp: Remove java from language list. * README (Examples): Update language example. * gdb.python/py-lookup-type.exp (test_lookup_type): Remove java test. * lib/gdb.exp (skip_java_tests): Remove. * lib/java.exp: Remove. * gdb.java: Remove.
2016-10-06mips-tdep: Make FCRs always 32-bitMaciej W. Rozycki5-1/+94
Fix a regression from commit f8b73d13b7ca ("Target-described register support for MIPS"), <https://sourceware.org/ml/gdb-patches/2007-05/msg00340.html>, <https://sourceware.org/ml/gdb-patches/2007-06/msg00256.html>, which caused Floating Point Control Registers (FCRs) to be shown as 64-bit with 64-bit targets. This came from the legacy register format where all raw registers matched the width of the architecture regardless of their actual size. The correct size was then set in `mips_register_type' for cooked registers presented to the user, which in the case of FCRs meant the cooked size was always forced to 32 bits, reflecting their actual hardware size, even though the raw format carried them in 64-bit quantities on 64-bit targets. The upper 32 bits carried in the raw FCR format have always been don't-cares, not actually retrieved from hardware and never written back. With the introduction of XML register descriptions the layout of previously defined raw registers has been preserved, so as to keep existing register handling code unchanged and make it easier for GDB and `gdbserver' to interact with each other whether neither, either or both parties talking over RSP support XML register descriptions. For the XML-described case however `mips_register_type' is not used in raw to cooked register conversion, so any special cases coded there are not taken into account. Instead a new function, `mips_pseudo_register_type', has been introduced to handle size conversion, however lacking the special case for FCRs for the Linux and the now defunct IRIX target. The correct size has been maintained for embedded targets however, due to the bundling of FCRs with the embedded registers under the `rawnum >= MIPS_EMBED_FP0_REGNUM + 32' condition. Add the missing case to `mips_pseudo_register_type' then, referring to the FCR indices explicitly, and observing that between `MIPS_EMBED_FP0_REGNUM + 32' and `MIPS_FIRST_EMBED_REGNUM' there is an unused register slot whose contents are ignored so with the removal of embedded FCRs from under that condition we don't have to care about it and we can refer to the embedded registers starting from MIPS_FIRST_EMBED_REGNUM instead. Add a test case too so that we have means to check automatically that the correct user-visible size of FCRs is maintained. gdb/ * mips-tdep.c (mips_pseudo_register_type): Make FCRs always 32-bit. gdb/testsuite/ * gdb.arch/mips-fcr.exp: New test. * gdb.arch/mips-fcr.c: Source for the new test.
2016-10-06mips-tdep: Rearrange comments in `mips_pseudo_register_type'Maciej W. Rozycki2-11/+14
Rearrange comments throughout `mips_pseudo_register_type', placing them ahead the condtionals they apply to consistently. gdb/ * mips-tdep.c (mips_pseudo_register_type): Rearrange comments throughout.
2016-10-06[ARC] Fix parsing leave_s and enter_s mnemonics.Claudiu Zissulescu6-2/+68
gas/ 2016-10-06 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/leave_enter.d: New file. * testsuite/gas/arc/leave_enter.s: Likewise. * testsuite/gas/arc/regnames.d: Likewise. * testsuite/gas/arc/regnames.s: Likewise. * config/tc-arc.c (arc_parse_name): Don't match reg names against confirmed symbol names.
2016-10-06testsuite: solib-disc: Use `standard_output_file'Maciej W. Rozycki2-2/+7
Correct a commit 2151ccc56c74 ("Always organize test artifacts in a directory hierarchy") regression causing: Running .../gdb/testsuite/gdb.base/solib-disc.exp ... gdb compile failed, Assembler messages: Fatal error: can't create .../gdb/testsuite/gdb.base/so-disc-shr.c.o: No such file or directory by using `standard_output_file' to construct output file names throughout. gdb/testsuite/ * gdb.base/solib-disc.exp: Use `standard_output_file' throughout.
2016-10-06Add workaround for bash 4.2 scripting problem.Ludovic Court?s2-1/+8
* emulparams/elf32bmipn32-defs.sh: Shift quote of "x$EMULATION_NAME" to the left to work around <http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-007>.
2016-10-06stack: fix gdb.dwarf2/dw2-undefined-ret-addr.exp regressionMarkus Metzger2-1/+6
Commit a038fa3e14a4 stack: check frame_unwind_caller_id adds a frame_id check to frame_info and treats a missing frame_id as NOT_AVAILABLE_ERROR. This causes a regression in gdb.dwarf2/dw2-undefined-ret-addr.exp. Treat a missing frame_id as OPTIMIZED_OUT_ERROR instead. See also https://sourceware.org/ml/gdb-patches/2016-07/msg00273.html.
2016-10-06-Wimplicit-fallthrough dodgy fixesAlan Modra3-4/+9
The comment logically belongs inside the preprocessor conditional, but gcc's -Wimplicit-fallthrough loses track of it. Revert when/if https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817 is fixed. * app.c (do_scrub_chars): Move fall through comment. * expr.c (operand): Likewise.
2016-10-06Add fall through comment to source in cpu/Alan Modra2-0/+5
I edited opcodes/mep-asm.c in 1a0670f3 without noticing it was a generated file. * mep.opc (expand_string): Add fall through comment.
2016-10-06[GOLD] two more fall-through commentsAlan Modra3-4/+9
* powerpc.cc (Target_powerpc::Relocate::relocate): Add fall through comment. * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise.
2016-10-06Fix PR11094: JIT breakpoint is not properly recreated on rerunsPedro Alves7-43/+226
Even though this was supposedly in the gdb 7.2 timeframe, the testcase in PR11094 crashes current GDB with a segfault: Program received signal SIGSEGV, Segmentation fault. 0x00000000005ee894 in event_location_to_string (location=0x0) at src/gdb/location.c:412 412 if (EL_STRING (location) == NULL) (top-gdb) bt #0 0x00000000005ee894 in event_location_to_string (location=0x0) at src/gdb/location.c:412 #1 0x000000000057411a in print_breakpoint_location (b=0x18288e0, loc=0x0) at src/gdb/breakpoint.c:6201 #2 0x000000000057483f in print_one_breakpoint_location (b=0x18288e0, loc=0x182cf10, loc_number=0, last_loc=0x7fffffffd258, allflag=1) at src/gdb/breakpoint.c:6473 #3 0x00000000005751e1 in print_one_breakpoint (b=0x18288e0, last_loc=0x7fffffffd258, allflag=1) at src/gdb/breakpoint.c:6707 #4 0x000000000057589c in breakpoint_1 (args=0x0, allflag=1, filter=0x0) at src/gdb/breakpoint.c:6947 #5 0x0000000000575aa8 in maintenance_info_breakpoints (args=0x0, from_tty=0) at src/gdb/breakpoint.c:7026 [...] This is GDB trying to print the location spec of the JIT event breakpoint, but that's an internal breakpoint without one. If I add a NULL check, then we see that the JIT breakpoint is now pending (because its location has shlib_disabled set): (gdb) maint info breakpoints Num Type Disp Enb Address What [...] -8 jit events keep y <PENDING> inf 1 [...] But that's incorrect. GDB should have managed to recreate the JIT breakpoint's location for the second run. So the problem is elsewhere. The problem is that if the JIT loads at the same address on the second run, we never recreate the JIT breakpoint, because we hit this early return: static int jit_breakpoint_re_set_internal (struct gdbarch *gdbarch, struct jit_program_space_data *ps_data) { [...] if (ps_data->cached_code_address == addr) return 0; [...] delete_breakpoint (ps_data->jit_breakpoint); [...] ps_data->jit_breakpoint = create_jit_event_breakpoint (gdbarch, addr); Fix this by deleting the breakpoint and discarding the cached code address when the objfile where the previous JIT breakpoint was found is deleted/unloaded in the first place. The test that was originally added for PR11094 doesn't trip on this because: #1 - It doesn't test the case of the JIT descriptor's address _not_ changing between reruns. #2 - And then it doesn't do "maint info breakpoints", or really anything with the JIT at all. #3 - and even then, to trigger the problem the JIT descriptor needs to be in a separate library, while the current test puts it in the main program. The patch extends the test to cover all combinations of these scenarios. gdb/ChangeLog: 2016-10-06 Pedro Alves <palves@redhat.com> * jit.c (free_objfile_data): Delete the JIT breakpoint and clear the cached code address. gdb/testsuite/ChangeLog: 2016-10-06 Pedro Alves <palves@redhat.com> * gdb.base/jit-simple-dl.c: New file. * gdb.base/jit-simple-jit.c: New file, factored out from ... * gdb.base/jit-simple.c: ... this. * gdb.base/jit-simple.exp (jit_run): Delete. (build_jit): New proc. (jit_test_reread): Recompile either the main program or the shared library, depending on what is being tested. Skip changing address if caller wants to. Compare before/after addresses. If testing standalone, explicitly load the binary. Test "maint info breakpoints". (top level): Add "standalone vs shared lib" and "change address" vs "same address" axes.
2016-10-06Fix a few gdb.base/jit-simple.exp problemsPedro Alves2-30/+33
I noticed that we sometimes get this: (gdb) print &__jit_debug_descriptor $1 = (struct jit_descriptor *) 0x601040 <__jit_debug_descriptor> (gdb) PASS: gdb.base/jit-simple.exp: blah 1 [...] (gdb) run [...] Starting program: build/gdb/testsuite/outputs/gdb.base/jit-simple/jit-simple Unsupported JIT protocol version 4 in descriptor (expected 1) Breakpoint 2, main () at src/gdb/testsuite/gdb.base/jit-simple.c:36 36 return 0; (gdb) print &__jit_debug_descriptor $2 = (struct jit_descriptor *) 0x601040 <__jit_debug_descriptor> (gdb) PASS: gdb.base/jit-simple.exp: blah 1 All tests PASSed, but note the "Unsupported JIT protocol version 4" message. Also notice that "__jit_debug_descriptor" has the same address before and after the rerun, while the test is built in a way that should make that address change between runs. The test doesn't catch any of this because it doesn't compare before/after addresses. And then notice the "blah 1" test messages. "blah" is clearly a WIP message, but it should be at least "blah 2" the second time. :-) The reason this sometimes happens is that the test recompiles the program and expects gdb to reload it automaticallyt on "run". However, if the original program and the new recompilation happen to be in the same second, then gdb does not realize that the binary needs to be reloaded. (This is an old problem out of scope of this series.) If that happens, then GDB ends up using the wrong symbols for the program that it spawns, reads the JIT descriptor out of the wrong address, finds garbage, and prints that "unsupported version" notice. Fix that in the same way gdb.base/reread.exp handles it -- by sleeping one second before recompiling. gdb/testsuite/ChangeLog: 2016-10-06 Pedro Alves <palves@redhat.com> * gdb.base/jit-simple.exp (top level) Delete get_compiler_info call. (jit_run): Delete. (jit_test_reread): Use with_test_prefix. Reload the main binary explicitly. Compare the before/after addresses of the JIT descriptor.
2016-10-06Remove redundant assignment in gprof.Tom Tromey2-1/+6
PR gprof/20656 * source.c (annotate_source): Delete redundant assignment to new_line.
2016-10-06Refine .cfi_sections check to only consider compact eh_frameMatthew Fortune5-1/+42
The .cfi_sections directive can be safely used multiple times with different sections named at any time unless the compact form of exception handling is requested after CFI information has been emitted. Only the compact form of CFI information changes the way in which CFI is generated and therefore cannot be retrospectively requested after generating CFI information. gas/ PR gas/20648 * dw2gencfi.c (dot_cfi_sections): Refine the check for inconsistent .cfi_sections to only consider compact vs non compact forms. * testsuite/gas/cfi/cfi-common-9.d: New file. * testsuite/gas/cfi/cfi-common-9.s: New file. * testsuite/gas/cfi/cfi.exp: Run new test.
2016-10-06Make "end" field in feature specs required again.Doug Evans24-173/+206
Newer gdbservers may be talking to older gdbs, and older gdbs will flag a missing "end" as an error. So just make "end" required again, and for compatibility change the default field type to "bool". gdb/ChangeLog: 2016-10-06 Doug Evans <dje@google.com> * features/aarch64-core.xml (cpsr_flags): Elide "type" and specify "end" in all fields. * features/aarch64.c: Regenerate. * features/i386/32bit-mpx.xml (_bndcfgu): Specify type of "preserved" and "enabled" fields. Correct size of "enabled" field. * features/i386/64bit-mpx.xml (_bndcfgu): Specify type of "preserved" and "enabled" fields. * features/i386/i386-avx-mpx-linux.c: Regenerate. * features/i386/i386-avx-mpx.c: Regenerate. * features/i386/i386-avx512-linux.c: Regenerate. * features/i386/i386-avx512.c: Regenerate. * features/i386/i386-mpx-linux.c: Regenerate. * features/i386/i386-mpx.c: Regenerate. * features/arc-arcompact.c: Regenerate. * features/arc-v2.c: Regenerate. * xml-tdesc.c (tdesc_start_field): Require "end" spec. Single bit fields default to "bool" type. Revert 2016-03-15 Doug Evans <dje@google.com> * features/i386/32bit-core.xml (i386_eflags): Remove "end" spec. * features/i386/32bit-sse.xml (i386_eflags): Ditto. * features/i386/64bit-core.xml (i386_eflags): Ditto. * features/i386/64bit-sse.xml (i386_eflags): Ditto. * features/i386/x32-core.xml (i386_eflags): Ditto. gdb/doc/ChangeLog: 2016-10-06 Doug Evans <dje@google.com> * gdb.texinfo (Target Description Format): Update docs on "end" field spec and field default type. gdb/testsuite/ChangeLog: 2016-10-06 Doug Evans <dje@google.com> * gdb.xml/extra-regs.xml: Update, end field now required, default type for single bitfields is bool. * gdb.xml/tdesc-regs.exp: Ditto.
2016-10-06Automatic date update in version.inGDB Administrator1-1/+1
2016-10-06-Wimplicit-fallthrough warning fixesAlan Modra96-63/+415
Comment changes. bfd/ * coff-h8300.c: Spell fall through comments consistently. * coffgen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-ppc.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf64-ppc.c: Likewise. * elfxx-aarch64.c: Likewise. * elfxx-mips.c: Likewise. * cpu-ns32k.c: Add missing fall through comments. * elf-m10300.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-frv.c: Likewise. * elf32-i386.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-nds32.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-tic6x.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * ieee.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * srec.c: Likewise. * versados.c: Likewise. opcodes/ * aarch64-opc.c: Spell fall through comments consistently. * i386-dis.c: Likewise. * aarch64-dis.c: Add missing fall through comments. * aarch64-opc.c: Likewise. * arc-dis.c: Likewise. * arm-dis.c: Likewise. * i386-dis.c: Likewise. * m68k-dis.c: Likewise. * mep-asm.c: Likewise. * ns32k-dis.c: Likewise. * sh-dis.c: Likewise. * tic4x-dis.c: Likewise. * tic6x-dis.c: Likewise. * vax-dis.c: Likewise. binutils/ * dlltool.c: Spell fall through comments consistently. * objcopy.c: Likewise. * readelf.c: Likewise. * dwarf.c: Add missing fall through comments. * elfcomm.c: Likewise. * sysinfo.y: Likewise. * readelf.c: Likewise. Also remove extraneous comments. gas/ * app.c: Add missing fall through comments. * dw2gencfi.c: Likewise. * expr.c: Likewise. * config/tc-alpha.c: Likewise. * config/tc-arc.c: Likewise. * config/tc-arm.c: Likewise. * config/tc-cr16.c: Likewise. * config/tc-crx.c: Likewise. * config/tc-dlx.c: Likewise. * config/tc-h8300.c: Likewise. * config/tc-hppa.c: Likewise. * config/tc-i370.c: Likewise. * config/tc-i386.c: Likewise. * config/tc-i960.c: Likewise. * config/tc-ia64.c: Likewise. * config/tc-m68hc11.c: Likewise. * config/tc-m68k.c: Likewise. * config/tc-mep.c: Likewise. * config/tc-metag.c: Likewise. * config/tc-microblaze.c: Likewise. * config/tc-mips.c: Likewise. * config/tc-ns32k.c: Likewise. * config/tc-rx.c: Likewise. * config/tc-score.c: Likewise. * config/tc-score7.c: Likewise. * config/tc-sh.c: Likewise. * config/tc-tic4x.c: Likewise. * config/tc-vax.c: Likewise. * config/tc-xstormy16.c: Likewise. * config/tc-z80.c: Likewise. * config/tc-z8k.c: Likewise. * config/obj-elf.c: Likewise. * config/tc-i386.c: Likewise. * depend.c: Spell fall through comments consistently. * config/tc-arm.c: Likewise. * config/tc-d10v.c: Likewise. * config/tc-i960.c: Likewise. * config/tc-ia64.c: Likewise. * config/tc-m68k.c: Likewise. * config/tc-mcore.c: Likewise. * config/tc-mep.c: Likewise. * config/tc-ns32k.c: Likewise. * config/tc-visium.c: Likewise. * config/tc-xstormy16.c: Likewise. * config/tc-z8k.c: Likewise. gprof/ * gprof.c: Add missing fall through comments. ld/ * lexsup.c: Spell fall through comments consistently and add missing fall through comments.
2016-10-06-Wimplicit-fallthrough noreturn fixesAlan Modra10-66/+26
binutils/ * cxxfilt.c (usage): Add ATTRIBUTE_NORETURN. * elfedit.c (usage): Likewise. * nm.c (usage): Likewise. * objcopy.c (copy_usage, strip_usage): Likewise. * srconv.c (show_usage): Likewise. * strings.c (usage): Likewise. * sysdump.c (show_usage): Likewise. * srconv.c: Remove unneeded forward function declarations. * strings.c: Likewise. * sysdump.c: Likewise. gas/ * as.h (as_assert): Add ATTRIBUTE_NORETURN.
2016-10-06-Wimplicit-fallthrough error fixesAlan Modra22-111/+162
Well, not all are errors, but a little more substantive than just fiddling with comments. bfd/ * coffcode.h (coff_slurp_symbol_table): Revert accidental commit made 2015-01-08. * elf32-nds32.c (nds32_elf_grok_psinfo): Add missing break. * reloc.c (bfd_default_reloc_type_lookup): Add missing breaks. opcodes/ * arc-ext.c (create_map): Add missing break. * msp430-decode.opc (encode_as): Likewise. * msp430-decode.c: Regenerate. binutils/ * coffdump.c (dump_coff_where): Add missing break. * stabs.c (stab_xcoff_builtin_type): Likewise. gas/ * config/tc-arc.c (find_opcode_match): Add missing break. * config/tc-i960.c (get_cdisp): Likewise. * config/tc-metag.c (parse_swap, md_apply_fix): Likewise. * config/tc-mt.c (md_parse_option): Likewise. * config/tc-nds32.c (nds32_apply_fix): Likewise. * config/tc-hppa.c (pa_ip): Assert rather than testing last condition of multiple if statements. * config/tc-s390.c (s390_exp_compare): Return 0 on error. * config/tc-tic4x.c (tic4x_operand_parse): Add as_bad and break out of case rather than falling into next case. Formatting. ld/ * plugin.c (asymbol_from_plugin_symbol): Avoid compiler warning by adding return.
2016-10-06[GOLD] -Wimplicit-fallthrough warning fixesAlan Modra10-18/+47
* aarch64.cc: Spell fall through comments as "// Fall through.". * arm.cc: Likewise. * mips.cc: Likewise. * powerpc.cc: Likewise. * s390.cc: Likewise. * sparc.cc: Likewise. * x86_64.cc: Likewise. * powerpc.cc (Target_powerpc::Relocate::relocate): Add missing fall through comments. * sparc.cc: (Target_sparc::Scan::global): Likewise. (Target_sparc::Relocate::relocate): Likewise. * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise. * resolve.cc (symbol_to_bits): Add missing break.
2016-10-06bison warning fixesAlan Modra3-2/+7
* config/rl78-parse.y: Don't use deprecated %name-prefix. * config/rx-parse.y: Likewise.
2016-10-06Don't use boolean OR in arithmetic expressionsAlan Modra5-4/+15
bfd/ * elf32-epiphany.c (epiphany_final_link_relocate): Use bitwise OR in arithmetic expression, not boolean OR. opcodes/ * cr16-dis.c (print_insn_cr16): Don't use boolean OR in arithmetic. * crx-dis.c (print_insn_crx): Likewise.
2016-10-05testsuite: Fix recent GCC FAIL: gdb.arch/i386-signal.expJan Kratochvil2-1/+5
gcc-6.2.1-2.fc24.x86_64 (gdb) backtrace 10^M (gdb) FAIL: gdb.arch/i386-signal.exp: backtrace 10 (gdb) disas/s Dump of assembler code for function main: .../gdb/testsuite/gdb.arch/i386-signal.c: 30 { 0x000000000040057f <+0>: push %rbp 0x0000000000400580 <+1>: mov %rsp,%rbp 31 setup (); 0x0000000000400583 <+4>: callq 0x400590 <setup> => 0x0000000000400588 <+9>: mov $0x0,%eax 32 } 0x000000000040058d <+14>: pop %rbp 0x000000000040058e <+15>: retq End of assembler dump. The .exp patch is an obvious typo fix I think. The regex was written to accept "ADDR in main" and I find it OK as checking .debug_line validity is not the purpose of this testfile. gcc-4.8.5-11.el7.x86_64 did not put the 'mov $0x0,%eax' instruction there at all so there was no problem with .debug_line. gdb/testsuite/ChangeLog 2016-10-05 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo.
2016-10-05PR remote/20655 - small fix in handle_tracepoint_bkptsTom Tromey2-1/+7
handle_tracepoint_bkpts has two parallel "if"s. This changes the second one to check ipa_error_tracepoint, which seems to be what was intended. 2016-10-05 Tom Tromey <tom@tromey.com> PR remote/20655: * tracepoint.c (handle_tracepoint_bkpts): Check ipa_error_tracepoint, not ipa_stopping_tracepoint.
2016-10-05PR gdb/20653 - small cleanup in string_to_explicit_locationTom Tromey2-1/+6
This bug points out that string_to_explicit_location compares a char* against '\0'; whereas comparing against NULL is more normal. 2016-10-05 Tom Tromey <tom@tromey.com> PR breakpoints/20653: * location.c (string_to_explicit_location): Use NULL, not '\0'.
2016-10-05PR symtab/20652 - fix psymbol_compareTom Tromey2-1/+7
This fixes an oversight in psymbol_compare. 2016-10-05 Tom Tromey <tom@tromey.com> PR symtab/20652: * psymtab.c (psymbol_compare): Correctly compare "ginfo.value" fields.
2016-10-05Skip complex types tests if gdb_skip_float_testYao Qi2-0/+12
If the target doesn't support float, we don't run float complex types tests. gdb/testsuite: 2016-10-05 Yao Qi <yao.qi@linaro.org> * lib/gdb.exp (support_complex_tests): Return zero if gdb_skip_float_test return true.
2016-10-05Fix incorrect formatting of a ChangeLog entryAnton Kolesov1-1/+1
My previous commit had an invalid formatting of a ChangeLog entry. This commit fixes that.
2016-10-05Allow DW_OP_GNU_uninit in dwarf_expr_require_compositionAndreas Arnez2-12/+12
In DWARF expression handling, some operators are required to be either at the end of an expression or followed by a composition operator. So far only the operators DW_OP_reg0-31 were allowed to be followed by DW_OP_GNU_uninit instead, and particularly DW_OP_regx was not, which is obviously inconsistent. This patch allows DW_OP_GNU_uninit after all operators requiring a composition, to simplify the code and make it more consistent. This policy may be more permissive than necessary, but in the worst case just leads to a DWARF location description resulting in an uninitialized value instead of an error message. gdb/ChangeLog: * dwarf2expr.c (dwarf_expr_require_composition): Allow DW_OP_GNU_uninit. (execute_stack_op): Use dwarf_expr_require_composition instead of copying its logic.
2016-10-05arc: Remove annoying debug messageAnton Kolesov2-3/+4
The logging message is called too often - once for each register when it's value has to be evaluated. This floods the screen for commands like "info register all", but doesn't give really any help at debugging GDB issues. Between increasing the debug level of this message and removing it altogether I think that removing it is preferable. gdb/ChangeLog: arc-tdep.c (arc_frame_prev_register): Remove annoying log message.
2016-10-05Update the path arm-*.xml files for aarch64Yao Qi2-2/+6
0a69eedb (Clean up the XML files for ARM) breaks the GDBserver build on aarch64 because some arm-*.xml files can't be found. This patch is to fix the build failure. gdb/gdbserver: 2016-10-05 Yao Qi <yao.qi@linaro.org> * configure.srv: Update the path of arm-*.xml files.
2016-10-05Regenerate some regformats/rs6000/*.dat filesYao Qi8-6/+28
If I remove all regformats/*.dat files and run make GDB=/scratch/yao/gdb/build-git/all-targets/gdb/gdb all, some powerpc .dat files are not generated. This patch fixes it by adding them to WHICH, so these .dat files can be generated. gdb: 2016-10-05 Yao Qi <yao.qi@linaro.org> * features/Makefile (WHICH): Add rs6000/powerpc-isa205-32l, rs6000/powerpc-isa205-64l, rs6000/powerpc-isa205-altivec32l, rs6000/powerpc-isa205-altivec64l, rs6000/powerpc-isa205-vsx32l and rs6000/powerpc-isa205-vsx64l. * regformats/rs6000/powerpc-isa205-32l.dat: Regenerated. * regformats/rs6000/powerpc-isa205-64l.dat: Likewise. * regformats/rs6000/powerpc-isa205-altivec32l.dat: Likewise. * regformats/rs6000/powerpc-isa205-altivec64l.dat: Likewise. * regformats/rs6000/powerpc-isa205-vsx32l.dat: Likewise. * regformats/rs6000/powerpc-isa205-vsx64l.dat: Likewise.
2016-10-05Generate s390 target description c filesYao Qi2-0/+10
If I delete all target description c files under features/ directory, and run make GDB=/scratch/yao/gdb/build-git/all-targets/gdb/gdb cfiles, some s390 target description c files are not generated. This patch adds these s390 xml files to XMLTOC, so these c files can be generated. gdb: 2016-10-05 Yao Qi <yao.qi@linaro.org> * features/Makefile (XMLTOC): Add s390-tevx-linux64.xml, s390-vx-linux64.xml, s390x-tevx-linux64.xml and s390x-vx-linux64.xml.
2016-10-05Simplify i386, amd64 and x32 expedite registersYao Qi2-28/+8
Nowadays, there are a lot of duplication about i386/{i386, amd64, x32}*-expedite in features/Makefile. However, in features/Makefile, we have echo "expedite:$(if $($*-expedite),$($*-expedite),$($(firstword $(subst -, ,$(notdir $*)))-expedite))" \ >> $(outdir)/$*.tmp which means for a given bar/foo-baz.xml, we'll look for either bar/foo-baz-expedite or foo-expedite. In x86 expedite registers, we use the former now, but it will be much simpler if we use the latter. This is what this patch does. This patch removes them, and defines three generic expedite. Re-run 'make GDB=/path/build/gdb all' to regenerate regformats/*.dat files, and they are not changed. gdb: 2016-10-05 Yao Qi <yao.qi@linaro.org> * features/Makefile: Remove i386/*-expedite. Add i386-expedite, amd64-expedite, and x32-expedite.
2016-10-05Clean up the XML files for ARMYao Qi30-36/+97
This patch is move features/arm-*.xml to features/arm/, and it is based on Terry's patch posted here https://sourceware.org/ml/gdb-patches/2014-06/msg00794.html One comment to Terry's patch is about losing "arm" prefix, and the new patch fixes this problem. gdb: 2016-10-05 Terry Guo <terry.guo@arm.com> Yao Qi <yao.qi@linaro.org> * arm-tdep.c: Adjust includes. * features/Makefile (WHICH): Add "arm/" directory to arm target descriptions. (XMLTOC): Likewise. (arm/arm-with-iwmmxt.dat): Adjust the path for dependencies. * features/arm-core.xml: Moved to ... * features/arm/arm-core.xml: ... it. * features/arm-fpa.xml: Moved to ... * features/arm/arm-fpa.xml: ... it. * features/arm-m-profile.xml: Moved to ... * features/arm/arm-m-profile.xm: ... it. * features/arm-vfpv2.xml: Moved to ... * features/arm/arm-vfpv2.xm: ... it. * features/arm-vfpv3.xml: Moved to ... * features/arm/arm-vfpv3.xml: ... it. * features/arm-with-iwmmxt.c: Moved to ... * features/arm/arm-with-iwmmxt.c: ... it. * features/arm-with-iwmmxt.xml: Moved to ... * features/arm/arm-with-iwmmxt.xml: ... it. * features/arm-with-m-fpa-layout.c: Moved to ... * features/arm/arm-with-m-fpa-layout.c: ... it. * features/arm-with-m-fpa-layout.xml: Moved to ... * features/arm/arm-with-m-fpa-layout.xml: ... it. * features/arm-with-m-vfp-d16.c: Moved to ... * features/arm/arm-with-m-vfp-d16.c: ... it. * features/arm-with-m-vfp-d16.xml: Moved to ... * features/arm/arm-with-m-vfp-d16.xml: ... it. * features/arm-with-m.c: Moved to ... * features/arm/arm-with-m.c: ... it. * features/arm-with-m.xml: Moved to ... * features/arm/arm-with-m.xm: ... it. * features/arm-with-neon.c: Moved to ... * features/arm/arm-with-neon.c: ... it. * features/arm-with-neon.xml: Moved to ... * features/arm/arm-with-neon.xml: ... it. * features/arm-with-vfpv2.c: Moved to ... * features/arm/arm-with-vfpv2.c: ... it. * features/arm-with-vfpv2.xml: Moved to ... * features/arm/arm-with-vfpv2.xml: ... it. * features/arm-with-vfpv3.c: Moved to ... * features/arm/arm-with-vfpv3.c: ... it. * features/arm-with-vfpv3.xml: Moved to ... * features/arm/arm-with-vfpv3.xml: ... it. * features/xscale-iwmmxt.xml: Moved to ... * features/arm/xscale-iwmmxt.xml: ... it. gdb/gdbserver: 2016-10-05 Terry Guo <terry.guo@arm.com> Yao Qi <yao.qi@linaro.org> * Makefile.in: Adjust the path of rules. * configure.srv: Update the path of xml files. * regformats/arm-with-iwmmxt.dat: Regenerated. * regformats/arm-with-neon.dat: Likewise. * regformats/arm-with-vfpv2.dat: Likewise. * regformats/arm-with-vfpv3.dat Likewise.
2016-10-05Automatic date update in version.inGDB Administrator1-1/+1