Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Valgrind support in TheIDE
Re: Valgrind support in TheIDE [message #15961 is a reply to message #15957] Tue, 20 May 2008 00:07 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mdelfede wrote on Mon, 19 May 2008 16:02

Patch to make it work on both ubuntu 7.04 and 8.04.

void Ide::Valgrind()
{
	static String ValgrindLogFile = "";
	static bool hasValgrind = true;
	
	// runs valgrind --help to find if the correct option is
	// --log-file-exactly (ubuntu 7.04) or --log-file (ubuntu 8.04)
	if(hasValgrind && ValgrindLogFile == "")
	{
		One<Host> h = CreateHostRunDir();
		String fn = GetTempFileName();
		FileOut f(fn);
		String cmdline;
		if(!IsNull(h->Execute("valgrind --help", f)))
		{
			f.Close();
			String txt = LoadFile(fn);
			DeleteFile(fn);
			if(txt.Find("--log-file-exactly") > 0)
			   ValgrindLogFile = "--log-file-exactly";
			else if (txt.Find("--log-file") > 0)
			   ValgrindLogFile = "--log-file";
			else
				hasValgrind = false;
		}
		else
			hasValgrind = false;
	}
	if(!hasValgrind)
		return;
	
	if(!Build())
		return;
	One<Host> h = CreateHostRunDir();
.........................................


(applied to svn)

Ciao

Max


Nice heurestics Smile Applying.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PROFILEMT flag
Next Topic: File selector displays hidden items ant its icons in different color
Goto Forum:
  


Current Time: Tue May 07 12:05:52 CEST 2024

Total time taken to generate the page: 0.03327 seconds