[gs-devel] code coverage of .ps files
CPompeo at uascwa.com
Tue Jul 31 08:40:33 PDT 2007
When I'm stepping through the Ghostscript C code with VC6 debugger I see the
lines from the .ps files in one of the variables. Unless you guys can think
of a better method, maybe I can capture the information there.
From: 'Ralph Giles' [mailto:giles at ghostscript.com]
Sent: Friday, July 27, 2007 10:55 AM
To: Cheri Pompeo
Cc: 'gs-devel at ghostscript.com'; ray.johnston at artifex.com
Subject: Re: [gs-devel] code coverage of .ps files
On Fri, Jul 27, 2007 at 09:51:58AM -0700, Cheri Pompeo wrote:
> I don't mind hacking but I'm not sure how to print to a file from the .ps
> files. (assuming that is the best route to take)
This is something like:
(test.log) (a) file
dup (hello world!\n) writestring
> I'm thinking if I can somehow get the line number and filename of what
> line on the .ps file I am using, I can go from there.
The problem is that the files are parsed into memory and then executed
later. You could perhaps modify the bind operator to wrap everything in
some code that logs the procedure name before executing it, and then
work backward from there.
For more accurate statistics, you'd have to augment the parser and
stacks to keep track of line number information. That's what I meant
about not keeping much debugging information. It's not a small job,
but not impossible either.
Maybe Ray has some ideas.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gs-devel