Pedro Alves [Fri, 23 Aug 2013 13:12:17 +0000 (13:12 +0000)]
remote.c: don't install a deprecated_xfer_memory hook.
There's no need for deprecated_xfer_memory nowadays. Memory access
goes through target_xfer_partial/TARGET_OBJECT_MEMORY, etc. In fact,
the remote target already handles that, and is deferring to the same
helpers the deprecated_xfer_memory hook is. Basically, only a few
adjustments to make these helper routines's interfaces closer to
target_xfer_partial's were necessary.
Tested on x86_64 Fedora 17 w/ gdbserver.
gdb/
2013-08-23 Pedro Alves <palves@redhat.com>
* remote.c (remote_write_bytes_aux, remote_write_bytes)
(remote_read_bytes): Change return type to LONGEST, and adjust to
return a target_xfer_error on error.
(remote_xfer_memory): Delete.
(remote_flash_write): Change type of 'ret' local to LONGEST.
(remote_xfer_partial, remote_xfer_partial): Adjust.
(init_remote_ops): Don't install a deprecated_xfer_memory hook.
Nick Clifton [Fri, 23 Aug 2013 07:54:19 +0000 (07:54 +0000)]
PR binutils/15834
Fix typos:
---
bfd/bfdio.c | 2 +-
bfd/elf32-spu.c | 2 +-
bfd/elfnn-aarch64.c | 2 +-
binutils/od-xcoff.c | 2 +-
config/tcl.m4 | 2 +-
gas/config/tc-ia64.c | 2 +-
gas/config/tc-sparc.c | 2 +-
gas/config/tc-z80.c | 12 ++++++------
gas/doc/c-i386.texi | 6 +++---
gas/doc/c-m32r.texi | 2 +-
gas/testsuite/gas/d10v/instruction_packing.d | 2 +-
gas/testsuite/gas/z80/atend.d | 2 +-
gold/object.h | 2 +-
include/gdb/remote-sim.h | 2 +-
include/opcode/ChangeLog | 2 +-
include/opcode/i960.h | 2 +-
ld/testsuite/ld-mips-elf/mips16-pic-1.inc | 2 +-
opcodes/aarch64-asm.c | 2 +-
opcodes/aarch64-dis.c | 2 +-
opcodes/msp430-dis.c | 2 +-
Nick Clifton [Fri, 23 Aug 2013 07:37:31 +0000 (07:37 +0000)]
PR ld/15839
* scripttempl/avr.sc: Do not include gc'able sections into general
sections during relocatable links.
Will Newton [Fri, 23 Aug 2013 07:16:56 +0000 (07:16 +0000)]
gas/config/tc-arm.c: Improve validation of NEON addressing modes.
NEON vector load and store instructions do not accept immediates
or pre-indexed base plus offset addressing modes, so make sure that
the assembler enforces this.
gas/ChangeLog:
2013-08-23 Will Newton <will.newton@linaro.org>
* config/tc-arm.c (do_neon_ldx_stx): Add extra constraints
for pre-indexed addressing modes.
* testsuite/gas/arm/neon-addressing-bad.l: Add test for
VLDn and VSTn instructions.
* testsuite/gas/arm/neon-addressing-bad.s: Likewise.
gas/testsuite/ChangeLog:
2013-08-23 Will Newton <will.newton@linaro.org>
* testsuite/gas/arm/neon-addressing-bad.l: Add test for
VLDn and VSTn instructions.
* testsuite/gas/arm/neon-addressing-bad.s: Likewise.
Pierre Muller [Fri, 23 Aug 2013 06:51:18 +0000 (06:51 +0000)]
ARI fix: Push # directives to start of line.
* rs6000-nat.c (rs6000_ptrace32, rs6000_ptrace64): Rule applied.
Muhammad Waqas [Fri, 23 Aug 2013 06:22:10 +0000 (06:22 +0000)]
2013-08-12 Muhammad Waqas <mwaqas@codesourcery.com>
PR gdb/15501
* breakpoint.c (enable_command, disable_command): Iterate over
all specified breakpoint locations.
2013-07-12 Muhammad Waqas <mwaqas@codesourccery.com>
PR gdb/15501
* gdb.base/ena-dis-br.exp: Add test to verify
enable/disable commands work correctly with
multiple arguments that include multiple locations.
Luis Machado [Fri, 23 Aug 2013 02:34:34 +0000 (02:34 +0000)]
* common/linux-ptrace.c (linux_fork_to_function): Push #
directives to the start of the line.
(linux_check_ptrace_features): Fix warning message to use
the "_" markup.
Alan Modra [Fri, 23 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Luis Machado [Thu, 22 Aug 2013 23:46:30 +0000 (23:46 +0000)]
Unify ptrace options discovery code and make both GDB and
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.
Sergio Durigan Junior [Thu, 22 Aug 2013 22:06:11 +0000 (22:06 +0000)]
Adding missing files from my last commit.
Sergio Durigan Junior [Thu, 22 Aug 2013 20:32:54 +0000 (20:32 +0000)]
[Committing the `catch syscall' patch for ARM, from Samuel Bronson.]
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.
Nick Clifton [Thu, 22 Aug 2013 15:28:42 +0000 (15:28 +0000)]
* emultempl/pe.em: Add --disable-large-address-aware option.
* ld.texinfo (--disable-large-address-aware): Add documentation.
Tom Tromey [Thu, 22 Aug 2013 14:01:04 +0000 (14:01 +0000)]
fix dwz.exp on 32-bit targets
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.
Tom Tromey [Thu, 22 Aug 2013 13:59:55 +0000 (13:59 +0000)]
convert one more caching proc
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.
Tom Tromey [Thu, 22 Aug 2013 13:54:15 +0000 (13:54 +0000)]
fix gdb.arch to be parallel-safe
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.
Tom Tromey [Thu, 22 Aug 2013 13:51:08 +0000 (13:51 +0000)]
fix gdb.python to be parallel-safe
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.
Tom Tromey [Thu, 22 Aug 2013 13:46:21 +0000 (13:46 +0000)]
use standard_temp_file in another caching proc
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.
Tom Tromey [Thu, 22 Aug 2013 13:44:16 +0000 (13:44 +0000)]
introduce gdb_remote_download and finish parallel fixes in gdb.dwarf2
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.
Tom Tromey [Thu, 22 Aug 2013 13:39:13 +0000 (13:39 +0000)]
fix some gdb.dwarf2 tests for parallel safety
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.
Nick Clifton [Thu, 22 Aug 2013 11:29:43 +0000 (11:29 +0000)]
* binutils-all/nm.exp: --size-sort test: Add more ELF-like
targets.
* binutils-all/nm-1.s: Use .byte instead of .long.
Provide a terminating symbol.
Pedro Alves [Thu, 22 Aug 2013 10:00:05 +0000 (10:00 +0000)]
PR gdb/15871: Unavailable entry value is not shown correctly
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.
Alan Modra [Thu, 22 Aug 2013 07:34:28 +0000 (07:34 +0000)]
* ld-powerpc/powerpc.exp: Substitute for le in options_regsub(ld).
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.
Alan Modra [Thu, 22 Aug 2013 01:01:32 +0000 (01:01 +0000)]
* configure.host: Support powerpc64le-linux and powerpcle-linux hosts.
* configure.tgt: Likewise as targets.
Alan Modra [Thu, 22 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Pedro Alves [Wed, 21 Aug 2013 21:32:42 +0000 (21:32 +0000)]
Renegerate gdbserver/config.in.
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.
Pedro Alves [Wed, 21 Aug 2013 21:31:45 +0000 (21:31 +0000)]
Fix whitespace.
Tristan Gingold [Wed, 21 Aug 2013 08:15:23 +0000 (08:15 +0000)]
2013-08-21 Tristan Gingold <gingold@adacore.com>
* 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.
Nick Clifton [Wed, 21 Aug 2013 07:28:37 +0000 (07:28 +0000)]
Fix typo
Alan Modra [Wed, 21 Aug 2013 05:55:13 +0000 (05:55 +0000)]
* symbols.c (fb_label_instance_inc, fb_label_instance): Properly
range check label number for use with fb_low_counter array.
Alan Modra [Wed, 21 Aug 2013 04:09:30 +0000 (04:09 +0000)]
* elflink.c (_bfd_elf_merge_symbol): Set *poldbfd, *poldweak,
and *poldalignment before exiting when !relocs_compatible.
Alan Modra [Wed, 21 Aug 2013 03:45:44 +0000 (03:45 +0000)]
* elflink.c (_bfd_elf_define_linkage_sym): Don't set STV_INTERNAL
symbols to STV_HIDDEN.
Alan Modra [Wed, 21 Aug 2013 00:00:05 +0000 (00:00 +0000)]
daily update
Hans-Peter Nilsson [Tue, 20 Aug 2013 22:50:11 +0000 (22:50 +0000)]
* binutils-all/nm.exp: Revert last change. Instead use nm-elf-1.s
for mmix-knuth-mmixware.
Doug Evans [Tue, 20 Aug 2013 18:57:00 +0000 (18:57 +0000)]
* buildsym.c (subfile_stack): Move here from buildsym.h.
(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.
Tom Tromey [Tue, 20 Aug 2013 18:25:12 +0000 (18:25 +0000)]
* dbxread.c (record_minimal_symbol): Make 'name' argument const.
Update.
(read_dbx_dynamic_symtab): Make 'name' const. Remove casts.
Doug Evans [Tue, 20 Aug 2013 16:30:20 +0000 (16:30 +0000)]
* blockframe.c: Remove #include "psymtab.h".
* cp-support.c: Ditto.
* source.c: Ditto.
* stack.c: Ditto.
Tom Tromey [Tue, 20 Aug 2013 15:12:53 +0000 (15:12 +0000)]
fix PR python/15816
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.
Tom Tromey [Tue, 20 Aug 2013 15:04:51 +0000 (15:04 +0000)]
move gdbarch object from objfile to per-BFD
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.
Alan Modra [Tue, 20 Aug 2013 06:42:19 +0000 (06:42 +0000)]
* doublest.c (convert_floatformat_to_doublest): Use fmt->split_half
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.
DJ Delorie [Tue, 20 Aug 2013 06:02:53 +0000 (06:02 +0000)]
merge from gcc
Hans-Peter Nilsson [Tue, 20 Aug 2013 01:29:44 +0000 (01:29 +0000)]
* binutils-all/nm.exp: Xfail test for nm --size-sort for
mmix-knuth-mmixware.
Alan Modra [Tue, 20 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Richard Sandiford [Mon, 19 Aug 2013 20:07:10 +0000 (20:07 +0000)]
gas/
* 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.
Richard Sandiford [Mon, 19 Aug 2013 19:58:47 +0000 (19:58 +0000)]
gas/
* config/tc-mips.c (imm_expr): Expand comment.
(set_at, macro, mips16_macro): Expect imm_expr to be O_constant
when populated.
Richard Sandiford [Mon, 19 Aug 2013 19:56:44 +0000 (19:56 +0000)]
include/opcode/
* 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.
Richard Sandiford [Mon, 19 Aug 2013 19:54:41 +0000 (19:54 +0000)]
include/opcode/
* 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".
Richard Sandiford [Mon, 19 Aug 2013 19:42:50 +0000 (19:42 +0000)]
gas/
* 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.
Richard Sandiford [Mon, 19 Aug 2013 19:30:37 +0000 (19:30 +0000)]
gas/
* 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.
Richard Sandiford [Mon, 19 Aug 2013 19:26:11 +0000 (19:26 +0000)]
gas/
* 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.
Richard Sandiford [Mon, 19 Aug 2013 19:09:01 +0000 (19:09 +0000)]
gas/
* 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"
Richard Sandiford [Mon, 19 Aug 2013 19:00:32 +0000 (19:00 +0000)]
gas/
* 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.
Richard Sandiford [Mon, 19 Aug 2013 18:57:00 +0000 (18:57 +0000)]
include/opcode/
* 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.
Luis Machado [Mon, 19 Aug 2013 16:54:11 +0000 (16:54 +0000)]
gdb/
* 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.
H.J. Lu [Mon, 19 Aug 2013 15:58:52 +0000 (15:58 +0000)]
Remove PREFIX_EVEX_0F3A3E and PREFIX_EVEX_0F3A3F
* i386-dis.c (PREFIX_EVEX_0F3A3E): Removed.
(PREFIX_EVEX_0F3A3F): Likewise.
* i386-dis-evex.h (evex_table): Updated.
Tristan Gingold [Mon, 19 Aug 2013 15:08:52 +0000 (15:08 +0000)]
binutils/
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.
Pedro Alves [Mon, 19 Aug 2013 13:44:41 +0000 (13:44 +0000)]
linux-nat.c: no need to block child signals so aggressively.
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.
Alan Modra [Mon, 19 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Alan Modra [Sun, 18 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Joel Brobecker [Sat, 17 Aug 2013 01:07:52 +0000 (01:07 +0000)]
src-release: Strip "-cvs" from GDB source dir and tarball.
The nightly snapshots we have been creating in the past did not
include the "-cvs" suffix at the end of the version number. Snapshot
packaging started breaking ever since GDB switched to using BFD's
version number. Things got partially fixed with the previous change
to this file, but the change missed the fact that the "-cvs" suffix
in the tarball name (Eg: gdb-7.6.50-
20130816-cvs.tar) is undesirable.
This patch removes it.
ChangeLog:
* src-release (VER): When using $(TOOL)/common/create-version.sh,
strip the "-cvs" suffix from the version number if present.
Alan Modra [Sat, 17 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Roland McGrath [Fri, 16 Aug 2013 18:12:05 +0000 (18:12 +0000)]
gold/
* i386.cc (Target_i386_nacl::do_code_fill): New virtual function.
* x86_64.cc (Target_x86_64_nacl::do_code_fill): New virtual function.
Doug Evans [Fri, 16 Aug 2013 17:44:22 +0000 (17:44 +0000)]
* lib/prelink-support.exp (prelink_yes): Flag test as unsupported if
prelink complains about an unhandled DWARF version.
Alan Modra [Fri, 16 Aug 2013 12:59:32 +0000 (12:59 +0000)]
* config/tc-ppc.c (ppc_elf_cons): Allow @l and other reloc
modifiers generally.
Alan Modra [Fri, 16 Aug 2013 12:34:46 +0000 (12:34 +0000)]
* config/tc-ppc.c (ppc_elf_lcomm): Use subsection 1.
Kevin Buettner [Fri, 16 Aug 2013 04:30:23 +0000 (04:30 +0000)]
Make RL78_PC_REGNUM a pseudo-register in rl78-tdep.c.
Alan Modra [Fri, 16 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Muhammad Bilal [Thu, 15 Aug 2013 08:18:31 +0000 (08:18 +0000)]
2013-08-15 Muhammad Bilal <mbilal@codesourcery.com>
PR cli/15841
* top.c (quit_force): Skip writing history file
if input is not from terminal.
Nick Clifton [Thu, 15 Aug 2013 07:30:15 +0000 (07:30 +0000)]
* ldexp.c: Add LOG2CEIL() builtin function to linker script language
* ldgram.y: Likewise
* ldlex.l: Likewise
* NEWS: Mention the new feature.
* ld.texinfo: Document the new feature.
* ld-scripts/log2.exp: New: Run the new log2 test.
* ld-scripts/log2.s: Source for the new test.
* ld-scripts/log2.t: Linker script for new test.
Alan Modra [Thu, 15 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
David Edelsohn [Wed, 14 Aug 2013 20:52:55 +0000 (20:52 +0000)]
* config/tc-ppc.c (ppc_comm): Accept optional fourth .lcomm
argument as alignment.
Doug Evans [Wed, 14 Aug 2013 20:39:32 +0000 (20:39 +0000)]
* boards/fission.exp: Add -fdebug-types-section to debug_flags.
Tom Tromey [Wed, 14 Aug 2013 18:17:50 +0000 (18:17 +0000)]
move some static thread state into remote_state
This moves a few static variables from thread-info functions into
remote_state. Pedro said on irc that these functions implement the
ancient thread-discovery method and that he wouldn't be surprised if
they had rotted; nevertheless it seems safer to me to make them
explicitly per-remote.
This necessitated moving a couple of macros and a typedef earlier in
the file.
* remote.c (struct remote_state) <echo_nextthread, nextthread,
resultthreadlist>: New fields.
(OPAQUETHREADBYTES, threadref, MAXTHREADLISTRESULTS): Move earlier.
(remote_get_threadlist, remote_threadlist_iterator): Use
new fields. Remove static variables.
Tom Tromey [Wed, 14 Aug 2013 18:17:13 +0000 (18:17 +0000)]
move remote_stopped_by_watchpoint_p and remote_watch_data_address into remote_state
This moves the globals remote_stopped_by_watchpoint_p and
remote_watch_data_address into remote_state.
* remote.c (struct remote_state) <remote_stopped_by_watchpoint_p,
remote_watch_data_address>: New fields.
(remote_stopped_by_watchpoint_p, remote_watch_data_address): Remove.
(process_stop_reply, remote_wait_as)
(remote_check_watch_resources, remote_stopped_data_address): Update.
Tom Tromey [Wed, 14 Aug 2013 18:16:30 +0000 (18:16 +0000)]
move async_client_callback and async_client_context into remote_state
This moves async_client_callback and async_client_context into
remote_state.
* remote.c (struct remote_state) <async_client_callback,
async_client_context>: New fields.
(async_client_callback, async_client_context): Remove.
(remote_async_serial_handler, remote_async): Update.
Tom Tromey [Wed, 14 Aug 2013 18:15:48 +0000 (18:15 +0000)]
move sizeof_pkt into remote_trace_find
The global sizeof_pkt is only used in remote_trace_find, like so:
reply = remote_get_noisy_reply (&(rs->buf), &sizeof_pkt);
I think in this situation it is more correct to use the recorded size
of the buffer. Otherwise it seems that some skew could result.
* remote.c (sizeof_pkt): Remove.
(remote_trace_find): Use rs->buf_size, not sizeof_pkt.
Tom Tromey [Wed, 14 Aug 2013 18:15:01 +0000 (18:15 +0000)]
move use_threadinfo_query and use_threadextra_query into struct remote_state
This moves the use_threadextra_query and use_threadinfo_query globals
into remote_state.
* remote.c (struct remote_state) <use_threadinfo_query,
use_threadextra_query>: New fields.
(remote_threads_info, remote_threads_extra_info)
(remote_open_1): Update.
Tom Tromey [Wed, 14 Aug 2013 18:08:48 +0000 (18:08 +0000)]
move some statics from remote_read_qxfer into struct remote_state
This moves a few static variables out of remote_read_qxfer and into
remote_state.
* remote.c (struct remote_state) <finished_object,
finished_annex, finished_offset>: New fields.
(remote_read_qxfer): Use remote_state fields; remove static
variables.
Tom Tromey [Wed, 14 Aug 2013 18:07:45 +0000 (18:07 +0000)]
push last_sent_step into struct remote_state
This moves the global last_sent_step into remote_state.
* remote.c (struct remote_state) <last_sent_step>:
New field.
(last_sent_step): Remove.
(remote_resume, remote_wait_as): Update.
Tom Tromey [Wed, 14 Aug 2013 18:06:49 +0000 (18:06 +0000)]
push last_sent_signal into struct remote_state
This moves the global last_sent_signal into remote_state.
* remote.c (struct remote_state) <last_sent_signal>:
New field.
(last_sent_signal): Remove.
(new_remote_state, remote_resume, remote_wait_as): Update.
Tom Tromey [Wed, 14 Aug 2013 18:05:51 +0000 (18:05 +0000)]
push last_program_signals_packet into struct remote_state
This moves the global last_program_signals_packet into remote_state.
* remote.c (struct remote_state) <last_program_signals_packet>:
New field.
(last_program_signals_packet): Remove.
(remote_program_signals, remote_open_1): Update.
Tom Tromey [Wed, 14 Aug 2013 18:04:52 +0000 (18:04 +0000)]
push last_pass_packet into struct remote_state
This moves the global last_pass_packet into remote_state.
* remote.c (struct remote_state) <last_pass_packet>:
New field.
(last_pass_packet): Remove.
(remote_pass_signals, remote_open_1): Update.
Tom Tromey [Wed, 14 Aug 2013 18:03:50 +0000 (18:03 +0000)]
push remote_traceframe_number into struct remote_state
This moves the global remote_traceframe_number into remote_state.
* remote.c (struct remote_state) <remote_traceframe_number>:
New field.
(remote_traceframe_number): Remove.
(new_remote_state, remote_open_1, set_remote_traceframe)
(remote_trace_find): Update.
Tom Tromey [Wed, 14 Aug 2013 18:03:00 +0000 (18:03 +0000)]
push general_thread and continue_thread into struct remote_state
This moves the globals general_thread and continue_thread into
remote_state.
* remote.c (struct remote_state) <general_thread, continue_thread>:
New fields.
(general_thread, continue_thread): Remove.
(record_currthread, set_thread, set_general_process)
(remote_open_1, extended_remote_attach_1, remote_wait_as)
(extended_remote_mourn_1): Update.
Tom Tromey [Wed, 14 Aug 2013 18:01:33 +0000 (18:01 +0000)]
push remote_desc into struct remote_state
This moves the "remote_desc" global into remote_state.
* remote.c (struct remote_state) <remote_desc>: New field.
(remote_desc): Remove.
(remote_threads_info, remote_threads_extra_info, remote_close)
(send_interrupt_sequence, remote_start_remote, remote_open_1)
(readchar, remote_xfer_partial, remote_rcmd, packet_command)
(remote_hostio_send_command, remote_file_put, remote_file_get)
(remote_file_delete, remote_can_async_p, remote_is_async_p)
(remote_async, remote_new_objfile, set_range_stepping): Update.
Tom Tromey [Wed, 14 Aug 2013 18:00:34 +0000 (18:00 +0000)]
Add new_remote_state
Add new_remote_state and change remote_state to be a pointer. This is
a preparatory patch for a later series. It could perhaps be omitted,
but new_remote_state also does some initialization that was previously
done for the globals.
* remote.c (remote_state): Now a pointer.
(get_remote_state_raw): Update.
(new_remote_state): New function.
(_initialize_remote): Use new_remote_state.
Tom Tromey [Wed, 14 Aug 2013 17:58:53 +0000 (17:58 +0000)]
make remote_protocol_features "const"
This is a trivial patch to make remote_protocol_features "const".
* remote.c (remote_protocol_features): Now const.
Tom Tromey [Wed, 14 Aug 2013 17:57:09 +0000 (17:57 +0000)]
use the libiberty crc code
gdb has a copy of some CRC code that also appears in libiberty.
This patch just removes the local copy.
You may notice that "crc32" returns unsigned long but "xcrc32" returns
unsigned int. However, this does not matter, because crc32 actually
does all its operations in unsigned int type, and only the return
result is widened. So, the difference does not matter.
* remote.c (crc32_table, crc32): Remove.
(remote_verify_memory): Use xcrc32.
Nick Clifton [Wed, 14 Aug 2013 12:20:41 +0000 (12:20 +0000)]
PR ld/15787
* elf32-arm.c (elf32_arm_final_link_relocate): Use origin of output
segment containing the relocating symbol instead of assuming 0 for
sb group relocations.
* ld-arm/group-relocs-ldr-bad.s: Redefine bar into foo section
beyond 16 bit offset width.
* ld-arm/group-relocs-ldrs-bad.s: Likewise.
* ld-arm/group-relocs-ldr-bad.d: Adjust expected result.
* ld-arm/group-relocs-ldrs-bad.d: Likewise.
* ld-arm/group-relocs.s: Add comments. Move symbols used for sb
group relocations into .data section. Drop section zero. Use pc/r0
as base register when pc/sb group relocations are used.
* ld-arm/group-relocs.d: Adjust expected result.
* ld-arm/group-relocs-alu-bad-2.d: New test for sb group relocation.
* ld-arm/group-relocs-ldc-bad-2.d: Likewise.
* ld-arm/group-relocs-ldr-bad-2.d: New test for pc group relocation.
* ld-arm/group-relocs-ldrs-bad-2.d: Likewise.
* ld-arm/unresolved-2.d: Add sb relocation failure test.
* ld-arm/group-relocs-alu-bad-2.s: New test source.
* ld-arm/group-relocs-ldr-bad-2.s: Likewise.
* ld-arm/group-relocs-ldrs-bad-2.s: Likewise.
* ld-arm/group-relocs-ldc-bad-2.s: Likewise.
* ld-arm/unresolved-2.s: Likewise.
* ld-arm/arm-elf.exp: For group-relocs, drop section zero start
definition. Run the new tests.
Pierre Muller [Wed, 14 Aug 2013 09:48:46 +0000 (09:48 +0000)]
Remove unneeded src/gdb prefix for source file name
Luis Machado [Wed, 14 Aug 2013 02:22:19 +0000 (02:22 +0000)]
* linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
to PTRACE_TYPE_ARG3.
* linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
PTRACE_TYPE_ARG4.
* linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
(PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
Alan Modra [Wed, 14 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Sergio Durigan Junior [Tue, 13 Aug 2013 19:25:04 +0000 (19:25 +0000)]
Adjusting prototype declaration for gdb/value.h:create_internalvar_type_lazy,
in order to match GNU Coding Standards.
2013-08-13 Sergio Durigan Junior <sergiodj@redhat.com>
* value.h (create_internalvar_type_lazy): Adjust prototype
declaration.
Tom Tromey [Tue, 13 Aug 2013 16:12:04 +0000 (16:12 +0000)]
introduce parallel mode
This introduces parallel mode for the test suite.
It doesn't fully work yet in the sense that if you do a fully parallel
run, you will encounter some file-name clashes, but this has to start
somewhere, and it seemed best to add some infrastructure now, so that
you can follow along and test subsequent patches if you care to.
This patch has two parts.
First, it checks for the GDB_PARALLEL variable. If this is set (say,
on the runtest command line), then the test suite assumes "parallel
mode". In this mode, files are put into a subdirectory named after
the test. That is, for DIR/TEST.exp, the outputs are put into
./outputs/DIR/TEST/.
This first part has various follow-on changes coming in subsequent
patches. This is why the code in this patch also makes "temp" and
"cache" directories.
Second, this adds an "inotify" mode. If you have the inotifywait
command (part of inotify-tools), you can set the GDB_INOTIFY variable.
This will tell the test suite to watch for changes outside of the
allowed output directories.
This mode is useful for debugging the test suite, as it issues a
report whenever a possibly parallel-unsafe file open is done.
2013-08-13 Tom Tromey <tromey@redhat.com>
Yao Qi <yao@codesourcery.com>
* lib/cache.exp (gdb_do_cache): Handle GDB_PARALLEL.
* lib/gdb.exp: Handle GDB_PARALLEL.
(default_gdb_version): Kill inotify_pid if it exists.
(default_gdb_exit): Emit warning if the inotify log is not
empty.
(standard_output_file): Respect GDB_PARALLEL.
(standard_temp_file): Likewise.
(gdb_init): Start inotifywait if requested.
* gdbint.texinfo (Testsuite): Use @table, not @itemize.
Document GDB_PARALLEL and GDB_INOTIFY.
Andrew Burgess [Tue, 13 Aug 2013 16:05:23 +0000 (16:05 +0000)]
Handle '#' flag for printf of pointer types.
http://sourceware.org/ml/gdb-patches/2013-08/msg00340.html
gdb/ChangeLog
* common/format.c (parse_format_string): Don't allow '#' flag for
pointer arguments in format string.
gdb/testsuite/ChangeLog
* gdb.base/printcmds.exp (test_printf): Add test for printf of
pointer with various flags.
Tom Tromey [Tue, 13 Aug 2013 15:55:52 +0000 (15:55 +0000)]
add caching procs to test suite
In the fully parallel mode, each .exp file can be run in parallel (at
least conceptually -- the actual split may not be so severe). This
means that procs that compute a result and cache it are not going to
function very well. The test they run will be invoked over and over.
This patch introduces a generic caching mechanism and changes various
result-caching procs to use it. This is a cleanup to introduce the
basic change; the results aren't written to disk yet.
A caching proc is defined using gdb_caching_proc, which works like
"proc", except that it caches the result of the body.
* lib/cache.exp: New file.
* lib/cell.exp (skip_cell_tests): Use gdb_caching_proc.
* lib/gdb.exp: Load cache.exp.
(support_complex_tests, is_ilp32_target, is_lp64_target)
(is_amd64_regs_target, skip_altivec_tests, skip_vsx_tests)
(gdb_skip_xml_test): Use gdb_caching_proc.
* lib/opencl.exp (skip_opencl_tests): Use gdb_caching_proc.
Tom Tromey [Tue, 13 Aug 2013 15:52:24 +0000 (15:52 +0000)]
add standard_temp_file
This adds a new helper proc, standard_temp_file. This proc takes a
file name and returns a possibly-qualified form. This lets us make
parallel runs use a directory other than ".", which helps the inotify
mode.
This initial patch introduces the proc and changes a few spots to use
it.
* lib/gdb.exp (standard_temp_file): New proc.
(support_complex_tests, is_ilp32_target, is_lp64_target)
(is_amd64_regs_target, skip_altivec_tests, skip_vsx_tests): Use
standard_temp_file.
Tom Tromey [Tue, 13 Aug 2013 15:50:13 +0000 (15:50 +0000)]
more uses of standard_output_file
A few spots in lib make output files, either in "." or in
$objdir/$subdir.
This patch changes these spots to use standard_output_file.
This help the parallelization project.
* lib/gdb.exp (build_id_debug_filename_get): Use
standard_output_file.
* lib/prelink-support.exp (section_get)
(build_executable_own_libs): Use standard_output_file.
Pierre Muller [Tue, 13 Aug 2013 08:31:20 +0000 (08:31 +0000)]
* src/gdb/utils.c (init_page_info): Only call tgetnum function
if rl_get_screen_size did not return useful values.
Alan Modra [Tue, 13 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Tom Tromey [Mon, 12 Aug 2013 20:54:06 +0000 (20:54 +0000)]
* Makefile.in (ALL_SUBDIRS): Add gdb.go.