• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/simark/ptid-in-fetch-store-regs
RSS
修訂. 時間 作者
a243d6a users/simark/ptid-in-fetch-store-regs 2017-03-08 06:47:46 Simon Marchi

Pass ptid to to_prepare_to_store

In the same vein as to_fetch_registers and to_store_registers, we can
update to_prepare_to_store to take the ptid of the thread whose register
we want to store as a parameter, rather than reading it from
inferior_ptid.

gdb/ChangeLog:

* target.h (struct target_ops) <to_prepare_to_store>: Add ptid_t
parameter.
(target_prepare_to_store): Likewise.
* target-delegates.c: Re-generate.
* inf-child.c (inf_child_prepare_to_store): Add ptid parameter.
* ppc-ravenscar-thread.c
(ppc_ravenscar_generic_prepare_to_store): Likewise.
* ravenscar-thread.c (ravenscar_prepare_to_store): Add ptid
parameter and use it instead of inferior_ptid.
* ravenscar-thread.h (struct ravenscar_arch_ops)
<to_prepare_to_store>: Add ptid parameter.
* record-btrace.c (record_btrace_prepare_to_store): Add ptid
parameter and use it instead of inferior_ptid.
* record-full.c (record_full_core_prepare_to_store): Add ptid
parameter.
* regcache.c (regcache_raw_write): Pass ptid to
target_prepare_to_store.
* remote-sim.c (gdbsim_prepare_to_store): Add ptid parameter.
* remote.c (remote_prepare_to_store): Add ptid parameter.
* sparc-ravenscar-thread.c (sparc_ravenscar_prepare_to_store):
Add ptid parameter.

0815e83 2017-03-08 06:47:33 Simon Marchi

Pass ptid to target_store_registers

This patch adds a ptid parameter to the target_store_registers function
and the to_store_registers method of target_ops. The implementations
are therefore expected to rely on this and not on inferior_ptid.

gdb/ChangeLog:

* target-delegates.c: Re-generate.
* target.h (struct target_ops) <to_store_registers>: Add ptid
parameter.
(target_store_registers): Likewise.
* target.c (target_store_registers): Likewise.
* aarch64-linux-nat.c (store_gregs_to_thread,
store_fpregs_to_thread, aarch64_linux_store_inferior_registers):
Add ptid parameter and use it.
* aix-thread.c (aix_thread_store_registers): Add ptid parameter
and use it.
* amd64-linux-nat.c (amd64_linux_store_inferior_registers): Add
ptid parameter and use it.
* arm-linux-nat.c (store_fpregs, store_regs, store_wmmx_regs,
store_vfp_regs, arm_linux_store_inferior_registers): Likewise.
* arm-nbsd-nat.c (store_register, store_fp_register,
armnbsd_store_registers): Likewise.
* bsd-uthread.c (bsd_uthread_store_registers): Likewise.
* hppa-linux-nat.c (store_register,
hppa_linux_store_inferior_registers): Likewise.
* i386-linux-nat.c (store_register,
i386_linux_store_inferior_registers): Likewise.
* ia64-linux-nat.c (ia64_linux_store_register,
ia64_linux_store_registers): Likewise.
* inf-child.c (inf_child_store_inferior_registers): Add ptid
parameter.
* inf-ptrace.c (inf_ptrace_store_register,
inf_ptrace_store_registers): Likewise.
* m68k-linux-nat.c (store_register,
old_store_inferior_registers,
m68k_linux_store_inferior_registers): Likewise.
* mips-linux-nat.c (super_store_registers,
mips64_linux_regsets_store_registers,
mips64_linux_store_registers): Likewise.
* ppc-linux-nat.c (ppc_linux_store_inferior_registers):
Likewise.
* ppc-nbsd-nat.c (ppcnbsd_store_inferior_registers): Likewise.
* ppc-obsd-nat.c (ppcobsd_store_registers): Likewise.
* ppc-ravenscar-thread.c (ppc_ravenscar_generic_store_registers):
Add ptid parameter and use it.
(ppc_ravenscar_powerpc_store_registers): Likewise.
(ppc_ravenscar_e500_store_registers): Likewise.
* proc-service.c (ps_lsetregs, ps_lsetfpregs): Add ptid parameter
and use it. Don't set/restore inferior_ptid.
* procfs.c (procfs_store_registers): Add ptid parameter and use
it.
* ravenscar-thread.c (ravenscar_store_registers): Add ptid
parameter and use it. Remove declaration at top of file.
* ravenscar-thread.h (struct ravenscar_arch_ops)
<to_store_registers>: Add ptid parameter.
* record-btrace.c (record_btrace_store_registers): Add ptid
parameter and use it.
* record-full.c (record_full_store_registers): Likewise.
(record_full_core_store_registers): Add ptid parameter.
* regcache.c (regcache_raw_write): Pass ptid to
target_store_registers.
* remote.c (remote_store_registers): Add ptid parameter and use
it.
* remote-sim.c (gdbsim_store_register): Likewise.
* rs6000-aix-tdep.c (rs6000_push_dummy_call): Pass inferior_ptid
to target_store_registers.
* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call):
Likewise.
* rs6000-nat.c (store_register,
rs6000_store_inferior_registers): Add ptid parameter and use it.
* s390-linux-nat.c (s390_linux_store_inferior_registers):
Likewise.
* sh-nbsd-nat.c (shnbsd_store_inferior_registers): Likewise.
* sol-thread.c (sol_thread_store_registers): Likewise.
* sparc-nat.c (sparc_store_inferior_registers): Likewise.
* sparc-nat.h (sparc_store_inferior_registers): Likewise.
* sparc-ravenscar-thread.c (sparc_ravenscar_store_registers):
Add ptid parameter and use it. Remove declaration at top of
file.
* spu-linux-nat.c (spu_store_inferior_registers): Add ptid
parameter and use it.
* spu-multiarch.c (spu_store_registers): Likewise.
* tilegx-linux-nat.c (store_inferior_registers): Likewise.
* vax-bsd-nat.c (vaxbsd_store_inferior_registers): Likewise.
* windows-nat.c (windows_store_inferior_registers): Likewise.
* xtensa-linux-nat.c (store_gregs, store_xtregs,
xtensa_linux_store_inferior_registers): Likewise.

