David already abstracted different allocation schemes for runtime
contexts, so this time the kernel runtime needs no change. The dyninst
runtime now has the per-cpu contexts included in shared memory.
* translate.cxx (c_unparser::emit_common_header): Move runtime_context.h
and common_session_state.h right after the struct context definition.
* runtime/dyninst/common_session_state.h: Add struct context[] to shm.
(stp_session_context): New function to access a specific context.
* runtime/dyninst/runtime_context.h (_stp_runtime_contexts_alloc/free):
Don't manage memory anymore, just initialize the locks and be done.
Use stp_session_context throughout to retrieve contexts.
* runtime/dyninst/runtime.h (stp_pthread_mutex_init_shared): New, set
the PTHREAD_PROCESS_SHARED attribute while initializing a mutex.
* runtime/dyninst/shm.c (_stp_shm_finalize): dbug the final mmap addr.