TI中文支持网
TI专业的中文技术问题搜集分享网站

SDK下QtCreator远程调试

我用官方提供的Matrix和http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Hands_on_with_QT?keyMatch=qt&tisearch=Search-EN提供的方式开发QT程序,但是远端想要进入Debug,在PC上调试会显示gdb启动失败,有没有解决办法?

Shine:

请问用的是哪款器件?有具体的报错信息么?

user4926528:

回复 Shine:

我用的AM335x-EVM评估板
debug信息:
dEXAMINING /home/guyan/QtProjects/Gomoku/build-Gomoku-TI-Debug/Gomoku
dELF SECTIONS:.interp .note.ABI-tag .note.gnu.build-id .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.extab .ARM.exidx .eh_frame .init_array .fini_array .data.rel.ro .dynamic .got .data .bss .comment .ARM.attributes .debug_aranges .debug_info .debug_abbrev .debug_line .debug_frame .debug_str .debug_loc .debug_ranges .symtab .strtab .shstrtab
s为 ABI 'arm-linux-generic-elf-32bit'启动调试器'GdbEngine'…
dStart parameters: 'Gomoku (在远端设备上)' mode: 6
dABI: arm-linux-generic-elf-32bit
dLanguages: c++
dExecutable: /home/root/Gomoku
dDebugger: /home/guyan/ti-processor-sdk-linux-am335x-evm-05.01.00.11/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gdb
dProject: /home/guyan/QtProjects/Gomoku/Gomoku
dAdditional Search Directories:
dRemote: 115.156.217.108:10000
dQML server: 115.156.217.108:65535
dSysroot:
dDebug Source Location:
dDebugger settings:
dAdditionalArguments:(default: )
dAdjustBreakpointLocations: true(default: true)
dAllPluginBreakpoints: true(default: true)
dAlwaysAdjustColumnWidths: true(default: true)
dAutoDerefPointers: true(default: true)
dAutoEnrichParameters: true(default: true)
dAutoQuit: false(default: false)
dBreakEvent:(default: )
dBreakOnAbort: false(default: false)
dBreakOnCatch: false(default: false)
dBreakOnCrtDbgReport: false(default: false)
dBreakOnFatal: false(default: false)
dBreakOnThrow: false(default: false)
dBreakOnWarning: false(default: false)
dBreakpointCorrection: true(default: true)
dBreakpointsFullPath: false(default: false)
dCDB_Console: false(default: false)
dCloseBuffersOnExit: false(default: false)
dCloseMemoryBuffersOnExit: true(default: true)
dDisplayStringLimit: 100(default: 100)
dEnableReverseDebugging: false(default: false)
dExtraDumperFile:(default: )
dFontSizeFollowsEditor: false(default: false)
dGdbCustomDumperCommands:(default: )
dGdbPostAttachCommands:(default: )
dGdbStartupCommands:(default: )
dIdentifyDebugInfoPackages: false(default: false)
dIgnoreFirstChanceAccessViolation: false(default: false)
dIntelFlavor: false(default: false)
dLoadGdbDumpers2: false(default: false)
dLoadGdbInit: true(default: true)
dLogTimeStamps: false(default: false)
dMaximalStackDepth: 20(default: 20)
dMaximalStringLength: 10000(default: 10000)
dMultiInferior: false(default: false)
dNoPluginBreakpoints: false(default: false)
dQmlInspector.ShowAppOnTop: false(default: false)
dRaiseOnInterrupt: true(default: true)
dSelectedPluginBreakpoints: false(default: false)
dSelectedPluginBreakpointsPattern: .*(default: .*)
dShowQObjectNames2: true(default: true)
dShowQmlObjectTree: true(default: true)
dShowQtNamespace: true(default: true)
dShowStandardNamespace: true(default: true)
dShowThreadNames: false(default: false)
dSkipKnownFrames: false(default: false)
dSortStructMembers: true(default: true)
dSourcePaths:(default: )
dStationaryEditorWhileStepping: false(default: false)
dSwitchModeOnExit: false(default: false)
dSymbolPaths:(default: )
dTargetAsync: false(default: false)
dUseAddressInBreakpointsView: false(default: false)
dUseAddressInStackView: false(default: false)
dUseAlternatingRowColours: false(default: false)
dUseCodeModel: true(default: true)
dUseDebuggingHelper: true(default: true)
dUseDynamicType: true(default: true)
dUseMessageBoxForSignals: true(default: true)
dUsePythonDumper: true(default: true)
dUseToolTips: true(default: true)
dUseToolTipsInBreakpointsView: false(default: false)
dUseToolTipsInBreakpointsView: false(default: true)***
dUseToolTipsInLocalsView: false(default: false)
dWarnOnReleaseBuilds: true(default: true)
dWatchdogTimeout: 20(default: 20)
dState changed from DebuggerNotReady(0) to EngineSetupRequested(1) [master]
dCALL: SETUP ENGINE
dTRYING TO START ADAPTER
dENABLING TEST CASE: 0
dSTARTING /home/guyan/ti-processor-sdk-linux-am335x-evm-05.01.00.11/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gdb -i mi
dGDB STARTED, INITIALIZING IT
<1show version
<2show debug-file-directory
<3set print object on
<4set breakpoint pending on
<5set print elements 10000
<6set unwindonsignal on
<7set width 0
<8set height 0
s正在设置 inferior…
<9python sys.path.insert(1, '/home/guyan/Qt5.10.0/Tools/QtCreator/share/qtcreator/debugger/')
<10python sys.path.append('/home/guyan/ti-processor-sdk-linux-am335x-evm-05.01.00.11/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/data-directory/python')
<11python from gdbbridge import *
<12python theDumper.loadDumpers({"token":12})