3e44673 2017-03-08 06:47:23 Simon Marchi

Pass ptid to target_fetch_registers

This patch adds a ptid parameter to the target_fetch_registers and the
to_fetch_registers method of target_ops. The implementations are
therefore expected to rely on this and not on inferior_ptid.

gdb/ChangeLog:

* target-delegates.c: Re-generate.
* target.h (struct target_ops) <to_fetch_registers>: Add ptid
parameter.
(target_fetch_registers): Likewise.
* target.c (target_fetch_registers): Likewise.
* aarch64-linux-nat.c (fetch_gregs_from_thread,
fetch_fpregs_from_thread,
aarch64_linux_fetch_inferior_registers): Add ptid parameter and
use it.
* aix-thread.c (aix_thread_fetch_registers): Likewise.
* alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
* amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
Likewise.
* arm-linux-nat.c (fetch_fpregs, fetch_regs, fetch_wmmx_regs,
fetch_vfp_regs, arm_linux_fetch_inferior_registers): Likewise.
* arm-nbsd-nat.c (fetch_register, fetch_regs,
fetch_fp_register, fetch_fp_regs, armnbsd_fetch_registers):
Likewise.
* bsd-kvm.c (bsd_kvm_fetch_registers): Likewise.
* bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
* corelow.c (core_open): Pass inferior_ptid to
target_fetch_registers.
(get_core_registers): Add ptid parameter and use it.
* ctf.c (ctf_fetch_registers): Likewise.
* fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
inferior_ptid, pass ptid to target_fetch_registers.
* go32-nat.c (go32_fetch_registers): Add ptid parameter and use
it.
* hppa-linux-nat.c (fetch_register,
hppa_linux_fetch_inferior_registers): Likewise.
* hppa-nbsd-nat.c (hppanbsd_fetch_registers): Likewise.
* hppa-obsd-nat.c (hppaobsd_fetch_registers): Likewise.
* i386-bsd-nat.c (i386bsd_fetch_inferior_registers): Likewise.
* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers):
Likewise.
* i386-gnu-nat.c (gnu_fetch_registers): Likewise.
* i386-linux-nat.c (fetch_register,
i386_linux_fetch_inferior_registers): Likewise.
* ia64-linux-nat.c (ia64_linux_fetch_register,
ia64_linux_fetch_registers): Likewise.
* inf-child.c (inf_child_fetch_inferior_registers): Likewise.
* inf-ptrace.c (inf_ptrace_fetch_register,
inf_ptrace_fetch_registers): Likewise.
* linux-tdep.c (linux_corefile_thread): Pass ptid to
target_fetch_registers, don't set/restore inferior_ptid.
* m32r-linux-nat.c (m32r_linux_fetch_inferior_registers):
Add ptid parameter and use it.
* m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers): Likewise.
* m68k-linux-nat.c (fetch_register,
old_fetch_inferior_register,
m68k_linux_fetch_inferior_registers): Likewise.
* m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers): Likewise.
* mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers):
Likewise.
* mips-linux-nat.c (super_fetch_registers,
mips64_linux_regsets_fetch_registers,
mips64_linux_fetch_registers): Likewise.
* mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
* mips-obsd-nat.c (mips64obsd_fetch_inferior_registers):
Likewise.
* nto-procfs.c (procfs_fetch_registers): Likewise.
* ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
* ppc-linux-nat.c (ppc_linux_fetch_inferior_registers):
Likewise.
* ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers): Likewise.
* ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
* ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers,
ppc_ravenscar_powerpc_fetch_registers,
ppc_ravenscar_e500_fetch_registers): Likewise.
* proc-service.c (ps_lgetregs, ps_lgetfpregs): Pass ptid directly
to target_fetch_registers, don't use inferior_ptid.
* procfs.c (procfs_fetch_registers): Add ptid parameter and use
it.
* ravenscar-thread.c (ravenscar_fetch_registers): Add ptid
parameter and use it. Remove declaration at top of file.
* ravenscar-thread.h (struct ravenscar_arch_ops)
<to_fetch_registers): Add ptid_t parameter.
* record-btrace.c (record_btrace_fetch_registers): Add ptid
parameter and use it.
* record-full.c (record_full_core_open_1): Pass inferior_ptid to
target_fetch_registers.
(record_full_core_fetch_registers): Add ptid parameter.
* regcache.c (regcache_raw_update): Pass inferior_ptid to
target_fetch_registers.
* remote.c (remote_fetch_registers): Add ptid parameter and use
it.
* remote-sim.c (gdbsim_fetch_register): Likewise.
* rs6000-nat.c (fetch_register,
rs6000_fetch_inferior_registers): Likewise.
* s390-linux-nat.c (s390_linux_fetch_inferior_registers):
Likewise.
* sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
* sol-thread.c (sol_thread_fetch_registers): Likewise.
* sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
* sparc-nat.h (sparc_fetch_inferior_registers): Likewise.
* sparc-ravenscar-thread.c (sparc_ravenscar_fetch_registers):
Add ptid parameter and use it. Remove declaration at top of
file.
* spu-multiarch.c (spu_fetch_registers): Add ptid parameter and
use it.
* tilegx-linux-nat.c (fetch_inferior_registers): Likewise.
* tracefile-tfile.c (tfile_fetch_registers): Likewise.
* vax-bsd-nat.c (vaxbsd_fetch_inferior_registers): Likewise.
* windows-nat.c (windows_fetch_inferior_registers): Likewise.
* xtensa-linux-nat.c (fetch_gregs, fetch_xtregs,
xtensa_linux_fetch_inferior_registers): Likewise.

