Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: improve debug loggin for initializ...



details:   https://anonhg.NetBSD.org/src/rev/aa718e9eca39
branches:  trunk
changeset: 953752:aa718e9eca39
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Mar 19 18:17:46 2021 +0000

description:
lint: improve debug loggin for initialization

diffstat:

 usr.bin/xlint/lint1/init.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (65 lines):

diff -r c9b4485eb374 -r aa718e9eca39 usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Fri Mar 19 17:40:37 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c        Fri Mar 19 18:17:46 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.105 2021/03/19 17:37:57 rillig Exp $        */
+/*     $NetBSD: init.c,v 1.106 2021/03/19 18:17:46 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.105 2021/03/19 17:37:57 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.106 2021/03/19 18:17:46 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -283,9 +283,9 @@
                return;
        name = namedmem;
        debug_indent();
-       debug_printf("named member:");
+       debug_printf("named member: ");
        do {
-               debug_printf(" %s", name->n_name);
+               debug_printf(".%s", name->n_name);
                name = name->n_next;
        } while (name != namedmem);
        debug_printf("\n");
@@ -343,8 +343,6 @@
        namlist_t *nam = xcalloc(1, sizeof (namlist_t));
        nam->n_name = sb->sb_name;
 
-       debug_step("%s: '%s' %p", __func__, nam->n_name, nam);
-
        if (namedmem == NULL) {
                /*
                 * XXX: Why is this a circular list?
@@ -359,6 +357,8 @@
                nam->n_next = namedmem;
                namedmem->n_prev = nam;
        }
+
+       debug_named_member();
 }
 
 /*
@@ -380,7 +380,6 @@
 static void
 designator_shift_name(void)
 {
-       debug_step("%s: %s %p", __func__, namedmem->n_name, namedmem);
        if (namedmem->n_next == namedmem) {
                free(namedmem);
                namedmem = NULL;
@@ -391,6 +390,8 @@
                nam->n_next->n_prev = nam->n_prev;
                free(nam);
        }
+
+       debug_named_member();
 }
 
 /*



Home | Main Index | Thread Index | Old Index