Commit Graph

808 Commits

Author SHA1 Message Date
Yao Qi 3332aaf289 Use lstat unconditionally
Since lstat gnulib module is imported, we can use it unconditionally.
lstat usage was introduced by this patch

https://sourceware.org/ml/gdb-patches/2012-01/msg00390.html

during the review, it was suggested to import gnulib lstat module, but
we didn't do that.

gdb:

2014-11-28  Yao Qi  <yao@codesourcery.com>

	* configure.ac (AC_CHECK_FUNCS): Remove lstat.
	* config.in, configure: Regenerate.
	* symfile.c (find_separate_debug_file_by_debuglink): Remove
	code checking HAVE_LSTAT is defined.
2014-11-28 18:38:02 +08:00
Yao Qi bdca27a2f5 Use readlink unconditionally
Since readlink module is imported, we can use it unconditionally.
This patch is to remove configure checks and HAVE_READLINK checks in
code.  It was mentioned in the patch below

  [RFA/commit] gdbserver: return ENOSYS if readlink not supported.
  https://sourceware.org/ml/gdb-patches/2012-02/msg00148.html

to use readlink in gdbserver, but we chose something simple at that
moment.

gdb:

2014-11-28  Yao Qi  <yao@codesourcery.com>

	* configure.ac (AC_CHECK_FUNCS): Remove readlink.
	* config.in, configure: Re-generate.
	* inf-child.c (inf_child_fileio_readlink): Don't check
	HAVE_READLINK is defined.

gdb/gdbserver:

2014-11-28  Yao Qi  <yao@codesourcery.com>

	* configure.ac(AC_CHECK_FUNCS): Remove readlink.
	* config.in, configure: Re-generate.
	* hostio.c (handle_unlink): Remove code checking HAVE_READLINK
	is defined.
2014-11-28 18:37:52 +08:00
Yao Qi 9c232dda88 Include alloca.h unconditionally
Since gnulib alloca module was imported, we can include alloca.h in
both gdb and gdbserver unconditionally, so this patch adds inclusion
of alloca.h in common-defs.h.  This patch also removes AC_FUNC_ALLOCA
in configure.ac because we don't need to check alloca any more.

This patch below is removed in fact.

  [RFA/commit] include alloca.h if available.
  https://www.sourceware.org/ml/gdb-patches/2010-08/msg00566.html

Since alloca.h is from gnulib now, we don't have to check malloc.h in
configure and include malloc.h in code.  This patch also remove them
too.

gdb:

2014-11-21  Yao Qi  <yao@codesourcery.com>

	* common/common-defs.h: Include alloca.h
	* configure.ac: Don't invoke AC_FUNC_ALLOCA.
	* configure: Re-generated.
	* defs.h: Remove code handling alloca.
	* utils.c (gdb_realpath): Don't check HAVE_ALLOCA is defined
	or not.

gdb/gdbserver:

2014-11-21  Yao Qi  <yao@codesourcery.com>

	* configure.ac: Don't invoke AC_FUNC_ALLOCA.
	(AC_CHECK_HEADERS): Remove malloc.h.
	* configure: Re-generated.
	* config.in: Re-generated.
	* server.h: Don't include alloca.h and malloc.h.
	* gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
	Don't include malloc.h.
2014-11-21 22:05:41 +08:00
Pedro Alves 32a8097ba5 Delete Tru64 support
This commit does most of the mechanical removal.  IOW, the easy part.

procfs.c isn't touched beyond removing a couple obvious bits that are
guarded by a couple macros defined in config/alpha/nm-osf3.h.  Going
beyond that for procfs.c & co would be a harder excision that
potentially affects Solaris.

Some comments in the generic alpha code ABIs that may still be
relevant and I wouldn't know what to do with them.  That can always be
done on a separate pass, preferably by someone who can test on alpha.

A couple other spots have references to OSF/Tru64 and related files
being removed, but it felt like removing them would make things worse,
not better.  We can revisit those when we next need to touch that
code.

I didn't remove a reference to osf in testsuite/lib/future.exp, as I
believe that code is imported from DejaGNU.

Built and tested on x86_64 Fedora 20, with --enable-targets=all.

Tested that building for --target=alpha-osf3 on x86_64 Fedora 20
fails with:

 checking for default auto-load directory... $debugdir:$datadir/auto-load
 checking for default auto-load safe-path... $debugdir:$datadir/auto-load
 *** Configuration alpha-unknown-osf3 is obsolete.
 *** Support has been REMOVED.
 make[1]: *** [configure-gdb] Error 1
 make[1]: Leaving directory `build-osf'
 make: *** [all] Error 2

gdb/
2014-10-17  Pedro Alves  <palves@redhat.com>

	* Makefile.in (ALL_64_TARGET_OBS): Remove alpha-osf1-tdep.o.
	(HFILES_NO_SRCDIR): Remove config/alpha/nm-osf3.h.
	(ALLDEPFILES): Remove alpha-nat.c, alpha-osf1-tdep.c and
	solib-osf.c.
	* NEWS: Mention that support for alpha*-*-osf* has been removed.
	* ada-lang.h [__alpha__ && __osf__]
	(ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Delete.
	* alpha-nat.c, alpha-osf1-tdep.c: Delete files.
	* alpha-tdep.c (alpha_gdbarch_init): Remove reference to
	GDB_OSABI_OSF1.
	* config/alpha/alpha-osf3.mh, config/alpha/nm-osf3.h: Delete
	files.
	* config/djgpp/fnchange.lst (config/alpha/alpha-osf1.mh)
	(config/alpha/alpha-osf2.mh, config/alpha/alpha-osf3.mh): Delete.
	* configure: Regenerate.
	* configure.ac: Remove references to osf.
	* configure.host: Handle alpha*-*-osf* in the obsolete hosts
	section.  Remove all other references to osf.
	* configure.tgt: Add alpha*-*-osf* to the obsolete targets section.
	Remove all other references to osf.
	* dec-thread.c: Delete file.
	* defs.h (GDB_OSABI_OSF1): Delete.
	* inferior.h (START_INFERIOR_TRAPS_EXPECTED): New unconditionally
	defined.
	* osabi.c (gdb_osabi_names): Delete "OSF/1".
	* procfs.c (procfs_debug_inferior) [PROCFS_DONT_TRACE_FAULTS]:
	Delete code.
	(unconditionally_kill_inferior)
	[PROCFS_NEED_CLEAR_CURSIG_FOR_KILL]: Delete code.
	* solib-osf.c: Delete file.

gdb/testsuite/
2014-10-17  Pedro Alves  <palves@redhat.com>

	* gdb.base/callfuncs.exp: emove references to osf.
	* gdb.base/sigall.exp: Likewise.
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
	* gdb.mi/non-stop.c: Likewise.
	* gdb.mi/pthreads.c: Likewise.
	* gdb.reverse/sigall-precsave.exp: Likewise.
	* gdb.reverse/sigall-reverse.exp: Likewise.
	* gdb.threads/pthreads.c: Likewise.
	* gdb.threads/pthreads.exp: Likewise.

gdb/doc/
2014-10-17  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (Ada Tasks and Core Files): Delete mention of Tru64.
	(SVR4 Process Information): Delete mention of OSF/1.
2014-10-17 11:18:59 +01:00
Pedro Alves 3831839c08 Delete IRIX support
This does most of the mechanical removal.  IOW, the easy part.

This doesn't touch procfs.c as that'd be a harder excision,
potentially affecting Solaris.

mips-tdep.c is left alone.  E.g., I didn't delete the GDB_OSABI_IRIX
enum value, nor references to it in mips-tdep.c.  Some comments
mentioning IRIX ABIs may still be relevant and I wouldn't know what to
do with them. in That can always be done on a separate pass,
preferably by someone who can test on MIPS.

I didn't remove a reference to IRIX in testsuite/lib/future.exp, as I
believe that code is imported from DejaGNU.

Built and tested on x86_64 Fedora 20, with --enable-targets=all.

Tested that building for --target=mips-sgi-irix6 on x86_64 Fedora 20
fails with:

 checking for default auto-load directory... $debugdir:$datadir/auto-load
 checking for default auto-load safe-path... $debugdir:$datadir/auto-load
 *** Configuration mips-sgi-irix6 is obsolete.
 *** Support has been REMOVED.
 make[1]: *** [configure-gdb] Error 1
 make[1]: Leaving directory `/home/pedro/gdb/mygit/build-irix'
 make: *** [all] Error 2

gdb/
2014-10-10  Pedro Alves  <palves@redhat.com>

	* Makefile.in (ALL_TARGET_OBS): Remove mips-irix-tdep.o and solib-irix.o.
	(ALLDEPFILES): Remove mips-irix-tdep.c and solib-irix.c.
	(HFILES_NO_SRCDIR): Remove solib-irix.h.
	* NEWS: Mention that support for mips-sgi-irix5* mips-sgi-irix6*
	and been removed.
	* config/mips/irix5.mh, config/mips/irix6.mh: Delete files.
	* configure.ac: Remove references to IRIX.
	* configure.host: Add *-*-irix* to the obsolete hosts section.
	Remove all other references to irix.
	* irix5-nat.c, mips-irix-tdep.c, solib-irix.c, solib-irix.h:
	Delete files.

gdb/testsuite/
2014-10-10  Pedro Alves  <palves@redhat.com>

	* gdb.base/bigcore.exp: Remove references to IRIX.
	* gdb.base/funcargs.exp: Likewise.
	* gdb.base/interrupt.exp: Likewise.
	* gdb.base/mips_pro.exp: Likewise.
	* gdb.base/nodebug.exp: Likewise.
	* gdb.base/setvar.exp: Likewise.
	* lib/gdb.exp (gdb_compile_shlib): Remove mips-sgi-irix* case.
2014-10-10 18:18:52 +01:00
Doug Evans d342a0da4f PR guile/17367
gdb/ChangeLog:

	* acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): Pass guile version as
	last parameter to pkg-config, not first.
	* configure.ac: Pass --with-guile provided pkg-config path to
	GDB_GUILE_PROGRAM_NAMES.
	* configure: Regenerate.
2014-09-09 21:18:25 -07:00
Doug Evans 92d8d229d9 Fix for PR 17247: Block SIGCHLD while initializing Guile.
The problem here is that if a thread other than gdb's main thread
gets a SIGCHLD (it's an asynchronous signal so the kernel will
essentially pick a random thread) then gdb will hang if it is
in sigsuspend when the SIGCHLD is delivered.  The other thread
will see the signal and the sigsuspend won't "wake up".

Guile and libgc should be blocking SIGCHLD in their threads,
but we need to work with Guile 2.0 and libgc 7.4.
The problem first shows up in libgc 7.4 because it is the first
release that enables multiple marker threads by default.

gdb/ChangeLog:

	PR 17247
	* guile.c: #include <signal.h>.
	(_initialize_guile): Block SIGCHLD while initializing Guile.

	Replaces the following, which is reverted.

	2014-07-26  Doug Evans  <xdje42@gmail.com>

	PR 17185
	* configure.ac: Add check for header gc/gc.h.
	Add check for function setenv.
	* configure: Regenerate.
	* config.in: Regenerate.
	* guile/guile.c (_initialize_guile): Add workaround for libgc 7.4.0.
2014-09-08 22:45:34 -07:00
Gary Benson e9bcb65852 Introduce common/gdb_setjmp.h
This commit creates a new file, common/gdb_setjmp.h, to hold some
portability macros for setjmp/longjmp et al. that are used by the
exceptions subsystem and by the demangler crash catcher.

gdb/ChangeLog:

	* common/gdb_setjmp.h: New file.
	* Makefile.in (HFILES_NO_SRCDIR): Add common/gdb_setjmp.h.
	* configure.ac: Move sigsetjmp check...
	* common/common.m4: ...here.
	* configure: Regenerate.
	* cp-support.c (SIGJMP_BUF): Delete.
	(SIGSETJMP): Likewise.
	(SIGLONGJMP): Likewise.
	* exceptions.h (gdb_setjmp.h): Include.
	(setjmp.h): Do not include.
	(EXCEPTIONS_SIGJMP_BUF): Delete.
	(EXCEPTIONS_SIGSETJMP): Likewise.
	(EXCEPTIONS_SIGLONGJMP): Likewise.
	Replace all uses of EXCEPTIONS_SIG* macros with SIG* macros
	from gdb_setjmp.h.
	* exceptions.c: Likewise.

gdb/gdbserver/ChangeLog:

	* config.in: Regenerate.
	* configure: Likewise.
2014-08-29 10:53:36 +01:00
Alan Modra 2974be626b Fix --diable-shared --enable-plugins build breakage
Directories that don't use libtool need to add -ldl (on most *nix
hosts) to provide dlopen for libbfd.

config/
	* plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to
	LIBS via AC_SEARCH_LIBS.
gdb/
	* acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl.
	* config.in: Regenerate.
sim/ppc/
	* configure.ac: Invoke AC_PLUGINS.
	* config.in: Regenerate.

and regen lots of configure files.
2014-08-19 21:59:56 +09:30
Yao Qi 65c749e7c0 Fix build/17104
This patch is to fix the build error when GDB is configured as:

  CFLAGS=-Wall ./configure --with-babeltrace; make

This patch adds one line of code in configure test to use local
variable 'pos'.

Note that we append -Werror to CFLAGS to catch the warning related to
assignment to scope.  See more in this thread
https://sourceware.org/ml/gdb-patches/2014-08/msg00045.html

2014-08-13  Yao Qi  <yao@codesourcery.com>

	PR build/17104
	* configure.ac: Use local variable 'pos'.
	* configure: Regenerated.
2014-08-13 17:42:57 +08:00
Doug Evans e76c5d173b PR guile/17146
* acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): New macro.
	(GDB_GUILD_TARGET_FLAG, GDB_TRY_GUILD): New macros.
	* configure.ac: Try to use guild to compile an scm file, if it fails
	then disable guile support.
	* configure: Regenerate.
	* data-directory/Makefile.in (GUILE_SOURCE_FILES): Renamed from
	GUILE_FILE_LIST.
	(GUILE_COMPILED_FILES): New variable.
	(GUILE_FILES) Update.
	(GUILD, GUILD_TARGET_FLAG, GUILD_COMPILE_FLAGS): New variables.
	(stamp-guile): Compile scm files.
	* guile/guile.c (boot_guile_support): New function.
	(standard_throw_args_p): New function.
	(print_standard_throw_error, print_throw_error): New functions.
	(handle_boot_error): New function.
	(initialize_scheme_side): Rewrite to call boot_guile_support.
	* guile/lib/gdb/boot.scm: Update %load-compiled-path.  Load gdb.go.
	* guile/lib/gdb/init.scm (%silence-compiler-warnings%): New function.
2014-07-26 18:16:27 -07:00
Doug Evans 4df4275506 PR build/17105.
Tested with/without guile,python on amd64-linux.

I'm not sure we still have to deal with shells that can't
handle empty for lists, but I played it safe.
Otherwise this patch would be a lot smaller (though a diff -b
will still show the real changes).

	PR build/17105
	* configure.ac: Add AM_CONDITIONALs for HAVE_PYTHON, HAVE_GUILE.
	* configure: Regenerate.
	* data-directory/Makefile.in (PYTHON_FILE_LIST): Renamed from
	PYTHON_FILES.
	(PYTHON_FILES): New variable.
	(GUILE_FILE_LIST): Renamed from GUILE_FILES.
	(GUILE_FILES): New variable.
	(stamp-python, install-python, uninstall-python): Handle empty
	file list.
	(stamp-guile, install-guile, uninstall-guile): Ditto.
2014-07-26 16:41:29 -07:00
Doug Evans 74edf51613 PR 17185
PR 17185 describes a problem with using gdb+guile with libgc 7.4.0.
The symptom is a hang in sigsuspend.
[The thread referenced in the PR has the details.]
It's not clear what the right fix is, or even where the bug is yet.
This patch applies the same workaround Guile has applied.
There is no functionality or real performance loss with this,
and Guile has been using it for awhile.

	* configure.ac: Add check for header gc/gc.h.
	Add check for function setenv.
	* configure: Regenerate.
	* config.in: Regenerate.
	* guile/guile.c (_initialize_guile): Add workaround for libgc 7.4.0.
2014-07-26 14:49:04 -07:00
Gary Benson 992c7d700f Demangler crash handler
This commit wraps calls to the demangler with a segmentation fault
handler.  The first time a segmentation fault is caught a core file
is generated and the user is prompted to file a bug and offered the
choice to exit or to continue their GDB session.  A maintainence
option is provided to allow the user to disable the crash handler
if required.

gdb/
2014-06-19  Gary Benson  <gbenson@redhat.com>

	* configure.ac [AC_CHECK_FUNCS] <sigaltstack>: New check.
	* configure: Regenerate.
	* config.in: Likewise.
	* main.c (signal.h): New include.
	(setup_alternate_signal_stack): New function.
	(captured_main): Call the above.
	* cp-support.c (signal.h): New include.
	(catch_demangler_crashes): New flag.
	(SIGJMP_BUF): New define.
	(SIGSETJMP): Likewise.
	(SIGLONGJMP): Likewise.
	(gdb_demangle_jmp_buf): New static global.
	(gdb_demangle_attempt_core_dump): Likewise.
	(gdb_demangle_signal_handler): New function.
	(gdb_demangle): If catch_demangler_crashes is set, install the
	above signal handler before calling bfd_demangle, and restore
	the original signal handler afterwards.  Display the offending
	symbol and call demangler_warning the first time a segmentation
	fault is caught.
	(_initialize_cp_support): New maint set/show command.

gdb/doc/
2014-06-19  Gary Benson  <gbenson@redhat.com>

	* gdb.texinfo (Maintenance Commands): Document new
	"maint set/show catch-demangler-crashes" option.
2014-06-19 09:13:57 +01:00
Joel Brobecker 270c993744 Make it easy to make --disable-werror the default for both binutils and gdb
The goal of this patch is to provide an easy way to make
--disable-werror the default when building binutils, or the parts
of binutils that need to get built when building GDB. In development
mode, we want to continue making -Werror the default with GCC.
But, when making releases, I think we want to make it as easy as
possible for regular users to successfully build from sources.

GDB already has this kind of feature to turn -Werror as well as
the use of the libmcheck library. As GDB Release Manager, I take
advantage of it to turn those off after having cut the branch.
I'd like to be able to do the same for the binutils bits. And
perhaps Tristan will want to do the same for his releases too
(not sure, binutils builders might be a little savvier than GDB
builders).

This patch introduces a new file, called development.sh, which
just sets a variable called $development. In our development branches
(Eg. "master"), it's set to true. But setting it to false would allow
us to change the default behavior of various development-related
features to be turned off; in this case, it turns off the use of
-Werror by default (use --enable-werror to turn it back on).

bfd/ChangeLog:

        * development.sh: New file.
        * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
        Make -Werror the default with GCC only if DEVELOPMENT is true.
        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
        $(srcdir)/development.sh.
        * Makefile.in, configure: Regenerate.

binutils/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gas/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gold/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): New.
        * Makefile.in, configure: Regenerate.

gprof/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

ld/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

opcodes/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gdb/ChangeLog:

        * development.sh: Delete.
        * Makefile.in (config.status): Adjust dependency on development.sh.
        * configure.ac: Adjust development.sh source call.
        * configure: Regenerate.

gdb/gdbserver/ChangeLog:

        * configure.ac: Adjust development.sh source call.
        * Makefile.in (config.status): Adjust dependency on development.sh.
        * configure: Regenerate.

Tested on x86_64-linux by building two ways: One with DEVELOPMENT
set to true, and one with DEVELOPMENT set to false. In the first
case, I could see the use of -Werror, while it disappeared in
the second case.
2014-06-05 05:47:29 -07:00
Ludovic Courtès 16954d5d9d guile: Allow compilation with Guile <= 2.0.5.
gdb/
2014-06-01  Ludovic Courtès  <ludo@gnu.org>

	* configure.ac: When Guile is available, check for the
	availability of 'scm_new_smob'.
	* configure, config.h.in: Regenerate.
	* guile/guile-internal.h (scm_new_smob) [!HAVE_SCM_NEW_SMOB]: New
	function.
2014-06-01 22:26:55 +02:00
Andy Wingo 214ab2dadd Add configure support for building with guile 2.2.
* configure.ac (try_guile_versions): Allow building with guile 2.2.
	* configure: Regenerate.
2014-05-26 12:45:13 -07:00
Doug Evans e1402065ee Don't crash if pkg-config is not found and guile wasn't explicitly requested.
* configure.ac: Don't crash if pkg-config is not found and guile
	wasn't explicitly requested.  Use AC_MSG_ERROR instead of AC_ERROR
	in guile checks.
	* configure: Regenerate.
2014-02-10 23:04:38 -08:00
Doug Evans ed3ef33944 Add Guile as an extension language.
* NEWS: Mention Guile scripting.
	* Makefile.in (SUBDIR_GUILE_OBS): New variable.
	(SUBDIR_GUILE_SRCS, SUBDIR_GUILE_DEPS): New variables
	(SUBDIR_GUILE_LDFLAGS, SUBDIR_GUILE_CFLAGS): New variables.
	(INTERNAL_CPPFLAGS): Add GUILE_CPPFLAGS.
	(CLIBS): Add GUILE_LIBS.
	(install-guile): New rule.
	(guile.o): New rule.
	(scm-arch.o, scm-auto-load.o, scm-block.o): New rules.
	(scm-breakpoint.o, scm-disasm.o, scm-exception.o): New rules.
	(scm-frame.o, scm-iterator.o, scm-lazy-string.o): New rules.
	(scm-math.o, scm-objfile.o, scm-ports.o): New rules.
	(scm-pretty-print.o, scm-safe-call.o, scm-gsmob.o): New rules.
	(scm-string.o, scm-symbol.o, scm-symtab.o): New rules.
	(scm-type.o, scm-utils.o, scm-value.o): New rules.
	* configure.ac: New option --with-guile.
	* configure: Regenerate.
	* config.in: Regenerate.
	* auto-load.c: Remove #include "python/python.h".  Add #include
	"gdb/section-scripts.h".
	(source_section_scripts): Handle Guile scripts.
	(_initialize_auto_load): Add name of Guile objfile script to
	scripts-directory help text.
	* breakpoint.c (condition_command): Tweak comment to include Scheme.
	* breakpoint.h (gdbscm_breakpoint_object): Add forward decl.
	(struct breakpoint): New member scm_bp_object.
	* defs.h (enum command_control_type): New value guile_control.
	* cli/cli-cmds.c: Remove #include "python/python.h".  Add #include
	"extension.h".
	(show_user): Update comment.
	(_initialize_cli_cmds): Update help text for "show user".  Update help
	text for max-user-call-depth.
	* cli/cli-script.c: Remove #include "python/python.h".  Add #include
	"extension.h".
	(multi_line_command_p): Add guile_control.
	(print_command_lines): Handle guile_control.
	(execute_control_command, recurse_read_control_structure): Ditto.
	(process_next_line): Recognize "guile" commands.
	* disasm.c (gdb_disassemble_info): Make non-static.
	* disasm.h: #include "dis-asm.h".
	(struct gdbarch): Add forward decl.
	(gdb_disassemble_info): Declare.
	* extension.c: #include "guile/guile.h".
	(extension_languages): Add guile.
	(get_ext_lang_defn): Handle EXT_LANG_GDB.
	* extension.h (enum extension_language): New value EXT_LANG_GUILE.
	* gdbtypes.c (get_unsigned_type_max): New function.
	(get_signed_type_minmax): New function.
	* gdbtypes.h (get_unsigned_type_max): Declare.
	(get_signed_type_minmax): Declare.
	* guile/README: New file.
	* guile/guile-internal.h: New file.
	* guile/guile.c: New file.
	* guile/guile.h: New file.
	* guile/scm-arch.c: New file.
	* guile/scm-auto-load.c: New file.
	* guile/scm-block.c: New file.
	* guile/scm-breakpoint.c: New file.
	* guile/scm-disasm.c: New file.
	* guile/scm-exception.c: New file.
	* guile/scm-frame.c: New file.
	* guile/scm-gsmob.c: New file.
	* guile/scm-iterator.c: New file.
	* guile/scm-lazy-string.c: New file.
	* guile/scm-math.c: New file.
	* guile/scm-objfile.c: New file.
	* guile/scm-ports.c: New file.
	* guile/scm-pretty-print.c: New file.
	* guile/scm-safe-call.c: New file.
	* guile/scm-string.c: New file.
	* guile/scm-symbol.c: New file.
	* guile/scm-symtab.c: New file.
	* guile/scm-type.c: New file.
	* guile/scm-utils.c: New file.
	* guile/scm-value.c: New file.
	* guile/lib/gdb.scm: New file.
	* guile/lib/gdb/boot.scm: New file.
	* guile/lib/gdb/experimental.scm: New file.
	* guile/lib/gdb/init.scm: New file.
	* guile/lib/gdb/iterator.scm: New file.
	* guile/lib/gdb/printing.scm: New file.
	* guile/lib/gdb/types.scm: New file.
	* data-directory/Makefile.in (GUILE_SRCDIR): New variable.
	(VPATH): Add $(GUILE_SRCDIR).
	(GUILE_DIR): New variable.
	(GUILE_INSTALL_DIR, GUILE_FILES): New variables.
	(all): Add stamp-guile dependency.
	(stamp-guile): New rule.
	(clean-guile, install-guile, uninstall-guile): New rules.
	(install-only): Add install-guile dependency.
	(uninstall): Add uninstall-guile dependency.
	(clean): Add clean-guile dependency.

	doc/
	* Makefile.in (GDB_DOC_FILES): Add guile.texi.
	* gdb.texinfo (Auto-loading): Add set/show auto-load guile-scripts.
	(Extending GDB): New menu entries Guile, Multiple Extension Languages.
	(Guile docs): Include guile.texi.
	(objfile-gdbdotext file): Add objfile-gdb.scm.
	(dotdebug_gdb_scripts section): Mention Guile scripts.
	(Multiple Extension Languages): New node.
	* guile.texi: New file.

	testsuite/
	* configure.ac (AC_OUTPUT): Add gdb.guile.
	* configure: Regenerate.
	* lib/gdb-guile.exp: New file.
	* lib/gdb.exp (get_target_charset): New function.
	* gdb.base/help.exp: Update expected output from "apropos apropos".
	* gdb.guile/Makefile.in: New file.
	* gdb.guile/guile.exp: New file.
	* gdb.guile/scm-arch.c: New file.
	* gdb.guile/scm-arch.exp: New file.
	* gdb.guile/scm-block.c: New file.
	* gdb.guile/scm-block.exp: New file.
	* gdb.guile/scm-breakpoint.c: New file.
	* gdb.guile/scm-breakpoint.exp: New file.
	* gdb.guile/scm-disasm.c: New file.
	* gdb.guile/scm-disasm.exp: New file.
	* gdb.guile/scm-equal.c: New file.
	* gdb.guile/scm-equal.exp: New file.
	* gdb.guile/scm-error.exp: New file.
	* gdb.guile/scm-error.scm: New file.
	* gdb.guile/scm-frame-args.c: New file.
	* gdb.guile/scm-frame-args.exp: New file.
	* gdb.guile/scm-frame-args.scm: New file.
	* gdb.guile/scm-frame-inline.c: New file.
	* gdb.guile/scm-frame-inline.exp: New file.
	* gdb.guile/scm-frame.c: New file.
	* gdb.guile/scm-frame.exp: New file.
	* gdb.guile/scm-generics.exp: New file.
	* gdb.guile/scm-gsmob.exp: New file.
	* gdb.guile/scm-iterator.c: New file.
	* gdb.guile/scm-iterator.exp: New file.
	* gdb.guile/scm-math.c: New file.
	* gdb.guile/scm-math.exp: New file.
	* gdb.guile/scm-objfile-script-gdb.in: New file.
	* gdb.guile/scm-objfile-script.c: New file.
	* gdb.guile/scm-objfile-script.exp: New file.
	* gdb.guile/scm-objfile.c: New file.
	* gdb.guile/scm-objfile.exp: New file.
	* gdb.guile/scm-ports.exp: New file.
	* gdb.guile/scm-pretty-print.c: New file.
	* gdb.guile/scm-pretty-print.exp: New file.
	* gdb.guile/scm-pretty-print.scm: New file.
	* gdb.guile/scm-section-script.c: New file.
	* gdb.guile/scm-section-script.exp: New file.
	* gdb.guile/scm-section-script.scm: New file.
	* gdb.guile/scm-symbol.c: New file.
	* gdb.guile/scm-symbol.exp: New file.
	* gdb.guile/scm-symtab-2.c: New file.
	* gdb.guile/scm-symtab.c: New file.
	* gdb.guile/scm-symtab.exp: New file.
	* gdb.guile/scm-type.c: New file.
	* gdb.guile/scm-type.exp: New file.
	* gdb.guile/scm-value-cc.cc: New file.
	* gdb.guile/scm-value-cc.exp: New file.
	* gdb.guile/scm-value.c: New file.
	* gdb.guile/scm-value.exp: New file.
	* gdb.guile/source2.scm: New file.
	* gdb.guile/types-module.cc: New file.
	* gdb.guile/types-module.exp: New file.
2014-02-09 19:40:01 -08:00
Doug Evans 6dddc817c1 Extension Language API
* configure.ac (libpython checking): Remove all but python.o from
	CONFIG_OBS.  Remove all but python.c from CONFIG_SRCS.
	* configure: Regenerate.

	* Makefile.in (SFILES): Add extension.c.
	(HFILES_NO_SRCDIR): Add extension.h, extension-priv.h
	(COMMON_OBS): Add extension.o.
	* extension.h: New file.
	* extension-priv.h: New file.
	* extension.c: New file.

	* python/python-internal.h: #include "extension.h".
	(gdbpy_auto_load_enabled): Declare.
	(gdbpy_apply_val_pretty_printer): Declare.
	(gdbpy_apply_frame_filter): Declare.
	(gdbpy_preserve_values): Declare.
	(gdbpy_breakpoint_cond_says_stop): Declare.
	(gdbpy_breakpoint_has_cond): Declare.
	(void source_python_script_for_objfile): Delete.
	* python/python.c: #include "extension-priv.h".
	Delete inclusion of "observer.h".
	(extension_language_python): Moved here and renamed from
	script_language_python in py-auto-load.c.
	Redefined to be of type extension_language_defn.
	(python_extension_script_ops): New global.
	(python_extension_ops): New global.
	(struct python_env): New member previous_active.
	(restore_python_env): Call restore_active_ext_lang.
	(ensure_python_env): Call set_active_ext_lang.
	(gdbpy_clear_quit_flag): Renamed from clear_quit_flag, made static.
	New arg extlang.
	(gdbpy_set_quit_flag): Renamed from set_quit_flag, made static.
	New arg extlang.
	(gdbpy_check_quit_flag): Renamed from check_quit_flag, made static.
	New arg extlang.
	(gdbpy_eval_from_control_command): Renamed from
	eval_python_from_control_command, made static.  New arg extlang.
	(gdbpy_source_script) Renamed from source_python_script, made static.
	New arg extlang.
	(gdbpy_before_prompt_hook): Renamed from before_prompt_hook.  Change
	result to int.  New arg extlang.
	(gdbpy_source_objfile_script): Renamed from
	source_python_script_for_objfile, made static.  New arg extlang.
	(gdbpy_start_type_printers): Renamed from start_type_printers, made
	static.  New args extlang, extlang_printers.  Change result type to
	"void".
	(gdbpy_apply_type_printers): Renamed from apply_type_printers, made
	static.  New arg extlang.  Rename arg printers to extlang_printers
	and change type to ext_lang_type_printers *.
	(gdbpy_free_type_printers): Renamed from free_type_printers, made
	static.  Replace argument arg with extlang, extlang_printers.
	(!HAVE_PYTHON, eval_python_from_control_command): Delete.
	(!HAVE_PYTHON, source_python_script): Delete.
	(!HAVE_PYTHON, gdbpy_should_stop): Delete.
	(!HAVE_PYTHON, gdbpy_breakpoint_has_py_cond): Delete.
	(!HAVE_PYTHON, start_type_printers): Delete.
	(!HAVE_PYTHON, apply_type_printers): Delete.
	(!HAVE_PYTHON, free_type_printers): Delete.
	(_initialize_python): Delete call to observer_attach_before_prompt.
	(finalize_python): Set/restore active extension language.
	(gdbpy_finish_initialization) Renamed from
	finish_python_initialization, made static.  New arg extlang.
	(gdbpy_initialized): New function.
	* python/python.h: #include "extension.h".  Delete #include
	"value.h", "mi/mi-cmds.h".
	(extension_language_python): Declare.
	(GDBPY_AUTO_FILE_NAME): Delete.
	(enum py_bt_status): Moved to extension.h and renamed to
	ext_lang_bt_status.
	(enum frame_filter_flags): Moved to extension.h.
	(enum py_frame_args): Moved to extension.h and renamed to
	ext_lang_frame_args.
	(finish_python_initialization): Delete.
	(eval_python_from_control_command): Delete.
	(source_python_script): Delete.
	(apply_val_pretty_printer): Delete.
	(apply_frame_filter): Delete.
	(preserve_python_values): Delete.
	(gdbpy_script_language_defn): Delete.
	(gdbpy_should_stop, gdbpy_breakpoint_has_py_cond): Delete.
	(start_type_printers, apply_type_printers, free_type_printers): Delete.

	* auto-load.c: #include "extension.h".
	(GDB_AUTO_FILE_NAME): Delete.
	(auto_load_gdb_scripts_enabled): Make public.  New arg extlang.
	(script_language_gdb): Delete, moved to extension.c and renamed to
	extension_language_gdb.
	(source_gdb_script_for_objfile): Delete.
	(auto_load_pspace_info): New member unsupported_script_warning_printed.
	(loaded_script): Change type of language member to
	struct extension_language_defn *.
	(init_loaded_scripts_info): Initialize
	unsupported_script_warning_printed.
	(maybe_add_script): Make static.  Change type of language arg to
	struct extension_language_defn *.
	(clear_section_scripts): Reset unsupported_script_warning_printed.
	(auto_load_objfile_script_1): Rewrite to use extension language API.
	(auto_load_objfile_script): Make public.  Remove support-compiled-in
	and auto-load-enabled checks, moved to auto_load_scripts_for_objfile.
	(source_section_scripts): Rewrite to use extension language API.
	(load_auto_scripts_for_objfile): Rewrite to use
	auto_load_scripts_for_objfile.
	(collect_matching_scripts_data): Change type of language member to
	struct extension_language_defn *.
	(auto_load_info_scripts): Change type of language arg to
	struct extension_language_defn *.
	(unsupported_script_warning_print): New function.
	(script_not_found_warning_print): Make static.
	(_initialize_auto_load): Rewrite construction of scripts-directory
	help.
	* auto-load.h (struct objfile): Add forward decl.
	(struct script_language): Delete.
	(struct auto_load_pspace_info): Add forward decl.
	(struct extension_language_defn): Add forward decl.
	(maybe_add_script): Delete.
	(auto_load_objfile_script): Declare.
	(script_not_found_warning_print): Delete.
	(auto_load_info_scripts): Update prototype.
	(auto_load_gdb_scripts_enabled): Declare.
	* python/py-auto-load.c (gdbpy_auto_load_enabled): Renamed from
	auto_load_python_scripts_enabled and made public.
	(script_language_python): Delete, moved to python.c.
	(gdbpy_script_language_defn): Delete.
	(info_auto_load_python_scripts): Update to use
	extension_language_python.

	* breakpoint.c (condition_command): Replace call to
	gdbpy_breakpoint_has_py_cond with call to get_breakpoint_cond_ext_lang.
	(bpstat_check_breakpoint_conditions): Replace call to gdbpy_should_stop
	with call to breakpoint_ext_lang_cond_says_stop.
	* python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Renamed
	from gdbpy_should_stop.  Change result type to enum scr_bp_stop.
	New arg slang.  Return SCR_BP_STOP_UNSET if py_bp_object is NULL.
	(gdbpy_breakpoint_has_cond): Renamed from gdbpy_breakpoint_has_py_cond.
	New arg slang.
	(local_setattro): Print name of extension language with existing
	stop condition.

	* valprint.c (val_print, value_print): Update to call
	apply_ext_lang_val_pretty_printer.
	* cp-valprint.c (cp_print_value): Update call to
	apply_ext_lang_val_pretty_printer.
	* python/py-prettyprint.c: Remove #ifdef HAVE_PYTHON.
	(gdbpy_apply_val_pretty_printer): Renamed from
	apply_val_pretty_printer.  New arg extlang.
	(!HAVE_PYTHON, apply_val_pretty_printer): Delete.

	* cli/cli-cmds.c (source_script_from_stream): Rewrite to use
	extension language API.
	* cli/cli-script.c (execute_control_command): Update to call
	eval_ext_lang_from_control_command.

	* mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Update to use
	enum ext_lang_bt_status values.  Update call to
	apply_ext_lang_frame_filter.
	(mi_cmd_stack_list_locals): Ditto.
	(mi_cmd_stack_list_args): Ditto.
	(mi_cmd_stack_list_variables): Ditto.
	* mi/mi-main.c: Delete #include "python/python-internal.h".
	Add #include "extension.h".
	(mi_cmd_list_features): Replace reference to python internal variable
	gdb_python_initialized with call to ext_lang_initialized_p.

	* stack.c (backtrace_command_1): Update to use enum ext_lang_bt_status.
	Update to use enum ext_lang_frame_args.  Update to call
	apply_ext_lang_frame_filter.
	* python/py-framefilter.c (extract_sym): Update to use enum
	ext_lang_bt_status.
	(extract_value, py_print_type, py_print_value): Ditto.
	(py_print_single_arg, enumerate_args, enumerate_locals): Ditto.
	(py_mi_print_variables, py_print_locals, py_print_args): Ditto.
	(py_print_frame): Ditto.
	(gdbpy_apply_frame_filter): Renamed from apply_frame_filter.
	New arg extlang.  Update to use enum ext_lang_bt_status.

	* top.c (gdb_init): Delete #ifdef HAVE_PYTHON call to
	finish_python_initialization.  Replace with call to
	finish_ext_lang_initialization.

	* typeprint.c (do_free_global_table): Update to call
	free_ext_lang_type_printers.
	(create_global_typedef_table): Update to call
	start_ext_lang_type_printers.
	(find_global_typedef): Update to call apply_ext_lang_type_printers.
	* typeprint.h (struct ext_lang_type_printers): Add forward decl.
	(type_print_options): Change type of global_printers from "void *"
	to "struct ext_lang_type_printers *".

	* value.c (preserve_values): Update to call preserve_ext_lang_values.
	* python/py-value.c: Remove #ifdef HAVE_PYTHON.
	(gdbpy_preserve_values): Renamed from preserve_python_values.
	New arg extlang.
	(!HAVE_PYTHON, preserve_python_values): Delete.

	* utils.c (quit_flag): Delete, moved to extension.c.
	(clear_quit_flag, set_quit_flag, check_quit_flag): Delete, moved to
	extension.c.

	* eval.c: Delete #include "python/python.h".
	* main.c: Delete #include "python/python.h".

	* defs.h: Update comment.

	testsuite/

	* gdb.python/py-breakpoint.exp (test_bkpt_eval_funcs): Update expected
	output.

	* gdb.gdb/python-interrupts.exp: New file.
