binutils-gdb.git
11 years agodaily update
Alan Modra [Thu, 29 Aug 2013 00:00:04 +0000 (00:00 +0000)]
daily update

11 years agoPR gdb/15415
Jan Kratochvil [Wed, 28 Aug 2013 17:52:03 +0000 (17:52 +0000)]
PR gdb/15415

gdb/
2013-08-27  Jan Kratochvil  <jan.kratochvil@redhat.com>

PR gdb/15415
* corefile.c (get_exec_file): Use exec_filename.
* defs.h (OPF_DISABLE_REALPATH): New definition.  Add new comment.
* exec.c (exec_close): Free EXEC_FILENAME.
(exec_file_attach): New variable canonical_pathname.  Use
OPF_DISABLE_REALPATH.  Call gdb_realpath explicitly.  Set
EXEC_FILENAME.
* exec.h (exec_filename): New.
* inferior.c (print_inferior, inferior_command): Use
PSPACE_EXEC_FILENAME.
* mi/mi-main.c (print_one_inferior): Likewise.
* progspace.c (clone_program_space, print_program_space): Likewise.
* progspace.h (struct program_space): New field pspace_exec_filename.
* source.c (openp): Describe OPF_DISABLE_REALPATH.  New variable
realpath_fptr, initialize it from OPF_DISABLE_REALPATH, use it.

gdb/testsuite/
2013-08-27  Jan Kratochvil  <jan.kratochvil@redhat.com>

PR gdb/15415
* gdb.base/argv0-symlink.c: New file.
* gdb.base/argv0-symlink.exp: New file.

11 years agoPR server/15604
Jan Kratochvil [Wed, 28 Aug 2013 17:40:58 +0000 (17:40 +0000)]
PR server/15604

gdb/gdbserver/
2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>

PR server/15604
* linux-low.c: Include filestuff.h.
(linux_create_inferior) <pid == 0>: Call close_most_fds.
* lynx-low.c: Include filestuff.h.
(lynx_create_inferior) <pid == 0>: Call close_most_fds.
* server.c: Include filestuff.h.
(main): Call notice_open_fds.
* spu-low.c: Include filestuff.h.
(spu_create_inferior) <pid == 0>: Call close_most_fds.

11 years ago * gdb.dwarf2/gdb-index.exp (add_gdb_index): Use explicit test name
Tom Tromey [Wed, 28 Aug 2013 14:20:43 +0000 (14:20 +0000)]
* gdb.dwarf2/gdb-index.exp (add_gdb_index): Use explicit test name
when saving index.

11 years agogdb/common/linux-ptrace.c: Fix build on non-Intel architectures.
Will Newton [Wed, 28 Aug 2013 14:09:31 +0000 (14:09 +0000)]
gdb/common/linux-ptrace.c: Fix build on non-Intel architectures.

As uintptr_t is used stdint.h must be included on all architectures.

2013-08-28  Will Newton  <will.newton@linaro.org>

* common/linux-ptrace.c: Include stdint.h unconditionally.

11 years agogdb/
Jan Kratochvil [Wed, 28 Aug 2013 13:07:12 +0000 (13:07 +0000)]
gdb/
Code cleanup.
* nto-tdep.c (nto_find_and_open_solib): Use OPF_TRY_CWD_FIRST.

11 years agogdb/
Yao Qi [Wed, 28 Aug 2013 12:25:05 +0000 (12:25 +0000)]
gdb/

* event-top.c (gdb_setup_readline): Call stderr_fileopen
instead of stdio_fileopen.
* main.c (captured_main) [__MINGW32__]: Set stderr unbuffered.
.Call stderr_fileopen instead of stdio_fileopen.
* ui-file.c [__MINGW32__] (stderr_file_write): New function.
[__MINGW32__] (stderr_file_fputs): New function.
(stderr_fileopen): New function.
* ui-file.h (stderr_fileopen): Declare.

11 years ago * aarch64-opc.c (aarch64_logical_immediate_p): Return FALSE if the
Nick Clifton [Wed, 28 Aug 2013 10:25:36 +0000 (10:25 +0000)]
* aarch64-opc.c (aarch64_logical_immediate_p): Return FALSE if the
immediate is not suitable for the 32-bit ABI.

* gas/aarch64/illegal.s: Add illegal constant for logical
operation.
* gas/aarch64/illegal.l: Add expected error message.

11 years ago PR ld/15896
Nick Clifton [Wed, 28 Aug 2013 09:17:35 +0000 (09:17 +0000)]
PR ld/15896
* ld.texinfo: Fix uses of MB abbreviation.

11 years agodaily update
Alan Modra [Wed, 28 Aug 2013 00:00:05 +0000 (00:00 +0000)]
daily update

11 years agogold/
Roland McGrath [Tue, 27 Aug 2013 21:49:48 +0000 (21:49 +0000)]
gold/
* output.cc (Output_segment::set_section_addresses): Take new
Target* argument.  If target->isolate_execinstr() and the segment
is executable and starts at a target->abi_pagesize() boundary,
pad its end out to a target->abi_pagesize() boundary with code fill.
* output.h (Output_segment::set_section_addresses): Update decl.
* layout.h (Layout::check_output_data_for_reset_values): Take new
argument RELAX_OUTPUTS.
(Layout): New member relax_output_list_.
(Layout::add_relax_output): New method.
* layout.cc (Layout::Layout): Update constructor.
(Layout::reset_relax_output): New method.
(Layout::clean_up_after_relaxation): Call it.
(Layout::prepare_for_relaxation): Update caller.
(Layout::set_segment_offsets): Update callers of set_section_addresses.
Call reset_relax_output before re-processing segments for
isolate_execinstr case.
(Layout::write_data): Handle relax_output_list_.
(Layout::Relaxation_debug_check::check_output_data_for_reset_values):
Take new argument RELAX_OUTPUTS.  Assert it's an empty collection.

11 years ago * dwarf2read.c (struct dwarf2_cu): Tweak comment.
Doug Evans [Tue, 27 Aug 2013 21:38:05 +0000 (21:38 +0000)]
* dwarf2read.c (struct dwarf2_cu): Tweak comment.
(struct dwarf2_per_cu_data): Ditto.
(maybe_queue_comp_unit): Delete forward decl.  Add comment.
(process_imported_unit_die): Ditto.
(follow_die_sig_1): Simplify assert.

11 years ago PR binutils/15796
Nick Clifton [Tue, 27 Aug 2013 16:22:48 +0000 (16:22 +0000)]
PR binutils/15796
* ar.c (map_over_members): Correctly handle multiple same-name
entries on the command line and in the archive.

11 years agowindows-nat.c: Don't install a deprecated_xfer_memory method.
Pedro Alves [Tue, 27 Aug 2013 11:36:09 +0000 (11:36 +0000)]
windows-nat.c: Don't install a deprecated_xfer_memory method.

This stops another target from installing a
target_ops->deprecated_xfer_memory method.

Tested on native MinGW.

gdb/
2013-08-27  Pedro Alves  <palves@redhat.com>

* windows-nat.c (windows_xfer_memory): Adjust prototype to follow
xfer_partial's interface.  Return TARGET_XFER_E_IO on error.
(windows_xfer_partial): Defer TARGET_OBJECT_MEMORY handling to
windows_xfer_memory directly.
(init_windows_ops): Don't install a deprecated_xfer_memory method.

11 years agodarwin-nat.c: Don't install a deprecated_xfer_memory method.
Pedro Alves [Tue, 27 Aug 2013 11:05:39 +0000 (11:05 +0000)]
darwin-nat.c: Don't install a deprecated_xfer_memory method.

darwin_xfer_partial already handles TARGET_OBJECT_MEMORY, so this
method is not necessary.

gdb/
2013-08-27  Pedro Alves  <palves@redhat.com>

* darwin-nat.c (darwin_xfer_memory): Delete.
(_initialize_darwin_inferior): Don't install a
deprecated_xfer_memory method.

11 years agoAdd options to skip unavailable locals
Yao Qi [Tue, 27 Aug 2013 05:20:57 +0000 (05:20 +0000)]
Add options to skip unavailable locals

This is the patch to add new option '--skip-unavailable' to MI
commands '-stack-list-{locals, arguments, variables}'.  This patch
extends list_args_or_locals to add a new parameter 'skip_unavailable',
and don't list locals or arguments if values are unavailable and
'skip_unavailable' is true.

This is inspecting a trace frame (tfind mode), where only a few
locals have been collected.

-stack-list-locals, no switch vs new switch:

 -stack-list-locals --simple-values
 ^done,locals=[{name="array",type="unsigned char [2]"},{name="i",type="int",value="<unavailable>"}]
 -stack-list-locals --skip-unavailable --simple-values
 ^done,locals=[{name="array",type="unsigned char [2]"}]

