[gs-devel] Code coverage of ps files.
Ray Johnston
Ray.Johnston at Artifex.com
Mon Aug 13 11:09:22 PDT 2007
Hi Cheri,
I hadn't tried this with a PS file. You are correct -ZI on the command line
will trace the PS executed by the init files.
To trace a PDF try:
gs -dBATCH -dNOPAUSE -c "(I) true .setdebug " -f input.pdf >
gs.stdout 2> gs.stderr
The trace info will be in gs.stderr
Regards,
Ray
------------------------------------------------------------------------
Cheri Pompeo wrote:
>
> I have -ZI set and I see the .ps text loaded during initialization but
> the only thing I ever see from the ps files as I'm actually displaying
> a PDF page is an occasional font load.
>
> Would I put true .setdebug into the PDF file being displayed or into
> one of the .ps files?
> Thanks for any more help.
> Cheri
>
> -----Original Message-----
> From: Ray Johnston [mailto:Ray.Johnston at Artifex.com]
> Sent: Friday, August 10, 2007 4:07 PM
> To: Cheri Pompeo
> Cc: gs-devel at ghostscript.com
> Subject: Re: [gs-devel] Code coverage of ps files.
>
> Hi Cheri,
>
> The -dINITDEBUG shows some of what is being executed during the
> initialization.
>
> For more detailed information, there is the (extrememly verbose) -ZI
> switch that works with the "debug" build. This spews LOTS of PS
> interpreter
> information to stderr while Ghostscript executes.
>
> It can be turned off and on using the Ghostscript extension to the PS
> operator set '.setdebug'. Examples are:
>
> (I) true .setdebug % turn on interpreter debugging info
> (I) false .setdebug % turn off interpreter debugging info
>
> Please see doc/Use.htm##Debug_switches for more info.
>
> I hope this helps a bit.
>
> Regards,
> Ray
> ------------------------------------------------------------------------
>
> Cheri Pompeo wrote:
> >
> > I see the contents of the ps files loaded onto the stacks.
> > Is there a place in the gs c code where I can trap when these are
> > executed?
> > If nothing else I can write a program that searches the .ps files to
> > say which lines of code are used.
> > Thanks again for any help.
> > Cheri
> >
>
More information about the gs-devel
mailing list