GDB Administrator [Wed, 13 Jan 2016 00:00:13 +0000 (00:00 +0000)]
Automatic date update in version.in
Josh Stone [Tue, 12 Jan 2016 20:27:27 +0000 (12:27 -0800)]
Implement 'catch syscall' for gdbserver
This adds a new QCatchSyscalls packet to enable 'catch syscall', and new
stop reasons "syscall_entry" and "syscall_return" for those events. It
is currently only supported on Linux x86 and x86_64.
gdb/ChangeLog:
2016-01-12 Josh Stone <jistone@redhat.com>
Philippe Waroquiers <philippe.waroquiers@skynet.be>
* NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and the
syscall_entry and syscall_return stop reasons. Mention GDB
support for remote catch syscall.
* remote.c (PACKET_QCatchSyscalls): New enum.
(remote_set_syscall_catchpoint): New function.
(remote_protocol_features): New element for QCatchSyscalls.
(remote_parse_stop_reply): Parse syscall_entry/return stops.
(init_remote_ops): Install remote_set_syscall_catchpoint.
(_initialize_remote): Config QCatchSyscalls.
* linux-nat.h (struct lwp_info) <syscall_state>: Comment typo.
gdb/doc/ChangeLog:
2016-01-12 Josh Stone <jistone@redhat.com>
Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.texinfo (Remote Configuration): List the QCatchSyscalls packet.
(Stop Reply Packets): List the syscall entry and return stop reasons.
(General Query Packets): Describe QCatchSyscalls, and add it to the
table and the detailed list of stub features.
gdb/gdbserver/ChangeLog:
2016-01-12 Josh Stone <jistone@redhat.com>
Philippe Waroquiers <philippe.waroquiers@skynet.be>
* inferiors.h: Include "gdb_vecs.h".
(struct process_info): Add syscalls_to_catch.
* inferiors.c (remove_process): Free syscalls_to_catch.
* remote-utils.c (prepare_resume_reply): Report syscall_entry and
syscall_return stops.
* server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
* server.c (handle_general_set): Handle QCatchSyscalls.
(handle_query): Report support for QCatchSyscalls.
* target.h (struct target_ops): Add supports_catch_syscall.
(target_supports_catch_syscall): New macro.
* linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
(struct lwp_info): Add syscall_state.
* linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
Maintain syscall_state and syscalls_to_catch across exec.
(get_syscall_trapinfo): New function, proxy to the_low_target.
(linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
(linux_low_filter_event): Toggle syscall_state entry/return for
syscall traps, and set it ignored for all others.
(gdb_catching_syscalls_p): New function.
(gdb_catch_this_syscall_p): New function.
(linux_wait_1): Handle SYSCALL_SIGTRAP.
(linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
(linux_supports_catch_syscall): New function.
(linux_target_ops): Install it.
* linux-x86-low.c (x86_get_syscall_trapinfo): New function.
(the_low_target): Install it.
gdb/testsuite/ChangeLog:
2016-01-12 Josh Stone <jistone@redhat.com>
Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.base/catch-syscall.c (do_execve): New variable.
(main): Conditionally trigger an execve.
* gdb.base/catch-syscall.exp: Enable testing for remote targets.
(test_catch_syscall_execve): New, check entry/return across execve.
(do_syscall_tests): Call test_catch_syscall_execve.
H.J. Lu [Tue, 12 Jan 2016 20:21:53 +0000 (12:21 -0800)]
Fix compile error with use of 'typename' outside of template
* i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
'typename'.
H.J. Lu [Tue, 12 Jan 2016 20:08:06 +0000 (12:08 -0800)]
Remove typename from Mips64_rela_data
Cary Coutant [Tue, 12 Jan 2016 19:39:50 +0000 (11:39 -0800)]
Fix breakage for SHT_REL targets where get_r_addend() gives internal error.
gold/
* arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
* i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
* mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
specializations) New method.
H.J. Lu [Tue, 12 Jan 2016 19:27:55 +0000 (11:27 -0800)]
Fix compile error with use of 'typename' outside of template.
elfcpp/
* elfcpp_internal.h (Mips64_rel_data, Mips64_rela_data): Remove
'typename'.
H.J. Lu [Tue, 12 Jan 2016 16:44:06 +0000 (08:44 -0800)]
Sync top-level btool.m4 with GCC
Sync with GCC
2015-11-26 David Edelsohn <dje.gcc@gmail.com>
* m4/libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L"
symbols.
Matthew Wahab [Tue, 12 Jan 2016 16:35:30 +0000 (16:35 +0000)]
[ARM] Support ARMv8.2 RAS extension.
The ARMv8.2 architecture includes the RAS extension which adds an
instruction, ESB, and a number of coprocessor registers. This patch adds
the instruction to binutils, making it available when -march=armv8.2-a
is selected. It also adds tests for the instruction and for the
coprocessor registers.
gas/
2016-01-12 Matthew Wahab <matthew.wahab@arm.com>
* config/tc-arm.c (arm_ext_v8_2): New.
(insns): Add "esb".
* testsuite/gas/arm/armv8_2-a.d: New.
* testsuite/gas/arm/armv8_2-a.s: New.
opcodes/
2016-01-12 Matthew Wahab <matthew.wahab@arm.com>
* arm-dis.c (arm_opcodes): Add "esb".
(thumb_opcodes): Likewise.
Change-Id: I67f3d70789db78d1c66a56c4994675f99ac15e34
Yury Usishchev [Tue, 12 Jan 2016 16:33:20 +0000 (16:33 +0000)]
Add cantunwind when unwind info does not match start of section.
bfd * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind when
address in first unwind entry does not match start of section.
tests * ld-arm/arm-elf.exp: New test.
* ld-arm/unwind-mix.d: New file.
* ld-arm/unwind-mix1.s: New file.
* ld-arm/unwind-mix2.s: New file.
H.J. Lu [Tue, 12 Jan 2016 16:34:07 +0000 (08:34 -0800)]
Sync top-level Makefile.def with GCC
2016-01-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR bootstrap/69134
* Makefile.def (mpfr): Disable assembler.
* Makefile.in: Regenerate.
Yao Qi [Tue, 12 Jan 2016 16:29:30 +0000 (16:29 +0000)]
Fix invalid conversion from void * to gdb_byte *
This patch fixes the following GDB build error in C++ mode.
gdb/nat/linux-ptrace.c: In function 'int linux_child_function(void*)':
gdb/nat/linux-ptrace.c:323:65: error: invalid conversion from 'void*' to 'gdb_byte* {aka unsigned char*}' [-fpermissive]
linux_fork_to_function (child_stack, linux_grandchild_function);
^
gdb:
2016-01-12 Yao Qi <yao.qi@linaro.org>
* nat/linux-ptrace.c (linux_child_function): Cast child_stack
to gdb_byte * and pass to linux_fork_to_function.
Mike Frysinger [Mon, 11 Jan 2016 19:12:51 +0000 (14:12 -0500)]
gdbserver: use the new gdb warning helpers
We need to use -Wno-missing-prototypes for now as much of the code
sticks externs in local files and not in common headers.
2016-01-11 Mike Frysinger <vapier@gentoo.org>
* acinclude.m4: Include new ../warning.m4 file.
* configure: Regenerated.
* configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
Mike Frysinger [Mon, 11 Jan 2016 19:05:11 +0000 (14:05 -0500)]
gdbserver: fix various warnings
Delete unused funcs, update old prototypes, and mark local funcs
as static. This doesn't cover all missing prototype warnings.
Yao Qi [Tue, 12 Jan 2016 15:18:09 +0000 (15:18 +0000)]
Change function signature passed to clone
I see the following compile error with an old bfin-uclinux gcc to
build GDBserver,
cc1: warnings being treated as errors
gdb/gdbserver/../nat/linux-ptrace.c: In function 'linux_fork_to_function':
gdb/gdbserver/../nat/linux-ptrace.c:283: error: passing argument 1 of 'clone' from incompatible pointer type
in glibc, clone's prototype is like this, and in uClibc, it is the same,
int clone(int (*fn)(void *), void *child_stack,
int flags, void *arg, ...
/* pid_t *ptid, struct user_desc *tls, pid_t *ctid */ );
so this patch changes function signature from 'void (*function) (gdb_byte *)'
to 'int (*function) (void *)'.
Note that I find Pedro advised to change argument type from 'void *'
to 'gdb_byte *' during the patch review
https://sourceware.org/ml/gdb-patches/2013-08/msg00611.html however,
I think fix compile error can justify the change back to 'void *'.
gdb:
2016-01-12 Yao Qi <yao.qi@linaro.org>
* nat/linux-ptrace.c (linux_fork_to_function): Change type
of argument 'function'.
(linux_grandchild_function): Change return type to 'int'.
Change child_stack's type to 'void *'.
(linux_child_function): Likewise.
Pedro Alves [Tue, 12 Jan 2016 15:03:11 +0000 (15:03 +0000)]
Remove trademark acknowledgements throughout
The GNU Coding Standards say:
"Please do not include any trademark acknowledgements in GNU
software packages or documentation."
gdb/ChangeLog:
2016-01-12 Pedro Alves <palves@redhat.com>
Remove use of the registered trademark symbol throughout.
gdb/gdbserver/ChangeLog:
2016-01-12 Pedro Alves <palves@redhat.com>
Remove use of the registered trademark symbol throughout.
gdb/doc/ChangeLog:
2016-01-12 Pedro Alves <palves@redhat.com>
Remove use of the registered trademark symbol throughout.
Yao Qi [Tue, 12 Jan 2016 14:59:45 +0000 (14:59 +0000)]
[DOC] Interrupt when program is stopped
This patch changes the document that interrupt (ctrl-c) is not ignored
when the program is stopped.
When the interrupt was supported in remote target, people thought interrupt
is meaningless when the program is stopped. See
https://www.sourceware.org/ml/gdb/2005-11/msg00349.html
https://www.sourceware.org/ml/gdb-patches/2005-11/msg00307.html
recently we find it is hard to preserve this feature "ignore interrupt
while program is stopped" when we fix some other bugs. See
https://sourceware.org/ml/gdb-patches/2016-01/msg00039.html
so we think we can go to the simpler approach "not ignoring ctrl-c when
program is stopped". As a result, we tweak the documentation here.
gdb/doc:
2016-01-12 Yao Qi <yao.qi@linaro.org>
* gdb.texinfo (Interrupts): Update the document on handling
interrupt when program is stopped.
Pedro Alves [Tue, 12 Jan 2016 12:30:33 +0000 (12:30 +0000)]
Test gdb.base/random-signal.exp with "attach"
This exposes the issued fixed by
2f99e8fc9cb8:
https://sourceware.org/ml/gdb-patches/2015-12/msg00423.html
to native debugging as well.
gdb/testsuite/ChangeLog:
2016-01-12 Pedro Alves <palves@redhat.com>
* gdb.base/random-signal.exp (do_test): New procedure, with body
of testcase moved in.
(top level) Call it twice, once with "run" and once with "attach".
Thomas Schwinge [Tue, 12 Jan 2016 11:53:09 +0000 (12:53 +0100)]
Hurd: Make gdb/reply_mig_hack.awk script compatible to "mawk"
The "mawk" AWK implementation did't like that regular expression:
mawk: [...]/gdb/reply_mig_hack.awk: line 98: regular expression compile failed (missing operand)
gdb/
* reply_mig_hack.awk: Rewrite one regular expression.
Alan Modra [Tue, 12 Jan 2016 07:50:26 +0000 (18:20 +1030)]
PowerPC gas test vsx3
Tweak for padding, now present for COFF.
* testsuite/gas/ppc/vsx3.d: Accept nop padding.
Cary Coutant [Tue, 12 Jan 2016 07:57:44 +0000 (23:57 -0800)]
Fix internal error when applying TLSDESC relocations with no TLS segment.
gold/
PR gold/19353
* aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
we have a TLS segment for GD-to-IE optimization.
* i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
Adjust all calls.
(Target_i386::tls_desc_gd_to_ie): Likewise.
(Target_i386::relocate_tls): Don't insist that we have a TLS segment
for TLSDESC GD-to-IE optimizations.
* x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
Adjust all calls.
(Target_x86_64::tls_desc_gd_to_ie): Likewise.
(Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
for TLSDESC GD-to-IE optimizations.
Mike Frysinger [Tue, 12 Jan 2016 06:39:47 +0000 (01:39 -0500)]
sim: mips: workaround 32-bit addr sign extensions
The mips bfd will sign extend 32-bit addresses into 64-bit values,
so if the entry happens to be 0x80000000 or higher, it is turned to
0xffffffff80000000 which points to memory that doesn't exist.
This wasn't an issue until commit
26f8bf63bf36f9062a5cc1afacf71462a
as all addresses were automatically truncated there in the translate
function to 32-bits. When we cleaned up that code, the full 64-bits
were checked leading to many test failures for mips-sde-elf targets
and such.
Cary Coutant [Fri, 11 Dec 2015 15:43:59 +0000 (07:43 -0800)]
Refactor gold to enable support for MIPS-64 relocation format.
For MIPS-64, the r_info field in the relocation format is
replaced by several individual fields, including r_sym and
r_type. To enable support for this format, I've refactored
target-independent code to remove almost all uses of the r_info
field. (I've left alone a couple of routines used only for
incremental linking, which I can update if/when the MIPS target
adds support for incremental linking.)
For routines that are already templated on a Classify_reloc class
(namely, gc_process_relocs, relocate_section, and
relocate_relocs), I've extended the Classify_reloc interface to
include sh_type (which no longer needs to be a separate template
parameter) as well as get_r_sym() and get_r_type() methods for
extracting the r_sym and r_type fields. For
scan_relocatable_relocs, I've extended the
Default_scan_relocatable_relocs class by converting it to a class
template with Classify_reloc as a template parameter. For the
remaining routines that need to access r_sym, I've added a
virtual Target::get_r_sym() method with an override for the MIPS
target.
In elfcpp, I've added Mips64_rel, etc., accessor classes and
corresponding internal data structures. The MIPS target uses
these new classes within its own Mips_classify_reloc class.
The Mips64_ accessor classes also expose the r_ssym, r_type2,
and r_type3 fields from the relocation.
These changes should be functionally the same for all but the
MIPS target.
elfcpp/
* elfcpp.h (Mips64_rel, Mips64_rel_write): New classes.
(Mips64_rela, Mips64_rela_write): New classes.
* elfcpp_internal.h (Mips64_rel_data, Mips64_rela_data): New structs.
gold/
* gc.h (get_embedded_addend_size): Remove sh_type parameter.
(gc_process_relocs): Remove sh_type template parameter.
Use Classify_reloc to access r_sym, r_type, and r_addend fields.
* object.h (Sized_relobj_file::split_stack_adjust): Add target
parameter.
(Sized_relobj_file::split_stack_adjust_reltype): Likewise.
* reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA
specializations) Remove.
* reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h.
(Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan().
(Sized_relobj_file::emit_relocs_scan_reltype): Remove.
(Sized_relobj_file::split_stack_adjust): Add target parameter.
Adjust all callers.
(Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call
Target::get_r_sym() to get r_sym field from relocations.
(Track_relocs::next_symndx): Call Target::get_r_sym().
* target-reloc.h (scan_relocs): Remove sh_type template parameter;
add Classify_reloc template parameter. Use for accessing r_sym and
r_type.
(relocate_section): Likewise.
(Default_classify_reloc): New class (renamed and moved from reloc.cc).
(Default_scan_relocatable_relocs): Remove sh_type template parameter.
(Default_scan_relocatable_relocs::Reltype): New typedef.
(Default_scan_relocatable_relocs::reloc_size): New const.
(Default_scan_relocatable_relocs::sh_type): New const.
(Default_scan_relocatable_relocs::get_r_sym): New method.
(Default_scan_relocatable_relocs::get_r_type): New method.
(Default_emit_relocs_strategy): New class.
(scan_relocatable_relocs): Replace sh_type template parameter with
Scan_relocatable_relocs class. Use it to access r_sym and r_type
fields.
(relocate_relocs): Replace sh_type template parameter with
Classify_reloc class. Use it to access r_sym and r_type fields.
* target.h (Target::is_call_to_non_split): Replace r_type parameter
with pointer to relocation. Adjust all callers.
(Target::do_is_call_to_non_split): Likewise.
(Target::emit_relocs_scan): New virtual method.
(Sized_target::get_r_sym): New virtual method.
* target.cc (Target::do_is_call_to_non_split): Replace r_type parameter
with pointer to relocation.
* aarch64.cc (Target_aarch64::emit_relocs_scan): New method.
(Target_aarch64::Relocatable_size_for_reloc): Remove.
(Target_aarch64::gc_process_relocs): Use Default_classify_reloc.
(Target_aarch64::scan_relocs): Likewise.
(Target_aarch64::relocate_section): Likewise.
(Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc):
Remove.
(Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc.
(Target_aarch64::relocate_relocs): Use Default_classify_reloc.
* arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type
template parameter.
(Target_arm::emit_relocs_scan): New method.
(Target_arm::Relocatable_size_for_reloc): Replace with...
(Target_arm::Classify_reloc): ...this.
(Target_arm::gc_process_relocs): Use Classify_reloc.
(Target_arm::scan_relocs): Likewise.
(Target_arm::relocate_section): Likewise.
(Target_arm::scan_relocatable_relocs): Likewise.
(Target_arm::relocate_relocs): Likewise.
* i386.cc (Target_i386::emit_relocs_scan): New method.
(Target_i386::Relocatable_size_for_reloc): Replace with...
(Target_i386::Classify_reloc): ...this.
(Target_i386::gc_process_relocs): Use Classify_reloc.
(Target_i386::scan_relocs): Likewise.
(Target_i386::relocate_section): Likewise.
(Target_i386::scan_relocatable_relocs): Likewise.
(Target_i386::relocate_relocs): Likewise.
* mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template
parameter.
(Mips_reloc_types): New class template.
(Mips_classify_reloc): New class template.
(Target_mips::Reltype): New typedef.
(Target_mips::Relatype): New typedef.
(Target_mips::emit_relocs_scan): New method.
(Target_mips::get_r_sym): New method.
(Target_mips::Relocatable_size_for_reloc): Replace with
Mips_classify_reloc.
(Target_mips::copy_reloc): Use Mips_classify_reloc.
(Target_mips::gc_process_relocs): Likewise.
(Target_mips::scan_relocs): Likewise.
(Target_mips::relocate_section): Likewise.
(Target_mips::scan_relocatable_relocs): Likewise.
(Target_mips::relocate_relocs): Likewise.
(mips_get_size_for_reloc): New function, factored out from
Relocatable_size_for_reloc::get_size_for_reloc.
(Target_mips::Scan::local): Use Mips_classify_reloc.
(Target_mips::Scan::global): Likewise.
(Target_mips::Relocate::relocate): Likewise.
* powerpc.cc (Target_powerpc::emit_relocs_scan): New method.
(Target_powerpc::Relocatable_size_for_reloc): Remove.
(Target_powerpc::gc_process_relocs): Use Default_classify_reloc.
(Target_powerpc::scan_relocs): Likewise.
(Target_powerpc::relocate_section): Likewise.
(Powerpc_scan_relocatable_reloc): Convert to class template.
(Powerpc_scan_relocatable_reloc::Reltype): New typedef.
(Powerpc_scan_relocatable_reloc::reloc_size): New const.
(Powerpc_scan_relocatable_reloc::sh_type): New const.
(Powerpc_scan_relocatable_reloc::get_r_sym): New method.
(Powerpc_scan_relocatable_reloc::get_r_type): New method.
(Target_powerpc::scan_relocatable_relocs): Use
Powerpc_scan_relocatable_reloc.
(Target_powerpc::relocate_relocs): Use Default_classify_reloc.
* s390.cc (Target_s390::emit_relocs_scan): New method.
(Target_s390::Relocatable_size_for_reloc): Remove.
(Target_s390::gc_process_relocs): Use Default_classify_reloc.
(Target_s390::scan_relocs): Likewise.
(Target_s390::relocate_section): Likewise.
(Target_s390::Relocatable_size_for_reloc::get_size_for_reloc):
Remove.
(Target_s390::scan_relocatable_relocs): Use Default_classify_reloc.
(Target_s390::relocate_relocs): Use Default_classify_reloc.
* sparc.cc (Target_sparc::emit_relocs_scan): New method.
(Target_sparc::Relocatable_size_for_reloc): Remove.
(Target_sparc::gc_process_relocs): Use Default_classify_reloc.
(Target_sparc::scan_relocs): Likewise.
(Target_sparc::relocate_section): Likewise.
(Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc):
Remove.
(Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc.
(Target_sparc::relocate_relocs): Use Default_classify_reloc.
* tilegx.cc (Target_tilegx::emit_relocs_scan): New method.
(Target_tilegx::Relocatable_size_for_reloc): Remove.
(Target_tilegx::gc_process_relocs): Use Default_classify_reloc.
(Target_tilegx::scan_relocs): Likewise.
(Target_tilegx::relocate_section): Likewise.
(Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc):
Remove.
(Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc.
(Target_tilegx::relocate_relocs): Use Default_classify_reloc.
* x86_64.cc (Target_x86_64::emit_relocs_scan): New method.
(Target_x86_64::Relocatable_size_for_reloc): Remove.
(Target_x86_64::gc_process_relocs): Use Default_classify_reloc.
(Target_x86_64::scan_relocs): Likewise.
(Target_x86_64::relocate_section): Likewise.
(Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc):
Remove.
(Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc.
(Target_x86_64::relocate_relocs): Use Default_classify_reloc.
* testsuite/testfile.cc (Target_test::emit_relocs_scan): New method.
Pedro Alves [Tue, 12 Jan 2016 01:12:38 +0000 (01:12 +0000)]
Reapply: List inferiors/threads/pspaces in ascending order
[This reapplies a change that was accidentally reverted with
c0ecb95f3d.]
Before:
(gdb) info threads
Id Target Id Frame
3 Thread 0x7ffff77c3700 (LWP 29035) callme () at foo.c:30
2 Thread 0x7ffff7fc4700 (LWP 29034) 0x000000000040087b in child_function_2 (arg=0x0) at foo.c:60
* 1 Thread 0x7ffff7fc5740 (LWP 29030) 0x0000003b37209237 in pthread_join (threadid=
140737353893632, thread_return=0x0) at pthread_join.c:92
After:
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7ffff7fc5740 (LWP 29030) 0x0000003b37209237 in pthread_join (threadid=
140737353893632, thread_return=0x0) at pthread_join.c:92
2 Thread 0x7ffff7fc4700 (LWP 29034) 0x000000000040087b in child_function_2 (arg=0x0) at foo.c:60
3 Thread 0x7ffff77c3700 (LWP 29035) callme () at foo.c:30
gdb/doc/ChangeLog:
2015-11-24 Pedro Alves <palves@redhat.com>
PR 17539
* gdb.texinfo (Inferiors and Programs): Adjust "maint info
program-spaces" example to ascending order listing.
(Threads): Adjust "info threads" example to ascending order
listing.
(Forks): Adjust "info inferiors" example to ascending order
listing.
gdb/ChangeLog:
2015-11-24 Pedro Alves <palves@redhat.com>
PR 17539
* inferior.c (add_inferior_silent): Append the new inferior to the
end of the list.
* progspace.c (add_program_space): Append the new pspace to the
end of the list.
* thread.c (new_thread): Append the new thread to the end of the
list.
gdb/testsuite/ChangeLog:
2015-11-24 Pedro Alves <palves@redhat.com>
PR 17539
* gdb.base/foll-exec-mode.exp: Adjust to GDB listing inferiors and
threads in ascending order.
* gdb.base/foll-fork.exp: Likewise.
* gdb.base/foll-vfork.exp: Likewise.
* gdb.base/multi-forks.exp: Likewise.
* gdb.mi/mi-nonstop.exp: Likewise.
* gdb.mi/mi-nsintrall.exp: Likewise.
* gdb.multi/base.exp: Likewise.
* gdb.multi/multi-arch.exp: Likewise.
* gdb.python/py-inferior.exp: Likewise.
* gdb.threads/break-while-running.exp: Likewise.
* gdb.threads/execl.exp: Likewise.
* gdb.threads/gcore-thread.exp: Likewise.
* gdb.threads/info-threads-cur-sal.exp: Likewise.
* gdb.threads/kill.exp: Likewise.
* gdb.threads/linux-dp.exp: Likewise.
* gdb.threads/multiple-step-overs.exp: Likewise.
* gdb.threads/next-bp-other-thread.exp: Likewise.
* gdb.threads/step-bg-decr-pc-switch-thread.exp: Likewise.
* gdb.threads/step-over-lands-on-breakpoint.exp: Likewise.
* gdb.threads/step-over-trips-on-watchpoint.exp: Likewise.
* gdb.threads/thread-find.exp: Likewise.
* gdb.threads/tls.exp: Likewise.
* lib/mi-support.exp (mi_reverse_list): Delete.
(mi_check_thread_states): No longer reverse list.
GDB Administrator [Tue, 12 Jan 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in
Jan Kratochvil [Mon, 11 Jan 2016 21:27:15 +0000 (22:27 +0100)]
testsuite: i386 regression for funcargs.exp
3ca22649a6dfeb71058c33be4d0542b98f1f0ff5 is the first bad commit
commit
3ca22649a6dfeb71058c33be4d0542b98f1f0ff5
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Mon Dec 21 12:51:54 2015 -0500
Remove HP-UX references fom testsuite
@@ -1013,13 +1013,6 @@ proc localvars_in_indirect_call { } {
#
gdb_test_multiple "finish" "finish from indirectly called function" {
- -re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" {
- #On hppa2.0w-hp-hpux11.00, gdb finishes at one line earlier than
- #hppa1.1-hp-hpux11.00. Therefore, an extra "step" is necessary
- #to continue the test.
- send_gdb "step\n"
- exp_continue
- }
-re ".*\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" {
pass "finish from indirectly called function"
}
->
finish^M
Run till exit from #0 call0a (c=97 'a', s=1, i=2, l=3) at ./gdb.base/funcargs.c:82^M
0x0804a189 in main () at ./gdb.base/funcargs.c:583^M
583 (*pointer_to_call0a) (c, s, i, l); /* First step into call0a. */^M
-(gdb) step^M
-584 (*pointer_to_call0a) (c, s, i, l); /* Second step into call0a. */^M
-(gdb) PASS: gdb.base/funcargs.exp: finish from indirectly called function
+(gdb) FAIL: gdb.base/funcargs.exp: finish from indirectly called function
step^M
-call0a (c=97 'a', s=1, i=2, l=3) at ./gdb.base/funcargs.c:82^M
-82 c = 'a';^M
-(gdb) PASS: gdb.base/funcargs.exp: stepping into indirectly called function
+584 (*pointer_to_call0a) (c, s, i, l); /* Second step into call0a. */^M
+(gdb) FAIL: gdb.base/funcargs.exp: stepping into indirectly called function
At least on x86_64 with testsuite in -m32 (expecting native i386 would be the
same).
Pedro Alves:
The difference is that with newer GCC there's an extra instruction
after the call which is still assigned to line 583:
$ diff -up /tmp/4.8.3 /tmp/6.0.0 -U 1000
--- /tmp/4.8.3 2016-01-11 12:37:39.
611089156 +0000
+++ /tmp/6.0.0 2016-01-11 13:21:00.
021127976 +0000
@@ -1,27 +1,30 @@
583 (*pointer_to_call0a) (c, s, i, l); /* First step into call0a. */
mov 0x804d060,%ebx
mov 0x804d050,%ecx
movzwl 0x804d040,%eax
movswl %ax,%edx
movzbl 0x804d030,%eax
movsbl %al,%eax
- mov %ebx,0xc(%esp)
- mov %ecx,0x8(%esp)
- mov %edx,0x4(%esp)
- mov %eax,(%esp)
- mov 0x7c(%esp),%eax
+ push %ebx
+ push %ecx
+ push %edx
+ push %eax
+ mov -0x1c(%ebp),%eax
call *%eax
+ add $0x10,%esp
584 (*pointer_to_call0a) (c, s, i, l); /* Second step into call0a. */
mov 0x804d060,%ebx
mov 0x804d050,%ecx
movzwl 0x804d040,%eax
movswl %ax,%edx
movzbl 0x804d030,%eax
movsbl %al,%eax
- mov %ebx,0xc(%esp)
- mov %ecx,0x8(%esp)
- mov %edx,0x4(%esp)
- mov %eax,(%esp)
- mov 0x7c(%esp),%eax
+ push %ebx
+ push %ecx
+ push %edx
+ push %eax
+ mov -0x1c(%ebp),%eax
call *%eax
+ add $0x10,%esp
+
I don't know why -m32 changed to push/add instead of mov while 64-bit hasn't.
This is most likely needed on non-x86 ports as well.
gdb/testsuite/ChangeLog
2016-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Pedro Alves <palves@redhat.com>
* gdb.base/funcargs.exp (finish from indirectly called function):
Reintroduce the case for 'First'.
Jan Kratochvil [Mon, 11 Jan 2016 21:20:16 +0000 (22:20 +0100)]
testsuite: Regression for foll-vfork.exp
fe33faff35a8ee19db823149e764e3373e603bb9 is the first bad commit
commit
fe33faff35a8ee19db823149e764e3373e603bb9
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Tue Dec 22 10:52:31 2015 -0500
Remove HP-UX reference in foll-vfork.exp
FAIL: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork
FAIL: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork
FAIL: gdb.base/foll-vfork.exp: exit: vfork parent follow, finish after tcatch vfork: continue to vfork
FAIL: gdb.base/foll-vfork.exp: exit: vfork child follow, finish after tcatch vfork: continue to vfork
It happens for plain gdb.base/foll-vfork.exp runtest on Fedora 23 x86_64.
-Temporary catchpoint 2 (vforked process 24562), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M
+Temporary catchpoint 2 (vforked process 25345), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M
52 pushq %rdi^M
Current language: auto^M
The current source language is "auto; currently asm".^M
-(gdb) PASS: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork
+(gdb) FAIL: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork
-Temporary catchpoint 2 (vforked process 24629), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M
+Temporary catchpoint 2 (vforked process 25411), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M
52 pushq %rdi^M
Current language: auto^M
The current source language is "auto; currently asm".^M
-(gdb) PASS: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork
+(gdb) FAIL: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork
So I have reverted it and just simplified the comment.
The third case is not necessary during testing but I have changed back all the
3 cases.
Pedro Alves:
I know it was that way before, but would you mind moving this to a helper
proc.
gdb/testsuite/ChangeLog
2016-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Pedro Alves <palves@redhat.com>
* gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow)
(tcatch_vfork_then_child_follow_exec)
(tcatch_vfork_then_child_follow_exit): Revert back DWARF vfork
identification.
Jan Kratochvil [Mon, 11 Jan 2016 21:12:16 +0000 (22:12 +0100)]
testsuite: Fix false FAILs on too long base directory
I was getting
gu (print arg0)^M
= 0x7fffffffdafb
"/unsafebuild-x86_64-redhat-linux-gnu/gdb/testsuite.unix.-m64/outputs/gdb.guile/scm-value/scm-"...^M
(gdb) FAIL: gdb.guile/scm-value.exp: verify dereferenced value
python print (arg0)^M
0x7fffffffdafd
"/unsafebuild-x86_64-redhat-linux-gnu/gdb/testsuite.unix.-m64/outputs/gdb.python/py-value/py-v"...^M
(gdb) FAIL: gdb.python/py-value.exp: verify dereferenced value
and also:
(gdb) p argv[0]^M
$2 = 0x7fffffffd832 "/home/jkratoch/redhat/gdb-test-", 'x' <repeats 169
times>...^M
(gdb) FAIL: gdb.guile/scm-value.exp: argv[0] should be available on this
target
gdb/testsuite/ChangeLog
2016-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.guile/scm-value.exp (test_value_in_inferior): Set print elements
and repeats to unlimited.
* gdb.python/py-value.exp: Likewise.
* lib/gdb.exp (gdb_has_argv0): Save and temporarily set print elements
and repeats to unlimited.
Mike Frysinger [Thu, 7 Jan 2016 11:06:04 +0000 (06:06 -0500)]
gdb: split out warnings helpers
This will allow the sim tree to use the same set of warnings.
The new code in warning.m4 is exactly the same (other than the
AC_DEFUN wrapping).
Peter Bergner [Mon, 11 Jan 2016 17:54:58 +0000 (11:54 -0600)]
Delete opcodes that have been removed from ISA 3.0.
opcodes/
* ppc-opc.c <xscmpnedp>: Delete.
<xvcmpnedp>: Likewise.
<xvcmpnedp.>: Likewise.
<xvcmpnesp>: Likewise.
<xvcmpnesp.>: Likewise.
gas/
* testsuite/gas/ppc/power9.d <xscmpnedp, xvcmpnedp, xvcmpnedp.,
xvcmpnesp, xvcmpnesp.>: Delete tests.
* testsuite/gas/ppc/power9.s: Likewise.
* testsuite/gas/ppc/vsx3.d: Likewise.
* testsuite/gas/ppc/vsx3.s: Likewise.
Nick Clifton [Mon, 11 Jan 2016 11:06:56 +0000 (11:06 +0000)]
Import changes made to files shared with the FSF GCC project.
Import the following changes from the GCC mainline:
2015-11-13 Tsvetkova Alexandra <aleksandra.tsvetkova@intel.com>
* configure.ac: Enable libmpx by default.
* configure: Regenerated.
2015-11-19 Martin Liska <mliska@suse.cz>
* .gitignore: Add .clang-format to ignored files.
* Makefile.tpl: Add clang-format.
* Makefile.in: Regenerate.
2015-12-01 Andreas Tobler <andreast@gcc.gnu.org>
PR libffi/65726
* Makefile.def (lang_env_dependencies): Make libffi depend
on cxx.
* Makefile.in: Regenerate.
2015-12-02 Ian Lance Taylor <iant@google.com>
PR go/66147
* Makefile.tpl (HOST_EXPORTS): Add XGCC_FLAGS_FOR_TARGET.
* Makefile.in: Regenerate.
2015-12-17 Nathan Sidwell <nathan@acm.org>
* config/isl.m4 (ISL_CHECK_VERSION): Add gmp libs.
* configure: Regenerate.
2015-12-17 Sebastian Pop <s.pop@samsung.com>
* Makefile.in: Replace ISL with isl.
* Makefile.tpl: Same.
* config/isl.m4: Same.
* configure.ac: Same.
* contrib/download_prerequisites: Same.
* configure: Regenerate.
2016-01-01 Ben Elliston <bje@gnu.org>
* config.guess: Import version 2016-01-01.
* config.sub: Likewise.
include 2016-01-07 Mike Frysinger <vapier@gentoo.org>
* longlong.h: Change !__SHMEDIA__ to
(!defined (__SHMEDIA__) || !__SHMEDIA__).
Change __SHMEDIA__ to defined (__SHMEDIA__) && __SHMEDIA__.
Mike Frysinger [Mon, 4 Jan 2016 00:11:06 +0000 (19:11 -0500)]
sim: config: do not try to align settings
We try to align the output for a few settings, but not most of them.
Drop the aligning entirely to be lazy.
GDB Administrator [Mon, 11 Jan 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in
Mike Frysinger [Sat, 9 Jan 2016 09:09:35 +0000 (04:09 -0500)]
sim: move many common settings from CPPFLAGS to config.h
Rather than stuffing the command line with a bunch of -D flags, start
moving things to config.h which is managed by autoheader. This makes
the makefile a bit simpler and the build output tighter, and it makes
the migration to automake easier as there are fewer vars to juggle.
We'll want to move the other options out too, but it'll take more work.
Mike Frysinger [Sun, 10 Jan 2016 22:49:48 +0000 (17:49 -0500)]
sim: drop unused SIM_AC_OPTION_PACKAGES
This was imported from the ppc sim, but that was only used to control
a single file, and that is already governed by the hw models. There's
no need to have a sep configure option here, especially since none of
the other sims are using it. Even when the code is enabled, there's
no runtime overhead.
Mike Frysinger [Sun, 10 Jan 2016 21:52:25 +0000 (16:52 -0500)]
sim: allow the environment configure option everywhere
Currently ports have to call SIM_AC_OPTION_ENVIRONMENT explicitly in
order to make the configure flag available. There's no real reason
to not allow this flag for all ports, so move it to the common sim
macro. This way we get standard behavior across all ports too.
Mike Frysinger [Sun, 10 Jan 2016 20:55:44 +0000 (15:55 -0500)]
sim: allow the assert configure option everywhere
Currently ports have to call SIM_AC_OPTION_ASSERT explicitly in order
to make the configure flag available, which none of them do. There's
no real reason to not allow this flag for all ports, so move it to the
common sim macro. This way we get standard behavior across all ports.
Mike Frysinger [Sun, 10 Jan 2016 08:50:08 +0000 (03:50 -0500)]
sim: drop targ-vals.def->nltvals.def indirection
We don't have alternative nltvals.def files, so always symlinking
the targ-vals.def file to it doesn't gain us anything. It does
make the build more complicated though and a pain to convert to
something newer (like automake). Drop the symlinking entirely.
In the future, we'll want to explode this file anyways into the
respective arch dirs so things can be selected dynamically at
runtime, so it's not like we'll be bringing this back.
Mike Frysinger [Sun, 10 Jan 2016 07:49:15 +0000 (02:49 -0500)]
sim: mips: drop SIM_AC_OPTION_SMP call
No other port calls this macro directly, and mips has it hardcoded
to the default -- disabling smp. In the future we'll enable this
for all targets in common code, so tidy up the mips code now.
Mike Frysinger [Sat, 9 Jan 2016 10:58:01 +0000 (05:58 -0500)]
sim: allow the inline configure option everywhere
Currently ports have to call SIM_AC_OPTION_INLINE explicitly in order
to make the configure flag available. There's no real reason to not
allow this flag for all ports, so move it to the common sim macro.
This way we get standard behavior across all ports too.
Mike Frysinger [Sat, 9 Jan 2016 10:13:37 +0000 (05:13 -0500)]
sim: drop --enable-sim-{regparm,stdcall} options
These options were never exposed for most sims (just the ppc one),
and they are really only useful on 32-bit x86 systems. Considering
modern systems tend to be 64-bit x86_64 and how well modern compilers
are at optimizing code, these have outlived their usefulness.
Mike Frysinger [Sat, 9 Jan 2016 09:00:53 +0000 (04:00 -0500)]
sim: drop --enable-sim-cflags option
No other sub directory provides such a configuration option, so
drop it from the sim dir as well. This cleans up a good bit of
code in the process.
If people want to use custom flags for just the sim, they can
still run configure+make by hand in the sim subdir and use the
normal CFLAGS settings.
GDB Administrator [Sun, 10 Jan 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in
Mike Frysinger [Sat, 9 Jan 2016 01:27:46 +0000 (20:27 -0500)]
sim: stop configuring common subdir
Now that cconfig.h doesn't exist, there's no need to build in the common
subdir anymore. We leave the configure/Makefile files in there as there
is a helper for developers to generate the nltvals.def file. Once that
gets cleaned up in the future though, we can drop the build logic too.
Mike Frysinger [Sat, 9 Jan 2016 01:23:37 +0000 (20:23 -0500)]
sim: drop common/cconfig.h in favor of a single config.h
The common subdir sets up a cconfig.h file to hold checks for the common
code. In practice, most files still end up using config.h instead which
just leads to confusion.
Merge all the configure checks that went into cconfig.h into SIM_AC_COMMON
so we can drop the cconfig.h file altogether. Now there is only a single
config.h file like normal.
GDB Administrator [Sat, 9 Jan 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in
Jan Kratochvil [Fri, 8 Jan 2016 19:07:02 +0000 (20:07 +0100)]
Fix gdb.multi/base.exp testsuite regression
Regressed by:
commit
762f774785f4ef878ac4c831e1f4733dc957234d
Author: Pedro Alves <palves@redhat.com>
Date: Thu Dec 10 16:21:06 2015 +0000
Stop using nowarnings in gdb/testsuite/gdb.multi/
+gdb compile failed, gdb/testsuite/gdb.multi/hello.c: In function 'commonfun':
+gdb/testsuite/gdb.multi/hello.c:24:19: warning: implicit declaration of function 'bar' [-Wimplicit-function-declaration]
+ int commonfun() { bar(); } /* from hello */
+ ^
+gdb/testsuite/gdb.multi/hello.c: At top level:
+gdb/testsuite/gdb.multi/hello.c:26:1: warning: return type defaults to 'int' [-Wimplicit-int]
+ bar()
+ ^
+gdb/testsuite/gdb.multi/hello.c:32:1: warning: return type defaults to 'int' [-Wimplicit-int]
+ hello(int x)
+ ^
+gdb/testsuite/gdb.multi/hello.c:38:1: warning: return type defaults to 'int' [-Wimplicit-int]
+ main()
+ ^
+UNTESTED: gdb.multi/base.exp: base.exp
gdb/testsuite/ChangeLog
2016-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.multi/goodbye.c: Fix compilation warnings by adding return types
and reordering the functions.
* gdb.multi/hangout.c: Likewise.
* gdb.multi/hello.c: Likewise.
Simon Marchi [Fri, 8 Jan 2016 15:22:17 +0000 (10:22 -0500)]
perf testsuite: python 3 fixes
There are a few errors when trying to run the performance testsuite with
Python 3. This commit fixes them.
In Python 2, it was possible to use relative imports (importing a module
relative to the current one). In Python 3 it isn't. So I use
absolute_import from the __future__ module, which allows Python 2 to
behave like Python 3, and use the Python 3 syntax.
In Python 3, dict.iterkeys doesn't exist anymore. Using dict.keys is a
good compromise in this case.
gdb/testsuite/ChangeLog:
* gdb.perf/lib/perftest/perftest.py: Change relative imports to
absolute.
(SingleStatisticTestResult.report): Use dict.keys instead of
dict.iterkeys.
Yao Qi [Fri, 8 Jan 2016 11:06:00 +0000 (11:06 +0000)]
Change SIGINT handler for extension languages only when target terminal is ours
I see a timeout in gdb.base/random-signal.exp,
Continuing.^M
PASS: gdb.base/random-signal.exp: continue
^CPython Exception <type 'exceptions.KeyboardInterrupt'> <type
exceptions.KeyboardInterrupt'>: ^M
FAIL: gdb.base/random-signal.exp: stop with control-c (timeout)
it can be reproduced by running random-signal.exp with native-gdbserver
in a loop, like this, and the fail will be shown in about 20 runs,
$ (set -e; while true; do make check RUNTESTFLAGS="--target_board=native-gdbserver random-signal.exp"; done)
In the test, the program is being single-stepped for software watchpoint,
and in each internal stop, python unwinder sniffer is used,
#0 pyuw_sniffer (self=<optimised out>, this_frame=<optimised out>, cache_ptr=0xd554f8) at /home/yao/SourceCode/gnu/gdb/git/gdb/python/py-unwind.c:608
#1 0x00000000006a10ae in frame_unwind_try_unwinder (this_frame=this_frame@entry=0xd554e0, this_cache=this_cache@entry=0xd554f8, unwinder=0xecd540)
at /home/yao/SourceCode/gnu/gdb/git/gdb/frame-unwind.c:107
#2 0x00000000006a143f in frame_unwind_find_by_frame (this_frame=this_frame@entry=0xd554e0, this_cache=this_cache@entry=0xd554f8)
at /home/yao/SourceCode/gnu/gdb/git/gdb/frame-unwind.c:163
#3 0x000000000069dc6b in compute_frame_id (fi=0xd554e0) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:454
#4 get_prev_frame_if_no_cycle (this_frame=this_frame@entry=0xd55410) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1781
#5 0x000000000069fdb9 in get_prev_frame_always_1 (this_frame=0xd55410) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1955
#6 get_prev_frame_always (this_frame=this_frame@entry=0xd55410) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1971
#7 0x00000000006a04b1 in get_prev_frame (this_frame=this_frame@entry=0xd55410) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:2213
when GDB goes to python extension, or other language extension, the
SIGINT handler is changed, and is restored when GDB leaves extension
language. GDB only stays in extension language for a very short period
in this case, but if ctrl-c is pressed at that moment, python extension
will handle the SIGINT, and exceptions.KeyboardInterrupt is shown.
Language extension is used in GDB side rather than inferior side,
so GDB should only change SIGINT handler for extension language when
the terminal is ours (not inferior's). This is what this patch does.
With this patch applied, I run random-signal.exp in a loop for 18
hours, and no fail is shown.
gdb:
2016-01-08 Yao Qi <yao.qi@linaro.org>
* extension.c: Include target.h.
(set_active_ext_lang): Only call install_gdb_sigint_handler,
check_quit_flag, and set_quit_flag if target_terminal_is_ours
returns false.
(restore_active_ext_lang): Likewise.
* target.c (target_terminal_is_ours): New function.
* target.h (target_terminal_is_ours): Declare.
Yao Qi [Fri, 8 Jan 2016 11:06:00 +0000 (11:06 +0000)]
Check input interrupt first when reading packet
Hi,
I see timeout in one of several runs of random-signal.exp like this,
$ (set -e; while true; do make check RUNTESTFLAGS="--target_board=native-gdbserver random-signal.exp"; done)
In about every five runs, we can see a fail,
PASS: gdb.base/random-signal.exp: continue
^CFAIL: gdb.base/random-signal.exp: stop with control-c (timeout)
after some investigation, I find '\003' may be discarded by GDBserver when
it is expecting '$'. In GDB side, both normal packets and '\003' are sent
via function send, but GDBserver may receive them at any time, that is to
say, in the receive buffer in GDBserver, '\003' may appear before or after
normal packet. However, current GDBserver doesn't handle this case.
With this patch applied, I don't see this fail in multiple runs.
Although there is still timeout fail, that is a different problem, the
next patch will fix it.
gdb/gdbserver:
2016-01-08 Yao Qi <yao.qi@linaro.org>
* remote-utils.c (getpkt): If c is '\003', call target hook
request_interrupt.
Andreas Schwab [Fri, 8 Jan 2016 10:38:00 +0000 (11:38 +0100)]
m68k: fix constraints of move.[bw] for ISA_B/C
For ISA_B/C only the combination #,d(An) is allowed in addition to the
ISA_A combinations for move.b and move.w (and pc-relative is never
allowed as destination).
opcodes/
PR gas/13050
* m68k-opc.c (moveb, movew): For ISA_B/C only allow #,d(An) in
addition to ISA_A.
gas/
PR gas/13050
* testsuite/gas/m68k/all.exp: Add tests p13050-1 and p13050-2.
* testsuite/gas/m68k/p13050-1.s: New file.
* testsuite/gas/m68k/p13050-2.d: New file.
* testsuite/gas/m68k/p13050-2.s: New file.
Jiong Wang [Fri, 8 Jan 2016 09:47:24 +0000 (09:47 +0000)]
[ARM] PR ld/19368: Add missing relocation type class for R_ARM_IRELATIVE
2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
Jiong Wang <jiong.wang@arm.com>
PR ld/19368
bfd/
* elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
reloc_class_ifunc.
ld/
* testsuite/ld-arm/ifunc-3.rd: Update expected result.
* testsuite/ld-arm/ifunc-4.rd: Likewise.
* testsuite/ld-arm/ifunc-9.rd: Likewise.
* testsuite/ld-arm/ifunc-10.rd: Likewise.
* testsuite/ld-arm/ifunc-12.rd: Likewise.
* testsuite/ld-arm/ifunc-13.rd: Likewise.
GDB Administrator [Fri, 8 Jan 2016 00:00:21 +0000 (00:00 +0000)]
Automatic date update in version.in
Maciej W. Rozycki [Thu, 7 Jan 2016 19:12:44 +0000 (19:12 +0000)]
MIPS: Complete `status' to `err' renaming in `mips_breakpoint_from_pc'
Complement commit
d09f2c3f [target_read_memory&co: no longer return
target_xfer_status] and apply the same change made to the big-endian leg
of the function to the little-endian leg as well.
gdb/
* mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
to `err' in the little-endian leg.
Mike Frysinger [Mon, 4 Jan 2016 00:11:58 +0000 (19:11 -0500)]
sim: config: drop use of __DATE__/__TIME__
These don't add a whole lot of useful info, and people don't like them as
it makes builds unreproducible, so just drop them.
Mike Frysinger [Sun, 3 Jan 2016 06:51:44 +0000 (01:51 -0500)]
sim: sim_{create_inferior,open,parse_args}: constify argv/env slightly
2016-01-03 Mike Frysinger <vapier@gentoo.org>
* sim-options.c (sim_parse_args): Mark argv array const.
* sim-options.h (sim_parse_args): Likewise.
GDB Administrator [Thu, 7 Jan 2016 00:00:10 +0000 (00:00 +0000)]
Automatic date update in version.in
Maciej W. Rozycki [Wed, 6 Jan 2016 18:31:23 +0000 (18:31 +0000)]
MIPS/include: opcode/mips.h: Add a summary of MIPS16 operand codes
include/
* opcode/mips.h: Add a summary of MIPS16 operand codes.
Yao Qi [Wed, 6 Jan 2016 15:03:41 +0000 (15:03 +0000)]
Make {arm,thumb}_get_next_pcs_raw static
This patch makes arm_get_next_pcs_raw and thumb_get_next_pcs_raw
static.
gdb:
2016-01-06 Yao Qi <yao.qi@linaro.org>
* arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some
lines below.
(thumb_get_next_pcs_raw): Make it static.
(arm_get_next_pcs_raw): Likewise.
* arch/arm-get-next-pcs.h (thumb_get_next_pcs_raw): Remove the
declaration.
(arm_get_next_pcs_raw): Likewise.
Yao Qi [Wed, 6 Jan 2016 12:11:41 +0000 (12:11 +0000)]
[ARM/AArch64] Fix -Werror=unused-const-variable warnings in GDBserver
This patch fixes gcc warning when build ARM GDBserver and AArch64
GDBserver,
AArch64 GDBserver:
gdb/gdbserver/linux-aarch32-low.h:36:29: error: 'thumb2_breakpoint' defined but not used [-Werror=unused-const-variable]
static const unsigned short thumb2_breakpoint[] = { 0xf7f0, 0xa000 };
^
gdb/gdbserver/linux-aarch32-low.h:34:29: error: 'thumb_breakpoint' defined but not used [-Werror=unused-const-variable]
static const unsigned short thumb_breakpoint = 0xde01;
^
gdb/gdbserver/linux-aarch32-low.h:28:28: error: 'arm_breakpoint' defined but not used [-Werror=unused-const-variable]
static const unsigned long arm_breakpoint = arm_eabi_breakpoint;
^
cc1: all warnings being treated as errors
ARM GDBserver:
gdb/gdbserver/linux-aarch32-low.h:34:29: error: 'thumb_breakpoint' defined but not used [-Werror=unused-const-variable]
static const unsigned short thumb_breakpoint = 0xde01;
^~~~~~~~~~~~~~~~
gdb/gdbserver/linux-aarch32-low.h:28:28: error: 'arm_breakpoint' defined but not used [-Werror=unused-const-variable]
static const unsigned long arm_breakpoint = arm_eabi_breakpoint;
^~~~~~~~~~~~~~
by simply moving these macros and variables to
linux-aarch32-low.c and only declare thumb2_breakpoint in
linux-aarch32-low.h, which is not perfect, and reveals some issues
in recent arm GDBserver software single step changes. I'll post
follow-up patches.
gdb/gdbserver:
2016-01-06 Yao Qi <yao.qi@linaro.org>
* linux-aarch32-low.h (arm_abi_breakpoint): Move to
linux-aarch32-low.c.
(arm_eabi_breakpoint, arm_breakpoint): Likewise.
(arm_breakpoint_len, thumb_breakpoint_len): Likewise.
(thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
(thumb2_breakpoint): Declare.
* linux-aarch32-low.c (arm_abi_breakpoint): Moved from
linux-aarch32-low.h.
(arm_eabi_breakpoint, arm_breakpoint): Likewise.
(arm_breakpoint_len, thumb_breakpoint_len): Likewise.
(thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
Andrew Burgess [Tue, 5 Jan 2016 14:46:39 +0000 (14:46 +0000)]
bfd/arc: Add R_ prefix to all relocation names
The convention within for relocation names is that they start with the
string "R_", however, this is not so for ARC for the display names of
relocations, however, internally, the names for the relocations types do
have the 'R_' prefix. I suspect that the missing 'R_' on the output
strings was an oversight, as I can't see any comment to the contrary.
To bring ARC into line with other targets, this commit adds the 'R_'
prefix to the output strings used for relocation names, and updates all
of the assembler tests where this was exposed.
bfd/ChangeLog:
* elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
place 'R_' before the reloc name returned.
(elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
the relocation string.
gas/ChangeLog:
* testsuite/gas/arc/adc.d: Add 'R_' prefix to relocation names.
* testsuite/gas/arc/add.d: Likewise.
* testsuite/gas/arc/and.d: Likewise.
* testsuite/gas/arc/asl.d: Likewise.
* testsuite/gas/arc/asr.d: Likewise.
* testsuite/gas/arc/bic.d: Likewise.
* testsuite/gas/arc/extb.d: Likewise.
* testsuite/gas/arc/extw.d: Likewise.
* testsuite/gas/arc/j.d: Likewise.
* testsuite/gas/arc/jl.d: Likewise.
* testsuite/gas/arc/ld2.d: Likewise.
* testsuite/gas/arc/lsr.d: Likewise.
* testsuite/gas/arc/mov.d: Likewise.
* testsuite/gas/arc/or.d: Likewise.
* testsuite/gas/arc/pcl-relocs.d: Likewise.
* testsuite/gas/arc/pcrel-relocs.d: Likewise.
* testsuite/gas/arc/pic-relocs.d: Likewise.
* testsuite/gas/arc/plt-relocs.d: Likewise.
* testsuite/gas/arc/rlc.d: Likewise.
* testsuite/gas/arc/ror.d: Likewise.
* testsuite/gas/arc/rrc.d: Likewise.
* testsuite/gas/arc/sbc.d: Likewise.
* testsuite/gas/arc/sda-relocs.d: Likewise.
* testsuite/gas/arc/sda-relocs2.d: Likewise.
* testsuite/gas/arc/sexb.d: Likewise.
* testsuite/gas/arc/sexw.d: Likewise.
* testsuite/gas/arc/st.d: Likewise.
* testsuite/gas/arc/sub.d: Likewise.
* testsuite/gas/arc/tls-relocs.d: Likewise.
* testsuite/gas/arc/xor.d: Likewise.
Pedro Alves [Wed, 6 Jan 2016 11:31:52 +0000 (11:31 +0000)]
Fix gdb.python/py-infthread.exp test message typo
gdb/testsuite/ChangeLog:
2016-01-06 Pedro Alves <palves@redhat.com>
* gdb.python/py-infthread.exp: Fix typo. Expect t0.num to be 1.
Joel Brobecker [Wed, 6 Jan 2016 05:38:21 +0000 (09:38 +0400)]
Change copyright owner to FSF in sim/testsuite/sim/mips/hilo-hazard-4.s
sim/testsuite/sim/mips/ChangeLog:
* hilo-hazard-4.s: Change copyright ownder to FSF.
Mike Frysinger [Wed, 6 Jan 2016 04:23:52 +0000 (23:23 -0500)]
gdb: change version stamp to git
GDB Administrator [Wed, 6 Jan 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in
Mike Frysinger [Sun, 3 Jan 2016 06:30:32 +0000 (01:30 -0500)]
libiberty: {count,dup,write}argv: constify argv input slightly
Would be more useful if we could use "const char * const *", but there's
a long standing bug where gcc warns about incompatible pointers when you
try to pass in "char **". We can at least constify the array itself as
gcc will not warn in that case.
Mike Frysinger [Sun, 3 Jan 2016 06:29:03 +0000 (01:29 -0500)]
libiberty: dupargv: rewrite to use xstrdup
This func is basically open coding the xstrdup function, so gut it
and use it directly.
Patrick Palka [Mon, 28 Dec 2015 22:00:14 +0000 (22:00 +0000)]
libiberty: Tweak the documentation of libiberty's xcrc32 function
In some places the xcrc32 documentation refers to GDB's own crc32
implementation, but GDB no longer has its own crc32 implementation.
It now uses libiberty's xcrc32 throughout. So this patch removes
these references to GDB's now-nonexistent crc32 implementation.
Also, there appears to be a bug in the table-generation program embedded
within the documentation. When the variable "int i" is >= 128, the
computation "i << 24" shifts a one bit into the sign bit (assuming a
32-bit int), which is UB. To avoid this UB, I think it is sufficient to
make the induction variables i and j have type unsigned int. This bug
seems latent, however. I ran the program before and after this change
and the table output is the same.
Nick Clifton [Mon, 21 Dec 2015 08:23:35 +0000 (08:23 +0000)]
libiberty: fix warnings about left shifting a negative value.
GCC PR 66827 reports some problems with left shifting a negative
value:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66827
Of the problems reported only two remain - in libiberty/regex.c:
libiberty/regex.c:6970:11: runtime error: left shift of negative value -1
libiberty/regex.c:7165:4: runtime error: left shift of negative value -1
The patch below fixes these errors by casting the value to be shifted
to unsigned before the shift occurs.
No regressions were found in the libiberty testsuite or bootstrapping
gcc (on an x86_64 target).
Mike Frysinger [Sat, 2 Jan 2016 08:11:44 +0000 (03:11 -0500)]
gdb: score: drop sim file check
There has never been a GNU/sim port for the S+Core architecture.
It was added to support private code that has (and most likely
never will) see the light of day [1]. Punt this as we don't do
this for other people. If you want to maintain a proprietary
internal build, then that's not really our problem.
[1] https://sourceware.org/ml/gdb-patches/2009-03/msg00390.html
Mike Frysinger [Mon, 4 Jan 2016 05:25:46 +0000 (00:25 -0500)]
sim: msp430: drop duplicate sim_load_file call
There's no need, or desire, to call sim_load_file from sim_open. The
higher levels (gdb/run) take care of calling sim_load for us already.
Mike Frysinger [Thu, 31 Dec 2015 04:26:05 +0000 (23:26 -0500)]
sim: aarch64: switch to common disassembler tracing
The output should largely be the same.
Mike Frysinger [Thu, 31 Dec 2015 04:20:23 +0000 (23:20 -0500)]
sim: bfin: add support disasm tracing
Mike Frysinger [Thu, 31 Dec 2015 04:19:01 +0000 (23:19 -0500)]
sim: msp430: switch to common disassembler tracing
The output format is a bit different, but the new form matches all the
other trace lines. Otherwise, it should be functionally equivalent.
Mike Frysinger [Thu, 31 Dec 2015 04:17:58 +0000 (23:17 -0500)]
sim: trace: add support for disassembling
Some targets have started to add support for calling the disassembler
automatically when executing code. Add support for that directly into
the trace core.
Nick Clifton [Tue, 5 Jan 2016 16:49:26 +0000 (16:49 +0000)]
Add myself as the maintainer for the AArch64.
Nick Clifton [Tue, 5 Jan 2016 16:43:58 +0000 (16:43 +0000)]
Fix the execution of the MSP430 simulator testsuite.
ld * emulparams/msp430elf.sh (RAM_START): Move to 0x500 - above the
MSP430 hardware multiply address range.
* scripttempl/elf32msp430.sc (__romdatastart): Define.
(__romdatacopysize): Define.
* scripttempl/elf32msp430_3.sc: Likewise.
tests * testutils.inc (__pass): Use the LMA addresses of the _passmsg
symbol.
(__fail): Likewise.
Pedro Alves [Tue, 5 Jan 2016 11:12:31 +0000 (11:12 +0000)]
Add missing ChangeLog entry bit
gdb/ChangeLog:
PR sim/13418
* rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
of WITH_SIM.
Pedro Alves [Tue, 5 Jan 2016 11:03:40 +0000 (11:03 +0000)]
Fix PR sim/13418: building with --enable-targets=all fails
Multitarget builds currently fail when:
(1) simulator support is enabled (the main --target supports target sim)
(2) powerpc is included in the --enable-targets list
(3) powerpc is not the main/default target (--target)
This is because the powerpc sim provides a non-standard API function
sim_spr_register_name which gdb/rs6000-tdep.c utilizes. Since the sim
does not yet support multitarget, only the sim (if one exists) for the
main target is built. When that target isn't powerpc, this function
is not available leading to linking errors:
rs6000-tdep.c:(.text+0x1e34d): undefined reference to
`sim_spr_register_name'
Fix this by only using that API if the sim linked in is the powerpc
sim.
gdb/ChangeLog:
2016-01-05 Pedro Alves <palves@redhat.com>
PR sim/13418
* configure.ac: Define WITH_PPC_SIM when linking in the sim and
the target is powerpc*.
* configure: Regenerate.
* config.in: Regenerate.
Mike Frysinger [Tue, 5 Jan 2016 03:32:49 +0000 (22:32 -0500)]
sim: use STATE_MAGIC helper
Mike Frysinger [Tue, 5 Jan 2016 03:24:03 +0000 (22:24 -0500)]
sim: unify min/max macros
Import defines from gdb/defs.h to the sim core so we can delete the
various copies that already exist.
Tristan Gingold [Wed, 9 Dec 2015 11:34:45 +0000 (12:34 +0100)]
sim: aarch64: drop syscall.h include to fix build
The simulator is including syscall.h which is not standard and apparently
not required (builds correctly without it on my machine).
GDB Administrator [Tue, 5 Jan 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in
Maciej W. Rozycki [Mon, 4 Jan 2016 23:35:03 +0000 (23:35 +0000)]
MIPS/LD: Convert ELF linker emulation option macros to an enum
ld/
* emultempl/mipself.em (PARSE_AND_LIST_PROLOGUE): Convert
OPTION_INSN32 and OPTION_NO_INSN32 macros to an enum.
Maciej W. Rozycki [Mon, 4 Jan 2016 23:32:34 +0000 (23:32 +0000)]
MIPS/BFD: Factor out ABI flag merging
Factor out the parts of `_bfd_mips_elf_merge_private_bfd_data'
responsible for ABI flag merging to `mips_elf_merge_obj_abiflags'. No
functional change.
bfd/
* elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
factored out from...
(_bfd_mips_elf_merge_private_bfd_data): ... here.
Maciej W. Rozycki [Mon, 4 Jan 2016 23:30:00 +0000 (23:30 +0000)]
MIPS/BFD: Move attribute check after ELF file header flag check
We have a problem in that in making compatibility checks while merging
private BFD data on the MIPS target we give priority to the attribute
check, which may fail and cause the function to abort early on. The
problem with this is the ABI compatibility aspect recorded in the
attributes is relatively minor compared to aspects recorded in the ELF
file header. However the premature exit causes any more important
compatibility aspect violated to be masked and not reported to the user
once a problem with attributes has been noticed.
So move the attribute check after the ELF file header flag check in
`_bfd_mips_elf_merge_private_bfd_data', and do not return prematurely
there. Take advantage of the resulting grouping of ELF file header
handling together and remove the premature success return point for the
first input object being handled, letting the code later on figure out
output ABI flags even for this object.
Update LD test cases according to messages from ELF file header checks
now preceding ones from attribute checks.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
attribute check after ELF file header flag check.
ld/
* testsuite/ld-mips-elf/attr-gnu-4-14.d: Update the order of
messages expected according to MIPS BFD private data merge
changes.
* testsuite/ld-mips-elf/attr-gnu-4-24.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-34.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-41.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-42.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-43.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-45.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-46.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-47.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-48.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-49.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-54.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-64.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-74.d: Likewise.
Maciej W. Rozycki [Mon, 4 Jan 2016 23:16:45 +0000 (23:16 +0000)]
MIPS/BFD: Propagate the return status in attribute merging
Fix the issue of any failure from `_bfd_elf_merge_object_attributes' not
being propagated by `mips_elf_merge_obj_attributes'.
bfd/
* elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
return status from `_bfd_elf_merge_object_attributes'.
Maciej W. Rozycki [Mon, 4 Jan 2016 23:15:03 +0000 (23:15 +0000)]
MIPS/BFD: Factor out ELF file header flag checks
Factor out the parts of `_bfd_mips_elf_merge_private_bfd_data'
responsible for ELF file header flag compatibility checks to
`mips_elf_merge_obj_e_flags'. As a side effect remove a premature
return point from `_bfd_mips_elf_merge_private_bfd_data'. No functional
change otherwise.
bfd/
* elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
factored out from...
(_bfd_mips_elf_merge_private_bfd_data): ... here.
Maciej W. Rozycki [Mon, 4 Jan 2016 23:13:10 +0000 (23:13 +0000)]
MIPS/BFD: Fold the handling of input MIPS ABI flags together
Fold the handling of input MIPS ABI flags in private BFD data merging
together, moving the attribute check afterwards, and consequently making
input vs output compatibility checks only start once all input ABI flag
data has been gathered, checked for inconsistencies and put in order.
Consequently also address the issue of input ABI flag inconsistencies
being masked by a failing attribute check, which currently makes
`_bfd_mips_elf_merge_private_bfd_data' exit prematurely and therefore
prevent input ABI flag inconsistencies from being reported. Such
inconsistencies need to be reported as they may be the very cause of an
attribute check failure.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
handling of input MIPS ABI flags together.
Maciej W. Rozycki [Mon, 4 Jan 2016 23:00:24 +0000 (23:00 +0000)]
MIPS/BFD: Suppress attribute checks for null input
We currently special-case the handling of attribute checks on input
objects and make them even before we check a given input object actually
contains any sections. This does not add value as empty objects do not
cause a compatibility concern and we already make this observation for
other properties such as ELF file header flags. Moreover the attributes
themselves are stored in a `.gnu.attributes' section so the absence of
any section (except from a few special cases) implies there have been no
attributes provided either. Therefore it is safe to move the attribute
checks later on, after the null-section check has been made.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
attribute checks for null input.
Maciej W. Rozycki [Mon, 4 Jan 2016 22:49:59 +0000 (22:49 +0000)]
MIPS/BFD: Use local pointers to target data in private data merge
Use local pointers to target data to reduce the amount of indirection
and improve the readability of `_bfd_mips_elf_merge_private_bfd_data'.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
pointers to target data.
Maciej W. Rozycki [Mon, 4 Jan 2016 22:46:40 +0000 (22:46 +0000)]
MIPS/BFD: Correct an FP ABI warning
Correct a warning produced on any FP ABI mismatch observed. Unlike the
other settings, which in the presence of `.MIPS.abiflags' are duplicated
in the `e_flags' member of the ELF file header, information on the FP
ABI in use is duplicated in `.gnu.attributes' rather than in the former
place. Update the warning message accordingly.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
an FP ABI warning.
Mike Frysinger [Mon, 4 Jan 2016 10:08:26 +0000 (05:08 -0500)]
sim: parse_args: polish getopt error message
The cris sim hit a few failures after the recent getopt logic, and the
expected output showed a few ways we can improve things to better match
other utils.
Mike Frysinger [Mon, 4 Jan 2016 09:06:01 +0000 (04:06 -0500)]
sim: punt x86-specific bswap logic
The compiler/C library should produce reasonable code for htonl/ntohl,
and at least glibc tries pretty hard to always produce good code for
them. This logic only had support for 32-bit x86 systems anymore, and
it's unlikely people were even opting into this, so drop it all.
Mike Frysinger [Mon, 4 Jan 2016 08:58:09 +0000 (03:58 -0500)]
sim: d10v: gut endian logic
The compiler should produce reasonable code here in general, so punt the
various arch checks and bswap defines. This code will eventually go away
entirely when we convert it to the common memory code.
Markus Metzger [Wed, 23 Dec 2015 12:53:53 +0000 (13:53 +0100)]
btrace: do not return out of TRY/CATCH
In btrace_pt_readmem_callback, we read memory inside TRY/CATCH and return in
case of an error return value. This corrupts the cleanup chain, which
eventually results in a SEGV when doing or discarding cleanups later on.
gdb/
* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
testsuite/
* gdb.btrace/dlopen.exp: New.
* gdb.btrace/dlopen.c: New.
* gdb.btrace/dlopen-dso.c: New.
Mike Frysinger [Mon, 4 Jan 2016 02:40:34 +0000 (21:40 -0500)]
sim: parse_args: display getopt error ourselves
Fix a long standing todo where we let getopt write directly to stderr
when an invalid option is passed. Use the sim io funcs instead as they
go through the filtered callbacks that gdb wants.
Mike Frysinger [Mon, 4 Jan 2016 00:54:25 +0000 (19:54 -0500)]
sim: TODO: move to wiki
We're maintaining development docs in the wiki now:
https://sourceware.org/gdb/wiki/Sim/TODO
GDB Administrator [Mon, 4 Jan 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in
Mike Frysinger [Sun, 3 Jan 2016 08:44:02 +0000 (03:44 -0500)]
sim: clean up some more device detritus
Clean up some more remains of WITH_DEVICES that escaped notice.
We also clean up GETTWI/SETTWI defines in a few ports where they
were copied & pasted and are unused as they happen to be near the
device code.
Mike Frysinger [Sun, 3 Jan 2016 06:40:46 +0000 (01:40 -0500)]
sim: use libiberty countargv in more places
A bunch of places open code the countargv implementation, or outright
duplicate it (as count_argc). Replace all of those w/countargv.