Commit Graph

196 Commits

Author SHA1 Message Date
Tom Tromey b2259038ba * config/pa/hpux.mh (NATDEPFILES): Remove somread.o.
* configure: Rebuild.
	* configure.ac: Add somread.o to the build if BFD has SOM
	support.
	* somread.c: Include som/aout.h, not syms.h.
	(som_symtab_read): Use som_external_symbol_dictionary_record.
	Unpack records manually.
	(_initialize_somread): Declare.
2013-01-09 17:21:36 +00:00
Tom Tromey 4f05add48d * config/i386/darwin.mh (NATDEPFILES): Remove machoread.o.
* configure.ac: Check for Mach-O support in BFD.  Update
	CONFIG_OBS.
	* configure: Rebuild.
2013-01-02 14:58:15 +00:00
Tom Tromey def63ff00a * acinclude.m4 (GDB_AC_CHECK_BFD): New macro.
* configure.ac: Use GDB_AC_CHECK_BFD.
	* configure: Rebuild.
2013-01-02 14:54:17 +00:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
Two modifications:
  1. The addition of 2013 to the copyright year range for every file;
  2. The use of a single year range, instead of potentially multiple
     year ranges, as approved by the FSF.
2013-01-01 06:33:28 +00:00
Pedro Alves 05b4bd799a gdb/
2012-12-11  Pedro Alves  <palves@redhat.com>

	* configure.ac (detect type of /proc): Remove Unixware handling.
	* configure: Regenerate.
	* proc-api.c (ioctl_table) [PIOCLSTATUS]: Don't mention Unixware.
	(ioctl_table) [PCRESET]: Remove entry.
	* proc-events.c (SYS_lwp_create, SYS_lwp_exit, SYS_lwp_wait)
	(SYS_lwp_self, SYS_lwp_info, SYS_lwp_private, SYS_lwp_kill)
	(SYS_lwp_suspend, SYS_lwp_continue): Don't define.
	* proc-why.c (pr_why_table) [PR_SUSPENDED]: Don't mention Unixware.
	* procfs.c: Remove all UNIXWARE guarded code, and all traces of
	Unixware in comments throughout.
	* i386-tdep.c (i386_svr4_sigtramp_p): Don't match _sigacthandler,
	and remove mention of Unixware.

gdb/doc/
2012-12-11  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo: Remove all mentions of Unixware throughout.
2012-12-11 11:32:39 +00:00
Jan Kratochvil 74a0d9f6a5 gdb/
* configure.ac (CC_HAS_LONG_LONG): Replace by AC_MSG_ERROR.
	* defs.h (LONGEST, ULONGEST): Remove conditionalization for
	CC_HAS_LONG_LONG.
	* dwarf2-frame.c (DW64_CIE_ID): Likewise.
	* dwarf2read.c (extract_cu_value): Remove the function.
	(create_cus_from_index_list): Make the return type void, inline the
	extract_cu_value caller, include new gdb_static_assert.
	(create_cus_from_index): Make the return type void, update the function
	comment, update the create_cus_from_index_list caller.
	(create_signatured_type_table_from_index): Make the return type void,
	inline the extract_cu_value caller, include new gdb_static_assert.
	(dwarf2_read_index): Update the create_cus_from_index and
	create_signatured_type_table_from_index caller.
	* printcmd.c (ui_printf): Remove conditionalizations for
	CC_HAS_LONG_LONG.
	* config.in: Regenerate.
	* configure: Regenerate.

gdb/doc/
	* gdbint.texinfo (Host Definition): Remove CC_HAS_LONG_LONG.
2012-12-09 18:39:59 +00:00
Markus Metzger 945bf71318 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
gdb/
	* configure.ac: Check for linux/perf_event.h.
	* config.in: Regenerated.
	* configure: Regenerated.

gdb/gdbserver/
	* configure.ac: Check for linux/perf_event.h.
	* config.in: Regenerated.
	* configure: Regenerated.
2012-11-28 16:21:58 +00:00
Tom Tromey 608e2dbbfe 2012-11-26 Alexander Larsson <alexl@redhat.com>
Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* NEWS: Mention mini debuginfo feature.
	* minidebug.c: New file.
	* configure.ac: Check for lzma.
	* configure, config.in: Rebuild.
	* Makefile.in (LIBLZMA): New variable.
	(CLIBS): Include LIBLZMA.
	(SFILES): Mention minidebug.c.
	(COMMON_OBS): Mention minidebug.o.
	* symfile.c (read_symbols): New function.
	(syms_from_objfile, reread_symbols): Call it.
	* symfile.h (find_separate_debug_file_in_section): Declare.
doc
	* gdb.texinfo (MiniDebugInfo): New node.
	(GDB Files): Update.
testsuite
	* gdb.base/gnu-debugdata.exp: New file.
	* gdb.base/gnu-debugdata.c: New file.
	* lib/gdb.exp (gdb_file_cmd): Handle LZMA warning.
	(gdb_unload): Return 0 on success.
