Re: Debug TRACE style output wihout leaving literal strings in binary
From: Pieter (msnews_at_insanegenius.com)
Date: 05/18/04
- Next message: Pieter: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- Previous message: Spacen Jasset: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- In reply to: Spacen Jasset: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- Next in thread: Spacen Jasset: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- Reply: Spacen Jasset: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 May 2004 17:32:29 -0700
Spacen
Thank you for the reply, but your solution (which is a typical
implementation of TRACE type macros) does not meet my requirements.
The binary that is compiled using your MY_TRACE macro will comtain the
literal string "err = %x\n", this is what I want to prevent.
Pieter
"Spacen Jasset" <spacenjasset@yahoo.co.uk> wrote in message
news:c8bjd5$jja$1@news7.svr.pol.co.uk...
>
> "Pieter" <msnews@insanegenius.com> wrote in message
> news:O3VEt7FPEHA.1644@TK2MSFTNGP09.phx.gbl...
> > I am researching any techniques to use simle TRACE type macros to output
> > debug strings from binaries at runtime, but, to do so without any
literal
> > strings remaining in the binary.
> >
> > E.g.
> > TRACE(_T("Some sensitive context text e.g. a function name %s\n"),
> > szSomeParameter);
> > But the resulting binary must not contain the _T("Some sensitive context
> > e.g. a function name %s\n") string literal.
> >
> > Requirements:
> > 1) The ideal system will not require stripping the strings from the PE
> file
> > after compilation, but will be transparent to compilation.
> > 2) The ideal system should not require developers to maintain cumbersome
> > message ids and string tables instead of directly using string literals.
> >
>
> how about this:
>
> #define MY_TRACE( a ) printf a
>
> but replace printf with your own variable arguments function that calls
> whatever its surpposed to.
>
> Usage is like this though:
>
> MY_TRACE( ("err = %x\n", err) );
>
> You can use variable argument lists in C99 to get rid of the double
> parenthesis, but I don't know if MS's C compiler supports this yet.
>
>
- Next message: Pieter: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- Previous message: Spacen Jasset: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- In reply to: Spacen Jasset: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- Next in thread: Spacen Jasset: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- Reply: Spacen Jasset: "Re: Debug TRACE style output wihout leaving literal strings in binary"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|