aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-08-22 Unify ptrace options discovery code and make both GDB andLuis Machado34-577/+715
gdbserver use it. gdb/ * Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-nat.h and nat/linux-waitpid.h. (linux-waitpid.o): New object file rule. * common/linux-ptrace.c: Include nat/linux-waitpid.h. (current_ptrace_options): Moved from linux-nat.c. (linux_ptrace_test_ret_to_nx): Use type casts for ptrace parameters. (linux_fork_to_function): New function. (linux_grandchild_function): Likewise. (linux_child_function): Likewise. (linux_check_ptrace_features): New function, heavily based on linux-nat.c:linux_test_for_tracefork. (linux_enable_event_reporting): New function. (ptrace_supports_feature): Likewise. (linux_supports_tracefork): Likewise. (linux_supports_traceclone): Likewise. (linux_supports_tracevforkdone): Likewise. (linux_supports_tracesysgood): Likewise. * common/linux-ptrace.h (HAS_NOMMU): Moved from gdbserver/linux-low.c. (linux_enable_event_reporting): New declaration. (linux_supports_tracefork): Likewise. (linux_supports_traceclone): Likewise. (linux_supports_tracevforkdone): Likewise. (linux_supports_tracesysgood): Likewise. * config.in (PTRACE_TYPE_ARG4): Regenerate. * config/aarch64/linux.mh (NATDEPFILES): Add linux-waitpid.o. * config/alpha/alpha-linux.mh (NATDEPFILES): Likewise. * config/arm/linux.mh (NATDEPFILES): Likewise. * config/i386/linux.mh (NATDEPFILES): Likewise. * config/i386/linux64.mh (NATDEPFILES): Likewise. * config/ia64/linux.mh (NATDEPFILES): Likewise. * config/m32r/linux.mh (NATDEPFILES): Likewise. * config/m68k/linux.mh (NATDEPFILES): Likewise. * config/mips/linux.mh (NATDEPFILES): Likewise. * config/pa/linux.mh (NATDEPFILES): Likewise.. * config/powerpc/linux.mh (NATDEPFILES): Likewise.. * config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise. * config/powerpc/spu-linux.mh (NATDEPFILES): Likewise. * config/sparc/linux.mh (NATDEPFILES): Likewise. * config/sparc/linux64.mh (NATDEPFILES): Likewise. * config/tilegx/linux.mh (NATDEPFILES): Likewise. * config/xtensa/linux.mh (NATDEPFILES): Likewise. * configure.ac (AC_CACHE_CHECK): Add void * to the list of ptrace's 4th argument's types. Check the type of PTRACE_TYPE_ARG4. * configure: Regenerate. * linux-nat.c: Include nat/linux-nat.h and nat/linux-waitpid.h. (SYSCALL_SIGTRAP): Moved to nat/linux-nat.h. (linux_supports_tracefork_flag): Remove. (linux_supports_tracesysgood_flag): Likewise. (linux_supports_tracevforkdone_flag): Likewise. (current_ptrace_options): Moved to common/linux-ptrace.c. (linux_tracefork_child): Remove. (my_waitpid): Remove. (linux_test_for_tracefork): Renamed to linux_check_ptrace_features and moved to common/linux-ptrace.c. (linux_test_for_tracesysgood): Remove. (linux_supports_tracesysgood): Remove. (linux_supports_tracefork): Remove. (linux_supports_tracevforkdone): Remove. (linux_enable_tracesysgood): Remove. (linux_enable_event_reporting): Remove. (linux_init_ptrace): New function. (linux_child_post_attach): Call linux_init_ptrace. (linux_child_post_startup_inferior): Call linux_init_ptrace. (linux_child_follow_fork): Call linux_supports_tracefork and linux_supports_tracevforkdone. (linux_child_insert_fork_catchpoint): Call linux_supports_tracefork. (linux_child_insert_vfork_catchpoint): Likewise. (linux_child_set_syscall_catchpoint): Call linux_supports_tracesysgood. (lin_lwp_attach_lwp): Call linux_supports_tracefork. * nat/linux-nat.h: New file. * nat/linux-waitpid.c: New file. * nat/linux-waitpid.h: New file. gdb/gdbserver/ * Makefile.in: Explain why ../target and ../nat are not listed as include file search paths. (linux-waitpid.o): New object file rule. * configure.srv (srv_native_linux_obj): New variable. Replace all occurrences of linux native object files with $srv_native_linux_obj. * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h. (HAS_NOMMU): Move defining logic to common/linux-ptrace.c. (linux_enable_event_reporting): Remove declaration. (my_waitpid): Moved to common/linux-waitpid.c. (linux_wait_for_event): Pass ptid when calling linux_enable_event_reporting. (linux_supports_tracefork_flag): Remove. (linux_enable_event_reporting): Likewise. (linux_tracefork_grandchild): Remove. (STACK_SIZE): Moved to common/linux-ptrace.c. (linux_tracefork_child): Remove. (linux_test_for_tracefork): Remove. (linux_look_up_symbols): Call linux_supports_traceclone. (initialize_low): Remove call to linux_test_for_tracefork. * linux-low.h (PTRACE_TYPE_ARG3): Move to common/linux-ptrace.h. (PTRACE_TYPE_ARG4): Likewise. Include linux-ptrace.h.
2013-08-22Adding missing files from my last commit.Sergio Durigan Junior2-0/+458
2013-08-22[Committing the `catch syscall' patch for ARM, from Samuel Bronson.]Sergio Durigan Junior6-4/+82
This time, it passes all the tests and comes with a nearly complete XML file (plus a script that can nearly regenerate the XML file). (I elected to leave out __ARM_NR_cmpxchg, since it has dire warnings to the effect that the only pieces of code that should be aware of it are the implementation and the __kuser_cmpxchg code in entry-armv.S.) gdb/ 2013-08-14 Samuel Bronson <naesten@gmail.com> ARM Linux support for `catch syscall'. * syscalls/arm-linux.py: New file. * syscalls/arm-linux.xml: Likewise. * arm-linux-tdep.c (arm_linux_get_syscall_number): New function. (arm_linux_init_abi): Register the new function and syscall xml file. * data-directory/Makefile.in: Install the new syscall xml file. * NEWS: Brag about this. gdb/testsuite/ 2013-08-14 Samuel Bronson <naesten@gmail.com> ARM Linux support for `catch syscall'. * gdb.base/catch-syscall.exp: Test this on ARM now. (fill_all_syscalls_numbers): ARM has close/chroot on 6/61, too.
2013-08-22 * emultempl/pe.em: Add --disable-large-address-aware option.Nick Clifton3-1/+22
* ld.texinfo (--disable-large-address-aware): Add documentation.
2013-08-22fix dwz.exp on 32-bit targetsTom Tromey3-6/+54
This fixes dwz.exp on 32-bit targets. It does so by introducing a new "default" setting for the address size in the DWARF assembler. Built and regtested on x86-64 Fedora 18. I also ran the gdb.dwarf2 tests on an x86 machine (gcc45). * lib/dwarf.exp (cu, tu): Handle addr_size of "default". Change default addr_size. * lib/gdb.exp (is_64_target): New gdb_caching_proc.
2013-08-22convert one more caching procTom Tromey2-21/+22
I noticed that skip_btrace_tests is a classic "caching proc" that I missed when I added gdb_caching_proc. This patch converts it. Built and regtested on x86-64 Fedora 18. * lib/gdb.exp (skip_btrace_tests): Use gdb_caching_proc and standard_temp_file.
2013-08-22fix gdb.arch to be parallel-safeTom Tromey18-85/+53
This fixes parts of gdb.arch to be parallel-safe. I only changed the bits I could test on this machine. I don't have access to many of the machines needed to fully switch gdb.arch; but I am happy to provide advice to others attempting this. Or, I can send an untested patch to convert it all. Tested on x86-64 Fedora 18. * gdb.arch/amd64-byte.exp: Use standard_testfile, clean_restart. * gdb.arch/amd64-disp-step.exp: Use standard_testfile. * gdb.arch/amd64-dword.exp: Use standard_testfile, clean_restart. * gdb.arch/amd64-entry-value-param.exp: Use standard_testfile. * gdb.arch/amd64-entry-value.exp: Use standard_testfile. * gdb.arch/amd64-prologue-xmm.exp: Use standard_testfile. * gdb.arch/amd64-word.exp: Use standard_testfile, clean_restart. * gdb.arch/i386-avx.exp: Use standard_testfile, clean_restart. * gdb.arch/i386-byte.exp: Use standard_testfile, clean_restart. * gdb.arch/i386-disp-step.exp: Use standard_testfile. * gdb.arch/i386-dr3-watch.exp: Use standard_testfile. * gdb.arch/i386-permbkpt.exp: Use standard_testfile, clean_restart. * gdb.arch/i386-signal.exp: Use standard_testfile. * gdb.arch/i386-size-overlap.exp: Use standard_testfile, clean_restart. * gdb.arch/i386-sse.exp: Use standard_testfile, clean_restart. * gdb.arch/i386-unwind.exp: Use standard_testfile. * gdb.arch/i386-word.exp: Use standard_testfile, clean_restart.
2013-08-22fix gdb.python to be parallel-safeTom Tromey12-26/+62
This fixes gdb.python to be parallel-safe, mostly by changing it to use gdb_remote_download. Tested on x86-64 Fedora 18. * gdb.python/py-error.exp: Use gdb_remote_download. * gdb.python/py-mi.exp: Use gdb_remote_download. * gdb.python/py-objfile-script.exp: Use standard_output_file. * gdb.python/py-prettyprint.exp: Use gdb_remote_download. (run_lang_tests): Likewise. * gdb.python/py-section-script.c: Use SCRIPT_FILE rather than filename. * gdb.python/py-section-script.exp: Set SCRIPT_FILE when compiling. Use gdb_remote_download. Update some tests. * gdb.python/py-strfns.exp (test_strfns_core_file): Use standard_output_file. * gdb.python/py-typeprint.exp: Use gdb_remote_download. * gdb.python/py-frame-args.exp: Use gdb_remote_download. * gdb.python/py-framefilter-mi.exp: Use gdb_remote_download. * gdb.python/py-framefilter.exp: Use gdb_remote_download, standard_output_file.
2013-08-22use standard_temp_file in another caching procTom Tromey2-4/+8
In an earlier patch I forgot to change the caching proc in cell.exp to use standard_temp_file. This fixes the oversight. Tested on x86-64 Fedora 18. * lib/cell.exp (skip_cell_tests): Use standard_temp_file.
2013-08-22introduce gdb_remote_download and finish parallel fixes in gdb.dwarf2Tom Tromey8-6/+34
This finishes making gdb.dwarf2 parallel-safe. To do this, this patch introduces a new gdb_remote_download proc, that works somewhat differently in the one specific case where it matters: for a copy to "host", if no destination was given, and the host is not actually remote, then standard_output_file is used. In parallel mode this guarantees that the resulting file will end up in a parallel-safe location. Tested on x86-64 Fedora 18. * gdb.dwarf2/dw2-basic.exp: Use gdb_remote_download. * gdb.dwarf2/dw2-compressed.exp: Use gdb_remote_download. * gdb.dwarf2/dw2-intercu.exp: Use gdb_remote_download. * gdb.dwarf2/dw2-intermix.exp: Use gdb_remote_download. * gdb.dwarf2/dw2-producer.exp: Use gdb_remote_download. * gdb.dwarf2/mac-fileno.exp: Use gdb_remote_download. * lib/gdb.exp (gdb_remote_download): New proc.
2013-08-22fix some gdb.dwarf2 tests for parallel safetyTom Tromey7-15/+39
This fixes a few gdb.dwarf2 tests to be more parallel-safe. This mostly amounts to changing them to write their files into the directory designated by standard_output_file. Built and regtested on x86-64 Fedora 18. * gdb.dwarf2/clztest.exp: Use standard_testfile. * gdb.dwarf2/dw2-minsym-in-cu.exp: Use standard_testfile. * gdb.dwarf2/fission-base.S: Remove directory from DW_AT_GNU_dwo_name. * gdb.dwarf2/fission-base.exp: Use build_executable. Set debug-file-directory. * gdb.dwarf2/fission-reread.S: Remove directory from DW_AT_GNU_dwo_name. * gdb.dwarf2/fission-reread.exp: Use build_executable. Set debug-file-directory.
2013-08-22 * binutils-all/nm.exp: --size-sort test: Add more ELF-likeNick Clifton3-8/+31
targets. * binutils-all/nm-1.s: Use .byte instead of .long. Provide a terminating symbol.
2013-08-22PR gdb/15871: Unavailable entry value is not shown correctlyPedro Alves4-18/+105
In entry-values.exp, we have a test where the entry value of 'j' is unavailable, so it is expected that printing j@entry yields "<unavailable>". However, the actual output is: (gdb) frame #0 0x0000000000400540 in foo (i=0, i@entry=2, j=2, j@entry=<error reading variable: Cannot access memory at address 0x6009e8>) The error is thrown here: #0 throw_it (reason=RETURN_ERROR, error=MEMORY_ERROR, fmt=0x8cd550 "Cannot access memory at address %s", ap=0x7fffffffc8e8) at ../../src/gdb/exceptions.c:373 #1 0x00000000005e2f9c in throw_error (error=MEMORY_ERROR, fmt=0x8cd550 "Cannot access memory at address %s") at ../../src/gdb/exceptions.c:422 #2 0x0000000000673a5f in memory_error (status=5, memaddr=6293992) at ../../src/gdb/corefile.c:204 #3 0x0000000000673aea in read_memory (memaddr=6293992, myaddr=0x7fffffffca60 "\200\316\377\377\377\177", len=4) at ../../src/gdb/corefile.c:223 #4 0x00000000006784d1 in dwarf_expr_read_mem (baton=0x7fffffffcd50, buf=0x7fffffffca60 "\200\316\377\377\377\177", addr=6293992, len=4) at ../../src/gdb/dwarf2loc.c:334 #5 0x000000000067645e in execute_stack_op (ctx=0x1409480, op_ptr=0x7fffffffce87 "\237<\005@", op_end=0x7fffffffce88 "<\005@") at ../../src/gdb/dwarf2expr.c:1045 #6 0x0000000000674e29 in dwarf_expr_eval (ctx=0x1409480, addr=0x7fffffffce80 "\003\350\t`", len=8) at ../../src/gdb/dwarf2expr.c:364 #7 0x000000000067c5b2 in dwarf2_evaluate_loc_desc_full (type=0x10876d0, frame=0xd8ecc0, data=0x7fffffffce80 "\003\350\t`", size=8, per_cu=0xf24c40, byte_offset=0) at ../../src/gdb/dwarf2loc.c:2236 #8 0x000000000067cc65 in dwarf2_evaluate_loc_desc (type=0x10876d0, frame=0xd8ecc0, data=0x7fffffffce80 "\003\350\t`", size=8, per_cu=0xf24c40) at ../../src/gdb/dwarf2loc.c:2407 #9 0x000000000067a5d4 in dwarf_entry_parameter_to_value (parameter=0x13a7960, deref_size=18446744073709551615, type=0x10876d0, caller_frame=0xd8ecc0, per_cu=0xf24c40) at ../../src/gdb/dwarf2loc.c:1160 #10 0x000000000067a962 in value_of_dwarf_reg_entry (type=0x10876d0, frame=0xd8de70, kind=CALL_SITE_PARAMETER_DWARF_REG, kind_u=...) at ../../src/gdb/dwarf2loc.c:1310 #11 0x000000000067aaca in value_of_dwarf_block_entry (type=0x10876d0, frame=0xd8de70, block=0xf1c2d4 "Q", block_len=1) at ../../src/gdb/dwarf2loc.c:1363 #12 0x000000000067e7c9 in locexpr_read_variable_at_entry (symbol=0x13a7540, frame=0xd8de70) at ../../src/gdb/dwarf2loc.c:3326 #13 0x00000000005daab6 in read_frame_arg (sym=0x13a7540, frame=0xd8de70, argp=0x7fffffffd0e0, entryargp=0x7fffffffd100) at ../../src/gdb/stack.c:362 #14 0x00000000005db384 in print_frame_args (func=0x13a7470, frame=0xd8de70, num=-1, stream=0xea3890) at ../../src/gdb/stack.c:669 #15 0x00000000005dc338 in print_frame (frame=0xd8de70, print_level=1, print_what=SRC_AND_LOC, print_args=1, sal=...) at ../../src/gdb/stack.c:1199 #16 0x00000000005db8ee in print_frame_info (frame=0xd8de70, print_level=1, print_what=SRC_AND_LOC, print_args=1) at ../../src/gdb/stack.c:851 #17 0x00000000005da2bb in print_stack_frame (frame=0xd8de70, print_level=1, print_what=SRC_AND_LOC) at ../../src/gdb/stack.c:169 #18 0x00000000005de236 in frame_command (level_exp=0x0, from_tty=1) at ../../src/gdb/stack.c:2265 dwarf2_evaluate_loc_desc_full (frame #7) knows to handle NOT_AVAILABLE_ERROR errors, but read_memory always throws a generic error. Presently, only the value machinery knows to handle unavailable memory. We need to push the awareness down to the target_xfer layer, making it return a finer grained error indication. We can only return a generic -1 nowadays, which leaves the upper layers with no clue on why the xfer failed. Use target_xfer_partial directly, rather than propagating the error through target_read_memory so as to get a better address to display in the error message. (target_read_memory & friends build on top of target_read (thus the target_xfer machinery), but turn all errors to EIO, an errno value. I think this is a mistake, and we'd better convert all these to return a target_xfer_error too, but that can be done separately. I looked around a bit over memory_error calls, and the need to handle random errno values, other than the EIOs gdb itself hardcodes, probably comes (only) from deprecated_xfer_memory, which uses errno for error indication, but I didn't look exhaustively. We should really get rid of deprecated_xfer_memory and of passing down errno values as error indication in target_read & friends methods). Tested on x86_64 Fedora 17, native and gdbserver. Fixes the test in the PR, which will be added to the testsuite later. gdb/ 2013-08-22 Pedro Alves <palves@redhat.com> PR gdb/15871 * corefile.c (target_xfer_memory_error): New function. (memory_error): Defer EIO to target_memory_error. (read_memory): Use target_xfer_partial, and handle finer-grained target xfer errors. * target.c (target_xfer_error_to_string): New function. (memory_xfer_partial_1): If memory is known to be unavailable, return TARGET_XFER_E_UNAVAILABLE instead of -1. (target_xfer_partial): Make extern. * target.h (enum target_xfer_error): New enum. (target_xfer_error_to_string): Declare function. (target_xfer_partial): Declare function. (struct target_ops) <xfer_partial>: Adjust describing comment.
2013-08-22 * ld-powerpc/powerpc.exp: Substitute for le in options_regsub(ld).Alan Modra17-71/+93
Correct ppc64elftests option replacement. (supports_ppc64): Match elf64lppc too. * ld-powerpc/relbrlt.d: Update for little-endian. * ld-powerpc/symtocbase.d: Likewise. * ld-powerpc/tls.t: Likewise. * ld-powerpc/tlsexetoc.g: Likewise. * ld-powerpc/tlsso.d: Likewise. * ld-powerpc/tlsso.g: Likewise. * ld-powerpc/tlstoc.t: Likewise. * ld-powerpc/tlstocso.d: Likewise. * ld-powerpc/tlstocso.g: Likewise. * ld-powerpc/tlstocso.t: Likewise. * ld-powerpc/tocopt.d: Likewise. * ld-powerpc/tocopt2.d: Likewise. * ld-powerpc/tocopt3.d: Likewise. * ld-powerpc/tocopt4.d: Likewise. * ld-powerpc/tocopt5.d: Likewise.
2013-08-22 * configure.host: Support powerpc64le-linux and powerpcle-linux hosts.Alan Modra3-3/+8
* configure.tgt: Likewise as targets.
2013-08-22daily updateAlan Modra1-1/+1
2013-08-21Renegerate gdbserver/config.in.Pedro Alves2-0/+7
In: gdb/gdbserver/ 2013-07-03 Pedro Alves <palves@redhat.com> * Makefile.in (config.status): Depend on development.sh. * acinclude.m4: Include libmcheck.m4. * configure: Regenerate. I missed regenerating config.in... Tested on x86_64 Fedora 17. gdb/gdbserver/ 2013-08-21 Pedro Alves <palves@redhat.com> * config.in: Renegerate.
2013-08-21Fix whitespace.Pedro Alves1-11/+11
2013-08-212013-08-21 Tristan Gingold <gingold@adacore.com>Tristan Gingold3-26/+89
* coff-rs6000.c (_bfd_xcoff_sizeof_headers): Also count .ovrflo sections. * coffcode.h (coff_compute_section_file_positions): Force match between file offset and vma offset.
2013-08-21Fix typoNick Clifton1-1/+1
2013-08-21 * symbols.c (fb_label_instance_inc, fb_label_instance): ProperlyAlan Modra2-2/+7
range check label number for use with fb_low_counter array.
2013-08-21 * elflink.c (_bfd_elf_merge_symbol): Set *poldbfd, *poldweak,Alan Modra2-44/+48
and *poldalignment before exiting when !relocs_compatible.
2013-08-21 * elflink.c (_bfd_elf_define_linkage_sym): Don't set STV_INTERNALAlan Modra2-3/+9
symbols to STV_HIDDEN.
2013-08-21daily updateAlan Modra1-1/+1
2013-08-20 * binutils-all/nm.exp: Revert last change. Instead use nm-elf-1.sHans-Peter Nilsson2-5/+9
for mmix-knuth-mmixware.
2013-08-20 * buildsym.c (subfile_stack): Move here from buildsym.h.Doug Evans7-42/+86
(pending_macros): Ditto. (get_macro_table): New function. (buildsym_init): Initialize subfile_stack. * coffread.c (type_vector,type_vector_length): Moved here from buildsym.h. (INITIAL_TYPE_VECTOR_LENGTH): Ditto. (coff_symtab_read): Use it. * dbxread.c (read_ofile_symtab): Delete init of subfile_stack. * dwarf2read.c (macro_start_file): Replace uses of pending_macros with call to get_macro_table. * stabsread.c (type_vector,type_vector_length): Moved here from buildsym.h. (INITIAL_TYPE_VECTOR_LENGTH): Ditto. * buildsym.h (get_macro_table): Declare.
2013-08-20 * dbxread.c (record_minimal_symbol): Make 'name' argument const.Tom Tromey2-6/+13
Update. (read_dbx_dynamic_symtab): Make 'name' const. Remove casts.
2013-08-20 * blockframe.c: Remove #include "psymtab.h".Doug Evans5-7/+7
* cp-support.c: Ditto. * source.c: Ditto. * stack.c: Ditto.
2013-08-20fix PR python/15816Tom Tromey2-4/+14
This fixes PR python/15816. The bug here is that python-selftest.exp can fail: No symbol "RETURN_MASK_ALL" in current context. RETURN_MASK_ALL is a macro, so if macros do not end up in the debuginfo (very typical) then the test fails. It seemed simplest to me to simply turn the RETURN_MASK_ defines into enum constants. This way they end up in the debuginfo and all is well. PR python/15816: * exceptions.h (return_mask): Now an enum. (RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL): Now enum constants. Built and regtested on x86-64 Fedora 18.
2013-08-20move gdbarch object from objfile to per-BFDTom Tromey10-21/+41
This moves the "gdbarch" field from the objfile into the BFD. This field's value is derived from the BFD and is immutable over the lifetime of the BFD. This makes it a reasonable candidate for pushing into the per-BFD object. This is part of the long-term objfile splitting project. In the long run I think this patch will make it simpler to moves types from the objfile to the per-BFD object; but the patch makes sense as a minor cleanup by itself. Built and regtested on x86-64 Fedora 18. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Use get_objfile_arch. * elfread.c (elf_rel_plt_read, elf_gnu_ifunc_record_cache) (elf_gnu_ifunc_resolve_by_got): Use get_objfile_arch. * jit.c (jit_object_close_impl): Update. * jv-lang.c (get_dynamics_objfile): Update. * linespec.c (add_minsym): Use get_dynamics_objfile. * objfiles.c (get_objfile_bfd_data): Initialize 'gdbarch' field. (allocate_objfile): Don't initialize 'gdbarch' field. (get_objfile_arch): Update. * objfiles.h (struct objfile_per_bfd_storage) <gdbarch>: New field, moved from... (struct objfile) <gdbarch>: ... here. Remove. * stap-probe.c (stap_can_evaluate_probe_arguments): Use get_objfile_arch. * symfile.c (init_entry_point_info): Use get_objfile_arch.
2013-08-20 * doublest.c (convert_floatformat_to_doublest): Use fmt->split_halfAlan Modra3-35/+47
for IBM long double nan and inf. (floatformat_is_negative, floatformat_classify, floatformat_mantissa): Similarly. (floatformat_ieee_single, floatformat_ieee_double, floatformat_ieee_quad, floatformat_arm_ext, floatformat_ia64_spill): Delete unused vars. (_initialize_doublest): Delete unused function. * gdbtypes.c (floatformats_ibm_long_double): Use new big- and little-endian variants of floatformat_ibm_long_double.
2013-08-20merge from gccDJ Delorie5-3/+32
2013-08-20 * binutils-all/nm.exp: Xfail test for nm --size-sort forHans-Peter Nilsson2-0/+9
mmix-knuth-mmixware.
2013-08-20daily updateAlan Modra1-1/+1
2013-08-19gas/Richard Sandiford64-1627/+1675
* config/tc-mips.c (mips_check_isa_supports_ase, reg_lookup) (mips_parse_argument_token, validate_micromips_insn, md_begin) (check_regno, match_float_constant, check_completed_insn, append_insn) (match_insn, match_mips16_insn, match_insns, macro_start) (macro_build_ldst_constoffset, load_register, macro, mips_ip) (mips16_ip, mips_set_option_string, md_parse_option) (mips_after_parse_args, mips_after_parse_args, md_pcrel_from) (md_apply_fix, s_align, s_option, s_mipsset, s_tls_rel_directive) (s_gpword, s_gpdword, s_ehword, s_nan, tc_gen_reloc, md_convert_frag) (s_mips_end, s_mips_ent, s_mips_frame, s_mips_mask, mips_parse_cpu): Start error messages with a lower-case letter. Do not end error messages with a period. Wrap long messages to 80 character-lines. Use "cannot" instead of "can't" and "can not". gas/testsuite/ * gas/mips/ase-errors-1.l, gas/mips/ase-errors-2.l, gas/mips/ase-errors-3.l, gas/mips/ase-errors-4.l, gas/mips/at-2.l, gas/mips/baddata1.l, gas/mips/elf-rel30.l, gas/mips/illegal.l, gas/mips/jalr.l, gas/mips/ldstla-32-1.l, gas/mips/ldstla-32-mips3-1.l, gas/mips/lui-1.l, gas/mips/macro-warn-1.l, gas/mips/macro-warn-1-n32.l, gas/mips/macro-warn-2.l, gas/mips/macro-warn-3.l, gas/mips/macro-warn-4.l, gas/mips/micromips-branch-delay.l, gas/mips/micromips-branch-relax.l, gas/mips/micromips-branch-relax-pic.l, gas/mips/micromips-ill.l, gas/mips/micromips.l, gas/mips/micromips-size-0.l, gas/mips/micromips-size-1.l, gas/mips/micromips-warn-branch-delay.l, gas/mips/micromips-warn.l, gas/mips/mips16e-64.l, gas/mips/mips16e-save-err.l, gas/mips/mips1-fp.l, gas/mips/mips32r2-fp32.l, gas/mips/mips32r2-ill.l, gas/mips/mips32-sf32.l, gas/mips/mips4-branch-likely.l, gas/mips/mips4-fp.l, gas/mips/mips5-fp.l, gas/mips/mips64-mips3d.l, gas/mips/mips-double-float-flag.l, gas/mips/mips-gp64-fp32.l, gas/mips/mips-gp64-fp64.l, gas/mips/mips-hard-float-flag.l, gas/mips/mips-macro-ill-nofp.l, gas/mips/mips-macro-ill-sfp.l, gas/mips/nan-error-1.l, gas/mips/nan-error-2.l, gas/mips/noat-2.l, gas/mips/noat-3.l, gas/mips/noat-4.l, gas/mips/noat-5.l, gas/mips/noat-6.l, gas/mips/noat-7.l, gas/mips/octeon-ill.l, gas/mips/r5900-error-vu0.l, gas/mips/r5900-nollsc.l, gas/mips/relax-bc1any.l, gas/mips/relax-bposge.l, gas/mips/relax.l, gas/mips/relax-swap1.l, gas/mips/relax-swap2.l, gas/mips/set-arch.l, gas/mips/tls-ill.l, gas/mips/vr5400-ill.l: Adjust expected output.
2013-08-19gas/Richard Sandiford2-78/+48
* config/tc-mips.c (imm_expr): Expand comment. (set_at, macro, mips16_macro): Expect imm_expr to be O_constant when populated.
2013-08-19include/opcode/Richard Sandiford4-25/+17
* mips.h: Remove references to "+I" and imm2_expr. gas/ * config/tc-mips.c (imm2_expr): Delete. (md_assemble, match_insn, imm2_expr.X_op, mips_ip): Update accordingly.
2013-08-19include/opcode/Richard Sandiford16-220/+118
* mips.h (M_DEXT, M_DINS): Delete. opcodes/ * micromips-opc.c (micromips_opcodes): Replace "dext" and "dins" macro entries with "dextm", "dextu", "dinsm" and "dinsu" aliases. Use +H rather than +C for the real "dext". * mips-opc.c (mips_builtin_opcodes): Likewise. gas/ * config/tc-mips.c (report_bad_range, report_bad_field): Delete. (macro): Remove M_DEXT and M_DINS handling. gas/testsuite/ * gas/mips/ext-ill.l, gas/mips/mips64r2-ill.l: Expect DEXT and DINS error messages to have the same form as the EXT and INS ones. * gas/mips/micromips-insn32.d, gas/mips/micromips-noinsn32.d, gas/mips/micromips-trap.d, gas/mips/micromips.d, gas/mips/micromips@mips64r2.d, gas/mips/mips64r2.d: Expect "dext" and "dins" instead of "dextm", "dextu", "dinsm" and "dinsu".
2013-08-19gas/Richard Sandiford2-179/+191
* config/tc-mips.c (mips_arg_info): Replace allow_nonconst and lax_max with lax_match. (match_int_operand): Update accordingly. Don't report an error for !lax_match-only cases. (match_insn): Replace more_alts with lax_match and use it to initialize the mips_arg_info field. Add a complete_p parameter. Handle implicit VU0 suffixes here. (match_invalid_for_isa, match_insns, match_mips16_insns): New functions. (mips_ip, mips16_ip): Use them.
2013-08-19gas/Richard Sandiford6-36/+51
* config/tc-mips.c (match_expression): Report uses of registers here. Add a "must be an immediate expression" error. Handle elided offsets here rather than... (match_int_operand): ...here. gas/testsuite/ * gas/mips/octeon-ill.l: Adjust expected output. * gas/mips/lui-1.l, gas/mips/lui-1.s: Add more cases.
2013-08-19gas/Richard Sandiford18-302/+332
* config/tc-mips.c (mips_arg_info): Remove soft_match. (match_out_of_range, match_not_constant): New functions. (match_const_int): Remove fallback parameter and check for soft_match. Use match_not_constant. (match_mapped_int_operand, match_addiusp_operand) (match_perf_reg_operand, match_save_restore_list_operand) (match_mdmx_imm_reg_operand): Update accordingly. Use match_out_of_range and set_insn_error* instead of as_bad. (match_int_operand): Likewise. Use match_not_constant in the !allows_nonconst case. (match_float_constant): Report invalid float constants. (match_insn, match_mips16_insn): Remove soft_match code. Rely on match_float_constant to check for invalid constants. Fail the match if match_const_int or match_float_constant return false. (mips_ip): Update accordingly. (mips16_ip): Likewise. Undo null termination of instruction name once lookup is complete. gas/testsuite/ * gas/mips/ext-ill.l, gas/mips/lui-1.l, gas/mips/mips16e-64.l, gas/mips/mips32r2-ill-fp64.l, gas/mips/mips32r2-ill-nofp.l, gas/mips/mips32r2-ill.l, gas/mips/mips64r2-ill.l, gas/mips/octeon-ill.l, gas/mips/r5900-error-vu0.l, gas/mips/vr5400-ill.l: Adjust expected errors. * gas/mips/micromips-size-0.l, gas/mips/micromips-size-0.s: Likewise. Add new tests. * gas/mips/mips16e-save-err.s, gas/mips/mips16e-save-err.l: New test. * gas/mips/mips.exp: Run it.
2013-08-19gas/Richard Sandiford4-70/+213
* config/tc-mips.c (mips_insn_error_format): New enum. (mips_insn_error): New struct. (insn_error): Change to a mips_insn_error. (clear_insn_error, set_insn_error_format, set_insn_error) (set_insn_error_i, set_insn_error_ss, report_insn_error): New functions. (mips_parse_argument_token, md_assemble, match_insn) (match_mips16_insn): Use them instead of manipulating insn_error directly. (mips_ip, mips16_ip): Likewise. Simplify control flow. gas/testsuite/ * gas/mips/micromips-ill.l: Expect "floating-point expression required"
2013-08-19gas/Richard Sandiford2-499/+536
* config/tc-mips.c (normalize_constant_expr): Move further up file. (normalize_address_expr): Likewise. (match_insn, match_mips16_insn): New functions, split out from... (mips_ip, mips16_ip): ...here.
2013-08-19include/opcode/Richard Sandiford10-68/+96
* mips.h (OP_OPTIONAL_REG): New mips_operand_type. (mips_optional_operand_p): New function. opcodes/ * mips-formats.h (OPTIONAL_REG, OPTIONAL_MAPPED_REG): New macros. * micromips-opc.c (decode_micromips_operand): Use OPTIONAL_REG and OPTIONAL_MAPPED_REG. * mips-opc.c (decode_mips_operand): Likewise. * mips16-opc.c (decode_mips16_operand): Likewise. * mips-dis.c (print_insn_arg): Handle OP_OPTIONAL_REG. gas/ * config/tc-mips.c (operand_reg_mask, match_operand): Handle OP_OPTIONAL_REG. (mips_ip, mips16_ip): Use mips_optional_operand_p to check for optional operands.
2013-08-19 gdb/Luis Machado10-56/+148
* Makefile.in (SFILES): Remove common/target-common.c and add target/waitstatus.c. (HFILES_NO_SRCDIR): Remove common/target-common.h and add target/resume.h, target/wait.h and target/waitstatus.h. (COMMON_OBS): Remove target-common.o and add waitstatus.o. (target-common.o): Remove. (waitstatus.o): New target object file. * common/target-common.c: Move contents to target/waitstatus.c and remove. * common/target-common.h: Move contents to other files and remove. (enum resume_kind: Move to target/resume.h. (TARGET_WNOHANG): Move to target/wait.h. (enum target_waitkind): Move to target/waitstatus.h. (struct target_waitstatus): Likewise. * target.h: Do not include target-common.h and include target/resume.h, target/wait.h and target/waitstatus.h. * target/resume.h: New file. * target/wait.h: New file. * target/waitstatus.h: New file. * target/waitstatus.c: New file. gdb/gdbserver/ * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../. (SFILES): Remove $(srcdir)/common/target-common.c and add $(srcdir)/target/waitstatus.c. (OBS): Remove target-common.o and add waitstatus.o. (server_h): Remove $(srcdir)/../common/target-common.h and add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h and $(srcdir)/../target/waitstatus.h. (target-common.o): Remove. (waitstatus.o): New target object file. * target.h: Do not include target-common.h and include target/resume.h, target/wait.h and target/waitstatus.h.
2013-08-19Remove PREFIX_EVEX_0F3A3E and PREFIX_EVEX_0F3A3FH.J. Lu3-16/+8
* i386-dis.c (PREFIX_EVEX_0F3A3E): Removed. (PREFIX_EVEX_0F3A3F): Likewise. * i386-dis-evex.h (evex_table): Updated.
2013-08-19binutils/Tristan Gingold6-8/+74
2013-08-19 Tristan Gingold <gingold@adacore.com> * nm.c (print_size_symbols): Directly get symbol size. binutils/testsuite/ 2013-08-19 Tristan Gingold <gingold@adacore.com> * binutils-all/nm.exp: Add a test for nm --size-sort * binutils-all/nm-elf-1.s: New file. * binutils-all/nm-1.s: New file.
2013-08-19linux-nat.c: no need to block child signals so aggressively.Pedro Alves2-45/+22
In http://sourceware.org/ml/gdb-patches/2013-08/msg00174.html , the issue of child signal handling around ptrace option support discovery being different between GDB and GDBserver came up. I recalled adding these block_child_signals calls, and the "We don't want those ptrace calls to be interrupted" comment, but not exactly why. So I looked into it. My first guess is that I got confused. The patch that added this <http://sourceware.org/ml/gdb-patches/2009-04/msg00125.html> rewrote the linux native async support completely, and the old async support code had the SIGCHLD handler itself do waitpid, so in places that we'd want a blocking waitpid, we'd have to have the signal handler blocked. That was probably the mindset I had at the time. Anyway, whatever the case, looks like I was wrong on the need for this blocking. Given GDBserver doesn't block like this, I investigated why this is currently needed on GDB but not on GDBserver. I removed the block_child_signals (and restore) calls, and hacked linux-nat.c to call linux_test_for_tracefork in a loop, like: @@ -534,7 +534,10 @@ static int linux_supports_tracefork (int pid) { if (linux_supports_tracefork_flag == -1) - linux_test_for_tracefork (pid); + { + while (1) + linux_test_for_tracefork (pid); + } return linux_supports_tracefork_flag; } Running the resulting GDB, I then saw bad things happening. Specifically, I'd end up with a bunch of zombies, and eventually, the machine would refuse to spawn new processes, claming insufficient resources. The issue is that linux_test_for_tracefork test forks, and has the child fork again. If we don't block SIGCHLD on entry to the function, the children will inherit SIGCHLD's action/disposition (meaning, SIGCHLD will be unblocked in the child). When the first child forks again a second child, and that child exits, the first child gets a SIGCHLD. Now, when we try to wrap up for the whole options test, we kill the first child, and collect the waitstatus. Here, when SIGCHLD isn't blocked, GDB will first see the child reporting a stop with SIGCHLD. gdbserver's ptrace options test does a PTRACE_KILL loop at the end, which catches the SIGCHLD, and retries the kill. The GDB version did not do that. So the GDB version would proceed, leaving the child zombie (until GDB exists), as nothing collected its final waitstatus. So this patch makes the GDB version of linux_test_for_tracefork do the exact same as the GDBserver version, removes all this unnecessary blocking throughout, and adds a couple comments at places that do need it -- namely: places where we'll use sleep with sigsuspend; and linux_async_pipe, as that destroys the pipe the signal handler touches. Tested on x86_64 Fedora 17, sync and async. gdb/ 2013-08-19 Pedro Alves <palves@redhat.com> * linux-nat.c (linux_test_for_tracefork) (linux_test_for_tracesysgood, linux_child_follow_fork) (lin_lwp_attach_lwp, linux_nat_resume): Don't block child signals. (linux_nat_wait_1): Extend comment. (linux_async_pipe): Add comment.
2013-08-19daily updateAlan Modra1-1/+1
2013-08-18daily updateAlan Modra1-1/+1