How to debug binaries with cdtdebug.sh from command line? [message #1754588] |
Mon, 20 February 2017 10:16  |
Eclipse User |
|
|
|
I try to debug a program not built with eclipse (but with some custom build system) using the standalone cdtdebug.sh script:
cdtdebug.sh -e /path/to/my_program some args
But when the GUI has started up, I cannot start debugging immediately: Launching 'New_configuration' has encountered a problem. Program file does not exist
When I click on the /path/to/my_program in the Executable tab (the executable is automatically entered there), I get an error:
An internal error occurred during: "Reading Debug Symbol Information: boost".
java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:244)
at org.eclipse.cdt.utils.debug.dwarf.DwarfReader.parseSourceInCULineInfo(DwarfReader.java:295)
at org.eclipse.cdt.utils.debug.dwarf.DwarfReader.processCompileUnit(DwarfReader.java:647)
at org.eclipse.cdt.utils.debug.dwarf.DwarfReader.processDebugInfoEntry(DwarfReader.java:606)
at org.eclipse.cdt.utils.debug.dwarf.Dwarf.parseDebugInfoEntry(Dwarf.java:593)
at org.eclipse.cdt.utils.debug.dwarf.Dwarf.parseDebugInfo(Dwarf.java:485)
at org.eclipse.cdt.utils.debug.dwarf.Dwarf.parse(Dwarf.java:454)
at org.eclipse.cdt.utils.debug.dwarf.DwarfReader.getSourceFilesFromDebugInfoSection(DwarfReader.java:564)
at org.eclipse.cdt.utils.debug.dwarf.DwarfReader.getSourceFiles(DwarfReader.java:542)
at org.eclipse.cdt.internal.debug.application.CompilerOptionParser.run(CompilerOptionParser.java:104)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
at org.eclipse.cdt.internal.debug.application.DebugExecutable.importAndCreateLaunchConfig(DebugExecutable.java:241)
at org.eclipse.cdt.debug.application.ApplicationWorkbenchWindowAdvisor$PostWindowCreateRunnable.run(ApplicationWorkbenchWindowAdvisor.java:363)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Only after I enter the path to the executable manually in the Debug configuration, I can start debugging, which makes me wonder: shouldn't the -e switch provide that?
So my question is: is there an easy way I can start debugging just using some command from the command line?
The reason I want this is I have several different executables and would like to avoid having to enter their paths manually each time, or select some configuration, but rather jump-start to debugging each using my custom debugging launcher.
N.B.: It was possible to do this with the intel debugger idb (which was based on the eclipse framework) but they deprecated that, so I'm trying to switch to eclipse debugging.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07560 seconds