2012-11-26 19:23:56 +00:00
Pierre Muller 3a731e0fc7 * configure.ac (AC_HEADER_STAT): Remove.
* gdb_stat.h (STAT_MACROS_BROKEN): Remove macro use
	and corresponding code.
	* configure: Regenerate.
	* config.in: Regenerate.
2012-11-15 14:48:26 +00:00
Tom Tromey e68227b907 * configure, config.in: Rebuild.
* configure.ac: Don't check for ctype.h, time.h.
	* expprint.c: Don't use HAVE_CTYPE_H.
2012-11-14 19:16:04 +00:00
Tom Tromey d4fb63e140 * configure: Rebuild.
* configure.ac (build_warnings): Add -Wempty-body.
	* m68k-tdep.c (m68k_gdbarch_init): Remove empty 'if'.
	* remote.c (handle_notification): Use braces for empty 'else' body.
	* s390-tdep.c (s390_analyze_prologue): Use braces for empty
	'else' body.
	* sh64-tdep.c (sh64_push_dummy_call): Use braces for empty
	'else' body.
	* solib-som.c (som_relocate_section_addresses): Use braces
	for empty 'else' body.
	* ui-file.c (stdio_file_write): Use braces for empty 'if' body.
	(stdio_file_write_async_safe, stdio_file_fputs): Likewise.
2012-11-02 18:53:54 +00:00
Joel Brobecker c83393b9a8 Build with -DMS_WIN64 on amd64-windows if Python enabled...
... and building with GCC.

gdb/ChangeLog:

        * configure.ac: Build with -DMS_WIN64 if building with Python
        enabled using GCC on amd64-windows.
        * configure: Regenerate.
2012-10-15 17:17:54 +00:00
Joel Brobecker 43c75337b6 New unit sparc-sol-thread.c extracted from sol-thread.c
Moving some sparc-specific routines out of sol-thread.c into their
own (new) file.

gdb/ChangeLog:

        * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs):
        Move these functions to sparc-sol-thread.c.
        * sparc-sol-thread.c: New file.
        * configure.ac: Add sparc-sol-thread.o to CONFIG_OBS and
        sparc-sol-thread.c to CONFIG_SRCS for sparc-solaris native
        configurations.
        * configure: Regenerate.
2012-09-27 12:53:44 +00:00
Yit Phang Khoo a8db421230 2012-09-02 Khoo Yit Phang <khooyp@cs.umd.edu>
Do not enable -lmcheck by default when Python is enabled with
	threading support.
	* configure.ac: (python_has_threads) New variable, by testing
	if WITH_THREAD is defined in Python.h.
	Move --enable-lmcheck after --with-python.
	Do not enable -lmcheck by default if python_has_threads=yes.
	Warn if --enable-lmcheck and python_has_threads=yes.
	* configure: Regenerate.
2012-09-02 22:57:43 +00:00
Joel Brobecker a22d44ff78 Add support for --enable-lmcheck configure option.
This allows the user to enable this option at configure time if building
a release, or to disable it if building a snapshot.

gdb/ChangeLog:

        * configure.ac: Add --enable-lmcheck configure option.
        * configure: Regenerate.
2012-07-25 18:27:11 +00:00
Jan Kratochvil 8775fd2d8d gdb/
* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Remove check for gnu/libc-version.h.
	* linux-thread-db.c <HAVE_GNU_LIBC_VERSION_H>: Remove include of
	gnu/libc-version.h.
	(enable_thread_event_reporting) <HAVE_GNU_LIBC_VERSION_H>: Remove
	variables libc_version, libc_major and libc_minor.  Replace sscanf by
	inferior_has_bug.  Extend the comment.
