我正在尝试调试Android中的原生cpp
文件,并按照此link中的讨论进行操作。我想我会完成所有步骤并进行本机代码调试。首先调试Android
应用程序。然后启动ndk-gdb-py
。当我启动C ++本机调试时,我收到错误
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Don't know how to run. Try "help target".
Don't know how to run. Try "help target".
在Eclipse控制台中,我找到了
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
Function "Java_com_MainActivity_StartCamera" not defined.
此错误可能有什么问题? EDIT1: 我可以通过保持清除错误 目标远程:gdb2.setup文件中的5039。 因为我的日食JUNO没有连接标签。
然后,当我再次进行调试时,在控制台中,进度状态为unable to attach to target VM
且无法AssignProcesstoObject
。请在控制台中查看状态报告。我不确定我的问题是否常见,因为我还没有讨论。
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
warning: Breakpoint address adjusted from 0xb00055e1 to 0xb00055e0.
0xafd0c738 in __futex_syscall3 () from C:/libc.so
(gdb) JDB :: java.io.IOException: handshake failed - connection prematurally clo
sed
JDB :: at com.sun.tools.jdi.SocketTransportService.handshake(SocketTransportSer
vice.java:136)
JDB :: at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportServic
e.java:232)
JDB :: at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingCo
nnector.java:116)
JDB :: at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConn
ector.java:90)
JDB :: at com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnectio
n.java:519)
JDB :: at com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:3
28)
JDB :: at com.sun.tools.example.debug.tty.Env.init(Env.java:63)
JDB :: at com.sun.tools.example.debug.tty.TTY.main(TTY.java:1066)
JDB ::
JDB :: Fatal error:
JDB :: Unable to attach to target VM.
答案 0 :(得分:0)
最后,我可以使用gdb进行调试。我犯的错误是我在调试中使用命令窗口。然后我换到cygwin并安装cygwin的gcc,然后一切正常。感谢