-stack-list-arguments, no switch vs new switch:

 -stack-list-arguments --simple-values
 ^done,stack-args=[frame={level="0",args=[{name="j",type="int",value="4"},{name="s",type="char *",value="<unavailable>"}]},frame={level="1",args=[]}]
 -stack-list-arguments --skip-unavailable --simple-values
 ^done,stack-args=[frame={level="0",args=[{name="j",type="int",value="4"}]},frame={level="1",args=[]}]

-stack-list-variables, no switch vs new switch:

 -stack-list-variables --simple-values
 ^done,variables=[{name="j",arg="1",type="int",value="4"},{name="s",arg="1",type="char *",value="<unavailable>"},{name="array",type="unsigned char [2]"},{name="i",type="int",value="<unavailable>"}]
 -stack-list-variables --skip-unavailable --simple-values
 ^done,variables=[{name="j",arg="1",type="int",value="4"},{name="array",type="unsigned char [2]"}]

tests are added to test these new options.

gdb:

2013-08-27  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* mi/mi-cmd-stack.c (list_args_or_locals): Adjust prototype.
(parse_no_frames_option): Remove.
(mi_cmd_stack_list_locals): Handle --skip-unavailable.
(mi_cmd_stack_list_args): Adjust.
(mi_cmd_stack_list_variables): Handle --skip-unavailable.
(list_arg_or_local): Add new parameter 'skip_unavailable'.  Return
early if SKIP_UNAVAILABLE is true and ARG->val is unavailable.
Caller update.
(list_args_or_locals): New parameter 'skip_unavailable'.
Handle it.
* valprint.c (scalar_type_p): Rename to ...
(val_print_scalar_type_p): ... this.  Make extern.
(val_print, value_check_printable): Adjust.
* valprint.h (val_print_scalar_type_p): Declare.
* value.c (value_entirely_unavailable): New function.
* value.h (value_entirely_unavailable): Declare.

* NEWS: Mention the new option "--skip-unavailable" to MI
commands '-stack-list-locals', '-stack-list-arguments' and
'-stack-list-variables'.

gdb/doc:

2013-08-27  Pedro Alves  <pedro@codesourcery.com>
    Yao Qi  <yao@codesourcery.com>

* gdb.texinfo (GDB/MI Stack Manipulation) <-stack-list-locals>:
Document new --skip-unavailable option.
<-stack-list-variables>: Document new --skip-unavailable option.

gdb/testsuite:

2013-08-27  Yao Qi  <yao@codesourcery.com>

* gdb.trace/entry-values.exp: Test unavailable entry value is
not shown when option '--skip-unavailable' is specified.
* gdb.trace/mi-trace-unavailable.exp (test_trace_unavailable):
Add tests for new option '--skip-unavailable'.

11 years agoAdd mi_getopt_allow_unknown
Yao Qi [Tue, 27 Aug 2013 03:04:45 +0000 (03:04 +0000)]
Add mi_getopt_allow_unknown

This patch is to add a new function mi_getopt_allow_unknown, which
returns -1 silently (without throwing error) when unknown option is
met, and use this function to parse options for command
'-stack-list-arguments'.

gdb/
* mi/mi-cmd-stack.c (parse_no_frames_option): Remove.
(mi_cmd_stack_list_args): Use mi_getopt_silent to handle
options.
* mi/mi-getopt.c (mi_getopt): Remove.
(mi_getopt_1): Renamed from mi_getopt.  Add one parameter
'error_on_unknown'.
(mi_getopt): Call mi_getopt_1.
(mi_getopt_silent): New.
* mi/mi-getopt.h (mi_getopt_silent): Declare.

11 years ago * elf-bfd.h (struct elf_backend_data): Remove as_needed_cleanup.
Alan Modra [Tue, 27 Aug 2013 01:06:43 +0000 (01:06 +0000)]
* elf-bfd.h (struct elf_backend_data): Remove as_needed_cleanup.
Add notice_as_needed.
* elf64-ppc.c (elf_backend_as_needed_cleanup): Don't define.
(elf_backend_notice_as_needed): Define.
(ppc64_elf_as_needed_cleanup): Rename and adjust..
(ppc64_elf_notice_as_needed): ..to this.
* elflink.c (_bfd_elf_notice_as_needed): New function, extracted..
(elf_link_add_object_symbols): ..from here.
* elfxx-target.h (elf_backend_as_needed_cleanup): Don't define.
(elf_backend_notice_as_needed): Define..
(elfNN_bed): ..and use here.

11 years agogdb/testsuite/
Yao Qi [Tue, 27 Aug 2013 00:19:02 +0000 (00:19 +0000)]
gdb/testsuite/

* lib/gdb.exp (gdb_remote_download): Don't pass $tofile to
remote_download if it is empty.

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

11 years agobfd/
Roland McGrath [Mon, 26 Aug 2013 22:18:07 +0000 (22:18 +0000)]
bfd/
* archures.c (bfd_mach_i386_nacl, bfd_mach_i386_i386_nacl): New macros.
(bfd_mach_x86_64_nacl, bfd_mach_x64_32_nacl): New macros.
* cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): New function.
(bfd_i386_nacl_arch): New variable.
(bfd_x86_64_nacl_arch, bfd_x64_32_nacl_arch): New variables.
(bfd_x64_32_arch_intel_syntax): Link them into the list.
* bfd-in2.h: Regenerate.

ld/
* emulparams/elf_i386_nacl.sh (ARCH): Set to i386:nacl.
* emulparams/elf_x86_64_nacl.sh (ARCH): Set to i386:x86-64:nacl.
* emulparams/elf32_x86_64_nacl.sh (ARCH): Set to i386:x64-32:nacl.

ld/testsuite/
* ld-x86-64/x86-64.exp (Mixed x86_64 and i386 input test 1):
Loosen string match to admit i386:x86-64*.
(Mixed x86_64 and i386 input test 2): Likewise.
* ld-x86-64/ilp32-2.d: Likewise.
* ld-x86-64/ilp32-3.d: Likewise.
* ld-x86-64/lp64-2.d: Likewise.
* ld-x86-64/lp64-3.d: Likewise.
* ld-x86-64/ia32-2.d: Likewise, and i386.* too.
* ld-x86-64/ia32-3.d: Likewise.

11 years agobfd/
Roland McGrath [Mon, 26 Aug 2013 19:27:25 +0000 (19:27 +0000)]
bfd/
* elf-nacl.c (nacl_modify_segment_map): Fix logic reordering the
elf_segment_map list.  If an executable segment is page-aligned
but does not end with a full page, then append a fake section into
the segment map entry that pads out the page.
(nacl_final_write_processing): New function.  Write the code fill
laid out in nacl_modify_segment_map.
* elf-nacl.h: Declare it.
* elf32-arm.c (elf32_arm_nacl_final_write_processing): New function.
(elf_backend_final_write_processing): Define it for NaCl backend.
* elf32-i386.c (elf_backend_final_write_processing): Likewise.
* elf64-x86-64.c (elf_backend_final_write_processing): Likewise.

* elf-nacl.c (segment_eligible_for_headers): Rename MAXPAGESIZE
parameter to MINPAGESIZE.
(nacl_modify_segment_map): Use minpagesize instead of maxpagesize.

* elf32-arm.c (ELF_MINPAGESIZE, ELF_COMMONPAGESIZE): Set to
0x10000 for NaCl targets.

ld/testsuite/
* ld-x86-64/ilp32-4-nacl.d: Loosen .shstrtab line regexp to match
any file offset.
* ld-x86-64/tlsbin-nacl.rd: Update expected code segment PT_LOAD.
* ld-x86-64/tlsbindesc-nacl.rd: Likewise.
* ld-scripts/rgn-at3.d: XFAIL for *-*-nacl* targets.
* ld-scripts/rgn-over8-ok.d: Likewise.

11 years ago PR symtab/15885
Doug Evans [Mon, 26 Aug 2013 18:43:40 +0000 (18:43 +0000)]
PR symtab/15885
* dwarf2read.c (dw2_dump): Print some minimal information indicating
.gdb_index is in use.
* symfile.c (reread_symbols): Reset objfile->sf.

testsuite/
* gdb.dwarf2/Makefile.in (EXECUTABLES): Add gdb-index.
(clean): rm -f *.gdb-index *.with-index.
* gdb.dwarf2/gdb-index.exp: New testcase.

11 years ago * NEWS: Document "mt print objfiles" now takes optional regexp.
Doug Evans [Mon, 26 Aug 2013 18:41:31 +0000 (18:41 +0000)]
* NEWS: Document "mt print objfiles" now takes optional regexp.
* symmisc.c (maintenance_print_objfiles): Argument is now an optional
regexp of objfiles to print.
(_initialize_symmisc): Update doc string for "mt print objfiles".

