From: Julian Seward Date: Tue, 12 Jul 2011 11:46:24 +0000 (+0000) Subject: Build system fixes so as to temporarily disable the GDBserver on X-Git-Tag: svn/VALGRIND_3_7_0~352 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30d2b29153869f637ea8527256f93b79a2be302e;p=thirdparty%2Fvalgrind.git Build system fixes so as to temporarily disable the GDBserver on Android. Making that work will require a bit of extra effort due to minor glibc-vs-bionic differences. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11885 --- diff --git a/configure.in b/configure.in index 1bcff1ec77..eaaf21beac 100644 --- a/configure.in +++ b/configure.in @@ -604,6 +604,7 @@ AC_ARG_WITH(tmpdir, tmpdir="/tmp") AC_DEFINE_UNQUOTED(VG_TMPDIR, "$tmpdir", [Temporary files directory]) + #---------------------------------------------------------------------------- # Libc and suppressions #---------------------------------------------------------------------------- @@ -818,7 +819,12 @@ AC_SUBST(VGCONF_PLATVARIANT) # # VGCONF_PLATFORMS_INCLUDE_ARM_LINUX && VGCONF_PLATVARIANT_IS_ANDROID # -# Oh well, something to figure out properly later on. +# Hmm. Can't think of a nice clean solution to this. + +AM_CONDITIONAL(VGCONF_PLATVARIANT_IS_VANILLA, + test x$VGCONF_PLATVARIANT = xvanilla) +AM_CONDITIONAL(VGCONF_PLATVARIANT_IS_ANDROID, + test x$VGCONF_PLATVARIANT = xandroid) #---------------------------------------------------------------------------- diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index c056401401..6d57695460 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -56,7 +56,10 @@ vgdb_SOURCES = vgdb.c vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI) vgdb_CFLAGS = $(AM_CFLAGS_PRI) vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI) -vgdb_LDFLAGS = $(AM_CFLAGS_PRI) -lpthread +vgdb_LDFLAGS = $(AM_CFLAGS_PRI) +if !VGCONF_PLATVARIANT_IS_ANDROID +vgdb_LDFLAGS += -lpthread +endif if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN vgdb_LDFLAGS += -Wl,-read_only_relocs -Wl,suppress endif diff --git a/coregrind/m_options.c b/coregrind/m_options.c index 59ec1feee0..abc5b2da0f 100644 --- a/coregrind/m_options.c +++ b/coregrind/m_options.c @@ -46,11 +46,17 @@ VexControl VG_(clo_vex_control); Bool VG_(clo_error_limit) = True; Int VG_(clo_error_exitcode) = 0; -VgVgdb VG_(clo_vgdb) = Vg_VgdbYes; + +#if defined(VGPV_arm_linux_android) +VgVgdb VG_(clo_vgdb) = Vg_VgdbNo; // currently disabled on Android +#else +VgVgdb VG_(clo_vgdb) = Vg_VgdbYes; +#endif Int VG_(clo_vgdb_poll) = 5000; Int VG_(clo_vgdb_error) = 999999999; Char* VG_(clo_vgdb_prefix) = VG_CLO_VGDB_PREFIX_DEFAULT; Bool VG_(clo_vgdb_shadow_registers) = False; + Bool VG_(clo_db_attach) = False; Char* VG_(clo_db_command) = GDB_PATH " -nw %f %p"; Int VG_(clo_gen_suppressions) = 0; diff --git a/coregrind/vgdb.c b/coregrind/vgdb.c index a0f900e961..065821bf19 100644 --- a/coregrind/vgdb.c +++ b/coregrind/vgdb.c @@ -25,11 +25,21 @@ The GNU General Public License is contained in the file COPYING. */ -#include "pub_core_basics.h" -#include "pub_core_vki.h" -#include "pub_core_libcsetjmp.h" -#include "pub_core_threadstate.h" -#include "pub_core_gdbserver.h" + +/* Too difficult to make this work on Android right now. Let's + skip for the time being at least. */ +#if defined(VGPV_arm_linux_android) + +#include +int main (int argc, char** argv) +{ + fprintf(stderr, + "%s: is not currently available on Android, sorry.\n", + argv[0]); + return 0; +} + +#else /* all other (Linux?) platforms */ #include #include @@ -50,10 +60,16 @@ #include "assert.h" #include -# if defined(VGO_linux) -#include -#include -# endif +#if defined(VGO_linux) +# include +# include +#endif + +#include "pub_core_basics.h" +#include "pub_core_vki.h" +#include "pub_core_libcsetjmp.h" +#include "pub_core_threadstate.h" +#include "pub_core_gdbserver.h" /* vgdb has two usages: 1. relay application between gdb and the gdbserver embedded in valgrind. @@ -2348,3 +2364,5 @@ int main(int argc, char** argv) free (commands[i]); return 0; } + +#endif /* !defined(VGPV_arm_linux_android) */