Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The code turns on the perl debugger in a separate thread at the XS level, this allows the debugger to be used to step through running perl code in that separate thread. It's hard to explain, but works well:)
It seems (given my limited understanding) that the correct way to do this in later perl's is to use the Perl_init_debugger function, but it doesn't seem to be available? Using the raw source code for this function works well but that would mean that my code would only works on that specific version of perl, something that I want to avoid...
An example of a module that uses this function is Enbugger:
https://metacpan.org/source/JJORE/Enbugger-2.016/Enbugger.xs
However, this module doesn't actually compile under ActiveState 5.22 or Stawberry 5.24
Enbugger.o:Enbugger.c:(.text+0x852): undefined reference to `__imp_Perl_init_debugger'
Does anyone know the 'correct' way to use this function?
Any hints would be gratefully appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to use Perl_init_debugger in XS code?
by Anonymous Monk on Jan 09, 2017 at 12:38 UTC | |
by Anonymous Monk on Jan 10, 2017 at 16:04 UTC | |
by Anonymous Monk on Jan 13, 2017 at 03:11 UTC |