binutils-gdb.git
11 years agobinutils/
Tristan Gingold [Tue, 9 Jul 2013 07:32:14 +0000 (07:32 +0000)]
binutils/
2013-07-09  Tristan Gingold  <gingold@adacore.com>

* configure.com: Add new defines to match changes in configure.

gas/
2013-07-09  Tristan Gingold  <gingold@adacore.com>

* configure.com: Define HAVE_SYS_TYPES_H and HAVE_UNISTD_H

11 years ago2013-07-09 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 9 Jul 2013 07:03:53 +0000 (07:03 +0000)]
2013-07-09  Tristan Gingold  <gingold@adacore.com>

* hosts/alphavms.h: Include config.h and ansidecl.h, remove useless
macros.
* configure.com: Adjust to match changes in configure.
* makefile.vms (OBJS): Update list.

11 years agodaily update
Alan Modra [Tue, 9 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago * scripttempl/elf.sc: Handle function names and other
Jeff Law [Mon, 8 Jul 2013 17:07:15 +0000 (17:07 +0000)]
* scripttempl/elf.sc: Handle function names and other
text after .text.unlikely too.

11 years agoReplace Xmmword with Qword on cvttps2pi
H.J. Lu [Mon, 8 Jul 2013 16:24:21 +0000 (16:24 +0000)]
Replace Xmmword with Qword on cvttps2pi

gas/testsuite/

PR gas/13572
* gas/i386/simd.s: Add a test for cvttps2pi.
* gas/i386/simd-intel.d: Updated.
* gas/i386/simd.d: Likewise.

opcodes/

PR gas/13572
* i386-opc.tbl: Replace Xmmword with Qword on cvttps2pi.
* i386-tbl.h: Regenerated.

11 years ago2013-07-08 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Mon, 8 Jul 2013 13:16:08 +0000 (13:16 +0000)]
2013-07-08  Tristan Gingold  <gingold@adacore.com>

* ia64.h (STB_VMS_WEAK, STB_VMS_SYSTEM): Add.

11 years ago2013-07-08 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Mon, 8 Jul 2013 13:02:21 +0000 (13:02 +0000)]
2013-07-08  Tristan Gingold  <gingold@adacore.com>

* scripttempl/ia64vms.sc: Add support of per data and per function
sections.

11 years ago2013-07-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
Ulrich Weigand [Mon, 8 Jul 2013 11:35:49 +0000 (11:35 +0000)]
2013-07-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>

* gdb.threads/wp-replication.exp: Stop counting available hardware
watchpoints after NR_THREADS iterations.

11 years agoAdd $gdb_prompt to test regexp.
Andrew Burgess [Mon, 8 Jul 2013 11:16:01 +0000 (11:16 +0000)]
Add $gdb_prompt to test regexp.

http://sourceware.org/ml/gdb-patches/2013-07/msg00173.html

* gdb.python/py-explore.exp: Add $gdb_prompt to test regexp.

11 years agoFix bug in value_bits_valid.
Andrew Burgess [Mon, 8 Jul 2013 10:21:33 +0000 (10:21 +0000)]
Fix bug in value_bits_valid.

http://sourceware.org/ml/gdb-patches/2013-07/msg00174.html

* value.c (value_bits_valid): If the value is not lval_computed
or has no check validity handler then the answer is the
optimized_out flag, otherwise defer to the handler.

11 years agogas/
Richard Sandiford [Mon, 8 Jul 2013 08:39:32 +0000 (08:39 +0000)]
gas/
* config/tc-mips.c (mips_ip): Unconditionally parse an expression
for 'A' and assume that the constant has been elided if the result
is an O_register.

gas/testsuite/
* gas/mips/la.s, gas/mips/la.d, gas/mips/la-svr4pic.d,
gas/mips/la-xgot.d: Add tests for bracketed addresses.

