Two patches are attached.
The change to trace.c modifies (lowers) the default verbosity of newlib
in debugging sessions.
The changes to malloc.c and glob.c change calls to printf into calls to
WCETRACE.

Objections to committing this ?

        Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
Index: trace.c
===================================================================
--- trace.c	(revision 858)
+++ trace.c	(working copy)
@@ -14,7 +14,7 @@
 
 static HANDLE __wcetracehnd = NULL;
 static int __wcetrace = 0;
-static int __wcetrace_debugger = WCE_IO | WCE_NETWORK;	/* Used to be WCE_ALL */
+static int __wcetrace_debugger = WCE_ALL;
 
 void
 WCETRACESET(int trace)
Index: malloc.c
===================================================================
--- malloc.c	(revision 858)
+++ malloc.c	(working copy)
@@ -5046,7 +5046,7 @@
     static region_list_entry *g_last;
     void *result = (void *) MORECORE_FAILURE;
 #ifdef TRACE
-    printf ("sbrk %d\n", size);
+    WCETRACE(WCE_MEM, "sbrk %d\n", size);
 #endif
 #if defined (USE_MALLOC_LOCK) && defined (NEEDED)
     /* Wait for spin lock */
@@ -5103,7 +5103,7 @@
                         /* Assert postconditions */
                         assert ((unsigned) base_committed % g_pagesize == 0);
 #ifdef TRACE
-                        printf ("Commit %p %d\n", base_committed, remaining_commit_size);
+                        WCETRACE(WCE_MEM, "Commit %p %d\n", base_committed, remaining_commit_size);
 #endif
                         /* Adjust the regions commit top */
                         g_last->top_committed = (char *) base_committed + remaining_commit_size;
@@ -5129,7 +5129,7 @@
                             /* Assert postconditions */
                             assert ((unsigned) memory_info.BaseAddress % g_pagesize == 0);
 #ifdef TRACE
-                            printf ("Query %p %d %s\n", memory_info.BaseAddress, memory_info.RegionSize, 
+                            WCETRACE(WCE_MEM, "Query %p %d %s\n", memory_info.BaseAddress, memory_info.RegionSize, 
                                     memory_info.State == MEM_FREE ? "FREE": 
                                     (memory_info.State == MEM_RESERVE ? "RESERVED":
                                      (memory_info.State == MEM_COMMIT ? "COMMITTED": "?")));
@@ -5173,7 +5173,7 @@
                     /* Assert postconditions */
                     assert ((unsigned) base_reserved % g_regionsize == 0);
 #ifdef TRACE
-                    printf ("Reserve %p %d\n", base_reserved, reserve_size);
+                    WCETRACE(WCE_MEM, "Reserve %p %d\n", base_reserved, reserve_size);
 #endif
                     /* Did we get contiguous memory? */
                     if (contiguous) {
@@ -5211,7 +5211,7 @@
                 /* Assert postconditions */
                 assert ((unsigned) base_committed % g_pagesize == 0);
 #ifdef TRACE
-                printf ("Commit %p %d\n", base_committed, commit_size);
+                WCETRACE(WCE_MEM, "Commit %p %d\n", base_committed, commit_size);
 #endif
                 /* Adjust the regions commit top */
                 g_last->top_committed = (char *) base_committed + commit_size;
@@ -5239,7 +5239,7 @@
                 if (! rc)
                     goto sbrk_exit;
 #ifdef TRACE
-                printf ("Release %p %d\n", base_reserved, release_size);
+                WCETRACE(WCE_MEM, "Release %p %d\n", base_reserved, release_size);
 #endif
             }
             /* Adjust deallocation size */
@@ -5265,7 +5265,7 @@
                     if (! rc)
                         goto sbrk_exit;
 #ifdef TRACE
-                    printf ("Decommit %p %d\n", base_committed, decommit_size);
+                    WCETRACE(WCE_MEM, "Decommit %p %d\n", base_committed, decommit_size);
 #endif
                 }
                 /* Adjust deallocation size and regions commit and allocate top */
@@ -5308,7 +5308,7 @@
     static long g_pagesize;
     static long g_regionsize;
 #ifdef TRACE
-    printf ("mmap %d\n", size);
+    WCETRACE(WCE_MEM, "mmap %d\n", size);
 #endif
 #if defined (USE_MALLOC_LOCK) && defined (NEEDED)
     /* Wait for spin lock */
@@ -5340,7 +5340,7 @@
     /* Assert postconditions */
     assert ((unsigned) ptr % g_regionsize == 0);
 #ifdef TRACE
-    printf ("Commit %p %d\n", ptr, size);
+    WCETRACE(WCE_MEM, "Commit %p %d\n", ptr, size);
 #endif
 mmap_exit:
 #if defined (USE_MALLOC_LOCK) && defined (NEEDED)
@@ -5356,7 +5356,7 @@
     static long g_regionsize;
     int rc = MUNMAP_FAILURE;
 #ifdef TRACE
-    printf ("munmap %p %d\n", ptr, size);
+    WCETRACE(WCE_MEM, "munmap %p %d\n", ptr, size);
 #endif
 #if defined (USE_MALLOC_LOCK) && defined (NEEDED)
     /* Wait for spin lock */
@@ -5376,7 +5376,7 @@
         goto munmap_exit;
     rc = 0;
 #ifdef TRACE
-    printf ("Release %p %d\n", ptr, size);
+    WCETRACE(WCE_MEM, "Release %p %d\n", ptr, size);
 #endif
 munmap_exit:
 #if defined (USE_MALLOC_LOCK) && defined (NEEDED)
Index: glob.c
===================================================================
--- glob.c	(revision 858)
+++ glob.c	(working copy)
@@ -904,15 +904,15 @@
 {
 	Char *p;
 
-	(void)printf("%s:\n", str);
+	WCETRACE(WCE_IO, "%s:\n", str);
 	for (p = s; *p; p++)
-		(void)printf("%c", CHAR(*p));
-	(void)printf("\n");
+		WCETRACE(WCE_IO, "%c", CHAR(*p));
+	WCETRACE(WCE_IO, "\n");
 	for (p = s; *p; p++)
-		(void)printf("%c", *p & M_PROTECT ? '"' : ' ');
-	(void)printf("\n");
+		WCETRACE(WCE_IO, "%c", *p & M_PROTECT ? '"' : ' ');
+	WCETRACE(WCE_IO, "\n");
 	for (p = s; *p; p++)
-		(void)printf("%c", ismeta(*p) ? '_' : ' ');
-	(void)printf("\n");
+		WCETRACE(WCE_IO, "%c", ismeta(*p) ? '_' : ' ');
+	WCETRACE(WCE_IO, "\n");
 }
 #endif

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to