summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add support for converting VLDR <reg>,=<constant> to a VMOV instruction when ↵Alessandro Marzocchi2015-06-1710-61/+452
| | | | | | | | | | | | | | | | appropriate. PR gas/18500 gas * config/tc-arm.c (is_double_a_single): New function. (double_to_single): New function. (move_or_literal_pool): Add support for converting VLDR to VMOV. tests * gas/arm/vfpv2-ldr_immediate.s: New test case. * gas/arm/vfpv2-ldr_immediate.d: Expected disassembly. * gas/arm/vfpv3-ldr_immediate.s: New test case. * gas/arm/vfpv3-ldr_immediate.d: Expected disassembly. * gas/arm/vfpv3xd-ldr_immediate.s: New test case. * gas/arm/vfpv3xd-ldr_immediate.d: Expected disassembly.
* S390: Add syscall info for syscalls from 344 up to 354Andreas Arnez2015-06-173-0/+27
| | | | | | | | | | Represent new Linux syscalls for s390 and s390x in GDB's syscall info. Add the syscalls from 344 (finit_module) up to 354 (execveat). gdb/ChangeLog: * syscalls/s390-linux.xml: Add syscalls 344 through 354. * syscalls/s390x-linux.xml: Likewise.
* Add vector ABI tests to gnu_vector.expAndreas Arnez2015-06-173-21/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the gnu_vector test was limited to "static" aspects of GDB's vector support, like evaluating vector-valued expressions. This patch enriches the test and adds checks for GDB's vector ABI support as well. The new checks particularly verify inferior function calls with vector arguments and GDB's handling of vector return values. The test now attempts to compile for the target's "native" architecture, such that a hardware vector ABI is used if available. Since GDB has no vector ABI support for x86 and x86_64 targets, most of the new checks are KFAILed there. gdb/testsuite/ChangeLog: * gdb.base/gnu_vector.c: Include stdarg.h and stdio.h. (VECTOR): New macro. Use it... (int4, uint4, char4, float4, int2, longlong2, float2, double2): ...for these typedefs. (int8, char1, int1, double1): New typedefs. (struct just_int2, struct two_int2): New structures. (add_some_intvecs, add_many_charvecs, add_various_floatvecs) (add_structvecs, add_singlevecs): New functions. (main): Call add_some_intvecs twice. * gdb.base/gnu_vector.exp: Drop GCC version check; just attempt the compile and exit upon failure. Try compiling for the "native" architecture. Test inferior function calls with vector arguments and vector return value handling with "finish" and "return".
* Automatic date update in version.inGDB Administrator2015-06-171-1/+1
|
* gas: section name substitution sequenceNicolas Pitre2015-06-175-1/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to automatically construct a section name based on the prior section. When gas is invoked with --sectname-subst, the occurrence of %S in a section name will be substituted by the name of the current section. For example: .macro exception_code .pushsection %S.exception [exception code here] .popsection .endm .text [code] exception_code [...] .section .init [init code] exception_code [...] The first and second exception_code invocations create the .text.exception and the .init.exception sections respectively. This is useful e.g. to discriminate between anciliary sections that are tied to .init code and can be discarded at run time when initialization is over vs anciliary sections tied to .text sections that need to stay resident. * as.c (show_usage): Document --sectname-subst. (parse_args): Add --sectname-subst. * as.h (flag_sectname_subst): New. * config/obj-elf.c (obj_elf_section_name): Add %S substitution. * doc/as.texinfo: Document it.
* GDB Namespaces - Define MSG_CMSG_CLOEXEC if not defined.Michael Eager2015-06-162-0/+10
| | | | | | 2015-06-16 Michael Eager <eager@eagercon.com> * nat/linux-namespaces.c (MSG_CMSG_CLOEXEC): Define if not defined.
* Call target_terminal_ours_for_output() before refreshing TUI's frame infoPatrick Palka2015-06-162-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases tui_show_frame_info() may get called while the inferior's terminal settings are still in effect. But when we call this function we absolutely need to have our terminal settings in effect because the function is responsible for redrawing TUI's windows following a change in the selected frame or a change in the PC. If our terminal settings are not in effect, the screen does not get redrawn properly, causing temporary display artifacts (which can be fixed via ^L). This scenario happens most prominently when stepping through a program in TUI while a watchpoint is in effect. Here is an example backtrace for when tui_show_frame_info() gets called while target_terminal_is_inferior() == 1: #1 0x00000000004988ee in tui_selected_frame_level_changed_hook (level=0) #2 0x0000000000617b99 in select_frame (fi=0x18c9820) #3 0x0000000000617c3f in get_selected_frame (message=message@entry=0x0) #4 0x00000000004ce534 in update_watchpoint (b=b@entry=0x2d9a760, reparse=reparse@entry=0) #5 0x00000000004d625e in insert_breakpoints () #6 0x0000000000531cfe in keep_going (ecs=ecs@entry=0x7ffea7884ac0) #7 0x00000000005326d7 in process_event_stop_test (ecs=ecs@entry=0x7ffea7884ac0) #8 0x000000000053596e in handle_inferior_event_1 (ecs=0x7ffea7884ac0) The fix is simple: call target_terminal_ours_for_output() before calling tui_show_frame_info() in TUI's frame-changed hook, making sure to restore the original terminal settings afterwards. gdb/ChangeLog: * tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Call target_terminal_ours_for_output() before calling tui_show_frame_info(), and restore the original terminal settings afterwards.
* [AArch64] Support id_mmfr4 system registerMatthew Wahab2015-06-165-11/+23
| | | | | | | | | | 2015-06-16 Matthew Wahab <matthew.wahab@arm.com> opcodes/ * aarch64-opc.c (aarch64_sys_regs): Add "id_mmfr4_el1". gas/testsuite * sysreg.d: Add id_mmfr4_el1, update expected output. * sysreg.s: Add id_mmfr4_el1.
* Fix build when size_t is not available in bfd-in2.hJon Turney2015-06-163-2/+7
| | | | | | | | | bfd/ChangeLog: 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk> * bfd.c: Change struct bfd_build_id to use bfd_size_type. * bfd-in2.h : Regenerate.
* Fixes a compile time warnng about left shifting a negative value.Szabolcs Nagy2015-06-162-1/+5
| | | | * arm-dis.c (print_insn_coprocessor): Avoid negative shift.
* Fix compilation of gdb/arm-linux-nat.c on Raspbian GNU/Linux 7Martin Simmons2015-06-162-0/+6
| | | | | | | | | | | | | | | | | | | | | | | GDB trunk fails to compile on Raspbian GNU/Linux 7 because PTRACE_GETREGSET and PTRACE_SETREGSET are not defined in sys/ptrace.h. gcc -g -O2 -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I./../zlib -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wpointer-sign -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o arm-linux-nat.o -MT arm-linux-nat.o -MMD -MP -MF .deps/arm-linux-nat.Tpo arm-linux-nat.c arm-linux-nat.c: In function 'fetch_fpregister': arm-linux-nat.c:103:21: error: 'PTRACE_GETREGSET' undeclared (first use in this function) arm-linux-nat.c:103:21: note: each undeclared identifier is reported only once for each function it appears in arm-linux-nat.c: In function 'fetch_fpregs': arm-linux-nat.c:144:21: error: 'PTRACE_GETREGSET' undeclared (first use in this function) arm-linux-nat.c: In function 'store_fpregister': arm-linux-nat.c:184:21: error: 'PTRACE_GETREGSET' undeclared (first use in this function) arm-linux-nat.c:211:21: error: 'PTRACE_SETREGSET' undeclared (first use in this function) ... This patch includes the gdb header file nat/linux-ptrace.h, which provides fallback definitions. 2015-06-16 Martin Simmons <martin@lispworks.com> (tiny patch) * arm-linux-nat.c: Include nat/linux-ptrace.h.
* ppc476 linker workaround shared lib fixes againAlan Modra2015-06-166-32/+72
| | | | | | | | | | | | Huh, I can't even write a binary search properly. bfd/ * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of dynamic relocs. ld/testsuite/ * ld-powerpc/ppc476-shared.s: Repeat dynamic reloc generating insns. * ld-powerpc/ppc476-shared.d: Update. * ld-powerpc/ppc476-shared2.d: Update.
* Automatic date update in version.inGDB Administrator2015-06-161-1/+1
|
* MI: consider addressable unit size when reading/writing memorySimon Marchi2015-06-152-22/+40
| | | | | | | | | | | | As a user of the target memory read/write interface, the MI code must adjust its memory allocations to take into account the addressable memory unitsize of the target. gdb/ChangeLog: mi/mi-main.c (mi_cmd_data_read_memory_bytes): Consider byte size. (mi_cmd_data_write_memory_bytes): Same.
* Clarify doc about memory read/write and non-8-bits addressable memory unit sizesSimon Marchi2015-06-153-29/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New in v3: * Change RSP documentation as well. The m, M and X packets now use lengths in addressable memory units. New in v2: * Change wording: use byte for 8-bits chunks and addressable memory unit for the unit of data associated to a single address. * Introduce definition of addressable memory unit in the Memory section. This patch modifies the manual to clarify the MI, RSP and Python APIs in regard to reading/writing memory on architectures with addressable memory unit that are not 8 bits. Care is taken to use the word "addressable memory unit" or "memory unit" when referring to one piece of the smallest addressable size on the current architecture and the word "byte" when referring to an 8-bits data piece. For MI, -data-{read,write}-memory are not modified, since they are deprecated. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Data Manipulation): Clarify usage of bytes and memory units for -data-{read,write}-memory-bytes. (Packets): Same for m, M and X packets. * python.texi (Inferiors In Python): Same for read_memory and write_memory.
* Cleanup write_memory docSimon Marchi2015-06-153-6/+9
| | | | | | | | | This doc about write_memory seems outdated. gdb/ChangeLog: * corefile.c (write_memory): Update doc. * gdbcore.h (write_memory): Same.
* Code cleanup: Rename enum -> enum filterflagsJan Kratochvil2015-06-152-6/+12
| | | | | | | | | | | | | | | | | | | | | | Bit mask ints are better to make enums as GDB already has support to automatically decode them: before this patch: (gdb) p filterflags $1 = 51 (gdb) p/x filterflags $2 = 0x33 after this patch: (gdb) p filterflags $1 = (COREFILTER_ANON_PRIVATE | COREFILTER_ANON_SHARED | COREFILTER_ELF_HEADERS | COREFILTER_HUGETLB_PRIVATE) gdb/ChangeLog 2015-06-15 Jan Kratochvil <jan.kratochvil@redhat.com> * linux-tdep.c (enum filterflags): Make it from anonymous enum. (dump_mapping_p): Use it for parameter filterflags. (linux_find_memory_regions_full): Use it for variable filterflags.
* Merge multiple hex conversionsJan Kratochvil2015-06-154-18/+18
| | | | | | | | | | | | | | | | | | gdb/ChangeLog 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com Jan Kratochvil <jan.kratochvil@redhat.com> Merge multiple hex conversions. * monitor.c: Include rsp-low.h. (fromhex): Remove definition. gdb/gdbserver/ChangeLog 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com Jan Kratochvil <jan.kratochvil@redhat.com> Merge multiple hex conversions. * gdbreplay.c (tohex): Rename to 'fromhex'. (logchar): Use fromhex.
* Move utility functions to common/Jan Kratochvil2015-06-1510-175/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb/ChangeLog 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com Jan Kratochvil <jan.kratochvil@redhat.com> Move utility functions to common/. * cli/cli-utils.c (skip_spaces, skip_spaces_const, skip_to_space_const): Move defs to common/common-utils.c. * cli/cli-utils.h (skip_spaces, skip_spaces_const, skip_to_space) (skip_to_space_const): Move decls to common/common-utils.h. * common/common-defs.h: Move include of common-types.h before common-utils.h. * common/common-utils.c: Include host-defs.h and ctype.h. (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int, strtoulst): Move from utils.c. (skip_spaces, skip_spaces_const, skip_to_space_const): Move from cli/cli-utils.c. * common/common-utils.h (strtoulst): Move decl from utils.h. (skip_spaces, skip_spaces_const, skip_to_space, skip_to_space_const): Move from cli/cli-utils.h. * common/host-defs.h: Include limits.h. (TARGET_CHAR_BIT, HOST_CHAR_BIT): Moved from defs.h. (skip_spaces, skip_spaces_const): Move decls from cli/cli-utils.h. * defs.h (TARGET_CHAR_BIT, HOST_CHAR_BIT): Move to common/common-utils.h. * utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int) (strtoulst): Move to common/common-utils.c. * utils.h (strtoulst): Moved decl to common/common-utils.h.
* Copy aarch64-linux.xml to build tree.Yao Qi2015-06-152-1/+5
| | | | | | | | | | | This patch fixes a bug that aarch64-linux.xml isn't copied to the build tree, so that some tests catch-syscall.exp fail. gdb: 2015-06-15 Yao Qi <yao.qi@linaro.org> * data-directory/Makefile.in (SYSCALLS_FILES): Add aarch64-linux.xml.
* Fix ChangeLog entry.Ulrich Weigand2015-06-151-1/+1
|
* Allow gdb to find debug symbols file by build-id for PE file format alsoJon Turney2015-06-1519-66/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This promotes BFD's struct elf_build_id to the generic struct bfd_build_id, populated when an ELF or PE BFD is read. gdb is updated to use that, and to use the build-id to find symbols for PE files also. There is currently no generic way to extract the build-id from an object file, perhaps an option to objdump to do this might make sense? On x86_64-pc-cygwin, gdb's sepdebug.exp changes: -# of unsupported tests 1 +# of expected passes 90 I don't seem to get consistent testsuite runs on i686-linux-gnu, but there don't appear to be any regressions. bfd/ChangeLog: 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk> * elf-bfd.h : Remove struct elf_build_id. * bfd.c : Add struct bfd_build_id. * bfd-in2.h: Regenerate. * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id. * libpei.h: Add protoype and macros for bfd_XXi_slurp_codeview_record. * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public * peicode.h (pe_bfd_read_buildid): Add. (pe_bfd_object_p): Use pe_bfd_read_buildid(). gdb/ChangeLog: 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk> * build-id.c: Don't include elf-bfd.h. (build_id_bfd_get): Use bfd_build_id. (build_id_verify): Ditto. * build-id.h: Ditto. (find_separate_debug_file_by_buildid): Ditto. * python/py-objfile.c: Don't include elf-bfd.h. (objfpy_get_build_id) Use bfd_build_id. (objfpy_build_id_matches, objfpy_lookup_objfile_by_build_id): Ditto. * coffread.c: Include build-id.h. (coff_symfile_read): Try find_separate_debug_file_by_buildid. gdb/doc/ChangeLog: 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk> * gdb.texinfo (Separate Debug Files): Document that PE is also supported. gdb/testsuite/ChangeLog: 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk> * gdb.base/sepdebug.exp: Add EXEEXT where needed. * lib/gdb.exp (get_build_id): Teach how to extract build-id from a PE file. * lib/future.exp (gdb_find_objdump): Add gdb_find_objdump. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* windows-nat: Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__Jon Turney2015-06-152-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__ __COPY_CONTEXT_SIZE was added to Cygwin's headers in 2006. Versions of Cygwin which don't define __COPY_CONTEXT_SIZE are long obsolete. Also see the thread starting at https://sourceware.org/ml/gdb-patches/2015-03/msg00989.html for some discussion Note that __COPY_CONTEXT_SIZE should just be sizeof(CONTEXT) (which is a platform constant), but isn't due to historical mistakes in Cygwin headers. gdb/ChangeLog: 2015-06-03 Jon Turney <jon.turney@dronecode.org.uk> * windows-nat.c (do_windows_fetch_inferior_registers) (handle_output_debug_string): Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* [AArch64] Gas add BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 supportRenlin Li2015-06-1510-15/+74
| | | | | | | | | | | | | | | | | | | 2015-06-15 Renlin Li <renlin.li@arm.com> bfd/ * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD64_GOTOFF_LO15. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. gas/ * config/tc-aarch64.c (reloc_table): New relocation modifier. (md_apply_fix): Support BFD_RELOC_AARCH64_LD64_GOTOFF_LO15. (aarch64_force_relocation): Ditto gas/testsuite/ * gas/aarch64/reloc-insn.s: Update test * gas/aarch64/reloc-insn.d: Update expected result.
* Fix a segmentation fault triggered when trying to handle an unresolved PE ↵Nick Clifton2015-06-153-2/+27
| | | | | | | | | symbol with a very long name. PR ld/18466 * emultempl/pe.em (pe_find_data_imports): Generate an error if a symbol name is too long to handle. * emultempl/pep.em (pep_find_data_imports): Likewise.
* gas: Don't use frag_align but use plain padding to align .debug_aranges.Mark Wielaard2015-06-155-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | out_debug_aranges uses frag_align to make sure the addresses start out aligned. Using frag_align will call frag_var[_init], which will end up calling TC_FRAG_INIT. On arm and aarch64 TC_FRAG_INIT will generate a $d mapping symbol for the .debug_aranges to show that at that point a sequence of data items starts. Such a symbol pointing into a non-allocated debug section will confuse eu-strip -g. And it seems inefficient and wrong in general to have additional mapping symbols for debug sections, which won't contain actual code in the first place. Just keep track of the aranges header size and use plain padding to align the addresses which avoids generating any mapping symbols on aarch64 and arm. Includes a testcase for aarch64 that PASS with this patch and shows the extra $d mapping symbol in .debug_aranges before. gas/ChangeLog * dwarf2dbg.c (out_header): Document EXPR->X_add_number value, out_debug_aranges depends on it. (out_debug_aranges): Track size of header to properly pad header for address alignment. gas/testsuite/ChangeLog * gas/aarch64/dwarf.d: New. * gas/aarch64/dwarf.s: New.
* DJGPP port of binutils broken due to 64 bit cygwin fixAlan Modra2015-06-152-11/+17
| | | | | | * cofflink.c (_bfd_coff_generic_relocate_section): Revert 2014-03-26 change. Call _bfd_clear_contents for relocs against local and global symbols defined in discarded input sections.
* Automatic date update in version.inGDB Administrator2015-06-151-1/+1
|
* Automatic date update in version.inGDB Administrator2015-06-141-1/+1
|
* gdb: Rework command completion on 'tui reg'.Andrew Burgess2015-06-137-101/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously specified a few known register groups for the 'tui reg' command. Other register groups could be accessed, but only by using the 'tui reg next' command and cycling through all the groups. This commit removes the hard coded sub-commands of 'tui reg' and instead adds dynamic completion of sub-commands based on the architecturally defined register groups, giving immediate access to all available register groups. There is still the 'next' and 'prev' commands for cycling through the register groups if that's wanted. The new code maintains the ability to only enter partial names for register groups, which is something we got for free when using the standard sub-command mechanism. The register (and register group) completer has been changed to use get_current_arch rather than using the architecture of the currently selected frame. When the target is running, this is equivalent, however, when the target is not running, using get_current_arch will provide results from the default architecture. gdb/ChangeLog: * completer.c: Add arch-utils.h include. (enum reg_completer_targets): New enum. (reg_or_group_completer_1): New function containing old reg_or_group_completer, add and use new parameter to control what is completed on. Use get_current_arch rather than architecture of currently selected frame. (reg_or_group_completer): Call new reg_or_group_completer_1. (reggroup_completer): Call new reg_or_group_completer_1. * completer.h (reggroup_completer): Add declaration. * tui/tui-regs.c: Add 'completer.h' include. (tui_reg_next_command): Renamed to... (tui_reg_next): ...this. Adjust parameters and return rather than display new group. (tui_reg_prev_command): Renamed to... (tui_reg_prev): ...this. Adjust parameters and return rather than display new group. (tui_reg_float_command): Delete. (tui_reg_general_command): Delete. (tui_reg_system_command): Delete. (tui_reg_command): Rewrite to perform switching of register group. Add header comment. (tuireglist): Remove. (tui_reggroup_completer): New function. (_initialize_tui_regs): Remove 'tui reg' sub-commands, update creation of 'tui reg' command. * NEWS: Add comment about 'tui reg' changes. gdb/doc/ChangeLog: * gdb.texinfo (TUI Commands): Bring all 'tui reg' commands into a single table entry.
* Automatic date update in version.inGDB Administrator2015-06-131-1/+1
|
* [gold][aarch64] Fix erratum 835769.Han Shen2015-06-123-44/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | gold/ChangeLog: * aarch64.cc (AArch64_insn_utilities::BYTES_PER_INSN): Move defintion outside class definition. (AArch64_insn_utilities::AARCH64_ZR): New static constant. (AArch64_insn_utilities::aarch64_op31): New member. (AArch64_insn_utilities::aarch64_ra): New member. (AArch64_insn_utilities::aarch64_mac): New member. (AArch64_insn_utilities::aarch64_mlxl): New member. (ST_E_835769): New global enum member. (Stub_table::relocate_stubs): Add 835769 handler. (Stub_template_repertoire::Stub_template_repertoire): Install new stub type. (AArch64_relobj::scan_errata): This func is renamed from scan_erratum_843419. (AArch64_relobj::do_count_local_symbols): Add 835769 handler. (AArch64_relobj::do_relocate_sections): Add 835769 handler. (AArch64_relobj::scan_sections_for_stubs): Add 835769 handler. (Target_aarch64::scan_erratum_835769_span): New method. (Target_aarch64::create_erratum_stub): New method. (Target_aarch64::is_erratum_835769_sequence): New method. (Target_aarch64::scan_erratum_843419_sequence): Move part of the code into create_erratum_stub. * options.h (fix_cortex_a53_835769): New option.
* target: consider addressable unit size when reading/writing memorySimon Marchi2015-06-123-14/+65
| | | | | | | | | | | | | | | | | If we are reading/writing from a memory object, the length represents the number of "addresses" to read/write, so the addressable unit size needs to be taken into account when allocating memory on gdb's side. gdb/ChangeLog: * target.c (target_read): Consider addressable unit size when reading from a memory object. (read_memory_robust): Same. (read_whatever_is_readable): Same. (target_write_with_progress): Consider addressable unit size when writing to a memory object. * target.h (target_read): Update documentation. (target_write): Add documentation.
* gdbarch: add addressable_memory_unit_size methodSimon Marchi2015-06-126-0/+55
| | | | | | | | | | | | | Add a new gdbarch method to get the length of an addressable memory unit for a given architecture. The default implementation returns 1. gdb/ChangeLog: * arch-utils.h (default_addressable_memory_unit_size): New. * arch-utils.c (default_addressable_memory_unit_size): New. * gdbarch.sh (addressable_memory_unit_size): New. * gdbarch.h: Re-generate. * gdbarch.c: Re-generate.
* Remove unused MTMSRD_L macro and re-add accidentally deleted comment.Peter Bergner2015-06-122-2/+7
| | | | | | | | | | | In the commit that added PowerPC Pair Singles, Ben accidentally removed a comment and re-added an unused MTMSRD_L macro Alan had recently deleted. This was probably just an oversite when he was refreshing his patch to trunk. opcodes/ * ppc-opc.c: Add comment accidentally removed by old commit. (MTMSRD_L): Delete.
* Various cleanups in target read/write codeSimon Marchi2015-06-123-47/+60
| | | | | | | | | | | | | | | | | This contains various cleanups in the target memory read and write code. They are not directly related to the non-8-bits changes, but they clarify things a bit down the line. gdb/ChangeLog: * target.c (target_read): Rename variables and use TARGET_XFER_E_IO. (target_read_with_progress): Same. (read_memory_robust): Constify parameters and rename variables. (read_whatever_is_readable): Constify parameters, rename variables, adjust formatting. * target.h (read_memory_robust): Constify parameters.
* sim: bfin: expand CB_SYS_xxx commentMike Frysinger2015-06-122-1/+7
|
* sim: update configure.in->configure.ac docsMike Frysinger2015-06-1262-40/+162
| | | | A few places still refer to the configure.in file; update them.
* ppc64: Handle short vectors as function return typesUlrich Weigand2015-06-122-2/+35
| | | | | | | | | | | | | Short synthetic vector types (i.e. those defined using GCC's attribute ((vector_size)) instead of AltiVec vector types) are returned in r3. Fix ppc64_sysv_abi_return_value to correctly handle this. gdb/ChangeLog: * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value_base): Handle short synthetic (non-AltiVec) vector types. (ppc64_sysv_abi_return_value): Likewise.
* sim: drop -DTRACE from configureMike Frysinger2015-06-1255-84/+193
| | | | | No code uses this anymore and the symbol conflicts with the new TRACE helper. Punt it from configure.
* sim: msp430: use new common trace print helpersMike Frysinger2015-06-122-109/+69
| | | | | Replace the "if (TRACE_xxx_P) trace_generic" form with "TRACE_xxx". The output is the same, but the code is nicer to read.
* Fix MI dprintf-insert not printing on a resolved pending location.Antoine Tremblay2015-06-126-2/+155
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the "Format string required" error when trying to print a dprintf on a now resolved, pending location when set via the MI interface even if the format string is entered correctly. This patch also adds a test case to check that issue called mi-dprintf-pending.exp. gdb/ChangeLog: PR breakpoints/16465 * breakpoint.c (create_breakpoint): Save extra_string for pending breakpoints. gdb/testsuite/ChangeLog: PR breakpoints/16465 * gdb.mi/mi-dprintf-pending.c: New file. * gdb.mi/mi-dprintf-pending.exp: New test. * gdb.mi/mi-dprintf-pendshr.c: New file.
* sim: moxie: use new common trace definesMike Frysinger2015-06-122-4/+14
| | | | | Now that there's common helpers for printing trace data, switch to that to restore the insn tracing support for this target.
* sim: trace: add common macros for logging infoMike Frysinger2015-06-128-37/+74
| | | | | | The Blackfin port had some TRACE_xxx macros for easily logging trace data. Use these as a base for common ones that have a simple form and match the existing sets of helper macros.
* sim: mips: switch to common WITH_TRACE_ANY_PMike Frysinger2015-06-124-30/+36
| | | | | We want to add new common trace helpers including "TRACE", so change the mips one to the new WITH_TRACE_ANY_P macro since they do the same thing.
* sim: trace: add WITH_TRACE_ANY_P helperMike Frysinger2015-06-124-8/+19
| | | | | We have STRACE_ANY_P and TRACE_ANY_P, so add WITH_TRACE_ANY_P to fill out the API. This lets us wrap the internal configure symbol.
* sim: moxie: rename TRACE to MOXIE_TRACE_INSNMike Frysinger2015-06-122-73/+79
| | | | | We want to add new common trace helpers including "TRACE", so rename the moxie one to MOXIE_TRACE_INSN. This also matches what the code is doing.
* Add new ld option: --print-memory-usageTristan Gingold2015-06-1220-0/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | ld/ * NEWS: Mention new option. * lexsup.c (parse_args): Handle --print-memory-usage. (ld_options): Add --print-memory-usage. * ldmain.c (main): Call lang_print_memory_usage. * ldlex.h (enum option_values): Add OPTION_PRINT_MEMORY_USAGE. * ldlang.h: Add prototype of lang_print_memory_usage. * ldlang.c (lang_print_memory_size, lang_print_memory_usage): New functions. * ld.texinfo (Options): Document --print-memory-usage. * ld.h (args_type): Add print_memory_usage field. ld/testsuite/ * ld-scripts/print-memory-usage-1.t, * ld-scripts/print-memory-usage-1.s, * ld-scripts/print-memory-usage-1.l, * ld-scripts/print-memory-usage-2.t, * ld-scripts/print-memory-usage-2.l, * ld-scripts/print-memory-usage-3.s, * ld-scripts/print-memory-usage-3.t, * ld-scripts/print-memory-usage-3.l, * ld-scripts/print-memory-usage.t: New tests. * ld-scripts/print-memory-usage.exp: Run them.
* sim: cgen: namespace custom trace functionsMike Frysinger2015-06-1243-7039/+7143
| | | | | | | | | | | The cgen code declares some macros/funcs using the trace_xxx prefix, but the code isn't generic and only works with cgen targets. This is blocking the creation of new common trace functions. Let's blindly add cgen_xxx prefixes to all these symbols. Some already use this convention to avoid conflicts, so it makes sense to align them. In the future we might want to move some to the common trace core, but one thing at a time.
* Fix broken GDB build after adding Bound table support for i386.Walfred Tedeschi2015-06-124-2/+17
| | | | | | | | | | | | | | | | | | | Types used for some variables could not be used for 32 bits, causing a compilation failure. This patch adds a cast to force a quite compilation, but at the same time it bails out in the case that the cast performed is not safe, i.e. in the case where the debuggee is 64bit and debugger is 32bit. Documentation was also affected, once a different version of texinfo the docs could not be build. 2015-06-10 Walfred Tedeschi <walfred.tedeschi@intel.com> * i386-tdep.c (i386_mpx_get_bt_entry): Add a cast for mpx_bd_mask and bt_mask to CORE_ADDR. doc: * gdb.textinfo (i386): Fix "@end table" end and "@table" placement.