binutils-gdb.git
12 years ago * mips-tdep.c (mips_about_to_return): Remove dead MIPS16 support
Maciej W. Rozycki [Tue, 24 Apr 2012 19:56:02 +0000 (19:56 +0000)]
* mips-tdep.c (mips_about_to_return): Remove dead MIPS16 support
code.  Handle JR.HB correctly.

12 years ago * mips-tdep.c
Maciej W. Rozycki [Tue, 24 Apr 2012 19:44:16 +0000 (19:44 +0000)]
* mips-tdep.c
(is_mips16_addr, unmake_mips16_addr, make_mips16_addr): Group
with the other MIPS16 helpers.

12 years ago2012-04-24 Sergio Durigan Junior <sergiodj@redhat.com>
Sergio Durigan Junior [Tue, 24 Apr 2012 18:10:31 +0000 (18:10 +0000)]
2012-04-24  Sergio Durigan Junior  <sergiodj@redhat.com>

* observer.sh: Conditionally declare `args', thus cleaning up
unused instances of this variable.

12 years ago* ld-x86-64/plt-nacl.pd: Fix expected nop padding.
Roland McGrath [Tue, 24 Apr 2012 17:24:20 +0000 (17:24 +0000)]
* ld-x86-64/plt-nacl.pd: Fix expected nop padding.
* ld-x86-64/tlsdesc-nacl.pd: Likewise.

12 years ago PR ld/13990
Hans-Peter Nilsson [Tue, 24 Apr 2012 16:14:31 +0000 (16:14 +0000)]
PR ld/13990
* ld-arm/arm-elf.exp: Run gc-hidden-1.
* ld-arm/gc-hidden-1.d: New test-file.
* ld-arm/gcdfn.s, ld-arm/hideall.ld, ld-arm/hidfn.s,
ld-arm/main.s: New files.

12 years ago PR ld/13990
Hans-Peter Nilsson [Tue, 24 Apr 2012 16:09:12 +0000 (16:09 +0000)]
PR ld/13990
* elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
symbol, where PLT refcount is set to -1.

12 years ago * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
Thiago Jung Bauermann [Tue, 24 Apr 2012 15:03:43 +0000 (15:03 +0000)]
* linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
(PTRACE_ARG4_TYPE): Likewise.
(PTRACE_XFER_TYPE): Likewise.
* linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
ptrace to PTRACE_ARG3_TYPE.
* linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
(PTRACE_ARG4_TYPE): Likewise.
(PTRACE_XFER_TYPE): Likewise.
(linux_detach_one_lwp): Cast fourth argument of
ptrace to long then PTRACE_ARG4_TYPE.
(regsets_fetch_inferior_registers): Cast third argument of
ptrace to long then PTRACE_ARG3_TYPE.
(regsets_store_inferior_registers): Likewise.

12 years agogdb:
Yao Qi [Tue, 24 Apr 2012 14:33:12 +0000 (14:33 +0000)]
gdb:
Revert this patch to allow breakpoint always-inserted
in record target.
2011-12-05  Pedro Alves  <pedro@codesourcery.com>
        * breakpoint.c: Include record.h.
        (breakpoints_always_inserted_mode): Return false when the record
        target is in use.

* breakpoint.c (iterate_over_bp_locations): New.
* breakpoint.h: Declare.
New typedef walk_bp_location_callback.
* record.c (record_open): Call record_init_record_breakpoints.
(record_sync_record_breakpoints): New.
(record_init_record_breakpoints): New.
* NEWS: Mention supporting breakpoint always-inserted mode in
record target.

12 years ago2012-04-24 Marc Khouzam <marc.khouzam@ericsson.com>
Marc Khouzam [Tue, 24 Apr 2012 14:26:22 +0000 (14:26 +0000)]
2012-04-24  Marc Khouzam  <marc.khouzam@ericsson.com>

  * mi/mi-main.c (mi_cmd_execute): Choose a live thread not just
any thread.

12 years agogdb/
Yao Qi [Tue, 24 Apr 2012 13:20:16 +0000 (13:20 +0000)]
gdb/
* breakpoint.c (ep_is_catchpoint): Renamed to ...
(is_catchpoint): ... it.
(print_one_breakpoint_location): Caller update.
* breakpoint.h: Update declaration.

12 years ago PR ld/13991
Alan Modra [Tue, 24 Apr 2012 05:12:40 +0000 (05:12 +0000)]
PR ld/13991
bfd/
* bfd/elf-bfd.h (_bfd_elf_link_just_syms): Define as
_bfd_generic_link_just_syms.
* bfd/elflink.c (_bfd_elf_link_just_syms): Delete.
* bfd/linker.c (_bfd_generic_link_just_syms): Set sec_info_type.

* bfd/bfd-in.h (discarded_section): Renamed from elf_discarded_section.
* bfd/section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
* bfd/elf-eh-frame.c, * bfd/elf-m10200.c, * bfd/elf-m10300.c,
* bfd/elf.c, * bfd/elf32-arm.c, * bfd/elf32-avr.c, * bfd/elf32-bfin.c,
* bfd/elf32-cr16.c, * bfd/elf32-cr16c.c, * bfd/elf32-cris.c,
* bfd/elf32-crx.c, * bfd/elf32-d10v.c, * bfd/elf32-epiphany.c,
* bfd/elf32-fr30.c, * bfd/elf32-frv.c, * bfd/elf32-h8300.c,
* bfd/elf32-hppa.c, * bfd/elf32-i370.c, * bfd/elf32-i386.c,
* bfd/elf32-i860.c, * bfd/elf32-ip2k.c, * bfd/elf32-iq2000.c,
* bfd/elf32-lm32.c, * bfd/elf32-m32c.c, * bfd/elf32-m32r.c,
* bfd/elf32-m68hc1x.c, * bfd/elf32-m68k.c, * bfd/elf32-mcore.c,
* bfd/elf32-mep.c, * bfd/elf32-moxie.c, * bfd/elf32-msp430.c,
* bfd/elf32-mt.c, * bfd/elf32-openrisc.c, * bfd/elf32-ppc.c,
* bfd/elf32-rl78.c, * bfd/elf32-rx.c, * bfd/elf32-s390.c,
* bfd/elf32-score.c, * bfd/elf32-score7.c, * bfd/elf32-sh.c,
* bfd/elf32-spu.c, * bfd/elf32-tic6x.c, * bfd/elf32-tilepro.c,
* bfd/elf32-v850.c, * bfd/elf32-vax.c, * bfd/elf32-xc16x.c,
* bfd/elf32-xstormy16.c, * bfd/elf32-xtensa.c, * bfd/elf64-alpha.c,
* bfd/elf64-hppa.c, * bfd/elf64-ia64-vms.c, * bfd/elf64-mmix.c,
* bfd/elf64-ppc.c, * bfd/elf64-s390.c, * bfd/elf64-sh64.c,
* bfd/elf64-x86-64.c, * bfd/elflink.c, * bfd/elfnn-ia64.c,
* bfd/elfxx-mips.c, * bfd/elfxx-sparc.c, * bfd/elfxx-tilegx.c,
* bfd/reloc.c: Update all references.
* bfd/bfd-in2.h: Regenerate.
ld/
* ld/ldlang.c (size_input_section): Use sec_info_type rather than
usrdata->flags.just_syms.
* ld/ldwrite.c (build_link_order): Likewise.
* ld/emultempl/hppaelf.em (build_section_lists): Likewise.
* ld/emultempl/ppc64elf.em (build_toc_list): Likewise.
* ld/emultempl/armelf.em (build_section_lists): Likewise.
(after_allocation): Update for renamed sec_info_type value.
* ld/emultempl/tic6xdsbt.em: Likewise.

12 years agogdb: Enable gdbserver by default on sparc-*-linux*
David S. Miller [Tue, 24 Apr 2012 03:33:16 +0000 (03:33 +0000)]
gdb: Enable gdbserver by default on sparc-*-linux*

This appears to be an oversight, since this is done already for
sparc64-*-linux*, and essentially every other linux target.

gdb/

* configure.tgt (sparc-*-linux*): Set build_gdbserver to yes.

12 years ago*** empty log message ***
gdbadmin [Tue, 24 Apr 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Tue, 24 Apr 2012 00:00:05 +0000 (00:00 +0000)]
daily update

12 years agogold: Maintain sparc ELF header bits properly
David S. Miller [Mon, 23 Apr 2012 23:42:03 +0000 (23:42 +0000)]
gold: Maintain sparc ELF header bits properly

gold/

* sparc.cc (class Target_sparc): Add elf_machine_, elf_flags_,
and elf_flags_set_.
(Target_sparc::Target_sparc): Initialize new fields.
(Target_sparc::do_make_elf_object): New function.
(Target_sparc::do_adjust_elf_header): New function.

12 years agoelfcpp/
Cary Coutant [Mon, 23 Apr 2012 23:31:15 +0000 (23:31 +0000)]
elfcpp/

* elfcpp_swap.h (struct Swap_aligned32): New template.

gold/

* gdb-index.cc (Gdb_index::do_write): Use Swap_aligned32 for writing
CU range table of gdb index.

12 years ago * buildsym.c (add_free_pendings): Remove.
Tom Tromey [Mon, 23 Apr 2012 18:53:16 +0000 (18:53 +0000)]
* buildsym.c (add_free_pendings): Remove.
* buildsym.h (add_free_pendings): Remove.

12 years ago* ld-pie/pie.exp: Remove extra braces.
Andreas Schwab [Mon, 23 Apr 2012 18:03:28 +0000 (18:03 +0000)]
* ld-pie/pie.exp: Remove extra braces.

12 years agogdb/doc/
Jan Kratochvil [Mon, 23 Apr 2012 17:26:01 +0000 (17:26 +0000)]
gdb/doc/
* gdb.texinfo (Auto-loading safe path): Add trailing @dots{}.
Three times.

12 years agogdb/doc/
Jan Kratochvil [Mon, 23 Apr 2012 17:20:56 +0000 (17:20 +0000)]
gdb/doc/
* gdb.texinfo (Auto-loading safe path): Remove trailing [@dots{}].
Three times.

12 years ago * dwarf2read.c (partial_die_full_name): Record DW_FORM_ref_addr in
Doug Evans [Mon, 23 Apr 2012 16:46:02 +0000 (16:46 +0000)]
* dwarf2read.c (partial_die_full_name): Record DW_FORM_ref_addr in
attr.u.unsnd instead of attr.u.addr.
(read_attribute_value) Ditto for cases DW_FORM_ref_addr,
DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, DW_FORM_reg8,
DW_FORM_ref_udata.
(dump_die_shallow): Update cases DW_FORM_ref_addr,
DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4.  Add cases DW_FORM_ref8,
DW_FORM_ref_udata.
(dwarf2_get_ref_die_offset): Use DW_UNSND for reference attributes.

12 years ago * mips-tdep.c (mips_n32n64_return_value): Fix coding style.
Maciej W. Rozycki [Mon, 23 Apr 2012 16:00:19 +0000 (16:00 +0000)]
* mips-tdep.c (mips_n32n64_return_value): Fix coding style.
(mips_o32_return_value): Likewise.
(mips_o64_return_value): Likewise.

12 years ago*** empty log message ***
gdbadmin [Mon, 23 Apr 2012 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Mon, 23 Apr 2012 00:00:06 +0000 (00:00 +0000)]
daily update

12 years agogdb/doc/
Jan Kratochvil [Sun, 22 Apr 2012 15:49:21 +0000 (15:49 +0000)]
gdb/doc/
* gdb.texinfo (Auto-loading safe path): Replace @itemize @bullet
by @table @asis.  Fix formatting of one item.

12 years ago*** empty log message ***
gdbadmin [Sun, 22 Apr 2012 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Sun, 22 Apr 2012 00:00:05 +0000 (00:00 +0000)]
daily update

12 years agoAdd proper handling for internal functions and STT_GNU_IFUNC symbols in Ada mode.
Paul N. Hilfinger [Sat, 21 Apr 2012 22:12:59 +0000 (22:12 +0000)]
Add proper handling for internal functions and STT_GNU_IFUNC symbols in Ada mode.

The code for handling calls to internal functions (esp., Python
functions) and for handling STT_GNU_IFUNC had not been added to the Ada
expression evaluator.  This change adapts them from eval.c.

gdb/Changelog:

        * ada-lang.c (ada_evaluate_subexp): Add cases for
          TYPE_CODE_INTERNAL_FUNCTION and for TYPE_GNU_IFUNC, following
          their treatment in eval.c.

12 years agoHandle sparc compare-and-branch
David S. Miller [Sat, 21 Apr 2012 19:03:52 +0000 (19:03 +0000)]
Handle sparc compare-and-branch

SPARC-T4 adds a "compare and branch" instruction which fuses
a compare and a branch instruction into one.  The branch
is non-delayed, there are no anulling facilities, and the
displacement is 10-bits.

This also corrects the existing bit test for Branch on
Integer Register.  The distinguising characteristic between
Branch on Integer Register and Compare-and-Branch is bit
28.  The existing code was checking bit 24 for zero, but
that's pointless because bit 24 is already covered by
the "X_OP2 (insn) == 3" test.

gdb/

* sparc-tdep.c (X_DISP10): Define.
(sparc_analyze_control_transfer): Handle compare-and-branch.

12 years ago*** empty log message ***
gdbadmin [Sat, 21 Apr 2012 00:00:34 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Sat, 21 Apr 2012 00:00:05 +0000 (00:00 +0000)]
daily update

12 years ago * features/Makefile (WHICH): Add arm-with-m and arm-with-m-fpa-layout.
Jonathan Larmour [Fri, 20 Apr 2012 23:39:58 +0000 (23:39 +0000)]
    * features/Makefile (WHICH): Add arm-with-m and arm-with-m-fpa-layout.
        * arm-tdep.c (arm_register_g_packet_guesses): Fix comment.

12 years ago * mips-tdep.c (mips_float_register_p): New function.
Maciej W. Rozycki [Fri, 20 Apr 2012 23:31:39 +0000 (23:31 +0000)]
* mips-tdep.c (mips_float_register_p): New function.
(mips_convert_register_float_case_p): Use mips_float_register_p.
(mips_register_type): Likewise.
(mips_print_register): Likewise.
(print_gp_register_row): Likewise.
(mips_print_registers_info): Likewise.

12 years ago * mips-tdep.c (mips_elf_make_msymbol_special): Fix identification
Maciej W. Rozycki [Fri, 20 Apr 2012 23:01:51 +0000 (23:01 +0000)]
* mips-tdep.c (mips_elf_make_msymbol_special): Fix identification
of mips16 symbols.

12 years ago2012-04-20 Andrew Pinski <apinski@cavium.com>
Andrew Pinski [Fri, 20 Apr 2012 22:59:48 +0000 (22:59 +0000)]
2012-04-20  Andrew Pinski  <apinski@cavium.com>

        * MAINTAINERS (Write After Approval): Add myself to the list.

12 years ago2012-04-20 Sergio Durigan Junior <sergiodj@redhat.com>
Sergio Durigan Junior [Fri, 20 Apr 2012 22:56:45 +0000 (22:56 +0000)]
2012-04-20  Sergio Durigan Junior  <sergiodj@redhat.com>

* MAINTAINERS: Update my e-mail address.

12 years agogold: Fix parameterization of do_adjust_elf_header
David S. Miller [Fri, 20 Apr 2012 22:23:47 +0000 (22:23 +0000)]
gold: Fix parameterization of do_adjust_elf_header

gold/

* target.cc (Sized_target::do_adjust_elf_header): Use big_endian
instead of false.

12 years ago2012-04-20 Pedro Alves <palves@redhat.com>
Pedro Alves [Fri, 20 Apr 2012 17:58:49 +0000 (17:58 +0000)]
2012-04-20  Pedro Alves  <palves@redhat.com>

gdb/
* acx_configure_dir.m4 (ACX_CONFIGURE_DIR): Handle absolute
$srcdir.
* configure: Regenerate.

gdb/gdbserver/
* configure: Regenerate.

12 years ago2012-04-20 Sergio Durigan Junior <sergiodj@redhat.com>
Sergio Durigan Junior [Fri, 20 Apr 2012 16:57:17 +0000 (16:57 +0000)]
2012-04-20  Sergio Durigan Junior  <sergiodj@redhat.com>

* cp-support.h: Include `gdb_vecs.h'.  Delete `const_char_ptr' VEC
declaration.
* gdb_vecs.h: Declare `const_char_ptr' VEC.

12 years agowhitespace/tabify
Pedro Alves [Fri, 20 Apr 2012 16:36:24 +0000 (16:36 +0000)]
whitespace/tabify

12 years ago2012-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Andreas Krebbel [Fri, 20 Apr 2012 11:45:54 +0000 (11:45 +0000)]
2012-04-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
* elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.

12 years ago2012-04-20 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 20 Apr 2012 10:21:33 +0000 (10:21 +0000)]
2012-04-20  Tristan Gingold  <gingold@adacore.com>

* config/tc-ia64.c (obj_elf_vms_common): New function.
(md_pseudo_table): Add .vms_common pseudo.
* config/obj-elf.h (obj_elf_section_name): Add a prototype.
* config/obj-elf.c (obj_elf_section_name): Make it public.

12 years agogdb/
Jan Kratochvil [Fri, 20 Apr 2012 07:17:58 +0000 (07:17 +0000)]
gdb/
Fix compilation compatibility with python-2.4
* python/py-type.c (convert_field): Cast ADDRSTRING for
PyObject_SetAttrString as non-const.  New comment.

12 years ago*** empty log message ***
gdbadmin [Fri, 20 Apr 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Fri, 20 Apr 2012 00:00:05 +0000 (00:00 +0000)]
daily update

12 years ago * top.c (quit_target): Use all_cleanups.
Tom Tromey [Thu, 19 Apr 2012 20:18:26 +0000 (20:18 +0000)]
* top.c (quit_target): Use all_cleanups.
* main.c (captured_command_loop): Use all_cleanups.
* exceptions.c (throw_exception): Use all_cleanups.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 19:34:52 +0000 (19:34 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

gdb/
* Makefile.in (GNULIB_BUILDDIR): New.
(LIBGNU, INCGNU, GNULIB_H): Adjust.
(SUBDIRS): Add $(GNULIB_BUILDDIR).
(CLEANDIRS). Remove gnulib/import.
(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
(all-lib): Ditto.
(distclean): Remove the $(GNULIB_BUILDDIR) directory.
(gnulib/import/Makefile): Replace gnulib/import with
$(GNULIB_BUILDDIR).  Set CONFIG_FILES to just Makefile.
(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
(aclocal_m4_deps): Remove the gnulib dependencies.  Add
acx_configure_dir.m4.
* acinclude.m4: Include acx_configure_dir.m4.
* acx_configure_dir.m4: New file.
* aclocal.m4: Regenerate.
        * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
        calls.  Configure gnulib using ACX_CONFIGURE_DIR.
        (GNULIB): New variable.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile.
        * gdb/defs.h: Include build-gnulib/config.h.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

        * gnulib/Makefile.in: New file.
        * gnulib/configure.ac: New file.
        * gnulib/aclocal.m4: New file.
        * gnulib/config.in: New file.
        * gnulib/configure: New file.
* gnulib/: Re-run gnulib-tool to adjust.

        gdb/gdbserver/
        * Makefile.in (GNULIB_BUILDDIR): New.
(LIBGNU, INCGNU, GNULIB_H): Adjust.
        (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
        (all, install-only, uninstall, clean-info, all-lib, clean): No
        longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
        (maintainer-clean realclean distclean): Use subdir_do.
        (subdir_do): New.
        (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
$(GNULIB_BUILDDIR).  Don't pass argument to config.status.
        * acinclude.m4: Include acx_configure_dir.m4.
        * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
        calls.  Call AC_PROG_RANLIB.  Configure gnulib using
        ACX_CONFIGURE_DIR.
        (GNULIB): New.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile anymore.
        * gdbreplay.c: Include build-gnulib/config.h.
        * server.h: Likewise.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

12 years agoRevert commit that should not have gone in.
Pedro Alves [Thu, 19 Apr 2012 19:32:15 +0000 (19:32 +0000)]
Revert commit that should not have gone in.

12 years ago * cleanups.h (struct cleanup): Move to cleanups.c.
Doug Evans [Thu, 19 Apr 2012 19:11:02 +0000 (19:11 +0000)]
* cleanups.h (struct cleanup): Move to cleanups.c.
(make_cleanup_dtor_ftype): New typedef.
(make_cleanup_dtor): Use it.
(ALL_CLEANUPS): Replace with ...
(all_cleanups): ... this.  Declare.  All uses updated.
* cleanups.c: #include "gdb_assert.h".
(sentinel_cleanup): New static global.
(SENTINEL_CLEANUP): Define.
(cleanup_chain, final_cleanup_chain): Initialize to SENTINEL_CLEANUP.
(make_my_cleanup2): Assert result is non-NULL.
(all_cleanups): New function.
(save_my_cleanups): Initialize new chain to SENTINEL_CLEANUP instead
of NULL.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 17:18:18 +0000 (17:18 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

* Makefile.in (GNULIB_BUILDDIR): New.
(LIBGNU, INCGNU, GNULIB_H): Adjust.
(SUBDIRS): Add $(GNULIB_BUILDDIR).
(CLEANDIRS). Remove gnulib/import.
(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
(all-lib): Ditto.
(distclean): Remove the $(GNULIB_BUILDDIR) directory.
(gnulib/import/Makefile): Replace gnulib/import with
$(GNULIB_BUILDDIR).  Set CONFIG_FILES to just Makefile.
(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
(aclocal_m4_deps): Remove the gnulib dependencies.  Add
acx_configure_dir.m4.
* acinclude.m4: Include acx_configure_dir.m4.
* acx_configure_dir.m4: New file.
* aclocal.m4: Regenerate.
        * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
        calls.  Configure gnulib using ACX_CONFIGURE_DIR.
        (GNULIB): New variable.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile.
        * gdb/defs.h: Include build-gnulib/config.h.
        * acx_configure_dir.m4: New file.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

        * gnulib/Makefile.in: New file.
        * gnulib/configure.ac: New file.
        * gnulib/aclocal.m4: New file.
        * gnulib/config.in: New file.
        * gnulib/configure: New file.
* gnulib/: Re-run gnulib-tool to adjust.

        gdbserver/
        * Makefile.in (GNULIB_BUILDDIR): New.
(LIBGNU, INCGNU, GNULIB_H): Adjust.
        (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
        (all, install-only, uninstall, clean-info, all-lib, clean): No
        longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
        (maintainer-clean realclean distclean): Use subdir_do.
        (subdir_do): New.
        (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
$(GNULIB_BUILDDIR).  Don't pass argument to config.status.
        * acinclude.m4: Include acx_configure_dir.m4.
        * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
        calls.  Call AC_PROG_RANLIB.  Configure gnulib using
        ACX_CONFIGURE_DIR.
        (GNULIB): New.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile anymore.
        * gdbreplay.c: Include build-gnulib/config.h.
        * server.h: Likewise.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 17:15:07 +0000 (17:15 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

* Makefile.in (HFILES_NO_SRCDIR): Remove gnulib/wchar.in.h.
Adjust paths to gnulib imported files.
C

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 16:55:28 +0000 (16:55 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

* Makefile.in (HFILES_NO_SRCDIR): Remove gnulib/wchar.in.h.
Adjust paths to gnulib imported files.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 15:27:52 +0000 (15:27 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

gdb/
* gnulib/: Move whole directory ...
* gnulib/import/: ... here, and re-rerun gnulib-tool to adjust.
* Makefile.in (LIBGNU, INCGNU, GNULIB_H, CLEANDIRS)
(REQUIRED_SUBDIRS, all-lib, gnulib/Makefile, ACLOCAL_AMFLAGS)
(aclocal_m4_deps): Adjust.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* configure.ac: Adjust AC_OUTPUT output.

gdbserver/
* Makefile.in (LIBGNU, INCGNU): Adjust.
(GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
(all, install-only, uninstall, clean-info, all-lib, clean)
(maintainer-clean, Makefile, gnulib/Makefile): Adjust.
* configure.ac: Adjust AC_OUTPUT output.
* aclocal.m4: Regenerate.
* configure: Regenerate.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 13:26:25 +0000 (13:26 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

* Makefile.in (generated_files): New.
(server_h): Remove the explicit dependency on config.h, and depend
on $generated_files.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 12:10:06 +0000 (12:10 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

* Makefile.in (INCGNU): Add -Ignulib.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 12:02:56 +0000 (12:02 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

* Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
(INCGNU): ... this, and spell out -I here.
(GNULIB_LIB): Rename to ...
(LIBGNU): ... this.
(INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 11:58:57 +0000 (11:58 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

* config.in: Regenerate.

12 years agoMove entries to right place. Drop config.in entry, as I forgot to
Pedro Alves [Thu, 19 Apr 2012 11:57:39 +0000 (11:57 +0000)]
Move entries to right place.  Drop config.in entry, as I forgot to
actually do what it says.

12 years ago2012-04-19 Pedro Alves <palves@redhat.com>
Pedro Alves [Thu, 19 Apr 2012 10:23:03 +0000 (10:23 +0000)]
2012-04-19  Pedro Alves  <palves@redhat.com>

* configure.ac: Remove AC_CHECK_DECLS check for memmem.
* server.h (memmem): Remove declaration.
* config.in: Regenerate.
* configure: Regenerate.

12 years agobfd/
Thomas Schwinge [Thu, 19 Apr 2012 09:50:24 +0000 (09:50 +0000)]
bfd/
* elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
got_type.
(allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
it.

12 years agogdb:
Yao Qi [Thu, 19 Apr 2012 05:58:52 +0000 (05:58 +0000)]
gdb:
        * Makefile.in (SFILES): Add common/vec.c and remove vec.c.
        (vec.o): New rule.
        * vec.c: Move it ...
        * common/vec.c: ... here.
        * vec.h: Move it ...
        * common/vec.h: ... here.

gdb/gdbserver:

        * Makefile.in (SFILES): Add common/vec.c.
        (OBS): Add vec.o.
        (vec.o): New rule.

12 years agogdb/gdbserver/
Yao Qi [Thu, 19 Apr 2012 05:05:11 +0000 (05:05 +0000)]
gdb/gdbserver/
* remote-utils.c (prepare_resume_reply): Replace with macro
target_core_of_thread.
* server.c (handle_qxfer_threads_proper): Likewise.
* target.h (traget_core_of_thread): New macro.

12 years agogdb/
Yao Qi [Thu, 19 Apr 2012 01:58:07 +0000 (01:58 +0000)]
gdb/
* gdb-code-style.el: New.

12 years ago*** empty log message ***
gdbadmin [Thu, 19 Apr 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Thu, 19 Apr 2012 00:00:04 +0000 (00:00 +0000)]
daily update

12 years ago2012-04-18 Pedro Alves <palves@redhat.com>
Pedro Alves [Wed, 18 Apr 2012 20:45:25 +0000 (20:45 +0000)]
2012-04-18  Pedro Alves  <palves@redhat.com>

Update gnulib from latest git.
(639ea5ae15e39fe48d43e04864b2997301e4b969)

* gnulib/Makefile.am: Update.
* gnulib/dummy.c: Update.
* gnulib/extra/arg-nonnull.h: Update.
* gnulib/extra/c++defs.h: Update.
* gnulib/extra/update-copyright: Update.
* gnulib/extra/warn-on-use.h: Update.
* gnulib/inttypes.in.h: Update.
* gnulib/m4/00gnulib.m4: Update.
* gnulib/m4/extensions.m4: Update.
* gnulib/m4/gnulib-cache.m4: Update.
* gnulib/m4/gnulib-common.m4: Update.
* gnulib/m4/gnulib-comp.m4: Update.
* gnulib/m4/gnulib-tool.m4: Update.
* gnulib/m4/include_next.m4: Update.
* gnulib/m4/inttypes-pri.m4: Update.
* gnulib/m4/inttypes.m4: Update.
* gnulib/m4/longlong.m4: Update.
* gnulib/m4/memchr.m4: Update.
* gnulib/m4/memmem.m4: Update.
* gnulib/m4/mmap-anon.m4: Update.
* gnulib/m4/multiarch.m4: Update.
* gnulib/m4/onceonly.m4: Update.
* gnulib/m4/stddef_h.m4: Update.
* gnulib/m4/stdint.m4: Update.
* gnulib/m4/string_h.m4: Update.
* gnulib/m4/warn-on-use.m4: Update.
* gnulib/m4/wchar_h.m4: Update.
* gnulib/m4/wchar_t.m4: Update.
* gnulib/m4/wint_t.m4: Update.
* gnulib/memchr.c: Update.
* gnulib/memmem.c: Update.
* gnulib/stddef.in.h: Update.
* gnulib/stdint.in.h: Update.
* gnulib/str-two-way.h: Update.
* gnulib/string.in.h: Update.
* gnulib/wchar.in.h: Update.

* gnulib/extra/arg-nonnull.h: Delete.
* gnulib/extra/c++defs.h: Delete.
* gnulib/extra/warn-on-use.h: Delete.
* gnulib/m4/wchar_h.m4: Delete.
* gnulib/m4/wint_t.m4: Delete.
* gnulib/wchar.in.h: Delete.

* gnulib/extra/snippets/arg-nonnull.h: New.
* gnulib/extra/snippets/c++defs.h: New.
* gnulib/extra/snippets/warn-on-use.h: New.

* aclocal.m4: Regenerate.
* config.in: Regenerate.
* configure: Regenerate.
* gnulib/Makefile.in: Regenerate.

* gdbserver/aclocal.m4: Regenerate.
* gdbserver/config.in: Regenerate.
* gdbserver/configure: Regenerate.

12 years ago2012-04-18 Pedro Alves <palves@redhat.com>
Pedro Alves [Wed, 18 Apr 2012 20:06:39 +0000 (20:06 +0000)]
2012-04-18  Pedro Alves  <palves@redhat.com>

Reimport the update-copyright module from gnulib
(250b80067c1e1d8faa0c42fb572f721975b929c5).

* configure: Regenerate.
* gnulib/Makefile.am: Update.
* gnulib/Makefile.in: Regenerate.
* gnulib/extra/update-copyright: Update.
* gnulib/m4/gnulib-cache.m4: Update.
* gnulib/m4/gnulib-comp.m4: Update.

12 years agoput -lpthread into LIBS instead of CONFIG_LDFLAGS.
Joel Brobecker [Wed, 18 Apr 2012 15:11:59 +0000 (15:11 +0000)]
put -lpthread into LIBS instead of CONFIG_LDFLAGS.

The problem showed up on AIX when we switched from the system linker
to GNU ld. What happens is that configure is adding -lpthdebug to
CONFIG_LDFLAGS when AIX thread debugging support is detected.  But
this causes the "-lpthread" switch to be placed at the _before_
GDB's .o files (see Makefile.in):

    INTERNAL_LDFLAGS = [...] $(CONFIG_LDFLAGS)
    [...]
    gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
            rm -f gdb$(EXEEXT)
            $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
                    -o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
                    $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)

And as a result of this, the linker reports an error due to some
symbols in aix-thread.o not being satisfied.

This patch adds the "-lpthread" switch to LIBS instead, which should
be the right place to add it.

gdb/ChangeLog (Tristan Gingold):

* configure.ac (aix): Put -lpthread into libs.
* configure: Regenerate.

12 years ago * linespec.c (convert_linespec_to_sals): Don't use
Tom Tromey [Wed, 18 Apr 2012 14:56:59 +0000 (14:56 +0000)]
* linespec.c (convert_linespec_to_sals): Don't use
SYMBOL_OBJ_SECTION.
(compare_msymbols): Arguments are minsym_and_objfile, not
minimal_symbol*.  Don't use SYMBOL_OBJ_SECTION.

12 years ago2012-04-18 Pedro Alves <palves@redhat.com>
Pedro Alves [Wed, 18 Apr 2012 12:09:39 +0000 (12:09 +0000)]
2012-04-18  Pedro Alves  <palves@redhat.com>

Revert gnulib/ part of:
2011-01-01  Joel Brobecker  <brobecker@adacore.com>
Copyright year update in most files (performed by copyright.sh).

12 years agogdb/doc/
Jan Kratochvil [Wed, 18 Apr 2012 07:03:58 +0000 (07:03 +0000)]
gdb/doc/
* gdb.texinfo (Auto-loading verbose mode): Fix smallexample typo.

12 years agoFix up comment to match reality.
Jan Kratochvil [Wed, 18 Apr 2012 07:00:24 +0000 (07:00 +0000)]
Fix up comment to match reality.

12 years agogdb/
Jan Kratochvil [Wed, 18 Apr 2012 06:52:33 +0000 (06:52 +0000)]
gdb/
Fix 64-bit constants on 32-bit hosts.
* dwarf2read.c (read_unsigned_leb128): Change declaration return type
from unsigned long to ULONGEST.
(read_signed_leb128): Change declaration return type from long to
LONGEST.
(dwarf2_const_value_attr): Change declaration parameter value from long
to LONGEST.
(dwarf2_compute_name): Change variable value from long to LONGEST.
(read_unsigned_leb128): Change return type, variable result and some
casts from unsigned long to ULONGEST.
(read_signed_leb128): Change return type, variable result and some
casts from long to LONGEST.
(dwarf2_const_value_data, dwarf2_const_value_attr): Change parameter
value from long to LONGEST.
(dwarf2_const_value): Change variable value from long to LONGEST.
* symmisc.c (print_symbol): Change SYMBOL_VALUE format strings to use
plongest and hex_string.
* symtab.h (struct general_symbol_info): Change ivalue from long to
LONGEST, remove the comment.
* tracepoint.c (validate_actionline, collect_symbol, scope_info):
Change SYMBOL_VALUE format strings to use plongest and hex_string.

12 years agoForgotten commit for:
Jan Kratochvil [Wed, 18 Apr 2012 06:51:05 +0000 (06:51 +0000)]
Forgotten commit for:
gdb/testsuite/
PR symtab/7259:
* gdb.base/enumval.c: New test case.
* gdb.base/enumval.exp: New test case.

12 years agogdb/
Jan Kratochvil [Wed, 18 Apr 2012 06:46:47 +0000 (06:46 +0000)]
gdb/
PR symtab/7259:
* ada-exp.y (convert_char_literal): Use TYPE_FIELD_ENUMVAL.
* ada-lang.c (ada_discrete_type_high_bound)
(ada_discrete_type_low_bound): Use TYPE_FIELD_ENUMVAL for
TYPE_CODE_ENUM.
(ada_identical_enum_types_p): Use TYPE_FIELD_ENUMVAL.
(pos_atr, value_val_atr): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
* ada-typeprint.c (print_enum_type): Change variable lastval to LONGEST.
Use TYPE_FIELD_ENUMVAL.
* ada-valprint.c (print_optional_low_bound, ada_print_scalar)
(ada_val_print_1): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
* c-typeprint.c (c_type_print_base): Move variable lastval to inner
block, change it to LONGEST.  Use TYPE_FIELD_ENUMVAL for
TYPE_CODE_ENUM.
* coffread.c (coff_read_enum_type): Use SET_FIELD_ENUMVAL.
* dwarf2read.c (process_enumeration_scope): Likewise.
* gdb-gdb.py (TypeFlagsPrinter): Use field.enumval instead of
field.bitpos.
(class StructMainTypePrettyPrinter): Support also
FIELD_LOC_KIND_ENUMVAL.
* gdbtypes.c (get_discrete_bounds): Use TYPE_FIELD_ENUMVAL for
TYPE_CODE_ENUM.
(recursive_dump_type): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
(copy_type_recursive): Support also FIELD_LOC_KIND_ENUMVAL.
* gdbtypes.h (enum field_loc_kind): New FIELD_LOC_KIND_ENUMVAL.
(struct main_type.flds_bnds.fields.loc): Adjust bitpos comment.  New
field enumval.
(struct main_type.flds_bnds.bields): Adjust loc_kind and bitsize to
accommodate enumval.
(struct call_site): Adjust loc_kind to accommodate enumval.
(FIELD_ENUMVAL, FIELD_ENUMVAL_LVAL, SET_FIELD_ENUMVAL)
(TYPE_FIELD_ENUMVAL): New macros.
* m2-typeprint.c (m2_enum): Use TYPE_FIELD_ENUMVAL.
* mdebugread.c (parse_symbol): Use TYPE_FIELD_ENUMVAL for
TYPE_CODE_ENUM.
* p-typeprint.c (pascal_type_print_base): Likewise.
* python/lib/gdb/printing.py (class FlagEnumerationPrinter): Use
enumval.
* python/lib/gdb/types.py (make_enum_dict): Likewise.
* python/py-type.c (convert_field): New variable addrstring.  Use
TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
(check_types_equal): Support also FIELD_LOC_KIND_ENUMVAL.
* stabsread.c (read_enum_type): Use SET_FIELD_ENUMVAL.
* typepint.c (print_type_scalar): Use TYPE_FIELD_ENUMVAL for
TYPE_CODE_ENUM.
* valprint.c (generic_val_print): Likewise.

gdb/testsuite/
PR symtab/7259:
* gdb.base/enumval.c: New test case.
* gdb.base/enumval.exp: New test case.
* gdb.python/py-type.exp (test_enums): Use field.enumval instead of
field.bitpos.

12 years ago * dwarf2read.c (lookup_signatured_type): Return NULL instead of 0.
Doug Evans [Wed, 18 Apr 2012 06:24:48 +0000 (06:24 +0000)]
* dwarf2read.c (lookup_signatured_type): Return NULL instead of 0.

12 years ago * dwarf2read.c: Whitespace fixes.
Doug Evans [Wed, 18 Apr 2012 06:21:09 +0000 (06:21 +0000)]
* dwarf2read.c: Whitespace fixes.
(lookup_signatured_type): Tweak comment.
(get_die_type_at_offset): Fix comment.

12 years agopspace != NULL failed assertion on ppc-aix
Joel Brobecker [Wed, 18 Apr 2012 00:25:09 +0000 (00:25 +0000)]
pspace != NULL failed assertion on ppc-aix

This patch fixes the following problem:

    % gdb foo
    (gdb) b main
    /[...]/progspace.c:216: internal-error: set_current_program_space: Assertion `pspace != NULL' failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? (y or n)