11 years agodaily update
Alan Modra [Mon, 8 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agoinclude/opcode/
Richard Sandiford [Sun, 7 Jul 2013 11:32:32 +0000 (11:32 +0000)]
include/opcode/
* mips.h (M_ACLR_OB, M_ASET_OB, M_CACHE_OB, M_CACHEE_OB, M_L_DOB)
(M_LB_A, M_LBE_OB, M_LBU_A, M_LBUE_OB, M_LD_A, M_LD_OB, M_LDC2_OB)
(M_LDL_OB, M_LDM_OB, M_LDP_OB, M_LDR_OB, M_LH_A, M_LHE_OB, M_LHU_A)
(M_LHUE_OB, M_LL_OB, M_LLD_OB, M_LLE_OB, M_LS_A, M_LW_A, M_LWE_OB)
(M_LWC0_A, M_LWC1_A, M_LWC2_A, M_LWC2_OB, M_LWC3_A, M_LWL_A, M_LWL_OB)
(M_LWLE_OB, M_LWM_OB, M_LWP_OB, M_LWR_A, M_LWR_OB, M_LWRE_OB, M_LWU_OB)
(M_PREF_OB, M_PREFE_OB, M_S_DOB, M_SAA_OB, M_SAAD_OB, M_SC_OB)
(M_SCD_OB, M_SCE_OB, M_SD_A, M_SD_OB, M_SDC2_OB, M_SDL_OB, M_SDM_OB)
(M_SDP_OB, M_SDR_OB, M_SB_A, M_SBE_OB, M_SH_A, M_SHE_OB, M_SW_A)
(M_SWE_OB, M_SWC0_A, M_SWC1_A, M_SWC2_A, M_SWC2_OB, M_SWC3_A, M_SWL_A)
(M_SWL_OB, M_SWLE_OB, M_SWM_OB, M_SWP_OB, M_SWR_A, M_SWR_OB, M_SWRE_OB)
(M_ULD, M_ULH, M_ULHU, M_ULW, M_USH, M_USW, M_USD): Delete.
(M_ULD_A, M_ULH_A, M_ULHU_A, M_ULW_A, M_USH_A, M_USW_A, M_USD_A):
Rename to...
(M_ULD_AB, M_ULH_AB, M_ULHU_AB, M_ULW_AB, M_USH_AB, M_USW_AB)
(M_USD_AB): ...these.

opcodes/
* mips-opc.c (mips_builtin_opcodes): Remove o(b) macros.  Move LD
and SD A(B) macros up.
* micromips-opc.c (micromips_opcodes): Likewise.

gas/
* config/tc-mips.c (gprel16_reloc_p): New function.
(macro_read_relocs): Assume BFD_RELOC_LO16 if all relocs are
BFD_RELOC_UNUSED.
(offset_high_part, small_offset_p): New functions.
(nacro): Use them.  Remove *_OB and *_DOB cases.  For single-
register load and store macros, handle the 16-bit offset case first.
If a 16-bit offset is not suitable for the instruction we're
generating, load it into the temporary register using
ADDRESS_ADDI_INSN.  Make the M_LI_DD code fall through into the
M_L_DAB code once the address has been constructed.  For double load
and store macros, again handle the 16-bit offset case first.
If the second register cannot be accessed from the same high
part as the first, load it into AT using ADDRESS_ADDI_INSN.
Fix the handling of LD in cases where the first register is the
same as the base.  Also handle the case where the offset is
not 16 bits and the second register cannot be accessed from the
same high part as the first.  For unaligned loads and stores,
fuse the offbits == 12 and old "ab" handling.  Apply this handling
whenever the second offset needs a different high part from the first.
Construct the offset using ADDRESS_ADDI_INSN where possible,
for offbits == 16 as well as offbits == 12.  Use offset_reloc
when constructing the individual loads and stores.
(mips_ip): Set up imm_expr, imm2_expr, offset_expr, imm_reloc
and offset_reloc before matching against a particular opcode.
Handle elided 'A' constants.  Allow 'A' constants to use
relocation operators.

gas/testsuite/
* gas/mips/ldstla-32.d: Avoid "lui at,0x0" sequences for
truncated constants.
* gas/mips/ldstla-32-shared.d: Likewise.
* gas/mips/mcu.d: Use ADDIU in preference to LI+ADDU when adding
16-bit constants to the base.
* gas/mips/micromips@mcu.d: Likewise.
* gas/mips/micromips@cache.d: Likewise.
* gas/mips/micromips@pref.d: Likewise.
* gas/mips/micromips.d, gas/mips/micromips-insn32.d,
gas/mips/micromips-noinsn32.d, gas/mips/micromips-trap.d: Likewise.
Allow the full 16-bit offset range to be used for SB, LB and LBU in
USH and ULH sequences.  Fix the expected output for LD and SD when
the two LW and SW offsets need different high parts.
* gas/mips/eva.s: Test PREFE with relocation operators.
* gas/mips/eva.d: Use ADDIU in preference to LI+ADDU for 16-bit
constants.  Update after eva.s change.
* gas/mips/micromips@eva.d: Likewise.
* gas/mips/ld-reloc.s, gas/mips/ld-reloc.d, gas/mips/l_d-reloc.s,
gas/mips/l_d-reloc.d, gas/mips/ulw-reloc.s, gas/mips/ulw-reloc.d,
gas/mips/micromips@ulw-reloc.d, gas/mips/ulh-reloc.s,
gas/mips/ulh-reloc.d: New tests.
* gas/mips/mips.exp: Run them.

11 years agogas/testsuite/
Richard Sandiford [Sun, 7 Jul 2013 10:36:53 +0000 (10:36 +0000)]
gas/testsuite/
* gas/mips/eva.d, gas/mips/micromips@eva.d: Remove hard-coded
addresses.  Use gpr-names=numeric.

11 years agoopcodes/
Richard Sandiford [Sun, 7 Jul 2013 10:27:32 +0000 (10:27 +0000)]
opcodes/
* mips16-opc.c: Add entries for argumentless "entry" and "exit"
instructions.

gas/testsuite/
* gas/mips/mips16.d, gas/mips/mips16-64.d: Remove trailing whitespace
from ENTRY and EXIT lines.

11 years agoinclude/opcode/
Richard Sandiford [Sun, 7 Jul 2013 10:15:09 +0000 (10:15 +0000)]
include/opcode/
* mips.h: Remove documentation of "[" and "]".  Update documentation
of "k" and the MDMX formats.

opcodes/
* mips-opc.c (mips_builtin_opcodes): Use "Q" for the INSN_5400
MDMX-like instructions.
* mips-dis.c (print_insn_arg): Use "$f" rather than "$v" when
printing "Q" operands for INSN_5400 instructions.

gas/
* config/tc-mips.c (validate_mips_insn): Remove "[" and "]" handling.
(mips_ip): Likewise.  Do not set is_mdmx for INSN_5400 instructions.
Check constraints on the VR5400 RZU.OB, SLL.OB and SRL.OB instructions.

gas/testsuite/
* gas/mips/vr5400-ill.s, gas/mips/vr5400-ill.l: New test.
* gas/mips/mips.exp: Run it.

11 years agoinclude/opcode/
Richard Sandiford [Sun, 7 Jul 2013 10:00:43 +0000 (10:00 +0000)]
include/opcode/
* mips.h: Update documentation of "+s" and "+S".

opcodes/
* mips-opc.c (mips_builtin_opcodes): Use "+s" for "cins32" and
"+S" for "cins".
* mips-dis.c (print_mips_arg): Update "+s" and "+S" comments.
Combine cases.

gas/
* config/tc-mips.c (mips_ip): Preserve the real bit number for "+p".
Require the msb to be <= 31 for "+s".  Check that the size is <= 31
for both "+s" and "+S".

11 years agoinclude/opcode/
Richard Sandiford [Sun, 7 Jul 2013 09:50:43 +0000 (09:50 +0000)]
include/opcode/
* mips.h: Document "+i".

opcodes/
* mips-opc.c (mips_builtin_opcodes): Use "+i" rather than "a" for
"jalx".
* mips16-opc.c (mips16_opcodes): Likewise.
* micromips-opc.c (micromips_opcodes): Likewise.
* mips-dis.c (print_insn_args, print_mips16_insn_arg)
(print_insn_mips16): Handle "+i".
(print_insn_micromips): Likewise.  Conditionally preserve the
ISA bit for "a" but not for "+i".

gas/
* config/tc-mips.c (validate_mips_insn, validate_micromips_insn):
(mips_ip, mips16_ip): Handle "+i".

11 years agoinclude/opcode/
Richard Sandiford [Sun, 7 Jul 2013 09:41:04 +0000 (09:41 +0000)]
include/opcode/
* mips.h: Remove "mi" documentation.  Update "mh" documentation.
(OP_MASK_MI, OP_SH_MI, MICROMIPSOP_MASK_MI, MICROMIPSOP_MASK_MI):
Delete.
(INSN2_WRITE_GPR_MHI): Rename to...
(INSN2_WRITE_GPR_MH): ...this.

opcodes/
* micromips-opc.c (WR_mhi): Rename to..
(WR_mh): ...this.
(micromips_opcodes): Update "movep" entry accordingly.  Replace
"mh,mi" with "mh".
* mips-dis.c (micromips_to_32_reg_h_map): Rename to...
(micromips_to_32_reg_h_map1): ...this.
(micromips_to_32_reg_i_map): Rename to...
(micromips_to_32_reg_h_map2): ...this.
(print_micromips_insn): Remove "mi" case.  Print both registers
in the pair for "mh".

gas/
* config/tc-mips.c (mips32_to_micromips_reg_h_map): Delete.
(micromips_to_32_reg_h_map): Rename to...
(micromips_to_32_reg_h_map1): ...this.
(micromips_to_32_reg_i_map): Rename to...
(micromips_to_32_reg_h_map2): ...this.
(mips_lookup_reg_pair): New function.
(gpr_write_mask, macro): Adjust after above renaming.
(validate_micromips_insn): Remove "mi" handling.
(mips_ip): Likewise.  Parse both registers in a pair for "mh".

11 years agoinclude/opcode/
Richard Sandiford [Sun, 7 Jul 2013 09:32:55 +0000 (09:32 +0000)]
include/opcode/
* mips.h: Remove documentation of "+D" and "+T".

opcodes/
* mips-opc.c (mips_builtin_opcodes): Remove "+D" and "+T" entries.
* micromips-opc.c (micromips_opcodes): Likewise.
* mips-dis.c (print_insn_args, print_insn_micromips): Remove "+D"
and "+T" handling.  Check for a "0" suffix when deciding whether to
use coprocessor 0 names.  In that case, also check for ",H" selectors.

gas/
* config/tc-mips.c (validate_mips_insn, validate_micromips_insn)
(mips_ip): Remove "+D" and "+T" handling.

gas/testsuite/
* gas/mips/lb.d, gas/mips/sb.d: Use coprocessor register names
for LWC0 and SWC0.

11 years agogdb/testsuite/
Yao Qi [Sun, 7 Jul 2013 08:52:39 +0000 (08:52 +0000)]
gdb/testsuite/

* boards/native-gdbserver.exp: Move invoke of
process_multilib_options to gdbserver-base.exp.
Move set_board_info 'compiler', 'gdb,noinferiorio',
'gdb,nofileio', 'gdb_server_prog' and 'gdb,predefined_tsv' to
gdbserver-base.exp.
Move proc ${board}_download, ${board}_upload and
${board}_file to gdbserver-base.exp.
* boards/native-extended-gdbserver.exp: Likewise.
* boards/native-stdio-gdbserver.exp: Likewise.
* boards/gdbserver-base.exp: New file.

11 years agodaily update
Alan Modra [Sun, 7 Jul 2013 00:00:03 +0000 (00:00 +0000)]
daily update

11 years ago top.c (print_gdb_configuration): Explain in output of --configuration
Eli Zaretskii [Sat, 6 Jul 2013 07:34:48 +0000 (07:34 +0000)]
 top.c (print_gdb_configuration): Explain in output of --configuration
 what does "relocatable" mean.

11 years agoRearrange --help output.
Eli Zaretskii [Sat, 6 Jul 2013 07:28:24 +0000 (07:28 +0000)]
Rearrange --help output.

* main.c (print_gdb_help): Regroup options in the --help text.
See http://sourceware.org/ml/gdb-patches/2013-04/msg00362.html for
the relevant discussions.

11 years agogdb/
Yao Qi [Sat, 6 Jul 2013 07:14:54 +0000 (07:14 +0000)]
gdb/

* breakpoint.h (struct breakpoint_ops) <create_breakpoints_sal>:
Remove parameter 'lsal'.
* breakpoint.c (create_breakpoint): Move local variable 'lsal'
to inner block.  Caller update.
(base_breakpoint_create_breakpoints_sal): Update.
(bkpt_create_breakpoints_sal): Likewise.
(tracepoint_create_breakpoints_sal): Likewise.
(strace_marker_create_breakpoints_sal): Get 'lsal' from the
element 0 of vector 'canonical->sals'.

11 years ago * rs6000-tdep.c (rs6000_stab_reg_to_regnum): Return the real
Luis Machado [Sat, 6 Jul 2013 02:46:00 +0000 (02:46 +0000)]
* rs6000-tdep.c (rs6000_stab_reg_to_regnum): Return the real
register number instead of the pseudo register one.
(rs6000_dwarf2_reg_to_regnum): Likewise.

11 years ago * gdb.base/dump.exp: Remove arch-specific tests and do a
Luis Machado [Sat, 6 Jul 2013 02:36:46 +0000 (02:36 +0000)]
* gdb.base/dump.exp: Remove arch-specific tests and do a
generic data address check to set is64bitonly correctly.

11 years ago * gdb.mi/gdb2549.exp (register_tests): Expect any decimal for
Luis Machado [Sat, 6 Jul 2013 02:32:31 +0000 (02:32 +0000)]
* gdb.mi/gdb2549.exp (register_tests): Expect any decimal for
the register number instead of expecting only 0.

11 years agodaily update
Alan Modra [Sat, 6 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogdb/testsuite/gdb.base/gnu-ifunc-lib.c: Use %function syntax.
Will Newton [Fri, 5 Jul 2013 10:40:10 +0000 (10:40 +0000)]
gdb/testsuite/gdb.base/gnu-ifunc-lib.c: Use %function syntax.

ARM uses @ as a comment character, but % seems to be usable by all
existing ifunc enabled architectures.

gdb/testsuite/ChangeLog:

2013-07-05  Will Newton  <will.newton@linaro.org>

* gdb.base/gnu-ifunc-lib.c: Use %function instead of @function
in asm syntax to allow building on ARM.

11 years ago2013-07-05 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 5 Jul 2013 10:20:49 +0000 (10:20 +0000)]
2013-07-05  Tristan Gingold  <gingold@adacore.com>

        * coffcode.h (coff_write_object_contents): Use ".ovrflo" name for
        overflow sections.

11 years ago2013-07-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Andreas Krebbel [Fri, 5 Jul 2013 09:51:00 +0000 (09:51 +0000)]
2013-07-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

bfd/
* elf32-s390.c: Rewrite GOT accesses using larl if possible.
* elf64-s390.c: Likewise.

ld/testsuite/
* ld-s390/gotreloc-1.s: New file.
* ld-s390/gotreloc-1.ver: New file.
* ld-s390/gotreloc_31-1.dd: New file.
* ld-s390/gotreloc_64-1.dd: New file.
* ld-s390/s390.exp: Run the new tests. Run 31 bit tests also on 64
bit.

11 years ago2013-07-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Andreas Krebbel [Fri, 5 Jul 2013 09:45:44 +0000 (09:45 +0000)]
2013-07-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
opcodes/
    * s390-opc.c (J12_12, J24_24): New macros.
    (INSTR_MII_UPI): Rename to INSTR_MII_UPP.
    (MASK_MII_UPI): Rename to MASK_MII_UPP.
    * s390-opc.txt: Rename MII_UPI to MII_UPP for bprp instruction.

include/elf/
    * s390.h: Add new relocs R_390_PC12DBL, R_390_PLT12DBL,
    R_390_PC24DBL, and R_390_PLT24DBL.

gas/testsuite/
    * gas/s390/zarch-zEC12.s: Change bprp second operand and add
    variants requiring relocations.
    * gas/s390/zarch-zEC12.d: Likewise.

gas/
    * config/tc-s390.c (md_gather_operands, md_apply_fix): Support new
    relocs.
bfd/
    * elf32-s390.c: Add new relocation definitions R_390_PC12DBL,
    R_390_PLT12DBL, R_390_PC24DBL, and R_390_PLT24DBL.
    (elf_s390_reloc_type_lookup, elf_s390_check_relocs)
    (elf_s390_gc_sweep_hook, elf_s390_relocate_section): Support new
    relocations.
    * elf64-s390.c: See elf32-s390.c
    * bfd-in2.h: Add new relocs to enum bfd_reloc_code_real.
    * libbfd.h: Add new reloc strings.

11 years agogdb/testsuite/
Yao Qi [Fri, 5 Jul 2013 08:50:22 +0000 (08:50 +0000)]
gdb/testsuite/

* boards/local-remote-host.exp: Remove obsolete comments.
* boards/native-extended-gdbserver.exp: Likewise.
* boards/native-gdbserver.exp: Likewise.
* boards/native-stdio-gdbserver.exp: Likewise.

11 years agodaily update
Alan Modra [Fri, 5 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agoUse allocate_optimized_out_value instead of set_value_optimized_out.
Pedro Alves [Thu, 4 Jul 2013 18:10:04 +0000 (18:10 +0000)]
Use allocate_optimized_out_value instead of set_value_optimized_out.

Allocate the value as optimized out from the start rather than allocating
a value with contents, and then marking it optimized out.

gdb/
2013-07-04  Pedro Alves  <palves@redhat.com>

* findvar.c (value_of_register): Use allocate_optimized_out_value
if the register has been optimized out, instead of
set_value_optimized_out.
* frame-unwind.c (frame_unwind_got_optimized): Use
allocate_optimized_out_value.

11 years agovalue_bits_valid: Fix latent bug.
Pedro Alves [Thu, 4 Jul 2013 16:08:22 +0000 (16:08 +0000)]
value_bits_valid: Fix latent bug.

Doing something else, I factored out the bits of the value_bits_valid
function that actually handle the check_validity hook, and
surprisingly found out that the result was misbehaving.  Turns out
value_bits_valid has a latent bug.  If the value is not lval_computed,
or doesn't have a check_validity hook, then we should assume the value
is entirely valid, not invalid.  This is currently masked by the
value->optimized_out check -- I ran the testsuite with a gdb_assert(0)
inserted in place of that return being touched by the patch, and it
never triggers.

Tested on x86_64 Fedora 17.

gdb/
2013-07-04  Pedro Alves  <palves@redhat.com>

* value.c (value_bits_valid): If the value is not lval_computed,
or doesn't have a check_validity hook, assume the value is entirely
valid.

11 years agohttp://sourceware.org/ml/gdb-patches/2013-07/msg00059.html
Andrew Burgess [Thu, 4 Jul 2013 11:11:25 +0000 (11:11 +0000)]
sourceware.org/ml/gdb-patches/2013-07/msg00059.html

gdb/ChangeLog

        * stack.c (read_frame_arg): No longer fetch lazy values.
        * value.c (value_optimized_out): If the value is not already
        marked optimized out, and is lazy then fetch it.
        (value_primitive_field): Move optimized out check to later in the
        function, after we have loaded any lazy values.
        (value_fetch_lazy): Use optimized out flag directly rather than
        calling optimized_out method.

gdb/testsuite/ChangeLog

        * gdb.dwarf2/dw2-reg-undefined.exp: New file.
        * gdb.dwarf2/dw2-reg-undefined.c: Likewise.
        * gdb.dwarf2/dw2-reg-undefined.S: Likewise.

11 years agohttp://sourceware.org/ml/gdb-patches/2013-07/msg00056.html
Andrew Burgess [Thu, 4 Jul 2013 09:49:43 +0000 (09:49 +0000)]
sourceware.org/ml/gdb-patches/2013-07/msg00056.html

* valops.c: Don't include "user-regs.h".
(value_fetch_lazy): Moved to value.c.
* value.c: Include "user-regs.h".
(value_fetch_lazy): Moved from valops.c.

11 years ago * ppc-opc.c (powerpc_opcodes): Add tdui, twui, tdu, twu, tui, tu.
Alan Modra [Thu, 4 Jul 2013 01:42:08 +0000 (01:42 +0000)]
* ppc-opc.c (powerpc_opcodes): Add tdui, twui, tdu, twu, tui, tu.

11 years agogdb/
Yao Qi [Thu, 4 Jul 2013 01:22:38 +0000 (01:22 +0000)]
gdb/

2013-07-04  Yao Qi  <yao@codesourcery.com>

Revert:
2013-06-27  Yao Qi  <yao@codesourcery.com>

* common/create-version.sh: Update comments.  Handle the case
that TARGET_ALIAS is empty.

gdb/gdbserver/

2013-07-04  Yao Qi  <yao@codesourcery.com>

* Makefile.in (host_alias): Use @host_noncanonical@.
(target_alias): Use @target_noncanonical@.
* configure.ac: Use ACX_NONCANONICAL_TARGET and
ACX_NONCANONICAL_HOST.
* configure: Regenerated.

Revert:
2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>

* configure.ac (version_host, version_target): Set and AC_SUBST them.
* configure: Rebuild.
* Makefile.in (version_host, version_target): Get from configure.
(version.c): Use $(version_host) and $(version_target).

11 years agodaily update
Alan Modra [Thu, 4 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago[PATCH, COMMITTED] [AArch64] Replace the :got_prel19: address modifier with :got:
Marcus Shawcroft [Wed, 3 Jul 2013 17:26:36 +0000 (17:26 +0000)]
[PATCH, COMMITTED] [AArch64] Replace the :got_prel19: address modifier with :got:

11 years ago[AArch64] Tidy up switch statement in GAS.
Marcus Shawcroft [Wed, 3 Jul 2013 17:25:17 +0000 (17:25 +0000)]
[AArch64]  Tidy up switch statement in GAS.

11 years ago[AArch64] Tidy up switch statements in elfnn-aarch64.c
Marcus Shawcroft [Wed, 3 Jul 2013 17:23:24 +0000 (17:23 +0000)]
[AArch64] Tidy up switch statements in elfnn-aarch64.c

11 years agoOn mainline/development, also link GDBserver with -lmcheck.
Pedro Alves [Wed, 3 Jul 2013 13:25:46 +0000 (13:25 +0000)]
On mainline/development, also link GDBserver with -lmcheck.

This factors --enable-libmcheck related bits from GDB's configure.ac
and makes GDBserver use them too.  Specifically, the 'development'
global is moved to a separate script to it can be sourced by both GDB
and GDBserver, and the --enable-libmcheck/--disable-libmcheck bits
proper are moved to a new m4 file.

I started out by defining 'development' in the m4 file, but in the end
decided against it, as a separate script has the advantage that
changing it in release branches does not require regenerating
configure, unlike today.

I had also started out by making the new GDB_AC_LIBMCHECK itself
handle the yes/no default fallback depending on release/developement,
but since I had split out 'development' to a separate script, and, GDB
needs the python checks anyway (hence we'd need to do the python
checks in gdb's configure.ac, and pass in a 'default lmcheck yes/no'
parameter to GDB_AC_LIBMCHECK anyway), I ended up keeping
GDB_AC_LIBMCHECK isolated from the 'development' global.  IOW, it's
the caller's business to handle it.

Tested on x86_64 Fedora 17.  Built GDB and GDBserver with and without
--enable-libmcheck, and observed --enable-libmcheck overrides the
disablement of -lmcheck caused by python supporting threads, and that
GDBserver links with -lmcheck when expected.  Also observed that
changing the 'development' global, and issuing "make" triggers a
relink, and '-lmcheck' is included or not from the link accordingly.

gdb/
2013-07-03  Pedro Alves  <palves@redhat.com>

* Makefile.in (config.status): Depend on development.sh.
(aclocal_m4_deps): Add libmcheck.m4.
* acinclude.m4: Include libmcheck.m4.
* configure.ac: Source development.sh instead of setting
'development' here.  --enable-libmcheck/--disable-libmcheck code
factored out to GDB_AC_LIBMCHECK.  Run it.
* development.sh: New file.
* libmcheck.m4: New file.
* configure: Regenerate.

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.

11 years ago * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
Alan Modra [Wed, 3 Jul 2013 09:42:56 +0000 (09:42 +0000)]
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
when relocatable.  Don't change root.type or type here.
(ppc64_elf_set_toc): Set type of .TOC. to STT_OBJECT.

11 years agobfd/
Alan Modra [Wed, 3 Jul 2013 02:22:35 +0000 (02:22 +0000)]
bfd/
* elf64-ppc.c (struct ppc_stub_hash_entry): Delete "addend".
(ppc64_elf_size_stubs): Don't set "addend".
(ppc64_elf_relocate_section): Don't allow calls via
toc-adjusting stubs without a following nop even in an
executable, except for self-calls and both libc_start_main
and .libc_start_main.
gold/
* powerpc.cc (Target_powerpc::Relocate::relocate): Update self-call
comment.

11 years ago * elf64-ppc.c (ppc64_elf_func_desc_adjust): Hide ".TOC.".
Alan Modra [Wed, 3 Jul 2013 00:45:50 +0000 (00:45 +0000)]
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Hide ".TOC.".

11 years agodaily update
Alan Modra [Wed, 3 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogdb/testsuite/
Jan Kratochvil [Tue, 2 Jul 2013 20:06:12 +0000 (20:06 +0000)]
gdb/testsuite/
* gdb.base/break-on-linker-gcd-function.exp: Replace
prepare_for_testing by build_executable_from_specs and clean_restart.

11 years ago * contrib/ari/update-web-ari.sh: Update for version.in change.
Tom Tromey [Tue, 2 Jul 2013 17:58:54 +0000 (17:58 +0000)]
* contrib/ari/update-web-ari.sh: Update for version.in change.

11 years ago * common/ptid.h: Comment fixes.
Tom Tromey [Tue, 2 Jul 2013 16:58:51 +0000 (16:58 +0000)]
* common/ptid.h: Comment fixes.

11 years agoremove mention of "target nrom"
Tom Tromey [Tue, 2 Jul 2013 16:58:32 +0000 (16:58 +0000)]
remove mention of "target nrom"

The documentation refers to "target nrom", but this target doesn't
appear in the tree.  It was zapped here:

2002-12-16  Andrew Cagney  <ac131313@redhat.com>
[...]
        * remote-nrom.c, remote-os9k.c, remote-vx960.c: Delete.

This patch removes the reference from the documentation.

* gdb.texinfo (Target Commands): Don't mention "target nrom".

11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 12:58:17 +0000 (12:58 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

  * coff-rs6000.c (xcoff_find_nearest_line_discriminator): Add missing
  line.

11 years agogdbserver, win32: fix some function typedefs
Mircea Gherzan [Tue, 2 Jul 2013 11:59:24 +0000 (11:59 +0000)]
gdbserver, win32: fix some function typedefs

2013-05-25  Mircea Gherzan  <mircea.gherzan@intel.com>

gdbserver/
* win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
attribute inside the parentheses.
(winapi_DebugSetProcessKillOnExit): Ditto.
(winapi_DebugBreakProcess): Ditto.
(winapi_GenerateConsoleCtrlEvent): Ditto.

Change-Id: I3aab72f2a1725a46b9da0e41a4ba08d7886284b9
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
11 years agogdbserver: avoid empty structs
Mircea Gherzan [Tue, 2 Jul 2013 10:08:01 +0000 (10:08 +0000)]
gdbserver: avoid empty structs

2013-06-25  Mircea Gherzan  <mircea.gherzan@intel.com>

gdbserver/

* notif.h (notif_event): Add a dummy member to avoid compiler
errors.

Change-Id: I490dbdb70a24f52b3947371f7c0397bf7a18423c
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 09:42:25 +0000 (09:42 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

* vms-alpha.c (_bfd_generic_find_nearest_line_discriminator): Define.
(_bfd_vms_find_nearest_line_discriminator): New function.

11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 07:38:51 +0000 (07:38 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

* coff-rs6000.c (xcoff_create_csect_from_smclas): Handle more smclas.

11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 07:34:38 +0000 (07:34 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

* coff-rs6000.c (xcoff_find_nearest_line_discriminator): New function.
(rs6000coff_vec): Reference it.

11 years ago2013-07-02 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 2 Jul 2013 07:27:41 +0000 (07:27 +0000)]
2013-07-02  Tristan Gingold  <gingold@adacore.com>

* internal.h (C_STTLS, C_GTLS): Define.
* xcoff.h (XMC_TL, XMC_TU, XMC_TE): Define.

11 years ago[AArch64] Fix creation of .got and placement of _GLOBAL_OFFSET_TABLE_
Marcus Shawcroft [Tue, 2 Jul 2013 06:39:26 +0000 (06:39 +0000)]
[AArch64] Fix creation of .got and placement of _GLOBAL_OFFSET_TABLE_

11 years ago[AArch64] Adjust testcases for move of &_DYNAMIC to got[0].
Marcus Shawcroft [Tue, 2 Jul 2013 06:37:33 +0000 (06:37 +0000)]
[AArch64] Adjust testcases for move of &_DYNAMIC to got[0].

11 years agobfd/
Alan Modra [Tue, 2 Jul 2013 00:25:08 +0000 (00:25 +0000)]
bfd/
* elf64-ppc.c (ppc64_elf_relocate_section): Set "relocation" for
.TOC. after relocatable check.
gas/
* config/tc-ppc.c (ppc_elf_adjust_symtab): Don't make .TOC. weak.

11 years agodaily update
Alan Modra [Tue, 2 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogold/
Cary Coutant [Mon, 1 Jul 2013 20:12:11 +0000 (20:12 +0000)]
gold/
* dwarf_reader.cc (Dwarf_ranges_table::read_ranges_table): Save
reloc_type_.
(Dwarf_ranges_table::read_range_list): Call lookup_reloc.
(Dwarf_ranges_table::lookup_reloc): New function.
* dwarf_reader.h (Dwarf_ranges_table::Dwarf_ranges_table): Initialize
reloc_type_.
(Dwarf_ranges_table::lookup_reloc): New function.
(Dwarf_ranges_table::reloc_type_): New data member.

11 years agochange gdb to use BFD's "dwz" functions
Tom Tromey [Mon, 1 Jul 2013 19:55:17 +0000 (19:55 +0000)]
change gdb to use BFD's "dwz" functions

BFD recently got a few functions related to "dwz" files.  This patch
changes gdb to use them, just to share a bit more code.

This changes dwarf2_get_dwz_file to possibly return NULL.  This
simplified a bit of code elsewhere.

Built and regtested on x86-64 Fedora 18.  I specifically regtested it
using my pending dwz test case.

* dwarf2read.c (dwarf2_get_dwz_file): Return NULL if
.gnu_debugaltlink not found.  Use bfd_get_alt_debug_link_info.
(dwarf2_read_index, create_all_comp_units): Update.

11 years agoadd -Wold-style-definition
Tom Tromey [Mon, 1 Jul 2013 19:52:32 +0000 (19:52 +0000)]
add -Wold-style-definition

This adds -Wold-style-definition to gdb's list of warnings.  This
found a couple of spots where "()" was used where "(void)" is more
correct.

Tested by rebuilding on x86-64 Fedora 18.

* configure.ac (build_warnings): Add -Wold-style-definition.
* configure: Rebuild.
* machoread.c (_initialize_machoread): Use "(void)".
* macrocmd.c (macro_inform_no_debuginfo): Fix formatting;
use "(void)".

11 years agoadd -Wold-style-declaration
Tom Tromey [Mon, 1 Jul 2013 19:50:11 +0000 (19:50 +0000)]
add -Wold-style-declaration

This adds -Wold-style-declaration to gdb's list of warnings.

It turns out that a few places use "const static" rather than
"static const".  The former is deprecated according to the C standard.

Tested by rebuilding with --enable-targets=all on x86-64 Fedora 18.

* configure.ac (build_warnings): Add -Wold-style-declaration.
* configure: Rebuild.
* dsrec.c (make_srec): Use "static const", not "const static".
* h8300-tdep.c (h8300_breakpoint_from_pc): Use "static const",
not "const static".
* mi/mi-parse.c (mi_no_values, mi_simple_values, mi_all_values):
Use "static const", not "const static".
* mn10300-tdep.c (mn10300_breakpoint_from_pc): Use "static const",
not "const static".
* moxie-tdep.c (moxie_breakpoint_from_pc): Use "static const",
not "const static".
* rs6000-tdep.c (rs6000_breakpoint_from_pc): Use "static const",
not "const static".
* v850-tdep.c (v850_breakpoint_from_pc): Use "static const",
not "const static".
(v850_dbtrap_breakpoint_from_pc): Likewise.
* xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Use "static const",
not "const static".

11 years agoadd -Wmissing-parameter-type
Tom Tromey [Mon, 1 Jul 2013 19:48:05 +0000 (19:48 +0000)]
add -Wmissing-parameter-type

This adds -Wmissing-parameter-type to gdb's list of warnings.

This one doesn't happen to trigger for a --enable-targets=all build on
x86-64 Fedora 18.

* configure.ac (build_warnings): Add -Wmissing-parameter-type.
* configure: Rebuild.

11 years agoAdjust ld-x86-64/tlsg.sd
H.J. Lu [Mon, 1 Jul 2013 16:17:11 +0000 (16:17 +0000)]
Adjust ld-x86-64/tlsg.sd

* ld-x86-64/tlsg.sd: Adjusted.

11 years ago[GDBserver] hostio.c: Fallback to packet buffer size if PATH_MAX is not available.
Pedro Alves [Mon, 1 Jul 2013 11:29:17 +0000 (11:29 +0000)]
[GDBserver] hostio.c: Fallback to packet buffer size if PATH_MAX is not available.

PATH_MAX is not defined on systems which have no limit on filename
length, such as GNU/Hurd.  As designed, the hostio RSP packets carry
the paths as parameters in the request/reply packets, which themselves
have an upper size limit, so lifting the filename limit completely
would require a redesign with new hostio packets.  While that doesn't
happen, we can at least support filename lengths as long as the packet
buffer can fit.

gdb/gdbserver/
2013-07-01  Pedro Alves  <palves@redhat.com>

* hostio.c (HOSTIO_PATH_MAX): Define.
(require_filename, handle_open, handle_unlink, handle_readlink):
Use it.

11 years agoNormalize on PATH_MAX instead of MAXPATHLEN throughout.
Pedro Alves [Mon, 1 Jul 2013 11:28:30 +0000 (11:28 +0000)]
Normalize on PATH_MAX instead of MAXPATHLEN throughout.

With the pathmax gnulib module in place, we can use PATH_MAX
consistently throughout, instead of the current mixbag of PATH_MAX and
MAXPATHLEN uses.  It's no longer necessary to include sys/param.h
(supposedly, I can't check all ports touched here) for MAXPATHLEN.

Don't remove sys/param.h from GDB's configure.ac, as later tests in
the file use HAVE_SYS_PARAM_H checks.

Tested on x86_64 Fedora 17.

Also cross-built for --host=i686-w64-mingw32, and --host=i586-pc-msdosdjgpp.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* defs.h: Include "pathmax.h".
* utils.c: Don't include sys/param.h.
(gdb_realpath): Remove code that checks for MAXPATHLEN.
* solib-ia64-hpux.c (ia64_hpux_handle_load_event): Use PATH_MAX
instead of MAXPATHLEN.
* solib-sunos.c: Don't include sys/param.h.
* xcoffread.c: Don't include sys/param.h.
* bsd-kvm.c: Don't include sys/param.h.
* darwin-nat.c: Don't include sys/param.h.
(darwin_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN.
* darwin-nat-info.c: Don't include sys/param.h.
* fbsd-nat.c (fbsd_pid_to_exec_file): Use PATH_MAX instead of
MAXPATHLEN.
* i386obsd-nat.c: Don't include sys/param.h.
* inf-child.c: Don't include sys/param.h.
(inf_child_fileio_readlink): Use PATH_MAX instead of MAXPATHLEN.
* linux-fork.c: Don't include sys/param.h.
(fork_save_infrun_state): Use PATH_MAX instead of MAXPATHLEN.
* linux-nat.c: Don't include sys/param.h.
(linux_child_pid_to_exec_file, linux_proc_pending_signals)
(linux_proc_pending_signals): Use PATH_MAX instead of MAXPATHLEN.
* m68klinux-nat.c: Don't include sys/param.h.
* nbsd-nat.c: Don't include sys/param.h.
(nbsd_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN.
* ppc-linux-nat.c: Don't include sys/param.h.
* rs6000-nat.c: Don't include sys/param.h.
* spu-linux-nat.c. Don't include sys/param.h.
* windows-nat.c: Don't include sys/param.h.
* xtensa-linux-nat.c: Don't include sys/param.h.
* config/i386/nm-fbsd.h: Don't include sys/param.h.

gdb/gdbserver/
2013-07-01  Pedro Alves  <palves@redhat.com>

* server.h: Include "pathmax.h".
* linux-low.c: Don't include sys/param.h.
(linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
MAXPATHLEN.
* win32-low.c: Don't include sys/param.h.
(win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.

11 years agoImport the "pathmax" gnulib module.
Pedro Alves [Mon, 1 Jul 2013 11:25:43 +0000 (11:25 +0000)]
Import the "pathmax" gnulib module.

This imports the "pathmax" gnulib module, making PATH_MAX always
available on systems that have the notion of a constant max path limit
(i.e., practically everywhere except the Hurd), along with fixing a
couple broken systems --- see pathmax.h in the patch.

This means we can normalize on PATH_MAX throughout the tree (instead
of some places using MAXPATHLEN, or defining fallback constants
ourselves).

This is the just the importing step.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add pathmax.
* gnulib/Makefile.in (aclocal_m4_deps): Add import/m4/pathmax.m4.
* gnulib/aclocal.m4: Regenerate.
* gnulib/config.in: Regenerate.
* gnulib/configure: Regenerate.
* gnulib/import/pathmax.h: New file.
* gnulib/import/Makefile.am: Regenerate.
* gnulib/import/Makefile.in: Regenerate.
* gnulib/import/m4/gnulib-cache.m4: Regenerate.
* gnulib/import/m4/gnulib-comp.m4: Regenerate.
* gnulib/import/m4/pathmax.m4: New file.

11 years agoReimplement DJGPP's .gdbinit -> gdb.ini renaming.
Pedro Alves [Mon, 1 Jul 2013 11:24:17 +0000 (11:24 +0000)]
Reimplement DJGPP's .gdbinit -> gdb.ini renaming.

This simplifies the .gdbinit filename selection logic.

We have a GDBINIT_FILENAME define that supposedly configurations would
override, but none do so.  Instead, the only configuration that wants
a different file name instead of ".gdbinit", djgpp, does a strcpy over
the gdbinit global array.  This means the array needs to be sized, and
the code that does that is doing the usual
'PATH_MAX/FILENAME_MAX/fallback constant/etc.' mess.

Instead of all that, it's much simpler to have configure specificy the
.gdbinit filename.  As bonus, we can then make the "gdbinit" global
array const.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* configure.ac (GDBINIT): Define, depending on host.
* go32-nat.c (init_go32_ops): Don't override gdbinit here.
* top.c (PATH_MAX): Delete fallback definition.
(GDBINIT_FILENAME): Delete.
(gdbinit): Reimplement as const char array set to the GDBINIT
string constant.
* top.h (gdbinit): Make const.

11 years agoConstify main.c:get_init_files.
Pedro Alves [Mon, 1 Jul 2013 11:22:12 +0000 (11:22 +0000)]
Constify main.c:get_init_files.

A following patch will want to make the "gdbinit" global array const.
As usual, that forces in a cascading series of const additions.  This
patch preemptively does those.  I went all the way up to constifying
catch_command_errors, but then that would require constifying
execute_command as well (which is a much more significant effort).  So
as stop point, I found the cleanest would be to add a variant of
catch_command_errors that takes const args, and use that in the few
spots that needed it due to the the get_init_files constification.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* cli/cli-cmds.c (source_script): Make 'file' parameter const.
* cli/cli-cmds.h (source_script): Likewise.
* exceptions.c (catch_command_errors_const): New function.
* exceptions.h (catch_command_errors_const): Declare.
* main.c (get_init_files): Make parameters const, and adjust.
(captured_main): Make 'system_gdbinit', 'home_gdbinit' and
'local_gdbinit' locals const.  Adjust to use
catch_command_errors_const.
(print_gdb_help): Make 'system_gdbinit', 'home_gdbinit' and
'local_gdbinit' locals const.

11 years agoRely on gnulib's unistd.h replacement.
Pedro Alves [Mon, 1 Jul 2013 11:19:27 +0000 (11:19 +0000)]
Rely on gnulib's unistd.h replacement.

With gnulib's unistd module, we can assume unistd.h is always present, and that
STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO are always defined.

Don't remove unistd.h from GDB's configure.ac, as later tests in the
file use HAVE_UNISTD_H checks.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* defs.h: Don't check HAVE_UNISTD_H before including <unistd.h>.
(STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Delete.
* tracepoint.c: Don't check HAVE_UNISTD_H before including
<unistd.h>.

gdb/gdbserver/
2013-07-01  Pedro Alves  <palves@redhat.com>

* event-loop.c: Don't check HAVE_UNISTD_H before including
<unistd.h>.
* gdbreplay.c: Likewise.
* remote-utils.c: Likewise.
* server.c: Likewise.
* configure.ac: Don't check for unistd.h.
* configure: Regenerate.

11 years agoImport the "unistd" gnulib module.
Pedro Alves [Mon, 1 Jul 2013 11:18:09 +0000 (11:18 +0000)]
Import the "unistd" gnulib module.

I wanted to import the pathmax module, and that pulls in the unistd
module as dependency.  The unistd module is actually bigger than the
pathmax module.  If we're going to end up with it, might as well
import it explicitly, and make use of it throughout.

The "unistd" module makes a GNU-like <unistd.h> always available.
This means we no longer need to do:

 +#ifdef HAVE_UNISTD_H
  #include <unistd.h>
 +#endif

and we can remove a few constants from defs.h.

This is just the importing step.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

Import the "unistd" gnulib module.
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add "unistd".
* gnulib/Makefile.in (aclocal_m4_deps): Add import/m4/off_t.m4,
import/m4/ssize_t.m4, import/m4/sys_types_h.m4 and
import/m4/unistd_h.m4.
* gnulib/aclocal.m4: Renenerate.
* gnulib/config.in: Renenerate.
* gnulib/configure: Renenerate.
* gnulib/import/Makefile.am: Renenerate.
* gnulib/import/Makefile.in: Renenerate.
* gnulib/import/m4/gnulib-cache.m4: Renenerate.
* gnulib/import/m4/gnulib-comp.m4: Renenerate.
* gnulib/import/m4/off_t.m4: New file.
* gnulib/import/m4/ssize_t.m4: New file.
* gnulib/import/m4/sys_types_h.m4: New file.
* gnulib/import/m4/unistd_h.m4: New file.
* gnulib/import/sys_types.in.h: New file.
* gnulib/import/unistd.c: New file.
* gnulib/import/unistd.in.h: New file.

11 years agoutils.c: pathconf call, check for _PC_PATH_MAX instead of HAVE_UNISTD_H.
Pedro Alves [Mon, 1 Jul 2013 11:15:39 +0000 (11:15 +0000)]
utils.c: pathconf call, check for _PC_PATH_MAX instead of HAVE_UNISTD_H.

This check in utils.c for HAVE_UNISTD_H is being used as proxy for
"HAVE_PATHCONF", as pathconf is supposed to be declared in unistd.h.

It's possible that there are systems out there that have realpath,
unistd.h and alloca, but not pathconf+_PC_PATH_MAX.  I don't know of
any by heart, but if we import gnulib's unistd module (which a
following patch will do), then unistd.h ends up always available, so
the check ends up incorrect.  As pathconf is being called with
_PC_PATH_MAX, check for that instead.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* utils.c <pathconf/_PC_PATH_MAX use>: Check if _PC_PATH_MAX is
defined instead of checking HAVE_UNISTD_H.

11 years agoReimport gnulib from scratch.
Pedro Alves [Mon, 1 Jul 2013 11:14:42 +0000 (11:14 +0000)]
Reimport gnulib from scratch.

Moving aside gnulib/import/, and re-running our
gnulib/update-gnulib.sh script, surprisingly, one gets a different
result compared to what's in the tree.  This is with pristine FSF
autoconf and FSF automake, at the versions required by
update-gnulib.sh.  However, if one just runs the update-gnulib.sh
scripts against the _existing_ tree, then nothing changes...  I
suspect gnulib-tool's merge logic might be preserving some things by
design.  This gets rid of cruft that might have accumulated over
gnulib updates.  onceonly.m4 seems to fit in that category.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

Reimport gnulib from scratch.
* gnulib/Makefile.in (aclocal_m4_deps): Remove reference to
import/m4/onceonly.m4.
* gnulib/aclocal.m4: Renegerate.
* gnulib/config.in: Renegerate.
* gnulib/configure: Renegerate.
* gnulib/import/Makefile.in: Renegerate.
* gnulib/import/extra/update-copyright: Renegerate.
* gnulib/import/m4/onceonly.m4: Delete.

11 years agoDelete pagination_enabled extern declaration in tui/tui-regs.c.
Pedro Alves [Mon, 1 Jul 2013 10:09:27 +0000 (10:09 +0000)]
Delete pagination_enabled extern declaration in tui/tui-regs.c.

It's declared in utils.h.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

* tui/tui-regs.c (pagination_enabled): Delete declaration.

11 years agobfd/
Alan Modra [Mon, 1 Jul 2013 03:45:05 +0000 (03:45 +0000)]
bfd/
* elf64-ppc.h (ppc64_elf_toc): Delete.
(ppc64_elf_set_toc): Declare.
* elf64-ppc.c (ppc64_elf_toc_reloc): Replace call to ppc64_elf_toc
with call the ppc64_elf_set_toc.
(ppc64_elf_toc_ha_reloc, ppc64_elf_toc64_reloc): Likewise.
(ppc64_elf_start_multitoc_partition): Likewise.
(struct ppc_link_hash_table): Delete dot_toc_dot.  Replace all uses
with elf.hgot.
(ppc64_elf_process_dot_syms): Don't make a fake function descriptor
for ".TOC.".
(ppc64_elf_check_relocs): Mark sections with a reference to .TOC.
as needing a toc pointer.
(ppc64_elf_size_stubs): Don't set dot_toc_dot here.
(ppc64_elf_set_toc): Rename from ppc64_elf_toc.  Add info param.
Set elf.hgot value.
ld/
* emultempl/ppc64elf.em: (ppc_layout_sections_again): Call
ppc64_elf_set_toc rather than ppc64_elf_toc/_bfd_set_gp_value.
(gld${EMULATION_NAME}_after_allocation): Likewise.

11 years agodaily update
Alan Modra [Mon, 1 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agogdb/
Jan Kratochvil [Sun, 30 Jun 2013 17:14:59 +0000 (17:14 +0000)]
gdb/
Code cleanup.
* remote.c (async_remote_interrupt_twice): Make it static.
* remote.h (async_remote_interrupt_twice): Remove the declaration.

11 years agoThis patch implements the support for SystemTap SDT probes on IA-64.
Sergio Durigan Junior [Sun, 30 Jun 2013 00:35:39 +0000 (00:35 +0000)]
This patch implements the support for SystemTap SDT probes on IA-64.

Joel Brobecker reported a bug which was happening because of the
"Improved linker-debugger interface", by Gary Benson, when tested on
IA-64 with rhES5.  The message is:

<http://sourceware.org/ml/gdb-patches/2013-06/msg00745.html>

The failure happened because GDB was trying to parse the probes'
operands using only the generic parser (implemented on stap-probe.c),
because the arch-specific parser was not implemented.  Thus, I am
committing the following changes which solve the bug.

2013-06-29  Sergio Durigan Junior  <sergiodj@redhat.com>

* ia64-linux-tdep.c: Include <ctype.h>.
(ia64_linux_stap_is_single_operand): New function.
(ia64_linux_init_abi): Initialize SystemTap related attributes.

11 years agodaily update
Alan Modra [Sun, 30 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agodaily update
Alan Modra [Sat, 29 Jun 2013 00:00:03 +0000 (00:00 +0000)]
daily update

11 years agomove version.in from gdb/common back to gdb
Tom Tromey [Fri, 28 Jun 2013 18:59:51 +0000 (18:59 +0000)]
move version.in from gdb/common back to gdb

This reverts part of the earlier version.in change.  It moves
version.in back to the gdb directory.  This works around the CVS bug
we've found.

gdb
* Makefile.in (version.c): Use version.in, not
common/version.in.
* common/create-version.sh: Likewise.
* common/version.in: Move...
* version.in: ...here.
gdb/doc
* Makefile.in (version.subst): Use version.in, not
common/version.in.
* gdbint.texinfo (Versions and Branches, Releasing GDB):
Likewise.
gdb/gdbserver
* Makefile.in (version.c): Use version.in, not
common/version.in.
sim/common
* Make-common.in (version.c): Use version.in, not
common/version.in.
* create-version.sh: Likewise.
sim/ppc:
* Make-common.in (version.c): Use version.in, not
common/version.in.

11 years agoMove pagination_enabled declaration to a proper place.
Pedro Alves [Fri, 28 Jun 2013 17:19:39 +0000 (17:19 +0000)]
Move pagination_enabled declaration to a proper place.

Declare it close to other related declarations in utils.h, and remove
local extern declaration hack.

gdb/
2013-06-28  Pedro Alves  <palves@redhat.com>

* infrun.c (set_observer_mode): Don't declare pagination_enabled
here.
* utils.h (pagination_enabled): Declare.

11 years agoinfrun.c: Move non_stop_1 etc., higher up in file.
Pedro Alves [Fri, 28 Jun 2013 17:06:14 +0000 (17:06 +0000)]
infrun.c: Move non_stop_1 etc., higher up in file.

The "non_stop_1" global is out of place, mixed with the observer bits.
This moves all the non-stop user-interface-related bits together.

gdb/
2013-06-28  Pedro Alves  <palves@redhat.com>

* infrun.c (non_stop, non_stop_1, set_non_stop, show_non_stop):
Move higher up in file.

11 years agoHandle R_X86_64_DTPOFF64
H.J. Lu [Fri, 28 Jun 2013 15:07:55 +0000 (15:07 +0000)]
Handle R_X86_64_DTPOFF64

bfd/

PR ld/15685
* elf64-x86-64.c (elf_x86_64_relocate_section): Handle
R_X86_64_DTPOFF64.

ld/testsuite/

PR ld/15685
* ld-x86-64/tlsg.s: Add a test for R_X86_64_DTPOFF64.
* ld-x86-64/tlsg.sd: Updated.

11 years ago * tracepoint.c (deprecated_readline_begin_hook)
Tom Tromey [Fri, 28 Jun 2013 14:23:11 +0000 (14:23 +0000)]
* tracepoint.c (deprecated_readline_begin_hook)
(deprecated_readline_hook, deprecated_readline_end_hook): Don't
declare.

11 years ago[PR tui/14880] Fetch values before comparing their contents.
Pedro Alves [Fri, 28 Jun 2013 12:36:48 +0000 (12:36 +0000)]
[PR tui/14880] Fetch values before comparing their contents.

PR tui/14880 shows a reproducer that triggers this assertion:

  int
  value_available_contents_eq (const struct value *val1, int offset1,
        const struct value *val2, int offset2,
        int length)
  {
    int idx1 = 0, idx2 = 0;

    /* This routine is used by printing routines, where we should
       already have read the value.  Note that we only know whether a
       value chunk is available if we've tried to read it.  */
    gdb_assert (!val1->lazy && !val2->lazy);

(top-gdb) bt
#0  internal_error (file=0x88a26c "../../src/gdb/value.c", line=549, string=0x88a220 "%s: Assertion `%s' failed.") at ../../src/gdb/utils.c:844
#1  0x000000000057b9cd in value_available_contents_eq (val1=0x10fa900, offset1=0, val2=0x10f9e10, offset2=0, length=8) at ../../src/gdb/value.c:549
#2  0x00000000004fd756 in tui_get_register (frame=0xd5c430, data=0x109a548, regnum=0, changedp=0x109a560) at ../../src/gdb/tui/tui-regs.c:736
#3  0x00000000004fd111 in tui_check_register_values (frame=0xd5c430) at ../../src/gdb/tui/tui-regs.c:521
#4  0x0000000000501884 in tui_check_data_values (frame=0xd5c430) at ../../src/gdb/tui/tui-windata.c:234
#5  0x00000000004f976f in tui_selected_frame_level_changed_hook (level=1) at ../../src/gdb/tui/tui-hooks.c:222
#6  0x00000000006f0681 in select_frame (fi=0xd5c430) at ../../src/gdb/frame.c:1490
#7  0x00000000005dd94b in up_silently_base (count_exp=0x0) at ../../src/gdb/stack.c:2268
#8  0x00000000005dd985 in up_command (count_exp=0x0, from_tty=1) at ../../src/gdb/stack.c:2280
#9  0x00000000004dc5cf in do_cfunc (c=0xd3f720, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:113
#10 0x00000000004df664 in cmd_func (cmd=0xd3f720, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:1888
#11 0x00000000006e43e1 in execute_command (p=0xc7e6c2 "", from_tty=1) at ../../src/gdb/top.c:489

The fix is to fetch the value before comparing the contents.  The
comment additions to value.h explain why it can't be
value_available_contents_eq itself that fetches the contents.

Tested on x86_64 Fedora 17.

gdb/
2013-06-28  Pedro Alves  <palves@redhat.com>

PR tui/14880
* tui/tui-regs.c (tui_get_register): Fetch register value contents
before checking whether they're available.
* value.c (value_available_contents_eq): Change comment.
* value.h (value_available_contents_eq): Expand comment.

11 years agogdbserver: fix the standalone build
Mircea Gherzan [Fri, 28 Jun 2013 12:29:15 +0000 (12:29 +0000)]
gdbserver: fix the standalone build

When directly invoking gdb/gdbserver/configure && make, the build will
fail because the $(host_alias) is empty and thus create-version.sh does
not get enough parameters.

The output of gdbserver --version without this patch (built like above):

  [...]
  This gdbserver was configured as ""

After applying this patch:

  [...]
  This gdbserver was configured as "x86_64-unknown-linux-gnu"

2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>

gdbserver:

* configure.ac (version_host, version_target): Set and AC_SUBST
them.
* configure: Rebuild.
* Makefile.in (version_host, version_target): Get from
configure.
(version.c): Use $(version_host) and $(version_target).

Change-Id: Id48240532ad3d624ec78867a6db5ebd4c09583ff
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
11 years ago PR ld/15302
Nick Clifton [Fri, 28 Jun 2013 12:22:42 +0000 (12:22 +0000)]
PR ld/15302
* elf32-arm.c (allocate_dynrelocs_for_symbol): Revert previous patch.

11 years ago* rx.c (SHIFT_OP): A shift by zero still sets the condition codes.
Nick Clifton [Fri, 28 Jun 2013 07:19:44 +0000 (07:19 +0000)]
* rx.c (SHIFT_OP): A shift by zero still sets the condition codes.

11 years agodaily update
Alan Modra [Fri, 28 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years ago PR gold/15662
Cary Coutant [Thu, 27 Jun 2013 23:20:35 +0000 (23:20 +0000)]
PR gold/15662
* powerpc.cc (Output_data_brlt_powerpc::reset_brlt_sizes): New
function.
(Output_data_brlt_powerpc::finalize_brlt_sizes): New function.
(Target_powerpc::do_relax): Call the above.

11 years ago * target.c (find_run_target): Remove.
Tom Tromey [Thu, 27 Jun 2013 19:52:41 +0000 (19:52 +0000)]
* target.c (find_run_target): Remove.
* target.h (find_run_target): Remove.

11 years ago * corelow.c (core_gdbarch): Now static.
Tom Tromey [Thu, 27 Jun 2013 19:38:55 +0000 (19:38 +0000)]
* corelow.c (core_gdbarch): Now static.