Community
Participate
Working Groups
Created attachment 210401 [details] Screenshot of truncated output GDB 7.4 seems to have a slightly different output for the result of "-list-thread-groups --available". We use this command to list all processes in the connect dialog. The difference is that now processes that were not being reported before are, and may contain a '/' in them: {id="4",type="process",description="[ksoftirqd/0]",user="root",cores=["0"]} My guess is that we don't parse the / properly and we get some truncated results as shown in the attached screenshot.
Created attachment 210471 [details] Better parsing for new output from GDB 7.4 It turns out that the name of the form [ksoftirqd/0] mimics the linux ps program, and indicates that the cmd line arguments of the program are not known. The /0 means that instance is running on core 0. This patch removes the wrapping [] and removes the /coreNum pattern to extract the actual name of the process.
Oh, and the patch also handles the case where where we don't use -list-thread-groups --available and have to fall back to CCorePlugin.getDefault().getProcessList(); This call returns the process and include its arguments. If the arguments contain a / we would think we were dealing with a path, and truncate it. This can be easily reproduced by doing a local attach session using GDB 6.8. The patch removes the arguments of the process entry before truncating the path.
Committed to master
*** cdt git genie on behalf of Marc Khouzam *** Bug 370375: [attach] List of processes returned by GDB 7.4 is not parsed properly [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d2ba7a5b346d568eb26a84666b15c2a944dea8fc *** cdt git genie on behalf of Marc Khouzam *** Bug 370375: [attach] List of processes returned by GDB 7.4 is not parsed properly [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d2ba7a5b346d568eb26a84666b15c2a944dea8fc