binutils-gdb.git
11 years agoAdd AMD bdver4 support.
Saravanan Ekanathan [Mon, 30 Sep 2013 17:02:07 +0000 (17:02 +0000)]
Add AMD bdver4 support.

gas/
* config/tc-i386.c (cpu_arch): Add CPU_BDVER4_FLAGS.
* doc/c-i386.texi: Add -march=bdver4 option.

gas/testsuite/
* gas/i386/i386.exp: Run bdver4 test cases.
* gas/i386/nops-1-bdver4.d: New.
* gas/i386/arch-10-bdver4.d: New.
* gas/i386/x86-64-nops-1-bdver4.d: New.
* gas/i386/x86-64-arch-2-bdver4.d: New.

opcodes/
* i386-gen.c (cpu_flag_init): Add CPU_BDVER4_FLAGS.
* i386-init.h: Regenerated.

11 years ago2013-09-30 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Mon, 30 Sep 2013 14:06:24 +0000 (14:06 +0000)]
2013-09-30  Tristan Gingold  <gingold@adacore.com>

* i386-darwin-nat.c (darwin_complete_target): Install methods for
hardware watchpoint.
(i386_darwin_dr_set): Support 32 and 64 bit states.
(i386_darwin_dr_get): Likewise.
(i386_darwin_dr_set_control): Make static.
(i386_darwin_dr_set_addr, i386_darwin_dr_get_addr)
(i386_darwin_dr_get_status, i386_darwin_dr_get_control): Likewise.

11 years ago * aarch64-linux-nat.c: Replace PIDGET with ptid_get_pid.
Luis Machado [Mon, 30 Sep 2013 11:50:12 +0000 (11:50 +0000)]
* aarch64-linux-nat.c: Replace PIDGET with ptid_get_pid.
Replace TIDGET with ptid_get_lwp.
Replace GET_LWP with ptid_get_lwp.
* aix-thread.c (BUILD_THREAD, BUILD_LWP): Remove.
Replace BUILD_THREAD with ptid_build.
Replace BUILD_LWP with ptid_build.
Replace PIDGET with ptid_get_pid.
Replace TIDGET with ptid_get_lwp.
* alphabsd-nat.c: Replace PIDGET with ptid_get_pid.
* amd64-linux-nat.c: Replace PIDGET with ptid_get_pid.
Replace TIDGET with ptid_get_lwp.
* amd64bsd-nat.c: Replace PIDGET with ptid_get_pid.
* arm-linux-nat.c: Replace PIDGET with ptid_get_pid.
Replace TIDGET with ptid_get_lwp.
Replace GET_LWP with ptid_get_lwp.
* armnbsd-nat.c: Replace PIDGET with ptid_get_pid.
* auxv.c: Likewise.
* breakpoint.c: Likewise.
* common/ptid.c (ptid_is_pid): Condense check for
null_ptid and minus_one_ptid.
(ptid_lwp_p): New function.
(ptid_tid_p): New function.
* common/ptid.h: Update comments for accessors.
(ptid_lwp_p): New prototype.
(ptid_tid_p): New prototype.
* defs.h (PIDGET, TIDGET, MERGEPID): Do not define.
* gcore.c: Replace PIDGET with ptid_get_pid.
* gdbthread.h: Likewise.
* gnu-nat.c: Likewise.
* hppa-linux-nat.c: Replace PIDGET with ptid_get_pid.
Replace TIDGET with ptid_get_lwp.
* hppabsd-nat.c: Replace PIDGET with ptid_get_pid.
* hppanbsd-nat.c: Likewise.
* i386-linux-nat.c: Replace PIDGET with ptid_get_pid.
Replace TIDGET with ptid_get_lwp.
* i386bsd-nat.c: Replace PIDGET with ptid_get_pid.
* ia64-linux-nat.c: Replace PIDGET with ptid_get_pid.
* infcmd.c: Likewise.
* inferior.h: Likewise.
* inflow.c: Likewise.
* infrun.c: Likewise.
* linux-fork.c: Likewise.
* linux-nat.c: Replace PIDGET with ptid_get_pid.
Replace GET_PID with ptid_get_pid.
Replace is_lwp with ptid_lwp_p.
Replace GET_LWP with ptid_get_lwp.
Replace BUILD_LWP with ptid_build.

11 years ago * emulparams/msp430all.sh: Update ARCH names.
Nick Clifton [Mon, 30 Sep 2013 09:03:59 +0000 (09:03 +0000)]
* emulparams/msp430all.sh: Update ARCH names.
* cpu-msp430.c: Use printable names that match the values
displayed by readelf.

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

11 years agogdb/testsuite/
Yao Qi [Sun, 29 Sep 2013 14:05:36 +0000 (14:05 +0000)]
gdb/testsuite/

* gdb.base/shreloc.exp: Set $msymfile to 'shreloc.txt' if host
is remote.

11 years agogdb: btrace: fix build errors on older glibc builds
Mike Frysinger [Sun, 29 Sep 2013 03:57:34 +0000 (03:57 +0000)]
gdb: btrace: fix build errors on older glibc builds

It is possible to have a build of glibc where SYS_perf_event_open is not
defined (because when the glibc was compiled, the syscall did not exist),
but have newer kernel headers installed so that linux/perf_event.h is
available.  In this setup, you get a build failure:

./common/linux-btrace.c: In function 'kernel_supports_btrace':
./common/linux-btrace.c:316:23: error: 'SYS_perf_event_open' undeclared (first use in this function)

Update the ifdef check to also see if the syscall is available.

URL: https://bugs.gentoo.org/473522
Reported-by: William Throwe <wtt6@cornell.edu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agodaily update
Alan Modra [Sun, 29 Sep 2013 00:00:04 +0000 (00:00 +0000)]
daily update

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

11 years ago * dwarf2read.c (dwarf2_section_info): Add comment.
Doug Evans [Fri, 27 Sep 2013 21:34:04 +0000 (21:34 +0000)]
* dwarf2read.c (dwarf2_section_info): Add comment.
(dwp_file): Split loaded_cutus into loaded_cus, loaded_tus.
All uses updated.
(dwarf2_section_empty_p): Rename arg from "info" to "section".
(dwarf2_read_section): Delete unused local "header".  Add section
name to error message.
(create_dwo_in_dwp): Tweak comment.
(MAX_NR_DWO_SECTIONS): Combine count of .debug_macro + .debug_macinfo.

11 years ago * dwarf2read.c (die_reader_specs): Tweak comment.
Doug Evans [Fri, 27 Sep 2013 20:33:20 +0000 (20:33 +0000)]
* dwarf2read.c (die_reader_specs): Tweak comment.
(get_section_bfd_owner, get_section_bfd_section): New functions.
(get_section_name, get_section_file_name): New functions.
(get_section_id, get_section_flags): New functions.
(*): Use new functions to access section fields.

11 years ago * dwarf2read.c (struct dwo_file): Add/tweak comments.
Doug Evans [Fri, 27 Sep 2013 18:48:41 +0000 (18:48 +0000)]
* dwarf2read.c (struct dwo_file): Add/tweak comments.
(lookup_dwo_unit_in_dwp): Renamed from lookup_dwo_in_dwp.  Remove
arg "htab".  All callers updated.
(create_debug_types_hash_table): Remove redundant copy of
abbrev_section.
(create_dwo_in_dwp): Tweak comments.
(read_str_index): Tweak comment.  Record dwarf form name in static
local.

11 years agoPass offset_size to print_dwarf_vma for cie_id
H.J. Lu [Fri, 27 Sep 2013 18:05:03 +0000 (18:05 +0000)]
Pass offset_size to print_dwarf_vma for cie_id

binutils/

* dwarf.c (display_debug_frames): Pass offset_size to
print_dwarf_vma for cie_id.

binutils/testsuite/

* binutils-all/x86-64/compressed-1a.d: Updated for 64-bit addresses.

11 years agoFix regular /path/to/directory sysroots and target reported dll paths with drive...
Pedro Alves [Fri, 27 Sep 2013 15:29:06 +0000 (15:29 +0000)]
Fix regular /path/to/directory sysroots and target reported dll paths with drive specs.

