Source-Changes-HG archive

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

[src/trunk]: src/bin/sh NFC: DEBUG mode only change - add a little more tracing.



details:   https://anonhg.NetBSD.org/src/rev/530550893089
branches:  trunk
changeset: 825600:530550893089
user:      kre <kre%NetBSD.org@localhost>
date:      Mon Jul 24 13:36:15 2017 +0000

description:
NFC: DEBUG mode only change - add a little more tracing.

diffstat:

 bin/sh/var.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r 035f6fb6d658 -r 530550893089 bin/sh/var.c
--- a/bin/sh/var.c      Mon Jul 24 13:21:14 2017 +0000
+++ b/bin/sh/var.c      Mon Jul 24 13:36:15 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.65 2017/07/12 19:06:16 kre Exp $     */
+/*     $NetBSD: var.c,v 1.66 2017/07/24 13:36:15 kre Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)var.c      8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: var.c,v 1.65 2017/07/12 19:06:16 kre Exp $");
+__RCSID("$NetBSD: var.c,v 1.66 2017/07/24 13:36:15 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -422,10 +422,13 @@
        struct var *vp, **vpp;
        int nlen;
 
+       VTRACE(DBG_VARS, ("setvareq([%s],%#x) aflag=%d ", s, flags, aflag));
        if (aflag && !(flags & VNOEXPORT))
                flags |= VEXPORT;
        vp = find_var(s, &vpp, &nlen);
        if (vp != NULL) {
+               VTRACE(DBG_VARS, ("was [%s] fl:%#x\n", vp->text,
+                   vp->flags));
                if (vp->flags & VREADONLY) {
                        if ((flags & (VTEXTFIXED|VSTACK)) == 0)
                                ckfree(s);
@@ -465,6 +468,7 @@
                INTON;
                return;
        }
+       VTRACE(DBG_VARS, ("new\n"));
        /* not found */
        if (flags & VNOSET) {
                if ((flags & (VTEXTFIXED|VSTACK)) == 0)



Home | Main Index | Thread Index | Old Index