⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debug.cc

📁 美国加州大学操作系统课程实验平台Nachos
💻 CC
字号:
// debug.cc //	Debugging routines.  Allows users to control whether to //	print DEBUG statements, based on a command line argument.//// Copyright (c) 1992-1996 The Regents of the University of California.// All rights reserved.  See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions.#include "copyright.h"#include "utility.h"#include "debug.h" #include "string.h"//----------------------------------------------------------------------// Debug::Debug//      Initialize so that only DEBUG messages with a flag in flagList //	will be printed.////	If the flag is "+", we enable all DEBUG messages.//// 	"flagList" is a string of characters for whose DEBUG messages are //		to be enabled.//----------------------------------------------------------------------Debug::Debug(char *flagList){    enableFlags = flagList;}//----------------------------------------------------------------------// Debug::IsEnabled//      Return TRUE if DEBUG messages with "flag" are to be printed.//----------------------------------------------------------------------boolDebug::IsEnabled(char flag){    if (enableFlags != NULL) {	return ((strchr(enableFlags, flag) != 0) 		|| (strchr(enableFlags, '+') != 0));    } else {    	return FALSE;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -