Use the correct debuggerd given the tid.

On 64 bit systems, calling dump_backtrace_to_file will automatically
call debuggerd64. If the process to dump is actually 32 bit, this
creates an unrecognizable dump backtrace. Modify the code to check the
type of the process and connect to the appropriate debuggerd process.

This change refactors both the tombstone and backtrace functionality to
allow both to work properly on 64 bit systems when dealing with mixed
processes.

Bug: 17487122

(cherry picked from commit a9fa7b87f1aefd7b96f749a545d3385ad384c12b)

Change-Id: I3c9e0212c8720877a6af092071a3695df2a36df8
2 files changed