doc/
* gdb.texinfo (Maintenance Commands): "maint print objfiles" now takes
an optional regexp.

11 years ago * dwarf2read.c (write_psymtabs_to_index): Move error checks ahead of
Doug Evans [Mon, 26 Aug 2013 18:38:37 +0000 (18:38 +0000)]
* dwarf2read.c (write_psymtabs_to_index): Move error checks ahead of
missing debug info checks.

11 years ago * lib/gdb.exp (run_on_host): Moved here from gnu-debugdata.exp.
Doug Evans [Mon, 26 Aug 2013 18:30:02 +0000 (18:30 +0000)]
* lib/gdb.exp (run_on_host): Moved here from gnu-debugdata.exp.
* gdb.base/gnu-debugdata.exp (run): Moved to gdb.exp and renamed to
run_on_host.  All callers updated.

11 years ago2013-08-26 Raunaq Bathija <raunaq12@in.ibm.com>
Ulrich Weigand [Mon, 26 Aug 2013 15:28:28 +0000 (15:28 +0000)]
2013-08-26  Raunaq Bathija  <raunaq12@in.ibm.com>
    Ulrich Weigand  <uweigand@de.ibm.com>

* xcoffread.c (arrange_linetable): Add fix to correctly handle
line tables generated by XLC compiled binaries.

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

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

11 years ago * ld-elf/comm-data.exp: Use check_shared_lib_support rather than
Maciej W. Rozycki [Sat, 24 Aug 2013 22:37:18 +0000 (22:37 +0000)]
* ld-elf/comm-data.exp: Use check_shared_lib_support rather than
explicit patterns for test target qualification.  Define extra
tool flags for *-*-hpux* and tic6x-*-* targets.  Link with a
linker script.  Use alternative patterns for targets that do not
eliminate copy relocs, currently mn10300-*-* and vax-*-*.
* ld-elf/comm-data2.s: Handle HPUX's `.comm' syntax.
* ld-elf/comm-data2.ld: New test linker script.
* ld-elf/comm-data2.xd: Match section's VMA too.  Ignore ASCII
data dump.
* ld-elf/comm-data2r.rd: New test pattern.
* ld-elf/comm-data2r.sd: New test pattern.
* ld-elf/comm-data2r.xd: New test pattern.
* ld-mips-elf/comm-data.exp: Use check_shared_lib_support rather
than an explicit pattern for test target qualification.  Link
with a linker script.

11 years ago * ld-arm/export-class.exp: Handle non-EABI targets.
Maciej W. Rozycki [Sat, 24 Aug 2013 22:27:00 +0000 (22:27 +0000)]
* ld-arm/export-class.exp: Handle non-EABI targets.

11 years ago * elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
Maciej W. Rozycki [Sat, 24 Aug 2013 22:16:41 +0000 (22:16 +0000)]
* elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
set GOT's entry size if there is no ELF section data.
* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections):
Likewise.

11 years agogdb/testsuite/
Yao Qi [Sat, 24 Aug 2013 01:54:59 +0000 (01:54 +0000)]
gdb/testsuite/

* gdb.trace/entry-values.c (end): New
(main): Call end.
* gdb.trace/entry-values.exp: Load trace-support.exp.  Set
tracepoint and collect data.  Test entry value is unavailable.

11 years agogdb/testsuite/
Yao Qi [Sat, 24 Aug 2013 01:53:06 +0000 (01:53 +0000)]
gdb/testsuite/

* lib/dwarf.exp (_location): Handle DW_OP_deref_size.
* gdb.trace/entry-values.c: New.
* gdb.trace/entry-values.exp: New.

11 years ago * symmisc.c (dump_symtab): Delete prototype.
Doug Evans [Sat, 24 Aug 2013 00:29:13 +0000 (00:29 +0000)]
* symmisc.c (dump_symtab): Delete prototype.
(dump_msymbols, dump_objfile): Ditto.
(maintenance_info_symtabs): Mark as dont_repeat.
(_initialize_symmisc): Improve doc string for "mt info symtabs".

11 years ago * elfread.c (elf_symfile_read): Move "Done reading minimal symbols"
Doug Evans [Sat, 24 Aug 2013 00:12:25 +0000 (00:12 +0000)]
* elfread.c (elf_symfile_read): Move "Done reading minimal symbols"
debugging printf to better location.

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

11 years agold/testsuite/
Roland McGrath [Fri, 23 Aug 2013 23:13:46 +0000 (23:13 +0000)]
ld/testsuite/
* ld-x86-64/ilp32-4-nacl.d: Update for 2013-05-31 gas alignment change.
* ld/testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise.
* ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise.
* ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise.
* ld/testsuite/ld-x86-64/tlspic-nacl.rd: Likewise.

11 years agold/
Roland McGrath [Fri, 23 Aug 2013 22:38:42 +0000 (22:38 +0000)]
ld/
* emulparams/elf_nacl.sh (nacl_rodata_addr): Don't add in
SIZEOF_HEADERS here; elf.sc does it already.

11 years ago* config/rx-parse.y: Rearrange the components of a bison grammar to issue
DJ Delorie [Fri, 23 Aug 2013 21:29:27 +0000 (21:29 +0000)]
* config/rx-parse.y: Rearrange the components of a bison grammar to issue
assembler errors at correct position.

11 years agoAdd get_elf_x86_64_arch_data
H.J. Lu [Fri, 23 Aug 2013 19:29:13 +0000 (19:29 +0000)]
Add get_elf_x86_64_arch_data

* elf64-x86-64.c (get_elf_x86_64_arch_data): New.
(get_elf_x86_64_backend_data): Use it.
(elf_x86_64_size_dynamic_sections): Likewise.

11 years agoRemove the extra space
H.J. Lu [Fri, 23 Aug 2013 17:06:44 +0000 (17:06 +0000)]
Remove the extra space

* doc/binutils.texi: Remove the extra space.

11 years agoFix typo.
Nick Clifton [Fri, 23 Aug 2013 15:21:53 +0000 (15:21 +0000)]
Fix typo.

11 years ago PR binutils/15777
Nick Clifton [Fri, 23 Aug 2013 14:22:39 +0000 (14:22 +0000)]
PR binutils/15777
(nm --special-syms): Fix typo.

11 years ago PR binutils/15779
Nick Clifton [Fri, 23 Aug 2013 14:20:34 +0000 (14:20 +0000)]
PR binutils/15779
* doc/binutils.texi (ranlib -D): Correct description.

11 years ago opcodes/
Maciej W. Rozycki [Fri, 23 Aug 2013 14:12:59 +0000 (14:12 +0000)]
opcodes/
* micromips-opc.c (micromips_opcodes): Use RD_4 for "alnv.ps",
replacing NODS.

gas/testsuite/
* gas/testsuite/gas/mips/micromips-insn32.d: Adjust for delay
slot scheduling of ALNV.PS.
* gas/testsuite/gas/mips/micromips-noinsn32.d: Likewise.
* gas/testsuite/gas/mips/micromips-trap.d: Likewise.
* gas/testsuite/gas/mips/micromips.d: Likewise.
* gas/testsuite/gas/mips/micromips@alnv_ps-swap.d: Likewise.

11 years ago PR binutils/14136
Nick Clifton [Fri, 23 Aug 2013 14:12:39 +0000 (14:12 +0000)]
PR binutils/14136
(nm): Add description of 'I' symbol type.

11 years agotarget.c:target_read_live_memory: Fix type of local.
Pedro Alves [Fri, 23 Aug 2013 14:03:25 +0000 (14:03 +0000)]
target.c:target_read_live_memory: Fix type of local.

'ret' is used to hold the return of target_read, and pass it on.  Both
target_read and target_read_live_memory return LONGEST.

gdb/
2013-08-23  Pedro Alves  <palves@redhat.com>

* target.c (target_read_live_memory): Change type of 'ret' local
to LONGEST.

11 years ago PR binutils/15798
Nick Clifton [Fri, 23 Aug 2013 13:37:06 +0000 (13:37 +0000)]
PR binutils/15798
* doc/binutils.texi (ar cmdline): Update description of 'q'
command.

11 years agoremote.c: don't install a deprecated_xfer_memory hook.
Pedro Alves [Fri, 23 Aug 2013 13:12:17 +0000 (13:12 +0000)]
remote.c: don't install a deprecated_xfer_memory hook.

There's no need for deprecated_xfer_memory nowadays.  Memory access
goes through target_xfer_partial/TARGET_OBJECT_MEMORY, etc.  In fact,
the remote target already handles that, and is deferring to the same
helpers the deprecated_xfer_memory hook is.  Basically, only a few
adjustments to make these helper routines's interfaces closer to
target_xfer_partial's were necessary.