2014-02-05 19:27:58 -08:00
Roland McGrath 4869db5e97 gdb: Support install-strip target
gdb/
	* configure.ac: Call AM_PROG_INSTALL_STRIP.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.
	* Makefile.in (install_sh, INSTALL_STRIP_PROGRAM, STRIP):
	New substituted	variables.
	(install-strip): New target.
	(INSTALL_SCRIPT): New substituted variable.
	(FLAGS_TO_PASS): Add it.
	(install-only): Use $(INSTALL_SCRIPT) rather than
	$(INSTALL_PROGRAM) for gcore.
2014-01-21 11:01:04 -08:00
Doug Evans d344e670e7 * configure.ac: Add comments delineating libpython and libmcheck.
* configure: Regenerate.
2013-11-28 14:30:59 -08:00
Steffen Sledz 92a021debf gdb: fix cygwin check in configure script
Avoid false positives if the search pattern "lose" is found in path
descriptions in comments generated by the preprocessor.

See <https://sourceware.org/bugzilla/show_bug.cgi?id=16152>.

gdb/
2013-11-27  Steffen Sledz  <sledz@dresearch-fe.de>

	* configure.ac: Tighten Cygwin detection check.
	* configure: Rebuild.
2013-11-27 18:51:49 +00:00
Tom Tromey 4ff70b847c sys/types.h cleanup
configure doesn't check for sys/types.h any more, but it still tries
to use the result of the check.  This removes that use as well.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Remove check of HAVE_SYS_TYPES_H.
2013-11-18 13:29:02 -07:00
Tom Tromey 3447c05797 don't check for unistd.h
We don't use the result of checking for unistd.h, so this removes the
check.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Don't check for unistd.h.
2013-11-18 13:29:02 -07:00
Tom Tromey 0080a2f671 stdlib.h is universal too
stdlib.h is universal as well, so there is no need to check for it.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Don't check for stdlib.h
	* defs.h: Include stdlib.h unconditionally.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Don't check for stdlib.h.
	* gdbreplay.c: Unconditionally include stdlib.h.
2013-11-18 13:29:02 -07:00
Tom Tromey 161d1bec16 don't check for stddef.h
gdb already unconditionally includes stddef.h in many places.
I think there is no reason to check for its existence.

Also, Zack Weinberg's header file survey agrees:

    http://hacks.owlfolio.org/header-survey/

This patch removes the configure check and the inclusion guards.
It also removes a redundant inclusion that I noticed in defs.h.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* config.in: Rebuild.
	* configure: Rebuild.
	* configure.ac: Don't check for stddef.h.
	* defs.h: Unconditionally include stddef.h.  Remove duplicate
	inclusion.
2013-11-18 13:29:01 -07:00
Tom Tromey 2978b11100 remove gdb_dirent.h
This removes gdb_dirent.h and updates the code to use dirent.h
instead.  It also removes the now-useless configure checks.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* common/common.m4 (GDB_AC_COMMON): Don't use AC_HEADER_DIRENT.
	* common/gdb_dirent.h: Remove.
	* common/filestuff.c: Use dirent.h.
	* common/linux-osdata.c: Use dirent.h.
	(NAMELEN): Define.
	* config.in: Rebuild.
	* configure: Rebuild.
	* configure.ac: Don't use AC_HEADER_DIRENT.
	* linux-fork.c: Use dirent.h
	* linux-nat.c: Use dirent.h.
	* nto-procfs.c: Use dirent.h.
	* procfs.c: Use dirent.h.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* config.in: Rebuild.
	* configure: Rebuild.
	* configure.ac: Don't use AC_HEADER_DIRENT.
2013-11-18 13:29:01 -07:00
Tom Tromey a3d08894e5 don't check for string.h or strings.h
Now that we are using the gnulib string.h module, we don't need to
check for string.h or strings.h.  This removes the last few checks
from the source and from the configure scripts.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* common/common.m4 (GDB_AC_COMMON): Don't check for string.h or
	strings.h.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* server.h: Don't check HAVE_STRING_H.
	* gdbreplay.c: Don't check HAVE_STRING_H.
	* configure: Rebuild.
2013-11-18 13:29:01 -07:00
Tom Tromey 99c1d4518b fix "tkill" check
An earlier patch removed the check for "syscall" since the results
were not used in the C code.  However, the result was used, via the
cache variable, elsewhere in configure.

This patch fixes the problem by checking for "syscall" at the point at
which HAVE_TKILL_SYSCALL is defined.

2013-11-11  Tom Tromey  <tromey@redhat.com>

	* config.in, configure: Rebuild.
	* configure.ac (HAVE_TKILL_SYSCALL): Check for "syscall".
2013-11-11 07:35:57 -07:00
Tom Tromey 9467110bae gdb configure updates
Now that the configury needed for the "common" and "target"
directories is in common.m4, some code in gdb's configure.ac is
redundant.

I ran this script after making an "ID" file using mkid:

   sed -n 's/^.*\(HAVE_[A-Z0-9_]*\).*$/\1/p' config.in |
   while read x; do
     echo ===== $x
     gid $x | egrep -v '^(testsuite|gnulib|common|target|gdbserver)/'
   done

This finds all the spots using HAVE_ defines, and, more importantly,
makes it clear which defines aren't used in the main parts of gdb.

From this I came up with this patch to remove all the unused bits.

There are a few that are subtly used -- for example the configure
script sometimes checks internal configure cache variables, meaning
some checks cannot be removed.

2013-11-08  Tom Tromey  <tromey@redhat.com>

	* configure, config.in: Rebuild.
	* configure.ac: Remove unused configury.
2013-11-08 12:30:02 -07:00
Tom Tromey 9b4bea7218 remove link.h checks
The removal of solib-sunos.c also removed the last user of various
macros defined by configure.

This patch removes the corresponding configure code.

2013-11-08  Tom Tromey  <tromey@redhat.com>

	* configure, config.in: Rebuild.
	* configure.ac: Remove all link.h-related checks.
2013-11-08 12:29:42 -07:00
Tom Tromey 3266f10be2 introduce common.m4
It has bothered me for a while that files in common/ use macros
defined via autoconf checks, but rely on each configure.ac doing the
proper checks independently.

This patch introduces common/common.m4 which consolidates the checks
assumed by code in common.

The rule I propose is that if something is needed or used by common,
it should be checked for by common.m4.  However, if the check is also
needed by gdb or gdbserver, then it should be duplicated there.

Built and regtested on x86-64 Fedora 18 (though this is hardly the
most strenuous case) and using the Fedora 18 mingw cross compilers.  I
also examined the config.in diffs to ensure that symbols did not go
missing.

2013-11-08  Tom Tromey  <tromey@redhat.com>

	* acinclude.m4: Include common.m4.
	* common/common.m4: New file.
	* configure, config.in: Rebuild.
	* configure.ac: Use GDB_AC_COMMON.

2013-11-08  Tom Tromey  <tromey@redhat.com>

	* acinclude.m4: Include common.m4, codeset.m4.
	* configure, config.in: Rebuild.
	* configure.ac: Use GDB_AC_COMMON.
2013-11-08 12:29:26 -07:00
Stan Shebs 0a7cfe2cf5 * README: Update references to writing code for GDB.
* configure.ac (build_warnings): Remove obsolete comment.
	* configure: Regenerate.
	* gdbarch.sh: Remove references to gdbint.texinfo.
	* gdbarch.h: Regenerate.
	* gdbtypes.c (objfile_type): Remove comments referencing internals
	manual and D10V.

	[gdb/doc]
	Remove the internals manual gdbint.texinfo.
	* Makefile.in (INFO_DEPS): Remove gdbint.info.
	(PDFFILES): Remove gdbint.pdf.
	(HTMLFILES): Remove gdbint/index.html.
	(HTMLFILES_INSTALL): Remove gdbint.
	(GDBINT_DOC_FILES): Remove.
	(dvi): Remove gdbint.dvi.
	(ps): Remove gdbint.ps.
	* gdbint.texinfo: Remove file.
	* gdb.texinfo (Maintenance Commands): Remove reference to gdbint.
2013-09-16 18:00:34 +00:00
Yao Qi 7b00db47ce gdb/
* config/djgpp/fnchange.lst: Remove entry of
	i386-interix-nat.c and i386-interix-tdep.c.
	* configure.ac: Remove '*-*-interix*'.
	* configure: Re-generated.
	* defs.h (enum gdb_osabi): Remove GDB_OSABI_INTERIX.
	* i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Remove
	obsolete comments.
	* osabi.c (gdb_osabi_names): Remove "Interix".
2013-09-02 23:07:07 +00:00
Luis Machado 96d7229d2a Unify ptrace options discovery code and make both GDB and
gdbserver use it.

	gdb/
	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-nat.h and
	nat/linux-waitpid.h.
	(linux-waitpid.o): New object file rule.
	* common/linux-ptrace.c: Include nat/linux-waitpid.h.
	(current_ptrace_options): Moved from linux-nat.c.
	(linux_ptrace_test_ret_to_nx): Use type casts for ptrace
	parameters.
	(linux_fork_to_function): New function.
	(linux_grandchild_function): Likewise.
	(linux_child_function): Likewise.
	(linux_check_ptrace_features): New function, heavily
	based on linux-nat.c:linux_test_for_tracefork.
	(linux_enable_event_reporting): New function.
	(ptrace_supports_feature): Likewise.
	(linux_supports_tracefork): Likewise.
	(linux_supports_traceclone): Likewise.
	(linux_supports_tracevforkdone): Likewise.
	(linux_supports_tracesysgood): Likewise.
	* common/linux-ptrace.h (HAS_NOMMU): Moved from
	gdbserver/linux-low.c.
	(linux_enable_event_reporting): New declaration.
	(linux_supports_tracefork): Likewise.
	(linux_supports_traceclone): Likewise.
	(linux_supports_tracevforkdone): Likewise.
	(linux_supports_tracesysgood): Likewise.
	* config.in (PTRACE_TYPE_ARG4): Regenerate.
	* config/aarch64/linux.mh (NATDEPFILES): Add linux-waitpid.o.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
	* config/arm/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* config/ia64/linux.mh (NATDEPFILES): Likewise.
	* config/m32r/linux.mh (NATDEPFILES): Likewise.
	* config/m68k/linux.mh (NATDEPFILES): Likewise.
	* config/mips/linux.mh (NATDEPFILES): Likewise.
	* config/pa/linux.mh (NATDEPFILES): Likewise..
	* config/powerpc/linux.mh (NATDEPFILES): Likewise..
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
	* config/sparc/linux.mh (NATDEPFILES): Likewise.
	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
	* config/xtensa/linux.mh (NATDEPFILES): Likewise.
	* configure.ac (AC_CACHE_CHECK): Add void * to the list of
	ptrace's 4th argument's types.
	Check the type of PTRACE_TYPE_ARG4.
	* configure: Regenerate.
	* linux-nat.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
	(SYSCALL_SIGTRAP): Moved to nat/linux-nat.h.
	(linux_supports_tracefork_flag): Remove.
	(linux_supports_tracesysgood_flag): Likewise.
	(linux_supports_tracevforkdone_flag): Likewise.
	(current_ptrace_options): Moved to
	common/linux-ptrace.c.
	(linux_tracefork_child): Remove.
	(my_waitpid): Remove.
	(linux_test_for_tracefork): Renamed to
	linux_check_ptrace_features and moved to common/linux-ptrace.c.
	(linux_test_for_tracesysgood): Remove.
	(linux_supports_tracesysgood): Remove.
	(linux_supports_tracefork): Remove.
	(linux_supports_tracevforkdone): Remove.
	(linux_enable_tracesysgood): Remove.
	(linux_enable_event_reporting): Remove.
	(linux_init_ptrace): New function.
	(linux_child_post_attach): Call linux_init_ptrace.
	(linux_child_post_startup_inferior): Call linux_init_ptrace.
	(linux_child_follow_fork): Call linux_supports_tracefork
	and linux_supports_tracevforkdone.
	(linux_child_insert_fork_catchpoint): Call
	linux_supports_tracefork.
	(linux_child_insert_vfork_catchpoint): Likewise.
	(linux_child_set_syscall_catchpoint): Call
	linux_supports_tracesysgood.
	(lin_lwp_attach_lwp): Call linux_supports_tracefork.
	* nat/linux-nat.h: New file.
	* nat/linux-waitpid.c: New file.
	* nat/linux-waitpid.h: New file.

	gdb/gdbserver/
	* Makefile.in: Explain why ../target and ../nat are not
	listed as include file search paths.
	(linux-waitpid.o): New object file rule.
	* configure.srv (srv_native_linux_obj): New variable.
	Replace all occurrences of linux native object files with
	$srv_native_linux_obj.
	* linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
	(HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
	(linux_enable_event_reporting): Remove declaration.
	(my_waitpid): Moved to common/linux-waitpid.c.
	(linux_wait_for_event): Pass ptid when calling
	linux_enable_event_reporting.
	(linux_supports_tracefork_flag): Remove.
	(linux_enable_event_reporting): Likewise.
	(linux_tracefork_grandchild): Remove.
	(STACK_SIZE): Moved to common/linux-ptrace.c.
	(linux_tracefork_child): Remove.
	(linux_test_for_tracefork): Remove.
	(linux_look_up_symbols): Call linux_supports_traceclone.
	(initialize_low): Remove call to linux_test_for_tracefork.
	* linux-low.h (PTRACE_TYPE_ARG3): Move to
	common/linux-ptrace.h.
	(PTRACE_TYPE_ARG4): Likewise.
	Include linux-ptrace.h.
2013-08-22 23:46:30 +00:00
Ulrich Weigand b08ee99f15 2013-08-07 Raunaq Bathija <raunaq12@in.ibm.com>
Ulrich Weigand  <uweigand@de.ibm.com>

	* gdb_ptrace.h: Use ptrace64 instead of ptrace if HAVE_PTRACE64
	is defined.
	* rs6000-nat.c: Check for __ld_info64_ if compiling 64 BIT gdb.
	(rs6000_ptrace32): Call ptrace64 instead of ptrace if present.
	(rs6000_ptrace64): Call ptace64 instead of ptracex if present.
	* configure.ac: Check for ptrace64.
	* configure, config.in: Regenerate.
2013-08-07 14:39:57 +00:00
Pedro Alves 17ef446eed On mainline/development, also link GDBserver with -lmcheck.
This factors --enable-libmcheck related bits from GDB's configure.ac
and makes GDBserver use them too.  Specifically, the 'development'
global is moved to a separate script to it can be sourced by both GDB
and GDBserver, and the --enable-libmcheck/--disable-libmcheck bits
proper are moved to a new m4 file.

I started out by defining 'development' in the m4 file, but in the end
decided against it, as a separate script has the advantage that
changing it in release branches does not require regenerating
configure, unlike today.

I had also started out by making the new GDB_AC_LIBMCHECK itself
handle the yes/no default fallback depending on release/developement,
but since I had split out 'development' to a separate script, and, GDB
needs the python checks anyway (hence we'd need to do the python
checks in gdb's configure.ac, and pass in a 'default lmcheck yes/no'
parameter to GDB_AC_LIBMCHECK anyway), I ended up keeping
GDB_AC_LIBMCHECK isolated from the 'development' global.  IOW, it's
the caller's business to handle it.

Tested on x86_64 Fedora 17.  Built GDB and GDBserver with and without
--enable-libmcheck, and observed --enable-libmcheck overrides the
disablement of -lmcheck caused by python supporting threads, and that
GDBserver links with -lmcheck when expected.  Also observed that
changing the 'development' global, and issuing "make" triggers a
relink, and '-lmcheck' is included or not from the link accordingly.

gdb/
2013-07-03  Pedro Alves  <palves@redhat.com>

	* Makefile.in (config.status): Depend on development.sh.
	(aclocal_m4_deps): Add libmcheck.m4.
	* acinclude.m4: Include libmcheck.m4.
	* configure.ac: Source development.sh instead of setting
	'development' here.  --enable-libmcheck/--disable-libmcheck code
	factored out to GDB_AC_LIBMCHECK.  Run it.
	* development.sh: New file.
	* libmcheck.m4: New file.
	* configure: Regenerate.

gdb/gdbserver/
2013-07-03  Pedro Alves  <palves@redhat.com>

	* Makefile.in (config.status): Depend on development.sh.
	* acinclude.m4: Include libmcheck.m4.
	* configure: Regenerate.
2013-07-03 13:25:46 +00:00
Tom Tromey dd9aa0484e add -Wold-style-definition
This adds -Wold-style-definition to gdb's list of warnings.  This
found a couple of spots where "()" was used where "(void)" is more
correct.

Tested by rebuilding on x86-64 Fedora 18.

	* configure.ac (build_warnings): Add -Wold-style-definition.
	* configure: Rebuild.
	* machoread.c (_initialize_machoread): Use "(void)".
	* macrocmd.c (macro_inform_no_debuginfo): Fix formatting;
	use "(void)".
2013-07-01 19:52:32 +00:00
Tom Tromey 44d100c3b9 add -Wold-style-declaration
This adds -Wold-style-declaration to gdb's list of warnings.

It turns out that a few places use "const static" rather than
"static const".  The former is deprecated according to the C standard.

Tested by rebuilding with --enable-targets=all on x86-64 Fedora 18.

	* configure.ac (build_warnings): Add -Wold-style-declaration.
	* configure: Rebuild.
	* dsrec.c (make_srec): Use "static const", not "const static".
	* h8300-tdep.c (h8300_breakpoint_from_pc): Use "static const",
	not "const static".
	* mi/mi-parse.c (mi_no_values, mi_simple_values, mi_all_values):
	Use "static const", not "const static".
	* mn10300-tdep.c (mn10300_breakpoint_from_pc): Use "static const",
	not "const static".
	* moxie-tdep.c (moxie_breakpoint_from_pc): Use "static const",
	not "const static".
	* rs6000-tdep.c (rs6000_breakpoint_from_pc): Use "static const",
	not "const static".
	* v850-tdep.c (v850_breakpoint_from_pc): Use "static const",
	not "const static".
	(v850_dbtrap_breakpoint_from_pc): Likewise.
	* xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Use "static const",
	not "const static".
2013-07-01 19:50:11 +00:00
Tom Tromey 2945b8076c add -Wmissing-parameter-type
This adds -Wmissing-parameter-type to gdb's list of warnings.

This one doesn't happen to trigger for a --enable-targets=all build on
x86-64 Fedora 18.

	* configure.ac (build_warnings): Add -Wmissing-parameter-type.
	* configure: Rebuild.
2013-07-01 19:48:05 +00:00
Pedro Alves e655c1a2f5 Reimplement DJGPP's .gdbinit -> gdb.ini renaming.
This simplifies the .gdbinit filename selection logic.

We have a GDBINIT_FILENAME define that supposedly configurations would
override, but none do so.  Instead, the only configuration that wants
a different file name instead of ".gdbinit", djgpp, does a strcpy over
the gdbinit global array.  This means the array needs to be sized, and
the code that does that is doing the usual
'PATH_MAX/FILENAME_MAX/fallback constant/etc.' mess.

Instead of all that, it's much simpler to have configure specificy the
.gdbinit filename.  As bonus, we can then make the "gdbinit" global
array const.

gdb/
2013-07-01  Pedro Alves  <palves@redhat.com>

	* configure.ac (GDBINIT): Define, depending on host.
	* go32-nat.c (init_go32_ops): Don't override gdbinit here.
	* top.c (PATH_MAX): Delete fallback definition.
	(GDBINIT_FILENAME): Delete.
	(gdbinit): Reimplement as const char array set to the GDBINIT
	string constant.
	* top.h (gdbinit): Make const.
2013-07-01 11:24:17 +00:00
Pedro Alves 8658d16d9d common/filestuff.c: No sockets on DJGPP.
Building gdb with --host=i586-pc-msdosdjgpp ends up with:

 i586-pc-msdosdjgpp-gcc -g -O2 -I../../src/gdb/config/djgpp  -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber -I./../intl -I../../src/gdb/gnulib/import -Ibuild-gnulib/import    -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Werror -c -o filestuff.o -MT filestuff.o -MMD -MP -MF .deps/filestuff.Tpo ../../src/gdb/common/filestuff.c
 ../../src/gdb/common/filestuff.c:38:24: fatal error: sys/socket.h: No such file or directory

There are no sockets on djgpp.  This #ifdef's out the bits in the file
that use sockets, depending on whether winsock or sys/socket.h is
available.

As alternative approach, given ser-tcp.c, ser-pipe.c, etc. are split
into separate files, and which to use is selected by configure.ac:

 dnl Figure out which of the many generic ser-*.c files the _host_ supports.
 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
 case ${host} in
  *go32* ) SER_HARDWIRE=ser-go32.o ;;
  *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
  *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
 esac
 AC_SUBST(SER_HARDWIRE)

