Commit Graph

78290 Commits

Author SHA1 Message Date
Ulrich Weigand 7d760051ff ChangeLog:
2013-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>

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

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

	PR shlibs/8882
	* gdb.base/corefile.exp: Add a check to assure warning-free
	core-file load.
2013-09-25 11:52:50 +00:00
Doug Evans 020f703635 * objfiles.c (free_objfile): Move comment. 2013-09-25 00:15:30 +00:00
Alan Modra 9d26852e6d daily update 2013-09-25 00:00:04 +00:00
Richard Sandiford 2f9efdfcdb bfd/
2013-09-24  Gregory Fong  <gregory.0xf0@gmail.com>

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

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

	* ld-mips-elf/eh-frame5.d, ld-mips-elf/jalx-2.dd,
	ld-mips-elf/mips-elf.exp, ld-mips-elf/mips16-pic-2.ad,
	ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/pic-and-nonpic-3a.dd,
	ld-mips-elf/pic-and-nonpic-3b.ad, ld-mips-elf/pic-and-nonpic-3b.dd,
	ld-mips-elf/pic-and-nonpic-3b.nd, ld-mips-elf/pic-and-nonpic-4b.ad,
	ld-mips-elf/pic-and-nonpic-4b.nd, ld-mips-elf/pic-and-nonpic-4b.rd,
	ld-mips-elf/pic-and-nonpic-5b.ad, ld-mips-elf/pic-and-nonpic-5b.nd,
	ld-mips-elf/pic-and-nonpic-6-n32.ad,
	ld-mips-elf/pic-and-nonpic-6-n32.dd,
	ld-mips-elf/pic-and-nonpic-6-n32.nd,
	ld-mips-elf/pic-and-nonpic-6-n64.ad,
	ld-mips-elf/pic-and-nonpic-6-n64.dd,
	ld-mips-elf/pic-and-nonpic-6-n64.nd,
	ld-mips-elf/pic-and-nonpic-6-o32.ad,
	ld-mips-elf/pic-and-nonpic-6-o32.dd,
	ld-mips-elf/pic-and-nonpic-6-o32.nd, ld-mips-elf/rel32-n32.d,
	ld-mips-elf/rel32-o32.d, ld-mips-elf/rel64.d,
	ld-mips-elf/tls-multi-got-1.got, ld-mips-elf/tls-multi-got-1.r,
	ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-1.got,
	ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.got,
	ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-3.got,
	ld-mips-elf/tlsdyn-o32.d, ld-mips-elf/tlsdyn-o32.got,
	ld-mips-elf/tlslib-o32-ver.got, ld-mips-elf/tlslib-o32.got: Update
	for removal of _GLOBAL_OFFSET_TABLE_ from .dynsym.
2013-09-24 22:15:38 +00:00
Joel Brobecker 598402f0fe Delete unused ada-exp.y:string_to_operator
This function appears to have been unused since 2004.

gdb/ChangeLog:

        * ada-exp.y (string_to_operator): Delete.
        (dummy_string_to_ada_operator): Delete.
2013-09-24 19:41:35 +00:00
Joel Brobecker 874440b892 Fix name of file in ChangeLog entry (re-implement funcalls on x64-windows) 2013-09-24 17:24:20 +00:00
Joel Brobecker bf4d6c1cfc Revert use of classify callback in i386 gdbarch_tdep.
This is no longer useful, as it was introduced to reuse the funcall
handling code in amd64-tdep.c in the context of x64-windows. But
we have since then changed the implementations to be completely
independent of each other.

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

gdb/ChangeLog:

	Revert:
	* i386-tdep.h (enum amd64_reg_class): New, moved here from
	amd64-tdep.c.
	(struct gdbarch_tdep): Add fields call_dummy_num_integer_regs,
	call_dummy_integer_regs, and classify.
	* amd64-tdep.h (amd64_classify): Add declaration.
	* amd64-tdep.c (amd64_dummy_call_integer_regs): New static constant.
	(amd64_reg_class): Delete, moved to i386-tdep.h.
	(amd64_classify): Make non-static.  Move declaration to amd64-tdep.h.
	Replace call to amd64_classify by call to tdep->classify.
	(amd64_push_arguments): Get the list of registers to use for
	passing integer parameters from the gdbarch tdep structure,
	rather than using a hardcoded one.  Replace calls to amd64_classify
	by calls to tdep->classify.
	(amd64_push_dummy_call): Get the register number used for
	the "hidden" argument from tdep->call_dummy_integer_regs.
	(amd64_init_abi): Initialize tdep->call_dummy_num_integer_regs
	and tdep->call_dummy_integer_regs.  Set tdep->classify.