825c8a4 2017-03-08 00:56:40 Simon Marchi

Pass down ptid in bsd_uthread_ops layer

The following patches will add a ptid_t parameter to
target_fetch_registers and target_store_registers. In the bsd uthread
implementations, there's another indirection layer in the form of
bsd_uthread_ops. This patch adds the same ptid_t parameter to this
layer, so that the implementations of bsd_uthread_ops don't rely on the
current value of inferior_ptid.

From what I understand, the register values of the userspace threads
(uthreads) are stored in the memory of the "real" thread to which those
userspace threads are mapped. Therefore, the implementation of these
register fetching/storing functions consists of reading/writing memory.
Since the memory read/write functions still rely on the value of
inferior_ptid to know which thread to read/write memory from/to, it is
necessary to set and restore inferior_ptid in those functions (e.g.
amd64fbsd_supply_uthread). Eventually, when we add a ptid_t parameter
to the memory functions, this should go away as we'll simply pass down
the ptid parameter.

gdb/ChangeLog:

* amd64-fbsd-tdep.c (amd64fbsd_supply_uthread,
amd64fbsd_collect_uthread): Add ptid parameter, set and restore
inferior_ptid.
* amd64-obsd.tdep.c (amd64fbsd_collect_uthread,
amd64obsd_supply_uthread): Likewise.
* bsd-uthread.c (bsd_uthread_fetch_registers): Pass ptid value
to supply_uthread.
(bsd_uthread_store_registers): Pass ptid value to
collect_uthread.
* bsd-uthread.h (bsd_uthread_supply_register_ftype,
bsd_uthread_collect_register_ftype): Add ptid parameter.
* i386-fbsd-tdep.c (i386fbsd_supply_uthread,
i386fbsd_collect_uthread): Add ptid parameter, set and restore
inferior_ptid.
* i386-obsd-tdep.c (i386obsd_supply_uthread,
i386obsd_collect_uthread): Add ptid parameter, set and restore
inferior_ptid.
* sparc-obsd-tdep.c (sparc32obsd_supply_uthread,
sparc32obsd_collect_uthread): Add ptid parameter, set and restore
inferior_ptid.
* sparc-obsd-tdep.c (sparc64obsd_supply_uthread,
sparc64obsd_collect_uthread): Add ptid parameter, set and restore
inferior_ptid.