2012-07-02 20:31:09 +00:00
H.J. Lu 6fea9e186c Use PTRACE_PEEKUSER to get fs_base/gs_base
* amd64-linux-nat.c: Include <sys/user.h>.
	(ps_get_thread_area): Use PTRACE_PEEKUSER to get fs_base/gs_base
	if HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE or
	HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE is defined.

	* configure.ac: Check if the fs_base and gs_base members of
	`struct user_regs_struct' exist.
	* config.in: Regenerated.
	* configure: Likewise.
2012-06-26 14:43:01 +00:00
Joel Brobecker 352b3eda56 Add -Wdeclaration-after-statement to list of compiler warnings
gdb/ChangeLog:

        * configure.ac (build_warnings): Add -Wdeclaration-after-statement.
        * configure: Regenerate.
2012-06-22 18:59:04 +00:00
Jan Kratochvil f5f1cdb612 gdb/
* configure.ac: Move development=true below AC_INIT.
	* configure: Regenerate.
2012-06-06 16:57:38 +00:00
Jan Kratochvil a68ffae9e6 gdb/
* configure.ac (development): Define new variable.
	Call AC_CHECK_LIB for mcheck if $development.
	(ERROR_ON_WARNING): Enable it by default only if $development.
	* config.in: Regenerate.
	* configure: Regenerate.
2012-06-01 18:20:18 +00:00
Jan Kratochvil 1564a2618d gdb/
* NEWS (--with-auto-load-dir): Prepend $debugdir to the default path.
	Describe it.
	* auto-load.c (auto_load_expand_dir_vars): New function.
	(auto_load_safe_path_vec_update): Use it, remove the
	substitute_path_component call thanks to it.
	(auto_load_objfile_script): Remove the debug_file_directory processing.
	Use auto_load_expand_dir_vars, remove the substitute_path_component
	call thanks to it.
	* configure: Regenerate.
	* configure.ac (--with-auto-load-dir): Prepend $debugdir to the default
	path.  Escape $ also for $debugdir.
	(--with_auto_load_safe_path): Escape $ also for $debugdir.
	* utils.c (substitute_path_component): Accept also DIRNAME_SEPARATOR.

gdb/doc/
	* gdb.texinfo (Separate Debug Files): New anchor debug-file-directory.
	Mention also --with-separate-debug-dir.
	(Auto-loading): Prepend $debugdir in the sample output.
	(Auto-loading safe path): Likewise.  Mention also $debugdir for the
	auto-load safe-path variable.
	(objfile-gdb.py file): Remove the extra debug-file-directory paragraph.
	Mention also $debugdir for 'set auto-load scripts-directory'.
2012-05-20 20:35:19 +00:00
Jan Kratochvil aff139ffa6 gdb/
Rename $ddir to $datadir.
	* NEWS (--with-auto-load-dir): Rename $ddir to $datadir.
	* auto-load.c (auto_load_safe_path_vec_update)
	(auto_load_gdb_datadir_changed, auto_load_objfile_script): Likewise.
	* configure: Regenerate.
	* configure.ac (--with-auto-load-dir, --with-auto-load-safe-path):
	Likewise.  Remove the 'use $ddir' help string.

gdb/doc/
	Rename $ddir to $datadir.
	* gdb.texinfo (Auto-loading, Auto-loading safe path)
	(objfile-gdb.py file): Rename $ddir to $datadir.
2012-05-18 17:47:31 +00:00
Jan Kratochvil 7349ff92c2 gdb/
Implement multi-component --with-auto-load-dir.
	* NEWS (set auto-load scripts-directory, --with-auto-load-dir): New
	entries.
	(--with-auto-load-safe-path): Update the default value description.
	* auto-load.c (auto_load_dir, set_auto_load_dir, show_auto_load_dir):
	New.
	(auto_load_objfile_script): Add DEBUG_AUTO_LOAD output.  Remove
	GDB_DATADIR NULL check.  Replace GDB_DATADIR/auto-load by
	AUTO_LOAD_DIR.  Support $ddir and multiple components in it.
	(_initialize_auto_load): Initialize also auto_load_dir.  Install new
	"set auto-load scripts-directory".
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (--with-auto-load-dir): New configure option.
	(--auto-load-safe-path): Change the default to --with-auto-load-dir.

gdb/doc/
	Implement multi-component --with-auto-load-dir.
	* gdb.texinfo (Auto-loading): New references
	for 'set auto-load scripts-directory'
	and 'show auto-load scripts-directory'.
	(Auto-loading safe path): Describe the new default.  Move $ddir
	substituation reference to 'objfile-gdb.py file'.
	(objfile-gdb.py file): Describe script-name alias.  Change real-name to
	script-name.  Describe new 'set auto-load scripts-directory'
	and 'show auto-load scripts-directory'.
2012-05-11 18:20:26 +00:00
Jan Kratochvil 6dea1fbd79 gdb/
Provide $ddir substitution for --with-auto-load-safe-path.
	* NEWS (--with-auto-load-safe-path, --without-auto-load-safe-path): New
	entries.
	* auto-load.c: Include observer.h.
	(auto_load_safe_path_vec_update): Call substitute_path_component for
	each component.  New variable ddir_subst.
	(auto_load_gdb_datadir_changed): New function.
	(set_auto_load_safe_path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
	AUTO_LOAD_SAFE_PATH.  New comment.
	(_initialize_auto_load): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
	AUTO_LOAD_SAFE_PATH.  Install auto_load_gdb_datadir_changed.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (--auto-load-safe-path): Rename
	DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH.  Default to
	GDB_DATADIR/auto-load.
	* defs.h (substitute_path_component): New declaration.
	* top.c: Include observer.h.
	(set_gdb_datadir): New function.
	(init_main): Install it for "set data-directory".
	* utils.c (substitute_path_component): New function.

gdb/doc/
	Provide $ddir substitution for --with-auto-load-safe-path.
	* gdb.texinfo (Auto-loading): Replace /usr/local by $ddir/auto-load.
	(Auto-loading safe path): Likewise.  Mention the default value,
	$ddir substitution, --with-auto-load-safe-path and
	--without-auto-load-safe-path.
	* observer.texi (gdb_datadir_changed): New.
2012-05-11 18:13:26 +00:00
Jan Kratochvil af2c151515 gdb/
* auto-load.c (set_auto_load_safe_path): Reset AUTO_LOAD_SAFE_PATH
	back to DEFAULT_AUTO_LOAD_SAFE_PATH if it is being set to "".
	(show_auto_load_safe_path): Check any-directory by comparison with "/".
	(add_auto_load_safe_path): Change the error message.
	(_initialize_auto_load): Change the "safe-path" help text.
	* configure: Regenerate
	* configure.ac (--without-auto-load-safe-path): Set
	WITH_AUTO_LOAD_SAFE_PATH to /.

gdb/doc/
	* gdb.texinfo (Auto-loading safe path): Make 'directories'
	for 'set auto-load safe-path' optional.  Mention if it is omitted.
	Change disabling security protection condition to "/", twice.
2012-05-06 15:31:04 +00:00
Sergio Durigan Junior 55aa24fb2e 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey  <tromey@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* Makefile.in (SFILES): Add `probe' and `stap-probe'.
	(COMMON_OBS): Likewise.
	(HFILES_NO_SRCDIR): Add `probe'.
	* NEWS: Mention support for static and SystemTap probes.
	* amd64-tdep.c (amd64_init_abi): Initializing proper fields used by
	SystemTap probes' arguments parser.
	* arm-linux-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(arm_stap_is_single_operand): New function.
	(arm_stap_parse_special_token): Likewise.
	(arm_linux_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* ax-gdb.c (require_rvalue): Removing static declaration.
	(gen_expr): Likewise.
	* ax-gdb.h (gen_expr): Declaring function.
	(require_rvalue): Likewise.
	* breakpoint.c: Include `gdb_regex.h' and `probe.h'.
	(bkpt_probe_breakpoint_ops): New variable.
	(momentary_breakpoint_from_master): Set the `probe' value.
	(add_location_to_breakpoint): Likewise.
	(break_command_1): Using proper breakpoint_ops according to the
	argument passed by the user in the command line.
	(bkpt_probe_insert_location): New function.
	(bkpt_probe_remove_location): Likewise.
	(bkpt_probe_create_sals_from_address): Likewise.
	(bkpt_probe_decode_linespec): Likewise.
	(tracepoint_probe_create_sals_from_address): Likewise.
	(tracepoint_probe_decode_linespec): Likewise.
	(tracepoint_probe_breakpoint_ops): New variable.
	(trace_command): Using proper breakpoint_ops according to the
	argument passed by the user in the command line.
	(initialize_breakpoint_ops): Initializing breakpoint_ops for
	static probes on breakpoints and tracepoints.
	* breakpoint.h (struct bp_location) <probe>: New field.
	* cli-utils.c (skip_spaces_const): New function.
	(extract_arg): Likewise.
	* cli-utils.h (skip_spaces_const): Likewise.
	(extract_arg): Likewise.
	* coffread.c (coff_sym_fns): Add `sym_probe_fns' value.
	* configure.ac: Append `stap-probe.o' to be generated when ELF
	support is present.
	* configure: Regenerate.
	* dbxread.c (aout_sym_fns): Add `sym_probe_fns' value.
	* elfread.c: Include `probe.h' and `arch-utils.h'.
	(probe_key): New variable.
	(elf_get_probes): New function.
	(elf_get_probe_argument_count): Likewise.
	(elf_evaluate_probe_argument): Likewise.
	(elf_compile_to_ax): Likewise.
	(elf_symfile_relocate_probe): Likewise.
	(stap_probe_key_free): Likewise.
	(elf_probe_fns): New variable.
	(elf_sym_fns): Add `sym_probe_fns' value.
	(elf_sym_fns_lazy_psyms): Likewise.
	(elf_sym_fns_gdb_index): Likewise.
	(_initialize_elfread): Initialize objfile cache for static
	probes.
	* gdb_vecs.h (struct probe): New forward declaration.
	(probe_p): New VEC declaration.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* gdbarch.sh (stap_integer_prefix): New variable.
	(stap_integer_suffix): Likewise.
	(stap_register_prefix): Likewise.
	(stap_register_suffix): Likewise.
	(stap_register_indirection_prefix): Likewise.
	(stap_register_indirection_suffix): Likewise.
	(stap_gdb_register_prefix): Likewise.
	(stap_gdb_register_suffix): Likewise.
	(stap_is_single_operand): New function.
	(stap_parse_special_token): Likewise.
	(struct stap_parse_info): Forward declaration.
	* i386-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(i386_stap_is_single_operand): New function.
	(i386_stap_parse_special_token): Likewise.
	(i386_elf_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* i386-tdep.h (i386_stap_is_single_operand): New function.
	(i386_stap_parse_special_token): Likewise.
	* machoread.c (macho_sym_fns): Add `sym_probe_fns' value.
	* mipsread.c (ecoff_sym_fns): Likewise.
	* objfiles.c (objfile_relocate1): Support relocation for static
	probes.
	* parse.c (prefixify_expression): Remove static declaration.
	(initialize_expout): Likewise.
	(reallocate_expout): Likewise.
	* parser-defs.h (initialize_expout): Declare function.
	(reallocate_expout): Likewise.
	(prefixify_expression): Likewise.
	* ppc-linux-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(ppc_stap_is_single_operand): New function.
	(ppc_stap_parse_special_token): Likewise.
	(ppc_linux_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* probe.c: New file, for generic statically defined probe support.
	* probe.h: Likewise.
	* s390-tdep.c: Including headers needed to perform the parsing of
	SystemTap probes' arguments.
	(s390_stap_is_single_operand): New function.
	(s390_gdbarch_init): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* somread.c (som_sym_fns): Add `sym_probe_fns' value.
	* stap-probe.c: New file, for SystemTap probe support.
	* stap-probe.h: Likewise.
	* symfile.h: Include `gdb_vecs.h'.
	(struct sym_probe_fns): New struct.
	(struct sym_fns) <sym_probe_fns>: New field.
	* symtab.c (init_sal): Initialize `probe' field.
	* symtab.h (struct probe): Forward declaration.
	(struct symtab_and_line) <probe>: New field.
	* tracepoint.c (start_tracing): Adjust semaphore on breakpoints
	locations.
	(stop_tracing): Likewise.
	* xcoffread.c (xcoff_sym_fns): Add `sym_probe_fns' value.
2012-04-27 20:47:57 +00:00
Maciej W. Rozycki 9009e1ae5f * configure.ac: Add AC_ARG_PROGRAM.
* configure: Regenerate.
2012-04-27 18:30:20 +00:00
Pedro Alves c971b7fa72 2012-04-19 Pedro Alves <palves@redhat.com>
gdb/
	* Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
	(SUBDIRS): Add $(GNULIB_BUILDDIR).
	(CLEANDIRS). Remove gnulib/import.
	(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
	(all-lib): Ditto.
	(distclean): Remove the $(GNULIB_BUILDDIR) directory.
	(gnulib/import/Makefile): Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Set CONFIG_FILES to just Makefile.
	(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
	(aclocal_m4_deps): Remove the gnulib dependencies.  Add
	acx_configure_dir.m4.
	* acinclude.m4: Include acx_configure_dir.m4.
	* acx_configure_dir.m4: New file.
	* aclocal.m4: Regenerate.
        * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
        calls.  Configure gnulib using ACX_CONFIGURE_DIR.
        (GNULIB): New variable.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile.
        * gdb/defs.h: Include build-gnulib/config.h.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

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

        gdb/gdbserver/
        * Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
        (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
        (all, install-only, uninstall, clean-info, all-lib, clean): No
        longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
        (maintainer-clean realclean distclean): Use subdir_do.
        (subdir_do): New.
        (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Don't pass argument to config.status.
        * acinclude.m4: Include acx_configure_dir.m4.
        * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
        calls.  Call AC_PROG_RANLIB.  Configure gnulib using
        ACX_CONFIGURE_DIR.
        (GNULIB): New.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile anymore.
        * gdbreplay.c: Include build-gnulib/config.h.
        * server.h: Likewise.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.
2012-04-19 19:34:52 +00:00
Pedro Alves 809277f8ce 2012-04-19 Pedro Alves <palves@redhat.com>
gdb/
	* gnulib/: Move whole directory ...
	* gnulib/import/: ... here, and re-rerun gnulib-tool to adjust.
	* Makefile.in (LIBGNU, INCGNU, GNULIB_H, CLEANDIRS)
	(REQUIRED_SUBDIRS, all-lib, gnulib/Makefile, ACLOCAL_AMFLAGS)
	(aclocal_m4_deps): Adjust.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* configure.ac: Adjust AC_OUTPUT output.

	gdbserver/
	* Makefile.in (LIBGNU, INCGNU): Adjust.
	(GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
	(all, install-only, uninstall, clean-info, all-lib, clean)
	(maintainer-clean, Makefile, gnulib/Makefile): Adjust.
	* configure.ac: Adjust AC_OUTPUT output.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2012-04-19 15:27:52 +00:00
Joel Brobecker 7f53314238 put -lpthread into LIBS instead of CONFIG_LDFLAGS.
The problem showed up on AIX when we switched from the system linker
to GNU ld. What happens is that configure is adding -lpthdebug to
CONFIG_LDFLAGS when AIX thread debugging support is detected.  But
this causes the "-lpthread" switch to be placed at the _before_
GDB's .o files (see Makefile.in):

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

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

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

gdb/ChangeLog (Tristan Gingold):

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

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

gdb/testsuite/
	New option "set auto-load safe-path".
	* gdb.python/py-objfile-script.exp (set auto-load safe-path): New.
	* gdb.python/py-section-script.exp (set auto-load safe-path): New.
2012-04-17 15:54:35 +00:00
Jan Kratochvil e2207b9a28 gdb/
auto-load: Move files.
	* Makefile.in (SFILES): Add auto-load.c.
	(HFILES_NO_SRCDIR): Add auto-load.h.
	(COMMON_OBS): Add auto-load.o.
	(distclean): Change .gdbinit for gdb-gdb.gdb.
	* auto-load.c: New file, with parts from python/py-auto-load.c.
	* auto-load.h: New file, with parts from python/python.h.
	* configure: Regenerate.
	* configure.ac (AC_OUTPUT): Change .gdbinit for gdb-gdb.gdb.
	* gdb-gdb.gdb.in: New file, renamed from gdbinit.in.
	* gdbinit.in: Remove file, rename it to gdb-gdb.gdb.in.
	* main.c: Include auto-load.h.
	* python/py-auto-load.c: Move include filenames.h, gdb_regex.h,
	command.h, observer.h and progspace.h to auto-load.c.  Add include
	auto-load.h.
	(gdbpy_global_auto_load, struct auto_load_pspace_info)
	(struct loaded_script, auto_load_pspace_data)
	(auto_load_pspace_data_cleanup, get_auto_load_pspace_data)
	(hash_loaded_script_entry, eq_loaded_script_entry)
	(init_loaded_scripts_info, get_auto_load_pspace_data_for_loading)
	(maybe_add_script): Move to auto-load.c.
	(source_section_scripts): Change maybe_add_script parameters passing,
	use script_not_found_warning_print.
	(clear_section_scripts, auto_load_objfile_script)
	(auto_load_new_objfile, loaded_script_ptr)
	(DEF_VEC_P (loaded_script_ptr), collect_matching_scripts, print_script)
	(sort_scripts_by_name, info_auto_load_scripts): Move to auto-load.c.
	(gdbpy_initialize_auto_load): Move auto_load_pspace_data,
	auto_load_new_objfile and info_auto_load_scripts initizations to
	auto-load.c.
	* python/python.h (gdbpy_global_auto_load): Move to auto-load.h.
2012-04-17 15:49:16 +00:00
Jan Kratochvil 05e7c24434 gdb/
* libunwind-frame.c: Rename to ...
	* ia64-libunwind-tdep.c: ... here.
	* libunwind-frame.h: Rename to ...
	* ia64-libunwind-tdep.h: ... here.
	* Makefile.in (HFILES_NO_SRCDIR): Rename libunwind-frame.h to
	ia64-libunwind-tdep.h.
	(ALLDEPFILES): Rename libunwind-frame.c to ia64-libunwind-tdep.c.
	* README (--with-libunwind): Rename to ...
	(--with-libunwind-ia64): ... here, note it is ia64 specific now.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: New option --with-libunwind-ia64, make the
	AS_HELP_STRING ia64 specific.  Deprecate option --with-libunwind.
	Remove AC_DEFINE for HAVE_LIBUNWIND.
	* ia64-libunwind-tdep.c: Make the file top comment ia64 specific.
	Rename libunwind-frame.h #include to ia64-libunwind-tdep.h.
	Rename libunwind-frame in the general comment.
	* ia64-libunwind-tdep.h: Make the file top comment ia64 specific.
	Rename symbol LIBUNWIND_FRAME_H to IA64_TDEP_LIBUNWIND_FRAME_H.
	Move forward declarations inside #ifndef.  Rename libunwind-frame in
	the general comment.
	* ia64-tdep.c: Rename libunwind-frame.h #include to
	ia64-libunwind-tdep.h.
	(ia64_gdb2uw_regnum, ia64_uw2gdb_regnum, ia64_is_fpreg)
	(ia64_libunwind_descr): Rename libunwind-frame to
	ia64-libunwind-tdep in these function comments.
	* ia64-tdep.h: Rename libunwind-frame.h #include to
	ia64-libunwind-tdep.h.
	* ia64-vms-tdep.c (ia64_vms_libunwind_descr): Rename libunwind-frame to
	ia64-libunwind-tdep in that data comment.
2012-03-08 19:08:11 +00:00
Yao Qi 2fa291aca4 gdb:
* common/agent.c: New.
	* common/agent.h: New.
	* configure.ac: Add `sys/socket.h' and `sys/un.h' to
	AC_CHECK_HEADERS.
	* configure, configh.in: Regenerated.

gdb/gdbserver:

	* Makefile.in (OBS): Add agent.o.
	Add new rule for agent.o.
	Track dependence of tracepoint.c on agent.h.
	* tracepoint.c (run_inferior_command_1):
	(run_inferior_command): Call agent_run_command.
	(gdb_ust_connect_sync_socket): Deleted.  Move it to
	common/agent.c.
	(resume_thread, stop_thread): Likewise.
	(gdb_ust_socket_init): Renamed to ...
	(gdb_agent_socket_init): ... New.
	(gdb_ust_thread): Renamed to ...
	(gdb_agent_helper_thread): ... New.
	(gdb_ust_init): Move some code to ...
	(gdb_agent_init): ... here.  New.
	[HAVE_UST]: Call gdb_ust_init.
	(initialize_tracepoint_ftlib):  Call gdb_agent_init.
	* configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
	* config.in, configure: Regenerated.
2012-03-03 03:08:36 +00:00
Pedro Alves b03a20112f 2012-03-01 Pedro Alves <palves@redhat.com>
* configure.ac (build_warnings): Add -Wmissing-prototypes.
	* configure: Regenerate.
2012-03-01 21:14:53 +00:00
Jan Kratochvil f06e05e0a4 gdb/
PR build/13638
	* configure.ac (MAKEINFO): Replace AC_CHECK_PROG by AC_ARG_VAR.
	(MAKEINFOFLAGS): Replace static string by AC_ARG_VAR.
	* configure: Regenerate.
2012-02-21 22:00:32 +00:00
Pedro Alves b54a8fd702 2012-02-21 Tristan Gingold <gingold@adacore.com>
Pedro Alves  <palves@redhat.com>

	* ia64-tdep.c: Do not include libunwind-ia64.h.
	* libunwind-frame.h: Remove #ifdef HAVE_LIBUNWIND_H guard.
	Include libunwind-ia64.h instead of libunwind.h.
	* configure.ac (--with-libunwind, $enable_libunwind): Don't check
	for libunwind.h existence.
	* configure, config.in: Regenerate.
2012-02-21 19:39:32 +00:00
Pedro Alves 12cd34f3ad 2012-02-10 Pedro Alves <palves@redhat.com>
* configure.ac (HAVE_ELF test): Put the old CFLAGS at the end of
	the test CFLAGS.
	* configure: Regenerate.
2012-02-10 13:57:59 +00:00
Tom Tromey 5579a92e63 2012-02-06 Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
* configure: Rebuild.
	* configure.ac: Put -L../bfd and -L../libiberty at the front of
	LDFLAGS.
2012-02-06 19:33:10 +00:00
Doug Evans 8c85a4e2f7 * configure.ac (with_python): Fix absolute path handling for win32.
* configure: Regenerate.
2012-01-27 18:23:12 +00:00
Ulrich Weigand b9e7b9c3de ChangeLog:
* configure.ac [AC_CHECK_FUNCS]: Check for readlink.
	* config.in, configure: Regenerate.

	* target.h (struct target_ops): Add to_fileio_readlink.
	(target_fileio_readlink): Add prototype.
	* target.c (target_fileio_readlink): New function.

	* inf-child.c: Conditionally include <sys/param.h>.
	(inf_child_fileio_readlink): New function.
	(inf_child_target): Install it.

	* remote.c (PACKET_vFile_readlink): New enum value.
	(remote_hostio_readlink): New function.
	(init_remote_ops): Install it.
	(_initialize_remote): Handle vFile:readlink packet type.

doc/ChangeLog:

	* gdb.texinfo (Remote Configuration): Document
	"set remote hostio-readlink-packet" command.
	(General Query Packets): Document vFile:readlink packet.

gdbserver/ChangeLog:

	* hostio.c (handle_readlink): New function.
	(handle_vFile): Call it to handle "vFile:readlink" packets.
2012-01-20 09:47:32 +00:00
Ulrich Weigand 7313baad7c 2012-01-20 Pedro Alves <palves@redhat.com>
Ulrich Weigand  <ulrich.weigand@linaro.org>

	* configure.ac [AC_CHECK_FUNCS]: Check for pread and pwrite.
	* config.in, configure: Regenerate.

	* target.h (struct target_ops): Add to_fileio_open, to_fileio_pwrite,
	to_fileio_pread, to_fileio_close, to_fileio_unlink.
	(target_fileio_open): Add prototype.
	(target_fileio_pwrite): Likewise.
	(target_fileio_pread): Likewise.
	(target_fileio_close): Likewise.
	(target_fileio_unlink): Likewise.
	(target_fileio_read_alloc): Likewise.
	(target_fileio_read_stralloc): Likewise.

	* target.c: Include "gdb/fileio.h".
	(target_read_stralloc): Accept trailing, but not embedded NUL bytes.
	(default_fileio_target): New function.
	(target_fileio_open): Likewise.
	(target_fileio_pwrite): Likewise.
	(target_fileio_pread): Likewise.
	(target_fileio_close): Likewise.
	(target_fileio_unlink): Likewise.
	(target_fileio_close_cleanup): Likewise.
	(target_fileio_read_alloc_1): Likewise.
	(target_fileio_read_alloc): Likewise.
	(target_fileio_read_stralloc): Likewise.

	* inf-child.c: Include "gdb/fileio.h", <sys/types.h>, <sys/stat.h>,
	<fcntl.h>, and <unistd.h>.
	(inf_child_fileio_open_flags_to_host): New function.
	(inf_child_errno_to_fileio_error): Likewise.
	(inf_child_fileio_open): Likewise.
	(inf_child_fileio_pwrite): Likewise.
	(inf_child_fileio_pread): Likewise.
	(inf_child_fileio_close): Likewise.
	(inf_child_fileio_unlink): Likewise.
	(inf_child_target): Install to_fileio routines.

	* remote.c (init_remote_ops): Install to_fileio routines.
2012-01-20 09:45:51 +00:00
Paul Pluzhnikov 1db333787d 2012-01-18 Paul Pluzhnikov <ppluzhnikov@google.com>
Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR gdb/9538
	* symfile.c (find_separate_debug_file): New function.
	(terminate_after_last_dir_separator): Likewise.
	(find_separate_debug_file_by_debuglink): Also try realpath.
	* configure.ac (AC_CHECK_FUNCS): Add lstat.
	* configure: Regenerate.
	* config.in: Regenerate.

testsuite/ChangeLog:

2012-01-18  Paul Pluzhnikov  <ppluzhnikov@google.com>

	PR gdb/9538
	* gdb.base/sepdebug.exp: New test.
2012-01-18 18:58:43 +00:00
Doug Evans f83d8a90ae * Makefile.in (TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_DEFINE): Delete.
(main.o): Remove rule.
	* configure.ac (BINDIR): Define with AC_DEFINE_DIR.
	(--with-sysroot): Rewrite.
	* configure: Regenerate.
	* config.in: Regenerate.
2012-01-18 18:35:43 +00:00
Joel Brobecker 0b30217134 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:17:56 +00:00
Jan Kratochvil 217bff3e3f 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'.
2012-01-02 02:28:59 +00:00
Sanjoy Das a2d08b9eeb gdb/
* Makefile.in: Add gdb-dlfcn.c and gdb-dlfcn.h to build system.
	* config.in: Add new #define HAVE_LIBDL.
	* configure.ac: Add check for -ldl.
	* configure: Re-generated by autoconf.
	* gdb-dlfcn.c: New file.
	* gdb-dlfcn.h: New file.
2011-11-20 08:59:56 +00:00
Sanjoy Das b8e0a31cb5 gdb/
* config.in: Add new #defines: JIT_READER_DIR and
	JIT_READER_DIR_RELOCATABLE.
	* configure.ac: New GDB directory entry for jit-reader-dir.
	* configure: Re-generated by autoconf.
	* jit.c: New static variable: const char *jit_reader_dir.
	(_initialize_jit): Relocate jit_reader_dir.
2011-11-20 08:53:25 +00:00
Sanjoy Das f997c38354 gdb/
* Makefile.in: Add jit-reader.h as a header.  Have it installed in
	$(includedir)/gdb.
	* configure.ac: Generate a correct value for TARGET_PTR for
	jit-reader.h.  Tell configure to generate jit-reader.h from
	jit-reader.in.
	* configure: Re-generated by autoconf.
	* jit-reader.in: New file.
	* jit.c: Include jit-reader.h.
2011-11-20 08:30:59 +00:00
Jan Kratochvil 5048e51677 gdb/
Fix compatibility with texinfo versions older than 4.12.
	* Makefile.in (MAKEINFO): Set to @MAKEINFO@.
	(MAKEINFOFLAGS, MAKEINFO_EXTRA_FLAGS, MAKEINFO_CMD): New.
	(MAKEHTMLFLAGS): Use MAKEINFO_CMD.
	(FLAGS_TO_PASS): Add MAKEINFOFLAGS and MAKEINFO_EXTRA_FLAGS.
	* configure: Regenerate.
	* configure.ac (MAKEINFO): Find it, from libiberty/configure.ac.
	(MAKEINFOFLAGS): Pre-set it to --split-size=5000000.
	(MAKEINFO_EXTRA_FLAGS): New test for -DHAVE_MAKEINFO_CLICK.

gdb/doc/
	Fix compatibility with texinfo versions older than 4.12.
	* Makefile.in (MAKEINFO): Set to @MAKEINFO@.
	(MAKEINFOFLAGS, MAKEINFO_EXTRA_FLAGS, MAKEINFO_CMD): New.
	(MAKEHTMLFLAGS): Use MAKEINFO_CMD.
	(gdb.info, gdbint.info, stabs.info, annotate.info): Use MAKEINFO_CMD.
	* gdb.texinfo (Tail Call Frames): Convert @arrow{} to @click, when possible.
	Make the conversion conditional on HAVE_MAKEINFO_CLICK, using variables
	CALLSEQ1A, CALLSEQ1B, CALLSEQ2A and CALLSEQ2B.
2011-10-12 15:55:04 +00:00