2013-09-24 16:14:15 +00:00
Joel Brobecker 849e975504 Revert use of memory_args_by_pointer in i386 gdbarch_tdep.
This is no longer useful, as it was introduced to reuse the funcall
handling code in amd64-tdep.c in the context of x64-windows. But
we have since then changed the implementations to be completely
independent of each other.

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

gdb/ChangeLog:

        Revert:
        * i386-tdep.h (gdbarch_tdep): Add field memory_args_by_pointer.
        * amd64-tdep.c (amd64_push_arguments): Add handling of architectures
        where tdep->memory_args_by_pointer is non-zero.
2013-09-24 16:13:58 +00:00
Joel Brobecker c1459fd652 Revert use of integer_param_regs_saved_in_caller_frame in i386 gdbarch_tdep.
This is no longer useful, as it was introduced to reuse the funcall
handling code in amd64-tdep.c in the context of x64-windows. But
we have since then changed the implementations to be completely
independent of each other.

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

gdb/ChangeLog:

        Revert:
        * i386-tdep.h (struct gdbarch_tdep): Add new field
        integer_param_regs_saved_in_caller_frame.
        * amd64-tdep.c (amd64_push_dummy_call): Allocate some memory on
        stack if tdep->integer_param_regs_saved_in_caller_frame is set.
2013-09-24 16:13:49 +00:00
Joel Brobecker 20c2e3e0a3 Reimplement function calls on amd64-windows
This patch provides a standalone implementation of function calls
on amd64-windows, instead of providing some bits and pieces hooking
into the function call implementation meant for sysV (in amd64-tdep).
It makes better sense to do it this way, because the two ABIs are
actually very different; for instance, the concept of argument
classification, which is so central in the sysV ABI and drove the
the implementation in amd64-tdep, makes no sense for Windows. It
is therefore better for the Windows implementation to be completely
separate, rather than rely on adaptations of the sysV implementation.

gdb/ChangeLog:

        * amd64-tdep.c: #include "value.h"
        (amd64_windows_classify): Delete.
        (amd64_windows_passed_by_integer_register)
        (amd64_windows_passed_by_xmm_register)
        (amd64_windows_passed_by_pointer)
        (amd64_windows_adjust_args_passed_by_pointer)
        (amd64_windows_store_arg_in_reg, amd64_windows_push_arguments)
        (amd64_windows_push_dummy_call): New functions.
        (amd64_windows_init_abi): Remove setting of
        tdep->call_dummy_num_integer_regs, tdep->call_dummy_integer_regs,
        tdep->classify, tdep->memory_args_by_pointer and
        tdep->integer_param_regs_saved_in_caller_frame.
        Add call to set_gdbarch_push_dummy_call.
2013-09-24 16:13:40 +00:00
Pierre Muller cd5f70ffce * readline.c (bind_arrow_keys_internal):
Handle VK_HOME, VK_END, VK_DELETE and VK_INSERT for mingw
	hosts.
2013-09-24 14:49:48 +00:00
Joel Brobecker 3ee2c4af0f Fix last entry in ChangeLog.gdb (unnecessary dir name). 2013-09-24 14:13:20 +00:00
Jan Kratochvil 82bf32bc61 Support .dwp with the name of symlinked binary file
gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

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

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

	* gdb.dwarf2/dwp-symlink.c: New file.
	* gdb.dwarf2/dwp-symlink.exp: New file.
2013-09-24 14:03:43 +00:00
Jan Kratochvil 24ba069af8 Keep objfile original filename
gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Pass down original filename for objfile.
	* coffread.c (coff_symfile_read): Update symbol_file_add_separate call.
	* elfread.c (elf_symfile_read): Likewise.
	* jit.c (jit_object_close_impl): Update allocate_objfile call, no
	longer set ORIGINAL_NAME.
	(jit_bfd_try_read_symtab): Update symbol_file_add_from_bfd call.
	* jv-lang.c (get_dynamics_objfile): Update allocate_objfile call.
	* machoread.c (macho_add_oso_symfile): Add parameter name.  Update
	symbol_file_add_from_bfd call.
	(macho_symfile_read_all_oso): Update two macho_add_oso_symfile calls.
	(macho_check_dsym): Add parameter filenamep.  Change function comment.
	Set *filenamep.
	(macho_symfile_read): New variable dsym_filename.  Update
	macho_check_dsym call.  Use it for symbol_file_add_separate.
	* objfiles.c (allocate_objfile): Add parameter name.  New comment for
	it.  Use it for objfile->original_name.
	(objfile_name): Return OBFD's filename, if available.
	* objfiles.h (allocate_objfile): Add new parameter name.
	* solib.c (solib_read_symbols): Update symbol_file_add_from_bfd call.
	* symfile-mem.c (symbol_file_add_from_memory): Update
	symbol_file_add_from_bfd call.
	* symfile.c (read_symbols): Update symbol_file_add_separate call, new
	comment for it.
	(symbol_file_add_with_addrs): New parameter name, add function comment
	for it.  Remove variable name.  Update allocate_objfile call.
	(symbol_file_add_separate): New parameter name, add function comment
	for it.  Update symbol_file_add_with_addrs call.
	(symbol_file_add_from_bfd): New parameter name.  Update
	symbol_file_add_with_addrs call.
	(symbol_file_add): Update symbol_file_add_from_bfd call.
	(reread_symbols): New variable original_name.  Save
	objfile->original_name by it.
	* symfile.h (symbol_file_add_from_bfd, symbol_file_add_separate): Add
	second parameter.
