binutils-gdb.git
12 years agocorrect typo in previous commit.
Iain Sandoe [Tue, 3 Jan 2012 12:03:10 +0000 (12:03 +0000)]
correct typo in previous commit.

bfd:

* mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.

12 years agoadd dysymtab write support to bfd/mach-o.
Iain Sandoe [Tue, 3 Jan 2012 10:54:01 +0000 (10:54 +0000)]
add dysymtab write support to bfd/mach-o.

bfd:

* mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
as the value of an indirect symbol.  Keep the string table index in
non-indirect syms for reference.
(bfd_mach_o_write_dysymtab): New.
(bfd_mach_o_primary_symbol_sort_key): New.
(bfd_mach_o_cf_symbols): New.
(bfd_mach_o_sort_symbol_table): New.
(bfd_mach_o_mangle_symbols): Return early if no symbols.  Sort symbols.
If we are emitting a dysymtab, process indirect symbols and count the
number of each other kind.
(bfd_mach_o_mangle_sections): New.
(bfd_mach_o_write_contents): Split out some pre-requisite code into
the command builder. Write dysymtab if the command is present.
(bfd_mach_o_count_sections_for_seg): New.
(bfd_mach_o_build_seg_command): New.
(bfd_mach_o_build_dysymtab_command): New.
(bfd_mach_o_build_commands): Reorganize to support the fact that some
commands are optional and should not be emitted if there are no
sections or symbols.
(bfd_mach_o_set_section_contents): Amend comment.
* mach-o.h: Amend and add to comments.
(mach_o_data_struct): Add fields for dysymtab symbols counts and a
pointer to the indirects, when present.
(bfd_mach_o_should_emit_dysymtab): New macro.
(IS_MACHO_INDIRECT): Likewise.

gas/testsuite:

* gas/mach-o/dysymtab-1-64.d: New.
* gas/mach-o/dysymtab-1.d: New.
* gas/mach-o/symbols-1-64.d: New.
* gas/mach-o/symbols-1.d: New.
* gas/mach-o/symbols-base-64.s: New.
* gas/mach-o/symbols-base.s: New.

12 years agogdb/testsuite/
Yao Qi [Tue, 3 Jan 2012 02:38:37 +0000 (02:38 +0000)]
gdb/testsuite/
* gdb.trace/strace.exp (strace_trace_on_same_addr): New.
(strace_trace_on_diff_addr): New.
* gdb.trace/strace.c: (main): Add two local variables.

12 years agogdb/gdbserver/
Yao Qi [Tue, 3 Jan 2012 02:26:52 +0000 (02:26 +0000)]
gdb/gdbserver/
* tracepoint.c (tracepoint_was_hit): Don't collect for
static tracepoint.

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