... I considered splitting filestuff.c similarly.  But I quickly gave
up on the idea, as it looked like a lot more complication over this
approach, for no real gain.  Plus, there are uses of these functions
outside the ser*.c framework.

gdbserver's configure.ac is already checking for sys/socket.h.

gdb/
2013-05-23  Pedro Alves  <palves@redhat.com>

	* common/filestuff.c [USE_WIN32API]: Define HAVE_SOCKETS.
	[HAVE_SYS_SOCKET_H]: Define HAVE_SOCKETS.
	(socket_mark_cloexec, gdb_socketpair_cloexec, gdb_socket_cloexec):
	Only define if HAVE_SOCKETS is defined.
	* configure.ac: Check for sys/socket.h.
	* config.in, configure: Regenerate.
2013-05-23 18:37:00 +00:00
H.J. Lu a48b32c068 Replace hardcoded -ldl with check for availability
2013-05-17  Pavel Chupin  <pavel.v.chupin@intel.com>

	* acinclude.m4: Add check for dlopen in libdl.
	* configure.ac: Ditto.
	* configure: Regenerate.
2013-05-17 16:24:21 +00:00
Thomas Schwinge 036c3acbab gdb/
2013-05-16  Yue Lu  <hacklu.newborn@gmail.com>

	* configure.ac: Ensure MIG is available when building for GNU Hurd
	hosts.
	* configure: Regenerate.
2013-05-16 21:54:34 +00:00
Tom Tromey d3685d60d6 gdb
Freddie Chopin  <freddie_chopin@op.pl>
	PR build/15414:
	* configure: Rebuild.
	* configure.ac (build_warnings): Do not use -Wformat-nonliteral
	with -Wno-format.
sim/common
	* acinclude.m4 (SIM_AC_OPTION_WARNINGS): Do not use
	-Wformat-nonliteral with -Wno-format.
sim/bfin
	* configure: Rebuild.
sim/cr16
	* configure: Rebuild.
sim/cris
	* configure: Rebuild.
sim/d10v
	* configure: Rebuild.
sim/igen
	* configure: Rebuild.
sim/m68hc11
	* configure: Rebuild.
sim/mips
	* configure: Rebuild.
sim/mn10300
	* configure: Rebuild.
sim/v850
	* configure: Rebuild.
2013-05-10 16:10:40 +00:00
Joel Brobecker c1357578b3 move sparc-sol-thread.c back into sol-thread.c.
The routines in sparc-sol-thread used to be SPARC-specific (and
documented as such in the ptrace man page), and therefore hosting them
in a sparc-specific file made sense.  However, newer versions of
Solaris now use those callbacks (Solaris 10 Update 10, apparently),
and thus the note about these callbacks being specific to SPARC
was removed.

So this patch deletes sparc-sol-thread.c and moves the code back
inside sol-thread.c.

gdb/ChangeLog:

        PR tdep/15420:
        * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs):
        New functions, directly copied from sparc-sol-thread.c.
        * sparc-sol-thread.c: Delete.
        * configure.ac: Remove code handling sparc-solaris-thread.c.
        * configure: Regenerate.
2013-05-10 12:10:20 +00:00
Tom Tromey 614c279dda PR gdb/7912:
* Makefile.in (SFILES): Add filestuff.c
	(COMMON_OBS): Add filestuff.o.
	(filestuff.o): New target.
	* auto-load.c (auto_load_objfile_script_1): Use
	gdb_fopen_cloexec.
	* auxv.c (procfs_xfer_auxv): Use gdb_open_cloexec.
	* cli/cli-cmds.c (shell_escape): Call close_most_fds.
	* cli/cli-dump.c (fopen_with_cleanup): Use gdb_fopen_cloexec.
	* common/agent.c (gdb_connect_sync_socket): Use
	gdb_socket_cloexec.
	* common/filestuff.c: New file.
	* common/filestuff.h: New file.
	* common/linux-osdata.c (linux_common_core_of_thread)
	(command_from_pid, commandline_from_pid, print_source_lines)
	(linux_xfer_osdata_shm, linux_xfer_osdata_sem)
	(linux_xfer_osdata_msg, linux_xfer_osdata_modules): Use
	gdb_fopen_cloexec.
	* common/linux-procfs.c (linux_proc_get_int)
	(linux_proc_pid_has_state): Use gdb_fopen_cloexec.
	* config.in, configure: Rebuild.
	* configure.ac: Don't check for sys/socket.h.  Check for
	fdwalk, pipe2.
	* corelow.c (core_open): Use gdb_open_cloexec.
	* dwarf2read.c (write_psymtabs_to_index): Use gdb_fopen_cloexec.
	* fork-child.c (fork_inferior): Call close_most_fds.
	* gdb_bfd.c (gdb_bfd_open): Use gdb_open_cloexec.
	* inf-child.c (inf_child_fileio_readlink): Use gdb_open_cloexec.
	* linux-nat.c (linux_nat_thread_name, linux_proc_pending_signals):
	Use gdb_fopen_cloexec.
	(linux_proc_xfer_partial, linux_proc_xfer_spu): Use
	gdb_open_cloexec.
	(linux_async_pipe): Use gdb_pipe_cloexec.
	* remote-fileio.c (remote_fileio_func_open): Use
	gdb_open_cloexec.
	* remote.c (remote_file_put, remote_file_get): Use
	gdb_fopen_cloexec.
	* ser-pipe.c (pipe_open): Use gdb_socketpair_cloexec,
	close_most_fds.
	* ser-tcp.c (net_open): Use gdb_socket_cloexec.
	* ser-unix.c (hardwire_open): Use gdb_open_cloexec.
	* solib.c (solib_find): Use gdb_open_cloexec.
	* source.c (openp, find_and_open_source): Use gdb_open_cloexec.
	* tracepoint.c (tfile_start): Use gdb_fopen_cloexec.
	(tfile_open): Use gdb_open_cloexec.
	* tui/tui-io.c (tui_initialize_io): Use gdb_pipe_cloexec.
	* ui-file.c (gdb_fopen): Use gdb_fopen_cloexec.
	* xml-support.c (xml_fetch_content_from_file): Use
	gdb_fopen_cloexec.
	* main.c (captured_main): Call notice_open_fds.
gdbserver
	* Makefile.in (SFILES): Add filestuff.c.
	(OBS): Add filestuff.o.
	(filestuff.o): New target.
	* config.in, configure: Rebuild.
	* configure.ac: Check for fdwalk, pipe2.
2013-04-22 16:46:15 +00:00
Pedro Alves bd3f3b5535 Enable -Wpointer-sign by default.
This enables -Wpointer-sign by default.

I've checked that --enable-targets=all builds fine with the following
as --host, on x86_64 Fedora 17 --build:

x86_64 GNU/Linux
i386 GNU/Linux
i386 MinGW-w64
i386 msdos/djgpp

OK?

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

	* configure.ac (build_warnings): Replace -Wno-pointer-sign with
	-Wpointer-sign.
	* configure: Regenerate.

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

	* gdbint.texinfo (Misc Guidelines) <Compiler Warnings>: Replace
	-Wno-pointer-sign text with text on -Wpointer-sign.
2013-04-19 18:32:54 +00:00
Jan Kratochvil b292c78318 gdb/
* Makefile.in (HAVE_NATIVE_GCORE_TARGET): New.
	(generated_files): Add gcore.
	(install-only, uninstall): Add gcore if HAVE_NATIVE_GCORE_TARGET or
	HAVE_NATIVE_GCORE_HOST.
	(gcore): New.
	* NEWS (Changes since GDB 7.6): Mention newly installed gcore.
	* config/alpha/alpha-osf3.mh, config/i386/fbsd.mh,
	config/i386/fbsd64.mh, config/i386/i386gnu.mh, config/i386/i386sol2.mh,
	config/i386/sol2-64.mh, config/mips/irix5.mh, config/mips/irix6.mh,
	config/powerpc/fbsd.mh, config/sparc/fbsd.mh, config/sparc/sol2.mh:
	Add HAVE_NATIVE_GCORE_HOST.
	* configure: Regenerate.
	* configure.ac (HAVE_NATIVE_GCORE_TARGET): New, set it, AC_SUBST it.
	New AC_SUBST fir GDB_TRANSFORM_NAME and GCORE_TRANSFORM_NAME.  New
	AC_CONFIG_FILES for gcore.
	* configure.tgt: Add gdb_have_gcore to the initial comment.  Set
	gdb_have_gcore.
	* gdb_gcore.sh: Rename to ...
	* gcore.in: ... here.  Remove gcore.sh comment.  Use GDB_TRANSFORM_NAME
	and GCORE_TRANSFORM_NAME substitutions.

gdb/doc/
	* Makefile.in (MAN1S): Add gcore.1.
	Remove "Host, target, and site specific Makefile fragments" comment.
	(@host_makefile_frag@, HAVE_NATIVE_GCORE_TARGET): New.
	(install-man1, uninstall-man1): Conditionalize gcore.1.
	(gcore.1): New.
	* gdb.texinfo (Man Pages): Add gcore man.
	(gcore man): New node.
2013-04-11 14:13:44 +00:00
Yao Qi 393fd4c376 gdb/
2013-04-10  Hui Zhu  <hui@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* configure.ac: Check libbabeltrace is installed.
	* config.in: Regenerate.
	* configure: Regenerate.
	* Makefile.in (LIBBABELTRACE): New.
	(CLIBS): Add LIBBABELTRACE.
	* ctf.c: Include "exec.h".
	(CTF_EVENT_ID_STATUS, CTF_EVENT_ID_TSV_DEF): New macros.
	(CTF_EVENT_ID_TP_DEF, ctf_save_write_int32): New macros.
	(ctf_save_metadata_header): Define new type aliases in
	metadata.
	(ctf_write_header): Define event type "tsv_def" and "tp_def"
	in metadata.  Start a new faked packet for trace status.
	(ctf_write_status): Write trace status to CTF.
	(ctf_write_uploaded_tsv): Write TSV to CTF.
	(ctf_write_uploaded_tp): Write tracepoint definition to CTF.
	(ctf_write_definition_end): End the faked packet.

	(ctx, ctf_iter, trace_dirname): New.
	(start_pos): New variable.
	(ctf_destroy, ctf_open_dir, ctf_open): New.
	(SET_INT32_FIELD, SET_ARRAY_FIELD, SET_STRING_FIELD): New
	macros.
	(ctf_read_tsv, ctf_read_tp, ctf_close, ctf_files_info): New.
	(ctf_fetch_registers, ctf_xfer_partial): New.
	(ctf_get_trace_state_variable_value): New.
	(ctf_get_tpnum_from_frame_event): New.
	(ctf_get_traceframe_address): New.
	(ctf_trace_find, ctf_has_stack): New.
	(ctf_has_registers, ctf_traceframe_info, init_ctf_ops): New.
	(ctf_get_trace_status, ctf_read_status): New.
	(_initialize_ctf): New.
	* tracepoint.c (get_tracepoint_number): New
	(get_uploaded_tsv): Remove 'static'.
 	(struct traceframe_info, trace_regblock_size): Move it to ...
	* tracepoint.h: ... here.
	(get_tracepoint_number): Declare it.
	(get_uploaded_tsv): Declare it.

	* NEWS: Mention new configure option.

gdb/doc/

2013-04-10  Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (Trace Files): Add "target ctf".

gdb/testsuite/

2013-04-10  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/actions.exp: Save trace data to CTF.
	Change to ctf target if GDB supports, read CTF data in ctf
	target, and check the actions of tracepoints.
	* gdb.trace/while-stepping.exp: Likewise.
	* gdb.trace/report.exp: Test GDB saves trace data to CTF
	format and read CTF trace file if GDB supports.
	* gdb.trace/tstatus.exp: Save trace data to CTF.  If ctf
	target is supported, change to ctf target, read trace data and
	check output of command "tstatus".
	* gdb.trace/tsv.exp: Save trace frame to CTF.  If GDB supports,
	read CTF data by target ctf and call check_tsv.
2013-04-10 09:42:57 +00:00
Jan Kratochvil 8c1fb15545 gdb/
* configure: Regenerate.
	* configure.ac (check dynamic export flag): Link python test with
	$PYTHON_LIBS.
2013-03-11 18:49:37 +00:00
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
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 38ea300a20 2012-04-20 Pedro Alves <palves@redhat.com>
gdb/
	* acx_configure_dir.m4 (ACX_CONFIGURE_DIR): Handle absolute
	$srcdir.
	* configure: Regenerate.

	gdb/gdbserver/
	* configure: Regenerate.
2012-04-20 17:58:49 +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
Pedro Alves 770d76d7b2 2012-04-18 Pedro Alves <palves@redhat.com>
Update gnulib from latest git.
	(639ea5ae15e39fe48d43e04864b2997301e4b969)

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

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

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

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

	* gdbserver/aclocal.m4: Regenerate.
	* gdbserver/config.in: Regenerate.
	* gdbserver/configure: Regenerate.
2012-04-18 20:45:25 +00:00
Pedro Alves 174e088e25 2012-04-18 Pedro Alves <palves@redhat.com>
Reimport the update-copyright module from gnulib
	(250b80067c1e1d8faa0c42fb572f721975b929c5).

	* configure: Regenerate.
	* gnulib/Makefile.am: Update.
	* gnulib/Makefile.in: Regenerate.
	* gnulib/extra/update-copyright: Update.
	* gnulib/m4/gnulib-cache.m4: Update.
	* gnulib/m4/gnulib-comp.m4: Update.
2012-04-18 20:06:39 +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
Yao Qi 55a8c0761d gdb/
Import gnulib module inttypes from git
	(250b80067c1e1d8faa0c42fb572f721975b929c5)
	* Makefile.in (HFILES_NO_SRCDIR): Add gnulib/inttypes.in.h.
	(aclocal_m4_deps): Add gnulib/m4/inttypes.m4 and gnulib/m4/inttypes-pri.m4
	* aclocal.m4, config.in, configure: Regenerated.
	* gnulib/Makefile.am: Update.
	* gnulib/Makefile.in: Update.
	* gnulib/m4/gnulib-cache.m4: Update.
	* gnulib/m4/gnulib-comp.m4: Update.
	* gnulib/inttypes.in.h: New.
	* gnulib/m4/inttypes-pri.m4: New.
 	* gnulib/m4/inttypes.m4: New.

gdb/gdbserver/
	Import gnulib module inttypes.
	* aclocal.m4, config.in, configure: Regenerated.
2012-04-14 05:24:57 +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
Jan Kratochvil b161e06ff6 gdb/
* configure: Regenerate.
	* config.in: Regenerate.
2012-01-12 23:38:47 +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
Jan Kratochvil cc88a640ca Imported readline 6.2, and upstream patch 001.
[patch 0/3] readline-6.2 rebase
http://sourceware.org/ml/gdb-patches/2011-05/msg00003.html
[patch 1/3] readline-6.2: Merge of already posted patches
http://sourceware.org/ml/gdb-patches/2011-05/msg00004.html
	=
	[Bug-readline] [RFC/readline] bind.c, rl_function_dumper, Free allocated
	http://lists.gnu.org/archive/html/bug-readline/2011-03/msg00000.html
	[Bug-readline] [patch] Fix underquotation in readline/examples/rlfe/conf
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00001.html
	[Bug-readline] [patch] Makefile.in htm<->html
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00002.html
	Re: [Bug-readline] [patch] Makefile.in dependency: callback.o: xmalloc.h
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00004.html
	[Bug-readline] [patch] Remove . from the VPATH directive
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00005.html
	Eli Zaretskii's __MSDOS__ / __GO32__ / __MINGW32__ / __DJGPP__ stuff:
	http://sourceware.org/ml/gdb/2011-04/msg00002.html
	Jan Kratochvil's patch for FSF GDB tree local-specific changes:
	http://sourceware.org/ml/gdb/2011-04/msg00006.html
	Preservation of existing ChangeLog.gdb files, their updates.
[patch 2/3] readline-6.2: Workaround "ask" regression
http://sourceware.org/ml/gdb-patches/2011-05/msg00005.html
[patch 3/3] readline-6.2: Revert 5.x compat., apply 6.x compat.
http://sourceware.org/ml/gdb-patches/2011-05/msg00006.html
[patch 4/3] readline-6.2: Substitute inc-hist.texinfo
http://sourceware.org/ml/gdb-patches/2011-05/msg00010.html

readline/
	Workaround gdb.base/completion.exp regression on readline-6.2.
	* complete.c (get_y_or_n): Disable the return on RL_STATE_CALLBACK.

	Imported readline 6.2, and upstream patch 001.
	* configure: Regenerate.

