summaryrefslogtreecommitdiff
path: root/gdb/configure
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash if pkg-config is not found and guile wasn't explicitly requested.Doug Evans2014-02-101-41/+31
| | | | | | | * 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.
* Add Guile as an extension language.Doug Evans2014-02-091-0/+414
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Extension Language APIDoug Evans2014-02-051-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: Support install-strip targetRoland McGrath2014-01-211-0/+115
| | | | | | | | | | | | | | 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.
* * configure.ac: Add comments delineating libpython and libmcheck.Doug Evans2013-11-281-0/+8
| | | | * configure: Regenerate.
* gdb: fix cygwin check in configure scriptSteffen Sledz2013-11-271-1/+1
| | | | | | | | | | | | | 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.
* sys/types.h cleanupTom Tromey2013-11-181-3/+1
| | | | | | | | | | 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.
* don't check for unistd.hTom Tromey2013-11-181-1/+1
| | | | | | | | | | 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 tooTom Tromey2013-11-181-1/+1
| | | | | | | | | | | | | | | | 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.
* don't check for stddef.hTom Tromey2013-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* remove gdb_dirent.hTom Tromey2013-11-181-318/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* don't check for string.h or strings.hTom Tromey2013-11-181-1/+1
| | | | | | | | | | | | | | | | | | 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.
* fix "tkill" checkTom Tromey2013-11-111-1/+6
| | | | | | | | | | | | | | 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".
* gdb configure updatesTom Tromey2013-11-081-198/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* remove link.h checksTom Tromey2013-11-081-162/+0
| | | | | | | | | | | | 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.
* introduce common.m4Tom Tromey2013-11-081-0/+549
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * README: Update references to writing code for GDB.Stan Shebs2013-09-161-5/+0
| | | | | | | | | | | | | | | | | | | | | * 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.
* gdb/Yao Qi2013-09-021-1/+1
| | | | | | | | | | | * 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".
* Unify ptrace options discovery code and make both GDB andLuis Machado2013-08-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07 Raunaq Bathija <raunaq12@in.ibm.com>Ulrich Weigand2013-08-071-1/+1
| | | | | | | | | | | | 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.
* On mainline/development, also link GDBserver with -lmcheck.Pedro Alves2013-07-031-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* add -Wold-style-definitionTom Tromey2013-07-011-1/+1
| | | | | | | | | | | | | | 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)".
* add -Wold-style-declarationTom Tromey2013-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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".
* add -Wmissing-parameter-typeTom Tromey2013-07-011-1/+1
| | | | | | | | | | 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.
* Reimplement DJGPP's .gdbinit -> gdb.ini renaming.Pedro Alves2013-07-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* common/filestuff.c: No sockets on DJGPP.Pedro Alves2013-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Replace hardcoded -ldl with check for availabilityH.J. Lu2013-05-171-4/+224
| | | | | | | | 2013-05-17 Pavel Chupin <pavel.v.chupin@intel.com> * acinclude.m4: Add check for dlopen in libdl. * configure.ac: Ditto. * configure: Regenerate.
* gdb/Thomas Schwinge2013-05-161-2/+9
| | | | | | | | 2013-05-16 Yue Lu <hacklu.newborn@gmail.com> * configure.ac: Ensure MIG is available when building for GNU Hurd hosts. * configure: Regenerate.
* gdbTom Tromey2013-05-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* move sparc-sol-thread.c back into sol-thread.c.Joel Brobecker2013-05-101-7/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* PR gdb/7912:Tom Tromey2013-04-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Enable -Wpointer-sign by default.Pedro Alves2013-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gdb/Jan Kratochvil2013-04-111-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* gdb/Yao Qi2013-04-101-0/+517
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gdb/Jan Kratochvil2013-03-111-0/+3
| | | | | | * configure: Regenerate. * configure.ac (check dynamic export flag): Link python test with $PYTHON_LIBS.
* * config/pa/hpux.mh (NATDEPFILES): Remove somread.o.Tom Tromey2013-01-091-0/+52
| | | | | | | | | | * 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.
* * config/i386/darwin.mh (NATDEPFILES): Remove machoread.o.Tom Tromey2013-01-021-0/+52
| | | | | | * configure.ac: Check for Mach-O support in BFD. Update CONFIG_OBS. * configure: Rebuild.
* * acinclude.m4 (GDB_AC_CHECK_BFD): New macro.Tom Tromey2013-01-021-22/+23
| | | | | * configure.ac: Use GDB_AC_CHECK_BFD. * configure: Rebuild.
* gdb/Pedro Alves2012-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* gdb/Jan Kratochvil2012-12-091-4/+3
| | | | | | | | | | | | | | | | | | | | | | | * 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-11-28 Markus Metzger <markus.t.metzger@intel.com>Markus Metzger2012-11-281-1/+1
| | | | | | | | | | | | 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-26 Alexander Larsson <alexl@redhat.com>Tom Tromey2012-11-261-0/+496
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * configure.ac (AC_HEADER_STAT): Remove.Pierre Muller2012-11-151-42/+0
| | | | | | | * gdb_stat.h (STAT_MACROS_BROKEN): Remove macro use and corresponding code. * configure: Regenerate. * config.in: Regenerate.
* * configure, config.in: Rebuild.Tom Tromey2012-11-141-3/+1
| | | | | * configure.ac: Don't check for ctype.h, time.h. * expprint.c: Don't use HAVE_CTYPE_H.
* * configure: Rebuild.Tom Tromey2012-11-021-1/+1
| | | | | | | | | | | | | | * 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.
* Build with -DMS_WIN64 on amd64-windows if Python enabled...Joel Brobecker2012-10-151-0/+14
| | | | | | | | | | ... and building with GCC. gdb/ChangeLog: * configure.ac: Build with -DMS_WIN64 if building with Python enabled using GCC on amd64-windows. * configure: Regenerate.
* New unit sparc-sol-thread.c extracted from sol-thread.cJoel Brobecker2012-09-271-0/+7
| | | | | | | | | | | | | | | 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-02 Khoo Yit Phang <khooyp@cs.umd.edu>Yit Phang Khoo2012-09-021-63/+100
| | | | | | | | | | | 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.
* Add support for --enable-lmcheck configure option.Joel Brobecker2012-07-251-1/+22
| | | | | | | | | | 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.
* gdb/Jan Kratochvil2012-07-021-1/+1
| | | | | | | | | | | * 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.