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.
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.
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.
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.
* 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.
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.
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.
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.
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.
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.
* 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.
* 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.
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.
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.
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.
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.
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.
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.
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.
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".
My grepping around showed that HAVE_MULTIPLE_PROC_FDS is only ever
mentioned in a comment in configure.ac. Since the macro is long dead,
let's remove the last mention.
2013-11-08 Tom Tromey <tromey@redhat.com>
* configure: Rebuild.
* configure.ac: Remove mentions of HAVE_MULTIPLE_PROC_FDS.
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.
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.
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.
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.
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.
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)".
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".
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.
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.
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.
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.
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-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.
* 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.
Two modifications:
1. The addition of 2013 to the copyright year range for every file;
2. The use of a single year range, instead of potentially multiple
year ranges, as approved by the FSF.
* 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.
... and building with GCC.
gdb/ChangeLog:
* configure.ac: Build with -DMS_WIN64 if building with Python
enabled using GCC on amd64-windows.
* configure: Regenerate.
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.
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.
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.
* 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.
* 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.
* 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'.
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.
* 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.
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.
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.
* 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.
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.
* 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.
* 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.
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.
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-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.
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.
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.
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.
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.
* 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.
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.
* 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.
* 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.