[kaffe] CVS kaffe (dalibor): Added debug output to library function lookup

Kaffe CVS cvs-commits at kaffe.org
Tue Feb 3 09:39:01 PST 2004


PatchSet 4393 
Date: 2004/02/03 17:32:42
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Added debug output to library function lookup

2004-02-03  Dalibor Topic <robilad at kaffe.org>

        * kaffe/kaffevm/external.c
        (findLibraryFunction): Added debug output.

Members: 
	ChangeLog:1.1977->1.1978 
	kaffe/kaffevm/external.c:1.51->1.52 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1977 kaffe/ChangeLog:1.1978
--- kaffe/ChangeLog:1.1977	Mon Feb  2 18:25:35 2004
+++ kaffe/ChangeLog	Tue Feb  3 17:32:42 2004
@@ -1,3 +1,8 @@
+2004-02-03  Dalibor Topic <robilad at kaffe.org>
+
+	* kaffe/kaffevm/external.c
+	(findLibraryFunction): Added debug output.
+
 2004-02-02  Dalibor Topic <robilad at kaffe.org>
 
         Resynced with GNU Classpath.
Index: kaffe/kaffe/kaffevm/external.c
diff -u kaffe/kaffe/kaffevm/external.c:1.51 kaffe/kaffe/kaffevm/external.c:1.52
--- kaffe/kaffe/kaffevm/external.c:1.51	Sun Jan 25 19:57:26 2004
+++ kaffe/kaffe/kaffevm/external.c	Tue Feb  3 17:32:43 2004
@@ -111,6 +111,23 @@
 
   while (!ptr && libHandle[i].ref && i < MAXLIBS) {
     ptr = lt_dlsym(libHandle[i].desc, name);
+
+DBG(NATIVELIB,
+    if (ptr == NULL) {
+	dprintf("Couldn't find %s in library handle %d == %s.\nError message is %s.\n",
+		name,
+		i,
+		lt_dlgetinfo(libHandle[i].desc) == NULL ? "unknown" : lt_dlgetinfo(libHandle[i].desc)->name,
+		lt_dlerror());
+    }
+    else {
+	dprintf("Found %s in library handle %d == %s.\n",
+		name,
+        	i,
+        	lt_dlgetinfo(libHandle[i].desc) == NULL ? "unknown" : lt_dlgetinfo(libHandle[i].desc)->name);
+    }
+)
+
     ++i;
   }
 




More information about the kaffe mailing list