summaryrefslogtreecommitdiff
path: root/libutils/ProcessCallStack.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [libutils] Modernize codebase by replacing NULL with nullptrYi Kong2018-07-161-7/+7
| | | | | | | | Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
* libutils: include what you useSteven Moreland2017-04-141-0/+2
| | | | | | | | | These includes are included transitively by liblog, but not by the VNDK version of liblog. Bug: 33241851 Test: links with BOARD_VNDK_VERSION := current Change-Id: Ide4aee3cacad2a2bf6bd0cbdf0254c6c245f4020
* Add missing includes.Steven Moreland2017-03-101-0/+1
| | | | | | | | Includes are transitively imported by <string> in String8.h + String16.h but that include is being removed. Test: pass Change-Id: Ide5c011b40b4a4f031dd26ead08b5c8d5d299693
* clean-up libutils includesMathias Agopian2017-03-031-9/+2
| | | | | | | | | | | | moved Foo.h as first include of Foo.cpp, and removed redundant includes. Made NativeHandle non virtual. Test: run & compile Bug: n/a Change-Id: I37fa746cd42c9ba23aba181f84cb6c619386406a
* Use readdir instead of readdir_r.Elliott Hughes2016-09-281-9/+2
| | | | | | | http://elliotth.blogspot.com/2012/10/how-not-to-use-readdirr3.html Test: boots. Change-Id: If75532e24fe4d17743bf8e8c9590156dee378a63
* system/core: Cleanup direct calls to opendir by containing in aJames Hawkins2016-02-181-5/+3
| | | | | | | std::unique_ptr. Bug: 26643633 Change-Id: Ia3491fdbff086558da694ae949cf08e4c89d0307
* Fix windows 64-bit buildsDan Willemsen2016-02-051-2/+0
| | | | | | | | | | | | | | | pid_t is 64-bit in 64-bit mingw, but the windows process/thread functions return a DWORD(uint32_t). Instead of promoting to a pid_t and fixing the format strings, just use a uint32_t to store the values. android_thread_id also cannot be a 64-bit pointer, so for windows just force it to be a uint32_t. libutils/ProcessCallStack only works under Linux, since it makes heavy use of /proc. Don't compile it under Windows or Darwin. Bug: 26957718 Change-Id: I4e43e7cf18a96f22b3a9a08dbab8c3e960c12930
* Consistently use strerror in libutils.Elliott Hughes2015-06-301-8/+9
| | | | | | | | It's easier for people to debug, and side-steps the problem that errno values differ between architectures. Bug: http://b/17458391 Change-Id: I1db9b2cbb653839d3936b91e37e5cff02671318a
* libutils: Don't segfault ProcessCallStack when getting thread name failsIgor Murashkin2014-08-191-0/+5
| | | | | | | | | | | | | 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
* Move CallStack to libbacktrace.Christopher Ferris2013-11-061-6/+4
| | | | | | | Fix a small bug in the Printer for strings that didn't properly prepend the prefix. Change-Id: I33c63841ef6e07728ab3195886539d82b38ee19a
* utils: Fix broken sdk build on windowsIgor Murashkin2013-10-301-0/+2
| | | | | Bug: 11324229 Change-Id: Ia50e79b5e2430faea77b0c98902e8e018fb9ceff
* utils: Fix broken buildIgor Murashkin2013-10-301-0/+2
| | | | | Bug: 11324229 Change-Id: I7e4f514c5531e4c0c11bb0ba5d67e4dabbcd5792
* utils: Add ProcessCallStack to collect stack traces for all threads in a processIgor Murashkin2013-10-251-0/+256
- Also add a Printer class (print lines to logcat, fd, or strings) Bug: 11324229 Change-Id: I78435ed49aa196a0efb45bf9b2d58b62c41737d3