2013-09-24 14:00:06 +00:00
Jan Kratochvil 4262abfb98 Code cleanup: Add objfile_name accessor
gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

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

	Code cleanup.
	* probe.c (parse_probes): Rename variable objfile_name to
	objfile_namestr.
2013-09-24 13:54:42 +00:00
Jan Kratochvil a61d6db83d Remove solib-sunos.c
gdb/
2013-09-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Remove solib-sunos.c.
	* Makefile.in (ALLDEPFILES): Remove solib-sunos.c.
	* config/m68k/obsd.mh (NATDEPFILES): Remove solib-sunos.o.
	* objfiles.c (rt_common_objfile): Remove.
	(free_objfile): Remove rt_common_objfile comparison.
	* objfiles.h (rt_common_objfile): Remove.
	* solib-sunos.c: Remove.
	* symfile.c (reread_symbols): Remove solib-sunos.c comment.
2013-09-24 13:51:55 +00:00
Jan Kratochvil 2659903bfa Remove a.out NetBSD and OpenBSD hosts
gdb/
2013-09-21  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Remove a.out NetBSD and OpenBSD hosts.
	* NEWS (Removed native configurations): New.
	* config/arm/nbsdaout.mh: Remove.
	* config/i386/nbsdaout.mh: Remove.
	* config/i386/obsdaout.mh: Remove.
	* config/m68k/nbsdaout.mh: Remove.
	* config/sparc/nbsdaout.mh: Remove.
	* config/vax/nbsdaout.mh: Remove.
	* configure.host (arm*-*-netbsd*, i[34567]86-*-netbsd*)
	(i[34567]86-*-openbsd[0-2].*, i[34567]86-*-openbsd3.[0-3])
	(m68*-*-netbsd*, sparc-*-netbsd*, vax-*-netbsd*): Add them to obsolete
	error.
	(arm*-*-netbsd*, i[34567]86-*-netbsd*, i[34567]86-*-openbsd[0-2].*)
	(i[34567]86-*-openbsd3.[0-3], m68*-*-netbsd*, sparc-*-netbsdaout*)
	(sparc-*-netbsd*, vax-*-netbsd*): Remove.
2013-09-24 13:48:44 +00:00
Alan Modra 91ea67ca58 * elf32-mips.c (ELF_OSABI): Undef for vxworks. 2013-09-24 10:22:27 +00:00
Alan Modra 8a865bcb77 * syms.c (_bfd_stab_section_find_nearest_line): Ignore partial
stabs at end of .stab.  Tidy variable usage.  Don't drop the need
	for a NULL function name stab if If N_FUN stab is ignored.
	Ensure index entry count loop matches write loop.
2013-09-24 06:57:36 +00:00
Alan Modra 6c668e71eb * emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Provide 32-bit
and cross-endian values.
	* emulparams/elf64ppc.sh: Source elf32ppccomon.sh.  Delete duplicate,
	and unset unwanted variables.
2013-09-24 06:29:39 +00:00
Alan Modra 0f70b6b504 * genscripts.sh (LIB_PATH): Don't exclude libdir or tooldir when
sysrooted.  Also, don't always add tooldir when non-sysrooted.
	Instead add both when native and tooldir also when TOOL_DIR is
	defined.  Always prepend '=' to paths when sysrooted.  Always
	put paths with LIBPATH_SUFFIX first in search order.
