> Are you saying that xbacktrace doesn't work at this point?
I'm new to gdb, so I don't know what xbacktrace is... What happen is that after i try to print things, say "p SDATA(current_buffer->directory_)", gdb no longer see the same call stack etc.
Anyway, I think I have tracked down the problem. In my generated "epaths.h", there is a bad value for PATH_SITELOADSEARCH:
#define PATH_SITELOADSEARCH ""
I think this cause "." to be added to the load path in "init_lread" (I can verify this tomorrow).
I have configured Emacs using "./configure --with-ns --without-dbus".