OSDN Git Service

pf3gnuchains/pf3gnuchains4x.git
12 years ago * fhandler_process.cc: Drop unneeded includes.
corinna [Thu, 22 Dec 2011 11:25:44 +0000 (11:25 +0000)]
* fhandler_process.cc: Drop unneeded includes.

12 years ago Throughout use wincap.allocation_granularity instead of getpagesize.
corinna [Thu, 22 Dec 2011 11:02:31 +0000 (11:02 +0000)]
Throughout use wincap.allocation_granularity instead of getpagesize.
Throughout use wincap.page_size instead of getsystempagesize.
Throughout use "status" as variable name to hold NTSTATUS values.
* fhandler_mem.cc: Check for NT_SUCCESS rather than for STATUS_SUCCESS.
Fix debug_printf output.  Rectify long statements.  Fix comment
formatting.
* fhandler_proc.cc: Ditto.
(format_proc_swaps): Drop useless test for ERROR_PROC_NOT_FOUND.
* fhandler_process.cc: Ditto as in fhandler_mem.cc.
(get_process_state): Rearrange allocation loop.  Use malloc/realloc.
(get_mem_values): Fix potential NULL pointer usage.  Drop unused
variable.
* pinfo.cc (winpids::enum_processes): Handle low memory gracefully.
* sec_auth.cc (get_priv_list): Drop local variable ret.
* shared.cc (memory_init): Drop outdated call to getpagesize.
* syscalls.cc (getsystempagesize): Remove.
* sysconf.cc: Check for NT_SUCCESS rather than for STATUS_SUCCESS.
(sysinfo): Constify sizeof_stodi.  Drop useless test for
ERROR_PROC_NOT_FOUND.
* thread.cc (pthread_getattr_np): Cast pointers to uintptr_t rather
than to int for pointer arithmetic.
* winsup.h (getsystempagesize): Drop declaration.