2013-09-24 05:59:55 +00:00
Alan Modra 8cbc424d22 daily update 2013-09-24 00:00:04 +00:00
Tom Tromey 4bda5690b5 revert erroneous checkin to mi-support.exp 2013-09-23 18:11:49 +00:00
Tom Tromey f60e2d5c2a (clh 9) 2013-09-23 18:07:46 +00:00
Andrew Burgess d3eaaf6622 In regcache use print_hex_chars.
https://sourceware.org/ml/gdb-patches/2013-09/msg00815.html

gdb/ChangeLog

        * regcache.c: Add include of valprint.h.
        (dump_endian_bytes): Delete.
        (regcache_dump): Use print_hex_chars not dump_endian_bytes.
2013-09-23 16:48:43 +00:00
Joel Brobecker ab3a7f8fd5 [MinGW] Fix a compilation error in readline/util.c:_rl_strnicmp
readline/ChangeLog.gdb:

	* readline/util.c (_rl_strnicmp): Add missing semicolon.
2013-09-23 16:05:24 +00:00
Andrew Burgess 2cc762b50b Reuse print_hex_chars.
https://sourceware.org/ml/gdb-patches/2013-09/msg00768.html

gdb/ChangeLog

        * sh64-tdep.c (sh64_do_fp_register): Use print_hex_chars.
2013-09-23 09:18:44 +00:00
Alan Modra bf3d9781ec Regenerate sim configure files to pick up support for powerpc64le in
libtool.m4.
2013-09-23 00:32:27 +00:00
Alan Modra eb381701a3 daily update 2013-09-23 00:00:04 +00:00
Alan Modra ea76e9198c daily update 2013-09-22 00:00:04 +00:00
Jan-Benedict Glaw b3fc79f86b 2013-09-21 Jan-Benedict Glaw <jbglaw@lug-owl.de>
* configure.ac: Update from GCC.
	* configure: Regenerate.
2013-09-21 00:05:18 +00:00
Alan Modra 722a5e98ea daily update 2013-09-21 00:00:05 +00:00
Doug Evans 6b4646ced5 * lib/dwarf.exp (build_executable_from_fission_assembler): New proc.
* gdb.dwarf2/fission-base.S: Update.  Split out .dwo into separate
	file.
	* gdb.dwarf2/fission-loclists.S: Ditto.
	* gdb.dwarf2/fission-reread.S: Ditto.
	* gdb.dwarf2/fission-base.exp: Skip of remote host.  Compile with
	build_executable_from_fission_assembler.
	* gdb.dwarf2/fission-loclists.exp: Ditto.
	* gdb.dwarf2/fission-reread.exp: Ditto.
2013-09-20 22:43:28 +00:00
Doug Evans 4fa7d39097 * lib/future.exp (gdb_find_objcopy, gdb_find_readelf): New procs.
* lib/gdb.exp (build_id_debug_filename_get): Update to use them.
	(gdb_gnu_strip_debug): Ditto.
	* lib/prelink-support.exp (section_get, prelink_no): Ditto.
	* gdb.arch/altivec-abi.exp: Ditto.
	* gdb.base/attach-pie-misread.exp: Ditto.
	* gdb.base/comprdebug.exp: Ditto.
	* gdb.base/dup-sect.exp: Ditto.
	* gdb.base/gnu-debugdata.exp: Ditto.
	* gdb.base/step-symless.exp: Ditto.
	* gdb.dwarf2/dw2-inline-param.exp: Ditto.
	* gdb.dwarf2/dw2-skip-prologue.exp: Ditto.
	* gdb.dwarf2/gdb-index.exp: Ditto.
2013-09-20 21:47:06 +00:00
Chung-Lin Tang ecb33a7949 2013-09-20 Chung-Lin Tang <cltang@codesourcery.com>
* Makefile.am (enios2elf.c): Change tdir_nios2 to tdir_nios2elf.
	* Makefile.in: Regenerate.