>=thread-group-added,id="i1"
>~"GNU gdb (GDB) 8.0\n"
>~"Copyright (C) 2017 Free Software Foundation, Inc.\n"
>~"License GPLv3+: GNU GPL version 3 or later <gnu.org/…/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.Type \"show copying\"\nand \"show warranty\" for details.\n"
>~"This GDB was configured as \"–host=x86_64-arago-linux –target=arm-linux-gnueabi\".\nType \"show configuration\" for configuration details."
>~"\nFor bug reporting instructions, please see:\n"
>~"<www.gnu.org/…/>.\n"
>~"Find the GDB manual and other documentation resources online at:\n<www.gnu.org/…/>.\n"
>~"For help, type \"help\".\n"
>~"Type \"apropos word\" to search for commands related to \"word\".\n"

>&"show version\n"
>~"GNU gdb (GDB) 8.0\n"
>~"Copyright (C) 2017 Free Software Foundation, Inc.\n"
>~"License GPLv3+: GNU GPL version 3 or later <gnu.org/…/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.Type \"show copying\"\nand \"show warranty\" for details.\n"
>~"This GDB was configured as \"–host=x86_64-arago-linux –target=arm-linux-gnueabi\".\nType \"show configuration\" for configuration details."
>~"\nFor bug reporting instructions, please see:\n"
>~"<www.gnu.org/…/>.\n"
>~"Find the GDB manual and other documentation resources online at:\n<www.gnu.org/…/>.\n"
>~"For help, type \"help\".\n"
>~"Type \"apropos word\" to search for commands related to \"word\".\n"
>1^done
dPARSING VERSION: 1^done
dSUPPORTED GDB VERSION GNU gdb (GDB) 8.0
dCopyright (C) 2017 Free Software Foundation, Inc.
dLicense GPLv3+: GNU GPL version 3 or later <gnu.org/…/gpl.html>
dThis is free software: you are free to change and redistribute it.
dThere is NO WARRANTY, to the extent permitted by law.Type "show copying"
dand "show warranty" for details.
dThis GDB was configured as "–host=x86_64-arago-linux –target=arm-linux-gnueabi".
dType "show configuration" for configuration details.
dFor bug reporting instructions, please see:
d<www.gnu.org/…/>.
dFind the GDB manual and other documentation resources online at:
d<www.gnu.org/…/>.
dFor help, type "help".
dType "apropos word" to search for commands related to "word".
dGNU gdb (GDB) 8.0
dCopyright (C) 2017 Free Software Foundation, Inc.
dLicense GPLv3+: GNU GPL version 3 or later <gnu.org/…/gpl.html>
dThis is free software: you are free to change and redistribute it.
dThere is NO WARRANTY, to the extent permitted by law.Type "show copying"
dand "show warranty" for details.
dThis GDB was configured as "–host=x86_64-arago-linux –target=arm-linux-gnueabi".
dType "show configuration" for configuration details.
dFor bug reporting instructions, please see:
d<www.gnu.org/…/>.
dFind the GDB manual and other documentation resources online at:
d<www.gnu.org/…/>.
dFor help, type "help".
dType "apropos word" to search for commands related to "word".
dUSING GDB VERSION: 80000, BUILD: 2017
<13-interpreter-exec console "set target-async off"

