This is the mail archive of the
mailing list for the GCC project.
RE: WPP capabilities in gcc
- From: "Daniels, Marcus G" <mdaniels at lanl dot gov>
- To: Shoham Peller <shohamp at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Sun, 26 Apr 2015 22:41:10 +0000
- 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> <CABpZJmy484mvEMVZYzLo+qQDBd24Y7g=sURuWGUGMRUSOicU8A at mail dot gmail dot com> <CAH6eHdT2xQ9qkhva=Y62bcGpeue1ztM54E-oFnOzZK7RnNyYSQ at mail dot gmail dot com> <CABpZJmzXs9wj3KWsqk4rbUtrsRQLT_SRdeqffZ+xJNkYyz_VFw at mail dot gmail dot com>
GNU gettext with Emacs source context might do it. You'd have to invent your own tags, in lieu of of __FILE__, etc.
It seems to me the general problem is that C preprocessor does not give you the full power of C. One cannot simply define a function to hash the __FILE__ string at compile time. There's no quasi-quote like in Lisp or Haskell.
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of Shoham Peller
Sent: Sunday, April 26, 2015 3:53 PM
To: Jonathan Wakely
Cc: firstname.lastname@example.org; Guy Lewin
Subject: Re: WPP capabilities in gcc
SystemTap does not give a solution for this, and is not really intended for this use:
* It's no cross-platform, it's for Linux
* It doesn't allow the developer to write the text he wants
* It doesn't parse the tracing string
The solution I'm talking about is:
* cross platform
* Will allow you to write arbitrary trace string
* Parses the string and the parameters in it (%s, %d) and makes sure they are traced too.
On Mon, Apr 27, 2015 at 12:21 AM, Jonathan Wakely <email@example.com> wrote:
> On 26 April 2015 at 18:47, Shoham Peller wrote:
>> 1. Can you think of a way to achieve this with gcc?
> Insert SystemTap probe points.