[gs-devel] code coverage of .ps files
Cheri Pompeo
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.
Cheri
-----Original Message-----
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
closefile
> I'm thinking if I can somehow get the line number and filename of what
ever
> 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.
-r
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ghostscript.com/pipermail/gs-devel/attachments/20070731/7366ee97/attachment-0001.htm
More information about the gs-devel
mailing list