Commit graph

5 commits

Author SHA1 Message Date
Igor Murashkin
63fbdb6440 libutils: Don't segfault ProcessCallStack when getting thread name fails
There's an inherent race in trying to read out the thread name from
the system and the thread closing out on its own (and thus being removed
from procfs).

Try to handle this by formatting the thread name unconditionally with
the tid when getting the thread name fails (instead of dereferencing
NULL and crashing).

Bug: 15406837
Change-Id: Ibf2208b8ce345589e7e9c57e6a307728d1121c5d
2014-08-19 11:48:52 -07:00
Christopher Ferris
9b0e074c6d Move CallStack to libbacktrace.
Fix a small bug in the Printer for strings that didn't properly
prepend the prefix.

Change-Id: I33c63841ef6e07728ab3195886539d82b38ee19a
2013-11-06 12:37:14 -08:00
Igor Murashkin
e65b7ea880 utils: Fix broken sdk build on windows
Bug: 11324229
Change-Id: Ia50e79b5e2430faea77b0c98902e8e018fb9ceff
2013-10-30 18:09:52 -07:00
Igor Murashkin
81f2c3d211 utils: Fix broken build
Bug: 11324229
Change-Id: I7e4f514c5531e4c0c11bb0ba5d67e4dabbcd5792
2013-10-30 16:05:45 -07:00
Igor Murashkin
ec79ef2e7b utils: Add ProcessCallStack to collect stack traces for all threads in a process
- Also add a Printer class (print lines to logcat, fd, or strings)

Bug: 11324229
Change-Id: I78435ed49aa196a0efb45bf9b2d58b62c41737d3
2013-10-25 19:24:56 -07:00