35e8c54 2017-03-08 00:54:56 Simon Marchi

Define typedefs for bsd_uthread_ops fields

The next patch will modify the type of the fields of bsd_uthread_ops,
and will require changing parameters of the corresponding type at
different places. I thought it would be more readable if typedefs were used.

gdb/ChangeLog:

* bsd-uthread.h (bsd_uthread_supply_register_ftype,
bsd_uthread_collect_register_ftype): New typedefs.
(bsd_uthread_set_supply_uthread,
bsd_uthread_set_collect_uthread): Use typedefs.
* bsd-uthread.c (struct bsd_uthread_ops)
<supply_uthread, collect_uthread>: Likewise.
(bsd_uthread_set_supply_uthread,
bsd_uthread_set_collect_uthread): Likewise.

4dab718 2017-03-08 00:54:46 Simon Marchi

Add parametrized version of s390_inferior_tid

In the next patches, we'll want to use this function with a ptid other
than inferior_ptid, so I add it with a separate patch to keep things
clean.

gdb/ChangeLog:

* s390-linux-nat.c (s390_inferior_tid): Add overload with ptid
parameter.

3c830b4 2017-03-08 00:52:47 Simon Marchi

windows: Don't use current_thread for register fetch/store

The windows_fetch_inferior_registers function sets current_thread then
calls do_windows_fetch_inferior_registers, which reads current_thread.
This very much looks like passing a parameter through a global variable.
I think it would be more straightforward to pass the thread as a
parameter.

It will also fit better with the following patches, which pass a ptid to
the register fetch/store target methods.

I don't have access to a Windows development environment, so I couldn't
even build-test this. Could somebody try it to make sure it doesn't
break everything?

gdb/ChangeLog:

* windows-nat.c (do_windows_fetch_inferior_registers): Add
windows_thread_info parameter and use it instead of
current_thread.
(windows_fetch_inferior_registers): Don't set current_thread,
pass the thread to do_windows_fetch_inferior_registers.
(do_windows_store_inferior_registers): Add windows_thread_info
parameter and use it instead of current_thread.
(windows_store_inferior_registers): Don't set current_thread,
pass the thread to do_windows_store_inferior_registers.

d274ecf 2017-03-07 06:07:05 Simon Marchi

Remove const in xtensa-linux-nat.c:fetch_gregs

Fixes:

/home/emaisin/src/binutils-gdb/gdb/xtensa-linux-nat.c: In function 'void fetch_gregs(regcache*, ptid_t, int)':
/home/emaisin/src/binutils-gdb/gdb/xtensa-linux-nat.c:178:23: error: uninitialized const 'regs' [-fpermissive]
const gdb_gregset_t regs;
^

gdb/ChangeLog:

* xtensa-linux-nat.c (fetch_gregs): Remove const.

79a964d 2017-03-07 02:21:04 Nick Clifton

Fix reading numeric values from GNU BUILD NOTEs.

