diff options
author | Tom Cherry | 2017-10-12 11:53:41 -0500 |
---|---|---|
committer | Gerrit Code Review | 2017-10-12 11:53:41 -0500 |
commit | 4a5a337ef24dd61f69952b405a9b914bdf2ff7d4 (patch) | |
tree | 949d88f2ff48b46472ca188b1835150fec35c27f /debuggerd | |
parent | 96e8042e415cfcb35b6fcc9b2781bf089184410f (diff) | |
parent | 31121cafecefdd8153563632fc717a930598bd7c (diff) | |
download | platform-system-core-4a5a337ef24dd61f69952b405a9b914bdf2ff7d4.tar.gz platform-system-core-4a5a337ef24dd61f69952b405a9b914bdf2ff7d4.tar.xz platform-system-core-4a5a337ef24dd61f69952b405a9b914bdf2ff7d4.zip |
Merge "Move some properties users to __system_property_read_callback()"
Diffstat (limited to 'debuggerd')
-rw-r--r-- | debuggerd/libdebuggerd/tombstone.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/debuggerd/libdebuggerd/tombstone.cpp b/debuggerd/libdebuggerd/tombstone.cpp index d134cf22f..6fb29a938 100644 --- a/debuggerd/libdebuggerd/tombstone.cpp +++ b/debuggerd/libdebuggerd/tombstone.cpp | |||
@@ -35,12 +35,12 @@ | |||
35 | #include <string> | 35 | #include <string> |
36 | 36 | ||
37 | #include <android-base/file.h> | 37 | #include <android-base/file.h> |
38 | #include <android-base/properties.h> | ||
38 | #include <android-base/stringprintf.h> | 39 | #include <android-base/stringprintf.h> |
39 | #include <android-base/unique_fd.h> | 40 | #include <android-base/unique_fd.h> |
40 | #include <android/log.h> | 41 | #include <android/log.h> |
41 | #include <backtrace/Backtrace.h> | 42 | #include <backtrace/Backtrace.h> |
42 | #include <backtrace/BacktraceMap.h> | 43 | #include <backtrace/BacktraceMap.h> |
43 | #include <cutils/properties.h> | ||
44 | #include <log/log.h> | 44 | #include <log/log.h> |
45 | #include <log/logprint.h> | 45 | #include <log/logprint.h> |
46 | #include <private/android_filesystem_config.h> | 46 | #include <private/android_filesystem_config.h> |
@@ -53,6 +53,8 @@ | |||
53 | #include "libdebuggerd/machine.h" | 53 | #include "libdebuggerd/machine.h" |
54 | #include "libdebuggerd/open_files_list.h" | 54 | #include "libdebuggerd/open_files_list.h" |
55 | 55 | ||
56 | using android::base::GetBoolProperty; | ||
57 | using android::base::GetProperty; | ||
56 | using android::base::StringPrintf; | 58 | using android::base::StringPrintf; |
57 | 59 | ||
58 | #define STACK_WORDS 16 | 60 | #define STACK_WORDS 16 |
@@ -206,14 +208,11 @@ static const char* get_sigcode(int signo, int code) { | |||
206 | } | 208 | } |
207 | 209 | ||
208 | static void dump_header_info(log_t* log) { | 210 | static void dump_header_info(log_t* log) { |
209 | char fingerprint[PROPERTY_VALUE_MAX]; | 211 | auto fingerprint = GetProperty("ro.build.fingerprint", "unknown"); |
210 | char revision[PROPERTY_VALUE_MAX]; | 212 | auto revision = GetProperty("ro.revision", "unknown"); |
211 | 213 | ||
212 | property_get("ro.build.fingerprint", fingerprint, "unknown"); | 214 | _LOG(log, logtype::HEADER, "Build fingerprint: '%s'\n", fingerprint.c_str()); |
213 | property_get("ro.revision", revision, "unknown"); | 215 | _LOG(log, logtype::HEADER, "Revision: '%s'\n", revision.c_str()); |
214 | |||
215 | _LOG(log, logtype::HEADER, "Build fingerprint: '%s'\n", fingerprint); | ||
216 | _LOG(log, logtype::HEADER, "Revision: '%s'\n", revision); | ||
217 | _LOG(log, logtype::HEADER, "ABI: '%s'\n", ABI_STRING); | 216 | _LOG(log, logtype::HEADER, "ABI: '%s'\n", ABI_STRING); |
218 | } | 217 | } |
219 | 218 | ||
@@ -724,9 +723,7 @@ static void dump_crash(log_t* log, BacktraceMap* map, BacktraceMap* map_new, | |||
724 | const std::string& process_name, const std::map<pid_t, std::string>& threads, | 723 | const std::string& process_name, const std::map<pid_t, std::string>& threads, |
725 | uintptr_t abort_msg_address) { | 724 | uintptr_t abort_msg_address) { |
726 | // don't copy log messages to tombstone unless this is a dev device | 725 | // don't copy log messages to tombstone unless this is a dev device |
727 | char value[PROPERTY_VALUE_MAX]; | 726 | bool want_logs = GetBoolProperty("ro.debuggable", false); |
728 | property_get("ro.debuggable", value, "0"); | ||
729 | bool want_logs = (value[0] == '1'); | ||
730 | 727 | ||
731 | _LOG(log, logtype::HEADER, | 728 | _LOG(log, logtype::HEADER, |
732 | "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n"); | 729 | "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n"); |