[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Debugging SCM->C value conversion
From: |
Andy Wingo |
Subject: |
Debugging SCM->C value conversion |
Date: |
Thu, 23 Sep 2004 21:41:28 +0200 |
Hey Jan,
On Wed, 2004-09-22 at 19:08 +0200, Jan Nieuwenhuizen wrote:
> Andy Wingo writes:
>
> > CVS <-> g-wrap interaction problem.
>
> I would like to help but I'm not sure how to go about debugging this,
> where to look.
The problem you are experiencing occurs with "dynprocs", which are the
applicable SMOBs generated by g-wrap. These dynprocs use libffi to call
the wrapped procedures. The problem is only in g-wrap.
Before applying the dynproc, libffi needs to set up a data area
containing the arguments to the C function. For each argument type,
there exists a XXX_unwrap_value function which, given a pointer to SCM,
will set the proper value in the location given as a void pointer.
dynproc_smob_apply in guile-runtime.c takes care of passing the proper
output location to the unwrap function.
One of those unwrap_value procedures is causing an error. You need to
figure out which one that is. Break on dynproc_smob_apply. When it
enters, examine fi->arg_types[5] to verify that the unwrap_value
procedure is gw__tmp41_unsigned_int_unwrap_value. The tmp41 gensym might
be different, but I doubt it.
Then, you can break on the unsigned int unwrap procedure to see which
check is failing.
This has got to be the highest-latency debugging session, ever ;-)
Hope this helps,
--
Andy Wingo <address@hidden>
http://ambient.2y.net/wingo/
Re: Death of -glib, Life of -platform, Jan Nieuwenhuizen, 2004/09/14
- Re: Death of -glib, Life of -platform, Andy Wingo, 2004/09/17
- Re: Death of -glib, Life of -platform, Jan Nieuwenhuizen, 2004/09/17
- Re: Death of -glib, Life of -platform, Andy Wingo, 2004/09/20
- Re: Death of -glib, Life of -platform, Jan Nieuwenhuizen, 2004/09/20
- Re: Death of -glib, Life of -platform, Andy Wingo, 2004/09/22
- Re: Death of -glib, Life of -platform, Jan Nieuwenhuizen, 2004/09/22
- Debugging SCM->C value conversion,
Andy Wingo <=