-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: 不能调试其它进程么? #3
Comments
可以。 说出具体问题 |
赞! 我还是用博主的那个Debug工程,然后 1. 设置了两个断点
2. 加入 libinputflinger.so 并且源码映射, 这些应该都没有问题3. 查看下断点
这些也没什么问题。 4. resume program(F8)这时也没什么问题。。 接着我触摸屏幕想触发断点,点击里面的DEBUG button, 但是程序没有停下下, 更别说看到inputflinger的源码了。 |
你调试的哪个进程? |
直接在Android Studio上调试的,App进程, |
所以这里应该选择 system_process进程? 但是这个怎么选呢?这是个问题! |
那就对了,你明知道inputsurfaceflinger是运行在system_process进程的,却在app进程下断点,咋可能断呢? 仔细看看这篇文章 如何调适Android Framework ,文章重点强调这个了已经。 |
恩, 用 Android Studio 调试 Android java framework是可以的,但是这个貌似不能调试 native的代码吧,比如 inputflinger. 我现在是想调试 native的 framework,比如 inputflinger. 现在我不通过 android studio,直接在通过 "无源码调试" 是可以调试 system_server的. |
可以,选进程的时候选native。 |
补充: lldb可以调试system_server native code,如libinputflinger.so了,也能正确显示源码了,非常棒,要是 android studio 也能调试 system_server native code就完美了。 |
Android Studio目前有bug:https://issuetracker.google.com/issues/37124749 |
您好,非常感谢!我已经可以调试java层源码了,但是在尝试调试native层时出现错误:RuntimeException: Cannot find module by package name。看您的回复说这是个bug,那请问有什么别的办法可以调试吗?比如我想调试dalivk部分的源码。谢谢! |
@Youlor 看文章和楼上的回复。IDE的bug仅限于你在本App需要调试别的进程的代码,如果是dalvik那么就是运行在你自己进程的,这个是没问题的。调试别的进程,可以直接用LLDB,文中也已经说明了。 |
今晚上试着调试下inputsurfaceflinger
但是怎么都不成功!
猜想: inputsurfaceflinger 运行在system_process, 而博文的是调试一个app进程的 ,垃圾回收机制运行于JVM中,所以能调试??
而如果想调试一些其它的比较 Media/SurfaceFlinger这些module 貌似不行了??
The text was updated successfully, but these errors were encountered: