I am facing a typical problem in XS programming with multiple interpreter on Linux 2.1 advanced server. If any one please give me any pointers it will be very helpful to me. I have built perl with following options.
config_args='-des -Dcc=cc -Dcf_email=PerlDirect@ActiveState.com -Dusethreads -Duseithreads -Dcf_by=ActiveState -Uinstallusrbinperl -Ud_sigsetjmp -Dinc_version_list=5.6.0/i686-linux-thread-multi 5.6.0 -Dprefix=/home/pijush/project/Testing/Perl
and gccversion is '2.95.2 20000220 (Debian GNU/Linux)', libc is 'libc-2.1.3.so'.
In xs(say test.xs) file I have written following code
I have built a shared library from this xs file and place it in my perl location. After that I have written a test script (say test.pl) to test the code........ MODULE=TestModule::TestAPI PACKAGE=TestModule:Test1 int TestMethod1(.......) ....... ..... MODULE=TestModule::TestAPI PACKAGE=TestModule:Test2 int TestMethod2(........) ........ .......
But the test script is generatting an error on TestMethod2. To debug the error what I have done, I put an infinite loop on TestMethod2 and built so file without optimization and -g option. Then I started the script and to start debugging I have attached the main process (since I have built my perl with MULTIPLICITY USE_ITHREADS, so there is 4-5 process running simultaneously)with gdb. At my surprise I observerved that although the script stopped at infinite loop but after stepping (using step command) gdb showing code which is present in TestMethod1.use TestModule::TestAPI; my $testbase = TestModule::TestAPI->New(); my $var1 = $testbase->TestMethod1(...); my $var2 = $testbase->TestMethod2(...);
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |