Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342630

Summary: Capture valgrind initialization problems directly in eclipse
Product: [Tools] Linux Tools Reporter: Jorge Costa <jmecosta>
Component: ValgrindAssignee: Roland Grunberg <rgrunber>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: akurtakov, elaskavaia.cdt
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Jorge Costa CLA 2011-04-12 16:01:35 EDT
When launching a application using valgrind, if the application fails to start due to valgrind problems the plugin only throws "cannot parse PID exceptions". 

The plugin can therefore be enhanced by capturing the error messages valgrind normally shows when such problems occur and present them directly in eclipse.
Comment 1 Jorge Costa CLA 2011-04-12 17:11:38 EDT
This can be fixed by checking the valgrind log files, if the a core file is in the folder than do not parse this file since it will cause exception

protected IValgrindMessage[] parseLogs(IPath outputPath) throws IOException, CoreException {
			
	List<IValgrindMessage> messages = new ArrayList<IValgrindMessage>();
		
	for (File log : outputPath.toFile().listFiles(LOG_FILTER)) {
			
	if ( !log.toString().contains("core")) {
			System.out.println("Launch Core Parser Create");
			System.out.println(log.getName());
			
			ValgrindCoreParser parser = new ValgrindCoreParser(log, launch);
			
			System.out.println("Parser Launched");
			System.out.println(parser.toString());
			
			IValgrindMessage[] results = parser.getMessages();
			messages.addAll(Arrays.asList(results));
			createMarkers(results);
			}
		}
		
		return messages.toArray(new IValgrindMessage[messages.size()]);
	}
Comment 2 Alexander Kurtakov CLA 2014-01-27 07:10:47 EST
Roland, would you please take a look at this ? It sounds like a good thing to do.
Comment 3 Elena Laskavaia CLA 2015-11-24 15:10:03 EST
The core dump issue is fixed Bug 482906
Comment 4 Roland Grunberg CLA 2015-11-24 15:15:12 EST
Marking as duplicate.

*** This bug has been marked as a duplicate of bug 482906 ***