--- - branch: MAIN date: Sat May 13 03:26:03 UTC 2017 files: - new: '1.140' old: '1.139' path: src/bin/sh/eval.c pathrev: src/bin/sh/eval.c@1.140 type: modified - new: '1.21' old: '1.20' path: src/bin/sh/shell.h pathrev: src/bin/sh/shell.h@1.21 type: modified - new: '1.39' old: '1.38' path: src/bin/sh/show.c pathrev: src/bin/sh/show.c@1.39 type: modified - new: '1.10' old: '1.9' path: src/bin/sh/show.h pathrev: src/bin/sh/show.h@1.10 type: modified id: 20170513T032603Z.180f8031e5048f15411584c069f788afabe49a58 log: "The beginnings of the great shell DEBUG (tracing) upgrade of 2017...\n\nFirst, be aware that the DEBUG spoken of here has nothing whatever to\ndo with MKDEBUG=true type builds of NetBSD. The only way to get a\nDEBUG shell is to build it yourself manually.\n\nThat said, for non-DEBUG shells, this change makes only one slight\n(trivial really) difference, which should affect nothing.\n\nPreviously some code was defined like ...\n\nfunction(args)\n{\n#ifdef DEBUG\n\t/* function code goes here */\n#endif\n}\n\nand called like ...\n\n#ifdef DEBUG\n\tfunction(params);\n#endif\n\nresulting in several empty functions that are never called being\ndefined in non-DEBUG shells. Those are now gone. If you can detect\nthe difference any way other than using \"nm\" or similar, I'd be very\nsurprised...\n\nFor DEBUG shells, this introduces a whole new TRACE() setup to use\nto assist in debugging the shell.\n\nI have had this locally (uncommitted) for over a year... it helps.\n\nBy itself this change is almost useless, nothing really changes, but\nit provides the framework to allow other TRACE() calls to be updated\nover time. This is why I had not committed this earlier, my previous\nversion required a flag day, with all the shell's internal tracing\nbeing updated a once - which I had done, but that shell version has\nbit-rotted so badly now it is almost useless...\n\nFuture updates will add the mechanism to allow the new stuff to actually\nbe used in a productive way, and following that, over time, gradual\nconversion of all the shell tracing to the updated form (as required,\nor when I am bored...)\n\nThe one useful change that we do get now is that the fd that the shell\nuses for tracing (which was usually 3, but not any more) is now protected\nfrom user/script interference, like all the other shell inernal fds.\n\nThere is no doc (nor will there be) on any of this, if you are not reading\nthe source code it is useless to you, if you are, you know how it works.\n" module: src subject: 'CVS commit: src/bin/sh' unixtime: '1494645963' user: kre