Tested on x86_64 Fedora 17 w/ gdbserver.

gdb/
2013-08-23  Pedro Alves  <palves@redhat.com>

* remote.c (remote_write_bytes_aux, remote_write_bytes)
(remote_read_bytes): Change return type to LONGEST, and adjust to
return a target_xfer_error on error.
(remote_xfer_memory): Delete.
(remote_flash_write): Change type of 'ret' local to LONGEST.
(remote_xfer_partial, remote_xfer_partial): Adjust.
(init_remote_ops): Don't install a deprecated_xfer_memory hook.

11 years ago PR binutils/15834
Nick Clifton [Fri, 23 Aug 2013 07:54:19 +0000 (07:54 +0000)]
PR binutils/15834
Fix typos:
---
 bfd/bfdio.c                                  |  2 +-
 bfd/elf32-spu.c                              |  2 +-
 bfd/elfnn-aarch64.c                          |  2 +-
 binutils/od-xcoff.c                          |  2 +-
 config/tcl.m4                                |  2 +-
 gas/config/tc-ia64.c                         |  2 +-
 gas/config/tc-sparc.c                        |  2 +-
 gas/config/tc-z80.c                          | 12 ++++++------
 gas/doc/c-i386.texi                          |  6 +++---
 gas/doc/c-m32r.texi                          |  2 +-
 gas/testsuite/gas/d10v/instruction_packing.d |  2 +-
 gas/testsuite/gas/z80/atend.d                |  2 +-
 gold/object.h                                |  2 +-
 include/gdb/remote-sim.h                     |  2 +-
 include/opcode/ChangeLog                     |  2 +-
 include/opcode/i960.h                        |  2 +-
 ld/testsuite/ld-mips-elf/mips16-pic-1.inc    |  2 +-
 opcodes/aarch64-asm.c                        |  2 +-
 opcodes/aarch64-dis.c                        |  2 +-
 opcodes/msp430-dis.c                         |  2 +-

11 years ago PR ld/15839
Nick Clifton [Fri, 23 Aug 2013 07:37:31 +0000 (07:37 +0000)]
PR ld/15839
* scripttempl/avr.sc: Do not include gc'able sections into general
sections during relocatable links.

11 years agogas/config/tc-arm.c: Improve validation of NEON addressing modes.
Will Newton [Fri, 23 Aug 2013 07:16:56 +0000 (07:16 +0000)]
gas/config/tc-arm.c: Improve validation of NEON addressing modes.

NEON vector load and store instructions do not accept immediates
or pre-indexed base plus offset addressing modes, so make sure that
the assembler enforces this.

gas/ChangeLog:

2013-08-23  Will Newton  <will.newton@linaro.org>

* config/tc-arm.c (do_neon_ldx_stx): Add extra constraints
for pre-indexed addressing modes.
* testsuite/gas/arm/neon-addressing-bad.l: Add test for
VLDn and VSTn instructions.
* testsuite/gas/arm/neon-addressing-bad.s: Likewise.

gas/testsuite/ChangeLog:

2013-08-23  Will Newton  <will.newton@linaro.org>

* testsuite/gas/arm/neon-addressing-bad.l: Add test for
VLDn and VSTn instructions.
* testsuite/gas/arm/neon-addressing-bad.s: Likewise.

11 years ago ARI fix: Push # directives to start of line.
Pierre Muller [Fri, 23 Aug 2013 06:51:18 +0000 (06:51 +0000)]
ARI fix: Push # directives to start of line.
* rs6000-nat.c (rs6000_ptrace32, rs6000_ptrace64): Rule applied.

11 years ago2013-08-12 Muhammad Waqas <mwaqas@codesourcery.com>
Muhammad Waqas [Fri, 23 Aug 2013 06:22:10 +0000 (06:22 +0000)]
2013-08-12  Muhammad Waqas  <mwaqas@codesourcery.com>

PR gdb/15501
* breakpoint.c (enable_command, disable_command): Iterate over
all specified breakpoint locations.
2013-07-12  Muhammad Waqas  <mwaqas@codesourccery.com>

PR gdb/15501
* gdb.base/ena-dis-br.exp: Add test to verify
  enable/disable commands work correctly with
multiple arguments that include multiple locations.

11 years ago * common/linux-ptrace.c (linux_fork_to_function): Push #
Luis Machado [Fri, 23 Aug 2013 02:34:34 +0000 (02:34 +0000)]
* common/linux-ptrace.c (linux_fork_to_function): Push #
directives to the start of the line.
(linux_check_ptrace_features): Fix warning message to use
the "_" markup.

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

11 years ago Unify ptrace options discovery code and make both GDB and
Luis Machado [Thu, 22 Aug 2013 23:46:30 +0000 (23:46 +0000)]
Unify ptrace options discovery code and make both GDB and
gdbserver use it.

gdb/
* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-nat.h and
nat/linux-waitpid.h.
(linux-waitpid.o): New object file rule.
* common/linux-ptrace.c: Include nat/linux-waitpid.h.
(current_ptrace_options): Moved from linux-nat.c.
(linux_ptrace_test_ret_to_nx): Use type casts for ptrace
parameters.
(linux_fork_to_function): New function.
(linux_grandchild_function): Likewise.
(linux_child_function): Likewise.
(linux_check_ptrace_features): New function, heavily
based on linux-nat.c:linux_test_for_tracefork.
(linux_enable_event_reporting): New function.
(ptrace_supports_feature): Likewise.
(linux_supports_tracefork): Likewise.
(linux_supports_traceclone): Likewise.
(linux_supports_tracevforkdone): Likewise.
(linux_supports_tracesysgood): Likewise.
* common/linux-ptrace.h (HAS_NOMMU): Moved from
gdbserver/linux-low.c.
(linux_enable_event_reporting): New declaration.
(linux_supports_tracefork): Likewise.
(linux_supports_traceclone): Likewise.
(linux_supports_tracevforkdone): Likewise.
(linux_supports_tracesysgood): Likewise.
* config.in (PTRACE_TYPE_ARG4): Regenerate.
* config/aarch64/linux.mh (NATDEPFILES): Add linux-waitpid.o.
* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
* config/arm/linux.mh (NATDEPFILES): Likewise.
* config/i386/linux.mh (NATDEPFILES): Likewise.
* config/i386/linux64.mh (NATDEPFILES): Likewise.
* config/ia64/linux.mh (NATDEPFILES): Likewise.
* config/m32r/linux.mh (NATDEPFILES): Likewise.
* config/m68k/linux.mh (NATDEPFILES): Likewise.
* config/mips/linux.mh (NATDEPFILES): Likewise.
* config/pa/linux.mh (NATDEPFILES): Likewise..
* config/powerpc/linux.mh (NATDEPFILES): Likewise..
* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
* config/sparc/linux.mh (NATDEPFILES): Likewise.
* config/sparc/linux64.mh (NATDEPFILES): Likewise.
* config/tilegx/linux.mh (NATDEPFILES): Likewise.
* config/xtensa/linux.mh (NATDEPFILES): Likewise.
* configure.ac (AC_CACHE_CHECK): Add void * to the list of
ptrace's 4th argument's types.
Check the type of PTRACE_TYPE_ARG4.
* configure: Regenerate.
* linux-nat.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
(SYSCALL_SIGTRAP): Moved to nat/linux-nat.h.
(linux_supports_tracefork_flag): Remove.
(linux_supports_tracesysgood_flag): Likewise.
(linux_supports_tracevforkdone_flag): Likewise.
(current_ptrace_options): Moved to
common/linux-ptrace.c.
(linux_tracefork_child): Remove.
(my_waitpid): Remove.
(linux_test_for_tracefork): Renamed to
linux_check_ptrace_features and moved to common/linux-ptrace.c.
(linux_test_for_tracesysgood): Remove.
(linux_supports_tracesysgood): Remove.
(linux_supports_tracefork): Remove.
(linux_supports_tracevforkdone): Remove.
(linux_enable_tracesysgood): Remove.
(linux_enable_event_reporting): Remove.
(linux_init_ptrace): New function.
(linux_child_post_attach): Call linux_init_ptrace.
(linux_child_post_startup_inferior): Call linux_init_ptrace.
(linux_child_follow_fork): Call linux_supports_tracefork
and linux_supports_tracevforkdone.
(linux_child_insert_fork_catchpoint): Call
linux_supports_tracefork.
(linux_child_insert_vfork_catchpoint): Likewise.
(linux_child_set_syscall_catchpoint): Call
linux_supports_tracesysgood.
(lin_lwp_attach_lwp): Call linux_supports_tracefork.
* nat/linux-nat.h: New file.
* nat/linux-waitpid.c: New file.
* nat/linux-waitpid.h: New file.