I tried debugging a remote Windows program on Linux host, and pointed the
sysroot to "/some/path/" rather than "remote:", and I found GDB couldn't
find the dlls in the sysroot.  If the dll name is
"C:/Windows/system32/ntdll.dll", I end up with the sysroot+in_pathname
concatenated this way:

 (top-gdb) p temp_pathname
 $1 = 0x228b690 "/some/pathC:/Windows/system32/ntdll.dll"
                          ^^

That is, a directory separator is missing.  This is a regression.

The problem is that solib_find decides that since the target path has
a drive spec, a separator is not necessary, which is clearly wrong in
this case.  That check was added in
<https://sourceware.org/ml/gdb-patches/2013-06/msg00028.html>, to
handle the case of sysroot being "remote:".  This patch fixes that
original issue in a different way.  Instead of checking whether the
path has a drive spec, check whether the sysroot is "remote:".  The
patch adds a table that helps visualize the cases that need a
separator.  I also confirmed the original issue is still handled as
expected.  That is, that "set sysroot remote:" still does the right
thing.

remote_filename_p returns true if the filename is prefixed with
"remote:".  In this case, we need to check whether the filename is
exactly "remote:".  I thought of different ways or either changing
remote_filename_p or adding another convenience function to remote.c
to avoid exposing the "remote:" prefix out of remote.c.  But all
attempts turned out adding lot of over needless complication.  So the
patch just exposes the prefix behind a new macro, which allows using a
straighforward strcmp.

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

* remote.h (REMOTE_SYSROOT_PREFIX): New define.
(remote_filename_p): Add comment.
* remote.c (remote_filename_p): Adjust to use
REMOTE_SYSROOT_PREFIX.
* solib.c (solib_find): When deciding whether we need to add a
directory separator, check whether the sysroot is "remote:"
instead of checking whether the patch has a drive spec.  Add
comments.

11 years agoremote.c: Remove unnecessary fields from 'struct stop_reply'.
Pedro Alves [Fri, 27 Sep 2013 13:23:32 +0000 (13:23 +0000)]
remote.c: Remove unnecessary fields from 'struct stop_reply'.

I noticed these fields aren't really necessary -- if the T stop reply
indicated any we have any special event, the fallthrough doesn't
really do anything.

Tested on x86_64 Fedora 17 w/ local gdbserver, and also confirmed
"catch load" against a Windows gdbserver running under Wine, which
exercises TARGET_WAITKIND_LOADED, still works as expected.

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

* remote.c (struct stop_reply) <solibs_changed, replay_event>:
Delete fields.
(remote_parse_stop_reply): Adjust, setting event->ws.kind
directly.

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

11 years agoFix set debug frame output
Jan Kratochvil [Thu, 26 Sep 2013 20:01:25 +0000 (20:01 +0000)]
Fix set debug frame output

gdb/
2013-09-26  Jan Kratochvil  <jan.kratochvil@redhat.com>

Fix set debug frame output.
* frame.c (fprint_frame_type): Add TAILCALL_FRAME entry.  Move
SENTINEL_FRAME entry lower to match enum frame_type order.

11 years ago Replace constant values 8 to 15 by AMD64_R8_REGNUM to
Pierre Muller [Thu, 26 Sep 2013 07:00:00 +0000 (07:00 +0000)]
Replace constant values 8 to 15 by AMD64_R8_REGNUM to
AMD64_R15_REGNUM when a register index is expected.
* amd64-windows-tdep.c (amd64_windows_dummy_call_integer_regs):
Substitute in array.
* amd64-tdep.c (amd64_dwarf_regmap): Ditto.
(amd64_push_arguments): Substitute in integer_regnum array.

11 years ago * objfiles.c (allocate_objfile): Move comment to better place.
Doug Evans [Thu, 26 Sep 2013 01:08:35 +0000 (01:08 +0000)]
* objfiles.c (allocate_objfile): Move comment to better place.

11 years ago New option "set debug symfile on".
Doug Evans [Wed, 25 Sep 2013 23:17:12 +0000 (23:17 +0000)]
New option "set debug symfile on".
* NEWS: Mention "set debug symfile".
* Makefile.in (SFILES): Add symfile-debug.c.
(COMMON_OBS): Add symfile-debug.o.
* elfread.c (elf_symfile_read): Use objfile_set_sym_fns to set the
objfile's symbol functions.
* objfiles.h (objfile_set_sym_fns): Declare.
* symfile-debug.c: New file.
* symfile.c (syms_from_objfile_1): Use objfile_set_sym_fns to set the
objfile's symbol functions.
(reread_symbols): Ditto.

11 years ago * symfile.h (struct sym_fns): Delete member "sym_flavour".
Doug Evans [Wed, 25 Sep 2013 22:48:19 +0000 (22:48 +0000)]
* symfile.h (struct sym_fns): Delete member "sym_flavour".
All uses updated.
(add_symtab_fns): Update prototype.
* symfile.c (sym_fns_ptr): Delete.  Replace with ...
(registered_sym_fns): ... this.
(symtab_fns): Update.
(add_symtab_fns): New arg "flavour".  All callers updated.
(find_sym_fns): Rewrite to use new sym_fns registry.

11 years ago * symfile.h (struct sym_fns): Add "objfile" argument to
Doug Evans [Wed, 25 Sep 2013 22:24:05 +0000 (22:24 +0000)]
* symfile.h (struct sym_fns): Add "objfile" argument to
sym_read_linetable.  All uses updated.

11 years ago * symtab.c (domain_name, search_domain_name): New functions.
Doug Evans [Wed, 25 Sep 2013 21:51:27 +0000 (21:51 +0000)]
* symtab.c (domain_name, search_domain_name): New functions.
* symtab.h (domain_name, search_domain_name): Declare.

11 years ago * symfile.h (struct quick_symbol_functions): Reorg arg list of
Doug Evans [Wed, 25 Sep 2013 21:44:11 +0000 (21:44 +0000)]
* symfile.h (struct quick_symbol_functions): Reorg arg list of
map_matching_symbols so objfile is first.  All uses updated.
* dwarf2read.c (dw2_map_matching_symbols): Update signature.
* psymtab.c (map_matching_symbols_psymtab): Update signature.

11 years ago2013-08-25 Andrew Pinski <apinski@cavium.com>
Andrew Pinski [Wed, 25 Sep 2013 17:55:05 +0000 (17:55 +0000)]
2013-08-25  Andrew Pinski  <apinski@cavium.com>

* elfnn-aarch64.c (TCB_SIZE): Base on the ARCH_SIZE rather than a
fixed size of 16.

11 years agoChangeLog:
Ulrich Weigand [Wed, 25 Sep 2013 11:52:50 +0000 (11:52 +0000)]
ChangeLog:
2013-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>

PR shlibs/8882
* solib-svr4.c (svr4_read_so_list): Skip the vDSO when reading
link map entries.

testsuite/ChangeLog:
2013-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>

PR shlibs/8882
* gdb.base/corefile.exp: Add a check to assure warning-free
core-file load.

11 years ago * objfiles.c (free_objfile): Move comment.
Doug Evans [Wed, 25 Sep 2013 00:15:30 +0000 (00:15 +0000)]
* objfiles.c (free_objfile): Move comment.

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

11 years agobfd/
Richard Sandiford [Tue, 24 Sep 2013 22:15:38 +0000 (22:15 +0000)]
bfd/
2013-09-24  Gregory Fong  <gregory.0xf0@gmail.com>

* elfxx-mips.c (mips_elf_create_got_section): Hide
_GLOBAL_OFFSET_TABLE_.

ld/testsuite/
2013-09-24  Gregory Fong  <gregory.0xf0@gmail.com>