The problem happens when we try to get the program space from
a minimal symbol.  For that, we go through the minimal symbol's
obj_section->objfile->pspace.  But the minimal symbol's obj_section
is not set, and thus we somehow get a NULL program space. And
the reason why the obj_section is not set is because the XCOFF
reader did not pass the bfd_section when calling minsyms.c's
prim_record_minimal_symbol_and_info.

gdb/ChangeLog:

        * xcoffread.c (xcoff_secnum_to_sections): New function.
        (secnum_to_section, secnum_to_bfd_section): Reimplement
        using xcoff_secnum_to_sections.  Rename "secnum" parameter
        into "n_scnum".
        (RECORD_MINIMAL_SYMBOL): Delete.
        (record_minimal_symbol): New function.
        (scan_xcoff_symtab): Replace uses of RECORD_MINIMAL_SYMBOL
        by call to record_minimal_symbol and set misc_func_recorded
        to 1.  Set last_csect_sec to the XCOFF section index instead
        of GDB's section_offset index.  Update calls to
        prim_record_minimal_symbol_and_info to pass the BFD section
        as well.

12 years agoUnused local variables in xcoffread.c:read_xcoff_symtab
Joel Brobecker [Wed, 18 Apr 2012 00:24:57 +0000 (00:24 +0000)]
Unused local variables in xcoffread.c:read_xcoff_symtab

