Fix mips unwind.

On mips 32, ptrace returns a long but unw_word_t is 64 bits. Unfortunately,
the read code assumes that unw_word_t and long are the same, so most
of the returned values are incorrect.

I fixed it by doing two reads on mips to pull in all of the 64 bits. This
could be a slight performance degradation, but I don't think it matters
enough to try and fix.

Change-Id: Ied0fbf56e62fe2c933e468741f8c47df882f6e44
Fix a potential race.

When adding the mmap image data to the shared map structure, make
sure to lock before adding the information.

Change-Id: I4ea8d73f8ac2e3d423619388550b1bed40be46ab
Fix NULL pointer dereference.

Bug: 13120542

Change-Id: I6847aeb779d3800b6e71710cf1c8026c1c05ea50
You can't change global vriables like HOST_ARCH

The build system depends on these variables to be constant.

Change-Id: Iba25cd821bf81b122b7c6c179c9611d95860a1a9