/bionic/libc/malloc_debug/ |
D | Config.h | 75 const std::string& backtrace_dump_prefix() const { return backtrace_dump_prefix_; } in backtrace_dump_prefix() 94 const std::string& record_allocs_file() const { return record_allocs_file_; } in record_allocs_file() 99 bool (Config::*process_func)(const std::string&, const std::string&); 102 bool ParseValue(const std::string& option, const std::string& value, size_t default_value, 105 bool ParseValue(const std::string& option, const std::string& value, size_t min_value, 108 bool SetGuard(const std::string& option, const std::string& value); 109 bool SetFrontGuard(const std::string& option, const std::string& value); 110 bool SetRearGuard(const std::string& option, const std::string& value); 112 bool SetFill(const std::string& option, const std::string& value); 113 bool SetFillOnAlloc(const std::string& option, const std::string& value); [all …]
|
D | Config.cpp | 71 const std::unordered_map<std::string, Config::OptionInfo> Config::kOptions = { 143 bool Config::ParseValue(const std::string& option, const std::string& value, size_t min_value, in ParseValue() 184 bool Config::ParseValue(const std::string& option, const std::string& value, size_t default_value, in ParseValue() 193 bool Config::SetGuard(const std::string& option, const std::string& value) { in SetGuard() 211 bool Config::SetFrontGuard(const std::string& option, const std::string& value) { in SetFrontGuard() 221 bool Config::SetRearGuard(const std::string& option, const std::string& value) { in SetRearGuard() 225 bool Config::SetFill(const std::string& option, const std::string& value) { in SetFill() 240 bool Config::SetFillOnAlloc(const std::string& option, const std::string& value) { in SetFillOnAlloc() 244 bool Config::SetFillOnFree(const std::string& option, const std::string& value) { in SetFillOnFree() 248 bool Config::SetBacktrace(const std::string& option, const std::string& value) { in SetBacktrace() [all …]
|
/bionic/libc/upstream-openbsd/lib/libc/gen/ |
D | fnmatch.c | 144 static int fnmatch_ch(const char **pattern, const char **string, int flags) in fnmatch_ch() argument 170 ++*string; in fnmatch_ch() 187 switch (classmatch(*pattern, **string, nocase, pattern)) { in fnmatch_ch() 220 if ((**string >= *startch) && (**string <= **pattern)) in fnmatch_ch() 223 (isupper((unsigned char)**string) || in fnmatch_ch() 226 (tolower((unsigned char)**string) >= in fnmatch_ch() 228 (tolower((unsigned char)**string) <= in fnmatch_ch() 237 if ((**string == **pattern)) in fnmatch_ch() 239 else if (nocase && (isupper((unsigned char)**string) || in fnmatch_ch() 241 (tolower((unsigned char)**string) == in fnmatch_ch() [all …]
|
/bionic/linker/ |
D | linker_config.cpp | 62 explicit ConfigParser(std::string&& content) in ConfigParser() 73 int next_token(std::string* name, std::string* value, std::string* error_msg) { in next_token() 74 std::string line; in next_token() 90 if (found_assign != std::string::npos && found_append == std::string::npos) { in next_token() 96 if (found_append != std::string::npos) { in next_token() 102 *error_msg = std::string("invalid format: ") + in next_token() 119 bool NextLine(std::string* line) { in NextLine() 120 if (p_ == std::string::npos) { in NextLine() 125 if (found != std::string::npos) { in NextLine() 130 p_ = std::string::npos; in NextLine() [all …]
|
D | linker_config_test.cpp | 97 static bool write_version(const std::string& path, uint32_t version) { in write_version() 98 std::string content = android::base::StringPrintf("%d", version); in write_version() 102 static std::vector<std::string> resolve_paths(std::vector<std::string> paths) { in resolve_paths() 103 std::vector<std::string> resolved_paths; in resolve_paths() 109 const std::vector<std::string> kExpectedDefaultSearchPath = in run_linker_config_smoke_test() 110 resolve_paths(is_asan ? std::vector<std::string>({ "/data", "/vendor/lib" ARCH_SUFFIX }) : in run_linker_config_smoke_test() 111 std::vector<std::string>({ "/vendor/lib" ARCH_SUFFIX })); in run_linker_config_smoke_test() 113 const std::vector<std::string> kExpectedDefaultPermittedPath = in run_linker_config_smoke_test() 114 resolve_paths(is_asan ? std::vector<std::string>({ "/data", "/vendor" }) : in run_linker_config_smoke_test() 115 std::vector<std::string>({ "/vendor/lib" ARCH_SUFFIX })); in run_linker_config_smoke_test() [all …]
|
D | linker_config.h | 52 NamespaceLinkConfig(const std::string& ns_name, const std::string& shared_libs, in NamespaceLinkConfig() 57 const std::string& ns_name() const { in ns_name() 61 const std::string& shared_libs() const { in shared_libs() 70 std::string ns_name_; 71 std::string shared_libs_; 77 explicit NamespaceConfig(const std::string& name) in NamespaceConfig() 93 const std::vector<std::string>& search_paths() const { in search_paths() 97 const std::vector<std::string>& permitted_paths() const { in permitted_paths() 101 const std::vector<std::string>& whitelisted_libs() const { in whitelisted_libs() 109 void add_namespace_link(const std::string& ns_name, const std::string& shared_libs, in add_namespace_link() [all …]
|
D | linker_utils.h | 36 void format_string(std::string* str, const std::vector<std::pair<std::string, std::string>>& params… 38 bool file_is_in_dir(const std::string& file, const std::string& dir); 39 bool file_is_under_dir(const std::string& file, const std::string& dir); 40 bool normalize_path(const char* path, std::string* normalized_path); 41 bool parse_zip_path(const char* input_path, std::string* zip_path, std::string* entry_path); 48 void resolve_paths(std::vector<std::string>& paths, 49 std::vector<std::string>* resolved_paths); 52 std::string resolve_path(const std::string& path); 54 void split_path(const char* path, const char* delimiters, std::vector<std::string>* paths); 56 std::string dirname(const char* path);
|
D | linker_namespaces.h | 37 std::vector<std::string> fix_lib_paths(std::vector<std::string> paths); 44 const std::unordered_set<std::string>& shared_lib_sonames, in android_namespace_link_t() 54 const std::unordered_set<std::string>& shared_lib_sonames() const { in shared_lib_sonames() 71 const std::unordered_set<std::string> shared_lib_sonames_; 94 const std::vector<std::string>& get_ld_library_paths() const { in get_ld_library_paths() 97 void set_ld_library_paths(std::vector<std::string>&& library_paths) { in set_ld_library_paths() 101 const std::vector<std::string>& get_default_library_paths() const { in get_default_library_paths() 104 void set_default_library_paths(std::vector<std::string>&& library_paths) { in set_default_library_paths() 107 void set_default_library_paths(const std::vector<std::string>& library_paths) { in set_default_library_paths() 111 const std::vector<std::string>& get_permitted_paths() const { in get_permitted_paths() [all …]
|
D | linker_utils.cpp | 39 void format_string(std::string* str, const std::vector<std::pair<std::string, std::string>>& params… in format_string() argument 43 if (pos == std::string::npos) break; in format_string() 45 const std::string& token = param.first; in format_string() 46 const std::string& replacement = param.second; in format_string() 63 std::string dirname(const char* path) { in dirname() 71 return std::string(path, last_slash - path); in dirname() 75 bool normalize_path(const char* path, std::string* normalized_path) { in normalize_path() 119 bool file_is_in_dir(const std::string& file, const std::string& dir) { in file_is_in_dir() 129 bool file_is_under_dir(const std::string& file, const std::string& dir) { in file_is_under_dir() 140 bool parse_zip_path(const char* input_path, std::string* zip_path, std::string* entry_path) { in parse_zip_path() [all …]
|
D | linker_logger.cpp | 45 static uint32_t ParseProperty(const std::string& value) { in ParseProperty() 50 std::vector<std::string> options = android::base::Split(value, ","); in ParseProperty() 78 std::string process_name = (process_name_end != nullptr) ? in GetAppSpecificProperty() 79 … std::string(process_name_start, (process_name_end - process_name_start)) : in GetAppSpecificProperty() 80 std::string(process_name_start); in GetAppSpecificProperty() 82 std::string property_name = std::string("debug.ld.app.") + process_name; in GetAppSpecificProperty()
|
/bionic/tests/ |
D | __cxa_thread_atexit_test.cpp | 23 static std::string class_with_dtor_output; 27 void set_message(const std::string& msg) { in set_message() 35 std::string message; 41 class_with_dtor.set_message(*static_cast<std::string*>(arg)); in thread_nop() 46 std::string msg("dtor called."); in TEST() 55 void set_message(const std::string& msg) { in set_message() 63 std::string message; 79 std::string* call_sequence = static_cast<std::string*>(arg); in thread_atexit_fn1() 84 std::string* call_sequence = static_cast<std::string*>(arg); in thread_atexit_fn2() 89 std::string* call_sequence = static_cast<std::string*>(arg); in thread_atexit_from_atexit() [all …]
|
D | dl_test.cpp | 116 std::string usage_prefix = std::string("Usage: ") + path_to_linker; in TEST() 127 std::string helper = GetTestlibRoot() + in TEST() 129 std::string expected_output = in TEST() 143 std::string helper = GetTestlibRoot() + in TEST() 145 std::string expected_output = in TEST() 159 std::string error_message = "error: linker cannot load itself\n"; in TEST() 169 std::string helper = GetTestlibRoot() + in TEST() 181 std::string helper = GetTestlibRoot() + in TEST() 196 std::string helper = GetTestlibRoot() + in TEST() 207 std::string helper = GetTestlibRoot() + in TEST() [all …]
|
D | dlfcn_symlink_support.cpp | 39 const std::string suffix = std::string("/") + source_file_name; in dl_callback() 48 std::string* path = reinterpret_cast<std::string*>(data); in dl_callback() 56 void create_dlfcn_test_symlink(const char* suffix, std::string* result) { in create_dlfcn_test_symlink() 58 std::string source_file_path; in create_dlfcn_test_symlink() 69 std::string path_dir = dirname(&buf[0]); in create_dlfcn_test_symlink() 70 std::string link_path = path_dir + "/" + symlink_name_prefix + suffix + ".so"; in create_dlfcn_test_symlink() 76 void remove_dlfcn_test_symlink(const std::string& path) { in remove_dlfcn_test_symlink()
|
D | system_properties_test2.cpp | 51 const std::string property_prefix = ss.str(); in TEST() 52 const std::string property_name = property_prefix + "property1"; in TEST() 59 std::string long_value = "property-"; in TEST() 84 const std::string long_property_name = property_prefix + suffix; in TEST() 94 std::string expected_name = property_name; in TEST() 97 const std::string* expected_name = static_cast<const std::string*>(cookie); in TEST() 108 const std::string* expected_name = static_cast<const std::string*>(cookie); in TEST() 117 expected_name = std::string(property_name.c_str(), PROP_NAME_MAX-1); in TEST() 124 expected_name = std::string(long_property_name.c_str(), PROP_NAME_MAX-1); in TEST() 138 const std::string property_prefix = ss.str(); in TEST() [all …]
|
D | system_properties_test.cpp | 448 std::vector<std::pair<std::string, std::string>> short_properties = { in TEST() 449 { "ro.0char", std::string() }, in TEST() 450 { "ro.50char", std::string(50, 'x') }, in TEST() 451 { "ro.91char", std::string(91, 'x') }, in TEST() 454 std::vector<std::pair<std::string, std::string>> long_properties = { in TEST() 455 { "ro.92char", std::string(92, 'x') }, in TEST() 456 { "ro.93char", std::string(93, 'x') }, in TEST() 457 { "ro.1000char", std::string(1000, 'x') }, in TEST() 461 const std::string& name = property.first; in TEST() 462 const std::string& value = property.second; in TEST() [all …]
|
/bionic/tools/versioner/src/ |
D | SymbolFileParser.cpp | 35 using TagList = std::vector<std::string>; 38 std::string name; 45 std::string name; 46 std::string base; 53 SymbolFileParser(const std::string& path, const CompilationType& type) in SymbolFileParser() 89 std::string line; in hasNextLine() 96 if (hash_pos != std::string::npos) { in hasNextLine() 108 static std::vector<std::string> parseTags(const std::string& tags_line) { in parseTags() 109 std::vector<std::string> tags = android::base::Split(tags_line, " \t"); in parseTags() 118 std::string::size_type lparen_pos = curr_line.find('{'); in parseVersion() [all …]
|
D | Utils.h | 30 std::string getWorkingDir(); 31 std::vector<std::string> collectHeaders(const std::string& directory, 32 const std::unordered_set<std::string>& ignored_directories); 34 static inline std::string dirname(const std::string& path) { in dirname() 39 static inline bool is_directory(const std::string& path) { in is_directory() 47 static inline bool mkdirs(const std::string& path) { in mkdirs() 52 std::string parent = dirname(path); in mkdirs() 71 static inline std::string to_string(const char* c) { in to_string() 75 static inline const std::string& to_string(const std::string& str) { in to_string() 80 static inline std::string Join(Collection c, const std::string& delimiter = ", ") { [all …]
|
D | Preprocessor.cpp | 79 std::string arch_visibility_str; in calculateRequiredGuard() 112 static std::deque<std::string> readFileLines(const std::string& path) { in readFileLines() 114 std::deque<std::string> result; in readFileLines() 115 std::string line; in readFileLines() 124 static void writeFileLines(const std::string& path, const std::deque<std::string>& lines) { in writeFileLines() 131 for (const std::string& line : lines) { in writeFileLines() 138 static std::string generateGuardCondition(const DeclarationAvailability& avail) { in generateGuardCondition() 140 std::vector<std::string> expressions; in generateGuardCondition() 141 static const std::vector<std::pair<std::string, std::set<Arch>>> arch_sets = { in generateGuardCondition() 146 std::map<Arch, std::string> individual_archs = { in generateGuardCondition() [all …]
|
D | Utils.cpp | 32 std::string getWorkingDir() { in getWorkingDir() 40 std::vector<std::string> collectHeaders(const std::string& directory, in collectHeaders() 41 … const std::unordered_set<std::string>& ignored_directories) { in collectHeaders() 42 std::vector<std::string> headers; in collectHeaders() 74 std::string path = ent->fts_path; in collectHeaders() 85 llvm::StringRef StripPrefix(llvm::StringRef string, llvm::StringRef prefix) { in StripPrefix() argument 86 if (string.startswith(prefix)) { in StripPrefix() 87 return string.drop_front(prefix.size()); in StripPrefix() 89 return string; in StripPrefix()
|
D | SymbolDatabase.cpp | 40 std::unordered_set<std::string> getSymbols(const std::string& filename) { in getSymbols() 41 std::unordered_set<std::string> result; in getSymbols() 67 static std::map<std::string, NdkSymbolType> parsePlatform(const CompilationType& type, in parsePlatform() 68 const std::string& platform_dir) { in parsePlatform() 74 std::map<std::string, NdkSymbolType> result; in parsePlatform() 77 std::string path = platform_dir + "/" + filename; in parsePlatform() 106 const std::string& platform_dir) { in parsePlatforms() 109 std::map<std::string, NdkSymbolType> symbols = parsePlatform(type, platform_dir); in parsePlatforms()
|
D | DeclarationDatabase.h | 63 std::string to_string(const AvailabilityValues& av); 96 std::string to_string(const DeclarationAvailability& decl_av); 112 std::string filename; 121 std::string to_string(const Location& loc); 124 std::string name; 138 void dump(const std::string& base_path = "", FILE* out = stdout, unsigned indent = 0) const { 139 std::string indent_str(indent, ' '); 167 std::string name; 181 void dump(const std::string& base_path = "", FILE* out = stdout) const { 202 std::map<std::string, Symbol> symbols; [all …]
|
/bionic/benchmarks/tests/ |
D | interface_test.cpp | 42 void Verify(const std::string& expected_output, int expected_exitcode, 45 std::string raw_output_; 46 std::string sanitized_output_; 60 static std::string GetBionicXmlArg(const char* xml_file) { in GetBionicXmlArg() 104 void SystemTests::Verify(const std::string& expected_output, in Verify() 156 std::string expected = in TEST_F() 188 std::string output(raw_output_); in TEST_F() 197 std::string expected = in TEST_F() 206 std::string expected = in TEST_F() 224 std::string expected = in TEST_F() [all …]
|
/bionic/benchmarks/ |
D | util.h | 31 extern std::map<std::string, std::pair<benchmark_func_t, std::string>> g_str_to_func; 33 …ribute__((unused)) EmplaceBenchmark(const std::string& fn_name, benchmark_func_t fn_ptr, const std… 35 g_str_to_func.emplace(std::string(fn_name), std::make_pair(fn_ptr, arg)); 41 …int _bionic_benchmark_##n __attribute__((unused)) = EmplaceBenchmark(std::string(#n), reinterpret_… 44 …int _bionic_benchmark_##n __attribute__((unused)) = EmplaceBenchmark(std::string(#n), reinterpret_… 59 std::string xmlpath; 60 std::vector<std::string> extra_benchmarks;
|
/bionic/libc/ |
D | Android.bp | 153 // some of this code runs before ifunc resolvers have made string.h functions work, so compile with 196 // from the linker before ifunc resolvers have made string.h functions available. 236 // Use the empty string (instead of " ") as the timezone abbreviation 297 "upstream-freebsd/lib/libc/string/wcpcpy.c", 298 "upstream-freebsd/lib/libc/string/wcpncpy.c", 299 "upstream-freebsd/lib/libc/string/wcscasecmp.c", 300 "upstream-freebsd/lib/libc/string/wcscat.c", 301 "upstream-freebsd/lib/libc/string/wcschr.c", 302 "upstream-freebsd/lib/libc/string/wcscmp.c", 303 "upstream-freebsd/lib/libc/string/wcscpy.c", [all …]
|
/bionic/libc/malloc_debug/tests/ |
D | malloc_debug_config_tests.cpp | 42 std::string usage_string( 51 std::string log_msg("6 malloc_debug malloc_testing: unknown option unknown_option\n"); in TEST_F() 59 std::string log_msg("6 malloc_debug malloc_testing: unknown option unknown_option\n"); in TEST_F() 67 std::string log_msg("6 malloc_debug malloc_testing: bad value for option 'backtrace'\n"); in TEST_F() 75 std::string log_msg( in TEST_F() 84 std::string log_msg( in TEST_F() 94 std::string log_msg( in TEST_F() 104 std::string log_msg( in TEST_F() 114 std::string log_msg( in TEST_F() 299 std::string log_msg( in TEST_F() [all …]
|