gdb/ChangeLog:

        * xcoffread.c (read_xcoff_symtab): Delete variables
        last_csect_val and last_csect_sec and associated code.

12 years agodaily update
Alan Modra [Wed, 18 Apr 2012 00:00:05 +0000 (00:00 +0000)]
daily update

12 years ago*** empty log message ***
gdbadmin [Wed, 18 Apr 2012 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
Kaz Kojima [Tue, 17 Apr 2012 21:58:51 +0000 (21:58 +0000)]
* elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
relocations when LE conversion happens on the IE tls symbol.

12 years ago * cleanups.c (make_my_cleanup,make_my_cleanup2): Make static.
Doug Evans [Tue, 17 Apr 2012 21:24:47 +0000 (21:24 +0000)]
* cleanups.c (make_my_cleanup,make_my_cleanup2): Make static.
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
* cleanups.h (make_my_cleanup,make_my_cleanup2): Delete
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Delete.

12 years ago * cleanups.h: New file.
Doug Evans [Tue, 17 Apr 2012 21:13:20 +0000 (21:13 +0000)]
* cleanups.h: New file.
* cleanups.c: New file.
* Makefile.in (SFILES): Add cleanups.c.
(HFILES_NO_SRCDIR): Add cleanups.h.
(COMMON_OBS): Add cleanups.o.
* defs.h (struct cleanup): Moved to cleanups.h.
(do_cleanups,do_final_cleanups): Ditto.
(discard_cleanups,discard_final_cleanups): Ditto
(make_cleanup,make_cleanup_dtor,make_final_cleanup): Ditto.
(save_cleanups,save_final_cleanups): Ditto.
(restore_cleanups,restore_final_cleanups): Ditto.
(null_cleanup): Ditto.
(make_my_cleanup,make_my_cleanup2): Ditto.
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
* utils.c (cleanup_chain,final_cleanup_chain): Moved to cleanups.c.
(do_cleanups,do_final_cleanups): Ditto.
(discard_cleanups,discard_final_cleanups): Ditto
(make_cleanup,make_cleanup_dtor,make_final_cleanup): Ditto.
(save_cleanups,save_final_cleanups): Ditto.
(restore_cleanups,restore_final_cleanups): Ditto.
(null_cleanup): Ditto.
(make_my_cleanup,make_my_cleanup2): Ditto.
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.

12 years ago * utils.c (make_cleanup_freeargv): Use make_cleanup instead of
Doug Evans [Tue, 17 Apr 2012 20:48:20 +0000 (20:48 +0000)]
* utils.c (make_cleanup_freeargv): Use make_cleanup instead of
make_my_cleanup.
(make_cleanup_dyn_string_delete): Ditto.
(make_cleanup_ui_file_delete): Ditto.
(make_cleanup_ui_out_redirect_pop): Ditto.
(make_cleanup_free_section_addr_info): Ditto.
(make_cleanup_restore_integer): Ditto.
(make_cleanup_unpush_target): Ditto.
(make_cleanup_value_free_to_mark): Ditto.
(make_cleanup_value_free): Ditto.
(make_cleanup_free_so): Ditto.

12 years ago* elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
Roland McGrath [Tue, 17 Apr 2012 19:53:19 +0000 (19:53 +0000)]
* elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
so that 32-byte boundary is a proper instruction boundary.

12 years ago2012-04-17 Pedro Alves <palves@redhat.com>
Pedro Alves [Tue, 17 Apr 2012 17:43:11 +0000 (17:43 +0000)]
2012-04-17  Pedro Alves  <palves@redhat.com>

* Makefile.in (site.exp): Make site.exp source
$srcdir/lib/append_gdb_boards_dir.exp.
* lib/append_gdb_boards_dir.exp: New file.

12 years agogdb/
Jan Kratochvil [Tue, 17 Apr 2012 15:56:21 +0000 (15:56 +0000)]
gdb/
New option "set debug auto-load".
* NEWS: New commands "set debug auto-load" and "show debug auto-load".
* auto-load.c (debug_auto_load, show_debug_auto_load: New.
(auto_load_safe_path_vec_update)
(filename_is_in_auto_load_safe_path_vec): Call fprintf_unfiltered
if DEBUG_AUTO_LOAD.
(file_is_auto_load_safe): New parameters debug_fmt and ....
Call fprintf_unfiltered if DEBUG_AUTO_LOAD.
(source_gdb_script_for_objfile): Extend the file_is_auto_load_safe
caller by explanatory string.
(_initialize_auto_load): Register "set debug auto-load".
* auto-load.h (file_is_auto_load_safe): New parameters debug_fmt
and ....
* linux-thread-db.c (try_thread_db_load_from_pdir_1)
(try_thread_db_load_from_dir): Extend the file_is_auto_load_safe caller
by explanatory string.
* main.c (captured_main): Likewise.
* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile)
(source_section_scripts): Likewise.

gdb/doc/
New option "set debug auto-load".
* gdb.texinfo (Auto-loading): New menu item for auto-load verbose mode.
(auto-load verbose mode): New node.

12 years agogdb/
Jan Kratochvil [Tue, 17 Apr 2012 15:54:35 +0000 (15:54 +0000)]
gdb/
New option "set auto-load safe-path".
* NEWS: New commands "set auto-load safe-path"
and "show auto-load safe-path".
* auto-load.c: Include gdb_vecs.h, readline/tilde.h and completer.h.
(auto_load_safe_path, auto_load_safe_path_vec)
(auto_load_safe_path_vec_update, set_auto_load_safe_path)
(show_auto_load_safe_path, add_auto_load_safe_path, filename_is_in_dir)
(filename_is_in_auto_load_safe_path_vec, file_is_auto_load_safe): New.
(source_gdb_script_for_objfile): New variable is_safe.  Call
file_is_auto_load_safe.  Return if it is not.
(struct loaded_script): New field loaded.
(maybe_add_script): Add parameter loaded.  Initialize SLOT with it.
(print_script): Use LOADED indicator instead of FULL_PATH.  Change
output "Missing" to "No".
(_initialize_auto_load): New variable cmd.  Initialize
auto_load_safe_path.  Register "set auto-load safe-path",
"show auto-load safe-path" and "add-auto-load-safe-path".
* auto-load.h (maybe_add_script): Add parameter loaded.
(file_is_auto_load_safe): New declaration.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: New parameters --with-auto-load-safe-path
and --without-auto-load-safe-path.
* linux-thread-db.c (try_thread_db_load_from_pdir_1)
(try_thread_db_load_from_dir): Check file_is_auto_load_safe first.
* main.c (captured_main): Check file_is_auto_load_safe for
LOCAL_GDBINIT.
* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile): New
variable is_safe.  Call file_is_auto_load_safe.  Return if it is not.
(source_section_scripts): Call file_is_auto_load_safe.  Return if it is
not.

