This is the mail archive of the gcc@gcc.gnu.org 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


GNU gettext with Emacs source context might do it.  You'd have to invent your own tags, in lieu of of __FILE__, etc.

https://www.gnu.org/software/gettext/manual/html_node/C-Sources-Context.html#C-Sources-Context

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.  

Marcus
-----Original Message-----
From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of Shoham Peller
Sent: Sunday, April 26, 2015 3:53 PM
To: Jonathan Wakely
Cc: gcc@gcc.gnu.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 <jwakely.gcc@gmail.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.

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