binutils-gdb/gdb/gdbserver/acinclude.m4

59 lines
1.5 KiB
Plaintext
Raw Normal View History

2002-06-11 Daniel Jacobowitz <drow@mvista.com> * gdbserver/thread-db.c: New file. * gdbserver/proc-service.c: New file. * gdbserver/acinclude.m4: New file. * gdbserver/Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h, proc-service.o, and thread-db.o. (linux-low.o): Add USE_THREAD_DB. * gdbserver/acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN. * gdbserver/aclocal.m4: Regenerated. * gdbserver/config.in: Regenerated. * gdbserver/configure: Regenerated. * gdbserver/configure.in: Check for proc_service.h, sys/procfs.h, thread_db.h, and linux/elf.h headrs. Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB. Check for -lthread_db and thread support. * gdbserver/configure.srv: Enable thread_db support for ARM, i386, MIPS, PowerPC, and SuperH. * gdbserver/i387-fp.c: Constify arguments. * gdbserver/i387-fp.h: Likewise. * gdbserver/inferiors.c: (struct thread_info): Renamed from `struct inferior_info'. Remove PID member. Use generic inferior list header. All uses updated. (inferiors, signal_pid): Removed. (all_threads): New variable. (get_thread): Define. (add_inferior_to_list): New function. (for_each_inferior): New function. (change_inferior_id): New function. (add_inferior): Removed. (remove_inferior): New function. (add_thread): New function. (free_one_thread): New function. (remove_thread): New function. (clear_inferiors): Use for_each_inferior and free_one_thread. (find_inferior): New function. (find_inferior_id): New function. (inferior_target_data): Update argument type. (set_inferior_target_data): Likewise. (inferior_regcache_data): Likewise. (set_inferior_regcache_data): Likewise. * gdbserver/linux-low.c (linux_bp_reinsert): Remove. (all_processes, stopping_threads, using_thrads) (struct pending_signals, debug_threads, pid_of): New. (inferior_pid): Replace with macro. (struct inferior_linux_data): Remove. (get_stop_pc, add_process): New functions. (linux_create_inferior): Restore SIGRTMIN+1 before calling exec. Use add_process and add_thread. (linux_attach_lwp): New function, based on old linux_attach. Use add_process and add_thread. Set stop_expected for new threads. (linux_attach): New function. (linux_kill_one_process): New function. (linux_kill): Kill all LWPs. (linux_thread_alive): Use find_inferior_id. (check_removed_breakpoints, status_pending_p): New functions. (linux_wait_for_process): Renamed from linux_wait_for_one_inferior. Update. Use WNOHANG. Wait for cloned processes also. Update process struct for the found process. (linux_wait_for_event): New function. (linux_wait): Use it. Support LWPs. (send_sigstop, wait_for_sigstop, stop_all_processes) (linux_resume_one_process, linux_continue_one_process): New functions. (linux_resume): Support LWPs. (REGISTER_RAW_SIZE): Remove. (fetch_register): Use register_size instead. Call supply_register. (usr_store_inferior_registers): Likewise. Call collect_register. Fix recursive case. (regsets_fetch_inferior_registers): Improve error message. (regsets_store_inferior_registers): Add debugging. (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB. (unstopped_p, linux_signal_pid): New functions. (linux_target_ops): Add linux_signal_pid. (linux_init_signals): New function. (initialize_low): Call it. Initialize using_threads. * gdbserver/regcache.c (inferior_regcache_data): Add valid flag. (get_regcache): Fetch registers lazily. Add fetch argument and update all callers. (regcache_invalidate_one, regcache_invalidate): New functions. (new_register_cache): Renamed from create_register_cache. Return the new regcache. (free_register_cache): Change argument to a void *. (registers_to_string, registers_from_string): Call get_regcache with fetch flag set. (register_data): Make static. Pass fetch flag to get_regcache. (supply_register): Call get_regcache with fetch flag clear. (collect_register): Call get_regcache with fetch flag set. (collect_register_as_string): New function. * gdbserver/regcache.h: Update. * gdbserver/remote-utils.c (putpkt): Flush after debug output and use stderr. Handle input interrupts while waiting for an ACK. (input_interrupt): Use signal_pid method. (getpkt): Flush after debug output and use stderr. (outreg): Use collect_register_as_string. (new_thread_notify, dead_thread_notify): New functions. (prepare_resume_reply): Check using_threads. Set thread_from_wait and general_thread. (look_up_one_symbol): Flush after debug output. * gdbserver/server.c (step_thread, server_waiting): New variables. (start_inferior): Don't use signal_pid. Update call to mywait. (attach_inferior): Update call to mywait. (handle_query): Handle qfThreadInfo and qsThreadInfo. (main): Don't fetch/store registers explicitly. Use set_desired_inferior. Support proposed ``Hs'' packet. Update calls to mywait. * gdbserver/server.h: Update. (struct inferior_list, struct_inferior_list_entry): New. * gdbserver/target.c (set_desired_inferior): New. (write_inferior_memory): Constify. (mywait): New function. * gdbserver/target.h: Update. (struct target_ops): New signal_pid method. (mywait): Removed macro, added prototype. * gdbserver/linux-low.h (regset_func): Removed. (regset_fill_func, regset_store_func): New. (enum regset_type): New. (struct regset_info): Add type field. Use new operation types. (struct linux_target_ops): stop_pc renamed to get_pc. Add decr_pc_after_break and breakpoint_at. (get_process, get_thread_proess, get_process_thread) (strut process_info, all_processes, linux_attach_lwp) (thread_db_init): New. * gdbserver/linux-arm-low.c (arm_get_pc, arm_set_pc, arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New. (the_low_target): Add new members. * gdbserver/linux-i386-low.c (i386_store_gregset, i386_store_fpregset) (i386_store_fpxregset): Constify. (target_regsets): Add new kind identifier. (i386_get_pc): Renamed from i386_stop_pc. Simplify. (i386_set_pc): Add debugging. (i386_breakpoint_at): New function. (the_low_target): Add new members. * gdbserver/linux-mips-low.c (mips_get_pc, mips_set_pc) (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr) (mips_breakpoint_at): New. (the_low_target): Add new members. * gdbserver/linux-ppc-low.c (ppc_get_pc, ppc_set_pc) (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New. (the_low_target): Add new members. * gdbserver/linux-sh-low.c (sh_get_pc, sh_set_pc) (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New. (the_low_target): Add new members. * gdbserver/linux-x86-64-low.c (target_regsets): Add new kind identifier.
2002-06-11 19:32:40 +02:00
dnl gdb/gdbserver/configure.in uses BFD_HAVE_SYS_PROCFS_TYPE.
m4_include(../../bfd/bfd.m4)
2002-06-11 Daniel Jacobowitz <drow@mvista.com> * gdbserver/thread-db.c: New file. * gdbserver/proc-service.c: New file. * gdbserver/acinclude.m4: New file. * gdbserver/Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h, proc-service.o, and thread-db.o. (linux-low.o): Add USE_THREAD_DB. * gdbserver/acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN. * gdbserver/aclocal.m4: Regenerated. * gdbserver/config.in: Regenerated. * gdbserver/configure: Regenerated. * gdbserver/configure.in: Check for proc_service.h, sys/procfs.h, thread_db.h, and linux/elf.h headrs. Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB. Check for -lthread_db and thread support. * gdbserver/configure.srv: Enable thread_db support for ARM, i386, MIPS, PowerPC, and SuperH. * gdbserver/i387-fp.c: Constify arguments. * gdbserver/i387-fp.h: Likewise. * gdbserver/inferiors.c: (struct thread_info): Renamed from `struct inferior_info'. Remove PID member. Use generic inferior list header. All uses updated. (inferiors, signal_pid): Removed. (all_threads): New variable. (get_thread): Define. (add_inferior_to_list): New function. (for_each_inferior): New function. (change_inferior_id): New function. (add_inferior): Removed. (remove_inferior): New function. (add_thread): New function. (free_one_thread): New function. (remove_thread): New function. (clear_inferiors): Use for_each_inferior and free_one_thread. (find_inferior): New function. (find_inferior_id): New function. (inferior_target_data): Update argument type. (set_inferior_target_data): Likewise. (inferior_regcache_data): Likewise. (set_inferior_regcache_data): Likewise. * gdbserver/linux-low.c (linux_bp_reinsert): Remove. (all_processes, stopping_threads, using_thrads) (struct pending_signals, debug_threads, pid_of): New. (inferior_pid): Replace with macro. (struct inferior_linux_data): Remove. (get_stop_pc, add_process): New functions. (linux_create_inferior): Restore SIGRTMIN+1 before calling exec. Use add_process and add_thread. (linux_attach_lwp): New function, based on old linux_attach. Use add_process and add_thread. Set stop_expected for new threads. (linux_attach): New function. (linux_kill_one_process): New function. (linux_kill): Kill all LWPs. (linux_thread_alive): Use find_inferior_id. (check_removed_breakpoints, status_pending_p): New functions. (linux_wait_for_process): Renamed from linux_wait_for_one_inferior. Update. Use WNOHANG. Wait for cloned processes also. Update process struct for the found process. (linux_wait_for_event): New function. (linux_wait): Use it. Support LWPs. (send_sigstop, wait_for_sigstop, stop_all_processes) (linux_resume_one_process, linux_continue_one_process): New functions. (linux_resume): Support LWPs. (REGISTER_RAW_SIZE): Remove. (fetch_register): Use register_size instead. Call supply_register. (usr_store_inferior_registers): Likewise. Call collect_register. Fix recursive case. (regsets_fetch_inferior_registers): Improve error message. (regsets_store_inferior_registers): Add debugging. (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB. (unstopped_p, linux_signal_pid): New functions. (linux_target_ops): Add linux_signal_pid. (linux_init_signals): New function. (initialize_low): Call it. Initialize using_threads. * gdbserver/regcache.c (inferior_regcache_data): Add valid flag. (get_regcache): Fetch registers lazily. Add fetch argument and update all callers. (regcache_invalidate_one, regcache_invalidate): New functions. (new_register_cache): Renamed from create_register_cache. Return the new regcache. (free_register_cache): Change argument to a void *. (registers_to_string, registers_from_string): Call get_regcache with fetch flag set. (register_data): Make static. Pass fetch flag to get_regcache. (supply_register): Call get_regcache with fetch flag clear. (collect_register): Call get_regcache with fetch flag set. (collect_register_as_string): New function. * gdbserver/regcache.h: Update. * gdbserver/remote-utils.c (putpkt): Flush after debug output and use stderr. Handle input interrupts while waiting for an ACK. (input_interrupt): Use signal_pid method. (getpkt): Flush after debug output and use stderr. (outreg): Use collect_register_as_string. (new_thread_notify, dead_thread_notify): New functions. (prepare_resume_reply): Check using_threads. Set thread_from_wait and general_thread. (look_up_one_symbol): Flush after debug output. * gdbserver/server.c (step_thread, server_waiting): New variables. (start_inferior): Don't use signal_pid. Update call to mywait. (attach_inferior): Update call to mywait. (handle_query): Handle qfThreadInfo and qsThreadInfo. (main): Don't fetch/store registers explicitly. Use set_desired_inferior. Support proposed ``Hs'' packet. Update calls to mywait. * gdbserver/server.h: Update. (struct inferior_list, struct_inferior_list_entry): New. * gdbserver/target.c (set_desired_inferior): New. (write_inferior_memory): Constify. (mywait): New function. * gdbserver/target.h: Update. (struct target_ops): New signal_pid method. (mywait): Removed macro, added prototype. * gdbserver/linux-low.h (regset_func): Removed. (regset_fill_func, regset_store_func): New. (enum regset_type): New. (struct regset_info): Add type field. Use new operation types. (struct linux_target_ops): stop_pc renamed to get_pc. Add decr_pc_after_break and breakpoint_at. (get_process, get_thread_proess, get_process_thread) (strut process_info, all_processes, linux_attach_lwp) (thread_db_init): New. * gdbserver/linux-arm-low.c (arm_get_pc, arm_set_pc, arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New. (the_low_target): Add new members. * gdbserver/linux-i386-low.c (i386_store_gregset, i386_store_fpregset) (i386_store_fpxregset): Constify. (target_regsets): Add new kind identifier. (i386_get_pc): Renamed from i386_stop_pc. Simplify. (i386_set_pc): Add debugging. (i386_breakpoint_at): New function. (the_low_target): Add new members. * gdbserver/linux-mips-low.c (mips_get_pc, mips_set_pc) (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr) (mips_breakpoint_at): New. (the_low_target): Add new members. * gdbserver/linux-ppc-low.c (ppc_get_pc, ppc_set_pc) (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New. (the_low_target): Add new members. * gdbserver/linux-sh-low.c (sh_get_pc, sh_set_pc) (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New. (the_low_target): Add new members. * gdbserver/linux-x86-64-low.c (target_regsets): Add new kind identifier.
2002-06-11 19:32:40 +02:00
m4_include(../acx_configure_dir.m4)
2012-04-19 Pedro Alves <palves@redhat.com> gdb/ * Makefile.in (GNULIB_BUILDDIR): New. (LIBGNU, INCGNU, GNULIB_H): Adjust. (SUBDIRS): Add $(GNULIB_BUILDDIR). (CLEANDIRS). Remove gnulib/import. (REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR). (all-lib): Ditto. (distclean): Remove the $(GNULIB_BUILDDIR) directory. (gnulib/import/Makefile): Replace gnulib/import with $(GNULIB_BUILDDIR). Set CONFIG_FILES to just Makefile. (ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'. (aclocal_m4_deps): Remove the gnulib dependencies. Add acx_configure_dir.m4. * acinclude.m4: Include acx_configure_dir.m4. * acx_configure_dir.m4: New file. * aclocal.m4: Regenerate. * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE calls. Configure gnulib using ACX_CONFIGURE_DIR. (GNULIB): New variable. (GNULIB_STDINT_H): Adjust. (AC_OUTPUT): Don't output gnulib/Makefile. * gdb/defs.h: Include build-gnulib/config.h. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * gnulib/Makefile.in: New file. * gnulib/configure.ac: New file. * gnulib/aclocal.m4: New file. * gnulib/config.in: New file. * gnulib/configure: New file. * gnulib/: Re-run gnulib-tool to adjust. gdb/gdbserver/ * Makefile.in (GNULIB_BUILDDIR): New. (LIBGNU, INCGNU, GNULIB_H): Adjust. (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New. (all, install-only, uninstall, clean-info, all-lib, clean): No longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do. (maintainer-clean realclean distclean): Use subdir_do. (subdir_do): New. (gnulib/import/Makefile): Adjust. Replace gnulib/import with $(GNULIB_BUILDDIR). Don't pass argument to config.status. * acinclude.m4: Include acx_configure_dir.m4. * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE calls. Call AC_PROG_RANLIB. Configure gnulib using ACX_CONFIGURE_DIR. (GNULIB): New. (GNULIB_STDINT_H): Adjust. (AC_OUTPUT): Don't output gnulib/Makefile anymore. * gdbreplay.c: Include build-gnulib/config.h. * server.h: Likewise. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate.
2012-04-19 21:34:52 +02:00
# This gets AM_GDB_WARNINGS.
m4_include(../warning.m4)
dnl This gets autoconf bugfixes
m4_include(../../config/override.m4)
2008-06-05 Vladimir Prus <vladimir@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * acinclude.m4: Include ../config/acx.m4. * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL. * configure, config.in: Regenerate. * main.c (print_gdb_help): Use REPORT_BUGS_TO for bug-reporting address. * top.c (print_gdb_version): Use PKGVERSION and REPORT_BUGS_TO. doc: 2008-06-05 Vladimir Prus <vladimir@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure.ac: Include ../../config/acx.m4. Use ACX_PKGVERSION and ACX_BUGURL. * configure: Regenerate. * Makefile.in (PKGVERSION, BUGURL_TEXI): Define. (GDBvn.texi): Define VERSION_PACKAGE, BUGURL and BUGURL_DEFAULT. * gdb.texinfo: Use VERSION_PACKAGE and BUGURL. Remove mailing-list-specific text about bug reporting unless BUGURL_DEFAULT. gdbserver: 2008-06-05 Vladimir Prus <vladimir@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * acinclude.m4: Include ../../config/acx.m4. * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL. * configure, config.in: Regenerate. * Makefile.in (gdbreplay$(EXEEXT)): Add version.o. * server.c (gdbserver_version): Print PKGVERSION. (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO. (main): Adjust gdbserver_usage calls. * gdbreplay.c (version, host_name): Add declarations. (gdbreplay_version, gdbreplay_usage): New. (main): Accept --version and --help options.
2008-06-06 00:36:57 +02:00
dnl For ACX_PKGVERSION and ACX_BUGURL.
m4_include(../../config/acx.m4)
2008-06-05 Vladimir Prus <vladimir@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * acinclude.m4: Include ../config/acx.m4. * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL. * configure, config.in: Regenerate. * main.c (print_gdb_help): Use REPORT_BUGS_TO for bug-reporting address. * top.c (print_gdb_version): Use PKGVERSION and REPORT_BUGS_TO. doc: 2008-06-05 Vladimir Prus <vladimir@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * configure.ac: Include ../../config/acx.m4. Use ACX_PKGVERSION and ACX_BUGURL. * configure: Regenerate. * Makefile.in (PKGVERSION, BUGURL_TEXI): Define. (GDBvn.texi): Define VERSION_PACKAGE, BUGURL and BUGURL_DEFAULT. * gdb.texinfo: Use VERSION_PACKAGE and BUGURL. Remove mailing-list-specific text about bug reporting unless BUGURL_DEFAULT. gdbserver: 2008-06-05 Vladimir Prus <vladimir@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * acinclude.m4: Include ../../config/acx.m4. * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL. * configure, config.in: Regenerate. * Makefile.in (gdbreplay$(EXEEXT)): Add version.o. * server.c (gdbserver_version): Print PKGVERSION. (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO. (main): Adjust gdbserver_usage calls. * gdbreplay.c (version, host_name): Add declarations. (gdbreplay_version, gdbreplay_usage): New. (main): Accept --version and --help options.
2008-06-06 00:36:57 +02:00
* Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre) (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New macros. (.c.o): Rewrite. (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o) (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o) (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o) (amd64-linux-ipa.o, ax.o): Rewrite. (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o) (proc-service.o, regcache.o, remote-utils.o, server.o, target.o) (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove. (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o) (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o) (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite. (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o) (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o) (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o) (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o) (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o) (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o) (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o) (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o) (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o) (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o) (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o) (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o) (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o) (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o) (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o) (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o) (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o) (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o) (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o) (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o) (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o) (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o) (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o) (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o) (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o) (reg-tilegx.o): Remove. (all_object_files): New macro. Include .deps files. * aclocal.m4, configure: Rebuild. * acinclude.m4: Include depstand.m4, lead-dot.m4. * configure.ac: Invoke ZW_CREATE_DEPDIR, ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2012-12-10 21:16:14 +01:00
m4_include(../../config/depstand.m4)
m4_include(../../config/lead-dot.m4)
dnl Needed for common.m4
dnl For AC_LIB_HAVE_LINKFLAGS.
m4_include(../../config/lib-ld.m4)
m4_include(../../config/lib-prefix.m4)
m4_include(../../config/lib-link.m4)
dnl codeset.m4 is needed for common.m4, but not for
dnl anything else in gdbserver.
m4_include(../../config/codeset.m4)
Move gdbsupport to the top level This patch moves the gdbsupport directory to the top level. This is the next step in the ongoing project to move gdbserver to the top level. The bulk of this patch was created by "git mv gdb/gdbsupport gdbsupport". This patch then adds a build system to gdbsupport and wires it into the top level. Then it changes gdb to use the top-level build. gdbserver, on the other hand, is not yet changed. It still does its own build of gdbsupport. ChangeLog 2020-01-14 Tom Tromey <tom@tromey.com> * src-release.sh (GDB_SUPPORT_DIRS): Add gdbsupport. * MAINTAINERS: Add gdbsupport. * configure: Rebuild. * configure.ac (configdirs): Add gdbsupport. * gdbsupport: New directory, move from gdb/gdbsupport. * Makefile.def (host_modules, dependencies): Add gnulib. * Makefile.in: Rebuild. gdb/ChangeLog 2020-01-14 Tom Tromey <tom@tromey.com> * nat/x86-linux-dregs.c: Include configh.h. * nat/linux-ptrace.c: Include configh.h. * nat/linux-btrace.c: Include configh.h. * defs.h: Include config.h, bfd.h. * configure.ac: Don't source common.host. (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files. * configure: Rebuild. * acinclude.m4: Update path. * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables. (CONFIG_SRC_SUBDIR): Remove gdbsupport. (INTERNAL_CFLAGS_BASE): Add INCSUPPORT. (CLIBS): Add LIBSUPPORT. (CDEPS): Likewise. (COMMON_SFILES): Remove gdbsupport files. (HFILES_NO_SRCDIR): Likewise. (stamp-version): Update path to create-version.sh. (ALLDEPFILES): Remove gdbsupport files. gdb/gdbserver/ChangeLog 2020-01-14 Tom Tromey <tom@tromey.com> * server.h: Include config.h. * gdbreplay.c: Include config.h. * configure: Rebuild. * configure.ac: Don't source common.host. * acinclude.m4: Update path. * Makefile.in (INCSUPPORT): New variable. (INCLUDE_CFLAGS): Add INCSUPPORT. (SFILES): Update paths. (version-generated.c): Update path to create-version.sh. (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths. gdbsupport/ChangeLog 2020-01-14 Tom Tromey <tom@tromey.com> * common-defs.h: Add GDBSERVER case. Update includes. * acinclude.m4, aclocal.m4, config.in, configure, configure.ac, Makefile.am, Makefile.in, README: New files. * Moved from ../gdb/gdbsupport/ Change-Id: I07632e7798635c1bab389bf885971e584fb4bb78
2019-07-09 16:06:39 +02:00
m4_include(../../gdbsupport/common.m4)
dnl For libiberty_INIT.
m4_include(../libiberty.m4)
dnl For GDB_AC_PTRACE.
m4_include(../ptrace.m4)
gdb: Require C++11 Use AX_CXX_COMPILE_STDCXX to detect if the compiler supports C++11, and if -std=xxx switches are necessary to enable C++11. We need to tweak AX_CXX_COMPILE_STDCXX a bit though. Pristine upstream AX_CXX_COMPILE_STDCXX appends -std=gnu++11 to CXX directly. That doesn't work for us, because the top level Makefile passes CXX down to subdirs, and that overrides whatever gdb/Makefile may set CXX to. The result would be that a make invocation from the build/gdb/ directory would use "g++ -std=gnu++11" as expected, while a make invocation at the top level would not. So instead of having AX_CXX_COMPILE_STDCXX set CXX directly, tweak it to AC_SUBST a separate variable -- CXX_DIALECT -- and use '$(CXX) (CXX_DIALECT)' to compile/link. Confirmed that this enables C++11 starting with gcc 4.8, the first gcc release with full C++11 support. Also confirmed that configure errors out gracefully with older GCC releases: checking whether /opt/gcc-4.7/bin/g++ supports C++11 features by default... no checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -std=gnu++11... no checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -std=gnu++0x... no checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -std=c++11... no checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -std=c++0x... no checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with +std=c++11... no checking whether /opt/gcc-4.7/bin/g++ supports C++11 features with -h std=c++11... no configure: error: *** A compiler with support for C++11 language features is required. Makefile:9451: recipe for target 'configure-gdb' failed make[1]: *** [configure-gdb] Error 1 make[1]: Leaving directory '/home/pedro/brno/pedro/gdb/mygit/cxx-convertion/build-gcc-4.7' If we need to revert back to making C++11 optional, all that's necessary is to change the "mandatory" to "optional" in configure.ac and regenerate configure (both gdb and gdbserver). gdb/ChangeLog: 2016-10-28 Pedro Alves <palves@redhat.com> * Makefile.in (CXX_DIALECT): Get from configure. (COMPILE.pre, CC_LD): Append $(CXX_DIALECT). (FLAGS_TO_PASS): Pass CXX_DIALECT. * acinclude.m4: Include ax_cxx_compile_stdcxx.m4. * ax_cxx_compile_stdcxx.m4: Add FSF copyright header. Set and AC_SUBST CXX_DIALECT instead of changing CXX/CXXCPP. * configure.ac: Call AX_CXX_COMPILE_STDCXX. * config.in: Regenerate. * configure: Regenerate. gdb/gdbserver/ChangeLog: 2016-10-28 Pedro Alves <palves@redhat.com> * Makefile.in (CXX_DIALECT): Get from configure. (COMPILE.pre, CC_LD): Append $(CXX_DIALECT). * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4. * configure.ac: Call AX_CXX_COMPILE_STDCXX. * config.in: Regenerate. * configure: Regenerate.
2016-10-13 01:27:45 +02:00
m4_include(../ax_cxx_compile_stdcxx.m4)
Add parameter to allow enabling/disabling selftests via configure This is a follow-up of: https://sourceware.org/ml/gdb-patches/2018-08/msg00347.html Instead of going throttle and always enabling our selftests (even in non-development builds), this patch is a bit more conservative and introduces a configure option ("--enable-unit-tests") that allows the user to choose whether she wants unit tests in the build or not. Note that the current behaviour is retained: if no option is provided, GDB will have selftests included in a development build, and will *not* have selftests included in a non-development build. The rationale for having this option is still the same: due to the many racy testcases and random failures we see when running the GDB testsuite, it is unfortunately not possible to perform a full test when one is building a downstream package. As the Fedora GDB maintainer and one of the Debian GDB uploaders, I feel like this situation could be improved by, at least, executing our selftests after the package has been built. This patch introduces no regressions to our build. OK? gdb/ChangeLog: 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com> Simon Marchi <simark@simark.ca> * README (`configure' options): Add documentation for new "--enable-unit-tests" option. * acinclude.m4: Include "selftest.m4". * configure: Regenerate. * configure.ac: Use "GDB_AC_SELFTEST". * maint.c (maintenance_selftest): Update message informing that selftests have been disabled. (maintenance_info_selftests): Likewise. * selftest.m4: New file. gdb/gdbserver/ChangeLog: 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com> Simon Marchi <simark@simark.ca> * acinclude.m4: Include "../selftest.m4". * configure: Regenerate. * configure.ac: Use "GDB_AC_SELFTEST". * configure.srv: Use "$enable_unittests" instead of "$development" when checking whether unit tests have been enabled. * server.c (captured_main): Update message informing that selftests have been disabled. gdb/testsuite/ChangeLog: 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.gdb/unittest.exp: Update expected message informing that selftests have been disabled. * gdb.server/unittest.exp: Likewise. squash! Add parameter to allow enabling/disabling selftests via configure
2018-09-17 21:58:55 +02:00
dnl For GDB_AC_SELFTEST.
m4_include(../selftest.m4)
m4_include([../../config/ax_pthread.m4])
dnl Check for existence of a type $1 in libthread_db.h
dnl Based on BFD_HAVE_SYS_PROCFS_TYPE in bfd/bfd.m4.
AC_DEFUN([GDBSERVER_HAVE_THREAD_DB_TYPE],
[AC_MSG_CHECKING([for $1 in thread_db.h])
AC_CACHE_VAL(gdbserver_cv_have_thread_db_type_$1,
[AC_TRY_COMPILE([
#include <thread_db.h>],
[$1 avar],
gdbserver_cv_have_thread_db_type_$1=yes,
gdbserver_cv_have_thread_db_type_$1=no
)])
if test $gdbserver_cv_have_thread_db_type_$1 = yes; then
AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
[Define if <thread_db.h> has $1.])
fi
AC_MSG_RESULT($gdbserver_cv_have_thread_db_type_$1)
])