Andrew Burgess [Tue, 16 Jul 2013 21:12:14 +0000 (21:12 +0000)]
Check for NULL character before calling strchr.
http://sourceware.org/ml/gdb-patches/2013-07/msg00322.html
gdb/ChangeLog
* common/format.c (parse_format_string): Add checks for NULL
character before calling strchr.
gdb/testsuite/ChangeLog
* gdb.base/printcmds.exp (test_printf): Add tests for format
strings with missing format specifier.
Doug Evans [Tue, 16 Jul 2013 20:43:48 +0000 (20:43 +0000)]
* solist.h (target_so_ops.find_and_open_solib): Clarify usage of
temp_pathname argument.
* nto-tdep.c (nto_find_and_open_solib): Fix setting of temp_pathname
when opening the file fails.
Doug Evans [Tue, 16 Jul 2013 20:41:55 +0000 (20:41 +0000)]
* target.h (struct target_section): Delete member bfd.
All users updated to use the_bfd_section->owner instead.
* exec.c (add_to_section_table): Assert bfd is expected value.
Remove initialization of target_section.bfd.
(remove_target_sections): Update.
(section_table_available_memory): Update.
(section_table_xfer_memory_partial): Update.
(print_section_info): Update.
(exec_set_section_address): Update.
* record-full.c (record_full_core_xfer_partial): Update.
* solib-svr4.c (svr4_relocate_section_addresses): Update.
* solib-target.c (solib_target_relocate_section_addresses): Update.
* symfile.c (build_section_addr_info_from_section_table): Update.
* target.c (memory_xfer_live_readonly_partial): Update.
(memory_xfer_partial_1): Update.
Tom Tromey [Tue, 16 Jul 2013 18:52:18 +0000 (18:52 +0000)]
simple test suite fix in gdb.ada
This changes one spot in gdb.ada to use standard_testfile.
* gdb.ada/info_types.exp: Use standard_testfile.
Tom Tromey [Tue, 16 Jul 2013 18:49:32 +0000 (18:49 +0000)]
simple test suite fix in gdb.mi
This is another simple test suite change for the parallelization
project.
This changes mi-basics.exp to avoid the use of subdir and objdir and
instead use standard_output_file.
There are still some uses of objdir, but as noted in a new comment in
the patch, these uses are parallel-safe.
* gdb.mi/mi-basics.exp: Use standard_output_file.
(test_dir_specification, test_cwd_specification)
(test_path_specification): Use testsubdir, not subdir and objdir.
Tom Tromey [Tue, 16 Jul 2013 18:48:31 +0000 (18:48 +0000)]
test suite fixlet for gdb.trace
This is a minor fix to clean up the last remaining test suite
parallelization issue in gdb.trace.
mi-traceframe-changed.exp refers to objdir. This patch changes the
code to have the same effect, but avoid using that variable.
* gdb.trace/mi-traceframe-changed.exp: Don't use objdir.
Alan Modra [Tue, 16 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Richard Sandiford [Mon, 15 Jul 2013 18:36:57 +0000 (18:36 +0000)]
gas/
* config/tc-mips.c (match_save_restore_list_operand): Avoid -Wformat
error with older GCCs.
(mips16_macro_build): Dereference args.
Cary Coutant [Mon, 15 Jul 2013 16:49:20 +0000 (16:49 +0000)]
2013-07-15 Shawn Landden <shawnlandden@gmail.com>
gold/
PR gold/15070
* fileread.h (File_read::get_view): Clarify comment about ALIGNED.
* nacl.h (Sniff_file::View::View): Request aligned view.
Ulrich Weigand [Mon, 15 Jul 2013 16:01:26 +0000 (16:01 +0000)]
2013-07-15 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c: Since the new PowerPC specific ptrace interface is
now available for embedded (BookE) and server (BookS) processors,
correct mentions of 'booke' and adjust comments accordingly in order to
avoid confusion. Rename struct 'booke_debug_info' to 'hwdebug_info'.
(have_ptrace_booke_interface): Rename function and variable
'have_ptrace_booke_interface' to 'have_ptrace_hwdebug_interface'.
Rename struct 'booke_debug_info' to 'hwdebug_info'. Update all uses.
(booke_cmp_hw_point): Rename function 'booke_cmp_hw_point' to
'hwdebug_point_cmp'. Update all uses.
(booke_find_thread_points_by_tid): Rename function
'booke_find_thread_points_by_tid' to
'hwdebug_find_thread_points_by_tid'. Update all uses.
(booke_insert_point): Rename function 'booke_insert_point' to
'hwdebug_insert_point'. Update all uses.
(booke_remove_point): Rename function 'booke_remove_point' to
'hwdebug_remove_point'. Update all uses.
Maciej W. Rozycki [Mon, 15 Jul 2013 15:07:30 +0000 (15:07 +0000)]
include/elf/
* mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment.
(Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE,
Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT,
Val_GNU_MIPS_ABI_FP_64): New enum.
bfd/
* elfxx-mips.c (mips_elf_merge_obj_attributes): Replace hardcoded
magic numbers with enum values.
binutils/
* readelf.c (display_mips_gnu_attribute): Replace hardcoded magic
numbers with enum values.
gdb/
* mips-tdep.c (mips_gdbarch_init): Replace hardcoded magic
numbers with enum values.
Ali Anwar [Mon, 15 Jul 2013 11:14:32 +0000 (11:14 +0000)]
2013-07-15 Ali Anwar <ali_anwar@codesourcery.com>
PR threads/13217
* thread.c (thread_apply_all_command): Check for valid threads
and thread count.
(thread_array_cleanup): New struct.
(set_thread_refcount): New function.
Alan Modra [Mon, 15 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Richard Sandiford [Sun, 14 Jul 2013 14:25:57 +0000 (14:25 +0000)]
opcodes/
* Makefile.am (mips-opc.lo, micromips-opc.lo, mips16-opc.lo): Remove
special rules.
* Makefile.in: Regenerate.
* mips-opc.c, micromips-opc.c, mips16-opc.c: Explicitly initialize
all fields. Reformat.
Richard Sandiford [Sun, 14 Jul 2013 14:16:03 +0000 (14:16 +0000)]
gas/
* config/tc-mips.c (mips_prefer_vec_regno, mips_parse_register):
New functions, split out from...
(reg_lookup): ...here. Remove itbl support.
(reglist_lookup): Delete.
(mips_operand_token_type): New enum.
(mips_operand_token): New structure.
(mips_operand_tokens): New variable.
(mips_add_token, mips_parse_base_start, mips_parse_argument_token)
(mips_parse_arguments): New functions.
(md_begin): Initialize mips_operand_tokens.
(mips_arg_info): Add a token field. Remove optional_reg field.
(match_char, match_expression): New functions.
(match_const_int): Use match_expression. Remove "s" argument
and return a boolean result. Remove O_register handling.
(match_regno, match_reg, match_reg_range): New functions.
(match_int_operand, match_mapped_int_operand, match_msb_operand)
(match_reg_operand, match_reg_pair_operand, match_perf_reg_operand)
(match_addiusp_operand, match_clo_clz_dest_operand)
(match_lwm_swm_list_operand, match_entry_exit_operand)
(match_save_restore_list_operand, match_mdmx_imm_reg_operand)
(match_tied_reg_operand): Remove "s" argument and return a boolean
result. Match tokens rather than text. Update calls to
match_const_int. Rely on match_regno to call check_regno.
(match_pcrel_operand, match_pc_operand): Replace "s" argument with
"arg" argument. Return a boolean result.
(parse_float_constant): Replace with...
(match_float_constant): ...this new function.
(match_operand): Remove "s" argument and return a boolean result.
Update calls to subfunctions.
(mips_ip, mips16_ip): Call mips_parse_arguments. Use match routines
rather than string-parsing routines. Update handling of optional
registers for token scheme.
gas/testsuite/
* gas/mips/vr5400-ill.s, gas/mips/vr5400-ill.l: Add some more cases.
* gas/mips/micromips-ill.s, gas/mips/micromips-ill.l: New test.
* gas/mips/mips.exp: Run it.
Richard Sandiford [Sun, 14 Jul 2013 13:53:47 +0000 (13:53 +0000)]
gas/
* config/tc-mips.c (parse_float_constant): Split out from...
(mips_ip): ...here.
Richard Sandiford [Sun, 14 Jul 2013 13:52:52 +0000 (13:52 +0000)]
gas/
* config/tc-mips.c (INSERT_BITS, INSERT_OPERAND, MIPS16_INSERT_OPERAND):
Delete.
Richard Sandiford [Sun, 14 Jul 2013 13:51:52 +0000 (13:51 +0000)]
gas/
* config/tc-mips.c (mips32_to_16_reg_map): Delete.
(match_entry_exit_operand): New function.
(match_save_restore_list_operand): Likewise.
(match_operand): Use them.
(check_absolute_expr): Delete.
(mips16_ip): Rewrite main parsing loop to use mips_operands.
Richard Sandiford [Sun, 14 Jul 2013 13:49:14 +0000 (13:49 +0000)]
gas/
* config/tc-mips.c: Enable functions commented out in previous patch.
(SKIP_SPACE_TABS): Move further up file.
(mips32_to_micromips_reg_b_map, mips32_to_micromips_reg_c_map)
(mips32_to_micromips_reg_d_map, mips32_to_micromips_reg_e_map)
(ips32_to_micromips_reg_f_map, mips32_to_micromips_reg_g_map)
(mips32_to_micromips_reg_l_map, mips32_to_micromips_reg_m_map)
(mips32_to_micromips_reg_q_map, mips32_to_micromips_reg_n_map)
(micromips_imm_b_map, micromips_imm_c_map): Delete.
(mips_lookup_reg_pair): Delete.
(macro): Use report_bad_range and report_bad_field.
(mips_immed, expr_const_in_range): Delete.
(mips_ip): Rewrite main parsing loop to use new functions.
gas/testsuite/
* gas/mips/at-2.l: Remove duplicated $at warnings.
* gas/mips/ext-ill.l, gas/mips/lui-1.l, gas/mips/mips32r2-ill.l,
gas/mips/mips32r2-ill-nofp.l, gas/mips/mips32r2-ill-fp64.l,
gas/mips/mips64r2-ill.l, gas/mips/octeon-ill.l: Update error
messages. Expect negative numbers to be printed as such,
rather than as large unsigned positive numbers.
Richard Sandiford [Sun, 14 Jul 2013 13:44:25 +0000 (13:44 +0000)]
gas/
* config/tc-mips.c (mips_oddfpreg_ok): Move further up file.
Change return type to bfd_boolean.
(report_bad_range, report_bad_field): New functions.
(mips_arg_info): New structure.
(match_const_int, convert_reg_type, check_regno, match_int_operand)
(match_mapped_int_operand, match_msb_operand, match_reg_operand)
(match_reg_pair_operand, match_pcrel_operand, match_perf_reg_operand)
(match_addiusp_operand, match_clo_clz_dest_operand)
(match_lwm_swm_list_operand, match_mdmx_imm_reg_operand)
(match_pc_operand, match_tied_reg_operand, match_operand)
(check_completed_insn): New functions, commented out for now.
Richard Sandiford [Sun, 14 Jul 2013 13:37:51 +0000 (13:37 +0000)]
gas/
* config/tc-mips.c (insn_insert_operand): New function.
(macro_build, mips16_macro_build): Put null character check
in the for loop and convert continues to breaks. Use operand
structures to handle constant operands.
Richard Sandiford [Sun, 14 Jul 2013 13:36:51 +0000 (13:36 +0000)]
include/opcode/
* mips.h (mips_operand_type): Add OP_ENTRY_EXIT_LIST and
OP_SAVE_RESTORE_LIST.
(decode_mips16_operand): Declare.
opcodes/
* mips16-opc.c: Include mips-formats.h.
(reg_0_map, reg_29_map, reg_31_map, reg_m16_map, reg32r_map): New
static arrays.
(decode_mips16_operand): New function.
* mips-dis.c (mips16_to_32_reg_map, mips16_reg_names): Delete.
(print_insn_arg): Handle OP_ENTRY_EXIT list.
Abort for OP_SAVE_RESTORE_LIST.
(print_mips16_insn_arg): Change interface. Use mips_operand
structures. Delete GET_OP_S. Move GET_OP definition to...
(print_insn_mips16): ...here. Call init_print_arg_state.
Update the call to print_mips16_insn_arg.
Richard Sandiford [Sun, 14 Jul 2013 13:28:56 +0000 (13:28 +0000)]
include/opcode/
* mips.h (mips_operand_type, mips_reg_operand_type): New enums.
(mips_operand, mips_int_operand, mips_mapped_int_operand)
(mips_msb_operand, mips_reg_operand, mips_reg_pair_operand)
(mips_pcrel_operand): New structures.
(mips_insert_operand, mips_extract_operand, mips_signed_operand)
(mips_decode_int_operand, mips_decode_pcrel_operand): New functions.
(decode_mips_operand, decode_micromips_operand): Declare.
opcodes/
* mips-formats.h: New file.
* mips-opc.c: Include mips-formats.h.
(reg_0_map): New static array.
(decode_mips_operand): New function.
* micromips-opc.c: Remove <stdio.h> include. Include mips-formats.h.
(reg_0_map, reg_28_map, reg_29_map, reg_31_map, reg_m16_map)
(reg_mn_map, reg_q_map, reg_h_map1, reg_h_map2, int_b_map)
(int_c_map): New static arrays.
(decode_micromips_operand): New function.
* mips-dis.c (micromips_to_32_reg_b_map, micromips_to_32_reg_c_map)
(micromips_to_32_reg_d_map, micromips_to_32_reg_e_map)
(micromips_to_32_reg_f_map, micromips_to_32_reg_g_map)
(micromips_to_32_reg_h_map1, micromips_to_32_reg_h_map2)
(micromips_to_32_reg_l_map, micromips_to_32_reg_m_map)
(micromips_to_32_reg_n_map, micromips_to_32_reg_q_map)
(micromips_imm_b_map, micromips_imm_c_map): Delete.
(print_reg): New function.
(mips_print_arg_state): New structure.
(init_print_arg_state, print_insn_arg): New functions.
(print_insn_args): Change interface and use mips_operand structures.
Delete GET_OP_S. Move GET_OP definition to...
(print_insn_mips): ...here. Update the call to print_insn_args.
(print_insn_micromips): Use print_insn_args.
gas/
* config/tc-mips.c (validate_mips_insn): Move further up file.
Add insn_bits and decode_operand arguments. Use the mips_operand
fields to work out which bits an operand occupies. Detect double
definitions.
(validate_micromips_insn): Move further up file. Call into
validate_mips_insn.
Richard Sandiford [Sun, 14 Jul 2013 13:17:55 +0000 (13:17 +0000)]
gas/
* config/tc-mips.c (mips16_macro_build): Remove 'Y' case.
Richard Sandiford [Sun, 14 Jul 2013 13:15:25 +0000 (13:15 +0000)]
gas/
* config/tc-mips.c (macro_build): Take an int for "C", "k", "\\"
and "~".
(macro): Update accordingly.
Richard Sandiford [Sun, 14 Jul 2013 13:13:43 +0000 (13:13 +0000)]
gas/
* config/tc-mips.c (imm_expr, imm2_expr, offset_expr): Tweak commentary.
(imm_reloc): Delete.
(md_assemble): Remove imm_reloc handling.
(mips_ip): Update commentary. Use offset_expr and offset_reloc
rather than imm_expr and imm_reloc for 'i', 'j' and 'u'.
Use a temporary array rather than imm_reloc when parsing
constant expressions. Remove imm_reloc initialization.
(mips16_ip): Update commentary. Use offset_expr and offset_reloc
for the relaxable field. Use a relax_char variable to track the
type of this field. Remove imm_reloc initialization.
Richard Sandiford [Sun, 14 Jul 2013 13:11:03 +0000 (13:11 +0000)]
include/opcode/
* mips.h: Document MIPS16 "I" opcode.
opcodes/
* mips16-opc.c (mips16_opcodes): Use "I" for immediate operands
in macros.
gas/
* config/tc-mips.c (mips16_ip): Handle "I".
Richard Sandiford [Sun, 14 Jul 2013 13:07:50 +0000 (13:07 +0000)]
opcodes/
* mips-opc.c (mips_builtin_opcodes): Use "S,T" rather than "V,T" for
ADDA.S, MULA.S and SUBA.S.
Alan Modra [Sun, 14 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Alan Modra [Sat, 13 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Roland McGrath [Fri, 12 Jul 2013 20:40:13 +0000 (20:40 +0000)]
bfd/
* reloc.c: Add BFD_RELOC_390_PC12DBL, BFD_RELOC_390_PLT12DBL,
BFD_RELOC_390_PC24DBL, BFD_RELOC_390_PLT24DBL (should have
been added here with 2013-07-05 elf32-s390.c change).
* bfd-in2.h: Regenerate (no-op).
* libbfd.h: Regenerate (no-op).
Maciej W. Rozycki [Fri, 12 Jul 2013 15:58:15 +0000 (15:58 +0000)]
include/elf/
* mips.h (EF_MIPS_NAN2008): New macro.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Handle
EF_MIPS_NAN2008.
(_bfd_mips_elf_print_private_bfd_data): Likewise.
binutils/
* readelf.c (get_machine_flags): Handle EF_MIPS_NAN2008.
gas/
* config/tc-mips.c (mips_flag_nan2008): New variable.
(options): Add OPTION_NAN enum value.
(md_longopts): Handle it.
(md_parse_option): Likewise.
(s_nan): New function.
(mips_elf_final_processing): Handle EF_MIPS_NAN2008.
(md_show_usage): Add -mnan.
* doc/as.texinfo (Overview): Add -mnan.
* doc/c-mips.texi (MIPS Opts): Document -mnan.
(MIPS NaN Encodings): New node. Document .nan directive.
(MIPS-Dependent): List the new node.
gas/testsuite/
* gas/mips/nan-2008-1.d: New test.
* gas/mips/nan-2008-2.d: New test.
* gas/mips/nan-2008-3.d: New test.
* gas/mips/nan-2008-4.d: New test.
* gas/mips/nan-legacy-1.d: New test.
* gas/mips/nan-legacy-2.d: New test.
* gas/mips/nan-legacy-3.d: New test.
* gas/mips/nan-legacy-4.d: New test.
* gas/mips/nan-legacy-5.d: New test.
* gas/mips/nan-error-1.l: New list test.
* gas/mips/nan-error-2.l: New list test.
* gas/mips/nan-2008-override.s: New test source.
* gas/mips/nan-2008.s: New test source.
* gas/mips/nan-legacy-override.s: New test source.
* gas/mips/nan-legacy.s: New test source.
* gas/mips/nan-error-1.s: New test source.
* gas/mips/nan-error-2.s: New test source.
* gas/mips/mips.exp: Run the new tests.
ld/testsuite/
* ld-mips-elf/nan-2008.d: New test.
* ld-mips-elf/nan-legacy.d: New test.
* ld-mips-elf/nan-mixed-1.d: New test.
* ld-mips-elf/nan-mixed-2.d: New test.
* ld-mips-elf/nan-2008.s: New test source.
* ld-mips-elf/nan-legacy.s: New test source.
Alan Modra [Fri, 12 Jul 2013 00:00:05 +0000 (00:00 +0000)]
daily update
Cary Coutant [Thu, 11 Jul 2013 21:30:56 +0000 (21:30 +0000)]
gold/
* powerpc.cc (Target_powerpc::write_branch_lookup_table): Use
correct BRLT entry size.
Andrew Burgess [Thu, 11 Jul 2013 09:07:41 +0000 (09:07 +0000)]
Reuse print_hex_chars function.
http://sourceware.org/ml/gdb-patches/2013-07/msg00234.html
* infcmd.c (default_print_one_register_info): Reuse code in
print_hex_chars.
Alan Modra [Thu, 11 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
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.
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.
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.
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).
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.
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.
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".
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.
Alan Modra [Wed, 10 Jul 2013 00:00:03 +0000 (00:00 +0000)]
daily update
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.
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".
DJ Delorie [Tue, 9 Jul 2013 16:04:44 +0000 (16:04 +0000)]
merge from gcc
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.
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.
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
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
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.
Alan Modra [Tue, 9 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
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.
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.
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.
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.
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.
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.
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.
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.
Alan Modra [Mon, 8 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
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.
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.
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.
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.
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".
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".
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".
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.
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.
Alan Modra [Sun, 7 Jul 2013 00:00:03 +0000 (00:00 +0000)]
daily update
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.
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.
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'.
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.
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.
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.
Alan Modra [Sat, 6 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
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.
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.
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.
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.
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.
Alan Modra [Fri, 5 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
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.
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.
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.
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.
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.
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).
Alan Modra [Thu, 4 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Marcus Shawcroft [Wed, 3 Jul 2013 17:26:36 +0000 (17:26 +0000)]
[PATCH, COMMITTED] [AArch64] Replace the :got_prel19: address modifier with :got:
Marcus Shawcroft [Wed, 3 Jul 2013 17:25:17 +0000 (17:25 +0000)]
[AArch64] Tidy up switch statement in GAS.
Marcus Shawcroft [Wed, 3 Jul 2013 17:23:24 +0000 (17:23 +0000)]
[AArch64] Tidy up switch statements in elfnn-aarch64.c
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.
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.
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.
Alan Modra [Wed, 3 Jul 2013 00:45:50 +0000 (00:45 +0000)]
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Hide ".TOC.".