简而言之,我正在使用Eclipse插件作为gdb的前端,并试图找出gdb崩溃的原因。完整的gdb日志很长,但其中的相关部分如下:
(gdb)
915 whatis this
&"whatis this\n"
~"type = Director * const\n"
915^done,time={wallclock="0.01200",user="0.01200",system="0.00000"}
(gdb)
916 ptype Director * const
&"ptype Director * const\n"
&"A syntax error in expression, near `const'.\n"
916^error,msg="A syntax error in expression, near `const'."
(gdb)
917 ptype this
&"ptype this\n"
~"type = struct Director : public Ref {\n"
~" public:\n"
~" static const char *EVENT_PROJECTION_CHANGED;\n"
~" static const char *EVENT_AFTER_UPDATE;\n"
~" static const char *EVENT_AFTER_VISIT;\n"
~" static const char *EVENT_AFTER_DRAW;\n"
~" protected:\n"
~" bool _purgeDirectorInNextLoop;\n"
~" struct Scheduler *_scheduler;\n"
~" struct ActionManager *_actionManager;\n"
918 whatis prevCalls
919 whatis prevVerts
920-var-create - * this
921-var-create - * prevCalls
922-var-create - * prevVerts
923-gdb-exit每次我在这个特定的断点上停下来打开变量视图(只要我没有查看变量,它就不会崩溃),就会发生崩溃。
Problem signature:
Problem Event Name: APPCRASH
Application Name: arm-eabi-gdb.exe
Application Version: 0.0.0.0
Application Timestamp: 50ee5128
Fault Module Name: arm-eabi-gdb.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 50ee5128
Exception Code: c0000005
Exception Offset: 000dacc4
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789gdb可执行文件是插件(eclipse/plugins/com.nvidia.ndklaunch_21.0.0.201307250029/gdb/windows/arm-eabi-gdb.exe).附带的文件。我还尝试了来自NDK工具链的两个gdb版本(4.6和4.8),结果相同。
Windows获取的android-ndk-r9d\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin\arm-linux-androideabi-gdb-orig.exe转储文件:peTNIMDVpN0QtTjA/
正在调试的源文件:https://github.com/cocos2d/cocos2d-x/blob/v3/cocos/base/CCDirector.cpp
如果需要更多的上下文,下面是完整的故事。我正试图在Windows中设置一个新的NDK项目。到目前为止,我已经能够使用NVidia调试管理器插件来完成调试器的工作。然而,几乎在我开始工作之后,我就遇到了这个问题,变量视图导致gdb崩溃。我对gdb命令行没有任何经验,插件也不允许我输入我自己的命令。我不能绕过插件直接使用调试器,因为插件处理连接到设备上的gdbserver和解析调试符号的复杂部分(我已经能够在没有插件的情况下连接到gdbserver,但我无法使调试符号为我的代码使用的静态库工作)。
发布于 2014-05-19 04:57:25
以下是我学到的:
https://stackoverflow.com/questions/23717079
复制相似问题