Maciej W. Rozycki [Mon, 6 Jan 2014 02:40:48 +0000 (10:40 +0800)]
* nds32-asm.c (parse_operand): Fix out-of-range integer constant.
Alan Modra [Sun, 5 Jan 2014 23:00:37 +0000 (09:30 +1030)]
daily update
Alan Modra [Sat, 4 Jan 2014 23:00:39 +0000 (09:30 +1030)]
daily update
Alan Modra [Fri, 3 Jan 2014 23:00:51 +0000 (09:30 +1030)]
daily update
Doug Evans [Fri, 3 Jan 2014 22:34:45 +0000 (14:34 -0800)]
* nat/linux-waitpid.c (linux_debug): Remove extraneous \n from output.
Nick Clifton [Fri, 3 Jan 2014 14:16:17 +0000 (14:16 +0000)]
PR binutils/16199
* elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
zero.
Alan Modra [Thu, 2 Jan 2014 23:00:40 +0000 (09:30 +1030)]
daily update
Nick Clifton [Thu, 2 Jan 2014 14:55:02 +0000 (14:55 +0000)]
Update name in changelog entry.
Asmwarrior [Thu, 2 Jan 2014 14:30:18 +0000 (14:30 +0000)]
PR binutils/14289
* pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
Nick Clifton [Thu, 2 Jan 2014 12:14:37 +0000 (12:14 +0000)]
PR binutils/11983
* archive.c (_bfd_get_elt_at_filepos): Store a copy of the
filename in the bfd's filename field.
* elfcode.h (bfd_from_remote_memory): Likewise.
* ieee.c (ieee_object_p): Likewise.
* mach-o.c (bfd_mach_o_fat_member_init): Likewise.
* oasys.c (oasys_openr_next_archived_file): Likewise.
* vms-lib.c (_bfd_vms_lib_get_module): Likewise.
* opncls.c (bfd_fopen): Likewise.
(bfd_openstreamr): Likewise.
(bfd_openr_iovec): Likewise.
(bfd_openw): Likewise.
(bfd_create): Likewise.
(_bfd_delete_bfd): Free filename.
Alan Modra [Wed, 1 Jan 2014 23:00:37 +0000 (09:30 +1030)]
daily update
Joel Brobecker [Wed, 1 Jan 2014 03:57:03 +0000 (07:57 +0400)]
Add gdb/ChangeLog entry for previous change.
I forgot to add that entry when I checked in the "copyright year range"
update for GDB files.
Joel Brobecker [Wed, 1 Jan 2014 03:54:24 +0000 (07:54 +0400)]
Update Copyright year range in all files maintained by GDB.
Joel Brobecker [Wed, 1 Jan 2014 03:39:44 +0000 (07:39 +0400)]
Update copyright year in gdb/gdbserver/gdbreplay version output.
gdb/ChangeLog:
* top.c (print_gdb_version): Set copyright year to 2014.
gdb/gdbserver/ChangeLog:
* gdbserver.c (gdbserver_version): Set copyright year to 2014.
* gdbreplay.c (gdbreplay_version): Likewise.
Joel Brobecker [Wed, 1 Jan 2014 03:34:22 +0000 (07:34 +0400)]
Add gdb/ChangeLog-2013 entry in fnchange.lst.
Joel Brobecker [Wed, 1 Jan 2014 03:31:51 +0000 (07:31 +0400)]
New Year - GDB ChangeLog rotation.
Alan Modra [Tue, 31 Dec 2013 23:00:40 +0000 (09:30 +1030)]
daily update
Nick Clifton [Tue, 31 Dec 2013 09:52:24 +0000 (09:52 +0000)]
* objcopy.c (dump_sections): New list.
(command_line_switch): Add OPTION_DUMP_SECTION.
(copy_options): Add dump-section.
(copy_usage): Document new option.
(copy_object): Dump requested sections.
(copy_main): Handle --dump-section.
* doc/binutils.texi: Document --dump-section option.
* NEWS: Mention new feature.
Alan Modra [Mon, 30 Dec 2013 23:00:37 +0000 (09:30 +1030)]
daily update
Ilya Tocar [Mon, 30 Dec 2013 15:28:41 +0000 (15:28 +0000)]
* peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type for
pointer arithmetic.
Joel Brobecker [Sat, 28 Dec 2013 03:24:36 +0000 (07:24 +0400)]
Clarify documentation of the gdb.Field.bitpos attribute
gdb/doc/ChangeLog:
* gdb.texinfo (Types In Python): Clarify the documentation
of attribute gdb.Field.bitpos.
Sergio Durigan Junior [Sun, 29 Dec 2013 20:55:11 +0000 (18:55 -0200)]
Add comment describing arm_stap_is_single_operand
2013-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
* arm-linux-tdep.c (arm_stap_is_single_operand): Add comment
describing function.
Alan Modra [Sat, 28 Dec 2013 23:00:39 +0000 (09:30 +1030)]
daily update
Sergio Durigan Junior [Sat, 28 Dec 2013 21:20:58 +0000 (19:20 -0200)]
Extend handling of immediates on ARM's SystemTap SDT probe support
Continuing my series of fixes on the SystemTap SDT support for the
ARM/AArch64 architectures, this patch now extends how ARM's SDT specific
parser handles literal numbers (immediates).
Currently, it only accepts "#" as the prefix. However, according to
"info '(as) ARM-Chars'", expressions can also have "$" and nothing as a
prefix. This patch extends the parser to accept those options.
2013-12-28 Sergio Durigan Junior <sergiodj@redhat.com>
* arm-linux-tdep.c (arm_stap_is_single_operand): Accept "$" as a
literal prefix. Also accept no prefix at all.
(arm_stap_parse_special_token): Likewise.
(arm_linux_init_abi): Likewise.
Sergio Durigan Junior [Sat, 28 Dec 2013 16:14:11 +0000 (14:14 -0200)]
Implement SystemTap SDT probe support for AArch64
This commit implements the needed bits for SystemTap SDT probe support
on AArch64 architectures.
First, I started by looking at AArch64 assembly specification and
filling the necessary options on gdbarch's stap machinery in order to
make the generic asm parser (implemented in stap-probe.c) recognize
AArch64's asm.
After my last patch for the SystemTap SDT API, which extends it in order
to accept multiple prefixes and suffixes, this patch became simpler. I
also followed Marcus suggestion and did not shared code between 32- and
64-bit ARM.
Tom asked me in a previous message how I did my tests. I believe I
replied that, but just in case: I ran the tests on
gdb.base/stap-probe.exp by hand. I also managed to run the tests on
real hardware, and they pass without regressions.
2013-12-28 Sergio Durigan Junior <sergiodj@redhat.com>
PR tdep/15653
* NEWS: Mention SystemTap SDT probe support for AArch64 GNU/Linux.
* aarch64-linux-tdep.c: Include necessary headers for parsing of
SystemTap SDT probes.
(aarch64_stap_is_single_operand): New function.
(aarch64_stap_parse_special_token): Likewise.
(aarch64_linux_init_abi): Declare SystemTap SDT probe argument
prefixes and suffixes. Initialize gdbarch with them.
Hans-Peter Nilsson [Sat, 28 Dec 2013 15:57:24 +0000 (16:57 +0100)]
Adjust MMIX gas tests for recent bfd/elf.c change.
* gas/mmix/bspec-1.d: Adjust for SHF_INFO_LINK now set on RELA
sections.
* gas/mmix/bspec-2.d: Ditto.
Joel Brobecker [Mon, 23 Dec 2013 07:15:42 +0000 (11:15 +0400)]
Fix gdb.Field attributes documentation for enum types.
The following patch ...
| commit
14e75d8ea4fe9ed4dbf292ae4a9745e33e2ff353
| Date: Wed Apr 18 06:46:47 2012 +0000
|
| gdb/
| PR symtab/7259:
| [...]
... discussed under ...
[PATCH] Allow 64-bit enum values
http://www.sourceware.org/ml/gdb-patches/2012-03/msg00772.html
... introduced a change in the gdb.Fields API without documenting it:
| I took a separate approach from the one I took in:
|
| http://sourceware.org/ml/gdb-patches/2012-02/msg00403.html
|
| and removed the overloaded meaning of the bitpos location variable to
| fix PR symtab/7259. In the following patch, I introduce a separate
| field_location union member 'enumval' which can accept LONGEST and
| hence expand enum values to 64-bit signed values. With this change,
| bitpos now only is used for (non-negative) offsets into structures,
| since the other overload of bitpos (range bounds) were already
| separated into struct range_bound.
This patch updates the documentation to reflect that change.
gdb/doc/ChangeLog:
* gdb.texinfo (Types In Python): Fix the documentation of
attribute "bitpos" in class gdb.Field for enum types. Add
documentation for attribute "enumval" in that same class.
Joel Brobecker [Mon, 23 Dec 2013 01:33:59 +0000 (05:33 +0400)]
Turn -list-feature @table into @ftable.
This is to make it easier to discover the various options displayed
by the -list-features command.
gdb/doc/ChangeLog:
* gdb.texinfo (GDB/MI Support Commands): Change @table into
@ftable.
Alan Modra [Fri, 27 Dec 2013 23:00:46 +0000 (09:30 +1030)]
daily update
Alan Modra [Thu, 26 Dec 2013 23:00:38 +0000 (09:30 +1030)]
daily update
Alan Modra [Wed, 25 Dec 2013 23:00:38 +0000 (09:30 +1030)]
daily update
Alan Modra [Tue, 24 Dec 2013 23:00:38 +0000 (09:30 +1030)]
daily update
Doug Evans [Tue, 24 Dec 2013 05:01:17 +0000 (21:01 -0800)]
Reorganize extension language auto-loading docs.
* gdb.texinfo (Auto-loading): Move menu up. Move discussion of
auto-loaded objfile scripts and .debug_gdb_scripts section to their
corresponding section in Extending GDB.
(Extending GDB): Move menu up. New menu item "Auto-loading
extensions".
(Sequences): New menu item "Auto-loading sequences".
(Auto-loading sequences): New node.
(Python): Rename section from Scripting GDB to Extending GDB.
(Python Auto-loading): Update xref, refer to "Auto-loading extensions".
Move docs on ways to auto-load extensions to ...
(Auto-loading extensions): ... here. New node.
Sterling Augustine [Tue, 17 Dec 2013 21:43:34 +0000 (13:43 -0800)]
2013-12-17 Sterling Augustine <saugustine@google.com>
* linespec.c (add_sal_to_sals): Use "<unknown>" when a symbol
isn't found.
Alan Modra [Mon, 23 Dec 2013 23:00:59 +0000 (09:30 +1030)]
daily update
Sergio Durigan Junior [Mon, 23 Dec 2013 22:48:08 +0000 (20:48 -0200)]
Some cleanups on stap-probe.c
This patch does some basic cleanups on the SystemTap SDT probes API. It
removes spurious newlines, brackets, reindents some code, and do
explicit checks for NULL, NUL, and 0 where applicable.
2013-12-23 Sergio Durigan JUnior <sergiodj@redhat.com>
* stap-probe.c (struct stap_probe) <args_parsed>: Add comment.
(stap_is_generic_prefix): Delete extra brackets. Reindent.
(stap_parse_register_operand): Remove spurious newlines. Simplify
code to parse special token.
(stap_parse_argument_conditionally): Add gdb_assert.
(stap_parse_argument_1): Likewise. Explicitly check for NULL and
NUL.
(stap_parse_probe_arguments): Likewise.
(handle_stap_probe): Likewise. Reindent code.
(get_stap_base_address): Explicitly check for NULL.
(stap_get_probes): Likewise. Reindent code.
(stap_relocate): Explicitly check for 0.
(stap_gen_info_probes_table_values): Likewise.
Joel Brobecker [Fri, 13 Dec 2013 06:01:33 +0000 (07:01 +0100)]
Move GDB/MI commands related to support-query to their own @node.
A number of commands provide the capability to query the debugger
about support for various features, and one of them in particular
(-list-features), is expected to grow as new features get added.
-list-target-features should also grow a bit over time, but probably
slower.
These commands deserve their own section and @node.
gdb/doc/ChangeLog:
* gdb.texinfo (GDB/MI): Add "GDB/MI Support Commands" entry
in menu.
(GDB/MI Variable Objects): Adjust reference to "-list-features"
command, now in a new node.
(GDB/MI Support Commands): New node, with its contents being
extracted from the "GDB/MI Miscellaneous Commands" node.
A small paragraph introducing the section is also added at
the start.
(GDB/MI Miscellaneous Commands): Delete the description of the
-info-gdb-mi-command, -list-features and -list-target-features
commands, now hosted in the "GDB/MI Support Commands" node.
Alan Modra [Sun, 22 Dec 2013 23:00:47 +0000 (09:30 +1030)]
daily update
Alan Modra [Sat, 21 Dec 2013 23:00:44 +0000 (09:30 +1030)]
daily update
Alan Modra [Fri, 20 Dec 2013 23:01:03 +0000 (09:31 +1030)]
daily update
H.J. Lu [Fri, 20 Dec 2013 16:27:02 +0000 (08:27 -0800)]
Define IREL_IN_PLT for elf_k1om.sh and elf_l1om.sh
* emulparams/elf_k1om.sh (IREL_IN_PLT): Define.
* emulparams/elf_l1om.sh (IREL_IN_PLT): Likewise.
H.J. Lu [Fri, 20 Dec 2013 16:25:24 +0000 (08:25 -0800)]
Covert leading spaces to tab
Nick Clifton [Fri, 20 Dec 2013 13:52:23 +0000 (13:52 +0000)]
PR binutils/16218
* dwarf.c (read_and_display_attr_value): Only print a tab
character if it preceeds further text.
* binutils-all/dw2-1.W: Update expected objdump output.
* binutils-all/i386/compressed-1a.d: Likewise.
* binutils-all/objdump.W: Likewise.
* binutils-all/x86-64/compressed-1a.d: Likewise.
* gas/elf/dwarf2-1.d: Update expected objdump output.
* gas/elf/dwarf2-2.d: Likewise.
* gas/i386/dw2-compress-1.d: Likewise.
Alan Modra [Fri, 20 Dec 2013 13:27:52 +0000 (23:57 +1030)]
Don't segv on cie.initial_instructions[] overflow.
Don't attempt to merge CIEs with a larger number of insns than will
fit in the buffer.
* elf-eh-frame.c (cie_eq): Return false when initial_insn_length
is too large.
(cie_compute_hash): Don't exceed bounds of initial_instructions.
(_bfd_elf_parse_eh_frame): Always set initial_insn_length, and
save as much of insns to initial_instructions[] as will fit.
Chung-Lin Tang [Fri, 20 Dec 2013 12:53:53 +0000 (20:53 +0800)]
2013-12-20 Chung-Lin Tang <cltang@codesourcery.com>
* nios2-linux-tdep.c (nios2_linux_sigreturn_init): Remove.
(nios2_linux_sigreturn_tramp_frame): Remove.
(nios2_linux_rt_sigreturn_tramp_frame): Update rt_sigreturn syscall
number.
(nios2_linux_syscall_next_pc): Likewise. Remove sigreturn case.
(nios2_linux_init_abi): Remove registration of
nios2_linux_sigreturn_tramp_frame.
Tristan Gingold [Fri, 20 Dec 2013 11:38:14 +0000 (12:38 +0100)]
Remove duplicated entry for .pad in c-arm.texi
* doc/c-arm.texi (ARM Directives): Remove duplicate .pad entry.
Ian Lance Taylor [Fri, 20 Dec 2013 05:54:43 +0000 (21:54 -0800)]
* stringpool.cc (Stringpool_template::reserve): Add
HAVE_UNORDERED_MAP case.
* stringpool.cc (Stringpool_template::print_stats): Likewise.
Alan Modra [Thu, 19 Dec 2013 23:00:40 +0000 (09:30 +1030)]
daily update
H.J. Lu [Thu, 19 Dec 2013 22:28:18 +0000 (14:28 -0800)]
Mask out PREFIX_ADDR when adding prefix to opcode
PREFIX_ADDR isn't a prefix to opcode. This patch masks out PREFIX_ADDR
when adding prefix to opcode.
PR gdb/16305
* i386-tdep.c (i386_process_record): Mask out PREFIX_ADDR when
adding prefix to opcode.
H.J. Lu [Thu, 19 Dec 2013 22:24:34 +0000 (14:24 -0800)]
Properly decode MODRM byte for 64-bit
64-bit mode doesn't use 16-bit address. We should always check SIB byte
for address in 64-bit mode.
PR gdb/16304
* i386-tdep.c (i386_record_lea_modrm_addr): Don't use 16-bit
address in 64-bit mode.
H.J. Lu [Thu, 19 Dec 2013 22:22:30 +0000 (14:22 -0800)]
Zero-extend address from 32-bit to 64-bit for ADDR32 prefix
When there is ADDR32 prefix in 64-bit mode, we should zero-extend
address from 32-bit to 64-bit.
PR gdb/16304
* i386-tdep.c (i386_record_lea_modrm_addr): Zero-extend 32-bit
address to 64-bit in 64-bit mode.
H.J. Lu [Thu, 19 Dec 2013 22:17:48 +0000 (14:17 -0800)]
Add amd64_x32_linux_record_tdep and amd64_x32_sys
X32 Linux system calls are diffferent from amd64 Linux system calls in
system call numbers as well as parameter types/values. This patch adds
amd64_x32_linux_record_tdep and amd64_x32_syscall for x32.
PR gdb/16304
* amd64-linux-tdep.c (amd64_canonicalize_syscall): Handle x32
system calls.
(amd64_x32_linux_record_tdep): New.
(amd64_linux_syscall_record_common): New function.
(amd64_linux_syscall_record): Call
amd64_linux_syscall_record_common with amd64_linux_record_tdep.
(amd64_x32_linux_syscall_record): Call
amd64_linux_syscall_record_common with
amd64_x32_linux_record_tdep.
(amd64_linux_init_abi_common): Move amd64_linux_record_tdep
initialization and tdep->i386_syscall_record setup to ...
(amd64_linux_init_abi): Here.
(amd64_x32_linux_init_abi): Initialize
amd64_x32_linux_record_tdep. Set tdep->i386_syscall_record to
amd64_x32_linux_syscall_record.
* amd64-linux-tdep.h (amd64_x32_syscall): New enum.
Sergio Durigan Junior [Thu, 19 Dec 2013 20:53:40 +0000 (18:53 -0200)]
Extend SystemTap SDT probe argument parser
This patch extends the current generic parser for SystemTap SDT probe
arguments. It can be almost considered a cleanup, but the main point of
it is actually to allow the generic parser to accept multiple prefixes
and suffixes for the its operands (i.e., integers, register names, and
register indirection).
I have chosen to implement this as a list of const strings, and declare
this list as "static" inside each target's method used to initialize
gdbarch.
This patch is actually a preparation for an upcoming patch for ARM,
which implements the support for multiple integer prefixes (as defined
by ARM's asm spec). And AArch64 will also need this, for the same
reason.
This patch was regtested on all architectures that it touches (i.e.,
i386, x86_64, ARM, PPC/PPC64, s390x and IA-64). No regressions were found.
2013-12-19 Sergio Durigan Junior <sergiodj@redhat.com>
* amd64-tdep.c (amd64_init_abi): Declare SystemTap SDT probe
argument prefixes and suffixes. Initialize gdbarch with them.
* arm-linux-tdep.c (arm_linux_init_abi): Likewise.
* gdbarch.c: Regenerate.
* gdbarch.h: Regenerate.
* gdbarch.sh (stap_integer_prefix, stap_integer_suffix)
(stap_register_prefix, stap_register_suffix)
(stap_register_indirection_prefix)
(stap_register_indirection_suffix): Declare as "const char *const
*" instead of "const char *". Adjust printing function. Rename
all of the variables to the plural.
(pstring_list): New function.
* i386-tdep.c (i386_elf_init_abi): Declare SystemTap SDT probe
argument prefixes and suffixes. Initialize gdbarch with them.
* ia64-linux-tdep.c (ia64_linux_init_abi): Likewise.
* ppc-linux-tdep.c (ppc_linux_init_abi): Likewise.
* s390-linux-tdep.c (s390_gdbarch_init): Likewise.
* stap-probe.c (stap_is_generic_prefix): New function.
(stap_is_register_prefix): Likewise.
(stap_is_register_indirection_prefix): Likewise.
(stap_is_integer_prefix): Likewise.
(stap_generic_check_suffix): Likewise.
(stap_check_integer_suffix): Likewise.
(stap_check_register_suffix): Likewise.
(stap_check_register_indirection_suffix): Likewise.
(stap_parse_register_operand): Remove unecessary declarations for
variables holding prefix and suffix information. Use the new
functions listed above for checking for prefixes and suffixes.
(stap_parse_single_operand): Likewise.
H.J. Lu [Thu, 19 Dec 2013 19:34:47 +0000 (11:34 -0800)]
Set SHF_INFO_LINK bit for SHT_REL/SHT_RELA sections
It is a good pratice to set the SHF_INFO_LINK bit when the sh_info field
represents a section header index.
bfd/
PR binutils/16317
* elf.c (assign_section_numbers): Set the SHF_INFO_LINK bit for
SHT_REL/SHT_RELA sections when setting the sh_info field.
binutils/testsuite/
PR binutils/16317
* binutils-all/readelf.s: Updated.
* binutils-all/readelf.s-64: Likewise.
ld/testsuite/
PR binutils/16317
* ld-elf/linkinfo1.s: New file.
* ld-elf/linkinfo1a.d: Likewise.
* ld-elf/linkinfo1b.d: Likewise.
H.J. Lu [Thu, 19 Dec 2013 19:25:46 +0000 (11:25 -0800)]
Don't run x86-64-disassem for mingw targets
mingw targets pad text sections which won't work with x86-64-disassem.
* gas/i386/i386.exp: Don't run x86-64-disassem for mingw targets.
Gabriel Krisman Bertazi [Thu, 19 Dec 2013 19:01:49 +0000 (17:01 -0200)]
Fix PR breakpoints/16297: catch syscall with syscall 0
Code rationale
==============
by: Gabriel Krisman Bertazi
This is a fix for bug 16297. The problem occurs when the user attempts
to catch any syscall 0 (such as syscall read on Linux/x86_64). GDB was
not able to catch the syscall and was missing the breakpoint.
Now, breakpoint_hit_catch_syscall returns immediately when it finds the
correct syscall number, avoiding a following check for the end of the
search vector, that returns a no hit if the syscall number was zero.
Testcase rationale
==================
by: Sergio Durigan Junior
This testcase is a little difficult to write. By doing a quick
inspection at the Linux source, one can see that, in many targets, the
syscall number 0 is restart_syscall, which is forbidden to be called
from userspace. Therefore, on many targets, there's just no way to test
this safely.
My decision was to take the simpler route and just adds the "read"
syscall on the default test. Its number on x86_64 is zero, which is
"good enough" since many people here do their tests on x86_64 anyway and
it is a popular architecture.
However, there was another little gotcha. When using "read" passing 0
as the third parameter (i.e., asking it to read 0 bytes), current libc
implementations could choose not to effectively call the syscall.
Therefore, the best solution was to create a temporary pipe, write 1
byte into it, and then read this byte from it.
gdb/ChangeLog
2013-12-19 Gabriel Krisman Bertazi <gabriel@krisman.be>
PR breakpoints/16297
* breakpoint.c (breakpoint_hit_catch_syscall): Return immediately
when expected syscall is hit.
gdb/testsuite/ChangeLog
2013-12-19 Sergio Durigan Junior <sergiodj@redhat.com>
PR breakpoints/16297
* gdb.base/catch-syscall.c (read_syscall, pipe_syscall)
(write_syscall): New variables.
(main): Create a pipe, write 1 byte in it, and read 1 byte from
it.
* gdb.base/catch-syscall.exp (all_syscalls): Include "pipe,
"write" and "read" syscalls.
(fill_all_syscalls_numbers): Improve the way to obtain syscalls
numbers.
Pierre Muller [Thu, 19 Dec 2013 13:00:11 +0000 (14:00 +0100)]
* Fix indentation issue and reorganize last commit entry
so that it is shorter than 80.
peXXigen.c (rsrc_cmp): Fix unused variable warning.
Tom Tromey [Fri, 6 Dec 2013 18:34:49 +0000 (11:34 -0700)]
don't allocate serial_ops
Now that struct serial_ops is const everywhere, we can easily turn the
instances into globals. This patch implements this idea.
On the one hand I think this is nicer since it makes a bit more data
readonly and slightly reduces allocations. On the other hand it
reduces readability somewhat.
If the readability is a concern to anyone I was thinking I could write
a macro that conditionally uses GCC's designated initializer
extension.
Tested by rebuilding on x86-64 Fedora 18, both natively and using the
mingw cross tools.
2013-12-19 Tom Tromey <tromey@redhat.com>
* ser-unix.c (hardwire_ops): New global.
(_initialize_ser_hardwire): Use it.
* ser-tcp.c (tcp_ops): New global.
(_initialize_ser_tcp): Use it.
* ser-pipe.c (pipe_ops): New global.
(_initialize_ser_pipe): Use it.
* ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): New
globals.
(_initialize_ser_windows): Use them.
Tom Tromey [Fri, 6 Dec 2013 17:58:50 +0000 (10:58 -0700)]
make serial_ops const
I noticed that the serial_ops vtable is not const, but really it ought
to be.
This patch constifies it, removing the only mutable field in the
process.
Tested by rebuilding on x86-64 Fedora 18, both natively and using the
mingw cross tools.
2013-12-19 Tom Tromey <tromey@redhat.com>
* serial.c (serial_ops_p): New typedef.
(serial_ops_list): Now a VEC.
(serial_interface_lookup): Return const. Use VEC_iterate.
(serial_add_interface): Make parameter const.
(serial_open): Update.
(serial_fdopen_ops): Make 'ops' const.
(serial_pipe): Update.
* ser-tcp.c (_initialize_ser_tcp): Update.
* ser-pipe.c (_initialize_ser_pipe): Update.
* ser-unix.c (_initialize_ser_hardwire): Update.
* ser-mingw.c (_initialize_ser_windows): Update.
* ser-go32.c (dos_ops): Now const. Update.
* serial.h (struct serial) <ops>: Now const.
(struct serial_ops) <next>: Remove.
(serial_add_interface): Make parameter const.
Tom Tromey [Mon, 9 Dec 2013 22:01:31 +0000 (15:01 -0700)]
remove remnants of old Mach-O workaround
I happened to run readelf on an ELF file created by Guile. readelf
complained about invalid values for DW_FORM_strp. At first I assumed
this was just a Guile bug, but eu-readelf did the right thing, so I
looked a bit deeper.
I came across some old Mach-O code to bias some offsets by section
addresses. Guile, unlike many ELF writers, sets the address for the
various DWARF-related sections, causing this unusual code to be run.
This code came from an old commit:
2005-09-30 H.J. Lu <hongjiu.lu@intel.com>
* dwarf.c (fetch_indirect_string): Adjust for section address.
(process_debug_info): Likewise.
(display_debug_loc): Likewise.
(display_debug_ranges): Likewise.
* objdump.c (mach_o_dwarf_sections): New.
(generic_dwarf_sections): Likewise.
(check_mach_o_dwarf): Likewise.
(dump_dwarf): Call check_mach_o_dwarf.
However it was partially reverted here:
https://sourceware.org/ml/binutils/2008-11/msg00134.html
This patch just completes the reversion.
Built and regtested on x86-64 Fedora 18. I also ran the resulting
readelf against the Guile-created object with success.
I have no way of testing this on Mach-O, so your feedback is
solicited.
2013-12-19 Tom Tromey <tromey@redhat.com>
* dwarf.c (fetch_indirect_string): Don't bias by section address.
(fetch_indexed_string): Likewise.
(process_debug_info): Likewise.
(display_debug_loc): Likewise.
(display_debug_ranges): Likewise.
Pierre Muller [Thu, 19 Dec 2013 12:37:30 +0000 (12:37 +0000)]
* peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding if
__CYGWIN__ or __MINGW32__ macro is defined.
(rsrc_cmp): Fix Windows host version and version without wchar header.
[__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro.
Fix coding standard issues.
Keven Boell [Fri, 15 Nov 2013 10:32:01 +0000 (11:32 +0100)]
fortran: enable ptype/whatis for modules.
Added new domain MODULE_DOMAIN for fortran modules to avoid
issues with sharing namespaces (e.g. when a variable currently
in scope has the same name as a module).
(gdb) ptype modname
old> No symbol "modname" in current context.
new> type = module modname
This fixes PR 15209 and also addresses the issue
with sharing namespaces:
https://sourceware.org/ml/gdb-patches/2013-02/msg00643.html
2013-11-19 Keven Boell <keven.boell@intel.com>
Sanimir Agovic <sanimir.agovic@intel.com>
* cp-namespace.c (cp_lookup_nested_symbol): Enable
nested lookups for fortran modules.
* dwarf2read.c (read_module): Add fortran module to
the symbol table.
(add_partial_symbol, add_partial_module): Add fortran
module to the partial symbol table.
(new_symbol_full): Create full symbol for fortran module.
* f-exp.y (yylex): Add new module domain to be parsed.
* symtab.h: New domain for fortran modules.
testsuite/
* gdb.fortran/module.exp: Completion matches fortran module
names as well. ptype/whatis on modules return a proper type.
Add new check for having the correct scope.
Keven Boell [Fri, 25 Oct 2013 11:10:57 +0000 (12:10 +0100)]
fortran: enable ptype/whatis for user defined types.
(gdb) ptype type
old> No symbol "type" in current context.
new> type = Type type
integer(kind=4) :: t_i
End Type type
2013-11-19 Sanimir Agovic <sanimir.agovic@intel.com>
Keven Boell <keven.boell@intel.com>
* f-exp.y (yylex): Add domain array to enable lookup
in multiple domains. Loop over lookup domains and try
to find requested symbol. Add STRUCT_DOMAIN to lookup
domains to be able to query for user defined types.
testsuite/
* gdb.fortran/type.f90: New file.
* gdb.fortran/whatis_type.f90: New file.
Andreas Schwab [Wed, 11 Dec 2013 15:47:43 +0000 (16:47 +0100)]
Set proper OS ABI magic for ELF/m68k
* elf32-m68k.c (elf_m68k_add_symbol_hook): New function.
(elf_backend_add_symbol_hook): Define.
Cary Coutant [Wed, 18 Dec 2013 23:53:05 +0000 (15:53 -0800)]
Add configure checks for <unordered_set> and <unordered_map>.
gold/
* configure.ac: Check for <unordered_set> and <unordered_map>.
* config.in: Regenerate.
* configure: Regenerate.
* system.h: Use <unordered_set> and <unordered_map> if available.
Alan Modra [Wed, 18 Dec 2013 23:00:57 +0000 (09:30 +1030)]
daily update
Sergio Durigan Junior [Wed, 18 Dec 2013 22:19:01 +0000 (20:19 -0200)]
Improve and fix catch-syscall.exp
While fixing another bug, I found that the current
gdb.base/catch-syscall.exp is kind of messy, could use some
improvements, and is not correctly testing some things.
I've made the following patch to address all the issues I found. On the
organization side, it does a cleanup and removes unecessary imports of
gdb_prompt, uses prepare_for_testing and clean_restart where needed, and
fixes some comments. The testcase was also not correctly testing
catching syscalls using only numbers, or catching many syscalls at
once. I fixed that.
The patch also uses a new method for obtaining the syscalls numbers: it
relies on the C source file to get them, via <sys/syscall.h> and SYS_*
macros. This makes the .exp file simpler because there is no need to
include target conditionals there.
I tested this on x86_64 Fedora 18.
gdb/testsuite/ChangeLog:
2013-12-18 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb.base/catch-syscall.c: Include <sys/syscall.h>.
(close_syscall, chroot_syscall, exit_group_syscall): New
variables.
* gdb.base/catch-syscall.exp: Replace gdb_compile by
prepare_for_testing. Call fill_all_syscalls_numbers before
starting. Replace gdb_exit, gdb_start, gdb_reinitialize_dir and
gdb_load by clean_restart.
(check_info_bp_any_syscall, check_info_bp_specific_syscall)
(check_info_bp_many_syscalls): Remove global gdb_prompt.
(check_call_to_syscall): Likewise. Add global decimal. Improve
testing regex.
(check_return_from_syscall): Likewise.
(check_continue, insert_catch_syscall_with_arg): Remove global
gdb_prompt.
(insert_catch_syscall_with_many_args): Likewise. Add global
decimal. Fix $filter_str. Improve testing regex.
(check_for_program_end): Remove global gdb_prompt.
(test_catch_syscall_without_args): Likewise. Add global decimal.
Improve testing regex.
(test_catch_syscall_with_args, test_catch_syscall_with_many_args)
(test_catch_syscall_with_wrong_args)
(test_catch_syscall_restarting_inferior)
(test_catch_syscall_fail_nodatadir): Remove global gdb_prompt.
(do_syscall_tests): Likewise. Remove global srcdir.
(test_catch_syscall_without_args_noxml): Remove global gdb_prompt.
Add global last_syscall_number. Test for the exact syscall number
to be caught.
(test_catch_syscall_with_args_noxml): Remove global gdb_prompt.
Add global all_syscalls_numbers. Test each syscall number to be
caught, instead of only testing "close".
(test_catch_syscall_with_wrong_args_noxml): Remove global gdb_prompt.
(do_syscall_tests_without_xml): Likewise. Remove global srcdir.
Remove stale comment.
(fill_all_syscalls_numbers): Add global last_syscall_number. Fill
the correct syscall numbers using information from the inferior.
Yufeng Zhang [Wed, 18 Dec 2013 19:15:57 +0000 (19:15 +0000)]
gas/
* config/tc-aarch64.c (md_assemble): Defer the feature checking until
do_encode () succeeds.
gas/testsuite/
* gas/aarch64/rm-simd-ext.d: New file.
* gas/aarch64/rm-simd-ext.l: Likewise.
* gas/aarch64/rm-simd-ext.s: Likewise.
Yufeng Zhang [Wed, 18 Dec 2013 16:47:33 +0000 (16:47 +0000)]
gdb/
* aarch64-linux-nat.c (aarch64_linux_set_debug_regs): Set
iov.iov_len with the real length in use.
gdb/gdbserver/
* linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
iov.iov_len with the real length in use.
Yufeng Zhang [Wed, 18 Dec 2013 15:16:41 +0000 (15:16 +0000)]
ld/testsuite
2013-12-18 Vidya Praveen <vidyapraveen@arm.com>
* lib/ld-lib.exp (check_lto_available): Support cflags, ldflags and
test by compiling for an executable rather than shared library.
Nick Clifton [Wed, 18 Dec 2013 11:51:25 +0000 (11:51 +0000)]
* config/tc-rx.c (rx_include): Rename 'eof' to 'last_char' in
order to avoid conflict with same named variable in MinGW system
header file.
Nick Clifton [Wed, 18 Dec 2013 10:30:25 +0000 (10:30 +0000)]
* peXXigen.c (rsrc_print_section): Use ptrdiff_t as the type for
pointer arithmetic.
Yao Qi [Mon, 4 Nov 2013 09:53:56 +0000 (17:53 +0800)]
Add target_xfer_partial_ftype
This patch adds a typedef target_xfer_partial_ftype. When we change
the signature of xfer_partial functions (for example, adding a new
parameter), we don't have to modify all of their declarations.
This patch also updates the type of parameters of target_xfer_partial
from "void *" to "gdb_byte *".
gdb:
2013-12-18 Yao Qi <yao@codesourcery.com>
* target.h (target_xfer_partial_ftype): New typedef.
(target_xfer_partial): Update declaration.
* auxv.h (memory_xfer_auxv): Likewise.
* ia64-hpux-nat.c (super_xfer_partial): Likewise.
* ia64-linux-nat.c (super_xfer_partial): Likewise.
* linux-nat.c (super_xfer_partial): Likewise.
* procfs.c (procfs_xfer_partial): Likewise.
* record-full.c (record_full_beneath_to_xfer_partial):
(tmp_to_xfer_partial): Likewise.
* sparc-nat.c (inf_ptrace_xfer_partial): Likewise.
* target.c (default_xfer_partial): Likewise.
(current_xfer_partial): Likewise.
(target_xfer_partial): Change parameter type to 'gdb_byte *'.
Yao Qi [Mon, 4 Nov 2013 03:16:37 +0000 (11:16 +0800)]
Replace sprintf with xsnprintf
gdb:
2013-12-18 Yao Qi <yao@codesourcery.com>
* linux-nat.c (linux_proc_xfer_partial): Call xsnprintf instead
of sprintf.
(linux_nat_detach, linux_child_pid_to_exec_file): Likewise.
(linux_proc_pending_signals): Likewise.
Yao Qi [Wed, 18 Dec 2013 03:30:54 +0000 (11:30 +0800)]
Fix the format of one ChangeLog entry
I notice that two lines of a recent changelog entry are not prefixed
with tab. They are prefixed with a space and a tab. This patch
is to remove the space.
gdb:
2013-12-18 Yao Qi <yao@codesourcery.com>
* ChangeLog: Fix the format of one entry.
Kuan-Lin Chen [Thu, 12 Dec 2013 05:43:51 +0000 (13:43 +0800)]
Add system register and embedded debug register support.
Add two more as test files for user special and system register.
Fix typo.
2013-12-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
* gas/nds32/nds32.exp: Add system and user special register tests.
* gas/nds32/sys-reg.s: New test.
* gas/nds32/sys-reg.d: Likewise.
* gas/nds32/usr-spe-reg.s: Likewise.
* gas/nds32/usr-spe-reg.d: Likewise.
* gas/nds32/alu-2.d: Delete the new blank line at EOF.
* gas/nds32/br-1.d: Likewise.
* gas/nds32/br-2.d: Likewise.
* gas/nds32/ji-jr.d: Likewise.
* gas/nds32/lsi.d: Likewise.
* nds32-dis.c (sr_map): Add system register table for disassembling.
(usr_map): Fix typo.
* nds32-asm.c (keyword_sr): Add embedded debug registers.
Joel Brobecker [Wed, 18 Dec 2013 02:42:49 +0000 (06:42 +0400)]
ARI fix in value.c::value_entirely_unavailable
gdb/ChangeLog:
* value.c (value_entirely_unavailable): ARI fix: Move trailing
binary operator to the next line. No actual code change.
Alan Modra [Tue, 17 Dec 2013 23:00:45 +0000 (09:30 +1030)]
daily update
H.J. Lu [Tue, 17 Dec 2013 22:36:45 +0000 (14:36 -0800)]
Call _bfd_elf_post_process_headers
* elf32-arm.c (elf32_arm_post_process_headers): Call
_bfd_elf_post_process_headers.
H.J. Lu [Tue, 17 Dec 2013 22:10:03 +0000 (14:10 -0800)]
Call _bfd_elf_post_process_headers
* elf32-spu.c (spu_elf_post_process_headers): Call
_bfd_elf_post_process_headers.
* elfxx-mips.c (_bfd_mips_post_process_headers): Likewise.
H.J. Lu [Tue, 17 Dec 2013 21:40:46 +0000 (13:40 -0800)]
Default elf_backend_post_process_headers to set OSABI
* elf-bfd.h (_bfd_elf_set_osabi): Renamed to ...
(_bfd_elf_post_process_headers): This.
* elf.c (_bfd_elf_compute_section_file_positions): Always
call elf_backend_post_process_headers.
(_bfd_elf_set_osabi): Renamed to ...
(_bfd_elf_post_process_headers): This.
* elf32-hppa.c (elf_backend_post_process_headers): Removed.
* elf32-i370.c (elf_backend_post_process_headers): Likewise.
* elf32-msp430.c (elf_backend_post_process_headers): Likewise.
* elf32-ppc.c (elf_backend_post_process_headers): Likewise.
* elf32-sparc.c (elf_backend_post_process_headers): Likewise.
* elf64-hppa.c (elf_backend_post_process_headers): Likewise.
* elf64-ppc.c (elf_backend_post_process_headers): Likewise.
* elf64-sparc.c (elf_backend_post_process_headers): Likewise.
* elf64-x86-64.c (elf_backend_post_process_headers): Likewise.
* (elf_backend_post_process_headers): Likewise.
* (elf_backend_post_process_headers): Likewise.
* elf32-i386.c (elf_backend_post_process_headers): Don't
define as _bfd_elf_set_osabi.
(elf_i386_fbsd_post_process_headers): Updated.
* elf32-mips.c (elf_fbsd_post_process_headers): Removed.
(elf_backend_post_process_headers): Likewise.
* elf32-tic6x.c (elf32_tic6x_set_osabi): Removed.
(elf_backend_post_process_headers): Likewise.
* elf64-mips.c (elf_fbsd_post_process_headers): Removed.
(elf_backend_post_process_headers): Likewise.
* elfn32-mips.c (elf_fbsd_post_process_headers): Removed.
(elf_backend_post_process_headers): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_post_process_headers): Updated.
* elfxx-target.h (elf_backend_post_process_headers): Default
to _bfd_elf_post_process_headers.
Pedro Alves [Tue, 17 Dec 2013 20:47:36 +0000 (20:47 +0000)]
"tfind" across unavailable-stack frames.
Like when stepping, the current stack frame location is expected to be
printed as result of tfind command, if that results in moving to a
different function. In tfind_1 we see:
if (from_tty
&& (has_stack_frames () || traceframe_number >= 0))
{
enum print_what print_what;
/* NOTE: in imitation of the step command, try to determine
whether we have made a transition from one function to
another. If so, we'll print the "stack frame" (ie. the new
function and it's arguments) -- otherwise we'll just show the
new source line. */
if (frame_id_eq (old_frame_id,
get_frame_id (get_current_frame ())))
print_what = SRC_LINE;
else
print_what = SRC_AND_LOC;
print_stack_frame (get_selected_frame (NULL), 1, print_what, 1);
do_displays ();
}
However, when we haven't collected any registers in the tracepoint
(collect $regs), that doesn't actually work:
(gdb) tstart
(gdb) info tracepoints
Num Type Disp Enb Address What
1 tracepoint keep y 0x080483b7 in func0
at ../.././../git/gdb/testsuite/gdb.trace/circ.c:28
collect testload
installed on target
2 tracepoint keep y 0x080483bc in func1
at ../.././../git/gdb/testsuite/gdb.trace/circ.c:32
collect testload
installed on target
(gdb) c
Continuing.
Breakpoint 3, end () at ../.././../git/gdb/testsuite/gdb.trace/circ.c:72
72 }
(gdb) tstop
(gdb) tfind start
Found trace frame 0, tracepoint 1
#0 func0 () at ../.././../git/gdb/testsuite/gdb.trace/circ.c:28
28 }
(gdb) tfind
Found trace frame 1, tracepoint 2
32 }
(gdb)
When we don't have info about the stack available
(UNWIND_UNAVAILABLE), frames end up with outer_frame_id as frame ID.
And in the scenario above, the issue is that both frames before and
after the second tfind (the frames for func0 an func1) have the same
id (outer_frame_id), so the frame_id_eq check returns false, even
though the frames were of different functions. GDB knows that,
because the PC is inferred from the tracepoint's address, even if no
registers were collected.
To fix this, this patch adds support for frame ids with a valid code
address, but <unavailable> stack address, and then makes the unwinders
use that instead of the catch-all outer_frame_id for such frames. The
frame_id_eq check in tfind_1 then automatically does the right thing
as expected.
I tested with --directory=gdb.trace/ , before/after the patch, and
compared the resulting gdb.logs, then adjusted the tests to expect the
extra output that came out. Turns out that was only circ.exp, the
original test that actually brought this issue to light.
Tested on x86_64 Fedora 17, native and gdbserver.
gdb/
2013-12-17 Pedro Alves <palves@redhat.com>
* frame.h (enum frame_id_stack_status): New enum.
(struct frame_id) <stack_addr>: Adjust comment.
<stack_addr_p>: Delete field, replaced with ...
<stack_status>: ... this new field.
(frame_id_build_unavailable_stack): Declare.
* frame.c (frame_addr_hash, fprint_field, outer_frame_id)
(frame_id_build_special): Adjust.
(frame_id_build_unavailable_stack): New function.
(frame_id_build, frame_id_build_wild): Adjust.
(frame_id_p, frame_id_eq, frame_id_inner): Adjust to take into
account frames with unavailable stack.
* amd64-tdep.c (amd64_frame_this_id)
(amd64_sigtramp_frame_this_id, amd64_epilogue_frame_this_id): Use
frame_id_build_unavailable_stack.
* dwarf2-frame.c (dwarf2_frame_this_id): Likewise.
* i386-tdep.c (i386_frame_this_id, i386_epilogue_frame_this_id)
(i386_sigtramp_frame_this_id): Likewise.
gdb/testsuite/
2013-12-17 Pedro Alves <palves@redhat.com>
* gdb.trace/circ.exp: Expect frame info to be printed when
switching between frames with unavailable stack, but different
functions.
H.J. Lu [Tue, 17 Dec 2013 19:48:18 +0000 (11:48 -0800)]
Use _bfd_elf_copy_private_bfd_data
PR binutils/16318
* elf32-arm.c (elf32_arm_copy_private_bfd_data): Call
_bfd_elf_copy_private_bfd_data.
* elf32-bfin.c (bfin_elf_copy_private_bfd_data): Removed.
(elf32_bfinfdpic_copy_private_bfd_data): Likewise.
(bfd_elf32_bfd_copy_private_bfd_data): Don't define.
* elf32-frv.c (frv_elf_copy_private_bfd_data): Removed.
(elf32_frvfdpic_copy_private_bfd_data): Likewise.
(bfd_elf32_bfd_copy_private_bfd_data): Don't define.
* elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Removed.
(bfd_elf32_bfd_copy_private_bfd_data): Don't define.
* elf32-lm32.c (lm32_elf_copy_private_bfd_data): Removed.
(lm32_elf_fdpic_copy_private_bfd_data): Call
_bfd_elf_copy_private_bfd_data.
* elf32-mep.c (mep_elf_copy_private_bfd_data): Removed.
(bfd_elf32_bfd_copy_private_bfd_data): Don't define.
* elf32-msp430.c (elf32_msp430_copy_private_bfd_data): Removed.
(bfd_elf32_bfd_copy_private_bfd_data): Don't define.
* elf32-mt.c (mt_elf_copy_private_bfd_data): Removed.
(bfd_elf32_bfd_copy_private_bfd_data): Don't define.
* elf32-sh.c (sh_elf_set_private_flags): Removed.
(sh_elf_copy_private_data): Call _bfd_elf_copy_private_bfd_data
and sh_elf_set_mach_from_flags.
* elfnn-aarch64.c (elfNN_aarch64_copy_private_bfd_data): Removed.
(bfd_elfNN_bfd_copy_private_bfd_data): Don't define.
H.J. Lu [Tue, 17 Dec 2013 18:10:16 +0000 (10:10 -0800)]
Rename index to indx
* peXXigen.c (rsrc_process_section): Rename index to indx.
Andrew Burgess [Tue, 17 Dec 2013 17:18:44 +0000 (17:18 +0000)]
Convert the unavailable vector to be bit, not byte, based.
https://sourceware.org/ml/gdb-patches/2013-12/msg00144.html
The vector of unavailable parts of a value is currently byte based. Given
that we can model a value down to the bit level, we can potentially loose
information with the current implementation. After this patch we model the
unavailable information in bits.
gdb/ChangeLog
* dwarf2loc.c (read_pieced_value): Mark bits, not bytes
unavailable, use correct bit length.
* value.c (struct value): Extend comment on unavailable to
indicate that it is bit based.
(value_bits_available): New function.
(value_bytes_available): Call value_bits_available.
(value_entirely_available): Check against the bit length, not byte
length.
(mark_value_bits_unavailable): New function.
(mark_value_bytes_unavailable): Move contents to
mark_value_bits_unavailable, call to same.
(memcmp_with_bit_offsets): New function.
(value_available_contents_bits_eq): New function, takes the
functionality from value_available_contents_eq but uses
memcmp_with_bit_offsets now, and is bit not byte based.
(value_available_contents_eq): Move implementation into
value_available_contents_bits_eq, call to same.
(value_contents_copy_raw): Work on bits, not bytes.
(unpack_value_bits_as_long_1): Check availability in bits, not
bytes.
* value.h (value_bits_available): Declare new function.
(mark_value_bits_unavailable): Declare new function.
gdb/testsuite/ChangeLog
* gdb.trace/unavailable-dwarf-piece.c: New file.
* gdb.trace/unavailable-dwarf-piece.exp: New file.
Michael Zolotukhin [Tue, 17 Dec 2013 17:06:57 +0000 (09:06 -0800)]
Properly handle ljmp/lcall with invalid MODRM byte
gas/testsuite/
2013-12-17 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
* gas/i386/disassem.s: New.
* gas/i386/disassem.d: Likewise.
* gas/i386/x86-64-disassem.s: Likewise.
* gas/i386/x86-64-disassem.d: Likewise.
* gas/i386/i386.exp: Run disassem and x86-64-disassem.
opcodes/
2013-12-17 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
* i386-dis.c (MOD_FF_REG_3): New.
(MOD_FF_REG_5): Likewise.
(mod_table): Add MOD_FF_REG_3 and MOD_FF_REG_5.
(reg_table): Use MOD_FF_REG_3 and MOD_FF_REG_5.
Nick Clifton [Tue, 17 Dec 2013 15:39:13 +0000 (15:39 +0000)]
* peXXigen.c: Include wchar.h if available.
Include safe-ctype.h.
(HighBitSet, SetHighBit, WithoutHighBit): New macros.
(pe_print_resource_entries): Rename to
rsrc_print_resource_entries. Handle names that are not RVAs.
(pe_print_resource_directory): Rename to
rsrc_print_resource_directory.
(pe_print_rsrc): Rename to rsrc_print_section. Corrupt
computation of RVA bias.
(rsrc_count_entries): New function.
(rsrc_count_directory): New function.
(rsrc_parse_entry): New function.
(rsrc_parse_entries): New function.
(rsrc_parse_directory): New function.
(rsrc_write_string): New function.
(rsrc_compute_rva): New function.
(rsrc_write_leaf): New function.
(rsrc_write_entry): New function.
(rsrc_write_directory): New function.
(u16_mbtouc): New function.
(rsrc_cmp): New function.
(rsrc_print_name): New function.
(rsrc_resource_name): New function.
(rsrc_merge_string_entries): New function.
(rsrc_sort_entries): New function.
(rsrc_attach_chain): New function.
(rsrc_merge): New function.
(rsrc_process_section): New function - merges the contents of a
.rsrc section.
(_bfd_XXi_final_link_postscript): Call rsrc_process_section.
* configure.in (AC_CHECK_HEADERS): Add wchar.h
* config.in: Regenerate.
* configure: Regenerate.
Alan Modra [Mon, 16 Dec 2013 23:00:38 +0000 (09:30 +1030)]
daily update
Pierre Muller [Mon, 16 Dec 2013 22:44:43 +0000 (23:44 +0100)]
Fix compilation error for cygwin native build.
* windows-nat.c (windows_ensure_ntdll_loaded) [__USEWIDE]:
Call wcstombs.
fxcoudert [Fri, 13 Dec 2013 21:42:02 +0000 (21:42 +0000)]
* configure.ac: Add user-friendly check for native x86_64-linux multilibs. * configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205975
138bc75d-0d04-0410-961f-
82ee72b054a4
Andrew Bennett [Mon, 16 Dec 2013 16:39:47 +0000 (16:39 +0000)]
Add support to show the symbolic names of the MIPS CP1 registers.
2013-12-16 Andrew Bennett <andrew.bennett@imgtec.com>
gas/testsuite/gas/mips/
* mips.exp: Add CP1 register name tests.
* cp1-names-mips32.d: New test.
* cp1-names-mips32r2.d: New test.
* cp1-names-mips64.d: New test.
* cp1-names-mips64r2.d: New test.
* cp1-names-numeric.d: New test.
* cp1-names-r3000.d: New test.
* cp1-names-r4000.d: New test.
* cp1-names-sb1.d: New test.
* cp1-names.s: New test.
* micromips-insn32.d: Add the correct symbolic names for the CP1
registers.
* micromips-noinsn32.d: Likewise.
* micromips-trap.d: Likewise.
* micromips.d: Likewise.
opcodes/
* mips-dis.c: Add mips_cp1_names pointer.
(mips_cp1_names_numeric): New array.
(mips_cp1_names_mips3264): New array.
(mips_arch_choice): Add cp1_names.
(mips_arch_choices): Add relevant cp1 register name array to each of
the elements.
(set_default_mips_dis_options): Add support for setting up the
mips_cp1_names pointer.
(parse_mips_dis_option): Add support for the cp1-names command line
variable. Also setup the mips_cp1_names pointer.
(print_reg): Print out name of the cp1 register.
Andreas Schwab [Mon, 16 Dec 2013 16:22:14 +0000 (17:22 +0100)]
Fix missing newline in error message
* elf64-ppc.c (ppc64_elf_relocate_section): Add newline to error
message.
Andrew Bennett [Mon, 16 Dec 2013 15:19:34 +0000 (07:19 -0800)]
Range of element index is too large on MIPS MSA element selection instructions.
The element index range for the following MIPS MSA instructions: sldi, splati,
copy_s, copy_u, insert and insve is 1 bit too large. This patch fixes this issue.
ChangeLog:
gas/testsuite/gas/mips/
* msa.s: Reduced maximum element index range for sldi, splati,
copy_s, copy_u, insert and insve instructions.
* msa64.s: Likewise.
* micromips@msa.d: Likewise.
* micromips@msa64.d: Likewise.
* msa.d: Likewise.
* msa64.d: Likewise.
include/opcode/
* mips.h: Updated description of +o, +u, +v and +w for MIPS and
microMIPS.
opcodes/
* micromips-opc.c (decode_micromips_operand): Reduced range of +o, +u,
+v and +w.
(micromips_opcodes): Reduced element index range for sldi, splati,
copy_s, copy_u, insert and insve instructions.
* opcodes/mips-opc.c (decode_mips_operand): Reduced range of +o, +u,
+v and +w.
(mips_builtin_opcodes): Reduced element index range for sldi, splati,
copy_s, copy_u, insert and insve instructions.
Pedro Alves [Mon, 16 Dec 2013 14:04:52 +0000 (14:04 +0000)]
PR 16329: remote debugging broken on Solaris.
Like on GNU/Linux (linux-thread-db.c), the Solaris solaris-threads
target (handles libthread_db.so) shouldn't be pushed when remote
debugging.
This uses the same predicate used by linux-thread-db.c.
gdb/
2013-12-16 Pedro Alves <palves@redhat.com>
PR 16329
* sol-thread.c (check_for_thread_db): If the target can't run or
isn't a core, return without pushing.
Alan Modra [Sun, 15 Dec 2013 23:00:37 +0000 (09:30 +1030)]
daily update
Joel Brobecker [Fri, 13 Dec 2013 17:21:37 +0000 (18:21 +0100)]
Revert "Do not overwrite so_list's so_name in solib_map_sections"
This reverts commit
07293be44859c607a36c313e51bec2dcdcd3c243, as it
causes an unintended change of behavior with GDB/MI's =library-loaded
events: The host-name="<path>" part of the event is now showing the
target-side path instead of the host-side path.
This revert affects Darwin and AIX systems, however, where the BFD
is either artificial or icomplete, leading to the outputt of
"info shared" not containing the information we'd like. For instance,
on Darwin, we would see:
(top-gdb) info shared
From To Syms Read Shared Object Library
0x00007fff8d060de4 0x00007fff8d09ce1f Yes (*) i386:x86-64
0x00007fff8af08b10 0x00007fff8b1c6f73 Yes (*) i386:x86-64
To compensate for that, we overwrite the filename of the associated bfd.
gdb/ChangeLog:
Revert the following commit:
* solib.c (solib_map_sections): Remove code overwriting
SO->SO_NAME with the bfd's filename.
Make the following changes required after the revert above:
* solib-aix.c (solib_aix_bfd_open): Set the filename of the
returned bfd to a copy of the synthetic pathname.
* solib-darwin.c (darwin_bfd_open): Set the filename of the
returned bfd to a copy of PATHNAME.
Yao Qi [Fri, 22 Nov 2013 09:00:57 +0000 (17:00 +0800)]
Perf test case: skip-prologue
This patch add a perf test case on skip-prologue by inserting
breakpoints on two functions many times, in order to exercise
skip-prologue.
gdb/testsuite:
2013-12-15 Yao Qi <yao@codesourcery.com>
* gdb.perf/skip-prologue.c: New.
* gdb.perf/skip-prologue.exp: New.
* gdb.perf/skip-prologue.py: New.
Alan Modra [Sat, 14 Dec 2013 23:00:39 +0000 (09:30 +1030)]
daily update
Alan Modra [Sat, 14 Dec 2013 02:40:04 +0000 (13:10 +1030)]
Correct elf_merge_st_other arguments for weak symbols
* elflink.c (_bfd_elf_merge_symbol): If merging a new weak
symbol that will be skipped, we don't have a new definition.
Alan Modra [Fri, 13 Dec 2013 23:01:01 +0000 (09:31 +1030)]
daily update