Kaynağa Gözat

debug信息会输出行号和文件名

fslongjin 3 yıl önce
ebeveyn
işleme
24b351c9ec
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      kernel/common/kprint.h

+ 1 - 1
kernel/common/kprint.h

@@ -32,7 +32,7 @@
 #define kdebug(...)           \
     do                        \
     {                         \
-        printk("[ DEBUG ] "); \
+        printk("[ DEBUG ] (%s:%d)\t", __FILE__, __LINE__); \
         printk(__VA_ARGS__);  \
         printk("\n");         \
     } while (0);