• R/O
  • HTTP
  • SSH
  • HTTPS

Liste der Commits

Tags
Keine Tags

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/ccoutant/gold-record
RSS
Rev. Zeit Autor
9e45fe0 users/ccoutant/gold-record 2016-03-20 09:00:54 Cary Coutant

Fix two build issues.

e7a0ede 2016-03-20 03:16:16 Cary Coutant

Add --plugin-record option to record plugin actions.

With --plugin-record, gold will log all plugin actions to a log file,
and make copies of plugin-supplied replacement files in a temporary
directory created under the current working directory.

gold/
* options.h (--plugin-record): New option.
* plugin.cc (make_sized_plugin_object): Add filename parameter.
(Plugin_recorder): New class.
(Plugin_manager::~Plugin_manager): Delete recorder_.
(Plugin_manager::load_plugins): Create and initialize recorder_.
(Plugin_manager::claim_file): Record claimed and unclaimed files.
(Plugin_manager::make_plugin_object): Use object name as name for
plugin object, if available.
(Plugin_manager::add_input_file): Record replacement files.
(Sized_pluginobj::do_add_symbols): Record plugin symbols.
(Plugin_finish::run): Call Plugin_recorder::finish().
(make_sized_plugin_object): Add filename parameter and pass to
Sized_pluginobj constructor.
* plugin.h (Plugin::filename): New method.
(Plugin::recorder): New method.
(Plugin::recorder_): New data member.

01b84e2 2016-03-19 06:54:35 Vladimir Radosavljevic

Remove is_n64_ data member from Mips_relobj class.

elfcpp/
* mips.h (abi_64): Remove.