gdb/doc/
New option "set auto-load safe-path".
* gdb.texinfo (Auto-loading): Extend the "show auto-load"
and "info auto-load" examples for safe-path.  Put there also references
for "set auto-load safe-path" and "show auto-load safe-path".
New menu item for Auto-loading safe path.
(Auto-loading safe path): New node.
(Python Auto-loading): Update the expected output from "Missing"
to "No".

gdb/testsuite/
New option "set auto-load safe-path".
* gdb.python/py-objfile-script.exp (set auto-load safe-path): New.
* gdb.python/py-section-script.exp (set auto-load safe-path): New.

12 years agogdb/
Jan Kratochvil [Tue, 17 Apr 2012 15:51:48 +0000 (15:51 +0000)]
gdb/
auto-load: Implementation.
* NEWS: New descriptions for "info auto-load",
"info auto-load gdb-scripts", "info auto-load python-scripts",
"info auto-load local-gdbinit" and "info auto-load libthread-db".
Deprecate "info auto-load-scripts", "set auto-load-scripts on|off"
and "show auto-load-scripts".  New description for "set auto-load",
"show auto-load", "set auto-load gdb-scripts",
"show auto-load gdb-scripts", "set auto-load python-scripts",
"show auto-load python-scripts", "set auto-load local-gdbinit",
"show auto-load local-gdbinit", "set auto-load libthread-db" and
"show auto-load libthread-db".
* auto-load.c: Remove include python/python-internal.h.  Add includes
exceptions.h, cli/cli-script.h, gdbcmd.h, cli/cli-decode.h and
cli/cli-setshow.h.
(GDB_AUTO_FILE_NAME, source_gdb_script_for_objfile)
(auto_load_gdb_scripts, show_auto_load_gdb_scripts): New.
(gdbpy_global_auto_load): Rename to ...
(global_auto_load): ... here.
(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
(auto_load_local_gdbinit_loaded, show_auto_load_local_gdbinit)
(script_language_gdb, source_gdb_script_for_objfile): New.
(struct loaded_script): New field language.
(hash_loaded_script_entry, eq_loaded_script_entry): Calculate also
LANGUAGE.
(maybe_add_script): Add parameter language.  Drop redundant
entry.full_path initialization.  Initialize entry.language and
(*slot)->language.
(auto_load_objfile_script): Change parameter suffix to language.
Remove the call of maybe_add_script.
Call language->source_script_for_objfile.
(load_auto_scripts_for_objfile, struct collect_matching_scripts_data):
New.
(collect_matching_scripts): Adjust it for
struct collect_matching_scripts_data.
(auto_load_info_scripts_pattern_nl): New variable.
(info_auto_load_scripts): Rename to ...
(auto_load_info_scripts): ... here, add parameter language.  Adjust it
for struct collect_matching_scripts_data.
(info_auto_load_gdb_scripts, info_auto_load_local_gdbinit)
(set_auto_load_cmd, auto_load_set_cmdlist_get, show_auto_load_cmd)
(auto_load_show_cmdlist_get, info_auto_load_cmd)
(auto_load_info_cmdlist_get): New.
(_initialize_auto_load): Move add_info of "auto-load-scripts" to
python/py-auto-load.c.  New installment for "set auto-load gdb-scripts",
"info auto-load gdb-scripts", "set auto-load local-gdbinit" and
"info auto-load local-gdbinit".
* auto-load.h (struct script_language): New.
(gdbpy_global_auto_load): Rename to ...
(global_auto_load): ... here.
(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
(auto_load_local_gdbinit_loaded): New declarations.
(maybe_add_script): New parameter language.
(auto_load_objfile_script): Change parameter suffix to language.
(load_auto_scripts_for_objfile, auto_load_info_scripts_pattern_nl)
(auto_load_info_scripts, auto_load_set_cmdlist_get)
(auto_load_show_cmdlist_get, auto_load_info_cmdlist_get): New
declarations.
* linux-thread-db.c: Include auto-load.h and ctype.h.
(auto_load_thread_db, show_auto_load_thread_db): New.
(struct thread_db_info): New field filename.
(delete_thread_db_info): Call xfree for FILENAME.
(try_thread_db_load): Initialize FILENAME.
(try_thread_db_load_from_pdir, try_thread_db_load_from_dir): Return
if !AUTO_LOAD_THREAD_DB.
(info_auto_load_libthread_db_compare, info_auto_load_libthread_db): New.
(_initialize_thread_db): Install auto_load_thread_db
as "set auto-load libthread-db" and install info_auto_load_libthread_db
as "info auto-load libthread-db".
* main.c (captured_main): Rename gdbpy_global_auto_load to
global_auto_load.  Initialize AUTO_LOAD_LOCAL_GDBINIT_PATHNAME and
AUTO_LOAD_LOCAL_GDBINIT_LOADED.
(print_gdb_help): Extend the help for 'local init file'.
* python/py-auto-load.c: Remove a comment about gdb scripts extension.
(GDBPY_AUTO_SECTION_NAME): Extend the comment it is Python specific.
(auto_load_scripts): Rename to ...
(auto_load_python_scripts): ... here, update the comment.
(gdbpy_load_auto_script_for_objfile): New declaration.
(show_auto_load_python_scripts, script_language_python)
(gdbpy_load_auto_script_for_objfile): New.
(source_section_scripts): Refactor the code.
(load_auto_scripts_for_objfile): Rename to ...
(gdbpy_load_auto_scripts_for_objfile): ... here, update the
auto_load_objfile_script caller, drop GDBPY_GLOBAL_AUTO_LOAD checking.
(info_auto_load_python_scripts): New.
(gdbpy_initialize_auto_load): New variables cmd and cmd_name.
Rename "set auto-load-scripts" to "set auto-load python-scripts".
Register "set auto-load-scripts" as its deprecated alias.  Register
"info auto-load python-scripts".  Register "info auto-load-scripts" as
its deprecated alias.
(load_auto_scripts_for_objfile): Rename to ...
(gdbpy_load_auto_scripts_for_objfile): ... here.
* python/python.h (load_auto_scripts_for_objfile): Rename to ...
(gdbpy_load_auto_scripts_for_objfile): ... here.

gdb/doc/
auto-load: Implementation.
* gdb.texinfo (Mode Options): New anchor for -nx.
(Startup): New anchors for Option -init-eval-command,
Home Directory Init File
and Init File in the Current Directory during Startup.
Mention set auto-load local-gdbinit with a reference.
Change the sample code to "set auto-load python-scripts".
(Threads): New anchor set libthread-db-search-path.
Provide references to libthread_db.so.1 file.
(Controlling GDB): New menu item for Auto-loading.
(Auto-loading, Init File in the Current Directory)
(libthread_db.so.1 file, objfile-gdb.gdb file): New nodes.
(Python): Rename the menu item Auto-loading to Python Auto-loading.
(Writing a Pretty-Printer, Objfiles In Python): Update the renamed
reference.
(Auto-loading): Rename to ...
(Python Auto-loading): ... here.  Change "set auto-load-scripts" to
"set auto-load python-scripts", new anchor for it.  Change
"show auto-load-scripts" to "show auto-load python-scripts", new anchor
for it.  Change "info auto-load-scripts"
to "info auto-load python-scripts", new anchor for it.  Change "scripts"
to "Python scripts".

gdb/testsuite/
auto-load: Implementation.
* gdb.base/help.exp (test set height): Increase the height.
* gdb.python/py-objfile-script.exp (info auto-load-scripts): Change
to ...
(info auto-load python-scripts): ... here.
* gdb.python/py-section-script.exp (info auto-load-scripts *): Change
to ...
(info auto-load python-scripts *): ... here.

12 years agogdb/
Jan Kratochvil [Tue, 17 Apr 2012 15:49:16 +0000 (15:49 +0000)]
gdb/
auto-load: Move files.
* Makefile.in (SFILES): Add auto-load.c.
(HFILES_NO_SRCDIR): Add auto-load.h.
(COMMON_OBS): Add auto-load.o.
(distclean): Change .gdbinit for gdb-gdb.gdb.
* auto-load.c: New file, with parts from python/py-auto-load.c.
* auto-load.h: New file, with parts from python/python.h.
* configure: Regenerate.
* configure.ac (AC_OUTPUT): Change .gdbinit for gdb-gdb.gdb.
* gdb-gdb.gdb.in: New file, renamed from gdbinit.in.
* gdbinit.in: Remove file, rename it to gdb-gdb.gdb.in.
* main.c: Include auto-load.h.
* python/py-auto-load.c: Move include filenames.h, gdb_regex.h,
command.h, observer.h and progspace.h to auto-load.c.  Add include
auto-load.h.
(gdbpy_global_auto_load, struct auto_load_pspace_info)
(struct loaded_script, auto_load_pspace_data)
(auto_load_pspace_data_cleanup, get_auto_load_pspace_data)
(hash_loaded_script_entry, eq_loaded_script_entry)
(init_loaded_scripts_info, get_auto_load_pspace_data_for_loading)
(maybe_add_script): Move to auto-load.c.
(source_section_scripts): Change maybe_add_script parameters passing,
use script_not_found_warning_print.
(clear_section_scripts, auto_load_objfile_script)
(auto_load_new_objfile, loaded_script_ptr)
(DEF_VEC_P (loaded_script_ptr), collect_matching_scripts, print_script)
(sort_scripts_by_name, info_auto_load_scripts): Move to auto-load.c.
(gdbpy_initialize_auto_load): Move auto_load_pspace_data,
auto_load_new_objfile and info_auto_load_scripts initizations to
auto-load.c.
* python/python.h (gdbpy_global_auto_load): Move to auto-load.h.

12 years agogdb/
Jan Kratochvil [Tue, 17 Apr 2012 15:47:09 +0000 (15:47 +0000)]
gdb/
Code cleanup.
* charset.c (find_charset_names): Remove variables ix and elt.
Use free_char_ptr_vec.
* elfread.c (build_id_to_debug_filename): New variables debugdir_vec,
back_to and ix.  Use dirnames_to_char_ptr_vec.  Remove variable
debugdir_end.  New variable debugdir_len.
* gdb_vecs.h (free_char_ptr_vec, make_cleanup_free_char_ptr_vec)
(dirnames_to_char_ptr_vec_append, dirnames_to_char_ptr_vec): New
declarations.
* progspace.c (clear_program_space_solib_cache): Remove variables ix
and elt.  Use free_char_ptr_vec.
* source.c (add_path): Remove variables argv, arg and argv_index.
New variables dir_vec, back_to, ix and name.
Use dirnames_to_char_ptr_vec_append.  Use freeargv instead of
make_cleanup_freeargv.  Remove variable separator.  Simplify the code
no longer expecting DIRNAME_SEPARATOR.
(openp): Remove variable p, p1 and len.  New variables dir_vec,
back_to, ix and dir.  Use dirnames_to_char_ptr_vec.  Simplify the code
no longer expecting DIRNAME_SEPARATOR.
* symfile.c (find_separate_debug_file): New variables debugdir_vec,
back_to and ix.  Use dirnames_to_char_ptr_vec.  Remove variable
debugdir_end.
* utils.c (free_char_ptr_vec, do_free_char_ptr_vec)
(make_cleanup_free_char_ptr_vec, dirnames_to_char_ptr_vec_append)
(dirnames_to_char_ptr_vec): New functions.

12 years agogdb/
Jan Kratochvil [Tue, 17 Apr 2012 15:45:12 +0000 (15:45 +0000)]
gdb/
Code cleanup.
* source.c (add_path): Remove always true conditional 'p == 0' and
unindent its code block.

12 years agogas/
Richard Sandiford [Tue, 17 Apr 2012 13:59:41 +0000 (13:59 +0000)]
gas/
* config/tc-avr.c (md_apply_fix): Fix handling of BFD_RELOC32.

12 years ago2012-04-17 Pedro Alves <palves@redhat.com>
Pedro Alves [Tue, 17 Apr 2012 13:55:32 +0000 (13:55 +0000)]
2012-04-17  Pedro Alves  <palves@redhat.com>

* gdbtypes.h (FIELD_BITPOS): Rename to ...
(FIELD_BITPOS_LVAL): ... this.
(FIELD_BITPOS): New.
(SET_FIELD_BITPOS): Adjust to use FIELD_BITPOS_LVAL.
* dwarf2read.c (dwarf2_add_field): Use SET_FIELD_BITPOS.
* gdbtypes.c (append_composite_type_field_aligned): Adjust to use
SET_FIELD_BITPOS.
* gnu-v3-abi.c (build_gdb_vtable_type): Adjust to use
SET_FIELD_BITPOS.
* stabsread.c (read_cpp_abbrev, read_one_struct_field)
(read_baseclasses): Adjust to use SET_FIELD_BITPOS.
* target-descriptions.c (tdesc_gdb_type): Adjust to use
SET_FIELD_BITPOS.

12 years agogdb/
Jan Kratochvil [Tue, 17 Apr 2012 12:43:20 +0000 (12:43 +0000)]
gdb/
Do not rely on FIELD_LOC_KIND_BITPOS being zero.
* ada-lang.c (ada_template_to_fixed_record_type_1): Replace
TYPE_FIELD_BITPOS used as lvalue by SET_FIELD_BITPOS.
* gdbtypes.c (append_flags_type_flag): Likewise, twice.
* jv-lang.c (java_link_class_type): Likewise, once.
* stabsread.c (read_enum_type): Likewise.

12 years ago2012-04-17 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 17 Apr 2012 10:51:07 +0000 (10:51 +0000)]
2012-04-17  Tristan Gingold  <gingold@adacore.com>

* vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
member of an object archive.<

12 years ago2012-04-17 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 17 Apr 2012 10:28:19 +0000 (10:28 +0000)]
2012-04-17  Tristan Gingold  <gingold@adacore.com>

