[kaffe] CVS kaffe (doogie): When printing out the DIA_SourceFile record, if addr is null, hard-code 0

Kaffe CVS cvs-commits at kaffe.org
Wed Dec 8 21:28:06 PST 2004


PatchSet 5581 
Date: 2004/12/09 05:24:09
Author: doogie
Branch: HEAD
Tag: (none) 
Log:
When printing out the DIA_SourceFile record, if addr is null, hard-code 0
as the value; otherwise, fprintf prints '(nil)', and ld complains when
linking.

Members: 
	ChangeLog:1.3127->1.3128 
	kaffe/xprof/debugFile.c:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3127 kaffe/ChangeLog:1.3128
--- kaffe/ChangeLog:1.3127	Thu Dec  9 05:21:36 2004
+++ kaffe/ChangeLog	Thu Dec  9 05:24:09 2004
@@ -1,5 +1,11 @@
 2004-12-08  Adam Heath  <doogie at brainfood.com>
 
+	* kaffe/xprof/debugFile.c: When printing out the DIA_SourceFile
+	  record, if addr is null, hard-code 0 as the value; otherwise,
+	  fprintf prints '(nil)', and ld complains when linking.
+
+2004-12-08  Adam Heath  <doogie at brainfood.com>
+
 	* kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:
 	  Call unprotectThreadList *before* calling pthread_exit.  This
 	  prevents deadlocks during shutdown(discovered while getting xprof
Index: kaffe/kaffe/xprof/debugFile.c
diff -u kaffe/kaffe/xprof/debugFile.c:1.4 kaffe/kaffe/xprof/debugFile.c:1.5
--- kaffe/kaffe/xprof/debugFile.c:1.4	Sat Sep 18 20:48:16 2004
+++ kaffe/kaffe/xprof/debugFile.c	Thu Dec  9 05:24:08 2004
@@ -545,11 +545,17 @@
 			case DIA_SourceFile:
 				name = va_arg(args, char *);
 				addr = va_arg(args, char *);
-				fprintf(df->df_file,
-					"\n\n.stabs \"%s\",%d,0,0,%p\n",
-					name,
-					N_SO,
-					addr);
+				if (addr != null)
+					fprintf(df->df_file,
+						"\n\n.stabs \"%s\",%d,0,0,%p\n",
+						name,
+						N_SO,
+						addr);
+				else
+					fprintf(df->df_file,
+						"\n\n.stabs \"%s\",%d,0,0,0\n",
+						name,
+						N_SO);
 				break;
 			case DIA_IncludeFile:
 				path = va_arg(args, char *);



More information about the kaffe mailing list