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.
|
2005-02-24 21:26:32 +01:00
|
|
|
sinclude(../../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
|
|
|
|
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
|
|
|
sinclude(../acx_configure_dir.m4)
|
|
|
|
|
On mainline/development, also link GDBserver with -lmcheck.
This factors --enable-libmcheck related bits from GDB's configure.ac
and makes GDBserver use them too. Specifically, the 'development'
global is moved to a separate script to it can be sourced by both GDB
and GDBserver, and the --enable-libmcheck/--disable-libmcheck bits
proper are moved to a new m4 file.
I started out by defining 'development' in the m4 file, but in the end
decided against it, as a separate script has the advantage that
changing it in release branches does not require regenerating
configure, unlike today.
I had also started out by making the new GDB_AC_LIBMCHECK itself
handle the yes/no default fallback depending on release/developement,
but since I had split out 'development' to a separate script, and, GDB
needs the python checks anyway (hence we'd need to do the python
checks in gdb's configure.ac, and pass in a 'default lmcheck yes/no'
parameter to GDB_AC_LIBMCHECK anyway), I ended up keeping
GDB_AC_LIBMCHECK isolated from the 'development' global. IOW, it's
the caller's business to handle it.
Tested on x86_64 Fedora 17. Built GDB and GDBserver with and without
--enable-libmcheck, and observed --enable-libmcheck overrides the
disablement of -lmcheck caused by python supporting threads, and that
GDBserver links with -lmcheck when expected. Also observed that
changing the 'development' global, and issuing "make" triggers a
relink, and '-lmcheck' is included or not from the link accordingly.
gdb/
2013-07-03 Pedro Alves <palves@redhat.com>
* Makefile.in (config.status): Depend on development.sh.
(aclocal_m4_deps): Add libmcheck.m4.
* acinclude.m4: Include libmcheck.m4.
* configure.ac: Source development.sh instead of setting
'development' here. --enable-libmcheck/--disable-libmcheck code
factored out to GDB_AC_LIBMCHECK. Run it.
* development.sh: New file.
* libmcheck.m4: New file.
* configure: Regenerate.
gdb/gdbserver/
2013-07-03 Pedro Alves <palves@redhat.com>
* Makefile.in (config.status): Depend on development.sh.
* acinclude.m4: Include libmcheck.m4.
* configure: Regenerate.
2013-07-03 15:25:46 +02:00
|
|
|
# This gets GDB_AC_LIBMCHECK.
|
|
|
|
sinclude(../libmcheck.m4)
|
|
|
|
|
2008-04-23 14:21:50 +02:00
|
|
|
dnl This gets autoconf bugfixes
|
|
|
|
sinclude(../../config/override.m4)
|
|
|
|
|
2008-06-06 00:36:57 +02:00
|
|
|
dnl For ACX_PKGVERSION and ACX_BUGURL.
|
|
|
|
sinclude(../../config/acx.m4)
|
|
|
|
|
* 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)
|
|
|
|
|
2013-04-24 18:45:45 +02:00
|
|
|
dnl codeset.m4 is needed for common.m4, but not for
|
|
|
|
dnl anything else in gdbserver.
|
|
|
|
m4_include(../../config/codeset.m4)
|
|
|
|
m4_include(../common/common.m4)
|
|
|
|
|
2012-04-13 21:56:05 +02:00
|
|
|
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)
|
|
|
|
])
|