Community
Participate
Working Groups
I have a simple hello world C++ autotools project and the binary ends up having a "(GNU)" in its path. It appears that we need to escape elements like parentheses in the generated shell script: /tmp/org.eclipse.linuxtools.profiling.launch12762638928466417352370768374524.sh: line 2: syntax error near unexpected token `(' /tmp/org.eclipse.linuxtools.profiling.launch12762638928466417352370768374524.sh: line 2: `exec stap -o /tmp/testRC2/.metadata/.plugins/org.eclipse.linuxtools.callgraph.core/callgraph.out -c '/tmp/testRC2/AutotoolsProject/build-Build_(GNU)/src/a.out' /tmp/testRC2/.metadata/.plugins/org.eclipse.linuxtools.callgraph.core/callgraphGen.stp /tmp/testRC2/AutotoolsProject/build-Build_(GNU)/src/a.out'
Created attachment 171735 [details] Patch for 316609 Roland and I drafted a patch for this in Callgraph. Unfortunately we can't apply to Profiling directly, since Profiling doesn't distinguish between regular parameters and file paths. This quick fix just properly escapes (, ) and spaces in the binary and output paths. Also, projects containing names with special characters currently don't seem to compile on CDT or AutoTools without manual tweaking, so I did this to reproduce: 1. Create C++ Autotools project named "test (316609)" 2. Rename cpp file to test316609.cpp 3. In Makefile, change the object file name to test316609 This allowed the CDT to finish building/compiling.
Roland, Please review and apply or close the bug if it's not relevant anymore
I've confirmed this fixes the issue and committed as f5ed5563795f387f22c25c3a1d3146569aa74c9f. The initial contribution was made to be specifically contributed to Callgraph under the EPL, by a former committer, and is < 250 loc. Resolving as fixed.