* readelf.c (print_gnu_build_attribute_name): Read byte values
from the name string as unsigned bytes.
(process_notes_at): Use memcpy to copy an unterminated name
string.

73f07bf 2017-03-06 20:24:23 Alan Modra

Don't decode powerpc insns with invalid fields

Certain insns have restrictions on fields. For example, the insn
mentioned in the PR, lqarx, must specify an even general purpose
register as its destination and that register cannot appear in
either of the base or index reg fields. This holds even when the RA0
field is 0 (meaning a zero rather than r0).

PR 21124
* ppc-opc.c (extract_esync, extract_ls, extract_ral, extract_ram)
(extract_raq, extract_ras, extract_rbx): New functions.
(powerpc_operands): Use opposite corresponding insert function.
(Q_MASK): Define.
(powerpc_opcodes): Apply Q_MASK to all quad insns with even
register restriction.

ea0de82 2017-03-06 19:13:45 Alan Modra

dw2gencfi.c DWARF2_FDE_RELOC_SIZE

Add asserts that reloc size matches encoding size, and tidy.

* dw2gencfi.c (encoding_size): Return unsigned int.
(emit_expr_encoded): Assert size matches reloc bitsize.
(output_fde): Use unsigned for offset_size and addr_size. Set
addr_size earlier and use in place of constant 4 and uses of
DWARF2_FDE_RELOC_SIZE. Assert it matches reloc bitsize.

9e1a867 2017-03-06 19:06:59 Alan Modra

gas/dw2gencfi.c formatting

* dw2gencfi.c: Wrap overlong lines. Add parens for emacs
auto reformat. Formatting and whitespace fixes.

1f5345a 2017-03-06 10:12:30 Sam Thursfield

binutils: Fix warning on platforms that don't have asprintf

* configure.ac (AC_CHECK_DECLS): Add asprintf.
* config.in: Regenerate.
* configure: Regenerate.

62e755d 2017-03-06 09:00:34 GDB Administrator

Automatic date update in version.in

49fced1 2017-03-06 07:37:54 Mark Wielaard

gas: Emit name, comp_dir and producer strings in .debug_str.

Putting the name, comp_dir and producer strings in the .debug_str section
makes it possible to share them across CUs. This saves a small amount of
space (about ~20K on a glibc libc.so.6 build with debuginfo). And makes
it easier for tools like rpm debugedit to adjust the source paths when
generating separate debuginfo files.

gas/
* dwarf2dbg.c (out_debug_abbrev): Use DW_FORM_strp instead of
DW_FORM_string for DW_AT_name, DW_AT_comp_dir and DW_AT_producer.
(out_debug_info): Accept symbols to name, comp_dir and producer
in the .debug_str section and emit those offsets not full strings.
(out_debug_str): New function that outputs the strings for name,
comp_dir and producer in .debug_str and generates symbols to
those strings.
(out_debug_line): Create a .debug_str section if necessary and
call out_debug_str before calling out_debug_info.
* testsuite/gas/aarch64/dwarf.d: Add extra section symbol to
expected output.

2e0ce1c 2017-03-05 13:19:54 Alan Modra

Align eh_frame FDEs according to their encoding

