SlickEdit Product Discussion > SlickEdit®

Purify Configuration


Hi, I am trying to create a Purify Configuration for my slick edit project(to go along with Release and Debug).

I have done this, and am now trying to override the GNU C options for the Purify configuration so that the link and compile directive contain the necessary options to have purify instrument the code.
An example of what needs to be added to the g++ line is : purify g++=true -g ... g++ (where ... is a whole bunch of purify specific switches).
When I make this change via the slick edit gui, GNU C options dialog, it always inserts double quotes at the start and end of the command line.
i.e. the above becomes "purify g++=true -g .. g++".
This then seems to cause the build command to not work properly... it creates .o files, but never an executable.
It doest generate any kind of error, and the build dialog even shows "build successful", but no executable is created.
However, if I modify the .vpj file by hand, and insert the command line args myself, WITHOUT the " ", it works.
I dont like this hack... and I am wondering if I am not doing something correctly, or if this is a bug, or, if anyone out there knows how to create a configuration for purify tool that works.  Note that with my modification by hand, if I then subsequently opewn the GNU C options dilaog, it inserts double quotes again, so I have to steer clear of that dialog once the modification has been made to the .vpj file.

I am guessing that you tried to put replace (ignore quotes) "g++" with "purify g++=true -g" in the Compiler and/or Linker fields of the GNU C Options dialog.   That dialog is expecting those fields to contain the name of the command to execute -- without any options.  It quotes "purify g++=true -g" because, it assumes you are trying to run some program with spaces in it's name.

Since the GNU C Options GUI has limited flexibility with placement of options, the simplest solution to this is to create a small shell script for yourself, like "pureg++" like below:

--- Code: ---#!/bin/sh
purify g++=true -g $*

--- End code ---

Then you can point "compiler" and "linker" to this script for your Purify configuration and you should be off and running.


OK, this sounds promising, but what I really need to set the command to is:

purify g++=yes -demangle-program=/usr/sepp/bin/c++filt g++ -g -Wall -o "$(OUTFILE)" $(ALL_OBJ)

And I think outfile and ALL_OBJ are slick edit specific aliases?
would it still work if my pureg++ contains the above line?

It looks to me that everything beyond "g++" is the same stuff you would normally pass to g++, so if "pureg++" were the following, I think you would be set.  FYI, if you are not familiar with Bourne shell, $* is an alias for the list of command line arguments.

--- Code: ---#!/bin/sh
purify g++=yes -demangle-program=/usr/sepp/bin/c++filt g++ $*

--- End code ---

this worked... excellent!

given your comments about bash shell, is this the shell that slickedit invokes itself(when using the built in shell)?
I ask because my personal login shell is tcsh.
not that it matters, just curious.

Or does the bash part only matter when running the pureg++ script itself.


[0] Message Index

Go to full version