Re: Debugging a XS problem.. where to start?

[email protected] (Alberto Simões)
Newsgroups perl.xs
Organization Departamento de Informática - Universi dade do Minho
Message-ID <[email protected]>

On 16/01/12 21:28, Marvin Humphrey wrote:
> On Mon, Jan 16, 2012 at 09:11:27PM +0000, Alberto Simões wrote:
>> I do not use valgrind for some time, but this seems awkward:
>>
>> [ambs@stravinski FreeLing-old]$ valgrind -- /usr/bin/perl -I blib/arch/
>> -I blib/lib/ t/01-bindings/01-tokenizer.t
>> ==13831== Memcheck, a memory error detector
>> ==13831== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
>> ==13831== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
>> ==13831== Command: /usr/bin/perl -I blib/arch/ -I blib/lib/
>> t/01-bindings/01-tokenizer.t
>> ==13831==
>>
>>
>> and... nothing... I need to kill it.
>> Ideas?
>
> No memory errors have occurred yet in your program.
>
> IMO, you have given up too soon before reporting back.  I would advocate the
> use of a standard debugging technique to see where things are getting stuck:
> try sprinkling "warn" statements into your test file to see how far you get.
>
> Please bear in mind that running under Valgrind is typically 40x slower, so
> heavy tests can take a long time.

Found out that the test fails when the XS code calls a method in the 
library (in fact, tries to create an object of a specific type).

Now debugging inside that library will be almost impossible :-/
let me try again valgrind and gdb...

thanks
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.