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
This commit is contained in:
Julian Seward 2011-07-12 11:46:24 +00:00
parent 207ec5bf77
commit 30d2b29153
4 changed files with 45 additions and 12 deletions

View File

@ -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)
#----------------------------------------------------------------------------

View File

@ -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

View File

@ -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;

View File

@ -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 <stdio.h>
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 <limits.h>
#include <unistd.h>
@ -50,10 +60,16 @@
#include "assert.h"
#include <sys/user.h>
# if defined(VGO_linux)
#include <sys/prctl.h>
#include <linux/ptrace.h>
# endif
#if defined(VGO_linux)
# include <sys/prctl.h>
# include <linux/ptrace.h>
#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) */