public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM] master: For JNI link in libelf and libdw.
@ 2008-05-26 19:22 cagney
0 siblings, 0 replies; only message in thread
From: cagney @ 2008-05-26 19:22 UTC (permalink / raw)
To: frysk-cvs
The branch, master has been updated
via fb8fcd60afcbedee536157c09b1b77a69d7e8fa0 (commit)
via 6f92530fe3aa15b5397a424d87fc413494ddc430 (commit)
via 256e575785d5bfd77e76e7f8b1d006cac5036eb6 (commit)
from 24f79f595d4d0b1123dc6270f76de92f3b0b9ad4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit fb8fcd60afcbedee536157c09b1b77a69d7e8fa0
Author: Andrew Cagney <cagney@redhat.com>
Date: Mon May 26 15:20:58 2008 -0400
For JNI link in libelf and libdw.
frysk-sys/ChangeLog
2008-05-26 Andrew Cagney <cagney@redhat.com>
* Makefile.am (JniRunner): Load libdw and libelf.
commit 6f92530fe3aa15b5397a424d87fc413494ddc430
Author: Andrew Cagney <cagney@redhat.com>
Date: Mon May 26 14:40:31 2008 -0400
Delete unused extern internal_buffer declaration.
frysk-sys/lib/dwfl/ChangeLog
2008-05-26 Andrew Cagney <cagney@redhat.com>
* cni/ElfData.cxx (internal_buffer): Delete extern declaration.
* jni/ElfData.cxx (internal_buffer): Update.
commit 256e575785d5bfd77e76e7f8b1d006cac5036eb6
Author: Andrew Cagney <cagney@redhat.com>
Date: Mon May 26 14:35:23 2008 -0400
Delete stray cni extern declaration; never referenced.
frysk-sys/lib/dwfl/ChangeLog
2008-05-26 Andrew Cagney <cagney@redhat.com>
* cni/ElfPrstatus.cxx (internalThreads): Delete extern declaration.
* jni/ElfPrXFPRegSet.cxx (internalThreads): Ditto.
* jni/ElfPrFPRegSet.cxx (internalThreads): Ditto.
* jni/ElfPrstatus.cxx (internalThreads): Ditto.
* cni/ElfPrFPRegSet.cxx (internalThreads): Ditto.
* cni/ElfPrXFPRegSet.cxx (internalThreads): Ditto.
-----------------------------------------------------------------------
Summary of changes:
frysk-sys/ChangeLog | 2 ++
frysk-sys/Makefile.am | 9 +++++++--
frysk-sys/lib/dwfl/ChangeLog | 10 ++++++++++
frysk-sys/lib/dwfl/cni/ElfData.cxx | 5 +----
frysk-sys/lib/dwfl/cni/ElfPrFPRegSet.cxx | 3 +--
frysk-sys/lib/dwfl/cni/ElfPrXFPRegSet.cxx | 3 +--
frysk-sys/lib/dwfl/cni/ElfPrstatus.cxx | 3 +--
frysk-sys/lib/dwfl/jni/ElfData.cxx | 5 +----
frysk-sys/lib/dwfl/jni/ElfPrFPRegSet.cxx | 4 +---
frysk-sys/lib/dwfl/jni/ElfPrXFPRegSet.cxx | 3 +--
frysk-sys/lib/dwfl/jni/ElfPrstatus.cxx | 4 +---
11 files changed, 27 insertions(+), 24 deletions(-)
First 500 lines of diff:
diff --git a/frysk-sys/ChangeLog b/frysk-sys/ChangeLog
index 89258b2..16a563b 100644
--- a/frysk-sys/ChangeLog
+++ b/frysk-sys/ChangeLog
@@ -1,5 +1,7 @@
2008-05-26 Andrew Cagney <cagney@redhat.com>
+ * Makefile.am (JniRunner): Load libdw and libelf.
+
* Makefile.am (JNIXX_CLASSES): Add DwAttributeNotFoundException,
ElfException, and java.lang.Long.
diff --git a/frysk-sys/Makefile.am b/frysk-sys/Makefile.am
index 10221c5..2e342ed 100644
--- a/frysk-sys/Makefile.am
+++ b/frysk-sys/Makefile.am
@@ -89,9 +89,14 @@ CLEANFILES += JniRunner
JniRunner: | frysk-sys.jar libfrysk-sys-jni.so
rm -f $@.tmp
echo "#!/bin/sh" >> $@.tmp
- echo "export LD_PRELOAD=libstdc++.so.6" >> $@.tmp
+ echo "export LD_PRELOAD=\"libstdc++.so.6 libdw.so libelf.so\"" >> $@.tmp
echo "# hack to hopefully find the right libstdc++.so" >> $@.tmp
- echo "export LD_LIBRARY_PATH=.:/usr/lib64:/usr/lib" >> $@.tmp
+ echo "export LD_LIBRARY_PATH=.\\" >> $@.tmp
+ echo ":$$(cd ../frysk-imports/elfutils/libdw && pwd)\\" >> $@.tmp
+ echo ":$$(cd ../frysk-imports/elfutils/libelf && pwd)\\" >> $@.tmp
+ echo ":$$(cd ../frysk-imports/elfutils/backends && pwd)\\" >> $@.tmp
+ echo ":/usr/lib64\\" >> $@.tmp
+ echo ":/usr/lib" >> $@.tmp
echo "export CLASSPATH=\\" >> $@.tmp
echo "$(CLASSPATH):frysk-sys.jar:JniRunner.jar" >> $@.tmp
echo "if test \$$# -eq 0 ; then" >> $@.tmp
diff --git a/frysk-sys/lib/dwfl/ChangeLog b/frysk-sys/lib/dwfl/ChangeLog
index d16b387..29ea8b2 100644
--- a/frysk-sys/lib/dwfl/ChangeLog
+++ b/frysk-sys/lib/dwfl/ChangeLog
@@ -1,5 +1,15 @@
2008-05-26 Andrew Cagney <cagney@redhat.com>
+ * cni/ElfData.cxx (internal_buffer): Delete extern declaration.
+ * jni/ElfData.cxx (internal_buffer): Update.
+
+ * cni/ElfPrstatus.cxx (internalThreads): Delete extern declaration.
+ * jni/ElfPrXFPRegSet.cxx (internalThreads): Ditto.
+ * jni/ElfPrFPRegSet.cxx (internalThreads): Ditto.
+ * jni/ElfPrstatus.cxx (internalThreads): Ditto.
+ * cni/ElfPrFPRegSet.cxx (internalThreads): Ditto.
+ * cni/ElfPrXFPRegSet.cxx (internalThreads): Ditto.
+
* jni/ElfSymbol.cxx: Implement.
* jni/ElfSection.cxx: Implement.
* jni/ElfRel.cxx: Implement.
diff --git a/frysk-sys/lib/dwfl/cni/ElfData.cxx b/frysk-sys/lib/dwfl/cni/ElfData.cxx
index d0f49e5..bb1f971 100644
--- a/frysk-sys/lib/dwfl/cni/ElfData.cxx
+++ b/frysk-sys/lib/dwfl/cni/ElfData.cxx
@@ -92,11 +92,8 @@ lib::dwfl::ElfData::getBytes()
return ret;
}
-extern jbyteArray internal_buffer;
-
void
-lib::dwfl::ElfData::elf_data_set_buff (jlong size){
-
+lib::dwfl::ElfData::elf_data_set_buff(jlong size) {
jbyte *bytes = elements(internal_buffer);
((Elf_Data*) this->pointer)->d_buf = bytes;
((Elf_Data*) this->pointer)->d_size = size;
diff --git a/frysk-sys/lib/dwfl/cni/ElfPrFPRegSet.cxx b/frysk-sys/lib/dwfl/cni/ElfPrFPRegSet.cxx
index 63a7834..86f8dae 100644
--- a/frysk-sys/lib/dwfl/cni/ElfPrFPRegSet.cxx
+++ b/frysk-sys/lib/dwfl/cni/ElfPrFPRegSet.cxx
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2006, 2007, Red Hat, Inc.
+// Copyright 2006, 2007, 2008, Red Hat, Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -83,7 +83,6 @@ lib::dwfl::ElfPrFPRegSet::fillMemRegion(jbyteArray buffer, jlong startAddress)
return this->raw_registers->length;
}
-extern ArrayList internalThreads;
jlong lib::dwfl::ElfPrFPRegSet::getNoteData(ElfData *data)
{
void *elf_data = ((Elf_Data*)data->getPointer())->d_buf;
diff --git a/frysk-sys/lib/dwfl/cni/ElfPrXFPRegSet.cxx b/frysk-sys/lib/dwfl/cni/ElfPrXFPRegSet.cxx
index 5268a78..6a38485 100644
--- a/frysk-sys/lib/dwfl/cni/ElfPrXFPRegSet.cxx
+++ b/frysk-sys/lib/dwfl/cni/ElfPrXFPRegSet.cxx
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2007, Red Hat, Inc.
+// Copyright 2007, 2008, Red Hat, Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -87,7 +87,6 @@ lib::dwfl::ElfPrXFPRegSet::fillMemRegion(jbyteArray buffer, jlong startAddress)
return this->raw_registers->length;
}
-extern ArrayList internalThreads;
jlong lib::dwfl::ElfPrXFPRegSet::getNoteData(ElfData *data)
{
void *elf_data = ((Elf_Data*)data->getPointer())->d_buf;
diff --git a/frysk-sys/lib/dwfl/cni/ElfPrstatus.cxx b/frysk-sys/lib/dwfl/cni/ElfPrstatus.cxx
index 36f60e4..9696225 100644
--- a/frysk-sys/lib/dwfl/cni/ElfPrstatus.cxx
+++ b/frysk-sys/lib/dwfl/cni/ElfPrstatus.cxx
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2006,2007 Red Hat, Inc.
+// Copyright 2006, 2007, 2008 Red Hat, Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -263,7 +263,6 @@ lib::dwfl::ElfPrstatus::fillMemRegion(jbyteArray buffer, jlong startAddress)
}
-extern ArrayList internalThreads;
jlong
lib::dwfl::ElfPrstatus::getNoteData(ElfData *data)
{
diff --git a/frysk-sys/lib/dwfl/jni/ElfData.cxx b/frysk-sys/lib/dwfl/jni/ElfData.cxx
index b04f357..33552c4 100644
--- a/frysk-sys/lib/dwfl/jni/ElfData.cxx
+++ b/frysk-sys/lib/dwfl/jni/ElfData.cxx
@@ -86,12 +86,9 @@ lib::dwfl::ElfData::getBytes(jnixx::env env) {
return ret;
}
-extern jnixx::jbyteArray internal_buffer;
-
void
lib::dwfl::ElfData::elf_data_set_buff (jnixx::env env, jlong size) {
- fprintf(stderr, "accessing a global buffer\n");
- jbyteArrayElements bytes = jbyteArrayElements(env, internal_buffer);
+ jbyteArrayElements bytes = jbyteArrayElements(env, GetInternal_buffer(env));
fprintf(stderr, "saving a pointer into the JNI\n");
(ELF_DATA_POINTER)->d_buf = bytes.elements();
(ELF_DATA_POINTER)->d_size = bytes.length();
diff --git a/frysk-sys/lib/dwfl/jni/ElfPrFPRegSet.cxx b/frysk-sys/lib/dwfl/jni/ElfPrFPRegSet.cxx
index 8338732..3eaf148 100644
--- a/frysk-sys/lib/dwfl/jni/ElfPrFPRegSet.cxx
+++ b/frysk-sys/lib/dwfl/jni/ElfPrFPRegSet.cxx
@@ -78,7 +78,6 @@ lib::dwfl::ElfPrFPRegSet::fillMemRegion(jnixx::env env,
return length;
}
-extern ArrayList internalThreads;
jlong lib::dwfl::ElfPrFPRegSet::getNoteData(jnixx::env env, ElfData data) {
void *elf_data = ((Elf_Data*)data.getPointer(env))->d_buf;
GElf_Nhdr *nhdr = (GElf_Nhdr *)elf_data;
@@ -114,8 +113,7 @@ jlong lib::dwfl::ElfPrFPRegSet::getNoteData(jnixx::env env, ElfData data) {
memcpy(buf.elements(), ((unsigned char *)elf_data)+note_data_loc,
nhdr->n_descsz);
- fprintf(stderr, "acessing global internalThreads\n");
- internalThreads.add(env, jbuf);
+ GetInternalThreads(env).add(env, jbuf);
// Move pointer along, now we have processed the first thread
note_loc += (sizeof (GElf_Nhdr) + ((nhdr->n_namesz + 0x03) & ~0x3)) + nhdr->n_descsz;
diff --git a/frysk-sys/lib/dwfl/jni/ElfPrXFPRegSet.cxx b/frysk-sys/lib/dwfl/jni/ElfPrXFPRegSet.cxx
index d4e06ef..e21a481 100644
--- a/frysk-sys/lib/dwfl/jni/ElfPrXFPRegSet.cxx
+++ b/frysk-sys/lib/dwfl/jni/ElfPrXFPRegSet.cxx
@@ -79,7 +79,6 @@ lib::dwfl::ElfPrXFPRegSet::fillMemRegion(jnixx::env env,
return length;
}
-extern ArrayList internalThreads;
jlong lib::dwfl::ElfPrXFPRegSet::getNoteData(jnixx::env env,
ElfData data) {
void *elf_data = ((Elf_Data*)data.getPointer(env))->d_buf;
@@ -115,7 +114,7 @@ jlong lib::dwfl::ElfPrXFPRegSet::getNoteData(jnixx::env env,
jbyteArrayElements buf = jbyteArrayElements(env, jbuf);
memcpy(buf.elements(),((unsigned char *)elf_data)+note_data_loc,
nhdr->n_descsz);
- internalThreads.add(env, jbuf);
+ GetInternalThreads(env).add(env, jbuf);
buf.release();
jbuf.DeleteLocalRef(env);
}
diff --git a/frysk-sys/lib/dwfl/jni/ElfPrstatus.cxx b/frysk-sys/lib/dwfl/jni/ElfPrstatus.cxx
index 93fabbf..704a230 100644
--- a/frysk-sys/lib/dwfl/jni/ElfPrstatus.cxx
+++ b/frysk-sys/lib/dwfl/jni/ElfPrstatus.cxx
@@ -264,7 +264,6 @@ lib::dwfl::ElfPrstatus::fillMemRegion(jnixx::env env,
}
-extern ArrayList internalThreads;
jlong
lib::dwfl::ElfPrstatus::getNoteData(jnixx::env env, ElfData data) {
void *elf_data = ((Elf_Data*)data.getPointer(env))->d_buf;
@@ -299,8 +298,7 @@ lib::dwfl::ElfPrstatus::getNoteData(jnixx::env env, ElfData data) {
memcpy(buf.elements(), ((unsigned char *)elf_data)+note_data_loc,
nhdr->n_descsz);
- fprintf(stderr, "acessing global internal threads\n");
- internalThreads.add(env, jbuf);
+ GetInternalThreads(env).add(env, jbuf);
// Move pointer along, now we have processed the first thread
note_loc += (sizeof (GElf_Nhdr) + ((nhdr->n_namesz + 0x03) & ~0x3)) + nhdr->n_descsz;
hooks/post-receive
--
frysk system monitor/debugger
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-26 19:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-26 19:22 [SCM] master: For JNI link in libelf and libdw cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).