See the code of rabincrowd plugin in radare2-extras repository.

On Dec 5, 2010, at 6:31 PM, Robin Vossen <[email protected]> wrote:

> Heh I kinda figured that.
> But how can I do this in Vala..? I tried to just add it.
> But that didn't seem to work at all.
> 
> My result now is:
> decompiler.vala:26.2-26.12: error: The name `g_type_init' does not
> exist in the context of `initialize'
>    g_type_init();
>    ^^^^^^^^^^^
> Compilation failed: 1 error(s), 0 warning(s)
> make: *** [decompiler] Error 1
> 
> Cheers
> Robin
> 
> On 5 December 2010 11:18, pancake <[email protected]> wrote:
>> Thats not a problem with rlist. Its a missing glib type initialization. Just 
>> call g_type_init() in the constructor. Its notified in the gwarning you 
>> pasted :)
>> 
>> On Dec 5, 2010, at 1:23 AM, Robin Vossen <[email protected]> wrote:
>> 
>>> Hello all,
>>> 
>>> I am having a problem with RLists. When I use them I get these errors.
>>> 
>>> (process:4655): GLib-GObject-CRITICAL **: gtype.c:2599: You forgot to
>>> call g_type_init()
>>> 
>>> (process:4655): GLib-CRITICAL **: g_once_init_leave: assertion
>>> `initialization_value != 0' failed
>>> 
>>> And after this a program freeze.
>>> When I run this in a ltrace envoirment I get
>>> 
>>> r_core_prompt_exec(0x603560, 0x7fff641abb8a, 0x7fff641abb70,
>>> 0x3078303a30623232, 0x30653232303430
>>> As you can see I run in a 64bit Envoirment.
>>> 
>>> The code I did is:
>>> 
>>>        var flow = new RList<DisOpType>();
>>>        /* The Above Triggers
>>>            (process:15616): GLib-GObject-CRITICAL **: gtype.c:2599: You 
>>> forgot
>>> to call g_type_init()
>>>            (process:15616): GLib-CRITICAL **: g_once_init_leave: assertion
>>> `initialization_value != 0' failed
>>>        */
>>> 
>>>        /* Build Analysed List */
>>>        for(int i = 0;i<(end_addr-addr);++i)
>>>        {
>>>            flow.append(new DisOpType(core->op_anal(addr).type, addr)); /* 
>>> <-- Hangc */
>>>                        /* Even more code down here */
>>> 
>>> I compiled this using:
>>> % cat Makefile
>>> VALAC=valac
>>> CFLAGS=-I.
>>> SOEXT=so
>>> VALARG=
>>> 
>>> %.o: %.c $(DEPS)
>>>    $(CC) -c -o $@ $< $(CFLAGS)
>>> 
>>> decompiler: decompiler.c
>>>    $(VALAC) --library=decompiler -o decompiler.${SOEXT} --Xcc=-shared
>>> --Xcc=-fPIC --vapidir=/home/robin/repo/radare2/swig/vapi/ --pkg r_cmd
>>> --pkg r_lib --pkg r_core --pkg r_util decompiler.vala pluginwrap.c
>>> $(VALARG)
>>> 
>>> clean:
>>>    rm -rf decompiler.${SOEXT}
>>>    rm -rf decompiler.vapi
>>> 
>>> I bet some of you guys can write a better Makefile. If so please do.
>>> For me this one 'works'. (heh)
>>> The strange thing is that the VALA RList example works fine.. And I
>>> can't seem to see the keypoint that differs.
>>> 
>>> I hope somebody can point me to the error I made. So I can continue.
>>> 
>>> Thanks all.
>>> 
>>> --
>>> Kind Regards,
>>> Robin Vossen
>>> 
>>> Please avoid sending me Word, Excel or PowerPoint attachments. See
>>> http://www.gnu.org/philosophy/no-word-attachments.html
>>> _______________________________________________
>>> radare mailing list
>>> [email protected]
>>> http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org
>>> 
>> _______________________________________________
>> radare mailing list
>> [email protected]
>> http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org
>> 
> 
> 
> 
> -- 
> Kind Regards,
> Robin Vossen
> 
> Please avoid sending me Word, Excel or PowerPoint attachments. See
> http://www.gnu.org/philosophy/no-word-attachments.html
> _______________________________________________
> radare mailing list
> [email protected]
> http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org
> 
_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org

Reply via email to