aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-10-18targets.c (bfd_flavour_name): "MMO" is spelled "mmo".Doug Evans2-1/+5
bfd/ChangeLog: * targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
2015-10-18Fix PR binutils/19147 -- off by one when printing NT_FILE note.Paul Pluzhnikov2-1/+6
2015-10-18Automatic date update in version.inGDB Administrator1-1/+1
2015-10-17Correct powerpc64le __glink_PLTresolve .eh_frame FDEAlan Modra2-1/+6
* elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve eh_frame FDE for ELFv1.
2015-10-17Automatic date update in version.inGDB Administrator1-1/+1
2015-10-16[nto] Fix nto build.Aleksandar Ristovski4-16/+29
gdb/gdbserver/ChangeLog: * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix variable name. gdb/ChangeLog: * nto-procfs.c (common/filestuff.h): Include. (procfs_can_use_hw_breakpoint): Fix enum name. (procfs_open_1): Fix compiler warning. (procfs_pidlist): Make static. (procfs_meminfo): Make static, fix type name, add missing argument. (procfs_store_registers): Make static. (procfs_thread_info): Remove unused function. (_initialize_procfs): Forward declare.
2015-10-16gdbserver: Reset current_thread when the thread is removed.Aleksandar Ristovski1-0/+7
Reset current_thread and make sure 'remove_process' is used after all associated threads have been removed first. gdb/gdbserver/ChangeLog: * inferiors.c (thread_pid_matches_callback): New function. (find_thread_process): New function. (remove_thread): Reset current_thread. (remove_process): Assert threads have been removed first.
2015-10-16gdbserver: Reset current_thread when the thread is removed.Aleksandar Ristovski1-0/+24
Reset current_thread and make sure 'remove_process' is used after all associated threads have been removed first. gdb/gdbserver/ChangeLog: * inferiors.c (thread_pid_matches_callback): New function. (find_thread_process): New function. (remove_thread): Reset current_thread. (remove_process): Assert threads have been removed first.
2015-10-16Don't ignore "-m emulation" command line optionH.J. Lu3-1/+18
Gold shouldn't ignore "-m emulation" command line option, which may lead to incorrect output. PR gold/19119 * options.h (General_options): Remove "obsolete" from -m. * parameters.cc (set_parameters_target): Check if input target is compatible with output emulation set by "-m emulation".
2015-10-16MAINTAINERS: Fix my inconsistent email addressYao Qi2-3/+7
Hi, This patch fixes inconsistency in my email address. 2015-10-16 Yao Qi <yao.qi@arm.com> * MAINTAINERS: Update my email address.
2015-10-16Check if symbol is defined when converting mov to leaH.J. Lu3-2/+12
We need to check if symbol is defined when converting mov to lea since SYMBOL_REFERENCES_LOCAL may return true on hidden undefined symbols. * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol is defined. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
2015-10-16Convert mov to lea for loading address of local common symbolH.J. Lu15-4/+38
There is no need to check def_regular when converting mov to lea for loading address of local symbols since def_regular may be false for common symbols and SYMBOL_REFERENCES_LOCAL is sufficient. bfd/ * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check def_regular. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. ld/testsuite/ * ld-i386/lea1.s: Add a test for loading address of local common symbol. * ld-x86-64/lea1.s: Likewise. * ld-i386/lea1a.d: Updated. * ld-i386/lea1b.d: Likewise. * ld-i386/lea1c.d: Likewise. * ld-x86-64/lea1a.d: Likewise. * ld-x86-64/lea1b.d: Likewise. * ld-x86-64/lea1c.d: Likewise. * ld-x86-64/lea1d.d: Likewise. * ld-x86-64/lea1e.d: Likewise. * ld-x86-64/lea1f.d: Likewise.
2015-10-16Automatic date update in version.inGDB Administrator1-1/+1
2015-10-15Fix typos in comments in _bfd_elf_merge_symbolH.J. Lu2-2/+6
* elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
2015-10-15Fix a typo for "-z noextern-protected-data"H.J. Lu2-1/+5
* ld.texinfo: Fix a typo for "-z noextern-protected-data".
2015-10-15aarch64 multi-arch part 6: HW breakpoint on unaligned addressYao Qi8-11/+87
Nowadays, both aarch64 GDB and linux kernel assumes that address for setting breakpoint should be 4-byte aligned. However that is not true after we support multi-arch, because thumb instruction can be at 2-byte aligned address. Patch http://lists.infradead.org/pipermail/linux-arm-kernel/2015-October/375141.html to linux kernel is to teach kernel to handle 2-byte aligned address for HW breakpoint, while this patch is to teach aarch64 GDB handle 2-byte aligned address. First of all, we call gdbarch_breakpoint_from_pc to get the instruction length rather than using hard-coded 4. Secondly, in GDBserver, we set length back to 2 if it is 3, because GDB encode 3 in it to indicate it is a 32-bit thumb breakpoint. Then we relax the address alignment check from 4-byte aligned to 2-byte aligned. This patch enables some tests (such as gdb.base/break-idempotent.exp, gdb.base/cond-eval-mode.exp, gdb.base/watchpoint-reuse-slot.exp,) and fixes many fails (such as gdb.base/hbreak2.exp) when the program is compiled in thumb mode on aarch64. Regression tested on aarch64-linux, both native and gdbserver. This is the last patch of multi-arch work. gdb: 2015-10-15 Yao Qi <yao.qi@linaro.org> * aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Call gdbarch_breakpoint_from_pc to instruction length. (aarch64_linux_remove_hw_breakpoint): Likewise. * common/common-regcache.h (regcache_register_size): Declare. * nat/aarch64-linux-hw-point.c: Include "common-regcache.h". (aarch64_point_is_aligned): Set alignment to 2 for breakpoint if the process is 32bit, otherwise set alignment to 4. (aarch64_handle_breakpoint): Update comments. * regcache.c (regcache_register_size): New function. gdb/gdbserver: 2015-10-15 Yao Qi <yao.qi@linaro.org> * linux-aarch64-low.c (aarch64_insert_point): Set len to 2 if it is 3. (aarch64_remove_point): Likewise. * regcache.c (regcache_register_size): New function.
2015-10-15binutils objcopy test tidyAlan Modra2-109/+126
The main aim of this patch is to perform more objcopy tests when we can build executables but not run them. ie. non-native with cross compiler available. * binutils-all/objcopy.exp: Delete trailing whitespace. Use "string equal" rather than "string match" when making simple string comparisons. Revert 2008-07-08 host_triplet checks. Perform non-run tests when we can build executable. (strip_executable, strip_executable_with_saving_a_symbol): Move run test later. Take extra param on whether to perform run test. Update callers. (keep_debug_symbols_and_test_copy): Delete unused vars.
2015-10-15objcopy --extract-symbol testcaseAlan Modra7-65/+44
Run the test for more than just ELF. Shows that objcopy --extract-symbol isn't working on PE, mips, mmix and some aout targets. * config/default.exp (size): New global. * ld-elf/extract-symbol-1.s, * ld-elf/extract-symbol-1.ld, * ld-elf/extract-symbol-1sec.d, * ld-elf/extract-symbol-1sym.d: Delete. * ld-scripts/script.exp (extract_symbol_test): New.
2015-10-15objcopy --extract-symbolAlan Modra4-8/+15
Calling bfd_copy_private_bfd_data is necessary to copy ELF file header info. binutils/ * objcopy.c (copy_object): Don't omit bfd_copy_private_bfd_data call when extract_symbol. bfd/ * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion that input and output .note.renesas sections are same size. Instead, only copy input to output if they are.
2015-10-15Normalize my (personal) email address in ChangeLogSimon Marchi1-2/+2
2015-10-15Remove core_regset_sectionAleksandar Ristovski3-2/+5
gdb/ChangeLog: * gdbarch.sh (core_regset_section): Remove. * gdbarch.h: Regenerate.
2015-10-15When evaluating a ternary operator in a linker script, copy the symbol flags.Simon Dardis2-11/+41
* ld/ldexp.c: (try_copy_symbol_flags): New. Factored out from... (exp_fold_tree_1): Here. Cope with ternary operator in assignments. Use new helper.
2015-10-15Use the file_ptr type when calling bfd_seek.Riku Voipio3-19/+16
PR ld/19123 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the offset for bfd_seek. * elfcode.h (elf_object_p): Likewise.
2015-10-15Automatic date update in version.inGDB Administrator1-1/+1
2015-10-15bfd: [SH] Emit DT_PLTGOT for FDPIC output unconditionallyRich Felker2-2/+7
PR ld/19091 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit DT_PLTGOT for FDPIC output.
2015-10-14Add missing changelog entriesAndreas Krebbel2-0/+14
2015-10-14S/390: Fix instruction type of troo, trot, trto, and trtt.Andreas Krebbel6-29/+29
opcodes/ChangeLog: 2015-10-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * s390-opc.c: Fix comment. * s390-opc.txt: Change instruction type for troo, trot, trto, and trtt to RRF_U0RER since the second parameter does not need to be a register pair. gas/testsuite/ChangeLog: 2015-10-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * gas/s390/esa-g5.d: Use odd GPR for the second operand. * gas/s390/esa-g5.s: Likewise. * gas/s390/esa-z9-109.d: Likewise. * gas/s390/esa-z9-109.s: Likewise.
2015-10-14Updated Chinese translation for the linker (again!)Nick Clifton2-6/+10
2015-10-14Define enum out of structYao Qi2-6/+15
This patch moves the definition of enum out of the scope of struct aarch64_memory_operand, otherwise it breaks GDB build in c++ mode. gdb: 2015-10-14 Yao Qi <yao.qi@linaro.org> * arch/aarch64-insn.h (struct aarch64_memory_operand): Move enum out of it. (enum aarch64_memory_operand_type): New.
2015-10-14Automatic date update in version.inGDB Administrator1-1/+1
2015-10-13Recognize a few more AIX XCOFF DWARF sections.David Edelsohn2-3/+10
gdb/ChangeLog: * xcoffread.c (dwarf2_xcoff_names): Add .dwmac and .dwpbtyp.
2015-10-13More char constificationPedro Alves14-22/+42
Trivial constifications flagged by G++. E.g.: src/gdb/c-varobj.c: In function ‘void c_describe_child(const varobj*, int, char**, value**, type**, char**)’: src/gdb/c-varobj.c:373:33: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] char *join = was_ptr ? "->" : "."; ^ gdb/ChangeLog: 2015-10-13 Pedro Alves <palves@redhat.com> * ada-lang.c (ada_enum_name): Constify local. * ada-typeprint.c (print_range_bound): Constify locals. * c-varobj.c (c_describe_child): Likewise. * cli/cli-setshow.c (do_set_command): Likewise. * gdb_vecs.c (delim_string_to_char_ptr_vec_append): Likewise. * dwarf2read.c (find_file_and_directory): Likewise. (anonymous_struct_prefix, dwarf2_name): Likewise. * gnu-v3-abi.c (gnuv3_rtti_type): Likewise. * go-lang.c (unpack_mangled_go_symbol): Likewise. * jv-typeprint.c (java_type_print_base): Likewise. * ser-tcp.c (net_open): Likewise. * symfile.c (deduce_language_from_filename): Likewise. * symtab.c (gdb_mangle_name): Likewise. * tui/tui-io.c (tui_redisplay_readline): Likewise.
2015-10-13Fix execution_direction's typePedro Alves3-6/+25
This fixes a few build errors like these in C++ mode: src/gdb/reverse.c: In function ‘void exec_reverse_once(char*, char*, int)’: src/gdb/reverse.c:49:34: error: invalid conversion from ‘int’ to ‘exec_direction_kind’ [-fpermissive] enum exec_direction_kind dir = execution_direction; ^ make: *** [reverse.o] Error 1 gdb/ChangeLog: 2015-10-13 Pedro Alves <palves@redhat.com> * infrun.c (restore_execution_direction): New function. (fetch_inferior_event): Use it instead of make_cleanup_restore_integer. (execution_direction): Change type to enum exec_direction_kind. * infrun.h (execution_direction): Likewise.
2015-10-13ada-lang.c:ada_value_primitive_packed_val: const correctnessPedro Alves2-8/+15
gdb/ChangeLog: 2015-10-13 Pedro Alves <palves@redhat.com> * ada-lang.c (ada_value_primitive_packed_val): Constify locals. Use value_contents_writeable. Remove casts.
2015-10-13ada-lang.c: malloc/alloca casts for C++Pedro Alves2-2/+7
gdb/ChangeLog: 2015-10-13 Pedro Alves <palves@redhat.com> * ada-lang.c (ada_value_primitive_packed_val): Add casts to malloc and alloca calls.
2015-10-13lm32: Replace call to write_memory with write_memory_unsigned_integerSimon Marchi2-1/+7
Fixes this error: /home/emaisin/src/binutils-gdb/gdb/lm32-tdep.c: In function ‘CORE_ADDR lm32_push_dummy_call(gdbarch*, value*, regcache*, CORE_ADDR, int, value**, CORE_ADDR, int, CORE_ADDR)’: /home/emaisin/src/binutils-gdb/gdb/lm32-tdep.c:292:59: error: invalid conversion from ‘void*’ to ‘const gdb_byte* {aka const unsigned char*}’ [-fpermissive] write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type)); ^ In file included from /home/emaisin/src/binutils-gdb/gdb/lm32-tdep.c:29:0: /home/emaisin/src/binutils-gdb/gdb/gdbcore.h:107:13: error: initializing argument 2 of ‘void write_memory(CORE_ADDR, const gdb_byte*, ssize_t)’ [-fpermissive] extern void write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, ^ gdb/ChangeLog: * lm32-tdep.c (lm32_push_dummy_call): Replace call to write_memory with write_memory_unsigned_integer.
2015-10-13Constify arguments of gdb_bfd_lookup_symbol and related functionsSimon Marchi6-15/+30
Fixes this error: /home/pedro/gdb/mygit/src/gdb/solib-frv.c: In function ‘int enable_break2()’: /home/pedro/gdb/mygit/src/gdb/solib-frv.c:622:72: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive] addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name, "_dl_debug_addr"); ^ In file included from /home/pedro/gdb/mygit/src/gdb/solib-frv.c:23:0: /home/pedro/gdb/mygit/src/gdb/solib.h:82:18: error: initializing argument 3 of ‘CORE_ADDR gdb_bfd_lookup_symbol(bfd*, int (*)(asymbol*, void*), void*)’ [-fpermissive] extern CORE_ADDR gdb_bfd_lookup_symbol (bfd *abfd, ^ The call in question is: addr = gdb_bfd_lookup_symbol (tmp_bfd, cmp_name, "_dl_debug_addr"); gdb/ChangeLog: * solib-dsbt.c (cmp_name): Constify arguments. * solib-frv.c (cmp_name): Likewise. * solib-svr4.c (svr4_create_solib_event_breakpoints): Likewise. * solib.c (gdb_bfd_lookup_symbol_from_symtab): Likewise. (bfd_lookup_symbol_from_dyn_symtab): Likewise. (gdb_bfd_lookup_symbol): Likewise. * solib.h (gdb_bfd_lookup_symbol): Likewise. (gdb_bfd_lookup_symbol_from_symtab): Likewise.
2015-10-13Add EM_IAMCU support to goldH.J. Lu4-1/+70
elfcpp/ PR gold/19118 * elfcpp.h (EM): Add EM_IAMCU. gold/ PR gold/19118 * i386.cc (Target_iamcu): New class. (Target_selector_iamcu): Likewise. (Target_iamcu::iamcu_info): New variable. (target_selector_iamcu): Likewise.
2015-10-13Updated Chinese translation for the linker.Nick Clifton2-691/+1051
* po/zh_TW.po: Updated Chinese translation.
2015-10-13Tidy code setting PT_GNU_RELRO p_flagsAlan Modra2-4/+8
No functional changes here. * elf.c (_bfd_elf_map_sections_to_segments): Don't set PT_GNU_RELRO p_flags. (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO flags to PF_R here.
2015-10-12sim: ft32: test coverage for link parameters and PM write portJames Bowman2-0/+42
Adds test coverage for recent features.
2015-10-13Automatic date update in version.inGDB Administrator1-1/+1
2015-10-12gdb: Simplify parse_frame_specification.Andrew Burgess2-10/+16
Remove an unneeded parameter from parse_frame_specification, replace with a fixed string within parse_frame_specification. The message was the same in every place that parse_frame_specification was used anyway. gdb/ChangeLog: * stack.c (parse_frame_specification): Remove message parameter, replace with fixed string in function body, update function comment. (frame_info): Remove message to parse_frame_specification. (select_frame_command): Likewise.
2015-10-12gdb: Avoid unneeded calls to parse_frame_specification.Andrew Burgess2-14/+19
Within the stack command there are a couple of places where fixed strings are passed into functions that are really intended for processing user input. These fixed strings are then processed and the result returned. Given that the input strings in these cases are fixed, and are always "0", then the result will always be the same, the current frame. By switching to using get_current_frame instead the code can be simplified, and the intention of the code is clearer. gdb/ChangeLog: * stack.c (parse_frame_specification): Delete. (parse_frame_specification_1): Rename to parse_frame_specification. (frame_info): Use parse_frame_specification. (select_frame_command): Likewise. (return_command): Use select_frame and print_stack_frame rather than frame_command and select_frame_command. (func_command): Use get_current_frame rather than parse_frame_specification.
2015-10-12gdb: Fix bug with dbx style func command.Andrew Burgess4-6/+12
The func command, available when starting gdb in dbx mode, is supposed to take a function name and locate the frame for that function in the stack. This has been broken for a while due to an invalid check of the arguments within the worker function. Fixed in this commit. gdb/ChangeLog: * stack.c (func_command): Return early when there is no ARG string. gdb/testsuite/ChangeLog: * gdb.base/dbx.exp (test_func): Remove xfails, update expected results.
2015-10-12gdb/doc: Restructure frame command documentation.Andrew Burgess2-160/+157
The 'frame' command is documented in two places. The 'select-frame' command is only mentioned in one of these places. Of the two places, having the description of 'frame' and 'select-frame' in the section 'Selecting a Frame' seems like the most obvious choice, which is where things like 'up' and 'down' are also documented. This commit moves the documentation of 'frame' and 'select-frame' into the 'Selecting a Frame' section, and removes the duplicate documentation of the 'frame' command. At the same time I have reordered the sections in the 'Examining the Stack' chapter, moving the discussion of frame filters to the end of the chapter; it feels odd that we talk about frame filters before such basic things like navigating the stack, or examining stack frames in general. gdb/doc/ChangeLog: * gdb.texinfo (Frames): Remove 'frame' and 'select-frame' description. (Frame Filter Management): Move to later in the 'Examining the Stack' chapter. (Selection): Add entry for 'select-frame'.
2015-10-12gdb: Make use of safe-ctype.h header.Andrew Burgess2-3/+9
In stack.c switch to using safe-ctype.h instead of ctype.h, update code as required. gdb/ChangeLog: * stack.c: Include safe-ctype.h not ctype.h. (parse_frame_specification): Use ISSPACE not isspace. (backtrace_command): Use TOLOWER not tolower.
2015-10-12mep: Add cast for int to enum conversionSimon Marchi2-2/+10
Taken directly from Pedro's branch. gdb/ChangeLog: * mep-tdep.c (current_me_module): Add cast. (mep_gdbarch_init): Likewise.
2015-10-12m32c: Split m32c_move_reg_t in read/write variantsSimon Marchi2-62/+89
This allows to avoid casting away the const qualification in m32c_pseudo_register_write (which is the entry points for all other register read/write functions). Also, use gdb_byte* instead of void* to avoid casts when calling gdb common memory functions. It also allows to remove those "For adderss arithmetic" local variables. gdb/ChangeLog: * m32c-tdep.c (m32c_move_reg_t): Replace with... (m32c_write_reg_t): ...this and... (m32c_read_reg_t): ...this. (struct m32c_reg): Update types of read and write. (m32c_raw_read): Change declaration type to m32c_read_reg_t and adjust definition. (m32c_banked_read): Likewise. (m32c_sb_read): Likewise. (m32c_part_read): Likewise. (m32c_cat_read): Likewise. (m32c_r3r2r1r0_read): Likewise. (m32c_raw_write): Change declaration type to m32c_write_reg_t and adjust definition. (m32c_banked_write): Likewise. (m32c_sb_write): Likewise. (m32c_part_write): Likewise. (m32c_cat_write): Likewise. (m32c_r3r2r1r0_write): Likewise.
2015-10-12aarch64: Add cast for integer to enum castSimon Marchi2-1/+6
/home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c: In function ‘int aarch64_linux_syscall_record(regcache*, long unsigned int)’: /home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c:904:57: error: invalid conversion from ‘long unsigned int’ to ‘aarch64_syscall’ [-fpermissive] syscall_gdb = aarch64_canonicalize_syscall (svc_number); ^ /home/simark/src/binutils-gdb/gdb/aarch64-linux-tdep.c:645:1: note: initializing argument 1 of ‘gdb_syscall aarch64_canonicalize_syscall(aarch64_syscall)’ aarch64_canonicalize_syscall (enum aarch64_syscall syscall_number) ^ gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_linux_syscall_record): Add cast.