2013-09-20 10:27:11 +00:00
Alan Modra cc9afea3e4 * libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
ppc host match.  Support little-endian powerpc linux hosts.
Regenerate binutils configure files.
2013-09-20 09:51:25 +00:00
Alan Modra ff2773be07 daily update 2013-09-20 00:00:04 +00:00
Pedro Alves 961815297c Fix regressions caused by thread-specific breakpoint deletion.
The recent change to make GDB auto-delete thread-specific breakpoints
when the corresponding thread is deleted
(https://sourceware.org/ml/gdb-patches/2013-09/msg00038.html) caused
gdb.base/nextoverexit.exp to regress.

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

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

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

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

Tested on x86_64 Fedora 17.

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

	* breakpoint.c (remove_threaded_breakpoints): Skip non-user
	breakpoints.
2013-09-19 14:45:33 +00:00
Thomas Schwinge 9b3f3ee63d gnu-nat.c: Don't install a deprecated_xfer_memory method.
This removes another instance of a deprecated_xfer_memory user.

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

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

	* gnu-nat.c (gnu_xfer_memory): Adjust interface as
	gnu_xfer_partial helper.
	(gnu_xfer_partial): New function.
	(gnu_target): Don't install a deprecated_xfer_memory hook.
	Install a to_xfer_partial hook.
2013-09-19 13:40:38 +00:00
Jan Kratochvil 69150c3d5a Mostly code cleanup: Constification.
gdb/
2013-09-19  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Constification.
	* main.c (captured_main): Replace catch_command_errors by
	catch_command_errors_const.  Twice.
	* symfile.c (symbol_file_add_main_1): Make args parameter const.
	(symbol_file_add): Make name parameter const.
	(symbol_file_add_main, symbol_file_add_main_1): Make args parameter const.
	(symfile_bfd_open): Make name parameter const, rename it to cname.  Add
	variable name.  Change their usage accordingly.
	* symfile.h (symbol_file_add, symfile_bfd_open): Make first parameter
	const.
	(symbol_file_add_main): Make args parameter const.
2013-09-19 12:44:46 +00:00
Alan Modra 205bc6b1a7 daily update 2013-09-19 00:00:03 +00:00
Ulrich Weigand 086850b237 2013-09-18 Raunaq Bathija <raunaq12@in.ibm.com>
Ulrich Weigand  <uweigand@de.ibm.com>

	* xcoffread.c (struct coff_symbol): Use CORE_ADDR as type
	of c_value member.
	(read_xcoff_symtab): Use CORE_ADDR as type of fcn_start_addr.
2013-09-18 17:47:56 +00:00
Pedro Alves d255f61f16 Also mention Yue Lu in previous commit's entry.
2013-09-18  Pedro Alves  <palves@redhat.com>
	    Yue Lu  <hacklu.newborn@gmail.com>

	* gnu-nat.c (inf_validate_procs, gnu_wait, gnu_resume)
	(gnu_create_inferior)
	(gnu_attach, gnu_thread_alive, gnu_pid_to_str, cur_thread)
	(set_sig_thread_cmd): Use the lwpid field of ptids to
	store/extract thread ids instead of the tid field.
	* i386gnu-nat.c (gnu_fetch_registers): Adjust.
2013-09-18 14:49:43 +00:00
Pedro Alves ca08a94cf0 Subject: [PATCH] [Hurd/gnu-nat.c] Use ptid_t.lwpid to store thread ids
instead of ptid_t.tid.

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

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

	* gnu-nat.c (inf_validate_procs, gnu_wait, gnu_resume)
	(gnu_create_inferior)
	(gnu_attach, gnu_thread_alive, gnu_pid_to_str, cur_thread)
	(set_sig_thread_cmd): Use the lwpid field of ptids to
	store/extract thread ids instead of the tid field.
	* i386gnu-nat.c (gnu_fetch_registers): Adjust.
2013-09-18 14:47:51 +00:00
Andrew Burgess e4c6a2c42d Consistent display of "<optimized out>" for register values.
https://sourceware.org/ml/gdb-patches/2013-08/msg00170.html

gdb/ChangeLog

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

gdb/testsuite/ChangeLog

        * gdb.dwarf2/dw2-reg-undefined.exp: Change pattern for info
        register to "<optimized out>", and also print the registers.
2013-09-18 14:02:31 +00:00
Kyrylo Tkachov 25f686c226 2013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* ld-aarch64/eh-frame.d: Update expected output to allow for
	64-bit addresses.
2013-09-18 13:59:12 +00:00
Pedro Alves a205fbfc18 gdbserver --wrapper also doesn't work on Cygwin.
Skip the test on Cygwin too.

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

	PR server/15967
	* gdb.server/wrapper.exp: Also return unsupported for Cygwin, and
	change text.
2013-09-18 13:21:41 +00:00
Markus Metzger 58c48e7253 When reverse-stepping, only insert a resume breakpoint at ecs->stop_func_start
if the function start is known.  Otherwise, keep single-stepping.
2013-09-18 13:02:42 +00:00
Pedro Alves c8d37639e3 [Hurd/gnu-nat] Fix old "signal-thread" command regression.
By inspection, I noticed that when I made the gnu-nat use
ptid(pid,0,tid) to represent a thread, instead of using ptid(tid,0,0),
in <https://sourceware.org/ml/gdb-patches/2008-08/msg00175.html>, I
introduced a bug.

The change was:

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

and thread_id_to_pid does:

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

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

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

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

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

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

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

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