>&"show debug-file-directory\n"
>~"The directory where separate debug symbols are searched for is \"/tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/lib/arm-linux-gnueabi/debug\".\n"
>2^done

>&"set print object on\n"
>=cmd-param-changed,param="print object",value="on"
>3^done

>&"set breakpoint pending on\n"
>=cmd-param-changed,param="breakpoint pending",value="on"
>4^done

>&"set print elements 10000\n"
>=cmd-param-changed,param="print elements",value="10000"
>5^done

>&"set unwindonsignal on\n"
>=cmd-param-changed,param="unwindonsignal",value="on"
>6^done

>&"set width 0\n"
>=cmd-param-changed,param="width",value="4294967295"
>7^done

>&"set height 0\n"
>8^done

>&"python sys.path.insert(1, '/home/guyan/Qt5.10.0/Tools/QtCreator/share/qtcreator/debugger/')\n"
>9^done

>&"python sys.path.append('/home/guyan/ti-processor-sdk-linux-am335x-evm-05.01.00.11/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/data-directory/python')\n"
>10^done

>&"python from gdbbridge import *\n"
>&"Traceback (most recent call last):\n"
>&"File \"<string>\", line 1, in <module>\n"
>&"File \"/home/guyan/Qt5.10.0/Tools/QtCreator/share/qtcreator/debugger/gdbbridge.py\", line 36, in <module>\n"
>&"import tempfile\n"
>&"File \"/home/guyan/ti-processor-sdk-linux-am335x-evm-05.01.00.11/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/python3.5/tempfile.py\", line 43, in <module>\n"
>&"import shutil as _shutil\n"
>&"ImportError: No module named 'shutil'\n"
>&"Error while executing Python code.\n"
>11^error,msg="Error while executing Python code."

>&"python theDumper.loadDumpers({\"token\":12})\n"
>&"Traceback (most recent call last):\n"
>&"File \"<string>\", line 1, in <module>\n"
>&"NameError: name 'theDumper' is not defined\n"
>&"Error while executing Python code.\n"
>12^error,msg="Error while executing Python code."
dNOTE: ENGINE SETUP FAILED
dState changed from EngineSetupRequested(1) to EngineSetupFailed(2) [master]
<Debugging has failed

yongqing wang:

回复 user4926528:

先确认一些开发板上GDB服务是否正确开启

yongqing wang:

回复 yongqing wang:

或者你参考这个帖子检查一下:blog.csdn.net/…/52045217

user4926528:

回复 yongqing wang:

请问这个要怎么确认呢?

yongqing wang:

回复 user4926528:

gdbserver –version

Trolong_support:

您好,

我们创龙有GDB调试的相关文档,您可以参考一下我司的官方教程,希望能给您带来帮助。5-6-基于GDB和GDBServer的远程调试方法.pdf

user4926528:

回复 yongqing wang:

我在开发板上用指令建立gdbserver,然后在pc端远程连接是可以运行的,但是在Qtcreator上用您给的帖子上的方法测试就会出现之前的错误,显示Launching Dubugger失败。

user4926528:

回复 yongqing wang:

我又查了一下,看了一下DEBUG的信息,gdbserver应该是没有问题的,应该是qtcreator远程调试时会调用python脚本。错误信息里也显示是python代码执行出现错误。不知道您有没有对这些有了解?

user4926528:

回复 Shine:

我又查了一下,看了一下DEBUG的信息,gdbserver应该是没有问题的,应该是qtcreator远程调试时会调用python脚本。错误信息里也显示是python代码执行出现错误,请问官方是否有sdk对应的说明,比如gdb的编译时是否支持python?

赞(0)
未经允许不得转载:TI中文支持网 » SDK下QtCreator远程调试
分享到: 更多 (0)