Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: source file info from PS4



How does one use TRAPNAL for the "DEBUG" signal?

On Thu, Sep 18, 2008 at 11:25 AM, Peter Stephenson <pws@xxxxxxx> wrote:
"Rocky Bernstein" wrote:
> But suppose one wrote a profiler, or just some sort of signal handler. Don't
> you want to be able to debug via PS4 the same as any other code?

You can do that using the TRAPNAL() { ... } form of trap, which records
line numbers like any other function.  I'll have to make sure this is
documented somewhere.

--
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author