* ld-mips-elf/eh-frame5.d, ld-mips-elf/jalx-2.dd,
ld-mips-elf/mips-elf.exp, ld-mips-elf/mips16-pic-2.ad,
ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/pic-and-nonpic-3a.dd,
ld-mips-elf/pic-and-nonpic-3b.ad, ld-mips-elf/pic-and-nonpic-3b.dd,
ld-mips-elf/pic-and-nonpic-3b.nd, ld-mips-elf/pic-and-nonpic-4b.ad,
ld-mips-elf/pic-and-nonpic-4b.nd, ld-mips-elf/pic-and-nonpic-4b.rd,
ld-mips-elf/pic-and-nonpic-5b.ad, ld-mips-elf/pic-and-nonpic-5b.nd,
ld-mips-elf/pic-and-nonpic-6-n32.ad,
ld-mips-elf/pic-and-nonpic-6-n32.dd,
ld-mips-elf/pic-and-nonpic-6-n32.nd,
ld-mips-elf/pic-and-nonpic-6-n64.ad,
ld-mips-elf/pic-and-nonpic-6-n64.dd,
ld-mips-elf/pic-and-nonpic-6-n64.nd,
ld-mips-elf/pic-and-nonpic-6-o32.ad,
ld-mips-elf/pic-and-nonpic-6-o32.dd,
ld-mips-elf/pic-and-nonpic-6-o32.nd, ld-mips-elf/rel32-n32.d,
ld-mips-elf/rel32-o32.d, ld-mips-elf/rel64.d,
ld-mips-elf/tls-multi-got-1.got, ld-mips-elf/tls-multi-got-1.r,
ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-1.got,
ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.got,
ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-3.got,
ld-mips-elf/tlsdyn-o32.d, ld-mips-elf/tlsdyn-o32.got,
ld-mips-elf/tlslib-o32-ver.got, ld-mips-elf/tlslib-o32.got: Update
for removal of _GLOBAL_OFFSET_TABLE_ from .dynsym.

11 years agoDelete unused ada-exp.y:string_to_operator
Joel Brobecker [Tue, 24 Sep 2013 19:41:35 +0000 (19:41 +0000)]
Delete unused ada-exp.y:string_to_operator

This function appears to have been unused since 2004.

gdb/ChangeLog:

        * ada-exp.y (string_to_operator): Delete.
        (dummy_string_to_ada_operator): Delete.

11 years agoFix name of file in ChangeLog entry (re-implement funcalls on x64-windows)
Joel Brobecker [Tue, 24 Sep 2013 17:24:20 +0000 (17:24 +0000)]
Fix name of file in ChangeLog entry (re-implement funcalls on x64-windows)

11 years agoRevert use of classify callback in i386 gdbarch_tdep.
Joel Brobecker [Tue, 24 Sep 2013 16:14:15 +0000 (16:14 +0000)]
Revert use of classify callback in i386 gdbarch_tdep.

This is no longer useful, as it was introduced to reuse the funcall
handling code in amd64-tdep.c in the context of x64-windows. But
we have since then changed the implementations to be completely
independent of each other.

This reverts the non-windows-specific part of the change called:
    amd64: Integer parameters in function calls on Windows
(the x64-windows portion has already been reverted)

gdb/ChangeLog:

Revert:
* i386-tdep.h (enum amd64_reg_class): New, moved here from
amd64-tdep.c.
(struct gdbarch_tdep): Add fields call_dummy_num_integer_regs,
call_dummy_integer_regs, and classify.
* amd64-tdep.h (amd64_classify): Add declaration.
* amd64-tdep.c (amd64_dummy_call_integer_regs): New static constant.
(amd64_reg_class): Delete, moved to i386-tdep.h.
(amd64_classify): Make non-static.  Move declaration to amd64-tdep.h.
Replace call to amd64_classify by call to tdep->classify.
(amd64_push_arguments): Get the list of registers to use for
passing integer parameters from the gdbarch tdep structure,
rather than using a hardcoded one.  Replace calls to amd64_classify
by calls to tdep->classify.
(amd64_push_dummy_call): Get the register number used for
the "hidden" argument from tdep->call_dummy_integer_regs.
(amd64_init_abi): Initialize tdep->call_dummy_num_integer_regs
and tdep->call_dummy_integer_regs.  Set tdep->classify.

11 years agoRevert use of memory_args_by_pointer in i386 gdbarch_tdep.
Joel Brobecker [Tue, 24 Sep 2013 16:13:58 +0000 (16:13 +0000)]
Revert use of memory_args_by_pointer in i386 gdbarch_tdep.

This is no longer useful, as it was introduced to reuse the funcall
handling code in amd64-tdep.c in the context of x64-windows. But
we have since then changed the implementations to be completely
independent of each other.

This reverts the non-windows-specific part of the change called:
    amd64-windows: memory args passed by pointer during function calls.
(the x64-windows portion has already been reverted)

gdb/ChangeLog:

        Revert:
        * i386-tdep.h (gdbarch_tdep): Add field memory_args_by_pointer.
        * amd64-tdep.c (amd64_push_arguments): Add handling of architectures
        where tdep->memory_args_by_pointer is non-zero.

11 years agoRevert use of integer_param_regs_saved_in_caller_frame in i386 gdbarch_tdep.
Joel Brobecker [Tue, 24 Sep 2013 16:13:49 +0000 (16:13 +0000)]
Revert use of integer_param_regs_saved_in_caller_frame in i386 gdbarch_tdep.

This is no longer useful, as it was introduced to reuse the funcall
handling code in amd64-tdep.c in the context of x64-windows. But
we have since then changed the implementations to be completely
independent of each other.

This reverts the non-windows-specific part of the change called:
    amd64-windows: 32 bytes allocated on stack by caller for integer
    parameter regs
(the x64-windows portion has already been reverted)

gdb/ChangeLog:

        Revert:
        * i386-tdep.h (struct gdbarch_tdep): Add new field
        integer_param_regs_saved_in_caller_frame.
        * amd64-tdep.c (amd64_push_dummy_call): Allocate some memory on
        stack if tdep->integer_param_regs_saved_in_caller_frame is set.

11 years agoReimplement function calls on amd64-windows
Joel Brobecker [Tue, 24 Sep 2013 16:13:40 +0000 (16:13 +0000)]
Reimplement function calls on amd64-windows

This patch provides a standalone implementation of function calls
on amd64-windows, instead of providing some bits and pieces hooking
into the function call implementation meant for sysV (in amd64-tdep).
It makes better sense to do it this way, because the two ABIs are
actually very different; for instance, the concept of argument
classification, which is so central in the sysV ABI and drove the
the implementation in amd64-tdep, makes no sense for Windows. It
is therefore better for the Windows implementation to be completely
separate, rather than rely on adaptations of the sysV implementation.

gdb/ChangeLog:

        * amd64-tdep.c: #include "value.h"
        (amd64_windows_classify): Delete.
        (amd64_windows_passed_by_integer_register)
        (amd64_windows_passed_by_xmm_register)
        (amd64_windows_passed_by_pointer)
        (amd64_windows_adjust_args_passed_by_pointer)
        (amd64_windows_store_arg_in_reg, amd64_windows_push_arguments)
        (amd64_windows_push_dummy_call): New functions.
        (amd64_windows_init_abi): Remove setting of
        tdep->call_dummy_num_integer_regs, tdep->call_dummy_integer_regs,
        tdep->classify, tdep->memory_args_by_pointer and
        tdep->integer_param_regs_saved_in_caller_frame.
        Add call to set_gdbarch_push_dummy_call.

11 years ago * readline.c (bind_arrow_keys_internal):
Pierre Muller [Tue, 24 Sep 2013 14:49:48 +0000 (14:49 +0000)]
* readline.c (bind_arrow_keys_internal):
Handle VK_HOME, VK_END, VK_DELETE and VK_INSERT for mingw
hosts.

11 years agoFix last entry in ChangeLog.gdb (unnecessary dir name).
Joel Brobecker [Tue, 24 Sep 2013 14:13:20 +0000 (14:13 +0000)]
Fix last entry in ChangeLog.gdb (unnecessary dir name).

11 years agoSupport .dwp with the name of symlinked binary file
Jan Kratochvil [Tue, 24 Sep 2013 14:03:43 +0000 (14:03 +0000)]
Support .dwp with the name of symlinked binary file

gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

* dwarf2read.c (open_and_init_dwp_file): Try open_dwp_file also with
objfile->original_name.

gdb/testsuite/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdb.dwarf2/dwp-symlink.c: New file.
* gdb.dwarf2/dwp-symlink.exp: New file.

11 years agoKeep objfile original filename
Jan Kratochvil [Tue, 24 Sep 2013 14:00:06 +0000 (14:00 +0000)]
Keep objfile original filename

gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

Pass down original filename for objfile.
* coffread.c (coff_symfile_read): Update symbol_file_add_separate call.
* elfread.c (elf_symfile_read): Likewise.
* jit.c (jit_object_close_impl): Update allocate_objfile call, no
longer set ORIGINAL_NAME.
(jit_bfd_try_read_symtab): Update symbol_file_add_from_bfd call.
* jv-lang.c (get_dynamics_objfile): Update allocate_objfile call.
* machoread.c (macho_add_oso_symfile): Add parameter name.  Update
symbol_file_add_from_bfd call.
(macho_symfile_read_all_oso): Update two macho_add_oso_symfile calls.
(macho_check_dsym): Add parameter filenamep.  Change function comment.
Set *filenamep.
(macho_symfile_read): New variable dsym_filename.  Update
macho_check_dsym call.  Use it for symbol_file_add_separate.
* objfiles.c (allocate_objfile): Add parameter name.  New comment for
it.  Use it for objfile->original_name.
(objfile_name): Return OBFD's filename, if available.
* objfiles.h (allocate_objfile): Add new parameter name.
* solib.c (solib_read_symbols): Update symbol_file_add_from_bfd call.
* symfile-mem.c (symbol_file_add_from_memory): Update
symbol_file_add_from_bfd call.
* symfile.c (read_symbols): Update symbol_file_add_separate call, new
comment for it.
(symbol_file_add_with_addrs): New parameter name, add function comment
for it.  Remove variable name.  Update allocate_objfile call.
(symbol_file_add_separate): New parameter name, add function comment
for it.  Update symbol_file_add_with_addrs call.
(symbol_file_add_from_bfd): New parameter name.  Update
symbol_file_add_with_addrs call.
(symbol_file_add): Update symbol_file_add_from_bfd call.
(reread_symbols): New variable original_name.  Save
objfile->original_name by it.
* symfile.h (symbol_file_add_from_bfd, symbol_file_add_separate): Add
second parameter.

11 years agoCode cleanup: Add objfile_name accessor
Jan Kratochvil [Tue, 24 Sep 2013 13:57:38 +0000 (13:57 +0000)]
Code cleanup: Add objfile_name accessor

gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

Code cleanup: Add objfile_name accessor function.
* ada-lang.c (is_known_support_routine): Use objfile_name.
* auto-load.c (source_gdb_script_for_objfile)
(auto_load_objfile_script): Likewise.
* coffread.c (coff_symtab_read, read_one_sym): Likewise.
* dbxread.c (dbx_symfile_read): Likewise.
* dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
* dwarf2loc.c (locexpr_describe_location_piece): Likewise.
* dwarf2read.c (dwarf2_get_dwz_file, dwarf2_read_index)
(dw2_symtab_iter_next, dw2_expand_symtabs_matching)
(lookup_dwp_signatured_type, lookup_dwo_unit)
(dwarf2_build_psymtabs_hard, scan_partial_symbols, process_queue)
(fixup_go_packaging, process_imported_unit_die, dwarf2_physname)
(read_import_statement, create_dwo_cu, open_and_init_dwp_file)
(lookup_dwo_cutu, read_call_site_scope, dwarf2_ranges_read)
(dwarf2_record_block_ranges, read_common_block, read_typedef)
(read_subrange_type, load_partial_dies, read_partial_die)
(read_addr_index_1, read_str_index, dwarf_decode_lines_1)
(die_containing_type, build_error_marker_type, lookup_die_type)
(follow_die_ref_or_sig, follow_die_ref, dwarf2_fetch_die_loc_sect_off)
(dwarf2_fetch_constant_bytes, follow_die_sig, get_signatured_type)
(get_DW_AT_signature_type, write_psymtabs_to_index)
(save_gdb_index_command): Likewise.
* elfread.c (find_separate_debug_file_by_buildid, elf_symfile_read):
Likewise.
* expprint.c (dump_subexp_body_standard): Likewise.
* gdbtypes.c (type_name_no_tag_or_error): Likewise.
* jit.c (jit_object_close_impl): Use the objfile field name renamed to
original_name.
* linux-thread-db.c (try_thread_db_load_from_pdir_1): New variable
obj_name, use objfile_name for it, use the variable.
(try_thread_db_load_from_pdir, has_libpthread, thread_db_new_objfile):
Use objfile_name.
* machoread.c (macho_symtab_read, macho_check_dsym)
(macho_symfile_relocate): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minidebug.c (find_separate_debug_file_in_section): Likewise.
* minsyms.c (install_minimal_symbols): Likewise.
* objfiles.c (allocate_objfile): Use the objfile field name renamed to
original_name.
(filter_overlapping_sections): Use objfile_name.
(objfile_name): New function.
* objfiles.h (struct objfile): Rename field name to original_name.
(objfile_name): New prototype.
* printcmd.c (sym_info, address_info): Use objfile_name.
* probe.c (parse_probes, collect_probes, compare_probes)
(info_probes_for_ops): Likewise.
* progspace.c (clone_program_space): Likewise.
* psymtab.c (require_partial_symbols, dump_psymtab, allocate_psymtab)
(maintenance_info_psymtabs): Likewise.
* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile)
(source_section_scripts): Likewise.
* python/py-objfile.c (objfpy_get_filename): Likewise.
* python/py-progspace.c (pspy_get_filename): Likewise.
* solib-aix.c (solib_aix_get_toc_value): Likewise.
* solib-som.c (match_main, som_solib_section_offsets): Likewise.
* solib.c (solib_read_symbols): Likewise.
* stabsread.c (scan_file_globals): Likewise.
* stap-probe.c (handle_stap_probe): Likewise.
* symfile.c (symbol_file_clear, separate_debug_file_exists)
(find_separate_debug_file_by_debuglink): Likewise.
(reread_symbols): Likewise.  Use the objfile field name renamed to
original_name.
(allocate_symtab): Use objfile_name.
* symmisc.c (print_symbol_bcache_statistics, print_objfile_statistics)
(dump_objfile, dump_msymbols, dump_symtab_1)
(maintenance_print_msymbols, maintenance_print_objfiles)
(maintenance_info_symtabs, maintenance_check_symtabs): Likewise.
* target.c (target_translate_tls_address, target_info): Likewise.
* xcoffread.c (xcoff_initial_scan): Make variable name const.  Use
objfile_name.

11 years agoCode cleanup: rename variable
Jan Kratochvil [Tue, 24 Sep 2013 13:54:42 +0000 (13:54 +0000)]
Code cleanup: rename variable

gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

Code cleanup.
* probe.c (parse_probes): Rename variable objfile_name to
objfile_namestr.

11 years agoRemove solib-sunos.c
Jan Kratochvil [Tue, 24 Sep 2013 13:51:55 +0000 (13:51 +0000)]
Remove solib-sunos.c

gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

Remove solib-sunos.c.
* Makefile.in (ALLDEPFILES): Remove solib-sunos.c.
* config/m68k/obsd.mh (NATDEPFILES): Remove solib-sunos.o.
* objfiles.c (rt_common_objfile): Remove.
(free_objfile): Remove rt_common_objfile comparison.
* objfiles.h (rt_common_objfile): Remove.
* solib-sunos.c: Remove.
* symfile.c (reread_symbols): Remove solib-sunos.c comment.

11 years agoRemove a.out NetBSD and OpenBSD hosts
Jan Kratochvil [Tue, 24 Sep 2013 13:48:44 +0000 (13:48 +0000)]
Remove a.out NetBSD and OpenBSD hosts

gdb/
2013-09-21  Jan Kratochvil  <jan.kratochvil@redhat.com>

