diff options
author | Keith Seitz <keiths@redhat.com> | 2007-05-24 20:40:47 +0000 |
---|---|---|
committer | Keith Seitz <kseitz@gcc.gnu.org> | 2007-05-24 20:40:47 +0000 |
commit | e1b871ecc12b6c2a7b62a64ffbbd0714ab8d5c56 (patch) | |
tree | 392327dccccc4770b0a2781a808516934695154c /libjava/testsuite/libjava.jvmti | |
parent | ef9cc8efb487e4df0d6e3b4769b27f1a116ad3d3 (diff) | |
download | gcc-e1b871ecc12b6c2a7b62a64ffbbd0714ab8d5c56.zip gcc-e1b871ecc12b6c2a7b62a64ffbbd0714ab8d5c56.tar.gz gcc-e1b871ecc12b6c2a7b62a64ffbbd0714ab8d5c56.tar.bz2 |
java-interp.h (_Jv_InterpFrame::get_pc): Only deduct one when pc_ptr is non-NULL.
* include/java-interp.h (_Jv_InterpFrame::get_pc): Only deduct
one when pc_ptr is non-NULL.
* prims.cc (parse_init_args): Enable JVMTI with agentlib
and agentpath options.
* testsuite/lib/libjava.exp (exec_gij): Add new addl_flags
parameter.
* testsuite/libjava.jvmti/jvmti-interp.exp (gij_jvmti_test_one):
Pass '-agentlib:dummyagent' when executing gij.
(gij_jvmti_run): Build dummy JVMTI agent before running tests,
and remove it when finished.
* testsuite/libjava.jvmti/dummyagent.c: New file.
From-SVN: r125040
Diffstat (limited to 'libjava/testsuite/libjava.jvmti')
-rw-r--r-- | libjava/testsuite/libjava.jvmti/dummyagent.c | 9 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jvmti/jvmti-interp.exp | 21 |
2 files changed, 25 insertions, 5 deletions
diff --git a/libjava/testsuite/libjava.jvmti/dummyagent.c b/libjava/testsuite/libjava.jvmti/dummyagent.c new file mode 100644 index 0000000..9e704a0 --- /dev/null +++ b/libjava/testsuite/libjava.jvmti/dummyagent.c @@ -0,0 +1,9 @@ +#include <jvmti.h> + +JNIEXPORT jint JNICALL +Agent_OnLoad (JavaVM *vm, char *options, void *reserved) +{ + // nothing -- this is just a stub to get JVMTI properly + // initialized +} + diff --git a/libjava/testsuite/libjava.jvmti/jvmti-interp.exp b/libjava/testsuite/libjava.jvmti/jvmti-interp.exp index 73a0582..c99dd34 100644 --- a/libjava/testsuite/libjava.jvmti/jvmti-interp.exp +++ b/libjava/testsuite/libjava.jvmti/jvmti-interp.exp @@ -133,7 +133,8 @@ proc gij_jvmti_test_one {file} { libjava_arguments set jarfile [file join [file dirname $file] $main.jar] - if {! [exec_gij $jarfile [file rootname $file].out {}]} { + set gij_flags {-agentlib:dummyagent} + if {! [exec_gij $jarfile [file rootname $file].out {} $gij_flags]} { return 0 } @@ -151,14 +152,24 @@ proc gij_jvmti_run {} { # For now we only test JVMTI on native builds. if {$build_triplet == $host_triplet} { - catch { lsort [glob -nocomplain ${srcdir}/${subdir}/interp/*.jar] \ - } srcfiles + + # Build our dummy JVMTI agent library + if {![gcj_jni_compile_c_to_so [file join $srcdir $subdir dummyagent.c]]} { + fail "compiling dummy JVMTI agent" + } else { + pass "compiling dummy JVMTI agent" + + catch {lsort [glob -nocomplain ${srcdir}/${subdir}/interp/*.jar]} \ + srcfiles foreach x $srcfiles { - gij_jvmti_test_one $x + gij_jvmti_test_one $x } + + gcj_cleanup libdummyagent.so + } } else { - verbose "JVMTI tests not run in cross-compilation environment" + verbose "JVMTI tests not run in cross-compilation environment" } } |