12 years agodaily update
Alan Modra [Mon, 2 Jan 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years ago * gdb.cell/fork.exp: Delete breakpoints after reaching main.
Ulrich Weigand [Mon, 2 Jan 2012 18:04:26 +0000 (18:04 +0000)]
* gdb.cell/fork.exp: Delete breakpoints after reaching main.
* gdb.cell/gcore.exp: Likewise.
* gdb.cell/solib-symbol.exp: Use "info symbol" instead of "break"
to verify the correct instance of main is selected.

12 years agogdb/
Jan Kratochvil [Mon, 2 Jan 2012 17:18:46 +0000 (17:18 +0000)]
gdb/
* Makefile.in (ALL_TARGET_OBS): Remove solib-target.o.
* configure.tgt (arm*-wince-pe, arm*-*-mingw32ce*, arm*-*-symbianelf*)
(i[34567]86-*-dicos*, i[34567]86-*-cygwin*, i[34567]86-*-mingw32*)
(x86_64-*-dicos*, x86_64-*-mingw*): Remove solib-target.o.
Revert this part of:
2012-01-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
Build gdb directly from *.o files not using libgdb.a.
* Makefile.in (COMMON_OBS): Remove solib-target.o.

12 years agoUpdate the copyright header of various files...
Joel Brobecker [Mon, 2 Jan 2012 15:37:37 +0000 (15:37 +0000)]
Update the copyright header of various files...

... to follow the correct syntax (according to the gospel of
gnulib's update-copyright). In other words:
  - no comma after the last year;
  - FSF spelled exactly "Free Software Foundation, Inc.", with
    the comma and the period at the end.

sim/common/ChangeLog:

* dv-sockser.h, sim-assert.h, sim-fpu.c: Reformat the copyright
header.

sim/m32c/ChangeLog:

* blinky.S, gloss.S, sample.S: Reformat copyright header.

sim/mn10300/ChangeLog:

* sim-main.h: Reformat copyright header.

sim/ppc/ChangeLog:

* dp-bit.c: Reformat copyright header.

gdb/ChangeLog:

        * gdb/common/gdb_thread_db.h, gdb/dbxread.c, gdb/environ.c,
        gdb/gcore.h, gdb/rs6000-tdep.h, gdb/s390-nat.c, gdb/tic6x-tdep.c:
        Reformat the copyright header.

gdb/gdbserver/ChangeLog:

* terminal.h: Reformat copyright header.

gdb/testsuite/ChangeLog:

* dg-extract-results.sh, gdb.arch/gcore.c, gdb.arch/gdb1558.c,
gdb.arch/i386-gnu-cfi.c, gdb.base/complex.c, gdb.base/cvexpr.c,
gdb.base/gcore.c, gdb.base/gdb1555-main.c, gdb.base/gdb1555.c,
gdb.base/gdb1821.c, gdb.base/long_long.c, gdb.base/restore.c,
gdb.base/sepdebug.c, gdb.base/type-opaque-lib.c,
gdb.base/type-opaque-main.c, gdb.cp/maint.exp, gdb.cp/namespace1.cc,
gdb.cp/pr9631.cc, gdb.cp/psmang1.cc, gdb.cp/psmang2.cc,
gdb.cp/try_catch.cc, gdb.cp/virtfunc.cc, gdb.hp/gdb.base-hp/reg.exp,
gdb.mi/basics.c, gdb.mi/mi-stack.c, gdb.mi/mi-var-child.c,
gdb.mi/mi2-var-child.exp, gdb.mi/var-cmd.c,
gdb.threads/thread_check.c: Reformat copyright header.

12 years agogdb/
Jan Kratochvil [Mon, 2 Jan 2012 13:29:57 +0000 (13:29 +0000)]
gdb/
Revert this part of:
2012-01-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
Remove the gdbtui binary.
* gdb.c (main): Remove args.interpreter_p initialization.
* main.c (captured_main): Set INTERPRETER_P directly by INTERP_CONSOLE.
* main.h (struct captured_main_args): Remove interpreter_p.

12 years agoAdd fnchange.lst entry for gdb/ChangeLog-2011.
Joel Brobecker [Mon, 2 Jan 2012 09:03:09 +0000 (09:03 +0000)]
Add fnchange.lst entry for gdb/ChangeLog-2011.

gdb/ChangeLog:

* config/djgpp/fnchange.lst: Add entry for ChangeLog-2011.

12 years agogdb/gdbserver/gdbreplay: Update copyright year in version out
Joel Brobecker [Mon, 2 Jan 2012 08:59:35 +0000 (08:59 +0000)]
gdb/gdbserver/gdbreplay: Update copyright year in version out

gdb/ChangeLog:

* top.c (print_gdb_version): Update copyright year.

gdb/gdbserver/ChangeLog:

* server.c (gdbserver_version): Update copyright year.
* gdbreplay.c (gdbreplay_version): Likewise.

12 years agoRotate GDB ChangeLog for 2012.
Joel Brobecker [Mon, 2 Jan 2012 08:58:08 +0000 (08:58 +0000)]
Rotate GDB ChangeLog for 2012.

12 years ago gdb/
Yao Qi [Mon, 2 Jan 2012 03:59:35 +0000 (03:59 +0000)]
gdb/
* inf-ptrace.c (inf_ptrace_xfer_partial): Reindent.

12 years agogdb/
Jan Kratochvil [Mon, 2 Jan 2012 02:52:20 +0000 (02:52 +0000)]
gdb/
Fix regression for gdb.cp/gdb2495.exp with gcc-4.7.
* arch-utils.c (displaced_step_at_entry_point): Incrase BP_LEN skip to
3 times.
* infcall.c (call_function_by_hand) <AT_SYMBOL>: Move it upwards and
fall through into AT_ENTRY_POINT.
(call_function_by_hand) <AT_ENTRY_POINT>: New variable bp_len.  Adjust
DUMMY_ADDR with it.
* ppc-linux-tdep.c (ppc_linux_displaced_step_location): Increase
PPC_INSN_SIZE skip to 3 times.

12 years agogdb/
Jan Kratochvil [Mon, 2 Jan 2012 02:42:24 +0000 (02:42 +0000)]
gdb/
* amd64-linux-nat.c (update_debug_registers_callback): New comment on
the return value.
* i386-linux-nat.c (update_debug_registers_callback): Likewise.

12 years agogdb/
Jan Kratochvil [Mon, 2 Jan 2012 02:31:18 +0000 (02:31 +0000)]
gdb/
Build gdb directly from *.o files not using libgdb.a.
* Makefile.in (SUBDIR_TUI_OBS): Remove duplicate tui.o.
(COMMON_OBS): Remove solib-target.o.
(LIBGDB_OBS, libgdb.a): Move it before the gdb$(EXEEXT) rule.
(gdb$(EXEEXT)): Replace libgdb.a with $(LIBGDB_OBS).
(LIBGDB_OBS, libgdb.a): Move it above.
* configure.tgt (alpha*-*-linux*, alpha*-*-freebsd*)
(alpha*-*-kfreebsd*-gnu, alpha*-*-netbsd*, alpha*-*-knetbsd*-gnu)
(alpha*-*-openbsd*, am33_2.0*-*-linux*, arm*-wince-pe)
(arm*-*-mingw32ce*, arm*-*-linux*, arm*-*-netbsd*, arm*-*-knetbsd*-gnu)
(arm*-*-openbsd*, cris*, frv-*-*, hppa*-*-hpux*, hppa*-*-linux*)
(hppa*-*-netbsd*, hppa*-*-openbsd*, i[34567]86-*-darwin*)
(i[34567]86-*-dicos*, i[34567]86-*-freebsd*, i[34567]86-*-kfreebsd*-gnu)
(i[34567]86-*-netbsd*, i[34567]86-*-knetbsd*-gnu, i[34567]86-*-openbsd*)
(i[34567]86-*-nto*, i[34567]86-*-solaris2.1[0-9]*)
(x86_64-*-solaris2.1[0-9]*, i[34567]86-*-solaris*, i[34567]86-*-linux*)
(i[34567]86-*-gnu*, ia64-*-linux*, m32r*-*-linux*, m68*-*-linux*)
(m68*-*-netbsd*, m68*-*-knetbsd*-gnu, m68*-*-openbsd*)
(microblaze*-linux-*, microblaze*-*-linux*, mips*-sgi-irix5*)
(mips*-sgi-irix6*, mips*-*-linux*, mips*-*-netbsd*)
(mips*-*-knetbsd*-gnu, mips64*-*-openbsd*, powerpc-*-netbsd*)
(powerpc-*-knetbsd*-gnu, powerpc-*-openbsd*, powerpc-*-aix*, rs6000-*-*)
(powerpc-*-linux*, powerpc64-*-linux*, powerpc*-*-*, s390*-*-*)
(sh*-*-linux*, sh*-*-netbsdelf*, sh*-*-knetbsd*-gnu, sh*-*-openbsd*)
(sparc-*-linux*, sparc64-*-linux*, sparc*-*-freebsd*)
(sparc*-*-kfreebsd*-gnu, sparc-*-netbsd*, sparc-*-knetbsd*-gnu)
(sparc64-*-netbsd*, sparc64-*-knetbsd*-gnu, sparc-*-openbsd*)
(sparc64-*-openbsd*, sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*)
(sparc-*-solaris2*, sparcv9-*-solaris2*, sparc64-*-solaris2*)
(vax-*-netbsd*, vax-*-knetbsd*-gnu, x86_64-*-darwin*, x86_64-*-dicos*)
(x86_64-*-linux*, x86_64-*-freebsd*, x86_64-*-kfreebsd*-gnu)
(x86_64-*-netbsd*, x86_64-*-knetbsd*-gnu, x86_64-*-openbsd*)
(xtensa*-*-linux*, xtensa*): Remove solib.o from gdb_target_obs.

12 years agogdb/
Jan Kratochvil [Mon, 2 Jan 2012 02:28:59 +0000 (02:28 +0000)]
gdb/
Remove the gdbtui binary.
* .gitignore (/gdbtui): Remove.
* Makefile.in (TUI): Remove.
(SUBDIR_TUI_OBS): Remove tui-main.o.
(SUBDIR_TUI_SRCS): Remove tui/tui-main.c.
(all-tui, install-tui, uninstall-tui, $(TUI)$(EXEEXT), clean-tui)
(tui-main.o): Remove.
(all_object_files): Remove tui-main.o.
* NEWS: New note for the gdbtui removal.
* configure: Rebuilt.
* configure.ac: No longer add all-tui, clean-tui, install-tui and
uninstall-tui to CONFIG_ALL, CONFIG_CLEAN, CONFIG_INSTALL and
CONFIG_UNINSTALL respectively.
* gdb.c (main): Remove args.interpreter_p initialization.
* main.c (captured_main): Set INTERPRETER_P directly by INTERP_CONSOLE.
* main.h (struct captured_main_args): Remove interpreter_p.
* tui/tui-main.c: Remove.

gdb/doc/
Remove the gdbtui binary.
* all-cfg.texi (GDBTUI): Remove.
* gdb.texinfo (Mode Options): Remove the GDBTUI reference.
(TUI): Remove GDBTUI pindex.  Remove the GDBTUI reference.
* gdbint.texinfo (Testsuite): Replace `gdbtui' by `gdb -tui'.

12 years ago * dwarf2read.c (dwarf2_compute_name): Simplify objfile references.
Doug Evans [Mon, 2 Jan 2012 01:23:41 +0000 (01:23 +0000)]
* dwarf2read.c (dwarf2_compute_name): Simplify objfile references.
(dwarf2_physname, read_import_statement): Ditto.
(read_call_site_scope, dwarf2_record_block_ranges): Ditto.
(process_structure_scope read_subroutine_type): Ditto.
(read_typedef, load_partial_dies, read_partial_die): Ditto.
(find_partial_die, dwarf_decode_lines, lookup_die_type): Ditto.
(dwarf2_fetch_die_location_block): Ditto.
(dwarf_decode_macros, dwarf2_symbol_mark_computed): Ditto.

12 years ago * dwarf2read.c (read_signatured_type): Delete `objfile' arg.
Doug Evans [Mon, 2 Jan 2012 00:50:07 +0000 (00:50 +0000)]
* dwarf2read.c (read_signatured_type): Delete `objfile' arg.
All callers updated.
(load_full_comp_unit, queue_comp_unit, process_queue): Ditto.
(dw2_do_instantiate_symtab, dw2_instantiate_symtab): Ditto.
(process_psymtab_comp_unit, load_partial_comp_unit): Ditto.

12 years ago * dwarf2read.c (load_cu): Move assert to more useful location.
Doug Evans [Mon, 2 Jan 2012 00:29:19 +0000 (00:29 +0000)]
* dwarf2read.c (load_cu): Move assert to more useful location.

12 years ago * dwarf2read.c (free_heap_comp_unit): Renamed from free_one_comp_unit.
Doug Evans [Mon, 2 Jan 2012 00:23:50 +0000 (00:23 +0000)]
* dwarf2read.c (free_heap_comp_unit): Renamed from free_one_comp_unit.
All callers updated.

12 years ago * dwarf2read.c (dwarf2_per_objfile): Add comment.
Doug Evans [Mon, 2 Jan 2012 00:09:58 +0000 (00:09 +0000)]
* dwarf2read.c (dwarf2_per_objfile): Add comment.
(dwarf2_elf_names): Minor reformat.
(dwarf2_per_cu_data): Tweak comment.
(dwarf2_read_section): Fix comment.
(create_all_comp_units): Fix comment.
(load_full_comp_unit): Fix comment.
(process_full_comp_unit): Fix comment.
(read_signatured_type): Fix comment.

12 years ago*** empty log message ***
gdbadmin [Mon, 2 Jan 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Sun, 1 Jan 2012 23:00:05 +0000 (23:00 +0000)]
daily update

12 years ago*** empty log message ***
gdbadmin [Sun, 1 Jan 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Sat, 31 Dec 2011 23:00:06 +0000 (23:00 +0000)]
daily update

12 years ago * dwarf2read.c (read_typedef): Guard against self-referential typedefs.
Doug Evans [Sat, 31 Dec 2011 17:18:13 +0000 (17:18 +0000)]
* dwarf2read.c (read_typedef): Guard against self-referential typedefs.

12 years agosim: erc32: fix linking against local readline on modern (ncurses) systems
Mike Frysinger [Sat, 31 Dec 2011 07:06:47 +0000 (07:06 +0000)]
sim: erc32: fix linking against local readline on modern (ncurses) systems

The current erc32 configure script only searches for -ltermcap to provide
any termcap funcs (which readlines needs).  When building against a local
readline (which is static), we hit link failures like so:
  gcc ...-I/-D flags... -o sis \
    sis.o exec.o erc32.o func.o help.o float.o \
    ../../bfd/libbfd.a ../../opcodes/libopcodes.a \
    ../../libiberty/libiberty.a -lz -lnsl \
    ../../readline/libreadline.a -lm
  ../../readline/libreadline.a(display.o): In function 'cr':
  .../readline/display.c:2486: undefined reference to 'tputs'
  collect2: ld returned 1 exit status
  make[2]: *** [sis] Error 1

Use AC_SEARCH_LIBS from gdb's configure.ac as suggested by Joel Brobecker
to check for additional termcap providers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years ago*** empty log message ***
gdbadmin [Sat, 31 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Fri, 30 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update

12 years agoFixing previous Changelog entry (removing the unnecessary "gdb/testsuite/" line
Edjunior Barbosa Machado [Fri, 30 Dec 2011 14:30:39 +0000 (14:30 +0000)]
Fixing previous Changelog entry (removing the unnecessary "gdb/testsuite/" line
and adding the missing period)

12 years ago2011-12-30 Edjunior Machado <emachado@linux.vnet.ibm.com>
Edjunior Barbosa Machado [Fri, 30 Dec 2011 14:11:57 +0000 (14:11 +0000)]
2011-12-30  Edjunior Machado  <emachado@linux.vnet.ibm.com>

gdb/testsuite/
* gdb.python/py-finish-breakpoint.exp: Add `.' prefix for ppc64
* gdb.python/py-finish-breakpoint2.exp: Skip testcase if python support
is not enabled.

12 years agosim: cr16: add ifdefs around undefined syscalls
Mike Frysinger [Fri, 30 Dec 2011 09:12:36 +0000 (09:12 +0000)]
sim: cr16: add ifdefs around undefined syscalls

The cr16 libgloss port does not define these syscall numbers, so trying
to use them results in build failures [1].  The cr16 code already uses
ifdefs around a bunch of syscalls, so extend that style to cover the
ones that are currently missing.  Now we can at least compile.

[1] http://sourceware.org/ml/gdb-patches/2011-06/msg00118.html
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years ago*** empty log message ***
gdbadmin [Fri, 30 Dec 2011 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Thu, 29 Dec 2011 23:00:07 +0000 (23:00 +0000)]
daily update

12 years agoadjust mach-o default GAS sections.
Iain Sandoe [Thu, 29 Dec 2011 10:53:10 +0000 (10:53 +0000)]
adjust mach-o default GAS sections.

gas:

* as.c (perform_an_assembly_pass): Do not create text, data and bss
sections for MACH-O.  Do not switch to the text section.
* config/obj-macho.c (obj_mach_o_segT_from_bfd_name): Forward decl.
(mach_o_begin): Startup with only text section unless suppressed.
* config/obj-macho.h (obj_begin): define to mach_o_begin ().

gas/testsuite:

* gas/mach-o/sections-1.d: Amend to recognize that bss is not emitted
by default.
* gas/mach-o/sections-2.d: New.

12 years ago * dwarf.c (read_and_display_attr_value): Handle DW_LANG_Go.
Ian Lance Taylor [Thu, 29 Dec 2011 01:53:00 +0000 (01:53 +0000)]
* dwarf.c (read_and_display_attr_value): Handle DW_LANG_Go.

12 years ago*** empty log message ***
gdbadmin [Thu, 29 Dec 2011 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Wed, 28 Dec 2011 23:00:08 +0000 (23:00 +0000)]
daily update

12 years agogdb/
Jan Kratochvil [Wed, 28 Dec 2011 18:45:46 +0000 (18:45 +0000)]
gdb/
* gdbarch.sh (max_insn_length): Extend the comment by unit.
* gdbarch.h: Regenerate.

12 years agovarobj.c:varobj_update minor reformatting
Joel Brobecker [Wed, 28 Dec 2011 07:05:20 +0000 (07:05 +0000)]
varobj.c:varobj_update minor reformatting

gdb/ChangeLog:

        * varobj.c (varobj_update): Minor reformatting, putting the function
        name at the start of the next line.

12 years ago*** empty log message ***
gdbadmin [Wed, 28 Dec 2011 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago * dwarf2read.c (struct dwarf2_cu): Delete members first_fn, last_fn,
Doug Evans [Tue, 27 Dec 2011 23:41:59 +0000 (23:41 +0000)]
* dwarf2read.c (struct dwarf2_cu): Delete members first_fn, last_fn,
cached_fn.
(struct function_range): Delete.
(initialize_cu_func_list, add_to_cu_func_list): Delete.  All callers
updated.
(check_cu_functions): Ditto.

12 years agodaily update
Alan Modra [Tue, 27 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update

12 years ago2011-12-27 Mark Kettenis <kettenis@gnu.org>
Mark Kettenis [Tue, 27 Dec 2011 21:36:40 +0000 (21:36 +0000)]
2011-12-27  Mark Kettenis  <kettenis@gnu.org>

       * inf-ptrace.c [PT_IO && PIOD_READ_AUXV]
       (inf_ptrace_xfer_partial): Implement TARGET_OBJECT_AUXV.
       (inf_ptrace_auxv_parse): New function.
       (inf_ptrace_target): Initialize to_auxv_parse field.

12 years agogdb/testsuite/
Jan Kratochvil [Tue, 27 Dec 2011 21:29:41 +0000 (21:29 +0000)]
gdb/testsuite/
* gdb.python/py-finish-breakpoint.c (test_exec_exit): Change the
parameter to self_exec, adjust the function.
(main): Check for argv[1] "exit".  Use argv[0] for test_exec_exit.
* gdb.python/py-finish-breakpoint.exp (set var self_exec = 0): New test.
(set var do_exit = 0): Remove test.
(newline at end of file): Add one.

12 years agoNew function ada-lang.c:should_use_wild_match...
Joel Brobecker [Tue, 27 Dec 2011 04:17:55 +0000 (04:17 +0000)]
New function ada-lang.c:should_use_wild_match...

... to avoid code duplication.

gdb/ChangeLog:

        * ada-lang.c (should_use_wild_match): New function.
        (ada_lookup_simple_minsym): Use should_use_wild_match.
        Minor simplification.  Add comment.
        (ada_lookup_symbol_list): Use should_use_wild_match.
        Minor simplification.

12 years agoremove use of sprintf in py-finishbreakpoint.c...
Joel Brobecker [Tue, 27 Dec 2011 04:12:10 +0000 (04:12 +0000)]
remove use of sprintf in py-finishbreakpoint.c...

... and replace it with call to xsnprintf, following GDB's coding rules.

gdb/ChangeLog:

        * py-finishbreakpoint.c (bpfinishpy_init): Replace call to
        sprintf by call to xsnprintf.

12 years agoIgnore data minimal symbols for breakpoint linespecs
Joel Brobecker [Tue, 27 Dec 2011 04:07:04 +0000 (04:07 +0000)]
Ignore data minimal symbols for breakpoint linespecs

gdb/ChangeLog:

        * linespec.c (struct collect_minsyms) [list_mode]: New field.
        (add_minsym): Ignore data symbols if not in list mode.
        (search_minsyms_for_name): Set local.list_mode.

gdb/testsuite/ChangeLog:

        * gdb.base/dmsym.c, gdb.base/dmsym_main.c, gdb.base/dmsym.exp:
        New files.

12 years agoImprove gdb_realpath for Windows hosts
Joel Brobecker [Tue, 27 Dec 2011 04:03:58 +0000 (04:03 +0000)]
Improve gdb_realpath for Windows hosts

On Windows hosts, gdb_realpath is just an xstrdup. This makes filename
comparisons on Windows very chancy. Normally, we would normalize both
paths, and then compare.  But since the normalization doesn't do
anything, two equivalent names on Windows might not match.  This can
happen when trying to insert a breakpoint using the fullpath of a file.
For instance, if the compiler generated debug info that says that
the compilation directory is: `c:\\some\\double\\slashes\\dir', then
trying to insert a breakpoint on `c:/some/double/slashes/dir/foo.c:4'
does not work:

    (gdb) b c:/some/double/slashes/dir/foo.c:4
    No source file named c:/some/double/slashes/dir/foo.c:4.
    (gdb) b c:\some\double\slashes\dir\foo.c:4
    No source file named c:\some\double\slashes\dir\foo.c:4.

This fixes the problem by enhancing gdb_realpath on Windows hosts.
The code is inspired from libiberty's lrealpath.

gdb/ChangeLog:

        * utils.c (gdb_realpath): Add better support for Windows hosts.

12 years ago*** empty log message ***
gdbadmin [Tue, 27 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years agodaily update
Alan Modra [Mon, 26 Dec 2011 23:00:06 +0000 (23:00 +0000)]
daily update

12 years agogdb/testsuite/
Jan Kratochvil [Mon, 26 Dec 2011 21:37:17 +0000 (21:37 +0000)]
gdb/testsuite/
Fix racy FAILs.
* gdb.threads/fork-thread-pending.c (barrier): New variable.
(thread_function, thread_forker): Call pthread_barrier_wait for it.
(main): Call pthread_barrier_init for it.

12 years agogdb/testsuite/
Jan Kratochvil [Mon, 26 Dec 2011 11:24:55 +0000 (11:24 +0000)]
gdb/testsuite/
Fix double send_gdb leading to racy FAILs.
* gdb.base/break.exp (set silent break bp_location1): Replace
3x send_gdb and gdb_expect by gdb_test.
* gdb.base/fileio.exp: Replace 2x send_gdb by gdb_exit and sleep.
* gdb.base/foll-vfork.exp (vfork_and_exec_child_follow_to_main_bp)
(vfork_and_exec_child_follow_through_step): Use gdb_test_no_output
instead of send_gdb.  Twice.
* gdb.base/sepdebug.exp (set silent break bp_location1): Replace
3x send_gdb and gdb_expect by gdb_test.
* gdb.mi/mi-nsmoribund.exp: Replace 3x send_gdb by mi_gdb_test.

12 years ago*** empty log message ***
gdbadmin [Mon, 26 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago*** empty log message ***
gdbadmin [Sun, 25 Dec 2011 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

12 years agogdb/testsuite/
Jan Kratochvil [Sat, 24 Dec 2011 23:54:20 +0000 (23:54 +0000)]
gdb/testsuite/
* gdb.linespec/linespec.exp: Compile using {c++}.

12 years agobfd/
Jan Kratochvil [Sat, 24 Dec 2011 16:31:39 +0000 (16:31 +0000)]
bfd/
* elf32-rl78.c (rl78_elf_relocate_section, rl78_dump_symtab)
(rl78_elf_relax_section): Remove debug prints.

12 years ago*** empty log message ***
gdbadmin [Sat, 24 Dec 2011 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***

12 years agobfd/
Jan Kratochvil [Fri, 23 Dec 2011 21:24:25 +0000 (21:24 +0000)]
bfd/
* elf32-rl78.c (rl78_elf_relocate_section, rl78_elf_relax_section): Use
BFD_VMA_FMT.

12 years agobfd/
Jan Kratochvil [Fri, 23 Dec 2011 20:17:59 +0000 (20:17 +0000)]
bfd/
* elf32-rl78.c (prev_alignment, sec_start): Remove unused variables.

12 years agogdb/testsuite/
Jan Kratochvil [Fri, 23 Dec 2011 18:01:26 +0000 (18:01 +0000)]
gdb/testsuite/
* gdb.cp/templates.exp (test_template_typedef): Import gdb_prompt.
(print destructor of template typedef): Extend it for gcc/51668 XFAIL.
(verify GCC PR debug/51668): New test.

12 years ago Introduce gdb.FinishBreakpoint in Python
Kevin Pouget [Fri, 23 Dec 2011 17:06:16 +0000 (17:06 +0000)]
Introduce gdb.FinishBreakpoint in Python

* Makefile.in (SUBDIR_PYTHON_OBS): Add py-finishbreakpoint.o.
(SUBDIR_PYTHON_SRCS): Add python/py-finishbreakpoint.c.
Add build rule for this file.
* infcmd.c (print_return_value): Split to create get_return_value.
(get_return_value): New function based on print_return_value. Handle
case where stop_registers are not set.
* inferior.h (get_return_value): New prototype.
* python/py-breakpoint.c (bppy_pending_object): Make non-static.
(gdbpy_breakpoint_created): Set is_py_finish_bp is necessary.
(struct breakpoint_object): Move to python-internal.h
(BPPY_REQUIRE_VALID): Likewise.
(BPPY_SET_REQUIRE_VALID): Likewise.
(gdbpy_breakpoint_created): Initialize is_finish_bp.
(gdbpy_should_stop): Add  pre/post hooks before/after calling stop
method.
* python/python-internal.h (breakpoint_object_type): Add as extern.
(bppy_pending_object): Likewise.
(typedef struct breakpoint_object) Removed.
(struct breakpoint_object): Moved from py-breakpoint.c.
Add field is_finish_bp.
(BPPY_REQUIRE_VALID): Moved from py-breakpoint.c.
(BPPY_SET_REQUIRE_VALID): Likewise.
(frame_object_to_frame_info): New prototype.
(gdbpy_initialize_finishbreakpoints): New prototype.
(bpfinishpy_is_finish_bp): Likewise.
(bpfinishpy_pre_stop_hook): Likewise.
(bpfinishpy_post_stop_hook): Likewise.
* python/py-finishbreakpoint.c: New file.
* python/py-frame.c(frame_object_to_frame_info): Make non-static and
accept PyObject instead of frame_object.
(frapy_is_valid): Don't cast to frame_object.
(frapy_name): Likewise.
(frapy_type): Likewise.
(frapy_unwind_stop_reason): Likewise.
(frapy_pc): Likewise.
(frapy_block): Likewise.
(frapy_function): Likewise.
(frapy_older): Likewise.
(frapy_newer): Likewise.
(frapy_find_sal): Likewise.
(frapy_read_var): Likewise.
(frapy_select): Likewise.
* python/python.c (gdbpy_is_stopped_at_finish_bp): New noop function.
(_initialize_python): Add gdbpy_initialize_finishbreakpoints.
* python/python.h: Include breakpoint.h
(gdbpy_is_stopped_at_finish_bp): New prototype.

doc/
* gdb.texinfo (Finish Breakpoints in Python): New subsection.
(Python API): Add menu entry for Finish Breakpoints.

testsuite/
* Makefile.in (EXECUTABLES): Add py-finish-breakpoint and
py-finish-breakpoint2
(MISCALLANEOUS): Add py-events-shlib.so and py-events-shlib-nodebug.so
* gdb.python/py-breakpoint.exp (mult_line): Define and use variable
instead of line number.
* gdb.python/py-finish-breakpoint.c: New file.
* gdb.python/py-finish-breakpoint.exp: New file.
* gdb.python/py-finish-breakpoint.py: New file.
* gdb.python/py-finish-breakpoint2.cc: New file.
* gdb.python/py-finish-breakpoint2.exp: New file.
* gdb.python/py-finish-breakpoint2.py: New file.

12 years agogdb/testsuite/
Jan Kratochvil [Fri, 23 Dec 2011 14:57:39 +0000 (14:57 +0000)]
gdb/testsuite/
Fix compatibility with gcc-4.7.
* gdb.python/py-frame-inline.c (f): Use inline for __always_inline__.

12 years agogdb/testsuite/
Jan Kratochvil [Fri, 23 Dec 2011 14:49:54 +0000 (14:49 +0000)]
gdb/testsuite/
Partial fix of compatibility with gcc-4.7.
* gdb.cp/templates.exp (ptype T5<int>, ptype t5i): Turn all PASS cases
into XFAIL "new without size_t".  Permit size_t for the KFAIL case.
Add comment to add a PASS case in the future.

12 years ago2011-12-23 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 23 Dec 2011 09:23:31 +0000 (09:23 +0000)]
2011-12-23  Tristan Gingold  <gingold@adacore.com>

* vms-lib.c (vms_traverse_index): Move pointer update code.

12 years ago[bfd]
DJ Delorie [Fri, 23 Dec 2011 01:49:37 +0000 (01:49 +0000)]
[bfd]
* elf32-rl78.c (rl78_elf_howto_table): Add R_RL78_RH_RELAX.
(rl78_reloc_map): Add BFD_RELOC_RL78_RELAX.
(rl78_elf_relocate_section): Add R_RL78_RH_RELAX, R_RL78_RH_SFR,
and R_RL78_RH_SADDR.
(rl78_elf_finish_dynamic_sections): Only validate PLT section if
we didn't relax anything, as relaxing might remove a PLT reference
after we've set up the table.
(elf32_rl78_relax_delete_bytes): New.
(reloc_bubblesort): New.
(rl78_offset_for_reloc): New.
(relax_addr16): New.
(rl78_elf_relax_section): Add support for relaxing long
instructions into short ones.

[gas]
* config/rl78-defs.h (rl78_linkrelax_addr16): Add.
(rl78_linkrelax_dsp, rl78_linkrelax_imm): Remove.
* config/rl78-parse.y: Tag all addr16 and branch patterns with
relaxation markers.
* config/tc-rl78.c (rl78_linkrelax_addr16): New.
(rl78_linkrelax_branch): New.
(OPTION_RELAX): New.
(md_longopts): Add relax option.
(md_parse_option): Add OPTION_RELAX.
(rl78_frag_init): Support relaxation.
(rl78_handle_align): New.
(md_assemble): Support relaxation.
(md_apply_fix): Likewise.
(md_convert_frag): Likewise.
* config/tc-rl78.h (MAX_MEM_FOR_RS_ALIGN_CODE): New.
(HANDLE_ALIGN): New.
(rl78_handle_align): Declare.

* config/rl78-parse.y (rl78_bit_insn): New.  Set it for all bit
insn patterns.
(find_bit_index): New.  Strip .BIT suffix off relevent
expressions for bit insns.
(rl78_lex): Exclude bit suffixes from expression parsing.

[include/elf]
* rl78.h (R_RL78_RH_RELAX, R_RL78_RH_SFR, R_RL78_RH_SADDR): New.
(RL78_RELAXA_BRA, RL78_RELAXA_ADDR16: New.

12 years ago*** empty log message ***
gdbadmin [Fri, 23 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago PR python/12533:
Tom Tromey [Thu, 22 Dec 2011 19:51:10 +0000 (19:51 +0000)]
PR python/12533:
* value.h (release_value_or_incref): Declare.
* value.c (struct value) <released>: New field.
(free_all_values, release_value, value_release_to_mark): Update
'released'.
(release_value_or_incref): New function.
* python/py-value.c (valpy_new): Use release_value_or_incref.
(value_to_value_object): Likewise.
* varobj.c (install_new_value): Move value_incref earlier.

12 years ago * value.c (struct value) <modifiable, lazy, optimized_out,
Tom Tromey [Thu, 22 Dec 2011 19:41:59 +0000 (19:41 +0000)]
* value.c (struct value) <modifiable, lazy, optimized_out,
initialized, stack>: Now bitfields.  Move to top.
<reference_count>: Move earlier.

12 years ago2011-12-22 Martin Schwidefsky <schwidefsky@de.ibm.com>
Martin Schwidefsky [Thu, 22 Dec 2011 15:00:44 +0000 (15:00 +0000)]
2011-12-22  Martin Schwidefsky  <schwidefsky@de.ibm.com>

* elf32-s390.c (elf_s390_relocate_section): Add check for debugging
section in LD to LE linker relaxation for R_390_TLS_LDO32.
* elf64-s390.c (elf_s390_relocate_section): Likewise for
R_390_TLS_LDO64.

12 years ago * minsyms.h: Rearrange. Document header and all functions.
Tom Tromey [Thu, 22 Dec 2011 02:34:34 +0000 (02:34 +0000)]
* minsyms.h: Rearrange.  Document header and all functions.
* minsyms.c: Move some comments to minsyms.h.

12 years ago*** empty log message ***
gdbadmin [Thu, 22 Dec 2011 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years ago * symtab.h: Include minsyms.h.
Tom Tromey [Wed, 21 Dec 2011 21:51:57 +0000 (21:51 +0000)]
* symtab.h: Include minsyms.h.
(prim_record_minimal_symbol, prim_record_minimal_symbol_full)
(prim_record_minimal_symbol_and_info, msymbol_hash_iw)
(msymbol_hash, SYMBOL_HASH_NEXT, msymbol_objfile)
(lookup_minimal_symbol, lookup_minimal_symbol_text)
(lookup_minimal_symbol_solib_trampoline)
(lookup_minimal_symbol_by_pc_name, lookup_minimal_symbol_by_pc)
(iterate_over_minimal_symbols, lookup_minimal_symbol_and_objfile)
(lookup_minimal_symbol_by_pc_section)
(lookup_solib_trampoline_symbol_by_pc)
(init_minimal_symbol_collection)
(make_cleanup_discard_minimal_symbols, install_minimal_symbols)
(msymbols_sort): Move to minsyms.h.
* objfiles.c (terminate_minimal_symbol_table): Move to minsyms.c.
* minsyms.c (terminate_minimal_symbol_table): Move from
objfiles.c.
* minsyms.h: New file.

12 years ago * hppa-hpux-tdep.c (hppa64_hpux_search_dummy_call_sequence): Use
Tom Tromey [Wed, 21 Dec 2011 21:34:25 +0000 (21:34 +0000)]
* hppa-hpux-tdep.c (hppa64_hpux_search_dummy_call_sequence): Use
ALL_OBJFILE_MSYMBOLS.
(hppa_hpux_find_dummy_bpaddr): Likewise.
* jit.c (jit_object_close_impl): Use
terminate_minimal_symbol_table.

12 years ago * elfread.c (elf_symtab_read): Put the filename in the filename
Tom Tromey [Wed, 21 Dec 2011 21:30:31 +0000 (21:30 +0000)]
* elfread.c (elf_symtab_read): Put the filename in the filename
bcache.

12 years ago * symtab.h (struct minimal_symbol) <filename>: Now const.
Tom Tromey [Wed, 21 Dec 2011 21:24:59 +0000 (21:24 +0000)]
* symtab.h (struct minimal_symbol) <filename>: Now const.

12 years ago * elf32-arm.c (elf32_arm_nabi_grok_psinfo): Fill in core_pid.
Ulrich Weigand [Wed, 21 Dec 2011 21:21:16 +0000 (21:21 +0000)]
* elf32-arm.c (elf32_arm_nabi_grok_psinfo): Fill in core_pid.

12 years agogdb/
Ulrich Weigand [Wed, 21 Dec 2011 21:13:15 +0000 (21:13 +0000)]
gdb/
PR tdep/12797
* arm-tdep.c (arm_return_value): Handle complex types.

gdb/testsuite/
PR tdep/12797
* gdb.base/callfuncs.exp: Remove KFAIL.

12 years ago * configure.in (--enable-deterministic-archives): Grok new
Roland McGrath [Wed, 21 Dec 2011 19:39:11 +0000 (19:39 +0000)]
* configure.in (--enable-deterministic-archives): Grok new
argument.  Set DEFAULT_AR_DETERMINISTIC to 1 or 0 accordingly.
* configure: Regenerated.
* config.in: Regenerated.
* ar.c (deterministic): Initialize to -1.
(decode_options, ranlib_main): Grok U option.
(usage, ranlib_usage): Mention U; say for D and U which is the default.
(default_deterministic): New function.
(ranlib_main): Call it.
(main): Likewise.  Make newer_only && deterministic error
non-fatal if it was just DEFAULT_AR_DETERMINISTIC and not the D option.
* doc/binutils.texi (ar cmdline, ranlib): Document U modifier and
--enable-deterministic-archives behavior.

12 years ago PR gas/13449
Nick Clifton [Wed, 21 Dec 2011 17:07:26 +0000 (17:07 +0000)]
PR gas/13449
* config/tc-arm.c (create_unwind_entry): Zero allocated table
entries.

12 years ago* ppc-linux-nat.c (create_watchpoint_request): Only use ranged
Andreas Schwab [Wed, 21 Dec 2011 15:27:29 +0000 (15:27 +0000)]
* ppc-linux-nat.c (create_watchpoint_request): Only use ranged
watchpoints when supported.

12 years agogdb/
Jan Kratochvil [Wed, 21 Dec 2011 14:25:53 +0000 (14:25 +0000)]
gdb/
* symfile.c (objfilep): New typedef and new DEF_VEC_P.
(reread_symbols): Remove variable reread_one, new variables
new_objfiles, all_cleanups and ix.  Use new_objfiles instead of
reread_one.  Push changed objfiles to new_objfiles, call
observer_notify_new_objfile for them later.

12 years agoUse symbol search name in expand_symtabs_matching_via_partial...
Joel Brobecker [Wed, 21 Dec 2011 07:34:09 +0000 (07:34 +0000)]
Use symbol search name in expand_symtabs_matching_via_partial...

We are iterating over all symbols in a partial symtab that would
match a given name, so we should match the partial symbols
search name against the given name rather than using the natural
name.  In C++, that does not make a difference, but it does in
Ada, because Ada searches using the symbol encoded name...

We also update the generation of the .gdb_index file to match this
change in the search. Although technically an incompatible change,
we do not increment the gdb_index version number, because Ada is
the only language where it would make a difference - except that
this feature is not supported for Ada.

gdb/ChangeLog:

        * psymtab.c (expand_symtabs_matching_via_partial): Match
        the partial symbols using their SYMBOL_SEARCH_NAME.
        * symfile.h (struct quick_symbol_functions): Udate the
        documentation of expand_symtabs_matching.
        * dwarf2read.c (write_psymbols): Use SYMBOL_SEARCH_NAME instead
        of SYMBOL_NATURAL_NAME in index entry.

12 years agoAdd handling for unqualified Ada operators in linespecs
Joel Brobecker [Wed, 21 Dec 2011 07:24:40 +0000 (07:24 +0000)]
Add handling for unqualified Ada operators in linespecs

This patch enhances the linespec parser to recognize unqualified
operator names in linespecs. This allows the user to insert a breakpoint
on operator "+" as follow, for instance:

        (gdb) break "+"

Previously, it was possible to insert such a breakpoint, but one
had to fully qualify the function name. For instance:

        (gdb) break ops."+"

gdb/ChangeLog:

        * linespec.c (locate_first_half): Add handling of Ada operators
        when the current language is Ada.

12 years agomissing check against overlay_debugging in objfiles.c
Joel Brobecker [Wed, 21 Dec 2011 07:11:52 +0000 (07:11 +0000)]
missing check against overlay_debugging in objfiles.c

This fixes a problem where the debugger is trying to locate a minimal
symbol from its address, when the symbol is inside a section whose
VMA is different from its LMA.

We have a program that was built on ppc-elf using a linker script
such that data sections are placed in ROM, and then loaded onto RAM
at execution.  So their VMA addresses are indeed different from
their LMA address.

Unfortunately, there is one place where GDB gets slightly confused
into thinking that these data sections are overlayed, while it's
not the case here.  This show up when trying to print the list of
Ada tasks, where GDB is unable to determine their names, and thus
prints a generic `Ravenscar task' instead:

    (gdb) info tasks
       ID       TID P-ID Pri State                  Name
        1     1d580      127 Delay Sleep            Ravenscar task
        2     183f8      127 Delay Sleep            Ravenscar task
    *   3     13268      127 Runnable               Ravenscar task

We expected:

    (gdb) info tasks
       ID       TID P-ID Pri State                  Name
        1     1d580      127 Delay Sleep            environment_task
        2     183f8      127 Delay Sleep            raven2
    *   3     13268      127 Runnable               raven1

The name of the task is determined by looking up the symbol table
using the task ID, which is the address where the symbol is defined.
So, ada-tasks calls...

    msym = lookup_minimal_symbol_by_pc (task_id);

... which in turn first tries to determine the section associated
to this address (find_pc_section), which itself uses a map of sections
to find it. The map itself is recomputed every time objfiles are
loaded/changed by `update_section_map'. And `update_section_map'
relies on `insert_section_p' to determine whether the section should
be inserted in the map or not.

This is where things get interesting for us, because `insert_section_p'
simply rejects overlay sections:

  if (lma != 0 && lma != bfd_section_vma (abfd, section)
      && (bfd_get_file_flags (abfd) & BFD_IN_MEMORY) == 0)
    /* This is an overlay section.  IN_MEMORY check is needed to avoid
       discarding sections from the "system supplied DSO" (aka vdso)
       on some Linux systems (e.g. Fedora 11).  */
    return 0;

However, it shouldn't reject our section in this case, since overlay
debugging is off.  The fix is to add a check that overlay debugging
is active before rejecting the section.  This is similar to what is
done in `section_is_overlay' (which takes obj_section objects), for
instance.

gdb/Changelog:

        * objfiles.c (insert_section_p): Do not detect overlay sections
        if overlay debugging is off.

12 years ago[Ada] Breakpoints on task bodies
Joel Brobecker [Wed, 21 Dec 2011 07:10:59 +0000 (07:10 +0000)]
[Ada] Breakpoints on task bodies

Consider the following declaration:

    package Pck is
       task Dummy_Task is
          entry Start;
       end Dummy_Task;
    end Pck;

Inserting a breakpoint on the body of that task does not currently
work:

    (gdb) b pck.dummy_task
    "pck.dummy_task" is not a function
    Make breakpoint pending on future shared library load? (y or [n]) n

What happens here is that the compiler generates two symbols:

  (a) Symbol `pck__dummy_task' which is a *variable* referencing
      the task;

  (b) Symbol `pck__dummy_taskTKB' which is the subprogram implementing
      the body of the task.

The symbol lookup only finds the variable before of the TKB suffix in
the subprogram name. This patch fixes the problem by adjusting the
ada-lang.c:is_name_suffix routine to recognize "TKB" suffixes.  But
that's not enough, because the search in the symtab is performed via
the block dictionary, using a hashing algorithm. So, for the search
to find `pck__dummy_taskTKB', I had to modify the hashing function
to ignore TKB suffixes as well.

gdb/ChangeLog:

        * ada-lang.c (is_name_suffix): Add handling of "TKB" suffixes.
        Update function documentation.
        * dictionary.c (dict_hash): Ignore "TKB" suffixes in hash
        computation.

gdb/testsuite/ChangeLog:

        * gdb.ada/task_bp: New testcase.

12 years ago*** empty log message ***
gdbadmin [Wed, 21 Dec 2011 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***

12 years agomerge from gcc
DJ Delorie [Tue, 20 Dec 2011 19:02:08 +0000 (19:02 +0000)]
merge from gcc

12 years ago * emulparams/elf32bmip.sh (OTHER_SECTIONS): Put .mdebug.* and
Joseph Myers [Tue, 20 Dec 2011 17:55:24 +0000 (17:55 +0000)]
* emulparams/elf32bmip.sh (OTHER_SECTIONS): Put .mdebug.* and
.gcc_compiled_long* sections at address 0.

12 years agoconfig/:
Andreas Schwab [Tue, 20 Dec 2011 17:01:30 +0000 (17:01 +0000)]
config/:
* warnings.m4 (ACX_PROG_CC_WARNING_OPTS): Avoid leading dash in
expr call.
libdecnumber/:
* configure: Regenerate.
libiberty/:
* configure: Regenerate.

12 years ago2011-12-20 Pedro Alves <alves.ped@gmail.com>
Pedro Alves [Tue, 20 Dec 2011 10:40:15 +0000 (10:40 +0000)]
2011-12-20  Pedro Alves  <alves.ped@gmail.com>
    Jan Kratochvil  <jan.kratochvil@redhat.com>

        * linux-nat.c (add_lwp): Don't call linux_nat_new_thread on the
first LWP.
* amd64-linux-nat.c (update_debug_registers_callback): Instantiate
`lwp->arch_private' if NULL.
(amd64_linux_prepare_to_resume): Do nothing if `lwp->arch_private'
is NULL.
* i386-linux-nat.c (update_debug_registers_callback): Instantiate
`lwp->arch_private' if NULL.
(i386_linux_prepare_to_resume): Do nothing if `lwp->arch_private'
is NULL.

12 years ago * python/py-auto-load.c (info_auto_load_scripts): Pass address of
Doug Evans [Tue, 20 Dec 2011 04:29:35 +0000 (04:29 +0000)]
* python/py-auto-load.c (info_auto_load_scripts): Pass address of
scripts vector to collect_matching_scripts.
(collect_matching_scripts): Update.

12 years ago*** empty log message ***
gdbadmin [Tue, 20 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***

12 years agogdb/
Jan Kratochvil [Mon, 19 Dec 2011 22:20:07 +0000 (22:20 +0000)]
gdb/
* symfile.c (reread_symbols): Move free_objfile_separate_debug,
preserve_values, sym_finish and clear_objfile_data calls before BFD
close.  Move free_objfile_separate_debug as the very first call.  New
comment on the ordering.

gdb/testsuite/
* gdb.base/reread.exp: If srcfile2 fails to build retry it with
-DNO_SECTIONS.
* gdb.base/reread2.c <!NO_SECTIONS>: New sections block.

12 years ago * s390-tdep.c (s390_push_dummy_call): Set addressing mode bit
Ulrich Weigand [Mon, 19 Dec 2011 21:44:57 +0000 (21:44 +0000)]
* s390-tdep.c (s390_push_dummy_call): Set addressing mode bit
in return PSWA.

12 years ago * object.h (Relobj::local_symbol_value): New function.
Ian Lance Taylor [Mon, 19 Dec 2011 21:07:16 +0000 (21:07 +0000)]
* object.h (Relobj::local_symbol_value): New function.
(Relobj::local_plt_offset): New function.
(Relobj::local_has_got_offset): New function.
(Relobj::local_got_offset): New function.
(Relobj::set_local_got_offset): New function.
(Relobj::do_local_symbol_value): New pure virtual function.
(Relobj::do_local_plt_offset): Likewise.
(Relobj::do_local_has_got_offset): Likewise.
(Relobj::do_local_got_offset): Likewise.
(Relobj::do_set_local_got_offset): Likewise.
(Sized_relobj::do_local_has_got_offset): Rename from
local_has_got_offset.
(Sized_relobj::do_local_got_offset): Rename from local_got_offset.
(Sized_relobj::do_set_local_got_offset): Rename from
set_local_got_offset.
(Sized_relobj_file::do_local_plt_offset): Rename from
local_plt_offset.
(Sized_relobj_file::do_local_symbol_value): New function.
* object.cc (Sized_relobj_file::do_local_plt_offset): Rename from
local_plt_offset.
* output.cc (Output_data_got::Got_entry::write): Change object to
Relobj.  Use local_symbol_value.
(Output_data_got::add_global_with_rel): Change rel_dyn to
Output_data_reloc_generic*.  Use add_global_generic.
(Output_data_got::add_global_with_rela): Remove.  Change all
callers to use add_global_with_rel.
(Output_data_got::add_global_pair_with_rel): Change rel_dyn to
Output_data_reloc_generic*.  Use add_global_generic.
(Output_data_got::add_global_pair_with_rela): Remove.  Change all
callers to use add_global_pair_with_rel.
(Output_data_got::add_local): Change object to Relobj*.
(Output_data_got::add_local_plt): Likewise.
(Output_data_got::add_local_with_rel): Change object to Relobj*,
change rel_dyn to Output_data_reloc_generic*.  Use
add_local_generic.
(Output_data_got::add_local_with_rela): Remove.  Change all
callers to use all_local_with_rel.
(Output_data_got::add_local_pair_with_rel): Change object to
Relobj*, change rel_dyn to Output_data_reloc_generic*.  Use
add_output_section_generic.
(Output_data_got::add_local_pair_with_rela): Remove.  Change all
callers to use add_local_pair_with_rel.
(Output_data_got::reserve_local): Change object to Relobj*.
* output.h: (class Output_data_reloc_generic): Add pure virtual
declarations for add_global_generic, add_local_generic,
add_output_section_generic.
(class Output_data_reloc) [SHT_REL, SHT_RELA]: Implement new
functions for Output_data_reloc_generic.  Update declarations for
changes listed in output.cc.
(class Output_data_got): Change template parameter to got_size.
Don't define Rel_dyn or Rela_dyn.  Update declarations per above.
* incremental.h (Sized_relobj_incr::do_local_symbol_value): New
function.
(Sized_relobj_incr::do_local_plt_offset): New function.
* copy-relocs.cc (Copy_relocs::Copy_reloc_entry::emit): Call
add_global_generic.

12 years ago * symtab.h (add_minsym_to_hash_table): Don't declare.
Tom Tromey [Mon, 19 Dec 2011 16:11:14 +0000 (16:11 +0000)]
* symtab.h (add_minsym_to_hash_table): Don't declare.
* minsyms.c (add_minsym_to_hash_table): Now static.

12 years agobfd:
Iain Sandoe [Mon, 19 Dec 2011 15:42:37 +0000 (15:42 +0000)]
bfd:

* mach-o-i386.c (bfd_mach_o_section_type_valid_for_tgt): Define NULL.
* mach-o-target.c (bfd_mach_o_backend_data): Initialize bfd_mach_o_section_type_valid_for_tgt
* mach-o-x86-64.c (bfd_mach_o_section_type_valid_for_x86_64): New.
(bfd_mach_o_section_type_valid_for_tgt): Set to bfd_mach_o_section_type_valid_for_x86_64.
* mach-o.c (bfd_mach_o_section_type_name): Reorder and eliminate dup.
(bfd_mach_o_section_attribute_name): Reorder.
(bfd_mach_o_get_section_type_from_name): If the target has defined a validator for section
types, then use it.
* mach-o.h (bfd_mach_o_get_section_type_from_name): Alter declaration to include the bfd.

gas:

* config/obj-macho.c (obj_mach_o_section): Account for target-dependent section
types.  Improve error handling when wrong section types/attributes are specified.

gas/testsuite:

* gas/mach-o/err-sections-1.s: New.
* gas/mach-o/err-sections-2.s: New.
* gas/mach-o/sections-3.d: New.
* gas/mach-o/sections-3.s: New.