Remove a.out NetBSD and OpenBSD hosts.
* NEWS (Removed native configurations): New.
* config/arm/nbsdaout.mh: Remove.
* config/i386/nbsdaout.mh: Remove.
* config/i386/obsdaout.mh: Remove.
* config/m68k/nbsdaout.mh: Remove.
* config/sparc/nbsdaout.mh: Remove.
* config/vax/nbsdaout.mh: Remove.
* configure.host (arm*-*-netbsd*, i[34567]86-*-netbsd*)
(i[34567]86-*-openbsd[0-2].*, i[34567]86-*-openbsd3.[0-3])
(m68*-*-netbsd*, sparc-*-netbsd*, vax-*-netbsd*): Add them to obsolete
error.
(arm*-*-netbsd*, i[34567]86-*-netbsd*, i[34567]86-*-openbsd[0-2].*)
(i[34567]86-*-openbsd3.[0-3], m68*-*-netbsd*, sparc-*-netbsdaout*)
(sparc-*-netbsd*, vax-*-netbsd*): Remove.

11 years ago * elf32-mips.c (ELF_OSABI): Undef for vxworks.
Alan Modra [Tue, 24 Sep 2013 10:22:27 +0000 (10:22 +0000)]
* elf32-mips.c (ELF_OSABI): Undef for vxworks.

11 years ago * syms.c (_bfd_stab_section_find_nearest_line): Ignore partial
Alan Modra [Tue, 24 Sep 2013 06:57:36 +0000 (06:57 +0000)]
* syms.c (_bfd_stab_section_find_nearest_line): Ignore partial
stabs at end of .stab.  Tidy variable usage.  Don't drop the need
for a NULL function name stab if If N_FUN stab is ignored.
Ensure index entry count loop matches write loop.

11 years ago * emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Provide 32-bit
Alan Modra [Tue, 24 Sep 2013 06:29:39 +0000 (06:29 +0000)]
* emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Provide 32-bit
and cross-endian values.
* emulparams/elf64ppc.sh: Source elf32ppccomon.sh.  Delete duplicate,
and unset unwanted variables.

11 years ago * genscripts.sh (LIB_PATH): Don't exclude libdir or tooldir when
Alan Modra [Tue, 24 Sep 2013 05:59:55 +0000 (05:59 +0000)]
* genscripts.sh (LIB_PATH): Don't exclude libdir or tooldir when
sysrooted.  Also, don't always add tooldir when non-sysrooted.
Instead add both when native and tooldir also when TOOL_DIR is
defined.  Always prepend '=' to paths when sysrooted.  Always
put paths with LIBPATH_SUFFIX first in search order.

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

11 years agorevert erroneous checkin to mi-support.exp
Tom Tromey [Mon, 23 Sep 2013 18:11:49 +0000 (18:11 +0000)]
revert erroneous checkin to mi-support.exp

11 years ago(clh 9)
Tom Tromey [Mon, 23 Sep 2013 18:07:46 +0000 (18:07 +0000)]
(clh 9)

11 years agoIn regcache use print_hex_chars.
Andrew Burgess [Mon, 23 Sep 2013 16:48:43 +0000 (16:48 +0000)]
In regcache use print_hex_chars.

  https://sourceware.org/ml/gdb-patches/2013-09/msg00815.html

gdb/ChangeLog

        * regcache.c: Add include of valprint.h.
        (dump_endian_bytes): Delete.
        (regcache_dump): Use print_hex_chars not dump_endian_bytes.

11 years ago[MinGW] Fix a compilation error in readline/util.c:_rl_strnicmp
Joel Brobecker [Mon, 23 Sep 2013 16:05:24 +0000 (16:05 +0000)]
[MinGW] Fix a compilation error in readline/util.c:_rl_strnicmp

readline/ChangeLog.gdb:

* readline/util.c (_rl_strnicmp): Add missing semicolon.

11 years agoReuse print_hex_chars.
Andrew Burgess [Mon, 23 Sep 2013 09:18:44 +0000 (09:18 +0000)]
Reuse print_hex_chars.

  https://sourceware.org/ml/gdb-patches/2013-09/msg00768.html

gdb/ChangeLog

        * sh64-tdep.c (sh64_do_fp_register): Use print_hex_chars.

11 years agoRegenerate sim configure files to pick up support for powerpc64le in
Alan Modra [Mon, 23 Sep 2013 00:32:27 +0000 (00:32 +0000)]
Regenerate sim configure files to pick up support for powerpc64le in
libtool.m4.

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

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

11 years ago2013-09-21 Jan-Benedict Glaw <jbglaw@lug-owl.de>
Jan-Benedict Glaw [Sat, 21 Sep 2013 00:05:18 +0000 (00:05 +0000)]
2013-09-21  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

* configure.ac: Update from GCC.
* configure: Regenerate.

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

11 years ago * lib/dwarf.exp (build_executable_from_fission_assembler): New proc.
Doug Evans [Fri, 20 Sep 2013 22:43:28 +0000 (22:43 +0000)]
* lib/dwarf.exp (build_executable_from_fission_assembler): New proc.
* gdb.dwarf2/fission-base.S: Update.  Split out .dwo into separate
file.
* gdb.dwarf2/fission-loclists.S: Ditto.
* gdb.dwarf2/fission-reread.S: Ditto.
* gdb.dwarf2/fission-base.exp: Skip of remote host.  Compile with
build_executable_from_fission_assembler.
* gdb.dwarf2/fission-loclists.exp: Ditto.
* gdb.dwarf2/fission-reread.exp: Ditto.

11 years ago * lib/future.exp (gdb_find_objcopy, gdb_find_readelf): New procs.
Doug Evans [Fri, 20 Sep 2013 21:47:06 +0000 (21:47 +0000)]
* lib/future.exp (gdb_find_objcopy, gdb_find_readelf): New procs.
* lib/gdb.exp (build_id_debug_filename_get): Update to use them.
(gdb_gnu_strip_debug): Ditto.
* lib/prelink-support.exp (section_get, prelink_no): Ditto.
* gdb.arch/altivec-abi.exp: Ditto.
* gdb.base/attach-pie-misread.exp: Ditto.
* gdb.base/comprdebug.exp: Ditto.
* gdb.base/dup-sect.exp: Ditto.
* gdb.base/gnu-debugdata.exp: Ditto.
* gdb.base/step-symless.exp: Ditto.
* gdb.dwarf2/dw2-inline-param.exp: Ditto.
* gdb.dwarf2/dw2-skip-prologue.exp: Ditto.
* gdb.dwarf2/gdb-index.exp: Ditto.

11 years ago2013-09-20 Chung-Lin Tang <cltang@codesourcery.com>
Chung-Lin Tang [Fri, 20 Sep 2013 10:27:11 +0000 (10:27 +0000)]
2013-09-20  Chung-Lin Tang  <cltang@codesourcery.com>

* Makefile.am (enios2elf.c): Change tdir_nios2 to tdir_nios2elf.
* Makefile.in: Regenerate.

11 years ago * libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
Alan Modra [Fri, 20 Sep 2013 09:51:25 +0000 (09:51 +0000)]
* libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
ppc host match.  Support little-endian powerpc linux hosts.
Regenerate binutils configure files.

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

11 years agoFix regressions caused by thread-specific breakpoint deletion.
Pedro Alves [Thu, 19 Sep 2013 14:45:33 +0000 (14:45 +0000)]
Fix regressions caused by thread-specific breakpoint deletion.

