aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-04-11refactoring: rename create_range_type to create_static_range_typeSanimir Agovic12-47/+64
* gdbtypes.c (create_static_range_type): Renamed from create_range_type. * gdbtypes.h (create_static_range_type): Renamed from create_range_type. * ada-lang.c: All uses of create_range_type updated. * coffread.c: All uses of create_range_type updated. * dwarf2read.c: All uses of create_range_type updated. * f-exp.y: All uses of create_range_type updated. * m2-valprint.c: All uses of create_range_type updated. * mdebugread.c: All uses of create_range_type updated. * stabsread.c: All uses of create_range_type updated. * valops.c: All uses of create_range_type updated. * valprint.c: All uses of create_range_type updated.
2014-04-11Regenerate header files after this commit:Nick Clifton3-0/+18
2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
2014-04-11Check file exists before completion testsYao Qi2-3/+17
Doug told me that there are some regressions in gdb.base/completion.exp. They are caused by my recent change, and can be reproduced via: $ make check-parallel TESTS=gdb.base/completion.exp FAIL: gdb.base/completion.exp: complete target core ./gdb.base/completion FAIL: gdb.base/completion.exp: complete target tfile ./gdb.base/completion FAIL: gdb.base/completion.exp: complete target exec ./gdb.base/completion Current tests assume that gdb.base/completion exists but that is wrong in a parallel run, because binary file and object files are placed in outputs/gdb.base/completion/. This patch is to check file exists on two candidate directories, "gdb.base" and "outputs/gdb.base/completion/", and run tests with files existed in either of them. gdb/testsuite: 2014-04-11 Yao Qi <yao@codesourcery.com> * gdb.base/completion.exp: Check file exists before running tests on file completion.
2014-04-10Ignore non-stub sections for nios2 stub_bfd processing.Sandra Loosemore2-10/+20
2014-04-10 Cesar Philippidis <cesar@codesourcery.com> bfd/ * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs when building function stubs.
2014-04-11daily updateAlan Modra1-1/+1
2014-04-10Conditional Z1 breakpoint hangs GDBserver.Pedro Alves7-15/+212
While trying to fix hbreak2.exp against GDBserver I noticed this... (gdb) hbreak main if 1 Sending packet: $m400580,40#2e...Packet received: e8d2ffffff5dc3554889e54883ec10c745fc00000000eb0eb800000000e8c1ffffff8345fc01817dfce70300007ee9b800000000c9c3662e0f1f840000000000 Sending packet: $m40058f,1#31...Packet received: c7 Hardware assisted breakpoint 1 at 0x40058f: file ../../../src/gdb/testsuite/gdb.base/break-idempotent.c, line 46. Sending packet: $Z1,40058f,1;X3,220127#9b... *hangs forever* The issue is that nothing advances the packet pointer if add_breakpoint_condition either fails to parse the agent expression, or fails to find the breakpoint, resulting in an infinite loop in process_point_options. The latter case should really be fixed by GDBserver tracking GDB Z1 breakpoints in its breakpoint structures like Z0 breakpoints are, but the latter case still needs handling. add_breakpoint_commands has the same issue, though at present I don't know any way to trigger it other than sending a manually cooked packet. Unbelievably, it doesn't look like we have any test that tries setting a conditional hardware breakpoint. Looking at cond-eval-mode.exp, it looks like the file was meant to actually test something, but it's mostly empty today. This patch adds tests that tries all sorts of conditional breakpoints and watchpoints. The test hangs/fails without the GDBserver fix. Tested on x86_64 Fedora 17. gdb/gdbserver/ 2014-04-10 Pedro Alves <palves@redhat.com> * mem-break.c (add_breakpoint_condition, add_breakpoint_commands): Check if the condition or command is NULL before checking if the breakpoint is known. On success, return true. * mem-break.h (add_breakpoint_condition): Document return. (add_breakpoint_commands): Add describing comment. * server.c (skip_to_semicolon): New function. (process_point_options): Use it. gdb/testsuite/ 2014-04-10 Pedro Alves <palves@redhat.com> * gdb.base/cond-eval-mode.c: New file. * gdb.base/cond-eval-mode.exp: Use standard_testfile. Adjust prepare_for_testing to build the new file. Check result of runto_main. (test_break, test_watch): New procedures. (top level): Use them.
2014-04-10bfd/ChangeLogDenis Chertykov17-5/+504
* elf32-avr.c: Add DIFF relocations for AVR. (avr_final_link_relocate): Handle the DIFF relocs. (bfd_elf_avr_diff_reloc): New. (elf32_avr_is_diff_reloc): New. (elf32_avr_adjust_diff_reloc_value): Reduce difference value. (elf32_avr_relax_delete_bytes): Recompute difference after deleting bytes. * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations gas/ChangeLog * config/tc-avr.c: Add new flag mlink-relax. (md_show_usage): Add flag and help text. (md_parse_option): Record whether link relax is turned on. (relaxable_section): New. (avr_validate_fix_sub): New. (avr_force_relocation): New. (md_apply_fix): Generate DIFF reloc. (avr_allow_local_subtract): New. * config/tc-avr.h (TC_LINKRELAX_FIXUP): Define to 0. (TC_FORCE_RELOCATION): Define. (TC_FORCE_RELOCATION_SUB_SAME): Define. (TC_VALIDATE_FIX_SUB): Define. (avr_force_relocation): Declare. (avr_validate_fix_sub): Declare. (md_allow_local_subtract): Define. (avr_allow_local_subtract): Declare. gas/testsuite/ChangeLog * gas/avr/diffreloc_withrelax.d: New testcase. * gas/avr/noreloc_withoutrelax.d: Likewise. * gas/avr/relax.s: Likewise. include/ChangeLog * elf/avr.h: Add new DIFF relocs. ld/testsuite/ChangeLog * ld-avr/norelax_diff.d: New testcase. * ld-avr/relax_diff.d: Likewise. * ld-avr/relax.s: Likewise.
2014-04-10breakpoint shadowing, take single-step breakpoints into account.Pedro Alves2-69/+125
Breakpoints are supposed to be transparent to memory accesses. For all kinds of breakpoints breakpoint_xfer_memory hides the breakpoint instructions. However, sss breakpoints aren't tracked like all other breakpoints, and nothing is taking care of hiding them from memory reads. Say, as is, a background step + disassemble will see breakpoints instructions on software step targets. E.g., stepping over this line: while (1); with s& and then "disassemble" would show sss breakpoints. Actually, that's still not be possible to see today, because: - in native Linux, you can't read memory while the program is running. - with Linux gdbserver, you can, but in the all-stop RSP you can't talk to the server while the program is running... - and with non-stop, on software step targets, we presently force the use of displaced-stepping for all single-steps, so no single-step breakpoints are used... I've been working towards making non-stop not force displaced stepping on sss targets, and I noticed the issue then. With that, I indeed see this: (gdb) set remote Z-packet off (gdb) s& (gdb) disassemble main Dump of assembler code for function main: 0x000000000040049c <+0>: push %rbp 0x000000000040049d <+1>: mov %rsp,%rbp 0x00000000004004a0 <+4>: int3 0x00000000004004a1 <+5>: (bad) End of assembler dump. Instead of the correct: (gdb) disassemble main Dump of assembler code for function main: 0x000000000040049c <+0>: push %rbp 0x000000000040049d <+1>: mov %rsp,%rbp 0x00000000004004a0 <+4>: jmp 0x4004a0 <main+4> This is actually one thing that my v1 of the recent "fix a bunch of run control bugs" series was fixing, because it made sss breakpoints be regular breakpoints in the breakpoint chain. But dropped it in the version that landed in the tree, due to some problems. So instead of making sss breakpoints regular breakpoints, go with a simpler fix (at least for now) -- make breakpoint_xfer_memory take software single-step breakpoints into account. After the patch, I get the correct disassemble output. Tested on x86_64 Fedora 17, and also on top of my "use software single-step on x86" series. Also fixes the issue pointed out by Yao at https://sourceware.org/ml/gdb-patches/2014-04/msg00045.html, where the prologue analysis/frame sniffing manages to see software step breakpoint instructions. gdb/ 2014-04-10 Pedro Alves <palves@redhat.com> * breakpoint.c (single_step_breakpoints) (single_step_gdbarch): Move up in the file. (one_breakpoint_xfer_memory): New function, factored out from ... (breakpoint_xfer_memory): ... here. Also process single-step breakpoints.
2014-04-10Add support for the MIPS P5600 family of CPUs.Andrew Bennett3-0/+9
ChangeLog: 2014-04-10 Andrew Bennett <andrew.bennett@imgtec.com> * config/tc-mips.c (mips_cpu_info_table): Add P5600 configuation. * doc/c-mips.texi: Document p5600.
2014-04-10daily updateAlan Modra1-1/+1
2014-04-09Remove remaining default manifest support.Nick Clifton11-92/+32
* Makefile.am (default-manifest.o): Remove rule. (EMUL_EXTRA_BINARIES): Delete. (ALL_EMUL_EXTRA_BINARIES): Delete. (ld_new_DEPENDENCIES): Remove EMUL_EXTRA_BINARIES. (install-data-local): Remove EMUL_EXTRA_BINARIES. * Makefile.in: Regenerate. * configure.in (all_emul_extra_binaries): Delete. (EMUL_EXTRA_BINARIES): Remove. * configure: Regenerate. * configure.tgt (target_extra_binaries): Delete. * emultempl/default-manifest.rc: Delete. * ld.texinfo: Remove discussion of default manifest. * emulparams/i386pe.sh (DEFAULT_MANIFEST): Delete. * emulparams/i386pep.sh (DEFAULT_MANIFEST): Delete.
2014-04-09[GDBserver] Fix SH/Linux build.Pedro Alves2-1/+6
sh-linux-gnu-gcc (...) src/gdb/gdbserver/linux-low.c .../src/gdb/gdbserver/linux-low.c: In function 'linux_read_loadmap': .../src/gdb/gdbserver/linux-low.c:5284:13: error: 'struct lwp_info' has no member named 'entry' make[1]: *** [linux-low.o] Error 1 gdb/gdbserver/ 2014-04-09 Pedro Alves <palves@redhat.com> * linux-low.c (linux_read_loadmap): Pass current_inferior directly to lwpid_of.
2014-04-09Fix a few more targets affected by the change to the TC_CONS_FIX_NEW macro.Nick Clifton5-4/+12
* config/tc-rl78.h (TC_CONS_FIX_NEW): Add RELOC parameter. * config/tc-z80.h (TC_CONS_FIX_NEW): Discard RELOC parameter. * config/tc-aarch64.h (TC_CONS_FIX_NEW): Discard RELOC parameter. * read.c (emit_expr_fix): Mark the r parameter as potentially unused.
2014-04-09darwin: fix thinko (free thread port after threads are discovered).Tristan Gingold2-4/+30
Due to a thinko, a message could be not understood and ignored. The result was a dead-lock (gdb is waiting for an event that never happen). The port of the thread was deallocated before new threads are discovered. As a consequence, the origin of the message was unknown (instead of being linked to the newly created thread). gdb/ * darwin-nat.c (darwin_check_new_threads): Fix port leak, add comments. (darwin_decode_exception_message): Free port only after use.
2014-04-09Add a time-stamp for chewAlan Modra3-8/+23
One last time-stamp. Now none of the doc rules using move-if-change will run unnecessarily. * Makefile.am ($(MKDOC)): New rule, depend on chew.stamp. Move old rule to.. (chew.stamp): ..here. (DISTCLEANFILES): Move *.stamp.. (MOSTLYCLEANFILES): ..to here. * Makefile.in: Regenerate.
2014-04-09ppc476 gas warn on data in code sectionsAlan Modra4-1/+87
* config/tc-ppc.c (warn_476, last_insn, last_seg, last_subseg): New static vars. (md_longopts, md_parse_option, md_show_usage): Add --ppc476-workaround. (ppc_elf_cons_fix_check): New function. (md_assemble): Set last_insn, last_seg, last_subseg. (ppc_byte, md_apply_fix): Handle warn_476. * config/tc-ppc.h (TC_CONS_FIX_CHECK): Define. (ppc_elf_cons_fix_check): Declare. * read.c (cons_worker): Invoke TC_CONS_FIX_CHECK.
2014-04-09gas TC_PARSE_CONS_EXPRESSION communication with TC_CONS_FIX_NEWAlan Modra51-325/+427
A number of targets pass extra information from TC_PARSE_CONS_EXPRESSION to TC_CONS_FIX_NEW via static variables. That's OK, but not best practice. tc-ppc.c goes further in implementing its own replacement for cons(), because the generic one doesn't allow relocation modifiers on constants. This patch fixes both of these warts. * gas/config/tc-alpha.h (TC_CONS_FIX_NEW): Add RELOC parameter. * gas/config/tc-arc.c (arc_cons_fix_new): Add reloc parameter. * gas/config/tc-arc.h (arc_cons_fix_new): Update prototype. (TC_CONS_FIX_NEW): Add RELOC parameter. * gas/config/tc-arm.c (cons_fix_new_arm): Similarly * gas/config/tc-arm.h (cons_fix_new_arm, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-cr16.c (cr16_cons_fix_new): Similarly. * gas/config/tc-cr16.h (cr16_cons_fix_new, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-crx.h (TC_CONS_FIX_NEW): Similarly. * gas/config/tc-m32c.c (m32c_cons_fix_new): Similarly. * gas/config/tc-m32c.h (m32c_cons_fix_new, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-mn10300.c (mn10300_cons_fix_new): Similarly. * gas/config/tc-mn10300.h (mn10300_cons_fix_new, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-ns32k.c (cons_fix_new_ns32k): Similarly. * gas/config/tc-ns32k.h (cons_fix_new_ns32k): Similarly. * gas/config/tc-pj.c (pj_cons_fix_new_pj): Similarly. * gas/config/tc-pj.h (pj_cons_fix_new_pj, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-rx.c (rx_cons_fix_new): Similarly. * gas/config/tc-rx.h (rx_cons_fix_new, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-sh.c (sh_cons_fix_new): Similarly. * gas/config/tc-sh.h (sh_cons_fix_new, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-tic54x.c (tic54x_cons_fix_new): Similarly. * gas/config/tc-tic54x.h (tic54x_cons_fix_new, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-tic6x.c (tic6x_cons_fix_new): Similarly. * gas/config/tc-tic6x.h (tic6x_cons_fix_new, TC_CONS_FIX_NEW): Similarly. * gas/config/tc-arc.c (arc_parse_cons_expression): Return reloc. * gas/config/tc-arc.h (arc_parse_cons_expression): Update proto. * gas/config/tc-avr.c (exp_mod_data): Make global. (pexp_mod_data): Delete. (avr_parse_cons_expression): Return exp_mod_data pointer. (avr_cons_fix_new): Add exp_mod_data_t pointer param. (exp_mod_data_t): Move typedef.. * gas/config/tc-avr.h: ..to here. (exp_mod_data): Declare. (TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define. (avr_parse_cons_expression, avr_cons_fix_new): Update prototype. (TC_CONS_FIX_NEW): Update. * gas/config/tc-hppa.c (hppa_field_selector): Delete static var. (cons_fix_new_hppa): Add hppa_field_selector param. (fix_new_hppa): Adjust. (parse_cons_expression_hppa): Return field selector. * gas/config/tc-hppa.h (parse_cons_expression_hppa): Update proto. (cons_fix_new_hppa): Likewise. (TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define. * gas/config/tc-i386.c (got_reloc): Delete static var. (x86_cons_fix_new): Add reloc param. (x86_cons): Return got reloc. * gas/config/tc-i386.h (x86_cons, x86_cons_fix_new): Update proto. (TC_CONS_FIX_NEW): Add RELOC param. * gas/config/tc-ia64.c (ia64_cons_fix_new): Add reloc param. Adjust calls. * gas/config/tc-ia64.h (ia64_cons_fix_new): Update prototype. (TC_CONS_FIX_NEW): Add reloc param. * gas/config/tc-microblaze.c (parse_cons_expression_microblaze): Return reloc. (cons_fix_new_microblaze): Add reloc param. * gas/config/tc-microblaze.h: Formatting. (parse_cons_expression_microblaze): Update proto. (cons_fix_new_microblaze): Likewise. * gas/config/tc-nios2.c (nios2_tls_ldo_reloc): Delete static var. (nios2_cons): Return ldo reloc. (nios2_cons_fix_new): Delete. * gas/config/tc-nios2.h (nios2_cons): Update prototype. (nios2_cons_fix_new, TC_CONS_FIX_NEW): Delete. * gas/config/tc-ppc.c (md_pseudo_table): Remove quad, long, word, short. Make llong use cons. (ppc_elf_suffix): Return BFD_RELOC_NONE rather than BFD_RELOC_UNUSED. (ppc_elf_cons): Delete. (ppc_elf_parse_cons): New function. (ppc_elf_validate_fix): Don't check for BFD_RELOC_UNUSED. (md_assemble): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED. * gas/config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): Define (ppc_elf_parse_cons): Declare. * gas/config/tc-sparc.c (sparc_cons_special_reloc): Delete static var. (sparc_cons): Return reloc specifier. (cons_fix_new_sparc): Add reloc specifier param. (sparc_cfi_emit_pcrel_expr): Use emit_expr_with_reloc. * gas/config/tc-sparc.h (TC_PARSE_CONS_RETURN_TYPE): Define. (TC_PARSE_CONS_RETURN_NONE): Define. (sparc_cons, cons_fix_new_sparc): Update prototype. * gas/config/tc-v850.c (hold_cons_reloc): Delete static var. (v850_reloc_prefix): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED. (md_assemble): Likewise. (parse_cons_expression_v850): Return reloc. (cons_fix_new_v850): Add reloc parameter. * gas/config/tc-v850.h (parse_cons_expression_v850): Update proto. (cons_fix_new_v850): Likewise. * gas/config/tc-vax.c (vax_cons_special_reloc): Delete static var. (vax_cons): Return reloc. (vax_cons_fix_new): Add reloc parameter. * gas/config/tc-vax.h (vax_cons, vax_cons_fix_new): Update proto. * gas/config/tc-xstormy16.c (xstormy16_cons_fix_new): Add reloc param. * gas/config/tc-xstormy16.h (xstormy16_cons_fix_new): Update proto. * gas/dwarf2dbg.c (TC_PARSE_CONS_RETURN_NONE): Provide default. (emit_fixed_inc_line_addr): Adjust exmit_expr_fix calls. * gas/read.c (TC_PARSE_CONS_EXPRESSION): Return value. (do_parse_cons_expression): Adjust. (cons_worker): Pass return value from TC_PARSE_CONS_EXPRESSION to emit_expr_with_reloc. (emit_expr_with_reloc): New function handling reloc, mostly extracted from.. (emit_expr): ..here. (emit_expr_fix): Add reloc param. Adjust TC_CONS_FIX_NEW invocation. Handle reloc. (parse_mri_cons): Convert to ISO. * gas/read.h (TC_PARSE_CONS_RETURN_TYPE): Define. (TC_PARSE_CONS_RETURN_NONE): Define. (emit_expr_with_reloc): Declare. (emit_expr_fix): Update prototype. * gas/write.c (write_object_file): Update TC_CONS_FIX_NEW invocation.
2014-04-09Fix fallout from splitting ldbuildid.[ch] off elf32.em.Alan Modra6-2/+15
bfd/ * libcoff.h: Regenerate. ld/ * emultempl/spuelf.em: Include safe-ctype.h, remove duplicate errno.h. * emultempl/nds32elf.em: Include bfd_stdint.h. * po/POTFILES.in: Regenerate.
2014-04-09bfd doc chewAlan Modra3-136/+193
I got tired of watching chew.c being compiled a dozen or more times each time I do a binutils build. * Makefile.am (MKDOC): Use $@ in command. (aoutx.texi): New rule, depend on aoutx.stamp. Move old rule.. (aoutx.stamp): .. to here. Don't depend on chew.c, depend on MKDOC and omit recursive MAKE. Use $< in command. (archive.texi, archures.texi, bfdt.texi, cache.texi, coffcode.texi, core.texi, elf.texi, elfcode.texi, mmo.texi, format.texi, libbfd.texi, bfdio.texi, bfdwin.texi, opncls.texi, reloc.texi, section.texi, syms.texi, targets.texi, init.texi, hash.texi, linker.texi): Similarly. (DISTCLEANFILES): Remove *.stamp. * Makefile.in: Regenerate.
2014-04-09daily updateAlan Modra1-1/+1
2014-04-09ppc476 icache workaround fix for bctrAlan Modra4-19/+100
I got the ppc476 workaround wrong. bctr (and bctrl) as the last instruction in a page can hit the icache bug if the preceding mtctr insn is close by, and the destination is in the first few instructions on the next page. This scenario can occur with code generated by gcc to implement switch statements, or in code generated to call by function pointer. To prevent the bctr problem it is also necessary to remove other instructions that otherwise would be safe. bfd/ * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list of safe ppc476 insns at end of page. Also remove non-branch insns. Expand comments. ld/ * emultempl/ppc32elf.em (no_zero_padding, ppc_finish): New functions. (LDEMUL_FINISH): Define.
2014-04-08Fix erroneous backtrace on avrxmega architectures.Pierre Langlois2-1/+14
* avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment. (avr_gdbarch_init): Add xmega architectures given by bfd_architecture when setting the size of call_length.
2014-04-08This patch removes the inclusion of the default manifest in final links forNick Clifton3-34/+11
the Cygwin and MinGW targets. The manifest is now going to be handled by gcc. * scripttempl/pe.sc (R_RSRC): Remove default manifest. * scripttempl/pep.sc (R_RSRC): Remove default manifest.
2014-04-08Add support for generating and inserting build IDs into COFF binaries.Jon TURNEY25-191/+1101
* peXXigen.c (pe_print_debugdata): New function: Displays the contents of the debug directory and decodes codeview entries. (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out) (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record): Add functions for reading and writing debugdir and codeview records. * libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out) (_bfd_XXi_write_codeview_record): Add prototypes and macros. * libcoff-in.h (pe_tdata): Add build-id data. * libcoff.h: Regenerate. * coffcode.h (coff_write_object_contents): Run build_id after_write_object_contents hook. * pe.h (external_IMAGE_DEBUG_DIRECTORY, _CV_INFO_PDB70) (_CV_INFO_PDB20): Add structures and constants for debug directory and codeview records. * internal.h (internal_IMAGE_DEBUG_DIRECTORY, CODEVIEW_INFO): Add structures and constants for internal representation of debug directory and codeview records. * emultempl/elf32.em (id_note_section_size, read_hex, write_build_id): Move code for parsing build-id option and calculating the build-id to... * ldbuildid.c: New file. * ldbuildid.h: New file. * Makefile.am (CFILES, HFILES, OFILES, ld_new_SOURCES): Add new files. * Makefile.in: Regenerate. * ld.texinfo: Update --build-id description to mention COFF support. * NEWS: Mention support for COFF build ids. * emultempl/pe.em (gld${EMULATION_NAME}_handle_option): (pecoff_checksum_contents, write_build_id, setup_build_id) (gld_${EMULATION_NAME}_after_open): Handle and implement build-id option. * emultempl/pep.em: Likewise.
2014-04-08[testsuite] Disable Ctrl-V use for mingw hosts.Pierre Muller2-2/+15
On mingw host, we have seen two fails as below, p int1dim[0]^V@2 Invalid character '^V' in expression. (gdb) FAIL: gdb.base/printcmds.exp: p int1dim[0]@2 p int1dim[0]^V@2^V@3 Invalid character '^V' in expression. (gdb) FAIL: gdb.base/printcmds.exp: p int1dim[0]@2@3 In the test, the comment says "# Send \026@ instead of just @ in case the kill character is @". Historically, kill character was @, and Ctrl-V (\026) is to escape the next character. However, we don't have to do so on mingw. This patch is to disable ctrl-v usage on mingw hots. With this patch applied, it becomes: p int1dim[0]@2 $607 = {0, 1} (gdb) PASS: gdb.base/printcmds.exp: p int1dim[0]@2 p int1dim[0]@2@3 $608 = {{0, 1}, {2, 3}, {4, 5}} Note that this patch is picked from Pierre's submission, [RFC 6/6] Fix remaining failures in gdb.base/printcmds.exp for mingw hosts. https://www.sourceware.org/ml/gdb-patches/2013-09/msg00943.html gdb/testsuite: 2014-04-08 Pierre Muller <muller@sourceware.org> * gdb.base/printcmds.exp (test_artificial_arrays): Disable Ctrl-V use for mingw hosts.
2014-04-08daily updateAlan Modra1-1/+1
2014-04-07[python] Fix gdb.Value.dynamic_type for reference values.Siva Chandra5-1/+18
gdb.Value.dynamic_type is supposed to work for reference and pointer values. However, the value object in the function 'valpy_get_dynamic_type' was being dereferenced using 'value_ind' irrespective of the value type being TYPE_CODE_PTR or TYPE_CODE_REF. This patch fixes that to use 'coerce_ref' for TYPE_CODE_REF values. ChangeLog: * python/py-value.c (valpy_get_dynamic_type): Use coerce_ref to dereference TYPE_CODE_REF values. testsuite/ * gdb.python/py-value.c: Improve test case. * gdb.python/py-value.exp: Add new test.
2014-04-07Add support to recognize clang.Doug Evans3-0/+13
* lib/compiler.c: Identify the clang compiler. * lib/compiler.cc: Ditto.
2014-04-07Fix spurious failures in ld-plugin/lto.expAndreas Schwab2-4/+10
* ld-plugin/lto.exp: Make "-Wp," prefix optional when filtering out _FORTIFY_SOURCE. ("Build libdummy.a 9", "PR ld/12696"): Mark as c++.
2014-04-07Fix ARI warning in darwin-nat.c::darwin_decode_messageJoel Brobecker2-1/+6
gdb/ChangeLog: * darwin-nat.c (darwin_decode_message): Remove trailing '\n' at end of warning message.
2014-04-07Report an error on objcopy/strip of sectionless binariesAlan Modra2-0/+12
All strip operations require section headers to be present, as do most objcopy operations. BFD is seriously confused by objects without section info. The error message added here is similar to the error on attempting to strip/objcopy a zero length object. PR binutils/16811 * objcopy.c (copy_object): Error if no sections.
2014-04-07daily updateAlan Modra1-1/+1
2014-04-06daily updateAlan Modra1-1/+1
2014-04-05Fix map file referenceAlan Modra2-1/+6
The testcase in pr16417 comment #6 produces a map file showing libpthread.so.0 (write@@GLIBC_2.2.5) ie. missing the file referencing the symbol. * elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when merging non-default sym.
2014-04-05daily updateAlan Modra1-1/+1
2014-04-04This fixes PR bootstrap/60620:Eric Botcazou3-0/+8
* Makefile.def (dependencies): Make gnattools depend on libstdc++-v3. * Makefile.in: Regenerate.
2014-04-04Document optional comma in linker script.Cary Coutant2-2/+13
The linker script documentation does not mention the optional comma that may follow an output section command or an overlay command. In some cases, where a fill expression is used, and the next output section command begins with an operator (e.g., "/DISCARD/"), the comma may be required to separate the two commands. Currently, GNU ld doesn't require the comma, but gold does. ld/ PR gold/16804 * ld.texinfo: Document optional comma following output section command and overlay command.
2014-04-04Add support for Intel SGX instructionsIlya Tocar15-3852/+3967
Add Intel SGX instructions support to assembler and disassembler. gas/ * config/tc-i386.c (cpu_arch): Add .se1. * doc/c-i386.texi: Document .se1/se1. gas/testsuite/ * gas/i386/i386.exp: Run SE1 tests. * gas/i386/se1.d: New file. * gas/i386/se1.s: Ditto. * gas/i386/x86-64-se1.d: Ditto. * gas/i386/x86-64-se1.s: Ditto. opcodes/ * i386-dis.c (rm_table): Add encls, enclu. * i386-gen.c (cpu_flag_init): Add CPU_SE1_FLAGS, (cpu_flags): Add CpuSE1. * i386-opc.h (enum): Add CpuSE1. (i386_cpu_flags): Add cpuse1. * i386-opc.tbl: Add encls, enclu. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.
2014-04-04mach-o: reject 64 bit targets when not configured for.Tristan Gingold2-0/+14
bfd/ * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not configured for.
2014-04-04mach-o: fix section name conversion from bfd to mach-o.Tristan Gingold2-4/+10
bfd/ * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix thinko on names length.
2014-04-04mach-o: output output_section target_index to write relocs.Tristan Gingold3-2/+10
bfd/ * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index of output_section. * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
2014-04-04bfd_get_arch_size: return size from arch info on non-ELF targets.Tristan Gingold2-4/+10
bfd/ * bfd.c (bfd_get_arch_size): Default is taken from arch.
2014-04-04Pad sections according to current script FILL.Alan Modra9-1/+71
When aligning input sections, we are supposed to take the fill pattern from a FILL statement, if there is one in the output section statement. ld/ * ldlang.c (lang_size_sections_1 <lang_input_section_enum>): Use current "fill", not "output_section_statement->fill". ld/testsuite/ * ld-scripts/fill.d, * ld-scripts/fill.t, * ld-scripts/fill_0.s, * ld-scripts/fill_1.s, * ld-scripts/fill_2.s: New test. * ld-scripts/data.exp: Run it.
2014-04-04daily updateAlan Modra1-1/+1
2014-04-03(read_cutu_die_from_dwo): Update function comment to match previous change.Doug Evans1-2/+2
2014-04-03 * dwarf2read.c (read_cutu_die_from_dwo): Fix assertion, at most oneDoug Evans2-2/+7
of stub_comp_unit_die, stub_comp_dir is non-NULL.
2014-04-03 * peXXigen.c (pe_print_edata): Verify edt.name lies insideJon Turney2-10/+33
section before dereferencing. (pe_print_idata, pe_print_edata, pe_print_reloc) (rsrc_print_section): Don't bother interpreting the contents of sections which have no contents.
2014-04-03This fixes a problem building large (> 2Gb) binaries on 32-bit hosts. Using aMaria Guseva2-1/+7
long type instead of long long meant that bfd_seek (SET) could be called with a negative offset. PR ld/16803 * elf.c (_bfd_elf_set_section_contents): Use correct type to hold file position.
2014-04-03This patch allows one to place the gcc's liblto_plugin in the ↵Markus Trippelsdorf3-4/+15
lib/bfd-plugins directory and have it loaded by default (as long as the --target option isn't used). PR binutils/14698 ar.c: Set plugin_target early if plugins are supported. nm.c: Likewise.
2014-04-03mach-o: fix warnings on 32 bit hosts. Display personality functions.Tristan Gingold4-7/+37
binutils/ * od-macho.c (printf_uint64): New function. (dump_load_command, dump_obj_compact_unwind): Use it. (dump_exe_compact_unwind): Display personality functions. include/mach-o/ * unwind.h (mach_o_compact_unwind_64): Fix typo in personality.