NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Julia on NetBSD?
Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
> > And what does the code snippet I sent uses?
> I haven't seen any code snippet since Martin CC'd me.
Here it is again:
DLLEXPORT size_t rec_backtrace_ctx(ptrint_t *data, size_t maxsize,
unw_context_t
*uc)
{
unw_cursor_t cursor;
unw_word_t ip;
size_t n=0;
unw_init_local(&cursor, uc);
do {
if (n >= maxsize)
break;
if (unw_get_reg(&cursor, UNW_REG_IP, &ip) < 0) {
break;
}
data[n++] = ip;
} while (unw_step(&cursor) > 0);
return n;
}
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index