This still needs work to be togglable at runtime and
is at best a work in progress.
--HG--
extra : rebase_source : 59f17aae034799065f5227d68693f4a5c5de3e1a
Now that we have implementations of SharedLibraryInfo for
all platforms we don't need to build support for it conditionally.
--HG--
extra : rebase_source : d40cf1b0b28fab3ef31ab4511fc1ddda98a37a38
Moves MapInfo out of platform and renames it to SharedLibrary. There will
eventually be an implementation for all major platforms.
--HG--
extra : rebase_source : c7eae4bc0f0e27f2801c4e639d7dc82b47465f0b
This will let us use the signal based approach used
on linux on OS X. This is helpful because backtrace()
only works on the current thread.
--HG--
extra : rebase_source : 68e39af6025e5ba12f64708c453d6be3bb9f7a70
This uses a separate thread that will pause the main thread
and read the registers out of it.
--HG--
extra : rebase_source : c73c866d513c054326af117ddf31ce05eca61335
Currently we use dlsym on pthread_cond_wait$UNIX2003 to find a
function that indicates that new_sem_from_pool is on the stack. This
works on 10.5, but on 10.6 I could not find a single reliable
indicator that would work with dlsym.
The good news is that dladdr works with any symbol, not just exported
ones. To find the address of new_sem_from_pool, we set up a malloc logger
and force a call to new_sem_from_pool. From the logger callback we walk
the stack trying dladdr on every address.
To force a call to new_sem_from_pool, the initialization code has to be the
first to use semaphores, so it is now run from NS_LogInit.
This works on 10.6 and 10.5 (but we have to look for
"pthread_cond_wait$UNIX2003"). In 10.7 the call to malloc is gone, so we don't
have to worry about critical addresses on it anymore.
--HG--
extra : rebase_source : bba4ac9e3378c88f7037aa884511e473a57121f6
Currently we use dlsym on pthread_cond_wait$UNIX2003 to find a
function that indicates that new_sem_from_pool is on the stack. This
works on 10.5, but on 10.6 I could not find a single reliable
indicator that would work with dlsym.
The good news is that dladdr works with any symbol, not just exported
ones. To find the address of new_sem_from_pool, we set up a malloc logger
and force a call to new_sem_from_pool. From the logger callback we walk
the stack trying dladdr on every address.
To for a call to new_sem_from_pool, the initialization code has to be the
first to use semaphores, so it is now run from NS_LogInit.
This works on 10.6 and 10.5 (but we have to look for
"pthread_cond_wait$UNIX2003"). In 10.7 the call to malloc is gone, so we don't
have to worry about critical addresses on it anymore.
This uses a separate thread that will pause the main thread
and read the registers out of it.
--HG--
extra : rebase_source : bb8174320728b6c4976047fd25e6e93280ea444a