Move CallStack to libbacktrace.

Fix a small bug in the Printer for strings that didn't properly
prepend the prefix.

Change-Id: I33c63841ef6e07728ab3195886539d82b38ee19a
diff --git a/libutils/ProcessCallStack.cpp b/libutils/ProcessCallStack.cpp
index f9340c5..f837bcb 100644
--- a/libutils/ProcessCallStack.cpp
+++ b/libutils/ProcessCallStack.cpp
@@ -123,7 +123,7 @@
     mTimeUpdated = tm();
 }
 
-void ProcessCallStack::update(int32_t maxDepth) {
+void ProcessCallStack::update() {
     DIR *dp;
     struct dirent *ep;
     struct dirent entry;
@@ -181,14 +181,13 @@
         int ignoreDepth = (selfPid == tid) ? IGNORE_DEPTH_CURRENT_THREAD : 0;
 
         // Update thread's call stacks
-        CallStack& cs = threadInfo.callStack;
-        cs.update(ignoreDepth, maxDepth, tid);
+        threadInfo.callStack.update(ignoreDepth, tid);
 
         // Read/save thread name
         threadInfo.threadName = getThreadName(tid);
 
         ALOGV("%s: Got call stack for tid %d (size %zu)",
-              __FUNCTION__, tid, cs.size());
+              __FUNCTION__, tid, threadInfo.callStack.size());
     }
     if (code != 0) { // returns positive error value on error
         ALOGE("%s: Failed to readdir from %s (errno = %d, '%s')",
@@ -221,13 +220,12 @@
     for (size_t i = 0; i < mThreadMap.size(); ++i) {
         pid_t tid = mThreadMap.keyAt(i);
         const ThreadInfo& threadInfo = mThreadMap.valueAt(i);
-        const CallStack& cs = threadInfo.callStack;
         const String8& threadName = threadInfo.threadName;
 
         printer.printLine("");
         printer.printFormatLine("\"%s\" sysTid=%d", threadName.string(), tid);
 
-        cs.print(csPrinter);
+        threadInfo.callStack.print(csPrinter);
     }
 
     dumpProcessFooter(printer, getpid());