12 years ago * minsyms.h: Rearrange. Document header and all functions.
tromey [Thu, 22 Dec 2011 02:34:31 +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.
tromey [Wed, 21 Dec 2011 21:51:55 +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
tromey [Wed, 21 Dec 2011 21:34:24 +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
tromey [Wed, 21 Dec 2011 21:30:28 +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.
tromey [Wed, 21 Dec 2011 21:24:58 +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.
uweigand [Wed, 21 Dec 2011 21:21:15 +0000 (21:21 +0000)]
* elf32-arm.c (elf32_arm_nabi_grok_psinfo): Fill in core_pid.

12 years agogdb/
uweigand [Wed, 21 Dec 2011 21:13:14 +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 [Wed, 21 Dec 2011 19:39:10 +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* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use correct value in
cgf [Wed, 21 Dec 2011 18:34:57 +0000 (18:34 +0000)]
* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use correct value in
switch statement.

12 years ago * dcrt0.cc (_dll_crt0): Rephrase comments. Set $ebp to NULL, as in
corinna [Wed, 21 Dec 2011 17:19:45 +0000 (17:19 +0000)]
* dcrt0.cc (_dll_crt0): Rephrase comments.  Set $ebp to NULL, as in
the pthread stack setup.
* wow64.cc (wow64_revert_to_original_stack): Rephrase some comments.
Return _tlsbase-16 rather than _main_tls-4 so as not to waste stack.

12 years ago PR gas/13449
nickc [Wed, 21 Dec 2011 17:07:21 +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
schwab [Wed, 21 Dec 2011 15:27:27 +0000 (15:27 +0000)]
* ppc-linux-nat.c (create_watchpoint_request): Only use ranged
watchpoints when supported.

12 years agogdb/
jkratoch [Wed, 21 Dec 2011 14:25:45 +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...
brobecke [Wed, 21 Dec 2011 07:34:05 +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
brobecke [Wed, 21 Dec 2011 07:24:38 +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
brobecke [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
brobecke [Wed, 21 Dec 2011 07:10:53 +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 [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
jsm28 [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/:
schwab [Tue, 20 Dec 2011 17:01:29 +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>
palves [Tue, 20 Dec 2011 10:40:10 +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 * fvwrite.c (__sfvwrite_r): Set __SMBF flag to avoid double free in
corinna [Tue, 20 Dec 2011 09:06:57 +0000 (09:06 +0000)]
* fvwrite.c (__sfvwrite_r): Set __SMBF flag to avoid double free in
fclose.  Enhance comment.

12 years ago * python/py-auto-load.c (info_auto_load_scripts): Pass address of
devans [Tue, 20 Dec 2011 04:29:33 +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/
jkratoch [Mon, 19 Dec 2011 22:20:05 +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 ago2011-12-19 Jeff Johnston <jjohnstn@redhat.com>
jjohnstn [Mon, 19 Dec 2011 22:03:17 +0000 (22:03 +0000)]
2011-12-19  Jeff Johnston  <jjohnstn@redhat.com>

        * NEWS: Update with 1.20.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 1.20.0.
        * aclocal.m4: Regenerated.
        * configure: Ditto.
        * Makefile.in: Regenerated.
        * doc/aclocal.m4: Ditto.
        * doc/configure: Ditto.
        * libc/*/aclocal.m4: Ditto.
        * libc/*/configure: Ditto.
        * libc/libc.texinfo: Ditto.
        * libm/*/aclocal.m4: Ditto.
        * libm/*/configure: Ditto.
        * libm/libm.texinfo: Ditto.
        * libc/sys/linux/shared.ld: Add VERS_1.20

12 years ago * s390-tdep.c (s390_push_dummy_call): Set addressing mode bit
uweigand [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 [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 * syscalls.cc (rename): Fix typo in comment. Fix condition to handle
corinna [Mon, 19 Dec 2011 17:01:35 +0000 (17:01 +0000)]
* syscalls.cc (rename): Fix typo in comment.  Fix condition to handle
the case oldpath is no .lnk symlink and newpath points to an existing
.lnk symlink or .exe file and no explicit .lnk suffix has been given
in oldpath.  Add a comment to explain.

12 years ago * symtab.h (add_minsym_to_hash_table): Don't declare.
tromey [Mon, 19 Dec 2011 16:11:07 +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:
iains [Mon, 19 Dec 2011 15:42:34 +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.

12 years agogdb/testsuite/
jkratoch [Mon, 19 Dec 2011 13:42:49 +0000 (13:42 +0000)]
gdb/testsuite/
* gdb.cp/ptype-cv-cp.exp (ptype v_volatile_const_my_int): Make
PR gcc/45997 XFAIL conditional for gcc <= 4.5.
* gdb.python/py-type.exp (python print ttype.template_argument(2)):
Change PR gcc/41736 to the more specific PR gcc/46955.  Make it
conditional for gcc <= 4.5.

12 years agogdb/doc/
jkratoch [Mon, 19 Dec 2011 13:37:32 +0000 (13:37 +0000)]
gdb/doc/
* gdbint.texinfo (Testsuite): Describe KFAIL and XFAIL in Writing
tests.

gdb/testsuite/
* gdb.cp/ptype-cv-cp.exp (ptype v_volatile_const_my_int): Replace KFAIL
by XFAIL.
* gdb.cp/static-method.exp (info addr A::func())
(list static-method.cc:xxx::(anonymous namespace)::A::func)
(list 'static-method.cc:xxx::(anonymous namespace)::A::func')
(list 'static-method.cc':'xxx::(anonymous namespace)::A::func')
(list static-method.cc:'xxx::(anonymous namespace)::A::func'): Likewise.
* gdb.cp/temargs.exp (test value of F in k2_m, test type of F in k3_m)
(test value of F in k3_m): Likewise.
* gdb.python/py-type.exp (python print ttype.template_argument(2)):
Likewise.

12 years agoCheck for warning flags without no- prefix
schwab [Mon, 19 Dec 2011 13:20:23 +0000 (13:20 +0000)]
Check for warning flags without no- prefix

config/:
* warnings.m4 (ACX_PROG_CC_WARNING_OPTS)
(ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Run the test without the
no- prefix.
libdecnumber/:
* configure: Regenerate.
libiberty/:
* configure: Regenerate.

12 years ago * dcrt0.cc (dll_crt0_0): Check for wincap.wow64_has_secondary_stack
corinna [Mon, 19 Dec 2011 12:50:32 +0000 (12:50 +0000)]
* dcrt0.cc (dll_crt0_0): Check for wincap.wow64_has_secondary_stack
rather than for wincap.is_wow64.  Accommodate name change from
wow64_has_64bit_parent to wow64_needs_stack_adjustment.  Align comment.
(_dll_crt0): Ditto.
* wincap.h (wincaps::wow64_has_secondary_stack): New element.
* wincap.cc: Implement above element throughout.
(wincapc::init): Set wow64_has_secondary_stack to false on non-64 bit
systems.
* wow64.cc (wow64_needs_stack_adjustment): Rename (hopefully the last
time) from wow64_has_64bit_parent.
(wow64_eval_expected_main_stack): Fix comment to reflect real life.
(wow64_test_for_64bit_parent): Fix comment.
* wow64.h (wow64_needs_stack_adjustment): Accommodate new name.

12 years agogdb/testsuite/
jkratoch [Mon, 19 Dec 2011 10:31:42 +0000 (10:31 +0000)]
gdb/testsuite/
* gdb.threads/attach-stopped.exp (continue (*: attach2 continue))
(*: attach2 stop interrupt, *: attach2, exit leaves process sleeping):
Remove.
* gdb.threads/attachstop-mt.c: Remove.
* gdb.threads/attachstop-mt.exp: Remove.

12 years ago2011-12-19 Chung-Lin Tang <cltang@codesourcery.com>
cltang [Mon, 19 Dec 2011 07:57:59 +0000 (07:57 +0000)]
2011-12-19  Chung-Lin Tang  <cltang@codesourcery.com>

gas/
* config/tc-mips.c (mips_pseudo_table): Add tprelword/tpreldword
entries.
(mips16_percent_op): Add MIPS16 TLS relocation ops.
(md_apply_fix): Add BFD_RELOC_MIPS16_TLS_* switch cases.
(s_tls_rel_directive): Rename from s_dtprel_internal(). Abstract out
directive string and reloc type as function parameters. Update
comments.
(s_dtprelword,s_dtpreldword): Change to use s_tls_rel_directive().
(s_tprelword,s_tpreldword): New functions.

include/
* elf/mips.h (elf_mips_reloc_type): Add R_MIPS16_TLS_* entries.

bfd/
* reloc.c (BFD_RELOC_MIPS16_TLS_GD,BFD_RELOC_MIPS16_TLS_LDM,
BFD_RELOC_MIPS16_TLS_DTPREL_HI16,BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
BFD_RELOC_MIPS16_TLS_GOTTPREL,BFD_RELOC_MIPS16_TLS_TPREL_HI16,
BFD_RELOC_MIPS16_TLS_TPREL_LO16): New relocations for MIPS16 TLS.
* bfd-in2.h (bfd_reloc_code_real): Regenerate.
* libbfd.h (bfd_reloc_code_real_names): Regenerate.
* elf32-mips.c (elf_mips16_howto_table_rel): Add R_MIPS16_TLS_*
entries.
(mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
mappings.
* elfn32-mips.c (elf_mips16_howto_table_rel,
elf_mips16_howto_table_rela): Add R_MIPS16_TLS_* entries.
(mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
mappings.
* elf64-mips.c (mips16_elf64_howto_table_rel,
mips16_elf64_howto_table_rela): Add R_MIPS16_TLS_* entries.
(mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
mappings.
* elfxx-mips.c (TLS_RELOC_P,mips16_reloc_p,
_bfd_mips_elf_check_relocs): Add cases for R_MIPS16_TLS_* relocations.
(tls_gd_reloc_p): Add R_MIPS16_TLS_GD case.
(tls_ldm_reloc_p): Add R_MIPS16_TLS_LDM case.
(tls_gottprel_reloc_p): Add R_MIPS16_TLS_GOTTPREL case.
(mips_elf_calculate_relocation): Add cases for R_MIPS16_TLS_*,
R_MIPS_TLS_DTPREL32/64, and R_MIPS_TLS_TPREL32/64 relocations.

12 years ago2011-12-19 Chung-Lin Tang <cltang@codesourcery.com>
cltang [Mon, 19 Dec 2011 07:31:05 +0000 (07:31 +0000)]
2011-12-19  Chung-Lin Tang  <cltang@codesourcery.com>
    Catherine Moore  <clm@codesourcery.com>
    Sandra Loosemore  <sandra@codesourcery.com>
    Richard Sandiford  <rdsandiford@googlemail.com>

* elfxx-mips.c (mips_elf_local_pic_function_p): Return true when
H is a MIPS16 function with a kept 32-bit stub. Update comments.
(mips_elf_get_la25_target): New function.
(mips_elf_add_la25_intro): Change to use mips_elf_get_la25_target().
(mips_elf_add_la25_stub): Move compute of use_trampoline_p down,
change to use mips_elf_get_la25_target().
(mips_elf_relocation_needs_la25_stub): Add target_is_16_bit_code_p
parameter, add switch case for R_MIPS16_26.
(mips_elf_calculate_relocation): Redirect relocation to point to the
LA25 stub if it exists, instead of the MIPS16 stub. Update arguments
of call to mips_elf_relocation_needs_la25_stub(), don't use la25 stub
for mips16->mips16 calls.
(_bfd_mips_elf_check_relocs): Update arguments of call to
mips_elf_relocation_needs_la25_stub().
(mips_elf_create_la25_stub): Change to use mips_elf_get_la25_target().

12 years agotry ignoring bad PLT entries in ELF symbol tables
brobecke [Mon, 19 Dec 2011 04:36:29 +0000 (04:36 +0000)]
try ignoring bad PLT entries in ELF symbol tables

Comment says it all:

         /* On ia64-hpux, we have discovered that the system linker
            adds undefined symbols with nonzero addresses that cannot
            be right (their address points inside the code of another
            function in the .text section).  This creates problems
            when trying to determine which symbol corresponds to
            a given address.

            We try to detect those buggy symbols by checking which
            section we think they correspond to.  Normally, PLT symbols
            are stored inside their own section, and the typical name
            for that section is ".plt".  So, if there is a ".plt"
            section, and yet the section name of our symbol does not
            start with ".plt", we ignore that symbol.  */

gdb/ChangeLog:

        * elfread.c (elf_symtab_read): Ignore undefined symbols with
        nonzero addresses if they do not correspond to a .plt section
        when one is available in the objfile.

12 years agotry ignoring bad PLT entries in ELF symbol tables
brobecke [Mon, 19 Dec 2011 04:36:20 +0000 (04:36 +0000)]
try ignoring bad PLT entries in ELF symbol tables

Comment says it all:

         /* On ia64-hpux, we have discovered that the system linker
            adds undefined symbols with nonzero addresses that cannot
            be right (their address points inside the code of another
            function in the .text section).  This creates problems
            when trying to determine which symbol corresponds to
            a given address.

            We try to detect those buggy symbols by checking which
            section we think they correspond to.  Normally, PLT symbols
            are stored inside their own section, and the typical name
            for that section is ".plt".  So, if there is a ".plt"
            section, and yet the section name of our symbol does not
            start with ".plt", we ignore that symbol.  */

gdb/ChangeLog:

        * elfread.c (elf_symtab_read): Ignore undefined symbols with
        nonzero addresses if they do not correspond to a .plt section
        when one is available in the objfile.

12 years agoWork around Solaris bourne shell limitation when building the sim
brobecke [Mon, 19 Dec 2011 04:33:38 +0000 (04:33 +0000)]
Work around Solaris bourne shell limitation when building the sim

Building the sim on a sparc-solaris 2.8 machine fails when configured
with no extra sim hardware:

> for hw in  ; do \
>         echo "extern const struct hw_descriptor
>         dv_${hw}_descriptor[];" ; \
>       done >> tmp-hw.h
> echo 'const char version[] = "'"`sed q
> /[...]/../../gdb/version.in`"'";'
> >> version.c-tmp
> /bin/sh: -c: line 1: syntax error near unexpected token `;'
> /bin/sh: -c: line 1: `for hw in  ; do \'
> make[3]: *** [hw-config.h] Error 2

The same thing happens with the version of bash that we got from
Sun as well (which is very old: 2.03.0(1)-release).

The problems comes from the fact that both shells are buggy, and
reject the following script:

    for hw in ; do
      [...]
    done

The above is what sim/common/Makefile.in tries to execute when
generating hw-config.h.

In order to allow users to build out of the box on these machines,
this patch works around this bug.  It does rely on the fact that
none of the tokens in SIM_HW contain whitespaces.

sim/common/ChangeLog:

        * Make-common.in (hw-config.h): Work around bug in Solaris 2.8
        system bourne shell.

12 years agoclarify entry
cgf [Mon, 19 Dec 2011 00:15:24 +0000 (00:15 +0000)]
clarify entry

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

12 years agogdb/gdbserver/
jkratoch [Sun, 18 Dec 2011 20:55:08 +0000 (20:55 +0000)]
gdb/gdbserver/
* linux-low.c (linux_create_inferior): Put empty if clause for write.

Revert:
2011-12-18  Hui Zhu  <teawater@gmail.com>
* linux-low.c (linux_create_inferior): Save return value to ret.

12 years agolibgloss: bfin: add clear_cache_range support (for gcc)
vapier [Sun, 18 Dec 2011 18:41:20 +0000 (18:41 +0000)]
libgloss: bfin: add clear_cache_range support (for gcc)

12 years ago2011-12-18 Hui Zhu <teawater@gmail.com>
teawater [Sun, 18 Dec 2011 15:49:04 +0000 (15:49 +0000)]
2011-12-18  Hui Zhu  <teawater@gmail.com>

* linux-low.c (linux_create_inferior): Save return value to ret.

12 years ago * configure: Regenerate.
ebotcazou [Sun, 18 Dec 2011 10:20:51 +0000 (10:20 +0000)]
* configure: Regenerate.
config/
* acx.m4 (Test for GNAT): Update comment and add quotes in final test.

12 years ago* fhandler.cc (fhandler_base::close): Move setting isclosed() from here to
cgf [Sun, 18 Dec 2011 04:07:47 +0000 (04:07 +0000)]
* fhandler.cc (fhandler_base::close): Move setting isclosed() from here to
closed().
(fhandler_base_overlapped::close): Correct comment.
(fhandler_base_overlapped::destroy_overlapped): Signal overlapped event before
closing it to potentially wake up a waiting thread.
(fhandler_base_overlapped::wait_overlapped): Expand setting of err when closed
to encompass non-signal event.  Test for a cancel event before making
nonblocking decisions.
* syscalls.cc (close): Set closed flag here so that any concurrently executing
functions will be notified ASAP.

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

12 years agoClean up whitespace.
cgf [Sat, 17 Dec 2011 23:39:46 +0000 (23:39 +0000)]
Clean up whitespace.

12 years ago2011-12-17 Cary Coutant <ccoutant@google.com>
ccoutant [Sat, 17 Dec 2011 22:39:52 +0000 (22:39 +0000)]
2011-12-17  Cary Coutant  <ccoutant@google.com>

* dwarf_reader.cc (Sized_dwarf_line_info::read_lines): Add casts.
* resolve.cc (Symbol_table::resolve): Likewise.
* i386.cc (Target_i386::do_code_fill): Use char constants for nop
arrays.
* x86_64.cc (Target_x86_64::do_code_fill): Likewise.

12 years ago* cp-name-parser.y (cp_merge_demangle_parse_infos): Don't use
schwab [Sat, 17 Dec 2011 20:10:56 +0000 (20:10 +0000)]
* cp-name-parser.y (cp_merge_demangle_parse_infos): Don't use
obstack_empty_p.

12 years ago * generic/gdbtk-cmds.c (gdb_listfiles): Update API changes
kseitz [Sat, 17 Dec 2011 19:30:39 +0000 (19:30 +0000)]
* generic/gdbtk-cmds.c (gdb_listfiles): Update API changes
for map_partial_symbol_filenames.
(gdb_get_line_command): Update API changes for decode_line_1 in gdb.
(gdb_get_file_command): Likewise.
(gdb_get_function_command): Likewise.
* generic/gdbtk-stack.c (gdb_get_vars_command): Likewise.
* generic/gdbtk-bp.c (tracepoint_exists): Likewise.
(gdb_find_bp_at_line, gdb_get_breakpoint_info): Update breakpoint
API changes in gdb.

12 years ago* amd64obsd-tdep.c (amd64obsd_init_abi): Don't set
kettenis [Sat, 17 Dec 2011 15:45:55 +0000 (15:45 +0000)]
* amd64obsd-tdep.c (amd64obsd_init_abi): Don't set
regset_from_core_section.
(amd64obsd_core_init_abi): New function that sets
regset_from_core_section.
(_initialize_amd64obsd_tdep): Use amd64obsd_core_init_abi for
traditional core dumps.

12 years ago* gdb.arch/amd64-i386-address.exp: Skip on *-*-openbsd*.
kettenis [Sat, 17 Dec 2011 13:54:50 +0000 (13:54 +0000)]
* gdb.arch/amd64-i386-address.exp: Skip on *-*-openbsd*.

12 years ago* amd64obsd-tdep.c (amd64obsd_sigtramp_p): Detect new signal
kettenis [Sat, 17 Dec 2011 12:22:04 +0000 (12:22 +0000)]
* amd64obsd-tdep.c (amd64obsd_sigtramp_p): Detect new signal
trampoline to be introduced in OpenBSD 5.0.

12 years ago * dcrt0.cc (_dll_crt0): Fix formatting.
corinna [Sat, 17 Dec 2011 10:24:07 +0000 (10:24 +0000)]
* dcrt0.cc (_dll_crt0): Fix formatting.

12 years ago * wow64.cc (wow64_revert_to_original_stack): Fix comment.
corinna [Sat, 17 Dec 2011 10:05:23 +0000 (10:05 +0000)]
* wow64.cc (wow64_revert_to_original_stack): Fix comment.
* wow64.h (wow64_respawn_process): Declare noreturn.

12 years agogdb/
jkratoch [Sat, 17 Dec 2011 09:43:53 +0000 (09:43 +0000)]
gdb/
Fix build regression from the PR threads/10729 fix.
* s390-nat.c (s390_insert_watchpoint, s390_remove_watchpoint): Use LP,
not LP->PTID.

12 years ago* exceptions.cc (set_signal_mask): Remove useless debugging output.
cgf [Sat, 17 Dec 2011 07:01:16 +0000 (07:01 +0000)]
* exceptions.cc (set_signal_mask): Remove useless debugging output.
* fhandler.cc (fhandler_base::write): Ditto.
(fhandler_base_overlapped::close): Cancel any ongoing I/O before closing.
* syscalls.cc (write): Default to always reporting all writes in strace output
via syscall_printf.
* wait.cc (wait4): Fix debugging output.  Use standard syscall leaver output.

12 years ago* mi/mi-main.c (mi_cmd_list_thread_groups): Rename `optind' and
ndreys [Sat, 17 Dec 2011 06:14:44 +0000 (06:14 +0000)]
* mi/mi-main.c (mi_cmd_list_thread_groups): Rename `optind' and
`optarg' to `oind' and `oarg', respectively(-Wshadow).
(mi_cmd_data_read_memory): Ditto.
(mi_cmd_data_read_memory_bytes): Ditto.

12 years ago* mi/mi-getopt.c (mi_getopt): Rename `optind' and `optarg' to
ndreys [Sat, 17 Dec 2011 06:09:54 +0000 (06:09 +0000)]
* mi/mi-getopt.c (mi_getopt): Rename `optind' and `optarg' to
`oind' and `oarg', respectively(-Wshadow).
(mi_valid_noargs): Ditto.

12 years ago* mi/mi-cmd-var.c (print_varobj): Rename `optind' and `optarg' to
ndreys [Sat, 17 Dec 2011 06:06:48 +0000 (06:06 +0000)]
* mi/mi-cmd-var.c (print_varobj): Rename `optind' and `optarg' to
`oind' and `oarg', respectively(-Wshadow).

12 years ago* mi/mi-cmd-target.c (mi_cmd_target_file_get): Rename `optind' and
ndreys [Sat, 17 Dec 2011 06:03:20 +0000 (06:03 +0000)]
* mi/mi-cmd-target.c (mi_cmd_target_file_get): Rename `optind' and
`optarg' to `oind' and `oarg', respectively(-Wshadow).
(mi_cmd_target_file_put): Ditto.
(mi_cmd_target_file_delete): Ditto.

12 years ago* mi/mi-cmd-env.c (mi_cmd_env_path): Rename `optind' and
ndreys [Sat, 17 Dec 2011 05:58:26 +0000 (05:58 +0000)]
* mi/mi-cmd-env.c (mi_cmd_env_path): Rename `optind' and
`optarg' to `oind' and `oarg', respectively(-Wshadow).
(mi_cmd_env_dir): Ditto.

12 years ago* mi/mi-cmd-disas.c (mi_cmd_disassemble): Rename `optind' and `optarg'
ndreys [Sat, 17 Dec 2011 05:53:58 +0000 (05:53 +0000)]
* mi/mi-cmd-disas.c (mi_cmd_disassemble):  Rename `optind' and `optarg'
to `oind' and `oarg', respectively(-Wshadow).

12 years ago* mi/mi-cmd-break.c (mi_cmd_break_insert): Rename `optind' and
ndreys [Sat, 17 Dec 2011 05:49:29 +0000 (05:49 +0000)]
* mi/mi-cmd-break.c (mi_cmd_break_insert): Rename `optind' and
`optparg' to `oind' and `oparg', respectively(-Wshadow).
(mi_cmd_break_watch): Ditto.

12 years agoFix formatting. Fix typo.
cgf [Sat, 17 Dec 2011 00:15:31 +0000 (00:15 +0000)]
Fix formatting.  Fix typo.

12 years agoImplement fhandler reference counting.
cgf [Sat, 17 Dec 2011 00:03:28 +0000 (00:03 +0000)]
Implement fhandler reference counting.
* cygheap.h
(cygheap_fdmanip::release): Make virtual.
(cygheap_fdnew::~cygheap_fdnew): New destructor increments reference count when
fd has been allocated.
(cygheap_fdget::fh): New (old?) field.
(cygheap_fdget::cygheap_fdget): Increment reference count when we've found an
active fd.  Set fh appropriately.
(cygheap_fdget::~cygheap_fdget): Decrement reference count when appropriate.
Delete fh if reference count goes to zero.
(cygheap_fdget::release): New function.  Do more bookkeping on release.
* dtable.cc (dtable::release): Change from void to boolean return.  Only delete
the fhandler when its reference count is <= 0 (this should be a fairly unusual
case).  Return true if fhandler has been deleted.
(cygwin_attach_handle_to_fd): Increment reference count when fh is assigned.
(dtable::init_std_file_from_handle): Ditto.
* dtable.h (dtable::release): Change return to boolean.
* fhandler.cc (fhandler_base::fhandler_base): Set new isclosed flag to false.
Set _refcnt to zero.
(fhandler_base::close): Simplify paranoid debugging output.  Set new isclosed()
flag.
(fhandler_base_overlapped::wait_overlapped): Use isclosed() flag to avoid
querying the exception handle.
* fhandler.h (fhandler_base::_refcnt): New field.
(fhandler_base::refcnt): New function.
(fhandler_base::isclosed): Implement.
(fhandler_base::fhandler_base): Set isclosed to false.
* syscalls.cc: Remove space after function before parentheses for several
strace printfs.
(dup): Add standard strace "leaver" code.
(dup2): Ditto.
(dup3): Ditto.
(remove): Ditto.
(getpid): Ditto.
(getppid): Ditto.
(lseek64): Fix strace debugging to correctly use %R.
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Avoid sending signals to
other processes if we're debugging since it can cause a deadlock with the
calling debugger.
* exceptions.cc (_cygtls::call_signal_handler): Add debugging-only strace
output.

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

12 years ago * output.h (Output_data_reloc_generic::add): Only call
ian [Fri, 16 Dec 2011 23:47:03 +0000 (23:47 +0000)]
* output.h (Output_data_reloc_generic::add): Only call
add_dynamic_reloc if this is a dynamic reloc section.

12 years agodaily update
amodra [Fri, 16 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update

12 years ago * linespec.c (collect_symbols): Call maybe_add_address after
tromey [Fri, 16 Dec 2011 21:39:16 +0000 (21:39 +0000)]
* linespec.c (collect_symbols): Call maybe_add_address after
calling symbol_to_sal.
(minsym_found): Call maybe_add_address here.
(search_minsyms_for_name): Don't call maybe_add_address.

12 years ago * linespec.c (struct collect_info) <objfile>: Remove field.
tromey [Fri, 16 Dec 2011 21:35:56 +0000 (21:35 +0000)]
* linespec.c (struct collect_info) <objfile>: Remove field.
(decode_objc): Update.
(find_method): Update.
(decode_variable): Update.
(struct minsym_and_objfile): New.
(struct collect_minsyms): New.
(classify_mtype): New function.
(compare_msyms): Likewise.
(add_minsym): Likewise.
(check_minsym): Remove.
(search_minsyms_for_name): Sort minsyms and apply only those with
top priority.

12 years ago * cli/cli-cmds.c (filter_sals): Filter out sals with NULL symtab.
tromey [Fri, 16 Dec 2011 21:17:41 +0000 (21:17 +0000)]
* cli/cli-cmds.c (filter_sals): Filter out sals with NULL symtab.

12 years ago2011-12-16 Pedro Alves <pedro@codesourcery.com>
palves [Fri, 16 Dec 2011 20:29:28 +0000 (20:29 +0000)]
2011-12-16  Pedro Alves  <pedro@codesourcery.com>

* inf-loop.c: Include top.h.
(inferior_event_handler): Call check_frame_language.
* top.c (check_frame_language_change): New, factored out from ...
(execute_command): ... this.  Use check_frame_language_change.
* top.h (check_frame_language_change): Declare.

12 years agofix typo in previous entry
devans [Fri, 16 Dec 2011 20:04:35 +0000 (20:04 +0000)]
fix typo in previous entry

12 years ago * boards/native-stdiogdbserver.exp: New file.
devans [Fri, 16 Dec 2011 20:02:04 +0000 (20:02 +0000)]
* boards/native-stdiogdbserver.exp: New file.

12 years ago * windows-nat.c (cygwin_get_dr, cygwin_get_dr7): Add missing
muller [Fri, 16 Dec 2011 19:55:26 +0000 (19:55 +0000)]
* windows-nat.c (cygwin_get_dr, cygwin_get_dr7): Add missing
prototypes.

12 years ago * boards/native-gdbserver.exp: New file.
devans [Fri, 16 Dec 2011 19:37:46 +0000 (19:37 +0000)]
* boards/native-gdbserver.exp: New file.

12 years ago * linux-low.c (linux_create_inferior): If stdio connection,
devans [Fri, 16 Dec 2011 19:10:58 +0000 (19:10 +0000)]
* linux-low.c (linux_create_inferior): If stdio connection,
redirect stdin from /dev/null, stdout to stderr.
* remote-utils.c (remote_is_stdio): New static global.
(remote_connection_is_stdio): New function.
(remote_prepare): Handle stdio connection.
(remote_open): Ditto.
(remote_close): Don't close stdin for stdio connections.
(read_prim,write_prim): New functions.  Replace all calls to
read/write to these.
* server.c (main): Watch for "-" argument.  Move call to
remote_prepare before start_inferior.
* server.h (STDIO_CONNECTION_NAME): New macro.
(remote_connection_is_stdio): Declare.

12 years ago * NEWS: Add entry for stdio gdbserver.
devans [Fri, 16 Dec 2011 19:06:34 +0000 (19:06 +0000)]
* NEWS: Add entry for stdio gdbserver.

gdbserver/
* linux-low.c (linux_create_inferior): If stdio connection,
redirect stdin from /dev/null, stdout to stderr.
* remote-utils.c (remote_is_stdio): New static global.
(remote_connection_is_stdio): New function.
(remote_prepare): Handle stdio connection.
(remote_open): Ditto.
(remote_close): Don't close stdin for stdio connections.
(read_prim,write_prim): New functions.  Replace all calls to
read/write to these.
* server.c (main): Watch for "-" argument.  Move call to
remote_prepare before start_inferior.
* server.h (STDIO_CONNECTION_NAME): New macro.
(remote_connection_is_stdio): Declare.

doc/
* gdb.texinfo (Server): Document -/stdio argument to gdbserver.

testsuite/
* lib/gdbserver-support.exp (gdb_target_cmd): Recognize stdio
gdbserver output.
(gdbserver_default_get_remote_address): New function.
(gdbserver_start): Call gdb,get_remote_address to compute argument
to "target remote" command.

12 years ago * remote-utils.c (prepare_resume_reply): Remove extraneous \n
devans [Fri, 16 Dec 2011 18:45:48 +0000 (18:45 +0000)]
* remote-utils.c (prepare_resume_reply): Remove extraneous \n
in debugging output.

12 years ago * dcrt0.cc (child_info_fork::alloc_stack): Correctly check if the
corinna [Fri, 16 Dec 2011 18:09:40 +0000 (18:09 +0000)]
* dcrt0.cc (child_info_fork::alloc_stack): Correctly check if the
parent stack fits into the child stack.  Align comment.
* wow64.cc (wow64_eval_expected_main_stack): New function to fetch
expected addresses of main thread stack from PE/COFF image header
values.
(wow64_test_for_64bit_parent): Fix comment.  Check current stack
against real expected main thread stack addresses.
(wow64_revert_to_original_stack): Fix and add comments. Check memory
against real expected main thread stack addresses.  Use orignal stack
if reserved area is >= 256K.

12 years ago* gendef (sigdelayed): Remember to pop all of the saved registers.
cgf [Fri, 16 Dec 2011 16:32:24 +0000 (16:32 +0000)]
* gendef (sigdelayed): Remember to pop all of the saved registers.
(sigreturn): Add "leave" label.

12 years ago* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Fix unresolved
cgf [Fri, 16 Dec 2011 16:29:34 +0000 (16:29 +0000)]
* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Fix unresolved
access of wores in successful situations.

12 years ago2011-12-16 Phil Muldoon <pmuldoon@redhat.com>
pmuldoon [Fri, 16 Dec 2011 16:15:46 +0000 (16:15 +0000)]
2011-12-16  Phil Muldoon  <pmuldoon@redhat.com>

        * ChangeLog: Fix path typo.
* doc/ChangeLog: Ditto.

12 years ago2011-12-16 Phil Muldoon <pmuldoon@redhat.com>
pmuldoon [Fri, 16 Dec 2011 15:55:35 +0000 (15:55 +0000)]
2011-12-16  Phil Muldoon  <pmuldoon@redhat.com>

* testsuite/gdb.python/py-function.exp: Change "on" to "full" for
python print-stack.  Add set/show python print-stack
off|full|message tests.

2011-12-16  Phil Muldoon  <pmuldoon@redhat.com>

* python/python.c: Define python_excp_enums.
(eval_python_from_control_command): Do not call gdbpy_print_stack.
(python_command): Ditto.
(gdbpy_print_stack): Rewrite to use new enum constants.
(maint_set_python): Remove function.
(maint_show_python): Ditto.
(_initialize_python): Do not add "maint" commands.  Add "set/show
python print-stack commands".
* NEWS: Update to reflect removal for "maint set/show
print-stack"

2011-12-16  Phil Muldoon  <pmuldoon@redhat.com>

* doc/gdb.texinfo (Python Commands): Remove "maint set/show print
stack".  Add documentation for "set/show python print-stack".

12 years ago2011-12-16 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
gingold [Fri, 16 Dec 2011 13:39:02 +0000 (13:39 +0000)]
2011-12-16  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>

* mach-o-i386.c (TARGET_PRIORITY): Define as 0 (top priority)
* mach-o-target.c (TARGET_NAME): Use TARGET_PRIORITY
* mach-o-x86-64.c (TARGET_PRIORITY): Define as 0 (top priority)
* mach-o.c (bfd_mach_o_header_p): Remove special handling for
mach-o-i386.
(TARGET_PRIORITY) Set 1 for mach-o-be and mach-o-le, and set 0 for
mach-o-fat.

12 years ago * Makefile.in (DLL_OFILES): Add wow64.o.
corinna [Fri, 16 Dec 2011 11:58:03 +0000 (11:58 +0000)]
* Makefile.in (DLL_OFILES): Add wow64.o.
* dcrt0.cc (CYGWIN_GUARD): Drop execute permission for stack, it's
not used for stacks by the OS either.
(child_info_fork::alloc_stack_hard_way): Ditto.
(child_info_fork::alloc_stack): Don't alloc_stack_hard_way under WOW64
if forked from a 64 bit parent.  Set child's StackBase to parent's
StackBase.  Add comments to explain why.
(wow64_respawn): Move to wow64.cc.
(wow64_started_from_native64): Move to wow64.cc.
(respawn_wow64_process): Move to wow64.cc.
(dll_crt0_0): Drop wow64_test_stack_marker and move stack test into
wow64_test_for_64bit_parent function.  Don't return early if WOW64
process has been started from native 64 bit process.
(_dll_crt0): Implement moving stack for WOW64 processes started from
native 64 bit process.
* wow64.cc: New file.
(wow64_has_64bit_parent): Rename from wow64_respawn.
(wow64_test_for_64bit_parent): Rename from wow64_started_from_native64.
Change comment.
(wow64_revert_to_original_stack): New function.
(wow64_respawn_process): Rename from respawn_wow64_process for symmetry.
* wow64.h: New file.

12 years agobinutils/
gingold [Fri, 16 Dec 2011 10:23:01 +0000 (10:23 +0000)]
binutils/
2011-12-16  Tristan Gingold  <gingold@adacore.com>

* od-macho.c: Include mach-o/codesign.h
(OPT_CODESIGN): Define.
(options): Add an entry for codesign.
(mach_o_help): Likewise.
(dump_header): Fix indentation.
(dump_thread): Do not test result of xmalloc.
(bfd_mach_o_cs_magic, bfd_mach_o_cs_hash_type): New.
(dump_code_signature_superblob): New function.
(swap_code_codedirectory_v1_in): Likewise.
(hexdump): Likewise.
(dump_code_signature_codedirectory): Likewise.
(dump_code_signature_blob, dump_code_signature): Likewise.
(dump_load_command): Dump code signature.
(mach_o_dump): Likewise.

include/mach-o/
2011-12-16  Tristan Gingold  <gingold@adacore.com>

* codesign.h: New file.

12 years ago2011-12-15 David Daney <david.daney@cavium.com>
daney [Fri, 16 Dec 2011 06:18:52 +0000 (06:18 +0000)]
2011-12-15  David Daney  <david.daney@cavium.com>
    Nick Clifton <nickc@redhat.com>

* ld-elfvers/vers.exp (picflag): Set to -fpic for mips*-*-* when
using GCC-4.3 or later.
(pic): Set to "yes" for mips*-*-linux*.
* ld-elfvsb/elfvsb.exp: Don't test non-PIC shared libraried on
mips*-*-linux*.
(picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later.
* ld-elfweak/elfweak.exp (picflag): Set to -fpic for mips*-*-*
when using GCC-4.3 or later.
* ld-shared/shared.exp (picflag): Same.
* lib/ld-lib.exp (at_least_gcc_version): New proc.

12 years ago* exceptions.cc (_cygtls::call_signal_handler): Fix debugging to not go to
cgf [Fri, 16 Dec 2011 05:27:12 +0000 (05:27 +0000)]
* exceptions.cc (_cygtls::call_signal_handler): Fix debugging to not go to
console.
* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Add temporary kludge
to work around problem of make closing a handler while it is being read.
* gendef (sigdelayed): Don't call a function if sig has been cleared.
* sigproc.h (cygwait): Simplify slightly.

12 years ago * elf32-am33lin.c (elf32_am33lin_grok_prstatus): Add case
kevinb [Fri, 16 Dec 2011 00:08:04 +0000 (00:08 +0000)]
* elf32-am33lin.c (elf32_am33lin_grok_prstatus): Add case
to correspond to a smaller ELF_NGREG defined by the kernel.

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

12 years agoReplace <64, false> with <size, big_endian>
hjl [Thu, 15 Dec 2011 23:29:24 +0000 (23:29 +0000)]
Replace <64, false> with <size, big_endian>

2011-12-15  H.J. Lu  <hongjiu.lu@intel.com>

PR gold/13505
* target-reloc.h (apply_relocation): Replace <64, false> with
<size, big_endian>.