bfd/
* elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
* elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
(next_cie_fde_offset): New function.
(_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
(_bfd_elf_discard_section_eh_frame): Align zero terminator to
four bytes. Align CIEs to four or eight bytes depending on
per_encoding_aligned8. Align FDEs according to their encoding.
Pad last FDE to output section alignment.
(_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
assertion.
* elf64-ppc.c (glink_eh_frame_cie): Delete padding.
(ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
(ppc64_elf_finish_dynamic_sections): Adjust to suit.
ld/
* testsuite/ld-elf/eh3.d: Adjust for eh_frame alignment change.
* testsuite/ld-elf/eh6.d: Likewise.
* testsuite/ld-alpha/tlsbin.dd: Likewise.
* testsuite/ld-alpha/tlsbin.td: Likewise.
* testsuite/ld-alpha/tlsbinr.dd: Likewise.
* testsuite/ld-alpha/tlspic.dd: Likewise.
* testsuite/ld-alpha/tlspic.rd: Likewise.
* testsuite/ld-alpha/tlspic.sd: Likewise.
* testsuite/ld-alpha/tlspic.td: Likewise.
* testsuite/ld-mips-elf/eh-frame1-n64.d: Likewise.
* testsuite/ld-mips-elf/eh-frame2-n64.d: Likewise.
* testsuite/ld-mips-elf/eh-frame3.d: Likewise.
* testsuite/ld-x86-64/pr20830a.d: Likewise.
* testsuite/ld-x86-64/pr21038a.d: Likewise.
* testsuite/ld-x86-64/pr21038b.d: Likewise.
* testsuite/ld-x86-64/pr21038c.d: Likewise.

0792e0e 2017-03-05 09:00:22 GDB Administrator

Automatic date update in version.in

921ea88 2017-03-04 09:00:25 GDB Administrator

Automatic date update in version.in

8ecbe59 2017-03-04 06:10:45 Jim Wilson

Fix umulh and smulh bugs. Fix bugs in last week's sumov.s testsuite.

sim/aarch64/
* simulator.c (mul64hi): Shift carry left by 32.
(smulh): Change signum to negate. If negate, invert result, and add
carry bit if low part of multiply result is zero.

sim/testsuite/sim/aarch64/
* sumov.s: Correct compare test values.
* sumulh.s: New.

df97be5 2017-03-04 02:58:24 Simon Marchi

Use range-based for loop in remote_add_target_side_commands

gdb/ChangeLog:

* remote.c (remote_add_target_side_commands): Use range-based
for loop.

7d45f3d 2017-03-04 02:16:19 Yao Qi

Fetch lazy value before calling val_print

As reported in PR 21165,

(gdb) info locals^M
gv = /home/yao/SourceCode/gnu/gdb/git/gdb/value.c:372: internal-error: int value_bits_any_optimized_out(const value*, int, int): Assertion `!value->lazy' failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
Quit this debugging session? (y or n) FAIL: gdb.ada/info_locals_renaming.exp: info locals (GDB internal error)
Resyncing due to internal error.

This internal error is caused by e8b24d9 (Remove parameter valaddr from
la_val_print). Commit e8b24d9 removes some calls to
value_contents_for_printing, but value_fetch_lazy is not called, so the
internal error above is triggered. This patch adds value_fetch_lazy
call before val_print.

gdb:

2017-03-03 Yao Qi <yao.qi@linaro.org>

PR gdb/21165
* ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
value is lazy.
* valprint.c (common_val_print): Likewise.

611a3ca 2017-03-03 20:35:03 Nick Clifton

Make the linker fail if asked to create more than 1^16 ordinal values for PE targets.

PR 12969
* pe-dll.c (generate_edata): Fail if the input file(s) require too
many ordinals.

d20928f 2017-03-03 19:22:16 Nick Clifton

Fix thinko in previous changelog entry.

PR ld/21212
* elf.c (rewrite_elf_program_header): Do not issue a warning for
empty segments which have a zero filesz, but a non-zero memsz.

b565cf2 2017-03-03 09:00:23 GDB Administrator

Automatic date update in version.in

05ed431 2017-03-03 02:10:20 Nick Clifton

Support merging build notes in sections without the SHF_GNU_BUILD_NOTE flag set.

* objcopy.c (is_merged_note_section): Support build note sections
without the SHF_GNU_BUILD_NOTE section flag set.

f98450c 2017-03-02 23:47:29 Nick Clifton

Disable warning message about a program header with no associated sections when that header's file size is non-zero.

PR ld/21212
* elf.c (rewrite_elf_program_header): Do not issue a warning for
empty segments which have a non-zero filesz.

c871dad 2017-03-02 19:52:51 Nick Clifton

Fix snafu parsing GNU_BUILD_NOTEs on ARM and AArch64 architectures.

* readelf.c (print_gnu_build_attribute_description): Use global
symbols for OPEN attributes if at all possible.

b451e98 2017-03-02 18:58:19 Jan Kratochvil

New debug_displays_assert

binutils/
2017-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>

* dwarf.c (debug_displays_assert): New static assertion.

d4620be 2017-03-02 18:06:00 Jan Kratochvil

Fix dwarf_section_display_enum regression by DWARF-5

binutils/
2017-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>

* dwarf.h (enum dwarf_section_display_enum): Add loclists and rnglists.

9875b36 2017-03-02 10:44:07 Maciej W. Rozycki

GAS: Fix bogus "attempt to move .org backwards" relaxation errors

Fix a commit 6afe8e98a664 ("internal error for backwards .org"),
<https://www.sourceware.org/ml/binutils/2008-06/msg00212.html>,
GAS regression that caused legitimate code to fail assembly with an
"attempt to move .org backwards" error.

For example with the `mips-linux' target we get:

$ cat org.s
.set mips16
la $2, foo
.org 0x1000
.align 2
foo:
.half 0
$ as -o org.o org.s
org.s: Assembler messages:
org.s:3: Error: attempt to move .org backwards
$

where the location pointer is obviously not moved backwards with `.org'.

The cause is positive `stretch' in relaxation due to a PC-relative ADDIU
instruction (produced from the LA macro used) getting expanded from 2 to
4 bytes as `foo' is noticed to be out of range for the short encoding.
This in turn triggers logic in `relax_segment' which concludes in the
processing of an `rs_org' frag produced that the location pointer is
moved backwards while in fact only the amount to space forward to the
location requested has shrunk, resulting in a negative growth of the
frag.

Correct the bad logic then and instead verify that the fixed part of an
`rs_org' frag has not overrun the location requested, as per the comment
already included with the error message:

/* Growth may be negative, but variable part of frag
cannot have fewer than 0 chars. That is, we can't
.org backwards. */

which accurately describes the regression scenario. Move the comment
ahead the conditional noted, for clarity.

Add generic and MIPS test cases for the `.org' pseudo-op, including the
test case discussed though not integrated with the offending commit in
particular, adjusted to work across all targets.

gas/
* write.c (relax_segment) <rs_org>: Only bail out if the fixed
part of the frag has overrun the location requested.

* testsuite/gas/all/org-1.d: New test.
* testsuite/gas/all/org-2.d: New test.
* testsuite/gas/all/org-3.d: New test.
* testsuite/gas/all/org-4.d: New test.
* testsuite/gas/all/org-5.d: New test.
* testsuite/gas/all/org-6.d: New test.
* testsuite/gas/all/org-1.l: New stderr output.
* testsuite/gas/all/org-2.l: New stderr output.
* testsuite/gas/all/org-3.l: New stderr output.
* testsuite/gas/all/org-1.s: New test source.
* testsuite/gas/all/org-2.s: New test source.
* testsuite/gas/all/org-3.s: New test source.
* testsuite/gas/all/org-4.s: New test source.
* testsuite/gas/all/org-5.s: New test source.
* testsuite/gas/all/org-6.s: New test source.
* testsuite/gas/all/gas.exp: Run the new tests.

* testsuite/gas/mips/org-1.d: New test.
* testsuite/gas/mips/org-2.d: New test.
* testsuite/gas/mips/org-3.d: New test.
* testsuite/gas/mips/org-4.d: New test.
* testsuite/gas/mips/org-5.d: New test.
* testsuite/gas/mips/org-6.d: New test.
* testsuite/gas/mips/org-7.d: New test.
* testsuite/gas/mips/org-8.d: New test.
* testsuite/gas/mips/org-9.d: New test.
* testsuite/gas/mips/org-10.d: New test.
* testsuite/gas/mips/org-11.d: New test.
* testsuite/gas/mips/org-12.d: New test.
* testsuite/gas/mips/org-1.l: New stderr output.
* testsuite/gas/mips/org-4.l: New stderr output.
* testsuite/gas/mips/org-5.l: New stderr output.
* testsuite/gas/mips/org-6.l: New stderr output.
* testsuite/gas/mips/org-10.l: New stderr output.
* testsuite/gas/mips/org-1.s: New test source.
* testsuite/gas/mips/org-2.s: New test source.
* testsuite/gas/mips/org-3.s: New test source.
* testsuite/gas/mips/org-4.s: New test source.
* testsuite/gas/mips/org-5.s: New test source.
* testsuite/gas/mips/org-6.s: New test source.
* testsuite/gas/mips/org-7.s: New test source.
* testsuite/gas/mips/org-8.s: New test source.
* testsuite/gas/mips/org-9.s: New test source.
* testsuite/gas/mips/org-10.s: New test source.
* testsuite/gas/mips/org-11.s: New test source.
* testsuite/gas/mips/org-12.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new tests.