gold/
* mips.cc (Mips_relobj::is_n64_): Remove.
(Target_mips::ei_class_): Likewise.
(Mips_relobj::is_newabi): Call methods.
(Mips_relobj::is_n64): Change checking for N64 ABI.
(Target_mips::is_output_n64): Likewise.
(Target_mips::merge_processor_specific_flags): Remove ei_class
argument, and remove comparing ei_class.
(Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field
of the ELF header.
(Target_mips::do_finalize_sections): Don't pass ei_class argument
to merge_processor_specific_flags.
(Target_mips::elf_mips_abi_name): Remove ei_class argument, and
change checking for N64 ABI.

30fab42 2016-03-19 02:30:12 Nick Clifton

Update description of AArch64 assembler directives.

gas * doc/c-aarch64.texi (AArch64 Directives): Add descriptions of
.cpu, .dword, .even, .inst. .tlsdescadd, .tlsdesccall,
.tlsdescldr and .xword directives.

87bba7a 2016-03-19 02:08:27 Nick Clifton

Fix thinko in new GET_VEC_ELEMENT macro.

* cpustate.c: (GET_VEC_ELEMENT): And fix thinko using macro arguments.

8678914 2016-03-19 02:04:07 Nick Clifton

Fix the disassembly of the AArch64's OOR instruction as a MOV instruction.

PR target/19721
opcodes * aarch64-tbl.h (aarch64_opcode_table): Fix type of second operand
of MOV insn that aliases an ORR insn.

gas * testsuite/gas/aarch64/pr19721.s: New test source file.
* testsuite/gas/aarch64/pr19721.d: New test driver file.

9c3f223 2016-03-19 00:01:47 Yao Qi

Make sparc_software_single_step static

sparc_software_single_step is not used out of sparc-tdep.c, so this
patch makes it static.

gdb:

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

* sparc-tdep.c (sparc_software_single_step): Make it static.
* sparc-tdep.h (sparc_software_single_step): Remove declaration.

4c0ca98 2016-03-18 23:46:42 Nick Clifton

Fix code to check for illegal element numbers when accessing AArch64 vector registers in AArch64 sim.

* cpustate.c (GET_VEC_ELEMENT): Fix off by one error checking
for an invalid element index.
(SET_VEC_ELEMENT): Likewise.

941319d 2016-03-18 23:39:09 Yao Qi

[spu] throw error when target_read_memory fails

I happen to see that 1 is returned in spu_software_single_step when
target_read_memory returns 1. It must be wrong. That patch changes
it to throwing an error. Note that I choose to throw error because I
find the code in the end of spu_software_single_step throws errors.

gdb:

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

* spu-tdep.c (spu_software_single_step): Throw error when
target_read_memory fails.

35ac8b3 2016-03-18 23:34:37 Yao Qi

Check lwp_signal_can_be_delivered for enqueue/dequeue pending signals

The enqueue and dequeue signals in linux_resume_one_lwp_throw use one
condition and its inverted one. This patch is to move the condition
into a function lwp_signal_can_be_delivered, so that the next patch can
change the condition in one place.

gdb/gdbserver:

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

* linux-low.c (lwp_signal_can_be_delivered): New function.
(linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.

94610ec 2016-03-18 23:31:40 Yao Qi

Set signal to 0 after enqueue_pending_signal

Today, we enqueue signal in linux_resume_one_lwp_throw, but set
variable 'signal' many lines below with the comment

/* Postpone any pending signal. It was enqueued above. */
signal = 0;

I feel difficult to associate code across many lines, and we should
move the code close to enqueue_pending_signal call. This is what
this patch does in general. After this change, variable 'signal'
is set to zero very early, so the 'signal' value in the following
debugging message makes no sense, so I remove it from the debugging
message. The function returns early if lwp->status_pending_p is
true, so 'signal' value in the debugging message doesn't matter,
AFAICS. Also, I move one debugging message several lines below to
make it close the real ptrace call,

if (debug_threads)
debug_printf ("Resuming lwp %ld (%s, signal %d, stop %s)\n",
lwpid_of (thread), step ? "step" : "continue", signal,
lwp->stop_expected ? "expected" : "not expected");

so that the debugging message can reflect what GDBserver does. This
is a code refactor and only debugging messages are affected.

gdb/gdbserver:

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

* linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
0 if signal is enqueued. Remove 'signal' from one debugging
message. Move one debugging message to some lines below.
Remove code setting 'signal' to 0.

80aea92 2016-03-18 23:28:14 Yao Qi

Remove redundant WIFSTOPPED check

WIFSTOPPED is checked linux_wstatus_maybe_breakpoint, so WIFSTOPPED
in "WIFSTOPPED (wstat) && linux_wstatus_maybe_breakpoint (wstat)"
is redundant. This patch removes WIFSTOPPED check.

gdb/gdbserver:

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

* linux-low.c (linux_low_filter_event): Remove redundant
WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.

78a2bc3 2016-03-18 22:09:03 Nick Clifton

Remove spurious empty line in changelog entry.

6387924 2016-03-18 22:07:33 Nick Clifton

Fix generation of as.1 manual page so that it can be converted to DocBook format.

gas * doc/as.texinfo: Place the target specific command line options
into their own man page section.

etc * texi2pod.pl: Add TARGET to the list of recognised man page
sections.

45821be 2016-03-18 20:45:43 Awson

Ensure that the .rdata_pseudo_runtime_reloc sections are not discarded by gabage collection.

PR 19531
* scripttempl/pe.sc (.rdata_runtime_pseudo_reloc): Always KEEP
this section.
* scripttempl/pep.sc (.rdata_runtime_pseudo_reloc): Likewise.

41f46ed 2016-03-18 18:51:47 Senthil Kumar Selvaraj

Fix possible failure in the AVR linker tests.

* ld-avr/gc-section-debugline.d: Relax regex check for CU.

e101a78 2016-03-18 18:32:32 Nick Clifton

Add simulation of MUL and NEG instructions to AArch64 simulator.

* cpustate.c: Remove spurious spaces from TRACE strings.
Print hex equivalents of floats and doubles.
Check element number against array size when accessing vector
registers.
* memory.c: Trace memory reads when --trace-memory is enabled.
Remove float and double load and store functions.
* memory.h (aarch64_get_mem_float): Delete prototype.
(aarch64_get_mem_double): Likewise.
(aarch64_set_mem_float): Likewise.
(aarch64_set_mem_double): Likewise.
* simulator (IS_SET): Always return either 0 or 1.
(IS_CLEAR): Likewise.
(fldrs_pcrel): Load and store floats using 32-bit memory accesses
and doubles using 64-bit memory accesses.
(fldrd_pcrel, fldrs_wb, fldrs_abs, fldrs_scale_ext): Likewise.
(fldrd_wb, fldrd_abs, fsturs, fsturd, fldurs, fldurd): Likewise.
(fstrs_abs, fstrs_wb, fstrs_scale_ext, fstrd_abs): Likewise.
(fstrd_wb, fstrd_scale_ext, store_pair_float): Likewise.
(store_pair_double, load_pair_float, load_pair_double): Likewise.
(do_vec_MUL_by_element): New function.
(do_vec_op2): Call do_vec_MUL_by_element.
(do_scalar_NEG): New function.
(do_double_add): Call do_scalar_NEG.

48427a7 2016-03-18 09:00:09 GDB Administrator

Automatic date update in version.in

ea01647 2016-03-18 07:37:10 Cary Coutant

Add mips and s390 build targets for gold.

* configure.ac: Add mips and s390 to the gold target check.
* configure: Regenerate.

47a9f4f 2016-03-18 07:07:49 Vladimir Radosavljevic

Add MIPS-64 support.

gold/
* mips.cc (enum Special_relocation_symbol): New enum type.
(is_readonly_section): New function.
(eh_reloc): Likewise.
(Mips_got_entry::is_section_symbol_): New member.
(Mips_got_entry::is_section_symbol): New method.
(Mips_got_info::record_local_got_symbol): Add is_section_symbol
argument.
(Mips_relobj::mips_elf_options_section_name): New method.
(Mips_output_data_got::record_local_got_symbol): Add
is_section_symbol argument, and pass it to
Mips_got_info::record_local_got_symbol.
(Mips_output_data_got::got_offset): Add addend argument, and pass
it to Relobj::local_got_offset.
(struct Mips_output_reloc_writer): New type.
(class Mips_output_data_reloc): New class.
(Mips_output_data_plt::Reloc_section): Change type to
Mips_output_data_reloc.
(Target_mips::Reloc_section): Likewise.
(Mips_reloc_types::get_r_addend): Remove unsigned from return type.
(Mips_classify_reloc::get_r_type2): New method.
(Mips_classify_reloc::get_r_type3): Likewise.
(Mips_classify_reloc::get_r_ssym): Likewise.
(Target_mips::Reloca_section): Remove.
(Relocate::should_apply_static_reloc): Rename from
should_apply_r_mips_32_reloc.
(Target_mips::copy_reloc): Replace Reltype parameter with r_type
and r_offset.
(Mips_relocate_functions::Valtype): New type.
(Mips_relocate_functions::Valtype64): New type.
(Mips_relocate_functions::check_overflow): New method.
(Mips_relocate_functions::mips_reloc_unshuffle): Move to public
interface.
(Mips_relocate_functions::mips_reloc_shuffle): Likewise.
(Mips_relocate_functions::rel16): Add support for resolving
relocations for Mips64.
(Mips_relocate_functions::rel32): Likewise.
(Mips_relocate_functions::reljalr): Likewise.
(Mips_relocate_functions::relpc32): Likewise.
(Mips_relocate_functions::rel26): Likewise.
(Mips_relocate_functions::relpc16): Likewise.
(Mips_relocate_functions::relmicromips_pc7_s1): Likewise.
(Mips_relocate_functions::relmicromips_pc10_s1): Likewise.
(Mips_relocate_functions::relmicromips_pc16_s1): Likewise.
(Mips_relocate_functions::do_relhi16): Likewise.
(Mips_relocate_functions::do_relgot16_local): Likewise.
(Mips_relocate_functions::rello16): Likewise.
(Mips_relocate_functions::relgot): Likewise.
(Mips_relocate_functions::relgotpage): Likewise.
(Mips_relocate_functions::relgotofst): Likewise.
(Mips_relocate_functions::relgot_hi16): Likewise.
(Mips_relocate_functions::relgot_lo16): Likewise.
(Mips_relocate_functions::relgprel): Likewise.
(Mips_relocate_functions::relgprel32): Likewise.
(Mips_relocate_functions::tlsrelhi16): Likewise.
(Mips_relocate_functions::tlsrello16): Likewise.
(Mips_relocate_functions::tlsrel32): Likewise.
(Mips_relocate_functions::relsub): Likewise.
(Mips_relocate_functions::releh): New method.
(Mips_relocate_functions::rel64): Likewise.
(Mips_got_info::record_local_got_symbol): Add is_section_symbol and
pass it to Mips_got_entry.
(Mips_got_info::add_local_entries): Pass addend argument
to code functions, and for STT_SECTION symbols call
add_symbolless_local_addend.
(Mips_got_info::add_tls_entries): Pass addend argument to code
functions.
(Mips_relobj::do_read_symbols): Read gp value that was used to
create object.
(Mips_output_data_plt::plt_entry): Remove opcode from l[wd]
instruction. Opcode for instruction will be selected later.
(Target_mips::gc_process_relocs): Add case for SHT_RELA.
(Target_mips::scan_relocatable_relocs): Likewise.
(Target_mips::emit_relocs_scan): Likewise.
(Target_mips::relocate_relocs): Likewise.
(Target_mips::do_finalize_sections): Skip objects for merging
processor specific flags in which all input sections will be
discarded.
(mips_get_size_for_reloc): Add case for R_MIPS_EH.
(Target_mips::Scan::get_reference_flags): Likewise.
(Target_mips::relocate_special_relocatable): Call rel26 method with
calculate_only and calculated_value arguments.
(Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a
dynamic relocation against a readonly sections, and pass
is_section_symbol to Mips_got_info::record_local_got_symbol.
(Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a
dynamic relocation against a readonly sections, and pass r_type
and r_offset to Target_mips::copy_reloc.
(Target_mips::Relocate::relocate): Add support for resolving
relocations for Mips64.
(Target_mips::mips_info): Add case for Mips64 default dynamic
linker name.
(Target_selector_mips): Correct emulation names.

1a08ae2 2016-03-18 06:27:48 Vladimir Radosavljevic

Add missing Mips_output_data_la25_stub::do_print_to_mapfile.

gold/
* mips.cc (class Mips_output_data_la25_stub): Add
do_print_to_mapfile function.

c2fa9ce 2016-03-18 06:26:50 Vladimir Radosavljevic

Fix problem with --emit-relocs for Mips-32.

gold/
* mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of
elf_r_info.

708bf0a 2016-03-18 02:17:30 Jan Kratochvil

Suggest running gdbserver for a PID in container

currently
gdb -p <pid from a container>
will print:
warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable

It correctly states the problem but it does not say how to solve it.

Originally I wanted to suggest also the Docker "-p 1234:1234" parameter but
I see the containers are more general topic than just Docker (even LxC etc.).

According to Gary future GDBs should be able to work even without gdbserver.
But currently gdbserver is still required.

gdb/ChangeLog
2016-03-17 Jan Kratochvil <jan.kratochvil@redhat.com>

* linux-thread-db.c (check_pid_namespace_match): Extend the message.

0d5b594 2016-03-17 19:21:37 Pedro Alves

PR remote/19496, timeout in forking-threads-plus-bkpt

This patch addresses a failure in
gdb.threads/forking-threads-plus-breakpoint.exp:

FAIL: gdb.threads/forking-threads-plus-breakpoint.exp: cond_bp_target=1:
detach_on_fork=on: inferior 1 exited (timeout)

Cause:

A fork event was reported to GDB before GDB knew about the parent
thread, followed immediately by a breakpoint event in a different
thread. The parent thread was subsequently added via
remote_notice_new_inferior in process_stop_reply, but when the thread
was added the thread_info.state was set to THREAD_STOPPED. The fork
event was then handled correctly, but when the fork parent was resumed
via a call to keep_going, the state was unchanged.

The breakpoint event was then handled, which caused all the
non-breakpoint threads to be stopped. When the breakpoint thread was
resumed, all the non-breakpoint threads were resumed via
infrun.c:restart_threads. Our old fork parent wasn't restarted,
because it still had thread_info.state set to THREAD_STOPPED.
Ultimately the program under debug hung waiting for a pthread_join
while the old fork parent was stopped forever by GDB.

Fix:

Since this is non-stop, then the bug is that the thread should have
been added in THREAD_RUNNING state. Consider that infrun may be
pulling target events out of the target_ops backend into its own event
queue, but, not process them immediately. E.g., infrun may be
stopping all threads temporarily for a step-over-breakpoint operation
for thread A (stop_all_threads). The waitstatus of all threads is
thus left pending in the thread structure (save_status), including the
fork event of thread B. Right at this point, if the user does "info
threads", that should show thread B (the fork parent) running, not
stopped, even if internally, gdb is holding it paused for a little
bit.

Thus if in non-stop mode, always add new threads in the external
user-visible THREAD_RUNNING state. Change remote_notice_new_inferior
to accept the internal executing state of the thread instead, with
EXECUTING set to 1 when we discover a thread that is running on the
target (such as through remote_update_thread_list), and 0 when the
thread is really paused (such as when we see a stop reply).

Tested on x86_64 Linux and Nios II Linux target with x86 Linux host.

gdb/ChangeLog:
2016-03-17 Pedro Alves <palves@redhat.com>
Don Breazeal <donb@codesourcery.com>

PR remote/19496
* infcmd.c (notice_new_inferior): Use the 'leave_running' argument
instead of checking the 'non_stop' global.
* remote.c (remote_add_thread): New parameter 'executing'. Use it
to set the new thread's executing state.
(remote_notice_new_inferior): Rename parameter 'running' to
'executing'. Always set the thread state to THREAD_RUNNING in
non-stop mode, and to THREAD_STOPPED in all-stop mode. Pass
EXECUTING to remote_add_thread and notice_new_inferior.
(remote_update_thread_list): Update to pass executing state, not
running state.

bba960f 2016-03-17 18:55:55 Andreas Arnez

S390: Add syscall info for syscalls up to 374

Represent new Linux syscalls for s390 and s390x in GDB's syscall info.
Add the syscalls from 355 (userfaultfd) up to 374 (mlock2) as well as
the previously reserved NUMA syscalls 268-270, 287, and 310.

gdb/ChangeLog:

* syscalls/s390-linux.xml: Add NUMA syscalls and new syscalls up
to 374.
* syscalls/s390x-linux.xml: Likewise.

64bcd52 2016-03-17 18:55:55 Andreas Arnez

S390: Fix output path for s390-multiarch test case

Since test artifacts are organized in a directory hierarchy, the
s390-multiarch test case is not executed correctly any more. This is
because it uses an obsolete way of constructing the output paths.

This fix invokes standard_testfile instead.

gdb/testsuite/ChangeLog:

* gdb.arch/s390-multiarch.exp: Use standard_testfile instead of
maintaining separate logic for constructing the output path.

5fd0888 2016-03-17 17:58:57 Andreas Arnez

linux-record: Simplify with record_mem_at_reg()

The function record_linux_system_call() often records a memory area
whose address is contained in a register. So far this required two
function calls: one for fetching the register value, and another one for
recording the memory area. These two function calls are now merged into
a new local helper function, and all occurrences are adjusted. This
reduces the source code and makes it more readable.

gdb/ChangeLog:

* linux-record.c (record_mem_at_reg): New helper function.
(record_linux_system_call): Exploit new helper function where
applicable.

0fc8f11 2016-03-17 17:58:57 Andreas Arnez

linux-record.c: Fix whitespace issues

This patch changes whitespace only, fixing whitespace issues in
linux-record.c.

gdb/ChangeLog:

* linux-record.c: Fix whitespace issues; tabify, remove trailing
spaces.

afdab91 2016-03-17 17:58:56 Andreas Arnez

linux-record: Fix bad fall-through for pipe/pipe2

This patch added handling for some syscalls to linux-record.c:

https://sourceware.org/ml/gdb-patches/2015-10/msg00452.html

But for both `pipe' and `pipe2' the patch lacks a statement after an
`if', such that the following `break' is interpreted as the `if'-body
instead.

This adds the missing (return-) statements for the conditionals.

gdb/ChangeLog:

* linux-record.c (record_linux_system_call): Add missing return
statements to handling of pipe and pipe2 syscalls.

f3f8e58 2016-03-17 09:00:22 GDB Administrator

Automatic date update in version.in