[Mono-devel-list] P/Invoke question -- debugging
Willibald Krenn
Willibald.Krenn at gmx.at
Thu Feb 24 06:24:03 EST 2005
Frank Bergmann schrieb:
> Instead of calling the delegate I get:
>
> ** ERROR **: file mini.c: line 7146 (mono_get_lmf_addr): should bot be
> reached aborting...
Do you have a small testcase for this? (That fails on 1.1.4)
> At first I was suspecting problems with the calling conventions. But
> since the callback function is not even entered I'm at a loss. My
> attempts to debug the mono app and the c-library at the same time
> failed.
If you are working with the svn version of mono, you can use ddd to e.g.
set a breakpoint in mono_get_lmf_addr and inspect the value of
mono_jit_tls_id. If it's -1, then TlsAlloc in mini_init failed.
Otherwise I would say something is wrong with your thread support,
because TlsSetValue is called each time a thread is started by mono and
assigns each thread it's own MonoJitTlsData structure (you failed to
read in in mono_get_lmf_addr..)
BTW: You can also try and set the environment variable "MONO_NPTL".
Willi
More information about the Mono-devel-list
mailing list