* vms-lib.c (MAX_EKEYLEN): Define.
(MAX_KEYLEN): Fix value.
(vms_write_index): Add comments and fix indentation.
Adjust comparaison.  Add assertions.  Free kbn_blk.
(_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
Compense MAX_KEYLEN adjustment.

12 years agogold: Add support for sparc GOTDATA optimizations in Gold.
David S. Miller [Tue, 17 Apr 2012 02:29:46 +0000 (02:29 +0000)]
gold: Add support for sparc GOTDATA optimizations in Gold.

gold/

* sparc.cc (Target_sparc::got_address): New function.
(Sparc_relocate_functions::gdop_hix22): New function.
(Sparc_relocate_functions::gdop_lox10): New function.
(Target_sparc::Scan::local): Do not emit a GOT entry for GOTDATA
relocs.
(Target_sparc::Scan::local): Likewise if the global symbol is not
preemptible and is not IFUNC.
(Target_sparc::Relocate::relocate): Perform GOTDATA code
transformations for local and non-preemptible non-IFUNC global
symbols.

12 years agogold: Fix 64-bit sparc GOLD crash in gdb-index code.
David S. Miller [Tue, 17 Apr 2012 02:10:39 +0000 (02:10 +0000)]
gold: Fix 64-bit sparc GOLD crash in gdb-index code.

gold/

* gdb-index.cc (Gdb_index::do_write): Use Swap_unaligned when
writing out 64-bit part of ranges.