[M3devel] Problem interfacing C lib

Mika Nystrom mika at async.caltech.edu
Tue Mar 20 07:41:35 CET 2012


Hmm... it looks like it's skipping the pushing of what on the stack, you mean?
Very odd, I'd say...!

Did you look at the assembly?

=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:
>#1  0x00000035bd8172a0 in evbuffer_search_range (buffer=3D0x694090, =
>what=3D0x7 <Address 0x7 out of bounds>, len=3D0, start=3D0x0, =
>end=3D0x7fffffffdbb0)
>    at buffer.c:2441
>#2  0x0000000000404a0c in Buffer__Search (t=3D<error reading variable>, =
>pattern=3D<error reading variable>, from=3D<error reading variable>,=20
>    to=3D<error reading variable>) at ../src/Buffer.m3:150
>
>Buffer.m3:150
>        pos :=3D evbuffer.search_range(t.b, LOOPHOLE(chars, ADDRESS), =
>len, NIL, NIL);
>
>t.b is a pointer, so is chars=85 len is Utypes.size_t and it's value is =
>7.
>
><* EXTERNAL evbuffer_search_range *>
>PROCEDURE search_range(buf: t; what: char_star; len: size_t; start, end: =
>UNTRACED REF ptr): ptr;
>
>t is an ADDRESS, and so on=85
>
>Critical Mass Modula-3 version d5.9.0
>  last updated: 2010-07-21
>  compiled: 2010-10-04 07:24:16
>  configuration: /etc/cm3.cfg
>  host: AMD64_LINUX
>  target: AMD64_LINUX
>
>
>Any ideas? TIA,
>dd



More information about the M3devel mailing list