This is the mail archive of the
mailing list for the GCC project.
Re: WPP capabilities in gcc
- From: Shoham Peller <shohamp at gmail dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Guy Lewin <guy at lewin dot co dot il>
- Date: Sun, 26 Apr 2015 20:47:05 +0300
- Subject: Re: WPP capabilities in gcc
- Authentication-results: sourceware.org; auth=none
- References: <CABpZJmwNrv_6JDzhPxZMmOFCXexsJVm6XwNP-+eRwys62_hQmg at mail dot gmail dot com> <553C13D8 dot 7080000 at gmail dot com> <CAH6eHdR=Tfrhd5JKnp9-5zrV0J0khN8e2PTZugpSprONPJq5ew at mail dot gmail dot com>
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.
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,
On Sun, Apr 26, 2015 at 4:16 PM, Jonathan Wakely <email@example.com> 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?"