问题描述
我一直在尝试获得的kgdb
工作了Nexus One。
I have been experimenting with getting kgdb
to work the Nexus One.
我已经退出从android.git.kernel.org内核并启用一切与的kgdb
包括 kgdbts
使用测试 menuconfig的
。成功构建内核并亮出它的设备(这是植根于解锁运行的CyanogenMod 7)
I have pulled the kernel from android.git.kernel.org and enabled everything to do with kgdb
including kgdbts
testing using menuconfig
. Successfully built the kernel and flashed it to the device (which is unlocked rooted and running CyanogenMod 7)
我也跟着在 http://bootloader.wikidot.com/android:kgdb 启用USB连接所要求的的kgdb
(从 ttyACM0
以 ttyGS0
成功)。
I have also followed the instructions found on http://bootloader.wikidot.com/android:kgdb to enable the usb connection to act as a serial connection as required by kgdb
(and tested communications from ttyACM0
to ttyGS0
successfully).
下面的文件夹存在,表明 kgdboc
和 kgdbts
已被编译进内核:
The following folders exist indicating that kgdboc
and kgdbts
have been built into the kernel:
/sys/modules/kgdboc/parameters
/sys/modules/kgdbts/parameters
以下是dmesg的显示了 kgdbts
测试输出正在做节目什么(我认为)是一个成功的完成了测试:
The following is the output from dmesg showing the kgdbts
testing being done show what (I think) is a successful completion of the tests:
# dmesg | grep kgdb
<6>[ 12.974060] kgdb: Registered I/O driver kgdbts.
<6>[ 12.981781] kgdbts:RUN plant and detach test
<6>[ 12.995178] kgdbts:RUN sw breakpoint test
<6>[ 13.002441] kgdbts:RUN bad memory access test
<6>[ 13.010864] kgdbts:RUN singlestep test 1000 iterations
<6>[ 13.019042] kgdbts:RUN singlestep [0/1000]
<6>[ 13.077850] kgdbts:RUN singlestep [100/1000]
<6>[ 13.132720] kgdbts:RUN singlestep [200/1000]
<6>[ 13.187500] kgdbts:RUN singlestep [300/1000]
<6>[ 13.242370] kgdbts:RUN singlestep [400/1000]
<6>[ 13.297149] kgdbts:RUN singlestep [500/1000]
<6>[ 13.351928] kgdbts:RUN singlestep [600/1000]
<6>[ 13.406829] kgdbts:RUN singlestep [700/1000]
<6>[ 13.461578] kgdbts:RUN singlestep [800/1000]
<6>[ 13.516540] kgdbts:RUN singlestep [900/1000]
<6>[ 13.570922] kgdbts:RUN do_fork for 100 breakpoints
<6>[ 21.117645] kgdb: Unregistered I/O driver kgdbts, debugger disabled.
我相信,我遇到的问题越来越内核触发的kgdb
。
# echo -n g > /proc/sysrq-trigger
只是导致把我丢回到命令提示符,(我认为)这是假设,冻结一切,发送提示通过USB它被用作一个伪串行端口,因为手机没有一个真实的。
Just results in dropping me back to the command prompt and (I think) it is suppose to freeze everything and send a prompt over usb which is being used as a psuedo serial port since the phone doesn't have a real one.
这是我从我的研究收集的提示应该是触发,让我发出
From what I gather from my research that prompt is supposed to be the trigger that will allow me to issue
(gdb) target remote /dev/ttyACM0
和连接到调试会话的内核。
And connect to a debugging session with the kernel.
我还测试的/ proc / SysRq组合触发
与 B
和 C
刚刚确认,我可以通过一些命令 SysRq的
。
I have also tested /proc/sysrq-trigger
with b
and c
just confirm that I am able to pass some commands to sysrq
.
所以我的问题下面我长篇大论试图提供尽可能多的信息可能就是为什么先按g
不触发调试器?
So my question following my long winded attempt to provide as much information as possible is why is g
not triggering the debugger?
这是我在任何系统上的内核调试的第一次尝试,我用尽了方法,我的词语在谷歌的搜索,所以我转交给你。谢谢!
This is my first attempt at kernel debugging on any system and I have run out of ways to phrase my search on google so I turn to you. Thanks!
(我也曾试图把kdgbwait在内核命令行没有成功,因为我相信这还不支持Android的内核)
(I have also tried putting kdgbwait in the kernel command line without success as I believe this is not yet supported by the android kernel)
推荐答案
Android的核心问题是罕见的[SO],ASA别人没回答我提供我发现这个问题。不幸的是我没有的Nexus One就这样这个答案是不打算作为一个一步,你的问题步进分辨率测试,但应该指向你在哪里寻找正确的方向。
Android Kernel questions are rare on [SO], asa nobody else has answered I have provided my findings on this issue. Unfortunately I don't have a nexus one to test this on so this answer is not intended as a step by step resolution of you problem, but should point you in the right direction of where to look.
我发现这个问题的唯一有用的资源是一个 LKML修补程序通过东东邓的,所以这是不可能的配置问题,因为这些通常是丰富,广为宣传。
The only useful resource I have found on this problem is in a LKML patch by Dongdong Deng, so it is unlikely a configuration issue as these are usually abundant and well-publicized.
这表明,有一个与你的内核构建的一个问题。我会被诱惑与CM的最新版本,重新启动,看看问题是否只是消失。
This indicates that there is a problem with your kernel build. I would be tempted to start again with the latest versions of CM and see if the problem just goes away.
如果做不到这一点,试试这个报告对氰球队,看看这是一个已知的问题,或有一个简单的解决方法。
Failing that, try reporting this to the cyanogen team and see if this is a known issue or has a simple workaround.
作为最后的手段,你可以尝试补丁的版本是否兼容。唯一的选择是卷起你的袖子,开始盗号CM内核合并补丁。
As a last resort you could try the patch if the versions are compatible. The only alternative is to roll up your sleeves and start hacking the CM kernel to incorporate the patch.
祝你好运。
这篇关于Android的内核调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!