歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> Linux Debug Filesystem的使用

Linux Debug Filesystem的使用

日期:2017/3/1 10:25:41   编辑:Linux編程

[Test Kernel: Linux-2.6.39]

在進行系統調試的時候,有可能會使用到debug file system。

下面講解如何具體使用debug file system

1. 在kernel中使用debug file system

make menuconfig --> Kernel hacking --> 選中Debug Filesystem (CONFIG_DEBUG_FS)選項。

make menuconfig --> kernel hacking --> 選中Kernel debugging (CONFIG_DEBUG_KERNEL)選 項。

注:"kernel debugging"選項必須使能,否則在進行第三步的時候,會報“mount: unknown filesystem type 'debugfs'”

2. 編譯kernel,下載並且運行之。

3. 掛載debug file system

# mount -t debugfs none /sys/kernel/debug

或者

# mkdir /debug

# mount -t debugfs none /debug

進入/debug文件夾及其子文件夾獲得想要的信息。

Copyright © Linux教程網 All Rights Reserved