readline/doc/
	* hsuser.texi (Using History Interactively): Disable !BashFeatures
	@defcodeindex.  Make the `Programming with GNU History' reference
	external.
	* inc-hist.texinfo: Remove.

	Imported readline 6.2, and upstream patch 001.

readline/examples/
	Imported readline 6.2, and upstream patch 001.

readline/examples/rlfe/
	Imported readline 6.2, and upstream patch 001.

gdb/
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac <--with-system-readline> (for readline_echoing_p):
	Remove the test.
	* tui/tui-io.c (tui_old_readline_echoing_p): Rename to ...
	(tui_old_rl_echoing_p): ... here.
	(tui_setup_io): Rename extern declaration readline_echoing_p to
	_rl_echoing_p.  Adjust assignments for the both renames.

gdb/doc/
	* Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to
	hsuser.texi.
	* gdb.texinfo <!SYSTEM_READLINE>: Rename inc-hist.texinfo inclusion and
	comment to hsuser.texi.  Change rluser.texi name in the comment.
2011-05-11 23:38:44 +00:00
Doug Evans 478aac75e4 * NEWS: Mention --with-iconv-bin.
* configure.ac: New option --with-iconv-bin.
	* configure: Regenerate.
	* config.in: Regenerate.
	* defs.h (relocate_gdb_directory): Declare.
	* main.c (relocate_gdb_directory): Renamed from relocate_directory,
	removed progname parameter, and exported.  All callers updated.
	* charset.c (find_charset_names): Use --with-iconv-bin if specified.

	doc/
	* gdb.texinfo (Requirements): Fix typo.  Mention --with-iconv-bin.
2011-05-09 21:49:57 +00:00
Joel Brobecker d645e32eb8 Add 'getthrds' declaration check in configure for AIX
On newer versions of AIX (6.x and later), this function is actually
declared in procinfo.h, thus causing a compilation warning when we
re-declare it ourselves. This patch adds a configure check for that
function allowing us to declare the function only if the declaration
isn't already present in one of procinfo system header.

gdb/ChangeLog:

        PR gdb/12116:
        * configure.ac: Add getthrds declaration check.
        * configure, config.in: Regenerate.
        * aix-thread.c (getthrds): Declare only if not already declared
        in procinfo.h.  More declaration out of get_signaled_thread to
        global scope.
2011-03-17 13:19:10 +00:00
Yao Qi e637a4f593 gdb/
2011-03-09  Yao Qi  <yao@codesourcery.com>

	Revert:
	2011-02-11  Yao Qi  <yao@codesourcery.com>

	* common/Makefile.in: Add copyright header.

	2011-02-11  Yao Qi  <yao@codesourcery.com>

	* Makefile.in: Remove signals.o from COMMON_OBS.  Link
	libcommon.a.
	* configure.ac: Add common to sub dir.
	* configure: Regenerate.

gdb/gdbserver/
2011-03-09  Yao Qi  <yao@codesourcery.com>

	Revert:
	2011-03-04  Yao Qi  <yao@codesourcery.com>

	* Makefile.in: Remove GNU make feature --directory.

	2011-03-05  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
	(subdir_do): New make target.  Copied from gdb/Makefile.
	(maintainer-clean, realclean, distclean, clean): Call corresponding
	make targets in common/Makefile.

	2011-02-11  Yao Qi  <yao@codesourcery.com>

	* configure.ac: Call AC_PROG_RANLIB.
	* Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
	* configure: Regenerate.
2011-03-09 06:10:40 +00:00
Yao Qi 4f3e6fb7a0 2011-02-11 Yao Qi <yao@codesourcery.com>
* Makefile.in: Remove signals.o from COMMON_OBS.  Link
	libcommon.a.
	* configure.ac: Add common to sub dir.
	* configure: Regenerate.

common/
2011-02-11  Yao Qi  <yao@codesourcery.com>

	Build libcommon.a.

	* Makefile.in: New.
	* configure.ac: New.
	* aclocal.m4: New.
	* configure: Generate.

gdbserver/
2011-02-11  Yao Qi  <yao@codesourcery.com>

	* configure.ac: Call AC_PROG_RANLIB.
	* Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
	* configure: Regenerate.
2011-02-11 09:57:25 +00:00
Joel Brobecker c1039e3cb7 fix gdb+python build failure if using non-GNU sed
Non-GNU sed do not like the '?' quantifier when used in a s/// regexp
that involve back-references, causing the build to fail when trying
to link with Python support. This fixes it by using the '*' quantifier
instead.

gdb/ChangeLog:

 	* configure.ac: Work around non-GNU sed limitation when computing
 	python version number.
 	* configure: Regenerate.
2011-02-02 04:36:21 +00:00
Joel Brobecker 9c4ea6c5a9 allow building GDB with Python support on MinGW
This makes several adjustements to the configure python-config.py
scripts to deal with the differences between a Unix install of Python
and a Windows install of Python (as downloaded from the Python website).

Differences:

  - The Python executable is directly in the python prefix directory
    as opposed to inside the bin/ subdirectory.

  - The name of the python library is does not have a dot in the version
    number: On Unix, we have libpython2.7, while on Windows, it's
    libpython27.  So the regexp extracting the python version from
    the Python lib filename had to be adjusted slightly.

    Also, the tests checking the name of the libpython had to be
    adjusted to allow for that.

  - There are no link options following the -lpython<version> switch
    on Windows, but the regexp extracting the python version was
    using it as a delimiter.  It had to be removed.

  - python-config.py does not work on Windows, mostly because
    some sysconfig variables are missing.  They are not necessary
    so the script was adapted to skip them if not defined.

  - The paths returned by python-config.py follow the Windows filename
    convention in terms of the directory separator, and this is causing
    trouble when the build environment is cygwin (while the compiler
    and Python are MinGW).  We could have fixed that in the configure
    script, but it felt simpler to do so in python-config.py

gdb/ChangeLog:

        * configure.ac: Add handling of Python distribution on Windows.
        * python-config.py: If the LIBS, SYSLIBS, LIBPL and/or LINKFORSHARED
        sysconfig variables are not defined, then do not use them.
        On Windows, if LIBPL is not defined, then use prefix + '/libs'
        instead.  On Windows, return all paths using forward-slashes
        rather than backslashes.
2011-01-31 04:42:08 +00:00
Joel Brobecker ac534cba29 do not use python<version> subdir when including Python .h file
This is preparation work for being able to build GDB with Python
support on MinGW.

So far, the "python<version>" subdirectory needs to be specified
when including a Python header file.  In order to do that, we have
some special configury that tweaks the include path returned by
python-config.py such that the use of the subdirectory in the include
is necessary.  This was done in order to protect ourselves from
possible filename conflicts, since some of the filenames chosen by
Python were a little generic.

The problem is that this cannot work with a standard Python install
on MinGW systems.  On such systems, the .h files are located in
<python_prefix>/include.  So, in preparation for allowing us to build
GDB on MinGW with Python support enabled, this patch changes the
requirement to provide the "python<version>" subdirectory in the
include directive.

The positive consequence is that we no longer need to have a set
of #include directives for each version of Python, since the include
directive is now the same for all versions of Python.  However, the
downside is that we are losing the level of protection we were trying
to achieve by forcing the subdirectory in the include directive.
In order to reduce a bit the consequences of a possible conflict,
this patch also changes the location where the -I/path/to/python
switch goes, to be last in the list (suggested by Doug Evans).

One last change is the fact that we are now including Python.h
and all other Python include headers using angle brackets rather
than double-quotes.  This fixes a problem on case-insensitive
systems where #include "Python.h" causes our gdb/python/python.h
header to be included instead of Python's <Python.h> header.

gdb/ChangeLog:

	* configure.ac: Remove fallback behavior for building
	against Python.  Remove tweaking of Python include path.
	Add PYTHON_CPPFLAGS and PYTHON_LIBS substitution.
	(AC_TRY_LIBPYTHON):  Adjust program used in linking test.
	If link is successful, set PYTHON_CPPFLAGS and PYTHON_LIBS.
	Always restore CPPFLAGS and LIBS after linking test.
	* configure: Regenerated.
	* Makefile.in (INTERNAL_CPPFLAGS): Add @PYTHON_CPPFLAGS@.
	(INSTALLED_LIBS, CLIBS): Add @PYTHON_LIBS@.
	* python/python-internal.h: Adjust includes of Python .h files.
2011-01-31 04:41:27 +00:00
Pedro Alves 76adfcaec1 * Makefile.in (hpux-thread.o): Delete rule.
* configure.ac: Don't check for HPUX DCE threads support.
	* configure, config.in: Regenerate.
	* hppa-hpux-nat.c (child_suppress_run): Delete.
	(hppa_hpux_child_can_run): Delete.
	(_initialize_hppa_hpux_nat): Don't override to_can_run.
	* hpux-thread.c: Delete.
2011-01-14 13:38:24 +00:00
Joel Brobecker 043b651001 build failure on IRIX when building with Python support.
This is a nasty interaction between Python and GDB. Basically,
Python causes some macros to be unilaterally defined in order
to turns some features on:

    /* Define to activate features from IEEE Stds 1003.1-2001 */
    #define _POSIX_C_SOURCE 200112L

    /* Define to the level of X/Open that your system supports */
    #define _XOPEN_SOURCE 600

But the problem is that they turn off defines provided by some
system headers on which we depend. Namely:

  * sys/siginfo.h:

        #if _SGIAPI
        #define siginfo __siginfo
        #endif

  * sys/ucontext.h:

        #if _SGIAPI && !defined(__SGI_NOUCONTEXT_COMPAT)
        [...]
        #define fp_r            __fp_r
        [...]
        #define fp_csr          __fp_csr
        [...]
        #endif

The important macro here is _SGIAPI, defined as follow in standards.h:

        #define _SGIAPI ((defined(_SGI_SOURCE) && \
                                _NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5) || \
                        (_ANSIMODE && _NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5))

If one builds GDB without Python, then _SGIAPI is true, and all is fine.
But building with Python causes both _POSIX_C_SOURCE and _XOPEN_SOURCE
to trip all the _NO_[...] tests (_NO_POSIX, _NO_XOPEN4, _NO_XOPEN5).
And so we get build failures because we try to use undefined types, or
non-existent component names inside the regset structure.

The latter problem is observed only within irix5-nat.c, which means
that it is specific to IRIX.  So it's easy to write the code in a way
that it does not require the macros (just use the real component names,
rather than relying on the macros to do the translation).

The former, on the other hand, is a little trickier, because the problem
occurs inside a generic unit (procfs.c). The solution I chose was to
adjust the configure script to add -Dsiginfo=__siginfo to the CPPFLAGS
if building with python using GCC on IRIX.

We hadn't seen this sort of issue up to now because the affect units
have not been dependent on the python includes up to now.  Recent changes
have made them indirectly dependent on Python, thus triggering the issues.

gdb/ChangeLog:

        * irix5-nat.c: Replace fp_r, fp_regs and fp_scr by __fp_r, __fp_regs
        and __fp_scr respectively throughout.
        * configure.ac: Compile with -Dsiginfo=__siginfo if building with
        Python using GCC on IRIX.
        * configure: Regenerate.
2010-12-14 07:17:15 +00:00
Tom Tromey 39037522c8 gdb
* configure: Rebuild.
	* configure.ac (READLINE_TEXI_INCFLAG): New subst.
gdb/doc
	* gdb.texinfo (Top): Check SYSTEM_READLINE.
	(Editing): Likewise.
	(Command History): Likewise.
	(TUI Keys): Likewise.
	(Bug Reporting): Conditionally include rluser.texi and
	inc-history.texinfo.
	* Makefile.in (READLINE_TEXI_INCFLAG): New variable.
	(GDB_DOC_SOURCE_INCLUDES): Add comment.
	(GDBvn.texi): Set SYSTEM_READLINE when appropriate.
	(gdb.dvi): Use READLINE_TEXI_INCFLAG.
	(gdb.pdf): Likewise.
	(gdb.info): Likewise.
	(gdb/index.html): Likewise.
2010-11-23 14:39:16 +00:00
Tom Tromey 5ae98d2512 gdb
* Makefile.in (SUBDIRS): Add doc.
	* configure: Rebuild.
	* configure.ac: Don't configure in doc.  Create doc/Makefile.
gdb/doc
	* Makefile.in (Makefile): Run ../config.status.
	(distclean): Update.
	* configure: Remove.
	* configure.ac: Remove.
2010-11-23 14:37:26 +00:00
Jan Kratochvil 075ff26d5b gdb/
Fix configure --enable-plugins --without-python.
	* configure.ac (for ELF support in BFD) <"$plugins" = "yes">: New.
	* configure: Regenerate.
2010-11-05 01:50:18 +00:00
Doug Evans aa2e2d8d77 Create subdir data-directory.
* Makefile.in (XML_SYSCALL_DIR, XML_SYSCALL_FILES): Moved to
	data-directory/Makefile.in.
	(SUBDIRS): Add data-directory.
	(all): Remove xml-syscall-copy dependency.
	(xml-syscall-copy): Moved to data-directory/Makefile.in as
	stamp-syscalls.
	(xml-syscall-install): Moved to data-directory/Makefile.in as
	install-syscalls.
	(install-only): Remove xml-syscall-install dependency.
	(all-data-directory): New rule.
	(data-directory/Makefile): New rule.
	* configure.ac (AC_OUTPUT): Add data-directory/Makefile.
	* configure: Regenerate.
	* data-directory/Makefile.in: New file.
	* python/lib/gdb/__init__.py: New file.

	testsuite/
	* gdb.base/catch-syscall.exp (do_syscall_tests): Update location
	of syscall staging area.
2010-10-06 16:02:45 +00:00
Joel Brobecker 496c0e1ba7 Allow disabling of gdbserver build (--enable-gdbserver=yes/no/auto).
This patch adds a new --enable-gdbserver=yes/no/auto command-line switch
in gdb/configure.  The primary purpose is to allow a user to disable the
build & install of gdbserver when not desired.  It also allows the user
to request gdbserver in which case the configure script will abort if
automatic building of gdbserver is not supported for that configuration.

The default keeps things as is: We automatically build gdbserver if
building for a native configuration and if gdbserver is supported for
that configuration.

gdb/ChangeLog:

        * configure.ac: Add support for --enable-gdbserver.
        * configure: Regenerate.

At AdaCore, this is mostly intended for ia64-linux, where we currently
do not want to distribute gdbserver.  This will be useful in the context
of I417-033, where we are now using "make install" to determine what
needs to be packaged inside the GNAT Pro package.
2010-09-22 16:15:01 +00:00
Daniel Jacobowitz 0a4f61e3e4 * config.in, configure: Regenerated.
* configure.ac: Check for waitpid.
	* ser-pipe.c (pipe_close): Wait for the program to exit.
2010-09-02 17:12:38 +00:00
Tom Tromey 94f7449c81 PR python/11900:
* configure: Rebuild.
	* configure.ac: Add install-python to CONFIG_INSTALL.
	* Makefile.in (install-python): New.
2010-08-18 22:57:46 +00:00
Tom Tromey 420697bb59 * configure: Rebuild.
* configure.ac: Add missing case for Python 2.7.
2010-07-30 15:59:41 +00:00
Pedro Alves 110ed33992 2010-07-28 Pedro Alves <pedro@codesourcery.com>
PR build/11848
	* configure.ac: Check for wresize.
	* configure, config.in: Regenerate.
	* tui/tui-win.c (make_visible_with_new_height): Wrap wresize call
	with HAVE_WRESIZE.
2010-07-28 23:24:57 +00:00
Pedro Alves db5e03ae67 * configure.ac: Check for resize_term.
* configure, config.in: Regenerate.
2010-07-28 11:48:23 +00:00
Tom Tromey 11763c1856 * configure, config.in: Rebuild.
* configure.ac (HAVE_LIBPYTHON2_7): New define.
	* python/python-internal.h: Handle HAVE_LIBPYTHON2_7.
2010-07-06 19:03:12 +00:00
Jan Kratochvil 38f6b338fd gdb/
* configure.ac: Always set RDYNAMIC at least as `-rdynamic'.
	* configure: Regenerate.
2010-06-23 10:12:14 +00:00
Andreas Schwab 0407b3f19d * configure.ac: Check for RDYNAMIC also for cross builds.
* configure: Regenerate.
2010-06-15 18:37:18 +00:00
Jan Kratochvil 3bebe2f205 gdb/
* configure.ac <"${have_libpython}" != no>: New workaround of
	python#4434.
	* configure: Regenerate.

gdb/testsuite/
	* gdb.python/python.exp (pythonX.Y/lib-dynload/*.so): New.
2010-06-08 16:41:45 +00:00
Doug Evans e7a30f4647 * configure.ac: Don't fail if python is unusable when
configured with --with-python=auto.
	* configure: Regenerate.
2010-06-03 18:58:39 +00:00
Jan Kratochvil f6528abd64 gdb/
* Makefile.in (RDYNAMIC): New.
	(SFILES): Add proc-service.list.
	* config/alpha/alpha-linux.mh (NAT_CDEPS): New.
	(LOADLIBES): Replace -rdynamic by $(RDYNAMIC).
	* config/arm/linux.mh: Likewise.
	* config/i386/linux.mh: Likewise.
	* config/i386/linux64.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/linux.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/powerpc/linux.mh: Likewise.
	* config/powerpc/ppc64-linux.mh: Likewise.
	* config/s390/s390.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/xtensa/linux.mh: Likewise.
	* configure.ac: New RDYNAMIC on native host and GCC.
	(solaris*): Replace -Wl,-export-dynamic by $RDYNAMIC.
	* configure: Regenerate.
	* proc-service.list: New.

gdb/gdbserver/
	* Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
	(CDEPS): New.
	* configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
	-Wl,--dynamic-list.
	* configure: Regenerate.
	* proc-service.list: New.
2010-05-28 18:50:35 +00:00
Doug Evans 0c4a40633c Allow python to find its files if moved from original location.
* acinclude.m4 (GDB_AC_DEFINE_RELOCATABLE): New function.
	(GDB_AC_WITH_DIR): Call it.
	* configure.ac: Define WITH_PYTHON_PATH if we can find the
	python installation directory.
	* config.in: Regenerate.
	* configure: Regenerate.
	* defs.h (python_libdir): Declare.
	* main.c (python_libdir): Define.
	(captured_main): Initialize python_libdir.
	* python/python.c (_initialize_python): #ifdef WITH_PYTHON_PATH,
	call Py_SetProgramName to make sure python can find its libraries
	and modules.
2010-05-27 03:40:45 +00:00
Doug Evans ec685c5eca * configure.ac: Try to use python's distutils to fetch compilation
parameters.
	* configure: Regenerate.
	* python/python-config.py: New file.
2010-05-27 01:36:22 +00:00
Pedro Alves f434ba0309 gdb/
2010-05-23  Pedro Alves  <pedro@codesourcery.com>

	Update gnulib from latest git.
	(250b80067c1e1d8faa0c42fb572f721975b929c5)

	* gnulib/memcmp.c: Removed.
	* gnulib/memchr.valgrind: New.
	* gnulib/stddef.in.h: New.
	* gnulib/Makefile.am: Updated.
	* gnulib/memchr.c: Updated.
	* gnulib/memmem.c: Updated.
	* gnulib/stdint.in.h: Updated.
	* gnulib/str-two-way.h: Updated.
	* gnulib/string.in.h: Updated.
	* gnulib/wchar.in.h: Updated.

	* gnulib/extra/link-warning.h: Removed.
	* gnulib/extra/c++defs.h: New.
	* gnulib/extra/warn-on-use.h: New.
	* gnulib/extra/arg-nonnull.h: Updated.

	* gnulib/m4/extensions.m4: Updated.
	* gnulib/m4/gnulib-cache.m4: Updated.
	* gnulib/m4/gnulib-common.m4: Updated.
	* gnulib/m4/gnulib-comp.m4: Updated.
	* gnulib/m4/gnulib-tool.m4: Updated.
	* gnulib/m4/include_next.m4: Updated.
	* gnulib/m4/longlong.m4: Updated.
	* gnulib/m4/memchr.m4: Updated.
	* gnulib/m4/memmem.m4: Updated.
	* gnulib/m4/stdint.m4: Updated.
	* gnulib/m4/string_h.m4: Updated.
	* gnulib/m4/memcmp.m4: Removed.
	* gnulib/m4/onceonly_2_57.m4: Removed.
	* gnulib/m4/00gnulib.m4: New.
	* gnulib/m4/mmap-anon.m4: New.
	* gnulib/m4/multiarch.m4: New.
	* gnulib/m4/onceonly.m4: New.
	* gnulib/m4/stddef_h.m4: New.
	* gnulib/m4/warn-on-use.m4: New.
	* gnulib/m4/wchar.m4: Removed.
	* gnulib/m4/wchar_h.m4: New.
	* gnulib/m4/wchar_t.m4: New.
	* gnulib/m4/wint_t.m4: New.

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

gdb/gdbserver/
2010-05-23  Pedro Alves  <pedro@codesourcery.com>

	* config.h, configure: Regenerate.
2010-05-23 00:57:01 +00:00
Doug Evans 88a1906b0d * configure.ac (CONFIG_SRCS): Add py-auto-load.o even if not using
python.
	* configure: Regenerate.
	* main.c: #include "python/python.h".
	(captured_main): Defer loading auto-loaded scripts until after
	local_gdbinit has been sourced.
	* python/py-auto-load.c (gdbpy_global_auto_load): New global.
	(load_auto_scripts_for_objfile): New function.
	(auto_load_new_objfile): Call it.
	* python/python.h (gdbpy_global_auto_load): Declare.
	(load_auto_scripts_for_objfile): Declare.
2010-04-23 18:09:16 +00:00
Joel Brobecker bf3071347e Fail gdb configure if target is not supported.
* configure.ac: Exit if ${gdb_target_obs}" is not set.
        * configure: Regenerate.
2010-03-15 17:03:03 +00:00
Tom Tromey be391dcafc * elfread.c (elf_symfile_read): Don't call
dwarf2_build_frame_info.
	* dwarf2read.c (struct dwarf2_section_info) <readin>: New field.
	(struct dwarf2_per_objfile) <objfile>: New field.
	(dwarf2_has_info): Now idempotent.  Set objfile field.
	(dwarf2_read_section): Check and set readin field.  Call
	posix_madvise.
	(dwarf2_build_psymtabs): Don't read all sections.
	(read_type_comp_unit_head): Read types section.
	(create_debug_types_hash_table): Likewise.
	(init_cu_die_reader): Add asserts.
	(process_type_comp_unit): Add assert.
	(dwarf2_build_psymtabs_hard): Read info section.
	(load_partial_comp_unit): Add assert.
	(create_all_comp_units): Read info section.
	(load_full_comp_unit): Likewise.
	(dwarf2_ranges_read): Read ranges section.
	(dwarf2_record_block_ranges): Add assert.
	(dwarf2_read_abbrevs): Read abbrev section.
	(read_indirect_string): Read str section.
	(dwarf_decode_line_header): Read line section.
	(read_signatured_type_at_offset): Read types section.
	(dwarf_decode_macros): Read macinfo section.
	(dwarf2_symbol_mark_computed): Read loc section.
	* dwarf2-frame.c (dwarf2_frame_find_fde): Call
	dwarf2_build_frame_info.
	(dwarf2_build_frame_info): Unconditionally set
	dwarf2_frame_objfile_data on the objfile.
	* configure.ac: Check for posix_madvise.
	* config.in, configure: Rebuild.
2010-03-10 18:37:24 +00:00
Rainer Orth 6bcc772dec * configure.ac: Only use host_os part when disabling TUI on osf.
Use test to check variables, prefix strings with x.
	* configure: Regenerate.

	* solib-osf.c (osf_current_sos): Initialize tail.
2010-01-25 13:22:02 +00:00
Joel Brobecker 1cb5e2a45b Add -Wunused-function to compile flags.
* configure.ac: Add -Wunused-function to build_warnings.
        * configure: Regenerate.
2010-01-19 09:52:33 +00:00
Jan Kratochvil 7991dee782 gdb/
* configure.ac (AC_CHECK_FUNCS): Check for setrlimit and getrlimit.
	* configure: Regenerate.
	* config.in: Regenerate.
	* utils.c: Include sys/resource.h.
	(dump_core, can_dump_core): New.
	(internal_vproblem): Update the comment.  Check can_dump_core while
	setting dump_core_p.  Replace two abort calls by dump_core calls.
2010-01-15 00:34:37 +00:00
Jan Kratochvil d30c533689 gdb/
* configure: Regenerate (for _STRUCTURED_PROC).
2010-01-12 12:22:52 +00:00
Joel Brobecker f0f209491f Cannot find in-tree libiconv.a after reconfigure.
* acinclude.m4 (AM_ICONV): If we find an in-tree libiconv.a
        that we can use, then cache the path to this archive.
        * configure: Regenerate.
2010-01-08 07:16:43 +00:00
Joel Brobecker f18c46810d * acinclude.m4: Link against in-tree libiconv by adding
libiconv.a to the LIBS instead of using -liconv.
            * configure: Regenerate.
2009-12-09 10:07:15 +00:00
Joseph Myers 3388710e18 config:
* largefile.m4 (ACX_LARGEFILE): Require AC_CANONICAL_HOST and
	AC_CANONICAL_TARGET.

bfd:
	* configure: Regenerate.

binutils:
	* configure: Regenerate.

gas:
	* configure: Regenerate.

gdb:
	* configure: Regenerate.

gprof:
	* configure: Regenerate.

ld:
	* configure: Regenerate.
2009-11-30 16:46:47 +00:00
Joel Brobecker b040ad30f5 * acinclude.m4: Include ../config/zlib.m4.
* configure.ac: Use AM_ZLIB to check for zlib support.
        * configure: Regenerate.
2009-11-24 22:59:53 +00:00
Jan Kratochvil da2f07f1aa bfd/
* configure.in: Call ACX_LARGEFILE.  Stop calling AC_PLUGINS,
	AC_SYS_LARGEFILE and checking the Solaris largefile exception.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

binutils/
	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_PLUGINS,
	AC_SYS_LARGEFILE and checking the Solaris largefile exception.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gas/
	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_SYS_LARGEFILE.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gdb/
	* configure.ac: Call ACX_LARGEFILE.
	* aclocal.m4: Call m4_include for ../config/largefile.m4 and
	../config/plugins.m4.
	* configure: Regenerate.
	* config.in: Regenerate.

gprof/
	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_SYS_LARGEFILE.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

ld/
	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_SYS_LARGEFILE.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2009-11-11 04:42:42 +00:00
Pedro Alves e23525a055 gdb/
* configure.ac (build_warnings): Add -Wunused-value.
	* configure: Regenerate.
2009-10-14 19:44:38 +00:00
Jan Kratochvil a71e0887e3 gdb/
Fix compatibility of --with-system-readline and readline-6.0+.
	* configure.ac <--with-system-readline> (for readline_echoing_p): New
	test.
	* config.in: Regenerate.
	* configure: Regenerate.
2009-10-02 16:02:34 +00:00
Joel Brobecker 2c9e3c696d * configure.ac: Fix the names of the python source and object files
following the renaming done in an earlier change.
        * configure: Regenerate.
2009-09-10 03:59:37 +00:00
Ralf Wildenhues af542c2e31 Cleanups after the update to Autoconf 2.64, Automake 1.11.
/:
	* README-maintainer-mode: Point directly to upstream locations
	for autoconf, automake, libtool, gettext, instead of copies on
	sources.redhat.com.  Document required versions.
	* configure.ac: Do not substitute datarootdir, htmldir,
	pdfdir, docdir.  Do not process --with-datarootdir,
	--with-htmldir, --with-pdfdir, --with-docdir.
	* configure: Regenerate.

gdb/:
	* CONTRIBUTE: Bump documented Autoconf version.
	* configure.ac: Do not substitute datarootdir, htmldir,
	pdfdir, docdir.  Do not process --with-datarootdir,
	--with-htmldir, --with-pdfdir, --with-docdir.
	* configure: Regenerate.

gdb/doc/:
	* gdbint.texinfo (Releasing GDB): Point to
	README-maintainer-mode file for required autoconf version.
	* configure.ac: Do not substitute datarootdir, htmldir,
	pdfdir, docdir.  Do not process --with-datarootdir,
	--with-htmldir, --with-pdfdir, --with-docdir.
	* configure: Regenerate.

gprof/:
	* Makefile.am (pdf__strip_dir, install-pdf, install-pdf-am)
	(install-pdf-recursive, html__strip_dir, install-html)
	(install-html-am, install-html-recursive): Remove.
	* Makefile.in: Regenerate.

opcodes/:
	* Makefile.am (install-pdf, install-html): Remove.
	* Makefile.in: Regenerate.

gas/:
	* Makefile.am (install-pdf, install-pdf-recursive, install-html)
	(install-html-recursive): Remove.
	* Makefile.in: Regenerate.
	* doc/Makefile.am (pdf__strip_dir, install-pdf, install-pdf-am)
	(html__strip_dir, install-html, install-html-am): Remove.
	* doc/Makefile.in: Regenerate.

ld/:
	* Makefile.am (pdf__strip_dir, install-pdf, install-pdf-am)
	(install-pdf-recursive, html__strip_dir, install-html)
	(install-html-am, install-html-recursive): Remove.
	* Makefile.in: Regenerate.

binutils/:
	* Makefile.am (install-pdf, install-pdf-recursive, install-html)
	(install-html-recursive): Remove.
	* Makefile.in: Regenerate.
	* doc/Makefile.am (pdf__strip_dir, install-pdf, install-pdf-am)
	(html__strip_dir, install-html, install-html-am): Remove.
	* doc/Makefile.in: Regenerate.

bfd/:
	* Makefile.am (datarootdir, docdir, htmldor, pdfdir)
	(install-pdf, install-pdf-recursive, install-html)
	(install-html-recursive): Remove.
	* Makefile.in: Regenerate.

bfd/doc/:
	* Makefile.am (pdf__strip_dir, install-pdf, install-pdf-am)
	(html__strip_dir, install-html, install-html-am): Remove.
	* Makefile.in: Regenerate.
2009-08-22 17:08:11 +00:00
Ralf Wildenhues 81ecdfbb4d Regenerate tree using Autoconf 2.64 and Automake 1.11.
config/:
	* override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64.

/:
	* configure: Regenerate.

etc/:
	* configure: Regenerate.

sim/common/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/iq2000/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/d10v/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/igen/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m32r/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/frv/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/:
	* avr/config.in: Regenerate.
	* avr/configure: Likewise.
	* configure: Likewise.
	* cris/config.in: Likewise.
	* cris/configure: Likewise.

sim/h8300/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mn10300/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/ppc/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/erc32/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/arm/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m68hc11/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/lm32/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/sh64/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/v850/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/cr16/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/moxie/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m32c/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mips/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mcore/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/testsuite/d10v-elf/:
	* configure: Regenerate.

sim/testsuite/:
	* configure: Regenerate.

sim/testsuite/frv-elf/:
	* configure: Regenerate.

sim/testsuite/m32r-elf/:
	* configure: Regenerate.

sim/testsuite/mips64el-elf/:
	* configure: Regenerate.

sim/sh/:
	* config.in: Regenerate.
	* configure: Likewise.

gold/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.

gprof/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* gconfig.in: Likewise.

opcodes/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

gas/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

ld/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

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

gdb/doc/:
	* configure: Regenerate.

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

gdb/testsuite/:
	* configure: Regenerate.
	* gdb.hp/configure: Likewise.
	* gdb.hp/gdb.aCC/configure: Likewise.
	* gdb.hp/gdb.base-hp/configure: Likewise.
	* gdb.hp/gdb.compat/configure: Likewise.
	* gdb.hp/gdb.defects/configure: Likewise.
	* gdb.hp/gdb.objdbg/configure: Likewise.
	* gdb.stabs/configure: Likewise.

binutils/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

bfd/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

bfd/doc/:
	* Makefile.in: Regenerate.

readline/:
	* configure: Regenerate.

readline/examples/rlfe/:
	* configure: Regenerate.
2009-08-22 16:56:56 +00:00
Ralf Wildenhues 1983cb9a62 intl/
* Makefile.in (aclocal_deps): New variable.
	($(srcdir)/aclocal.m4): Use it, for portable makefile syntax.

libdecnumber/
	* Makefile.in (aclocal_deps): New variable.
	($(srcdir)/aclocal.m4): Use it, for portable makefile syntax.

etc/
	* Makefile.in (AUTOCONF, configure_deps): New variables.
	($(srcdir)/configure, config.status): New rules.
	(Makefile): Depend on config.status.
	* configure.in: Accept --enable-maintainer-mode, set and
	substitute MAINT accordingly.

gdb/
	* Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps)
	(AUTOCONF, configure_deps, AUTOHEADER): New variables.
	($(srcdir)/aclocal.m4, $(srcdir)/configure, $(srcdir)/config.in)
	(am--refresh): New rules.
	(stamp-h, config.status): List config.in and configure including
	$(srcdir)/ prefix.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2009-07-30 22:44:50 +00:00
Mike Frysinger a156a29064 fix gdbtui build errors when pipe() is not available (e.g. mingw targets)
* configure.ac (AC_CHECK_FUNCS): Check for pipe.
	* config.in, configure: Regenerate.
	* tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE.
2009-07-20 15:24:55 +00:00
Paul Pluzhnikov 6bf0ce2bed 2009-05-28 Pierre Muller <muller@ics.u-strasbg.fr>
Paul Pluzhnikov  <ppluzhnikov@google.com>

	* configure.ac (!have_libpython): Add python-prettyprint source
	and object files.
	* configure: Regenerate.
	* python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
	python headers.
2009-05-28 16:30:39 +00:00
Joel Brobecker 4edb1e84b1 * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
system iconv.
        * configure: Regenerate.
2009-05-06 23:05:28 +00:00
Tom Tromey b14b1491f2 gdb
2009-04-23  Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
	    Tom Tromey  <tromey@redhat.com>

	* configure, config.in: Regenerate.
	* configure.ac: Support for relocatable GDB datadir.  Use
	GDB_AC_WITH_DIR.  Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
	* acinclude.m4 (GDB_AC_WITH_DIR): New defun.
	* top.c (init_main): Add "set data-directory".
	* defs.h (gdb_datadir): Declare.
	* main.c (gdb_datadir): New global.
	(captured_main): Initialize gdb_datadir.  Use relocate_directory.
	(relocate_path): New function.
	(relocate_directory): Likewise.
	(get_init_files): Use relocate_path.
	(README): Mention --with-gdb-datadir.
gdb/doc
2009-04-23  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Data Files): New node.
	(GDB Files): Update menu.
2009-04-23 21:28:20 +00:00
Andreas Schwab 62e4f60cdb * configure.ac: Add quotes to not lose brackets in help text.
* configure: Rebuild.
2009-04-21 21:01:07 +00:00
Andreas Schwab cfd5360553 * configure.ac: Don't postprocess Makefile in config.status.
Substitute GDB_NM_FILE.  Don't substitute nm_h.
	* Makefile.in (GDB_NM_FILE): Substitute.
	(TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
	* configure: Regenerate.
	* gnulib/Makefile.in: Regenerate.
2009-04-21 20:19:13 +00:00
Joseph Myers 26e251b603 gdb:
* configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
	--with-htmldir): New.
	* configure: Regenerate.

gdb/doc:
	* configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
	--with-htmldir): New.
	* configure: Regenerate.
	* Makefile.in (datarootdir, docdir): Define.
	(gdb.dvi, gdb.pdf): Use same -I options as for building gdb.info
	instead of $(SET_TEXINPUTS).
	(gdbint.dvi, gdbint.pdf): Use same -I options as for building
	gdbint.info instead of $(SET_TEXINPUTS).
	(gdbint/index.html): Use same -I options as for building
	gdbint.info.
	(stabs.dvi, stabs.pdf): Use same -I options as for building
	stabs.info instead of $(SET_TEXINPUTS).
	(stabs/index.html): Use same -I options as for building
	stabs.info.
	(annotate.dvi, annotate.pdf): Use same -I options as for building
	annotate.info instead of $(SET_TEXINPUTS).
	(annotate/index.html): Use same -I options as for building
	annotate.info.
2009-04-21 20:13:08 +00:00
Tom Tromey 32c1c914bc * configure: Rebuild.
* configure.ac: Use lower case for start of help strings.  Clean
	up --with-sysroot help.
2009-04-21 18:09:11 +00:00
Tom Tromey a1220294e5 * configure: Rebuild.
* acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
	* configure.ac: Use AC_HELP_STRING.  Use upper case for variables
	in help.
2009-04-21 17:00:17 +00:00
Joseph Myers 29b0e8a24a gdb:
* configure.ac (--with-relocated-sources): New.
	* configure, config.in: Regenerate.
	* source.c (add_substitute_path_rule): Remove static.
	* source.h (add_substitute_path_rule): Declare.
	* main.c: Include "source.h".
	(captured_main): Add substitution rule if RELOC_SRCDIR.

gdb/doc:
	* gdb.texinfo (Source Path): Document --with-relocated-sources.
2009-04-21 10:13:05 +00:00
Joseph Myers 89a34d1b2c gdb:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
	* configure: Regenerate.
	* Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
	configure substitutions.
	(FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.

gdb/doc:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Set pdfdir and htmldir from configure
	substitutions.
	* configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
	* configure: Regenerate.

readline:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Add html target.  Add dummy install-html and
	install-pdf targets.

sim:
2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Add dummy install-pdf, html, and
	install-html targets.
2009-04-17 17:44:05 +00:00
Tom Tromey 732f6a935c gdb
* c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
	(c_printstr): Likewise.
	* charset.c: Include gdb_wait.h.
	(make_wchar_iterator): Use INTERMEDIATE_ENCODING.
	(find_charset_names): Use pexecute.  Handle libiconv's output.
	Detect errors.
	(_initialize_charset): Use xstrdup.
	* gdb_wchar.h: Check HAVE_BTOWC.  Split PHONY_ICONV and wchar
	cases.
	(INTERMEDIATE_ENCODING): New define.
	* configure, config.in: Rebuild.
	* configure.ac: Check for btowc.
gdb/doc
	* gdb.texinfo (Character Sets): Document default character set.
2009-04-15 22:20:32 +00:00
Tom Tromey 94ae171419 * configure: Rebuild.
* acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
	Rearrange flags setting.  Add comments.
2009-03-26 01:18:35 +00:00
Tom Tromey fc3b640d97 2009-03-24 Tom Tromey <tromey@redhat.com>
Pedro Alves  <pedro@codesourcery.com>

	* configure, config.in: Rebuild.
	* configure.ac: Check for libiconvlist.
	* charset.c: Check HAVE_LIBICONVLIST.
	* acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
	LIBICONV_LIBDIR.  Update CPPFLAGS and LIBS.
	* Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
	Remove.
	(INTERNAL_CFLAGS_BASE): Update.
	(INTERNAL_LDFLAGS): Update.
	(CLIBS): Update.
2009-03-25 00:58:37 +00:00
Jan Kratochvil 76a39ba7a1 * configure.ac: Initialize the variable $PREFER_CURSES.
* configure: Regenerated.
2009-03-24 17:01:34 +00:00
Jan Kratochvil bd8a8e1b9c * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
* configure: Regenerated.
2009-03-24 16:54:35 +00:00
Joel Brobecker cb01cfba2c Provide a way to force building of GDB with libcurses.
* configure.ac: Add --with-curses.
        * configure: Regenerated.
2009-03-24 01:19:27 +00:00
Tom Tromey 6c7a06a3fa gdb:
2009-03-19  Tom Tromey  <tromey@redhat.com>
	    Julian Brown  <julian@codesourcery.com>

	PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
	PR i18n/9401, PR exp/9613:
	* NEWS: Update
	* value.h (value_typed_string): Declare.
	(val_print_string): Update.
	* valprint.h (print_char_chars): Update.
	* valprint.c (print_char_chars): Add type argument.  Update.
	(val_print_string): Likewise.
	* valops.c (value_typed_string): New function.
	* utils.c (host_char_to_target): New function.
	(parse_escape): Use host_char_to_target, host_hex_value.  Update.
	Remove '^' case.
	(no_control_char_error): Remove.
	* typeprint.c (print_type_scalar): Update.
	* scm-valprint.c (scm_scmval_print): Update.
	* scm-lang.h (scm_printchar, scm_printstr): Update.
	* scm-lang.c (scm_printchar): Add type argument.
	(scm_printstr): Likewise.
	* printcmd.c (print_formatted): Update.
	(print_scalar_formatted): Update.
	(printf_command) <wide_string_arg, wide_char_arg>: New constants.
	Handle '%lc' and '%ls'.
	* parser-defs.h (struct typed_stoken): New type.
	(struct stoken_vector): Likewise.
	(write_exp_string_vector): Declare.
	* parse.c (write_exp_string_vector): New function.
	* p-valprint.c (pascal_val_print): Update.
	* p-lang.h (is_pascal_string_type, pascal_printchar,
	pascal_printstr): Update.
	* p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
	Add 'char_type' argument.
	(pascal_emit_char): Add type argument.
	(pascal_printchar): Likewise.
	(pascal_printstr): Likewise.
	* objc-lang.c (objc_emit_char): Add type argument.
	(objc_printchar): Likewise.
	(objc_printstr): Likewise.
	* macroexp.c (get_character_constant): Handle unicode characters.
	Use c_parse_escape.
	(get_string_literal): Handle unicode strings.  Use
	c_parse_escape.
	* m2-valprint.c (print_unpacked_pointer): Update.
	(m2_print_array_contents): Update.
	(m2_val_print): Update.
	* m2-lang.c (m2_emit_char): Add type argument.
	(m2_printchar): Likewise.
	(m2_printstr): Likewise.
	* language.h (struct language_defn) <la_printchar>: Add type
	argument.
	<la_printstr, la_emitchar>: Likewise.
	(LA_PRINT_CHAR): Likewise.
	(LA_PRINT_STRING): Likewise.
	(LA_EMIT_CHAR): Likewise.
	* language.c (unk_lang_emit_char): Add type argument.
	(unk_lang_printchar): Likewise.
	(unk_lang_printstr): Likewise.
	* jv-valprint.c (java_val_print): Update.
	* jv-lang.c (java_emit_char): Add type argument.
	* f-valprint.c (f_val_print): Update.
	* f-lang.c (f_emit_char): Add type argument.
	(f_printchar): Likewise.
	(f_printstr): Likewise.
	* expprint.c (print_subexp_standard): Update.
	* charset.h (target_wide_charset): Declare.
	(c_target_char_has_backslash_escape, c_parse_backslash,
	host_char_print_literally, host_char_to_target,
	target_char_to_host, target_char_to_control_char): Remove.
	(enum transliterations): New type.
	(convert_between_encodings): Declare.
	(HOST_ESCAPE_CHAR): New define.
	(host_letter_to_control_character, host_hex_value): Declare.
	(enum wchar_iterate_result): New enum.
	(struct wchar_iterator): Declare.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): Declare.
	* charset-list.h: New file.
	* c-valprint.c (textual_name): New function.
	(textual_element_type): Handle wide character types.
	(c_val_print): Pass original type to textual_element_type.  Handle
	wide character types.
	(c_value_print): Use textual_element_type.  Pass original type of
	value to val_print.
	* c-lang.h (enum c_string_type): New type.
	(c_printchar, c_printstr): Update.
	* c-lang.c (classify_type): New function.
	(print_wchar): Likewise.
	(c_emit_char): Add type argument.  Handle wide characters.
	(c_printchar): Likewise.
	(c_printstr): Add type argument.  Handle wide and multibyte
	character sets.
	(convert_ucn): New function.
	(emit_numeric_character): Likewise.
	(convert_octal): Likewise.
	(convert_hex): Likewise.
	(ADVANCE): New macro.
	(convert_escape): New function.
	(parse_one_string): Likewise.
	(evaluate_subexp_c): Likewise.
	(exp_descriptor_c): New global.
	(c_language_defn): Use exp_descriptor_c.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	(charset_for_string_type): New function.
	* c-exp.y (%union): Add 'svec' and 'tsval'.
	(CHAR): New token.
	(exp): Add CHAR production.
	(string_exp): Rewrite.
	(exp) <string_exp>: Rewrite.
	(tempbuf): Now global.
	(tempbuf_init): New global.
	(parse_string_or_char): New function.
	(yylex) <tempbuf>: Now global.
	<tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
	Remove.
	Handle 'u', 'U', and 'L' prefixes.  Call parse_string_or_char.
	(c_parse_escape): New function.
	* auxv.c (fprint_target_auxv): Update.
	* ada-valprint.c (ada_emit_char): Add type argument.
	(ada_printchar): Likewise.
	(ada_print_scalar): Update.
	(printstr): Add type argument.  Update calls to ada_emit_char.
	(ada_printstr): Add type argument.
	(ada_val_print_array): Update.
	(ada_val_print_1): Likewise.
	* ada-lang.c (emit_char): Add type argument.
	* ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
	type arguments.
	* gdb_locale.h: Include langinfo.h.
	* charset.c (_initialize_charset): Set default host charset from
	the locale.  Don't register charsets.  Add target-wide-charset
	commands.  Call find_charset_names.
	(struct charset, struct translation): Remove.
	(GDB_DEFAULT_HOST_CHARSET): Remove.
	(GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
	(target_wide_charset_name): New global.
	(show_host_charset_name): Handle "auto".
	(show_target_wide_charset_name): New function.
	(host_charset_enum, target_charset_enum): Remove.
	(charset_enum): New global.
	(all_charsets, register_charset, lookup_charset, all_translations,
	register_translation, lookup_translation): Remove.
	(simple_charset, ascii_print_literally, ascii_to_control): Remove.
	(iso_8859_print_literally, iso_8859_to_control,
	iso_8859_family_charset): Remove.
	(ebcdic_print_literally, ebcdic_to_control,
	ebcdic_family_charset): Remove.
	(struct cached_iconv, check_iconv_cache, cached_iconv_convert,
	register_iconv_charsets): Remove.
	(target_wide_charset_be_name, target_wide_charset_le_name): New
	globals.
	(identity_either_char_to_other): Remove.
	(set_be_le_names, validate): New functions.
	(backslashable, backslashed, represented): Remove.
	(default_c_target_char_has_backslash_escape): Remove.
	(default_c_parse_backslash, iconv_convert): Remove.
	(ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
	ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
	iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
	ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
	ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
	ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
	(table_convert_char, table_translation, simple_table_translation):
	Remove.
	(current_host_charset, current_target_charset,
	c_target_char_has_backslash_escape_func,
	c_target_char_has_backslash_escape_baton): Remove.
	(c_parse_backslash_func, c_parse_backslash_baton): Remove.
	(host_char_to_target_func, host_char_to_target_baton): Remove.
	(target_char_to_host_func, target_char_to_host_baton): Remove.
	(cached_iconv_host_to_target, cached_iconv_target_to_host):
	Remove.
	(lookup_charset_or_error, check_valid_host_charset): Remove.
	(set_host_and_target_charsets): Remove.
	(set_host_charset, set_target_charset): Remove.
	(set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
	(set_target_wide_charset_sfunc): New function.
	(show_charset): Print target wide character set.
	(host_charset, target_charset): Rewrite.
	(target_wide_charset): New function.
	(c_target_char_has_backslash_escape): Remove.
	(c_parse_backslash): Remove.
	(host_letter_to_control_character): New function.
	(host_char_print_literally): Remove.
	(host_hex_value): New function.
	(target_char_to_control_char): Remove.
	(cleanup_iconv): New function.
	(convert_between_encodings): New function.
	(target_char_to_host): Remove.
	(struct wchar_iterator): Define.
	(make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
	wchar_push_back): New functions.
	(do_cleanup_iterator): New function.
	(char_ptr): New typedef.
	(charsets): New global.
	(add_one, find_charset_names): New functions.
	(default_charset_names): New global.
	(auto_host_charset_name): Likewise.
	* aclocal.m4, config.in, configure: Rebuild.
	* configure.ac: Call AM_LANGINFO_CODESET.
	(GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
	(AM_ICONV): Invoke earlier.
	* acinclude.m4: Include codeset.m4.  Subst LIBICONV_INCLUDE and
	LIBICONV_LIBDIR.  Check for libiconv in build tree.
	* Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
	(INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
	(INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
	* gdb_obstack.h (obstack_grow_wstr): New define.
        * gdb_wchar.h: New file.
        * defs.h: Include it.
gdb/testsuite:
	* gdb.base/store.exp: Update for change to escape output.
	* gdb.base/callfuncs.exp (fetch_all_registers): Update for change
	to escape output.
	* gdb.base/pointers.exp: Update for change to escape output.
	* gdb.base/long_long.exp (gdb_test_long_long): Update for change
	to escape output.
	* gdb.base/constvars.exp (do_constvar_tests): Update for change to
	escape output.
	* gdb.base/call-rt-st.exp (print_struct_call): Update for change
	to escape output.
	* gdb.cp/ref-types.exp (gdb_start_again): Update for change to
	escape output.
	* gdb.base/setvar.exp: Update for change to escape output.
	* lib/gdb.exp (default_gdb_start): Set LC_CTYPE to C.
	* gdb.base/printcmds.exp (test_print_all_chars): Update for change
	to escape output.
	(test_print_string_constants): Likewise.
	* gdb.base/charset.exp (valid_host_charset): Check size of
	wchar_t.  Handle UCS-2 and UCS-4.  Add tests for wide and unicode
	cases.  Handle "auto"-related output.
	* gdb.base/charset.c (char16_t, char32_t): New typedefs.
	(uvar, Uvar): New globals.
gdb/doc:
	* gdb.texinfo (Character Sets): Remove obsolete text.  Document
	set target-wide-charset.
	(Requirements): Mention iconv.
2009-03-20 23:04:40 +00:00
Doug Evans 85541719ae * config/tcl.m4 (SC_PATH_TCLCONFIG): Don't exit 0 if tclconfig fails.
(SC_PATH_TKCONFIG): Don't exit 0 if tkconfig fails.
	(SC_LOAD_TCLCONFIG): Quote all uses of TCL_BIN_DIR, it may contain
	"# no Tcl configs found".
	(SC_LOAD_TKCONFIG): Similarily for TK_BIN_DIR.

	* gdb/configure.ac (gdbkt): Check both no_tcl/no_tk first, before
	doing any further tcl/tk configury.  Don't configure gdbtk if
	tcl or tk check fails.
	* gdb/aclocal.m4: Regenerate.
	* gdb/configure: Regenerate.
	* gdb/gdbtk/plugins/aclocal.m4: Regenerate.
	* gdb/gdbtk/plugins/configure: Regenerate.
2009-02-02 23:18:05 +00:00
Jerome Guitton 16e7150e45 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
Jerome Guitton  <guitton@adacore.com>

	* configure, config.in: Regenerated.
	* configure.ac: Add --with-system-gdbinit.
	* main.c (get_init_files): New.
	(captured_main): Use get_init_files.  Load system gdbinit before
	$HOME/.gdbinit.
	(print_gdb_help): Print location of init files.
2009-01-28 15:01:00 +00:00
Christopher Faylor 31b060a20f Fix linking with --enable-targets=all:
* Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
(HFILES_NO_SRCDIR): Add windows-tdep.h.
(ALLDEPFILES): Add windows-tdep.c.
* win32-tdep.h: Delete.
* windows-tdep.h: Rename from win32-tdep.h.
* win32-nat.h: Delete.
* windows-nat.h: Rename from win32-nat.h.
* win32-nat.c: Delete.
* windows-nat.c: Rename from win32-nat.c.
* win32-termcap.c: Delete.
* windows-termcap.c: Rename from win32-termcap.c.
* amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
* configure.ac: Handle rename from win32-termcap.c -> windows-termcap.c.
* configure: Regenerate.
* gdb_curses.h: Change comment to reflect rename from win32-termcap.c ->
windows-termcap.c.
* i386-cygwin-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
* i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
* windows-nat.c: Ditto.  Also reflect rename from from win32-tdep.h ->
windows-tdep.h.
(win32_make_so): Handle cygwin compiler warning due to change of load_addr from
DWORD to LPVOID.
(handle_load_dll): Use %p in format string to properly print address and avoid
a compiler warning.
(DEBUG_EXCEPTION_SIMPLE): Ditto.
(handle_exception): Ditto.
* windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
* config/i386/cygwin.mh: Handle rename from win32-nat.o -> windows-nat.o.
* config/i386/mingw.mh: Ditto.
* config/i386/mingw64.mh: Ditto.
2009-01-12 01:10:28 +00:00
Tom Tromey a8111142cc * config.in, configure: Rebuild.
* configure.ac: Check for locale.h, setlocale.  Call
	AM_LC_MESSAGES.
	* acinclude.m4: Include lcmessage.m4.
2008-12-09 17:18:30 +00:00
Tom Tromey a9322a30ba * configure: Rebuild.
* configure.ac: Merge calls to AC_CHECK_FUNCS, AC_CHECK_HEADERS,
	AC_CHECK_DECLS, and AC_CHECK_MEMBERS.
2008-11-21 22:35:58 +00:00
Joel Brobecker 77f120bfd7 * configure.ac: On alpha-osf, error out if enable_tui is set to
"yes", and set enable_tui to "no" if previously set to "auto".
          Check for waddstr only if TUI support was requested. Move the
          part of the configure script that updates various Makefile
          variables up, together with the check for waddstr.
          * configure: Regenerate.
2008-10-22 20:22:01 +00:00
Thiago Jung Bauermann a08702d647 2008-10-16 Thiago Jung Bauermann <bauerman@br.ibm.com>
Tom Tromey  <tromey@redhat.com>

gdb/
	* Makefile.in (SUBDIR_PYTHON_OBS): Add python-value.o.
	(SUBDIR_PYTHON_SRCS): Add python-value.c.
	(python-value.o): New target.
	* configure.ac (CONFIG_OBS): Add python-value.o.
	(CONFIG_SRCS): Add python/python-value.c
	* configure: Regenerate.
	* python-internal.h (value_object_type): Add external declaration.
	(gdbpy_get_value_from_history, value_to_value_object,
	convert_value_from_python, gdbpy_initialize_values): Add function
	prototype.
	* python/python-value.c: New file.
	* python/python.c (GdbMethods): Add gdbpy_get_value_from_history.
	(_initialize_python): Call gdbpy_initialize_values.
	* python/python.h (values_in_python): Add external declaration.
	* value.c (value_prepend_to_list, value_remove_from_list): New
	functions.
	(preserve_values): Iterate over values_in_python list as well.
	* value.h (value_prepend_to_list, value_remove_from_list): Add
	function prototypes.

gdb/doc/
	* gdb.texinfo. (Values From Inferior): New subsubsection.

gdb/testsuite/
	* gdb.python/python-value.c: New file.
	* gdb.python/python-value.exp: New file.
2008-10-16 03:54:00 +00:00
Ralf Wildenhues a417dc5696 gdb/
* aclocal.m4, configure: Rebuild.
	* configure.in: Call ZW_CREATE_DEPDIR,
	ZW_PROG_COMPILER_DEPENDENCIES, AC_PROG_MAKE_SET.
	(MAKE, GMAKE): New substs.
	* acinclude.m4: Include depstand.m4.
	* Makefile.in (DEPMODE, DEPDIR, COMPILE.post, COMPILE.pre,
	COMPILE, POSTCOMPILE, depcomp): New variables.
	Remove all _h variables.
	Remove many .o targets.
	($(srcdir)/copying.c): avoid backslash-newline after comment
	sign (@maintainer_mode_true@).
	(HFILES_NO_SRCDIR): Regenerate.
	(generated_files): New variable.
	(all_gdbtk_cflags): Likewise.
	(.c.o): Rewrote.
	(init.o, version.o, copying.o): Remove.
	(distclean): Remove DEPDIR.
	(test-cp-name-parser.o, hpux-thread.o, main.o, monitor.o,
	printcmd.o, procfs.o, v850ice.o): Rewrite.
	(cli-cmds.o, cli-decode.o, cli-dump.o, cli-interp.o, cli-logging.o,
	cli-script.o, cli-setshow.o, cli-utils.o): Likewise.
	(gdbtk.o, gdbtk-bp.o, gdbtk-cmds.o, gdbtk-hooks.o, gdbtk-interp.o,
	gdbtk-main.o, gdbtk-register.o, gdbtk-stack.o, gdbtk-varobj.o,
	gdbtk-wrapper.o): Likewise.
	(mi-cmd-break.o, mi-cmd-disas.o, mi-cmd-env.o, mi-cmd-file.o,
	mi-cmds.o, mi-cmd-stack.o, mi-cmd-target.o, mi-cmd-var.o,
	mi-console.o, mi-getopt.o, mi-interp.o, mi-main.o, mi-out.o,
	mi-parse.o, mi-symbol-cmds.o, mi-common.o, signals.o, tui.o,
	tui-command.o, tui-data.o, tui-disasm.o, tui-file.o, tui-hooks.o,
	tui-interp.o, tui-io.o, tui-layout.o, tui-main.o, tui-out.o,
	tui-regs.o, tui-source.o, tui-stack.o, tui-win.o, tui-windata.o,
	tui-wingeneral.o, tui-winsource.o): Likewise.
	(all_object_files): New variable.
	($(all_object_files)): New target.
	Include dependency files, when using GNU Make.

gdb/gdbserver/
	* Makefile.in (GDBREPLAY_OBS): New variable.
	(gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2008-08-07 22:49:10 +00:00
Thiago Jung Bauermann d57a3c85f6 Initial python support.
gdb/
2008-08-06  Vladimir Prus  <vladimir@codesourcery.com>
	    Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Doug Evans  <dje@google.com>

	* Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
	SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
	PYTHON_CFLAGS): New.
	(python_h, python_internal_h): New.
	(cli-script.o): Depend on python.h
	(python.o, python-utils.o): New.
	* cli/cli-script.c (print_command_lines): Handle python_control.
	(execute_control_command): Handle python_control.
	(execute_control_command_untraced): New function.
	(while_command): Call execute_control_command_untraced.
	(if_command): Likewise.
	(get_command_line): Remove static attribute.
	(read_next_line): Handle "python".
	(recurse_read_control_structure): Handle python_control.
	(read_command_lines): Handle python_control.
	Include python.h.
	* cli/cli-script.h (get_command_line): Add prototype.
	(execute_control_command_untraced): Likewise.
	* configure.ac: Add --with-python.
	* defs.h (enum command_control_type) <python_control>: New
	constant.
	* python/python-internal.h: New file.
	* python/python.c: New file.
	* python/python.h: New file.
	* python/python-utils.c: New file.
	* NEWS: Mention Python scripting support and its new commands.

gdb/doc/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Extending GDB): New chapter.
	(Sequences): Demoted chapter, now a section under the new
	Extending GDB chapter.
	(Python): New section.

gdb/testsuite/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.python/python.exp: New file.
2008-08-06 19:41:33 +00:00
Keith Seitz 5062cc192e * acinclude.m4: Include ../config/tcl.m4 to pick up
standard Tcl configury bits.
        Remove all Tcl, Tk, Itcl, Itk, etc definitions.
        * configure.ac: Don't check if ../itcl exists when building
        gdbtk. It could be installed.
        Rewrite gdbtk configury to allow for using system-supplied
        Tcl and Tk. Gdbtk no longer requires build-time access to
        itcl and itk.
        * Makefile.in: Remove everything related to itcl and itk.
        Rewrite the Tcl bits for gdbtk to correspond to rewrite of
        configure.ac.
        Remove v850ice.o build rule.
        (ALL_TCL_CFLAGS): New convenience defintion. Change all
        gdbtk sources to use it.
        * configure: Regenerate.
2008-08-02 21:36:06 +00:00
Daniel Jacobowitz 064ef605af * configure.ac: Check for the GNU/Linux ptrace signature.
* configure: Regenerated.
2008-07-27 21:18:50 +00:00
Thiago Jung Bauermann e63e4db203 * configure.ac (CONFIG_INITS): Delete long obsoleted variable.
* configure: Regenerate.
2008-07-23 17:40:48 +00:00
Joseph Myers 0f72fb1c9b * configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
in BFD ELF check.
	* configure: Regenerate.
2008-07-18 13:38:14 +00:00
Jan Kratochvil 10568435e1 gdb/
* NEWS (New commands): Mention "set disable-randomization".
	* configure.ac: Add check for HAVE_PERSONALITY and
	HAVE_DECL_ADDR_NO_RANDOMIZE.
	* configure, config.in: Regenerate.
	* linux-nat.c [HAVE_PERSONALITY]: New include <sys/personality.h>.
	[HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
	ADDR_NO_RANDOMIZE.
	(disable_randomization, show_disable_randomization)
	(set_disable_randomization): New.
	(linux_nat_create_inferior) [HAVE_PERSONALITY]: New variables
	PERSONALITY_ORIG and PERSONALITY_SET.  Disable randomization upon the
	variable DISABLE_RANDOMIZATION.
	(_initialize_linux_nat): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
	DISABLE_RANDOMIZATION.

gdb/doc/
	* gdb.texinfo (Starting): Document "set disable-randomization".

gdb/testsuite/
	* gdb.base/randomize.exp, gdb.base/randomize.c: New files.
2008-07-10 09:31:00 +00:00
Jan Kratochvil 3ca64bd3bd * configure.ac (--enable-tui): AC_MSG_ERROR for explicit --enable-tui.
* configure: Regenerated.
2008-06-26 19:20:42 +00:00
Daniel Jacobowitz d5af19bafb * Makefile.in (GNULIB_H): Use GNULIB_STDINT_H.
(gdb_stdint_h, gdb_stdint.h, stamp-int): Delete.  Remove
	all dependencies on $(gdb_stdint_h).
	(distclean): Do not delete gdb_stdint.h.
	* acinclude.m4: Do not use stdint.m4.
	* configure.ac: Set GNULIB_STDINT_H.  Remove tests for stdint.h,
	uintptr_t, and gdb_stdint.h.
	* defs.h: Include <stdint.h>.
	* gdb_thread_db.h: Assume stdint.h is already included.
	* breakpoint.c, findcmd.c, hppa-tdep.c, inf-ptrace.c, proc-service.c,
	rs6000-nat.c, spu-linux-nat.c, target.c, win32-nat.c: Do not
	include gdb_stdint.h.
	* configure, config.in: Regenerate.
2008-06-26 15:51:28 +00:00
Daniel Jacobowitz 3526781ecf * configure.ac (build_warnings): Add -Wno-format for mingw.
* configure: Regenerated.
2008-06-09 15:03:59 +00:00
Joseph Myers c16158bc9c 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
Nathan Sidwell  <nathan@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* acinclude.m4: Include ../config/acx.m4.
	* configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
	* configure, config.in: Regenerate.
	* main.c (print_gdb_help): Use REPORT_BUGS_TO for bug-reporting
	address.
	* top.c (print_gdb_version): Use PKGVERSION and REPORT_BUGS_TO.

doc:
2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
            Nathan Sidwell  <nathan@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Include ../../config/acx.m4.  Use ACX_PKGVERSION
	and ACX_BUGURL.
	* configure: Regenerate.
	* Makefile.in (PKGVERSION, BUGURL_TEXI): Define.
	(GDBvn.texi): Define VERSION_PACKAGE, BUGURL and BUGURL_DEFAULT.
	* gdb.texinfo: Use VERSION_PACKAGE and BUGURL.  Remove
	mailing-list-specific text about bug reporting unless
	BUGURL_DEFAULT.

gdbserver:
2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
            Nathan Sidwell  <nathan@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* acinclude.m4: Include ../../config/acx.m4.
	* configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
	* configure, config.in: Regenerate.
	* Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
	* server.c (gdbserver_version): Print PKGVERSION.
	(gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
	(main): Adjust gdbserver_usage calls.
	* gdbreplay.c (version, host_name): Add declarations.
	(gdbreplay_version, gdbreplay_usage): New.
	(main): Accept --version and --help options.
2008-06-05 22:36:57 +00:00
Paolo Bonzini fdc5970995 gdb:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

        * acinclude.m4: Add override.m4.
        * configure: Regenerate.

gdb/gdbserver:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

        * acinclude.m4: Add override.m4.
        * configure: Regenerate.

gdb/testsuite:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

        * aclocal.m4: Add override.m4.
        * configure: Regenerate.
2008-04-23 12:21:50 +00:00
Craig Silverstein 233a11ab1c * configure.ac (AC_SEARCH_LIBS): Add check for zlib.
* config.in, configure: Regenerate.
	* dwarf2read.c: Include zlib.h if present.
	Modified *_SECTION macros.
	(section_is_p): New.
	(dwarf2_locate_sections): Use section_is_p instead of strcmp
	(dwarf2_resize_section): New.
	to determine whether a given section has a given name.
	(zlib_decompress_section): New.
	(dwarf2_read_section): Read the compressed section if present
	in the binary.
	* testsuite/gdb.dwarf2/dw2-compressed.S: New file.
	* testsuite/gdb.dwarf2/dw2-compressed.exp: New file.
	* MAINTAINERS: Added myself to section Write After Approval.
2008-04-19 05:06:54 +00:00
Daniel Jacobowitz 783e057b02 Fix generated files. 2008-04-14 19:01:21 +00:00
Daniel Jacobowitz e28b33320c * Makefile.in (LIBGNU, INCGNU): Define.
(INTERNAL_CFLAGS_BASE): Add INCGNU.
	(INTERNAL_LIBS, CLIBS, CDEPS): Add LIBGNU.
	(CLEANDIRS): New.
	($(LIBGNU), all-lib): New rules.
	(clean, distclean, do-maintainer-clean): Use CLEANDIRS.
	* configure.ac: Use gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE.
	Simplify AC_CONFIG_AUX_DIR.  Generate gnulib/Makefile.
	* gnulib: New directory, from gnulib-tool.
	* configure, aclocal.m4: Regenerated.

	* Makefile.in (LIBOBJS): New.
	(OBS): Use LIBOBJS.
	(memmem.o): New rule.
	* configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
	* configure: Regenerated.
2008-04-14 18:04:00 +00:00
Thiago Jung Bauermann 83116857a3 * configure.ac (AC_CHECK_FUNCS): Add check for setsid.
* config.in, configure: Regenerate.
	* fork-child.c (fork_inferior): Call create_tty_session.
	* inflow.c (new_tty): Set controlling terminal with TIOCSCTTY.
	(create_tty_session): New function.
	* terminal.h: Declare create_tty_session.
2008-03-12 14:10:56 +00:00
Keith Seitz 686a5eed5d From Dave Murphy <davem@devkitpro.org>:
* configure.ac: Set tcl configdir to win under mingw.
        * configure: Regenerate.
2008-03-03 23:24:22 +00:00
Nick Hudson 5ed10e6edf * configure.ac: Check for void * as 3 argument of ptrace.
* configure: regenerate.
2008-01-13 12:23:05 +00:00
Joseph Myers c162e8c9a4 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Check for *-*-solaris2.1[[0-9]]* instead of
	*-*-solaris2.1[[0-9]].
	* configure: Regenerate.
	* procfs.c (proc_set_current_signal): If redelivering a signal,
	reuse the current siginfo if possible.

testsuite:
	* gdb.base/siginfo-addr.exp, gdb.base/siginfo-addr.c: New.
2007-12-16 22:19:21 +00:00
Ulrich Weigand c0993dbe92 * Makefile.in (ALL_TARGET_OBS): Remove object files that require
64-bit CORE_ADDR and BFD support, move them to ...
	(ALL_64_TARGET_OBS): ... this new variable.
	* configure.ac: Check for --enable-64-bit-bfd option.  Only add
	64-bit targets with --enable-targets=all if BFD supports 64-bit.
	* configure: Regenerate.

	* i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Do not claim
	all elf32-i386 executables, only cygwin core files.
2007-11-27 17:06:12 +00:00
Ulrich Weigand d0c678e6de * configure.ac (--enable-targets): New configure option.
Collect gdb_target_obs of multiple targets into TARGET_OBS.
	Call configure.tgt multiple times, using $targ as operand.
	* configure.tgt: Operate on $targ instead of $target.
	* configure: Regenerate.
	* Makefile.in (ALL_TARGET_OBS): Define.

	* NEWS: Mention --enable-targets option.
2007-11-17 01:02:01 +00:00
Ulrich Weigand a4ce5b0d02 * config/alpha/alpha-linux.mt: Remove file.
* config/alpha/alpha.mt: Remove file.
	* config/alpha/alpha-osf1.mt: Remove file.
	* config/alpha/fbsd.mt: Remove file.
	* config/alpha/nbsd.mt: Remove file.
	* config/alpha/obsd.mt: Remove file.
	* config/arm/embed.mt: Remove file.
	* config/arm/linux.mt: Remove file.
	* config/arm/nbsd.mt: Remove file.
	* config/arm/obsd.mt: Remove file.
	* config/arm/wince.mt: Remove file.
	* config/avr/avr.mt: Remove file.
	* config/cris/cris.mt: Remove file.
	* config/frv/frv.mt: Remove file.
	* config/h8300/h8300.mt: Remove file.
	* config/i386/cygwin.mt: Remove file.
	* config/i386/fbsd64.mt: Remove file.
	* config/i386/fbsd.mt: Remove file.
	* config/i386/i386gnu.mt: Remove file.
	* config/i386/i386.mt: Remove file.
	* config/i386/i386sol2.mt: Remove file.
	* config/i386/linux64.mt: Remove file.
	* config/i386/linux.mt: Remove file.
	* config/i386/mingw.mt: Remove file.
	* config/i386/nbsd64.mt: Remove file.
	* config/i386/nbsd.mt: Remove file.
	* config/i386/nto.mt: Remove file.
	* config/i386/obsd64.mt: Remove file.
	* config/i386/obsd.mt: Remove file.
	* config/i386/sol2-64.mt: Remove file.
	* config/ia64/ia64.mt: Remove file.
	* config/ia64/linux.mt: Remove file.
	* config/iq2000/iq2000.mt: Remove file.
	* config/m32c/m32c.mt: Remove file.
	* config/m32r/linux.mt: Remove file.
	* config/m32r/m32r.mt: Remove file.
	* config/m68hc11/m68hc11.mt: Remove file.
	* config/m68k/linux.mt: Remove file.
	* config/m68k/monitor.mt: Remove file.
	* config/m68k/nbsd.mt: Remove file.
	* config/m68k/obsd.mt: Remove file.
	* config/m88k/obsd.mt: Remove file.
	* config/mep/mep.mt: Remove file.
	* config/mips/embed.mt: Remove file.
	* config/mips/irix5.mt: Remove file.
	* config/mips/irix6.mt: Remove file.
	* config/mips/linux.mt: Remove file.
	* config/mips/nbsd.mt: Remove file.
	* config/mips/obsd64.mt: Remove file.
	* config/mn10300/linux.mt: Remove file.
	* config/mn10300/mn10300.mt: Remove file.
	* config/mt/mt.mt: Remove file.
	* config/pa/hppahpux.mt: Remove file.
	* config/pa/hppa.mt: Remove file.
	* config/pa/linux.mt: Remove file.
	* config/pa/obsd.mt: Remove file.
	* config/powerpc/aix.mt: Remove file.
	* config/powerpc/linux.mt: Remove file.
	* config/powerpc/nbsd.mt: Remove file.
	* config/powerpc/obsd.mt: Remove file.
	* config/powerpc/ppc-eabi.mt: Remove file.
	* config/s390/s390.mt: Remove file.
	* config/score/embed.mt: Remove file.
	* config/sh/embed.mt: Remove file.
	* config/sh/linux.mt: Remove file.
	* config/sh/nbsd.mt: Remove file.
	* config/sh/obsd.mt: Remove file.
	* config/sh/sh64.mt: Remove file.
	* config/sparc/embed.mt: Remove file.
	* config/sparc/fbsd.mt: Remove file.
	* config/sparc/linux64.mt: Remove file.
	* config/sparc/linux.mt: Remove file.
	* config/sparc/nbsd64.mt: Remove file.
	* config/sparc/nbsd.mt: Remove file.
	* config/sparc/obsd64.mt: Remove file.
	* config/sparc/obsd.mt: Remove file.
	* config/sparc/sol2-64.mt: Remove file.
	* config/sparc/sol2.mt: Remove file.
	* config/sparc/sparc64.mt: Remove file.
	* config/sparc/sparc.mt: Remove file.
	* config/spu/spu.mt: Remove file.
	* config/v850/v850.mt: Remove file.
	* config/vax/nbsd.mt: Remove file.
	* config/vax/obsd.mt: Remove file.
	* config/vax/vax.mt: Remove file.
	* config/xstormy16/xstormy16.mt: Remove file.
	* config/xtensa/xtensa.mt: Remove file.

	* configure.tgt (gdb_target_cpu): Remove.  Do not set anywhere.
	(gdb_target): Likewise.
	(gdb_target_obs): Document.  Set for every target to contents
	of TDEPFILES in former .mt makefile fragment.

	* configure.ac (TARGET_OBS): Define.
	(target_makefile_frag, gdb_target_cpu): Do not define.
	* configure: Regenerate.

	* Makefile.in (MT_FLAGS): Remove.
	(GLOBAL_CFLAGS): Update.
	(TARGET_OBS): Substitute from configure.
	(DEPFILES): Remove TDEPFILES, add TARGET_OBS.
	(@target_makefile_frag@): Remove.

doc/ChangeLog:

	* Makefile.in (Makefile): Do not depend on target_makefile_frag.

testsuite/ChangeLog:

	* Makefile.in (Makefile): Do not depend on target_makefile_frag.
	(target_cpu): Remove.
2007-11-17 00:54:18 +00:00
Ulrich Weigand 9b624dbeed * config/arm/embed.mt (SIM_OBS, SIM): Remove.
* config/avr/avr.mt (SIM_OBS, SIM): Remove.
	* config/frv/frv.mt (SIM_OBS, SIM): Remove.
	* config/h8300/h8300.mt (SIM_OBS, SIM): Remove.
	* config/iq2000/iq2000.mt (SIM_OBS, SIM): Remove.
	* config/m32c/m32c.mt (SIM_OBS, SIM): Remove.
	* config/m32r/linux.mt (SIM_OBS, SIM): Remove.
	* config/m32r/m32r.mt (SIM_OBS, SIM): Remove.
	* config/m68hc11/m68hc11.mt (SIM_OBS, SIM): Remove.
	* config/mips/embed.mt (SIM_OBS, SIM): Remove.
	* config/mips/linux.mt (SIM_OBS, SIM): Remove.
	* config/mips/nbsd.mt (SIM_OBS, SIM): Remove.
	* config/mn10300/mn10300.mt (SIM_OBS, SIM): Remove.
	* config/powerpc/linux.mt (SIM_OBS, SIM): Remove.
	* config/powerpc/nbsd.mt (SIM_OBS, SIM): Remove.
	* config/powerpc/ppc-sim.mt: Remove file.
	* config/sh/embed.mt (SIM_OBS, SIM): Remove.
	* config/sh/linux.mt (SIM_OBS, SIM): Remove.
	* config/sh/nbsd.mt (SIM_OBS, SIM): Remove.
	* config/sh/sh64.mt (SIM_OBS, SIM): Remove.
	* config/sparc/embed.mt (SIM_OBS, SIM): Remove.
	* config/v850/v850.mt (SIM_OBS, SIM): Remove.
	* config/xstormy16/xstormy16.mt (SIM_OBS, SIM): Remove.

	* configure.tgt (gdb_sim): Document variable.
	(arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*): Set it.
	(avr-*-*): Likewise.
	(frv-*-*): Likewise.
	(h8300-*-*): Likewise.
	(iq2000-*-*): Likewise.
	(m32c-*-*): Likewise.
	(m32r*-*-linux*): Likewise.
	(m32r*-*-*): Likewise.
	(m68hc11*-*-*|m6811*-*-*): Likewise.
	(mips*-*-*): Likewise.
	(mips*-*-linux*): Likewise.
	(mips*-*-netbsd* | mips*-*-knetbsd*-gnu): Likewise.
	(mn10300-*-*): Likewise.
	(powerpc-*-linux* | powerpc64-*-linux*): Likewise.
	(powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu): Likewise.
	(powerpc*-*-*): Use ppc-eabi target.  Conditionally set gdb_sim.
	(sh*): Set gdb_sim.
	(sh-*-linux*): Likewise.
	(sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu): Likewise.
	(sh64-*-elf*): Likewise.
	(sparc-*-rtems*): Likewise.
	(v850*-*-elf): Likewise.
	(xstormy16-*-*): Likewise.

	* configure.ac (IGNORE_SIM, IGNORE_SIM_OBS): Do not set.
	(SIM, SIM_OBS): Set depending on ${ignore_sim} and ${gdb_sim}.
	* configure: Regenerate.
	* Makefile.in (SIM, SIM_OBS): Substitute from configure.
	(@IGNORE_SIM@, @IGNORE_SIM_OBS@): Remove.
2007-11-17 00:44:38 +00:00