]> granicus.if.org Git - yasm/commitdiff
Don't print out *all* bytecodes in the label's section for every label!
authorPeter Johnson <peter@tortall.net>
Mon, 19 Nov 2001 05:48:54 +0000 (05:48 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 19 Nov 2001 05:48:54 +0000 (05:48 -0000)
svn path=/trunk/yasm/; revision=349

libyasm/section.c
libyasm/section.h
libyasm/symrec.c
src/section.c
src/section.h
src/symrec.c

index 1e9f51eb5c372c7c0d577f0ad86046f253cf5b39..df38d1dd40506b1287d755ce65745acec5d55c7e 100644 (file)
@@ -170,7 +170,7 @@ sections_print(const sectionhead *headp)
     
     STAILQ_FOREACH(cur, headp, link) {
        printf("***SECTION***\n");
-       section_print(cur);
+       section_print(cur, 1);
     }
 }
 
@@ -227,7 +227,7 @@ section_delete(section *sect)
 }
 
 void
-section_print(const section *sect)
+section_print(const section *sect, int print_bcs)
 {
     printf(" type=");
     switch (sect->type) {
@@ -247,6 +247,8 @@ section_print(const section *sect)
            break;
     }
 
-    printf(" Bytecodes:\n");
-    bcs_print(&sect->bc);
+    if (print_bcs) {
+       printf(" Bytecodes:\n");
+       bcs_print(&sect->bc);
+    }
 }
index a2ebcae618e176ca73a36fe5a47ca2036effa9c6..ddfaaddd5fe8772d2c21a8d9c9ce9cadf677565f 100644 (file)
@@ -50,5 +50,5 @@ void sections_parser_finalize(sectionhead *headp);
 
 void section_delete(/*@only@*/ section *sect);
 
-void section_print(const section *sect);
+void section_print(const section *sect, int print_bcs);
 #endif
index 041d28fe92cec9ba4b79f62f40fbcc4516296c95..f2cc8c4c445003f368e3edb1bf05414f1ada22d1 100644 (file)
@@ -297,7 +297,7 @@ symrec_print(const symrec *sym)
        case SYM_LABEL:
            printf("_Label_\nSection:");
            if (sym->value.label.sect)
-               section_print(sym->value.label.sect);
+               section_print(sym->value.label.sect, 0);
            else
                printf(" (none)\n");
            if (!sym->value.label.bc)
index 1e9f51eb5c372c7c0d577f0ad86046f253cf5b39..df38d1dd40506b1287d755ce65745acec5d55c7e 100644 (file)
@@ -170,7 +170,7 @@ sections_print(const sectionhead *headp)
     
     STAILQ_FOREACH(cur, headp, link) {
        printf("***SECTION***\n");
-       section_print(cur);
+       section_print(cur, 1);
     }
 }
 
@@ -227,7 +227,7 @@ section_delete(section *sect)
 }
 
 void
-section_print(const section *sect)
+section_print(const section *sect, int print_bcs)
 {
     printf(" type=");
     switch (sect->type) {
@@ -247,6 +247,8 @@ section_print(const section *sect)
            break;
     }
 
-    printf(" Bytecodes:\n");
-    bcs_print(&sect->bc);
+    if (print_bcs) {
+       printf(" Bytecodes:\n");
+       bcs_print(&sect->bc);
+    }
 }
index a2ebcae618e176ca73a36fe5a47ca2036effa9c6..ddfaaddd5fe8772d2c21a8d9c9ce9cadf677565f 100644 (file)
@@ -50,5 +50,5 @@ void sections_parser_finalize(sectionhead *headp);
 
 void section_delete(/*@only@*/ section *sect);
 
-void section_print(const section *sect);
+void section_print(const section *sect, int print_bcs);
 #endif
index 041d28fe92cec9ba4b79f62f40fbcc4516296c95..f2cc8c4c445003f368e3edb1bf05414f1ada22d1 100644 (file)
@@ -297,7 +297,7 @@ symrec_print(const symrec *sym)
        case SYM_LABEL:
            printf("_Label_\nSection:");
            if (sym->value.label.sect)
-               section_print(sym->value.label.sect);
+               section_print(sym->value.label.sect, 0);
            else
                printf(" (none)\n");
            if (!sym->value.label.bc)