binutils-gdb.git
11 years ago2013-07-10 Jack Howarth <howarth@bromo.med.uc.edu>
Mike Stump [Wed, 10 Jul 2013 20:55:59 +0000 (20:55 +0000)]
2013-07-10  Jack Howarth  <howarth@bromo.med.uc.edu>

    PR target/57792
    * configure.ac: Use --with-sysroot=\"`xcrun --show-sdk-path`\" on darwin13 and later.
    * configure: Regenerated.

11 years ago * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS, ADA_EXP_C): New macros.
Tom Tromey [Wed, 10 Jul 2013 18:13:52 +0000 (18:13 +0000)]
* Makefile.in (GDB_WARN_CFLAGS_NO_DEFS, ADA_EXP_C): New macros.
(ada-exp.o): New target.

11 years agoinclude/coff/
Tristan Gingold [Wed, 10 Jul 2013 08:16:34 +0000 (08:16 +0000)]
include/coff/
2013-07-10  Tristan Gingold  <gingold@adacore.com>

* rs6000.h (external_core_dumpx): New structure.
(external_ld_info32): Ditto.

binutils/
2013-07-10  Tristan Gingold  <gingold@adacore.com>

* od-xcoff.c (OPT_LDINFO): Define.
(options): Add ldinfo.
(xcoff_help): Mention ldinfo.
(xcoff_dump): Rename to ...
(xcoff_dump_obj): ... this.  Add a break.
(dump_dumpx_core): New function.
(xcoff_dump_core): Likewise.
(xcoff_dump): Likewise.
* doc/binutils.texi (objdump): Mention ldinfo.

11 years agohttp://sourceware.org/ml/gdb-patches/2013-07/msg00065.html
Sergio Durigan Junior [Wed, 10 Jul 2013 03:15:05 +0000 (03:15 +0000)]
sourceware.org/ml/gdb-patches/2013-07/msg00065.html

Doug Evans committed the change above, but forgot to update one of
the callers of get_raw_print_options, at mt-tdep.c.  This commit fixes
this.

2013-07-10  Sergio Durigan Junior  <sergiodj@redhat.com>

* mt-tdep.c (mt_registers_info): Call
get_no_prettyformat_print_options instead of
get_raw_print_options (regression by last patch from Doug
Evans).

11 years ago[testsuite/Ada] Add testing of access to packed arrays.
Joel Brobecker [Wed, 10 Jul 2013 00:35:01 +0000 (00:35 +0000)]
[testsuite/Ada] Add testing of access to packed arrays.

This patch adds some tests that evidence a regression fixed by
the following patch from Pedro Alves:

    [PATCH] ada-lang.c:coerce_unspec_val_to_type: Preserve laziness
    http://www.sourceware.org/ml/gdb-patches/2013-07/msg00178.html

gdb/testsuite/ChangeLog:

        * gdb.ada/arrayptr/foo.adb: Add some code defining an access
        to a packed array.
        * gdb.ada/arrayptr.exp: Add a few tests using that new access
        to packed array.

11 years agoada-lang.c:coerce_unspec_val_to_type: Preserve laziness.
Joel Brobecker [Wed, 10 Jul 2013 00:34:38 +0000 (00:34 +0000)]
ada-lang.c:coerce_unspec_val_to_type: Preserve laziness.

ada-lang.c:coerce_unspec_val_to_type does:

      if (value_lazy (val)
  || TYPE_LENGTH (type) > TYPE_LENGTH (value_type (val)))
result = allocate_value_lazy (type);
      else
{
  result = allocate_value (type);
  memcpy (value_contents_raw (result), value_contents (val),
  TYPE_LENGTH (type));
}
      set_value_component_location (result, val);
      set_value_bitsize (result, value_bitsize (val));
      set_value_bitpos (result, value_bitpos (val));
      set_value_address (result, value_address (val));
      set_value_optimized_out (result, value_optimized_out (val));

Notice that before value_optimized_out was made to auto-fetch lazy
values, VAL would end up still lazy if it was lazy on entry.  It's not
really a problem here if VAL is lazy, and VAL->optimized_out is 0,
because RESULT is also left lazy.  IOW, this just wants to copy the
VAL->optimized_out flag to RESULT->optimized_out, nothing else.

As a side-effect of the change in value_optimized_out, the following
testcase now regresses. Consider:

       type Small is range -64 .. 63;
       for Small'Size use 7;
       type Arr is array (1..10) of Small;
       pragma Pack (Arr);

       type Arr_Ptr is access Arr;
       An_Arr_Ptr : Arr_Ptr := new Arr'(10, 20, 30, 40, 50, 60, 62, 63,
                                        -23, 42);

    Trying to print one element of An_Arr_Ptr yields:

        (gdb) p an_arr_ptr(3)
        Cannot access memory at address 0x0