gdb/gdbserver/
* Makefile.in: Explain why ../target and ../nat are not
listed as include file search paths.
(linux-waitpid.o): New object file rule.
* configure.srv (srv_native_linux_obj): New variable.
Replace all occurrences of linux native object files with
$srv_native_linux_obj.
* linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
(HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
(linux_enable_event_reporting): Remove declaration.
(my_waitpid): Moved to common/linux-waitpid.c.
(linux_wait_for_event): Pass ptid when calling
linux_enable_event_reporting.
(linux_supports_tracefork_flag): Remove.
(linux_enable_event_reporting): Likewise.
(linux_tracefork_grandchild): Remove.
(STACK_SIZE): Moved to common/linux-ptrace.c.
(linux_tracefork_child): Remove.
(linux_test_for_tracefork): Remove.
(linux_look_up_symbols): Call linux_supports_traceclone.
(initialize_low): Remove call to linux_test_for_tracefork.
* linux-low.h (PTRACE_TYPE_ARG3): Move to
common/linux-ptrace.h.
(PTRACE_TYPE_ARG4): Likewise.
Include linux-ptrace.h.

11 years agoAdding missing files from my last commit.
Sergio Durigan Junior [Thu, 22 Aug 2013 22:06:11 +0000 (22:06 +0000)]
Adding missing files from my last commit.

11 years ago[Committing the `catch syscall' patch for ARM, from Samuel Bronson.]
Sergio Durigan Junior [Thu, 22 Aug 2013 20:32:54 +0000 (20:32 +0000)]
[Committing the `catch syscall' patch for ARM, from Samuel Bronson.]

This time, it passes all the tests and comes with a nearly complete
XML file (plus a script that can nearly regenerate the XML file).

(I elected to leave out __ARM_NR_cmpxchg, since it has dire warnings
to the effect that the only pieces of code that should be aware of it
are the implementation and the __kuser_cmpxchg code in entry-armv.S.)

gdb/
2013-08-14  Samuel Bronson  <naesten@gmail.com>

ARM Linux support for `catch syscall'.
* syscalls/arm-linux.py: New file.
* syscalls/arm-linux.xml: Likewise.
* arm-linux-tdep.c (arm_linux_get_syscall_number): New function.
(arm_linux_init_abi): Register the new function and syscall xml file.
* data-directory/Makefile.in: Install the new syscall xml file.
* NEWS: Brag about this.

gdb/testsuite/
2013-08-14  Samuel Bronson  <naesten@gmail.com>

ARM Linux support for `catch syscall'.
* gdb.base/catch-syscall.exp: Test this on ARM now.
(fill_all_syscalls_numbers): ARM has close/chroot on 6/61, too.

11 years ago * emultempl/pe.em: Add --disable-large-address-aware option.
Nick Clifton [Thu, 22 Aug 2013 15:28:42 +0000 (15:28 +0000)]
* emultempl/pe.em: Add --disable-large-address-aware option.
* ld.texinfo (--disable-large-address-aware): Add documentation.

11 years agofix dwz.exp on 32-bit targets
Tom Tromey [Thu, 22 Aug 2013 14:01:04 +0000 (14:01 +0000)]
fix dwz.exp on 32-bit targets

This fixes dwz.exp on 32-bit targets.  It does so by introducing a new
"default" setting for the address size in the DWARF assembler.

Built and regtested on x86-64 Fedora 18.
I also ran the gdb.dwarf2 tests on an x86 machine (gcc45).

* lib/dwarf.exp (cu, tu): Handle addr_size of "default".  Change
default addr_size.
* lib/gdb.exp (is_64_target): New gdb_caching_proc.

11 years agoconvert one more caching proc
Tom Tromey [Thu, 22 Aug 2013 13:59:55 +0000 (13:59 +0000)]
convert one more caching proc

I noticed that skip_btrace_tests is a classic "caching proc" that I
missed when I added gdb_caching_proc.  This patch converts it.

Built and regtested on x86-64 Fedora 18.

* lib/gdb.exp (skip_btrace_tests): Use gdb_caching_proc and
standard_temp_file.

11 years agofix gdb.arch to be parallel-safe
Tom Tromey [Thu, 22 Aug 2013 13:54:15 +0000 (13:54 +0000)]
fix gdb.arch to be parallel-safe

This fixes parts of gdb.arch to be parallel-safe.
I only changed the bits I could test on this machine.

I don't have access to many of the machines needed to fully switch
gdb.arch; but I am happy to provide advice to others attempting this.
Or, I can send an untested patch to convert it all.

Tested on x86-64 Fedora 18.

* gdb.arch/amd64-byte.exp: Use standard_testfile,
clean_restart.
* gdb.arch/amd64-disp-step.exp: Use standard_testfile.
* gdb.arch/amd64-dword.exp: Use standard_testfile,
clean_restart.
* gdb.arch/amd64-entry-value-param.exp: Use standard_testfile.
* gdb.arch/amd64-entry-value.exp: Use standard_testfile.
* gdb.arch/amd64-prologue-xmm.exp: Use standard_testfile.
* gdb.arch/amd64-word.exp: Use standard_testfile,
clean_restart.
* gdb.arch/i386-avx.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-byte.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-disp-step.exp: Use standard_testfile.
* gdb.arch/i386-dr3-watch.exp: Use standard_testfile.
* gdb.arch/i386-permbkpt.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-signal.exp: Use standard_testfile.
* gdb.arch/i386-size-overlap.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-sse.exp: Use standard_testfile, clean_restart.
* gdb.arch/i386-unwind.exp: Use standard_testfile.
* gdb.arch/i386-word.exp: Use standard_testfile, clean_restart.

11 years agofix gdb.python to be parallel-safe
Tom Tromey [Thu, 22 Aug 2013 13:51:08 +0000 (13:51 +0000)]
fix gdb.python to be parallel-safe

This fixes gdb.python to be parallel-safe, mostly by changing it to
use gdb_remote_download.

Tested on x86-64 Fedora 18.

* gdb.python/py-error.exp: Use gdb_remote_download.
* gdb.python/py-mi.exp: Use gdb_remote_download.
* gdb.python/py-objfile-script.exp: Use standard_output_file.
* gdb.python/py-prettyprint.exp: Use gdb_remote_download.
(run_lang_tests): Likewise.
* gdb.python/py-section-script.c: Use SCRIPT_FILE rather than
filename.
* gdb.python/py-section-script.exp: Set SCRIPT_FILE when
compiling.  Use gdb_remote_download.  Update some tests.
* gdb.python/py-strfns.exp (test_strfns_core_file): Use
standard_output_file.
* gdb.python/py-typeprint.exp: Use gdb_remote_download.
* gdb.python/py-frame-args.exp: Use gdb_remote_download.
* gdb.python/py-framefilter-mi.exp: Use gdb_remote_download.
* gdb.python/py-framefilter.exp: Use gdb_remote_download,
standard_output_file.

11 years agouse standard_temp_file in another caching proc
Tom Tromey [Thu, 22 Aug 2013 13:46:21 +0000 (13:46 +0000)]
use standard_temp_file in another caching proc

In an earlier patch I forgot to change the caching proc in cell.exp to
use standard_temp_file.  This fixes the oversight.

Tested on x86-64 Fedora 18.

       * lib/cell.exp (skip_cell_tests): Use standard_temp_file.

11 years agointroduce gdb_remote_download and finish parallel fixes in gdb.dwarf2
Tom Tromey [Thu, 22 Aug 2013 13:44:16 +0000 (13:44 +0000)]
introduce gdb_remote_download and finish parallel fixes in gdb.dwarf2

This finishes making gdb.dwarf2 parallel-safe.

To do this, this patch introduces a new gdb_remote_download proc, that
works somewhat differently in the one specific case where it matters:
for a copy to "host", if no destination was given, and the host is not
actually remote, then standard_output_file is used.  In parallel mode
this guarantees that the resulting file will end up in a parallel-safe
location.

Tested on x86-64 Fedora 18.

* gdb.dwarf2/dw2-basic.exp: Use gdb_remote_download.
* gdb.dwarf2/dw2-compressed.exp: Use gdb_remote_download.
* gdb.dwarf2/dw2-intercu.exp: Use gdb_remote_download.
* gdb.dwarf2/dw2-intermix.exp: Use gdb_remote_download.
* gdb.dwarf2/dw2-producer.exp: Use gdb_remote_download.
* gdb.dwarf2/mac-fileno.exp: Use gdb_remote_download.
* lib/gdb.exp (gdb_remote_download): New proc.

11 years agofix some gdb.dwarf2 tests for parallel safety
Tom Tromey [Thu, 22 Aug 2013 13:39:13 +0000 (13:39 +0000)]
fix some gdb.dwarf2 tests for parallel safety

This fixes a few gdb.dwarf2 tests to be more parallel-safe.  This
mostly amounts to changing them to write their files into the
directory designated by standard_output_file.

Built and regtested on x86-64 Fedora 18.

* gdb.dwarf2/clztest.exp: Use standard_testfile.
* gdb.dwarf2/dw2-minsym-in-cu.exp: Use standard_testfile.
* gdb.dwarf2/fission-base.S: Remove directory from
DW_AT_GNU_dwo_name.
* gdb.dwarf2/fission-base.exp: Use build_executable.  Set
debug-file-directory.
* gdb.dwarf2/fission-reread.S: Remove directory from
DW_AT_GNU_dwo_name.
* gdb.dwarf2/fission-reread.exp: Use build_executable.  Set
debug-file-directory.

11 years ago * binutils-all/nm.exp: --size-sort test: Add more ELF-like
Nick Clifton [Thu, 22 Aug 2013 11:29:43 +0000 (11:29 +0000)]
* binutils-all/nm.exp: --size-sort test: Add more ELF-like
targets.
* binutils-all/nm-1.s: Use .byte instead of .long.
Provide a terminating symbol.

11 years agoPR gdb/15871: Unavailable entry value is not shown correctly
Pedro Alves [Thu, 22 Aug 2013 10:00:05 +0000 (10:00 +0000)]
PR gdb/15871: Unavailable entry value is not shown correctly

In entry-values.exp, we have a test where the entry value of 'j' is
unavailable, so it is expected that printing j@entry yields
"<unavailable>".  However, the actual output is:

 (gdb) frame
 #0  0x0000000000400540 in foo (i=0, i@entry=2, j=2, j@entry=<error reading variable: Cannot access memory at address 0x6009e8>)

The error is thrown here:

#0  throw_it (reason=RETURN_ERROR, error=MEMORY_ERROR, fmt=0x8cd550 "Cannot access memory at address %s", ap=0x7fffffffc8e8) at ../../src/gdb/exceptions.c:373
#1  0x00000000005e2f9c in throw_error (error=MEMORY_ERROR, fmt=0x8cd550 "Cannot access memory at address %s") at ../../src/gdb/exceptions.c:422
#2  0x0000000000673a5f in memory_error (status=5, memaddr=6293992) at ../../src/gdb/corefile.c:204
#3  0x0000000000673aea in read_memory (memaddr=6293992, myaddr=0x7fffffffca60 "\200\316\377\377\377\177", len=4) at ../../src/gdb/corefile.c:223
#4  0x00000000006784d1 in dwarf_expr_read_mem (baton=0x7fffffffcd50, buf=0x7fffffffca60 "\200\316\377\377\377\177", addr=6293992, len=4) at ../../src/gdb/dwarf2loc.c:334
#5  0x000000000067645e in execute_stack_op (ctx=0x1409480, op_ptr=0x7fffffffce87 "\237<\005@", op_end=0x7fffffffce88 "<\005@") at ../../src/gdb/dwarf2expr.c:1045
#6  0x0000000000674e29 in dwarf_expr_eval (ctx=0x1409480, addr=0x7fffffffce80 "\003\350\t`", len=8) at ../../src/gdb/dwarf2expr.c:364
#7  0x000000000067c5b2 in dwarf2_evaluate_loc_desc_full (type=0x10876d0, frame=0xd8ecc0, data=0x7fffffffce80 "\003\350\t`", size=8, per_cu=0xf24c40, byte_offset=0)
    at ../../src/gdb/dwarf2loc.c:2236
#8  0x000000000067cc65 in dwarf2_evaluate_loc_desc (type=0x10876d0, frame=0xd8ecc0, data=0x7fffffffce80 "\003\350\t`", size=8, per_cu=0xf24c40)
    at ../../src/gdb/dwarf2loc.c:2407
#9  0x000000000067a5d4 in dwarf_entry_parameter_to_value (parameter=0x13a7960, deref_size=18446744073709551615, type=0x10876d0, caller_frame=0xd8ecc0, per_cu=0xf24c40)
    at ../../src/gdb/dwarf2loc.c:1160
#10 0x000000000067a962 in value_of_dwarf_reg_entry (type=0x10876d0, frame=0xd8de70, kind=CALL_SITE_PARAMETER_DWARF_REG, kind_u=...) at ../../src/gdb/dwarf2loc.c:1310
#11 0x000000000067aaca in value_of_dwarf_block_entry (type=0x10876d0, frame=0xd8de70, block=0xf1c2d4 "Q", block_len=1) at ../../src/gdb/dwarf2loc.c:1363
#12 0x000000000067e7c9 in locexpr_read_variable_at_entry (symbol=0x13a7540, frame=0xd8de70) at ../../src/gdb/dwarf2loc.c:3326
#13 0x00000000005daab6 in read_frame_arg (sym=0x13a7540, frame=0xd8de70, argp=0x7fffffffd0e0, entryargp=0x7fffffffd100) at ../../src/gdb/stack.c:362
#14 0x00000000005db384 in print_frame_args (func=0x13a7470, frame=0xd8de70, num=-1, stream=0xea3890) at ../../src/gdb/stack.c:669
#15 0x00000000005dc338 in print_frame (frame=0xd8de70, print_level=1, print_what=SRC_AND_LOC, print_args=1, sal=...) at ../../src/gdb/stack.c:1199
#16 0x00000000005db8ee in print_frame_info (frame=0xd8de70, print_level=1, print_what=SRC_AND_LOC, print_args=1) at ../../src/gdb/stack.c:851
#17 0x00000000005da2bb in print_stack_frame (frame=0xd8de70, print_level=1, print_what=SRC_AND_LOC) at ../../src/gdb/stack.c:169
#18 0x00000000005de236 in frame_command (level_exp=0x0, from_tty=1) at ../../src/gdb/stack.c:2265

dwarf2_evaluate_loc_desc_full (frame #7) knows to handle
NOT_AVAILABLE_ERROR errors, but read_memory always throws
a generic error.

Presently, only the value machinery knows to handle unavailable
memory.  We need to push the awareness down to the target_xfer layer,
making it return a finer grained error indication.  We can only return
a generic -1 nowadays, which leaves the upper layers with no clue on
why the xfer failed.  Use target_xfer_partial directly, rather than
propagating the error through target_read_memory so as to get a better
address to display in the error message.

(target_read_memory & friends build on top of target_read (thus the
target_xfer machinery), but turn all errors to EIO, an errno value.  I
think this is a mistake, and we'd better convert all these to return a
target_xfer_error too, but that can be done separately.  I looked
around a bit over memory_error calls, and the need to handle random
errno values, other than the EIOs gdb itself hardcodes, probably comes
(only) from deprecated_xfer_memory, which uses errno for error
indication, but I didn't look exhaustively.  We should really get rid
of deprecated_xfer_memory and of passing down errno values as error
indication in target_read & friends methods).

Tested on x86_64 Fedora 17, native and gdbserver.  Fixes the test in
the PR, which will be added to the testsuite later.

gdb/
2013-08-22  Pedro Alves  <palves@redhat.com>

PR gdb/15871
* corefile.c (target_xfer_memory_error): New function.
(memory_error): Defer EIO to target_memory_error.
(read_memory): Use target_xfer_partial, and handle finer-grained
target xfer errors.
* target.c (target_xfer_error_to_string): New function.
(memory_xfer_partial_1): If memory is known to be
unavailable, return TARGET_XFER_E_UNAVAILABLE instead of -1.
(target_xfer_partial): Make extern.
* target.h (enum target_xfer_error): New enum.
(target_xfer_error_to_string): Declare function.
(target_xfer_partial): Declare function.
(struct target_ops) <xfer_partial>: Adjust describing comment.

11 years ago * ld-powerpc/powerpc.exp: Substitute for le in options_regsub(ld).
Alan Modra [Thu, 22 Aug 2013 07:34:28 +0000 (07:34 +0000)]
* ld-powerpc/powerpc.exp: Substitute for le in options_regsub(ld).
Correct ppc64elftests option replacement.
(supports_ppc64): Match elf64lppc too.
* ld-powerpc/relbrlt.d: Update for little-endian.
* ld-powerpc/symtocbase.d: Likewise.
* ld-powerpc/tls.t: Likewise.
* ld-powerpc/tlsexetoc.g: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlstoc.t: Likewise.
* ld-powerpc/tlstocso.d: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-powerpc/tlstocso.t: Likewise.
* ld-powerpc/tocopt.d: Likewise.
* ld-powerpc/tocopt2.d: Likewise.
* ld-powerpc/tocopt3.d: Likewise.
* ld-powerpc/tocopt4.d: Likewise.
* ld-powerpc/tocopt5.d: Likewise.

11 years ago * configure.host: Support powerpc64le-linux and powerpcle-linux hosts.
Alan Modra [Thu, 22 Aug 2013 01:01:32 +0000 (01:01 +0000)]
* configure.host: Support powerpc64le-linux and powerpcle-linux hosts.
* configure.tgt: Likewise as targets.

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

11 years agoRenegerate gdbserver/config.in.
Pedro Alves [Wed, 21 Aug 2013 21:32:42 +0000 (21:32 +0000)]
Renegerate gdbserver/config.in.

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

        * Makefile.in (config.status): Depend on development.sh.
        * acinclude.m4: Include libmcheck.m4.
        * configure: Regenerate.

I missed regenerating config.in...

Tested on x86_64 Fedora 17.

gdb/gdbserver/
2013-08-21  Pedro Alves  <palves@redhat.com>

* config.in: Renegerate.

11 years agoFix whitespace.
Pedro Alves [Wed, 21 Aug 2013 21:31:45 +0000 (21:31 +0000)]
Fix whitespace.

11 years ago2013-08-21 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Wed, 21 Aug 2013 08:15:23 +0000 (08:15 +0000)]
2013-08-21  Tristan Gingold  <gingold@adacore.com>

* coff-rs6000.c (_bfd_xcoff_sizeof_headers): Also count
.ovrflo sections.
* coffcode.h (coff_compute_section_file_positions): Force
match between file offset and vma offset.

11 years agoFix typo
Nick Clifton [Wed, 21 Aug 2013 07:28:37 +0000 (07:28 +0000)]
Fix typo

11 years ago * symbols.c (fb_label_instance_inc, fb_label_instance): Properly
Alan Modra [Wed, 21 Aug 2013 05:55:13 +0000 (05:55 +0000)]
* symbols.c (fb_label_instance_inc, fb_label_instance): Properly
range check label number for use with fb_low_counter array.

11 years ago * elflink.c (_bfd_elf_merge_symbol): Set *poldbfd, *poldweak,
Alan Modra [Wed, 21 Aug 2013 04:09:30 +0000 (04:09 +0000)]
* elflink.c (_bfd_elf_merge_symbol): Set *poldbfd, *poldweak,
and *poldalignment before exiting when !relocs_compatible.

11 years ago * elflink.c (_bfd_elf_define_linkage_sym): Don't set STV_INTERNAL
Alan Modra [Wed, 21 Aug 2013 03:45:44 +0000 (03:45 +0000)]
* elflink.c (_bfd_elf_define_linkage_sym): Don't set STV_INTERNAL
symbols to STV_HIDDEN.

11 years agodaily update
Alan Modra [Wed, 21 Aug 2013 00:00:05 +0000 (00:00 +0000)]
daily update

11 years ago * binutils-all/nm.exp: Revert last change. Instead use nm-elf-1.s
Hans-Peter Nilsson [Tue, 20 Aug 2013 22:50:11 +0000 (22:50 +0000)]
* binutils-all/nm.exp: Revert last change.  Instead use nm-elf-1.s
for mmix-knuth-mmixware.

11 years ago * buildsym.c (subfile_stack): Move here from buildsym.h.
Doug Evans [Tue, 20 Aug 2013 18:57:00 +0000 (18:57 +0000)]
* buildsym.c (subfile_stack): Move here from buildsym.h.
(pending_macros): Ditto.
(get_macro_table): New function.
(buildsym_init): Initialize subfile_stack.
* coffread.c (type_vector,type_vector_length): Moved here from
buildsym.h.
(INITIAL_TYPE_VECTOR_LENGTH): Ditto.
(coff_symtab_read): Use it.
* dbxread.c (read_ofile_symtab): Delete init of subfile_stack.
* dwarf2read.c (macro_start_file): Replace uses of pending_macros
with call to get_macro_table.
* stabsread.c (type_vector,type_vector_length): Moved here from
buildsym.h.
(INITIAL_TYPE_VECTOR_LENGTH): Ditto.
* buildsym.h (get_macro_table): Declare.

11 years ago * dbxread.c (record_minimal_symbol): Make 'name' argument const.
Tom Tromey [Tue, 20 Aug 2013 18:25:12 +0000 (18:25 +0000)]
* dbxread.c (record_minimal_symbol): Make 'name' argument const.
Update.
(read_dbx_dynamic_symtab): Make 'name' const.  Remove casts.

11 years ago * blockframe.c: Remove #include "psymtab.h".
Doug Evans [Tue, 20 Aug 2013 16:30:20 +0000 (16:30 +0000)]
* blockframe.c: Remove #include "psymtab.h".
* cp-support.c: Ditto.
* source.c: Ditto.
* stack.c: Ditto.

11 years agofix PR python/15816
Tom Tromey [Tue, 20 Aug 2013 15:12:53 +0000 (15:12 +0000)]
fix PR python/15816

This fixes PR python/15816.

The bug here is that python-selftest.exp can fail:

    No symbol "RETURN_MASK_ALL" in current context.

RETURN_MASK_ALL is a macro, so if macros do not end up in the
debuginfo (very typical) then the test fails.

It seemed simplest to me to simply turn the RETURN_MASK_ defines into
enum constants.  This way they end up in the debuginfo and all is
well.

PR python/15816:
* exceptions.h (return_mask): Now an enum.
(RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL): Now
enum constants.

Built and regtested on x86-64 Fedora 18.

11 years agomove gdbarch object from objfile to per-BFD
Tom Tromey [Tue, 20 Aug 2013 15:04:51 +0000 (15:04 +0000)]
move gdbarch object from objfile to per-BFD

This moves the "gdbarch" field from the objfile into the BFD.

This field's value is derived from the BFD and is immutable over the
lifetime of the BFD.  This makes it a reasonable candidate for pushing
into the per-BFD object.

This is part of the long-term objfile splitting project.  In the long
run I think this patch will make it simpler to moves types from the
objfile to the per-BFD object; but the patch makes sense as a minor
cleanup by itself.

Built and regtested on x86-64 Fedora 18.

* cp-namespace.c (cp_lookup_symbol_imports_or_template): Use
get_objfile_arch.
* elfread.c (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
(elf_gnu_ifunc_resolve_by_got): Use get_objfile_arch.
* jit.c (jit_object_close_impl): Update.
* jv-lang.c (get_dynamics_objfile): Update.
* linespec.c (add_minsym): Use get_dynamics_objfile.
* objfiles.c (get_objfile_bfd_data): Initialize 'gdbarch' field.
(allocate_objfile): Don't initialize 'gdbarch' field.
(get_objfile_arch): Update.
* objfiles.h (struct objfile_per_bfd_storage) <gdbarch>: New field,
moved from...
(struct objfile) <gdbarch>: ... here.  Remove.
* stap-probe.c (stap_can_evaluate_probe_arguments): Use
get_objfile_arch.
* symfile.c (init_entry_point_info): Use get_objfile_arch.

11 years ago * doublest.c (convert_floatformat_to_doublest): Use fmt->split_half
Alan Modra [Tue, 20 Aug 2013 06:42:19 +0000 (06:42 +0000)]
* doublest.c (convert_floatformat_to_doublest): Use fmt->split_half
for IBM long double nan and inf.
(floatformat_is_negative, floatformat_classify,
floatformat_mantissa): Similarly.
(floatformat_ieee_single, floatformat_ieee_double,
floatformat_ieee_quad, floatformat_arm_ext,
floatformat_ia64_spill): Delete unused vars.
(_initialize_doublest): Delete unused function.
* gdbtypes.c (floatformats_ibm_long_double): Use new big- and
little-endian variants of floatformat_ibm_long_double.

11 years agomerge from gcc
DJ Delorie [Tue, 20 Aug 2013 06:02:53 +0000 (06:02 +0000)]
merge from gcc

11 years ago * binutils-all/nm.exp: Xfail test for nm --size-sort for
Hans-Peter Nilsson [Tue, 20 Aug 2013 01:29:44 +0000 (01:29 +0000)]
* binutils-all/nm.exp: Xfail test for nm --size-sort for
mmix-knuth-mmixware.

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

11 years agogas/
Richard Sandiford [Mon, 19 Aug 2013 20:07:10 +0000 (20:07 +0000)]
gas/
* config/tc-mips.c (mips_check_isa_supports_ase, reg_lookup)
(mips_parse_argument_token, validate_micromips_insn, md_begin)
(check_regno, match_float_constant, check_completed_insn, append_insn)
(match_insn, match_mips16_insn, match_insns, macro_start)
(macro_build_ldst_constoffset, load_register, macro, mips_ip)
(mips16_ip, mips_set_option_string, md_parse_option)
(mips_after_parse_args, mips_after_parse_args, md_pcrel_from)
(md_apply_fix, s_align, s_option, s_mipsset, s_tls_rel_directive)
(s_gpword, s_gpdword, s_ehword, s_nan, tc_gen_reloc, md_convert_frag)
(s_mips_end, s_mips_ent, s_mips_frame, s_mips_mask, mips_parse_cpu):
Start error messages with a lower-case letter.  Do not end error
messages with a period.  Wrap long messages to 80 character-lines.
Use "cannot" instead of "can't" and "can not".

gas/testsuite/
* gas/mips/ase-errors-1.l, gas/mips/ase-errors-2.l,
gas/mips/ase-errors-3.l, gas/mips/ase-errors-4.l, gas/mips/at-2.l,
gas/mips/baddata1.l, gas/mips/elf-rel30.l, gas/mips/illegal.l,
gas/mips/jalr.l, gas/mips/ldstla-32-1.l, gas/mips/ldstla-32-mips3-1.l,
gas/mips/lui-1.l, gas/mips/macro-warn-1.l, gas/mips/macro-warn-1-n32.l,
gas/mips/macro-warn-2.l, gas/mips/macro-warn-3.l,
gas/mips/macro-warn-4.l, gas/mips/micromips-branch-delay.l,
gas/mips/micromips-branch-relax.l,
gas/mips/micromips-branch-relax-pic.l, gas/mips/micromips-ill.l,
gas/mips/micromips.l, gas/mips/micromips-size-0.l,
gas/mips/micromips-size-1.l, gas/mips/micromips-warn-branch-delay.l,
gas/mips/micromips-warn.l, gas/mips/mips16e-64.l,
gas/mips/mips16e-save-err.l, gas/mips/mips1-fp.l,
gas/mips/mips32r2-fp32.l, gas/mips/mips32r2-ill.l,
gas/mips/mips32-sf32.l, gas/mips/mips4-branch-likely.l,
gas/mips/mips4-fp.l, gas/mips/mips5-fp.l, gas/mips/mips64-mips3d.l,
gas/mips/mips-double-float-flag.l, gas/mips/mips-gp64-fp32.l,
gas/mips/mips-gp64-fp64.l, gas/mips/mips-hard-float-flag.l,
gas/mips/mips-macro-ill-nofp.l, gas/mips/mips-macro-ill-sfp.l,
gas/mips/nan-error-1.l, gas/mips/nan-error-2.l, gas/mips/noat-2.l,
gas/mips/noat-3.l, gas/mips/noat-4.l, gas/mips/noat-5.l,
gas/mips/noat-6.l, gas/mips/noat-7.l, gas/mips/octeon-ill.l,
gas/mips/r5900-error-vu0.l, gas/mips/r5900-nollsc.l,
gas/mips/relax-bc1any.l, gas/mips/relax-bposge.l, gas/mips/relax.l,
gas/mips/relax-swap1.l, gas/mips/relax-swap2.l, gas/mips/set-arch.l,
gas/mips/tls-ill.l, gas/mips/vr5400-ill.l: Adjust expected output.

11 years agogas/
Richard Sandiford [Mon, 19 Aug 2013 19:58:47 +0000 (19:58 +0000)]
gas/
* config/tc-mips.c (imm_expr): Expand comment.
(set_at, macro, mips16_macro): Expect imm_expr to be O_constant
when populated.

11 years agoinclude/opcode/
Richard Sandiford [Mon, 19 Aug 2013 19:56:44 +0000 (19:56 +0000)]
include/opcode/
* mips.h: Remove references to "+I" and imm2_expr.

gas/
* config/tc-mips.c (imm2_expr): Delete.
(md_assemble, match_insn, imm2_expr.X_op, mips_ip): Update accordingly.

11 years agoinclude/opcode/
Richard Sandiford [Mon, 19 Aug 2013 19:54:41 +0000 (19:54 +0000)]
include/opcode/
* mips.h (M_DEXT, M_DINS): Delete.

opcodes/
* micromips-opc.c (micromips_opcodes): Replace "dext" and "dins"
macro entries with "dextm", "dextu", "dinsm" and "dinsu" aliases.
Use +H rather than +C for the real "dext".
* mips-opc.c (mips_builtin_opcodes): Likewise.

gas/
* config/tc-mips.c (report_bad_range, report_bad_field): Delete.
(macro): Remove M_DEXT and M_DINS handling.

gas/testsuite/
* gas/mips/ext-ill.l, gas/mips/mips64r2-ill.l: Expect DEXT and DINS
error messages to have the same form as the EXT and INS ones.
* gas/mips/micromips-insn32.d, gas/mips/micromips-noinsn32.d,
gas/mips/micromips-trap.d, gas/mips/micromips.d,
gas/mips/micromips@mips64r2.d, gas/mips/mips64r2.d: Expect
"dext" and "dins" instead of "dextm", "dextu", "dinsm" and "dinsu".

11 years agogas/
Richard Sandiford [Mon, 19 Aug 2013 19:42:50 +0000 (19:42 +0000)]
gas/
* config/tc-mips.c (mips_arg_info): Replace allow_nonconst and
lax_max with lax_match.
(match_int_operand): Update accordingly.  Don't report an error
for !lax_match-only cases.
(match_insn): Replace more_alts with lax_match and use it to
initialize the mips_arg_info field.  Add a complete_p parameter.
Handle implicit VU0 suffixes here.
(match_invalid_for_isa, match_insns, match_mips16_insns): New
functions.
(mips_ip, mips16_ip): Use them.

11 years agogas/
Richard Sandiford [Mon, 19 Aug 2013 19:30:37 +0000 (19:30 +0000)]
gas/
* config/tc-mips.c (match_expression):  Report uses of registers here.
Add a "must be an immediate expression" error.  Handle elided offsets
here rather than...
(match_int_operand): ...here.

gas/testsuite/
* gas/mips/octeon-ill.l: Adjust expected output.
* gas/mips/lui-1.l, gas/mips/lui-1.s: Add more cases.

11 years agogas/
Richard Sandiford [Mon, 19 Aug 2013 19:26:11 +0000 (19:26 +0000)]
gas/
* config/tc-mips.c (mips_arg_info): Remove soft_match.
(match_out_of_range, match_not_constant): New functions.
(match_const_int): Remove fallback parameter and check for soft_match.
Use match_not_constant.
(match_mapped_int_operand, match_addiusp_operand)
(match_perf_reg_operand, match_save_restore_list_operand)
(match_mdmx_imm_reg_operand): Update accordingly.  Use
match_out_of_range and set_insn_error* instead of as_bad.
(match_int_operand): Likewise.  Use match_not_constant in the
!allows_nonconst case.
(match_float_constant): Report invalid float constants.
(match_insn, match_mips16_insn): Remove soft_match code.  Rely on
match_float_constant to check for invalid constants.  Fail the
match if match_const_int or match_float_constant return false.
(mips_ip): Update accordingly.
(mips16_ip): Likewise.  Undo null termination of instruction name
once lookup is complete.

gas/testsuite/
* gas/mips/ext-ill.l, gas/mips/lui-1.l, gas/mips/mips16e-64.l,
gas/mips/mips32r2-ill-fp64.l, gas/mips/mips32r2-ill-nofp.l,
gas/mips/mips32r2-ill.l, gas/mips/mips64r2-ill.l,
gas/mips/octeon-ill.l, gas/mips/r5900-error-vu0.l,
gas/mips/vr5400-ill.l: Adjust expected errors.
* gas/mips/micromips-size-0.l,
gas/mips/micromips-size-0.s: Likewise.  Add new tests.
* gas/mips/mips16e-save-err.s, gas/mips/mips16e-save-err.l: New test.
* gas/mips/mips.exp: Run it.

11 years agogas/
Richard Sandiford [Mon, 19 Aug 2013 19:09:01 +0000 (19:09 +0000)]
gas/
* config/tc-mips.c (mips_insn_error_format): New enum.
(mips_insn_error): New struct.
(insn_error): Change to a mips_insn_error.
(clear_insn_error, set_insn_error_format, set_insn_error)
(set_insn_error_i, set_insn_error_ss, report_insn_error): New
functions.
(mips_parse_argument_token, md_assemble, match_insn)
(match_mips16_insn): Use them instead of manipulating insn_error
directly.
(mips_ip, mips16_ip): Likewise.  Simplify control flow.

gas/testsuite/
* gas/mips/micromips-ill.l: Expect "floating-point expression required"

11 years agogas/
Richard Sandiford [Mon, 19 Aug 2013 19:00:32 +0000 (19:00 +0000)]
gas/
* config/tc-mips.c (normalize_constant_expr): Move further up file.
(normalize_address_expr): Likewise.
(match_insn, match_mips16_insn): New functions, split out from...
(mips_ip, mips16_ip): ...here.