摘录


Chapter 4 - Debugging Techniques

kernel code debugging can be tricky

consider: how do we debug top-half code from a user process? mode switch ... gets in the way. interrupt-side is an even worse question: plus it's async. top-half vs bottom-half interactions events/races races from interrupts/SMP (> 1 cpu)

how exactly do you think one user process can
    debug another user process anyway?
    (man ptrace).

approaches then are: 1. debugging by printing 2. debugging by querying (ask the kernel for info) 3. debugging by watching (e.g., watch behavior of user process 4. debugging by READING THE ERROR MESSAGES (by paying attention) oops - null pointer reference 5. kernel debuggers and other tools

Various kernel config options exist that may be of help.

点评

kdump是利器

原文

点击这里查看原文

其它

本帖内容由21QA云收藏工具自动生成,欢迎使用。

系统消息 若觉得内容不错,请点击左上角的"赞"图标,以优化网站的内容呈现。 另外,请及时验证注册邮箱,否则收不到21QA发出的红包。 官方Q群:250203055

asked 31 Mar '15, 21:13

%E8%B7%AF%E4%BA%BA%E7%94%B2's gravatar image

路人甲
131598710886

Be the first one to answer this question!
toggle preview

powered by O*S*Q*A

粤ICP备14040061号-1