This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: WPP capabilities in gcc

You are completely right Jonathan. My Apologies.
WPP is a tool I use in my work field on an every-day basis, so I
thought it was known.

Here is the Wikipedia page on WPP:

In short, WPP allows to put traces and logs in your C/C++ products and
send to customers, without including sensitive tracing/logging strings
in your binary.
What WPP does, is it runs during pre-compilation, and replaces the
string in each call to a trace macro, with an obfuscated string. So:
DoTrace("program started %d %s beginning", num, str);
is Replaced to:
DoTrace("897192873 __LINE__ __FILE__ %d %s", num, str);
And puts the original string in the Debug's .pdb file, with the debug symbols.
Later, the user can use a software like EtwDataViewer (see first
google result for screenshot) to "Reverse" the WPP traces, and recover
the original traces of the program.

I hope my explanation is clear.

So again:
1. Can you think of a way to achieve this with gcc?
    We used regular expressions until now to find the "DoTrace" and
replace the strings, but needless to say its ugly.
    We also thought about implementing a gcc plugin, but I think a lot
of people can benefit from it being embedded in gcc, instead of having
to import an .so file to enjoy this feature.
2. Do you think its a good feature for gcc, and will you (the
maintainers) be willing to merge it, after we'll implement it?

Thanks again for your help,
Shoham Peller

On Sun, Apr 26, 2015 at 4:16 PM, Jonathan Wakely <> wrote:
> On 25 April 2015 at 23:23, Shoham Peller wrote:
>> Hi Guys,
>> It's been 4 days. Can someone help me?
> I have no idea what wpp is or why it is useful. Maybe that's true for
> other people reading this list.
> You shouldn't be very surprised that you don't get any useful
> responses to a mail like "I want to add something you've never heard
> of to gcc, do you think that would be useful?"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]