作者gigigigi (gigigigi)
看板LinuxDev
标题[问题] kgdb p current->comm
时间Sat Oct 3 15:57:36 2015
我查资料看到说 current 是一个 marco
网路上有提到gdb 对 marco 展开可以加上 ggdb3
ifdef CONFIG_DEBUG_INFO
KBUILD_CFLAGS += -ggdb3
KBUILD_AFLAGS += -gdwarf-2
endif
可以一样错误讯息
(gdb) p current->comm
No symbol "get_current" in current context.
http://bbs.chinaunix.net/thread-1945967-1-1.html
还有找到一篇可是看不懂要怎麽知道 stack 起始位址 ,
current 是在 stack 最底,,, 不懂这些位址怎麽得到算是计算出来?
或是有更简单方式可以直接印出 current->comm
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 112.104.89.247
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/LinuxDev/M.1443859059.A.38D.html