The recent change to make GDB auto-delete thread-specific breakpoints
when the corresponding thread is deleted
(https://sourceware.org/ml/gdb-patches/2013-09/msg00038.html) caused
gdb.base/nextoverexit.exp to regress.

    Breakpoint 1, main () at .../gdb/testsuite/gdb.base/nextoverexit.c:21
    21        exit (0);
    (gdb) next
    [Inferior 1 (process 25208) exited normally]
    Thread-specific breakpoint -5 deleted - thread 1 is gone.
    Thread-specific breakpoint -6 deleted - thread 1 is gone.
    Thread-specific breakpoint -7 deleted - thread 1 is gone.
    Thread-specific breakpoint 0 deleted - thread 1 is gone.
    (gdb) FAIL: gdb.base/nextoverexit.exp: next over exit (the program exited)

We shouldn't be seeing this for internal or momentary breakpoints.  In
fact, we shouldn't even be trying to delete them, as whatever created
them will take care or it, and therefore it's dangerous to delete them
behind the creator's back.

I thought it'd still be good to tag thread-specific internal/momentary
breakpoints such that we'll no longer try to keep them insert in the
target, as they'll cause stops and thread hops in other threads, so I
tried disabling them instead.  That caused a problem when following a
child fork, and detaching from the parent, as we try to reset the
step-resume etc. breakpoints to the new child's thread
(breakpoint_re_set_thread), after the parent thread is already gone
(and the breakpoints are marked disabled).  I fixed that by
re-enabling internal/momentary breakpoints there, but, that didn't
feel super safe either (maybe we'd need a new flag in struct
breakpoint instead, to tag the thread-specific breakpoint as "not to
be inserted").  It felt like I was heading down a design rat hole,
and, other things will usually delete internal/momentary breakpoints
soon enough, so I left that little optimization for some other day.

So, internal/momentary breakpoints are no longer deleted/disabled at
all, and we end up with a one-liner fix.

Tested on x86_64 Fedora 17.

gdb/
2013-09-19  Pedro Alves  <palves@redhat.com>

* breakpoint.c (remove_threaded_breakpoints): Skip non-user
breakpoints.

11 years agognu-nat.c: Don't install a deprecated_xfer_memory method.
Thomas Schwinge [Thu, 19 Sep 2013 13:40:38 +0000 (13:40 +0000)]
gnu-nat.c: Don't install a deprecated_xfer_memory method.

This removes another instance of a deprecated_xfer_memory user.

gdb/
2013-09-19  Pedro Alves  <palves@redhat.com>
    Thomas Schwinge  <thomas@codesourcery.com>
    Yue Lu  <hacklu.newborn@gmail.com>

* gnu-nat.c (gnu_read_inferior, gnu_write_inferior): Make static.
Take a gdb_byte pointer instead of a char pointer.

* gnu-nat.c (gnu_xfer_memory): Adjust interface as
gnu_xfer_partial helper.
(gnu_xfer_partial): New function.
(gnu_target): Don't install a deprecated_xfer_memory hook.
Install a to_xfer_partial hook.

11 years agoMostly code cleanup: Constification.
Jan Kratochvil [Thu, 19 Sep 2013 12:44:46 +0000 (12:44 +0000)]
Mostly code cleanup: Constification.

gdb/
2013-09-19  Jan Kratochvil  <jan.kratochvil@redhat.com>

Constification.
* main.c (captured_main): Replace catch_command_errors by
catch_command_errors_const.  Twice.
* symfile.c (symbol_file_add_main_1): Make args parameter const.
(symbol_file_add): Make name parameter const.
(symbol_file_add_main, symbol_file_add_main_1): Make args parameter const.
(symfile_bfd_open): Make name parameter const, rename it to cname.  Add
variable name.  Change their usage accordingly.
* symfile.h (symbol_file_add, symfile_bfd_open): Make first parameter
const.
(symbol_file_add_main): Make args parameter const.

11 years agodaily update
Alan Modra [Thu, 19 Sep 2013 00:00:03 +0000 (00:00 +0000)]
daily update

11 years ago2013-09-18 Raunaq Bathija <raunaq12@in.ibm.com>
Ulrich Weigand [Wed, 18 Sep 2013 17:47:56 +0000 (17:47 +0000)]
2013-09-18  Raunaq Bathija  <raunaq12@in.ibm.com>
    Ulrich Weigand  <uweigand@de.ibm.com>

* xcoffread.c (struct coff_symbol): Use CORE_ADDR as type
of c_value member.
(read_xcoff_symtab): Use CORE_ADDR as type of fcn_start_addr.

11 years agoAlso mention Yue Lu in previous commit's entry.
Pedro Alves [Wed, 18 Sep 2013 14:49:43 +0000 (14:49 +0000)]
Also mention Yue Lu in previous commit's entry.

2013-09-18  Pedro Alves  <palves@redhat.com>
    Yue Lu  <hacklu.newborn@gmail.com>

* gnu-nat.c (inf_validate_procs, gnu_wait, gnu_resume)
(gnu_create_inferior)
(gnu_attach, gnu_thread_alive, gnu_pid_to_str, cur_thread)
(set_sig_thread_cmd): Use the lwpid field of ptids to
store/extract thread ids instead of the tid field.
* i386gnu-nat.c (gnu_fetch_registers): Adjust.

11 years agoSubject: [PATCH] [Hurd/gnu-nat.c] Use ptid_t.lwpid to store thread ids
Pedro Alves [Wed, 18 Sep 2013 14:47:51 +0000 (14:47 +0000)]
Subject: [PATCH] [Hurd/gnu-nat.c] Use ptid_t.lwpid to store thread ids
 instead of ptid_t.tid.

In preparation for reusing gnu-nat.c in gdbserver, switch to storing
thread ids in the lwpid field of ptid_t rather than in the tid
field.  The Hurd's thread model is 1:1, so it doesn't feel wrong
anyway.

gdb/
2013-09-18  Pedro Alves  <palves@redhat.com>

* gnu-nat.c (inf_validate_procs, gnu_wait, gnu_resume)
(gnu_create_inferior)
(gnu_attach, gnu_thread_alive, gnu_pid_to_str, cur_thread)
(set_sig_thread_cmd): Use the lwpid field of ptids to
store/extract thread ids instead of the tid field.
* i386gnu-nat.c (gnu_fetch_registers): Adjust.

11 years agoConsistent display of "<optimized out>" for register values.
Andrew Burgess [Wed, 18 Sep 2013 14:02:31 +0000 (14:02 +0000)]
Consistent display of "<optimized out>" for register values.

  https://sourceware.org/ml/gdb-patches/2013-08/msg00170.html

gdb/ChangeLog

        * infcmd.c (default_print_one_register_info): Add detection of
        optimized out values.
        (default_print_registers_info): Switch to using
        get_frame_register_value.

gdb/testsuite/ChangeLog

        * gdb.dwarf2/dw2-reg-undefined.exp: Change pattern for info
        register to "<optimized out>", and also print the registers.

11 years ago2013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Kyrylo Tkachov [Wed, 18 Sep 2013 13:59:12 +0000 (13:59 +0000)]
2013-09-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* ld-aarch64/eh-frame.d: Update expected output to allow for
64-bit addresses.

11 years agogdbserver --wrapper also doesn't work on Cygwin.
Pedro Alves [Wed, 18 Sep 2013 13:21:41 +0000 (13:21 +0000)]
gdbserver --wrapper also doesn't work on Cygwin.

Skip the test on Cygwin too.

2013-09-18  Pedro Alves  <palves@redhat.com>

PR server/15967
* gdb.server/wrapper.exp: Also return unsupported for Cygwin, and
change text.

11 years agoWhen reverse-stepping, only insert a resume breakpoint at ecs->stop_func_start
Markus Metzger [Wed, 18 Sep 2013 13:02:42 +0000 (13:02 +0000)]
When reverse-stepping, only insert a resume breakpoint at ecs->stop_func_start
if the function start is known.  Otherwise, keep single-stepping.

11 years ago[Hurd/gnu-nat] Fix old "signal-thread" command regression.
Pedro Alves [Wed, 18 Sep 2013 12:00:06 +0000 (12:00 +0000)]
[Hurd/gnu-nat] Fix old "signal-thread" command regression.

By inspection, I noticed that when I made the gnu-nat use
ptid(pid,0,tid) to represent a thread, instead of using ptid(tid,0,0),
in <https://sourceware.org/ml/gdb-patches/2008-08/msg00175.html>, I
introduced a bug.

The change was:

   else
     {
-      int tid = PIDGET (thread_id_to_pid (atoi (args)));
+      int tid = ptid_get_tid (thread_id_to_pid (atoi (args)));
       if (tid < 0)
  error (_("Thread ID %s not known.  Use the \"info threads\" command to\n"
         "see the IDs of currently known threads."), args);

and thread_id_to_pid does:

 ptid_t
 thread_id_to_pid (int num)
 {
   struct thread_info *thread = find_thread_id (num);

   if (thread)
     return thread->ptid;
   else
     return pid_to_ptid (-1);
 }

(pid_to_ptid (-1) is the same as minus_one_ptid.)

So before, we were really looking at the pid, where thread_id_to_pid
stores the -1.

The right fix is to compare the whole ptid to minus_one_ptid, of
course.

Completely untested, but I think it's obvious enough, so I went ahead
and put it in.

gdb/
2013-09-18  Pedro Alves  <palves@redhat.com>

* gnu-nat.c (set_sig_thread_cmd): Compare the thread's ptid to
minus_one_ptid instead of looking at the ptid's tid field and
comparing that to -1.

11 years agoFix whitespace error in previous commit.
Andrew Burgess [Wed, 18 Sep 2013 11:45:20 +0000 (11:45 +0000)]
Fix whitespace error in previous commit.

  https://sourceware.org/ml/gdb-cvs/2013-09/msg00108.html
  https://sourceware.org/ml/gdb-patches/2013-09/msg00225.html

gdb/ChangeLog

        * main.h (get_gdb_program_name): Remove extra whitespace.

11 years agoAdd new function to access gdb_program_name.
Andrew Burgess [Wed, 18 Sep 2013 11:41:38 +0000 (11:41 +0000)]
Add new function to access gdb_program_name.

  https://sourceware.org/ml/gdb-patches/2013-09/msg00225.html

gdb/ChangeLog

        * main.h (get_gdb_program_name): Add declaration.
        * main.c (get_gdb_program_name): Add definition.

11 years agobfd/
Tristan Gingold [Wed, 18 Sep 2013 11:02:05 +0000 (11:02 +0000)]
bfd/
2013-09-18  Tristan Gingold  <gingold@adacore.com>

* configure.in: Bump version to 2.24.51
* configure: Regenerate.

11 years agobinutils/
Tristan Gingold [Wed, 18 Sep 2013 10:39:38 +0000 (10:39 +0000)]
binutils/
2013-09-18  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.24.

gas/
2013-09-18  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.24.

ld/
2013-09-18  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.24.

11 years ago2013-09-18 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Wed, 18 Sep 2013 10:33:02 +0000 (10:33 +0000)]
2013-09-18  Tristan Gingold  <gingold@adacore.com>

* Makefile.am (LEXLIB): Define.  Replase references to @LEXLIB@
by $(LEXLIB).
* Makefile.in: Regenerate.

11 years ago * config/tc-msp430.c (OPTION_MOVE_DATA): Define.
Nick Clifton [Wed, 18 Sep 2013 07:50:34 +0000 (07:50 +0000)]
* config/tc-msp430.c (OPTION_MOVE_DATA): Define.
(move_data): New variable.
(md_parse_option): Parse -md.
(msp430_section): New function.  Catch references to the .bss or
.data sections and generate a special symbol for use by the libcrt
library.
(md_pseudo_table): Intercept .section directives.
(md_longopt): Add -md
(md_show_usage): Likewise.
(msp430_operands): Generate a warning message if a NOP is inserted
into the instruction stream.
* doc/c-msp430.texi (node MSP430 Options): Document -md option.

11 years agogdb/gdbserver/
Yao Qi [Wed, 18 Sep 2013 01:59:59 +0000 (01:59 +0000)]
gdb/gdbserver/

2013-09-18  Yao Qi  <yao@codesourcery.com>

PR server/15959
* server.c (start_inferior): Clear 'resume_info'.

gdb/testsuite/

2013-09-18  Yao Qi  <yao@codesourcery.com>

* gdb.server/wrapper.c: New.
* gdb.server/wrapper.exp: New.

11 years agogdb/gdbserver/
Yao Qi [Wed, 18 Sep 2013 01:55:53 +0000 (01:55 +0000)]
gdb/gdbserver/

Fix ChangeLog format issue.

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

11 years ago * dwarf2read.c: Move definitions of complaint functions to after
Doug Evans [Tue, 17 Sep 2013 22:12:55 +0000 (22:12 +0000)]
* dwarf2read.c: Move definitions of complaint functions to after
forward declarations of local functions.

11 years ago2013-09-17 Doug Gilmore <Doug.Gilmore@imgtec.com>
Steve Ellcey [Tue, 17 Sep 2013 21:09:27 +0000 (21:09 +0000)]
2013-09-17  Doug Gilmore  <Doug.Gilmore@imgtec.com>

* readelf.c (get_machine_flags): Handle EF_MIPS_FP64.

11 years ago2013-09-17 Doug Gilmore <Doug.Gilmore@imgtec.com>
Steve Ellcey [Tue, 17 Sep 2013 21:08:30 +0000 (21:08 +0000)]
2013-09-17  Doug Gilmore  <Doug.Gilmore@imgtec.com>

* config/tc-mips.c (mips_elf_final_processing): Set
EF_MIPS_FP64 for -mgp32 -mfp64, removing old FIXME.

11 years ago2013-09-17 Doug Gilmore <Doug.Gilmore@imgtec.com>
Steve Ellcey [Tue, 17 Sep 2013 21:07:13 +0000 (21:07 +0000)]
2013-09-17  Doug Gilmore  <Doug.Gilmore@imgtec.com>

* elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Handle
EF_MIPS_FP64.

11 years ago2013-09-17 Doug Gilmore <Doug.Gilmore@imgtec.com>
Steve Ellcey [Tue, 17 Sep 2013 21:05:49 +0000 (21:05 +0000)]
2013-09-17  Doug Gilmore  <Doug.Gilmore@imgtec.com>

* mips.h (EF_MIPS_FP64): New e_flags bit.

11 years agoPR gdb/11568 - delete thread-specific breakpoints on thread exit
Pedro Alves [Tue, 17 Sep 2013 19:32:47 +0000 (19:32 +0000)]
PR gdb/11568 - delete thread-specific breakpoints on thread exit

PR gdb/11568 is about thread-specific breakpoints being left behind
when the corresponding thread exits.

Currently:

 (gdb) b start thread 2
 Breakpoint 3 at 0x400614: file thread-specific-bp.c, line 23.
 (gdb) b end
 Breakpoint 4 at 0x40061f: file thread-specific-bp.c, line 29.
 (gdb) c
 Continuing.
 [Thread 0x7ffff7fcb700 (LWP 14925) exited]
 [Switching to Thread 0x7ffff7fcc740 (LWP 14921)]

 Breakpoint 4, end () at thread-specific-bp.c:29
 29      }
 (gdb) info threads
   Id   Target Id         Frame
 * 1    Thread 0x7ffff7fcc740 (LWP 14921) "thread-specific" end () at thread-specific-bp.c:29
 (gdb) info breakpoints
 Num     Type           Disp Enb Address            What
 2       breakpoint     keep y   0x0000000000400614 in start at thread-specific-bp.c:23
         breakpoint already hit 1 time
 3       breakpoint     keep y   0x0000000000400614 in start at thread-specific-bp.c:23 thread 2
         stop only in thread 2
 4       breakpoint     keep y   0x000000000040061f in end at thread-specific-bp.c:29
         breakpoint already hit 1 time

Note that the thread-specific breakpoint 3 stayed around, even though
thread 2 is gone.

There's no way that breakpoint can trigger again (*), so the PR argues
that the breakpoint should just be removed, like local watchpoints.
I'm ambivalent on this -- it could be reasonable to disable the
breakpoint (kind of like breakpoint in shared library code when the
DSO is unloaded), so the user could still use it as visual template
for creating other breakpoints (copy/paste command lists, etc.), or we
could have a way to change to which thread a breakpoint applies.  But,
several people pushed this direction, and I don't plan on arguing...

(*) - actually, there is ...  thread numbers are reset on "run", so
the user could do "break foo thread 2", "run", and expect the
breakpoint to hit again on the second thread.  But given gdb's thread
numbering can't really be stable, that'd only work sufficiently well
for thread 1, so we'd better call it unsupported.

So with the patch, whenever a thread is deleted from GDB's list, GDB
goes through the thread-specific breakpoints and deletes corresponding
breakpoints.  Since this is user-visible, GDB prints out:

  Thread-specific breakpoint 3 deleted - thread 2 is gone.

And of course, we end up with:

 (gdb) info breakpoints
 Num     Type           Disp Enb Address            What
 2       breakpoint     keep y   0x0000000000400614 in start at thread-specific-bp.c:23
         breakpoint already hit 1 time
 4       breakpoint     keep y   0x000000000040061f in end at thread-specific-bp.c:29
         breakpoint already hit 1 time

2013-09-17  Muhammad Waqas <mwaqas@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

PR gdb/11568
* breakpoint.c (remove_threaded_breakpoints): New function.
(_initialize_breakpoint): Attach remove_threaded_breakpoints
as thread_exit observer.

2013-09-17  Muhammad Waqas  <mwaqas@codesourccery.com>
    Jan Kratochvil  <jan.kartochvil@redhat.com>
    Pedro Alves  <palves@redhat.com>

PR gdb/11568
* gdb.thread/thread-specific-bp.c: New file.
* gdb.thread/thread-specific-bp.exp: New file.

11 years agoThis commit fixes a regression introduced by the new $_isvoid convenience
Sergio Durigan Junior [Tue, 17 Sep 2013 19:24:51 +0000 (19:24 +0000)]
This commit fixes a regression introduced by the new $_isvoid convenience
function.  It adds a check for $_isvoid during the test of "show convenience"
output.

gdb/testsuite/
2013-09-17  Sergio Durigan Junior  <sergiodj@redhat.com>

* gdb.base/defaults.exp (<show_conv_list>): Add check for $_isvoid
convenience function.

11 years agoPR gdb/15911: "info threads" changes the default source and line (for "break", "list")
Pedro Alves [Tue, 17 Sep 2013 18:26:41 +0000 (18:26 +0000)]
PR gdb/15911: "info threads" changes the default source and line (for "break", "list")

"info threads" changes the default source for "break" and "list", to
whatever the location of the first/bottom thread in the thread list
is...

 (gdb) b start
 (gdb) c
 ...
 (gdb) list
 *lists "start"*
 (gdb) b 23
 Breakpoint 3 at 0x400614: file test.c, line 23.
 (gdb) info threads
   Id   Target Id         Frame
 * 2    Thread 0x7ffff7fcb700 (LWP 1760) "test" start (arg=0x0) at test.c:23
   1    Thread 0x7ffff7fcc740 (LWP 1748) "test" 0x000000323dc08e60 in pthread_join (threadid=140737353922304, thread_return=0x0) at pthread_join.c:93
 (gdb) b 23
 Breakpoint 4 at 0x323dc08d90: file pthread_join.c, line 23.
                                    ^^^^^^^^^^^^^^^
 (gdb) list
 93          lll_wait_tid (pd->tid);
 94
 95
 96        /* Restore cancellation mode.  */
 97        CANCEL_RESET (oldtype);
 98
 99        /* Remove the handler.  */
 100       pthread_cleanup_pop (0);
 101
 102

The issue is that print_stack_frame always sets the current sal to the
frame's sal.  print_frame_info (which print_stack_frame calls to do
most of the work) also sets the last displayed sal, but only if
print_what isn't LOCATION.  Now the call in question, from within
thread.c:print_thread_info, does pass in LOCATION as print_what, but
print_stack_frame doesn't have the same check print_frame_info has.
We could consider adding it, but setting these globals depending on
print_what isn't very clean, IMO.  What we have is two logically
distinct operations mixed in the same function(s):

  #1 - print frame, in the format specified by {print_what,
    print_level and print_args}.

  #2 - We're displaying a frame to the user, and I want the default
    sal to point here, because the program stopped here, or the user
    did some context-changing command (up, down, etc.).

So I added a new parameter to print_stack_frame & friends for point
#2, and went through all calls in the tree adjusting as necessary.

Tested on x86_64 Fedora 17.

gdb/
2013-09-17  Pedro Alves  <palves@redhat.com>

PR gdb/15911
* ada-tasks.c (task_command_1): Adjust call to print_stack_frame.
* bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd):
* corelow.c (core_open):
* frame.h (print_stack_frame, print_frame_info): New
'set_current_sal' parameter.
* infcmd.c (finish_command, kill_command): Adjust call to
print_stack_frame.
* inferior.c (inferior_command): Likewise.
* infrun.c (normal_stop): Likewise.
* linux-fork.c (linux_fork_context): Likewise.
* record-full.c (record_full_goto_entry, record_full_restore):
Likewise.
* remote-mips.c (common_open): Likewise.
* stack.c (print_stack_frame): New 'set_current_sal' parameter.
Use it.
(print_frame_info): New 'set_current_sal' parameter.  Set the last
displayed sal depending on the new paremeter instead of looking at
print_what.
(backtrace_command_1, select_and_print_frame, frame_command)
(current_frame_command, up_command, down_command): Adjust call to
print_stack_frame.
* thread.c (print_thread_info, restore_selected_frame)
(do_captured_thread_select): Adjust call to print_stack_frame.
* tracepoint.c (tfind_1): Likewise.
* mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
(mi_cmd_stack_info_frame): Likewise.
* mi/mi-interp.c (mi_on_normal_stop): Likewise.
* mi/mi-main.c (mi_cmd_exec_return, mi_cmd_trace_find): Likewise.