The patch adds the value_optimized_out_const function for that,
allowing us to avoid trying to fetch a value at a dummy address.

(I found this out by grepping for set_value_optimized_out and trying
to convert the uses I found to instead allocate the value with
allocate_optimized_out_value.)

Tested on x86_64 Fedora 17.

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

* ada-lang.c (coerce_unspec_val_to_type): Use
value_optimized_out_const.
* value.c (value_optimized_out_const): New function.
* value.h (value_optimized_out_const): New declaration.

11 years agoFix FAIL: gdb.ada/small_reg_param.exp: continue to call_me
Joel Brobecker [Wed, 10 Jul 2013 00:10:37 +0000 (00:10 +0000)]
Fix FAIL: gdb.ada/small_reg_param.exp: continue to call_me

If enough information is provided by the compiler, the debugger
now prints the entry value of various parameters:

    (gdb) continue
    Continuing.

    Breakpoint 2, pck.call_me (w=w@entry=50) at [...]
    20            Last_Word := W;

This patch adjusts the expected output to allow an optional
"w@entry=" in the parameter value.

gdb/testsuite/ChangeLog:

        * gdb.ada/small_reg_param.exp: Accept optional entry value
        for parameter "w".

11 years agoRemove trailing space in gdb.ada/small_reg_param.exp
Joel Brobecker [Wed, 10 Jul 2013 00:10:26 +0000 (00:10 +0000)]
Remove trailing space in gdb.ada/small_reg_param.exp

gdb/testsuite/ChangeLog:

        * gdb.ada/small_reg_param.exp: Remove trailing space.

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

11 years agogas/testsuite/
Richard Sandiford [Tue, 9 Jul 2013 17:15:13 +0000 (17:15 +0000)]
gas/testsuite/
* gas/mips/la-reloc.s, gas/mips/la-reloc.d, gas/mips/dla-reloc.s,
gas/mips/dla-reloc.d: Add files missing from earlier commit.

11 years ago * defs.h (enum val_prettyformat): Renamed from val_prettyprint.
Doug Evans [Tue, 9 Jul 2013 16:57:09 +0000 (16:57 +0000)]
* defs.h (enum val_prettyformat): Renamed from val_prettyprint.
Enum values rename as well.  All uses updated.
* valprint.h (value_print_options): Rename member pretty to
pretty format.  Rename member prettyprint_arrays to
prettyformat_arrays.  Rename member prettyprint_structs to
prettyformat_structs.  All uses updated.
(get_no_prettyformat_print_options): Renamed from
get_raw_print_options.
* valprint.c (get_no_prettyformat_print_options): Renamed from
get_raw_print_options.  All callers updated.
(show_prettyformat_structs): Renamed from show_prettyprint_structs.
All callers updated.
(show_prettyformat_arrays): Renamed from show_prettyprint_arrays.
All callers updated.
(_initialize_valprint): Improve help text for "set print pretty" and
"set print arrays".

testsuite/
* gdb.base/default.exp: Update expected output of "show print array"
and "show print pretty".

11 years agomerge from gcc
DJ Delorie [Tue, 9 Jul 2013 16:04:44 +0000 (16:04 +0000)]
merge from gcc

11 years agoRevert recent changes to value_bits_valid.
Andrew Burgess [Tue, 9 Jul 2013 14:11:53 +0000 (14:11 +0000)]
Revert recent changes to value_bits_valid.

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

  * value.c (value_bits_valid): Revert previous change, and change
  by Pedro on 2013-07-04, due to regressions in
  gdb.dwarf2/implptr.exp and gdb.dwarf2/pieces.exp.

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

* vms-alpha.c (struct vms_private_data_struct): Remove
flag_hash_long_names and flag_show_after_trunc.
(hash_string): Remove.
(_bfd_vms_length_hash_symbol): Remove.
(alpha_vms_write_exec): Remove call to _bfd_vms_length_hash_symbol.
(_bfd_vms_write_egsd): Likewise.  Rewrite condition.
(_bfd_vms_write_ehdr): Remove code that set removed flags.
(_bfd_vms_write_etir): Remove call to _bfd_vms_length_hash_symbol.
(vms_bfd_is_local_label_name): Remove trace call.

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

* makefile.vms (OBJS): Add dwarfnames.obj

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.