LanX has asked for the wisdom of the Perl Monks concerning the following question:

Hi

at the moment I'm trying to analyze the call flow of a foreign modul, i.e. logging and printing every function call, passed arguments and return values.

I'm doing this by inspecting the foreign stash and replacing the functions with wrappers.

I'm wondering if there are any other recommended approaches to automatically hook into calls.

(for instance one could program the debugger to set breakpoints and commands)

Cheers Rolf

  • Comment on Analyzing function calls in foreign modul

Replies are listed 'Best First'.
Re: Analyzing function calls in foreign modul
by Anonymous Monk on Jun 23, 2010 at 12:35 UTC
      Thx, I'm having a look at these moduls.

      (seems like the word "trace" didn't occur to me ...)

      Cheers Rolf

Re: Analyzing function calls in foreign modul
by BrowserUk (Patriarch) on Jun 23, 2010 at 12:39 UTC
      Thx, DB::sub indeed looks interesting.

      and the discussion in see also is really helpful.

      Cheers Rolf