gdb/testsuite/
* gdb.threads/info-threads-cur-sal-2.c: New file.
* gdb.threads/info-threads-cur-sal.c: New file.
* gdb.threads/info-threads-cur-sal.exp: New file.

11 years ago Fix ChangeLog entry missing a ':' char.
Luis Machado [Tue, 17 Sep 2013 15:06:01 +0000 (15:06 +0000)]
Fix ChangeLog entry missing a ':' char.

11 years ago gdbserver/ChangeLog
Jiong Wang [Tue, 17 Sep 2013 14:00:30 +0000 (14:00 +0000)]
  gdbserver/ChangeLog

* linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
for each register.

11 years ago PR ld/15957
Nick Clifton [Tue, 17 Sep 2013 13:57:21 +0000 (13:57 +0000)]
PR ld/15957
* deffilep.y (def_file_add_directive): Avoid readin past end of
buffer.

11 years ago2013-09-16 Jiong Wang <jiwang@tilera.com>
Jiong Wang [Tue, 17 Sep 2013 13:56:54 +0000 (13:56 +0000)]
2013-09-16  Jiong Wang  <jiwang@tilera.com>

  gdbserver/ChangeLog

        * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
linux-tile-low.o to srv_tgtobj.

11 years agoopcodes/
Richard Sandiford [Tue, 17 Sep 2013 09:02:37 +0000 (09:02 +0000)]
opcodes/
* s390-opc.txt (clih): Make the immediate unsigned.

gas/testsuite/
* gas/s390/zarch-z196.s, gas/s390/zarch-z196.d: Test CLIH with
4000000000.

11 years agogdb/testsuite/
Yao Qi [Tue, 17 Sep 2013 07:00:50 +0000 (07:00 +0000)]
gdb/testsuite/

* gdb.base/catch-load.c: Remove the include of "dlfcn.h".
 [__WIN32__]: Include "windows.h" and define macro dlopen
 and dlclose.
[!__WIN32__]: Include "dlfcn.h".
* gdb.base/catch-load.exp (one_catch_load_test): Match
directory separator.

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

11 years ago * lib/gdb.exp (using_fission): New proc.
Doug Evans [Mon, 16 Sep 2013 23:59:02 +0000 (23:59 +0000)]
* lib/gdb.exp (using_fission): New proc.
* gdb.base/info-macros.exp: Skip test if using Fission.