Home
last modified time | relevance | path

Searched refs:string (Results 1 – 25 of 143) sorted by relevance

123456

/bionic/libc/malloc_debug/
DConfig.h78 const std::string& backtrace_dump_prefix() const { return backtrace_dump_prefix_; } in backtrace_dump_prefix()
100 const std::string& record_allocs_file() const { return record_allocs_file_; } in record_allocs_file()
109 bool (Config::*process_func)(const std::string&, const std::string&);
112 bool ParseValue(const std::string& option, const std::string& value, size_t default_value,
115 bool ParseValue(const std::string& option, const std::string& value, size_t min_value,
118 bool SetGuard(const std::string& option, const std::string& value);
119 bool SetFrontGuard(const std::string& option, const std::string& value);
120 bool SetRearGuard(const std::string& option, const std::string& value);
122 bool SetFill(const std::string& option, const std::string& value);
123 bool SetFillOnAlloc(const std::string& option, const std::string& value);
[all …]
DConfig.cpp71 const std::unordered_map<std::string, Config::OptionInfo> Config::kOptions = {
213 bool Config::ParseValue(const std::string& option, const std::string& value, size_t min_value, in ParseValue()
254 bool Config::ParseValue(const std::string& option, const std::string& value, size_t default_value, in ParseValue()
263 bool Config::SetGuard(const std::string& option, const std::string& value) { in SetGuard()
281 bool Config::SetFrontGuard(const std::string& option, const std::string& value) { in SetFrontGuard()
291 bool Config::SetRearGuard(const std::string& option, const std::string& value) { in SetRearGuard()
295 bool Config::SetFill(const std::string& option, const std::string& value) { in SetFill()
310 bool Config::SetFillOnAlloc(const std::string& option, const std::string& value) { in SetFillOnAlloc()
314 bool Config::SetFillOnFree(const std::string& option, const std::string& value) { in SetFillOnFree()
318 bool Config::SetBacktrace(const std::string& option, const std::string& value) { in SetBacktrace()
[all …]
/bionic/libc/upstream-openbsd/lib/libc/gen/
Dfnmatch.c144 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/
Dlinker_utils.h36 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);
Dlinker_config.cpp62 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 …]
Dlinker_config.h52 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>& allowed_libs() const { return allowed_libs_; } in allowed_libs()
107 void add_namespace_link(const std::string& ns_name, const std::string& shared_libs, in add_namespace_link()
[all …]
Dlinker_namespaces.h37 std::vector<std::string> fix_lib_paths(std::vector<std::string> paths);
44 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()
68 const std::unordered_set<std::string> shared_lib_sonames_;
91 const std::vector<std::string>& get_ld_library_paths() const { in get_ld_library_paths()
94 void set_ld_library_paths(std::vector<std::string>&& library_paths) { in set_ld_library_paths()
98 const std::vector<std::string>& get_default_library_paths() const { in get_default_library_paths()
101 void set_default_library_paths(std::vector<std::string>&& library_paths) { in set_default_library_paths()
104 void set_default_library_paths(const std::vector<std::string>& library_paths) { in set_default_library_paths()
108 const std::vector<std::string>& get_permitted_paths() const { in get_permitted_paths()
[all …]
Dlinker_utils.cpp39 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 …]
Dlinker_config_test.cpp110 static bool write_version(const std::string& path, uint32_t version) { in write_version()
111 std::string content = android::base::StringPrintf("%d", version); in write_version()
115 static std::vector<std::string> resolve_paths(std::vector<std::string> paths) { in resolve_paths()
116 std::vector<std::string> resolved_paths; in resolve_paths()
128 std::vector<std::string> expected_default_search_path; in run_linker_config_smoke_test()
129 std::vector<std::string> expected_default_permitted_path; in run_linker_config_smoke_test()
130 std::vector<std::string> expected_system_search_path; in run_linker_config_smoke_test()
131 std::vector<std::string> expected_system_permitted_path; in run_linker_config_smoke_test()
132 std::vector<std::string> expected_vndk_search_path; in run_linker_config_smoke_test()
174 std::string executable_path = std::string(tmp_dir.path) + "/some-binary"; in run_linker_config_smoke_test()
[all …]
Dlinker_logger.cpp45 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/
Dgwp_asan_test.cpp72 std::vector<std::pair<std::string, std::string>> props_to_restore_;
81 std::string path = testing::internal::GetArgvs()[0]; in SyspropRestorer()
87 std::vector<std::string> props = { in SyspropRestorer()
88 std::string("libc.debug.gwp_asan.sample_rate.") + basename, in SyspropRestorer()
89 std::string("libc.debug.gwp_asan.process_sampling.") + basename, in SyspropRestorer()
90 std::string("libc.debug.gwp_asan.max_allocs.") + basename, in SyspropRestorer()
104 std::string reset_log; in SyspropRestorer()
106 for (const std::string& prop : props) { in SyspropRestorer()
107 std::string value = GetSysprop(prop); in SyspropRestorer()
124 static std::string GetSysprop(const std::string& name) { in GetSysprop()
[all …]
D__cxa_thread_atexit_test.cpp23 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 …]
Ddl_test.cpp110 std::string usage_prefix = std::string("Usage: ") + path_to_linker; in TEST()
121 std::string helper = GetTestLibRoot() + "/exec_linker_helper"; in TEST()
122 std::string expected_output = in TEST()
137 std::string helper = GetTestLibRoot() + in TEST()
139 std::string expected_output = in TEST()
154 std::string error_message = "error: linker cannot load itself\n"; in TEST()
164 std::string helper = GetTestLibRoot() + "/preinit_syscall_test_helper"; in TEST()
174 std::string helper = GetTestLibRoot() + "/preinit_getauxval_test_helper"; in TEST()
187 std::string helper = GetTestLibRoot() + "/ld_preload_test_helper"; in TEST()
196 std::string helper = GetTestLibRoot() + "/ld_preload_test_helper"; in TEST()
[all …]
Ddlfcn_symlink_support.cpp39 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()
Dsystem_properties_test2.cpp47 const std::string property_prefix = ss.str(); in TEST()
48 const std::string property_name = property_prefix + "property1"; in TEST()
55 std::string long_value = "property-"; in TEST()
80 const std::string long_property_name = property_prefix + suffix; in TEST()
90 std::string expected_name = property_name; in TEST()
93 const std::string* expected_name = static_cast<const std::string*>(cookie); in TEST()
104 const std::string* expected_name = static_cast<const std::string*>(cookie); in TEST()
113 expected_name = std::string(property_name.c_str(), PROP_NAME_MAX-1); in TEST()
120 expected_name = std::string(long_property_name.c_str(), PROP_NAME_MAX-1); in TEST()
134 const std::string property_prefix = ss.str(); in TEST()
[all …]
Dmemtag_stack_dlopen_test.cpp47 std::string path = in TEST()
50 std::string ld_library_path = "LD_LIBRARY_PATH=" + android::base::GetExecutableDirectory(); in TEST()
65 std::string path = android::base::GetExecutableDirectory() + in TEST()
68 std::string ld_library_path = "LD_LIBRARY_PATH=" + android::base::GetExecutableDirectory(); in TEST()
84 std::string path = in TEST()
86 std::string lib_path = in TEST()
89 std::string ld_library_path = "LD_LIBRARY_PATH=" + android::base::GetExecutableDirectory(); in TEST()
105 std::string path = in TEST()
107 std::string lib_path = in TEST()
110 std::string ld_library_path = "LD_LIBRARY_PATH=" + android::base::GetExecutableDirectory(); in TEST()
Dsystem_properties_test.cpp71 std::string appcompat_path;
72 std::string mount_path;
73 std::string real_sysprop_dir = "/dev/__properties__";
522 std::vector<std::pair<std::string, std::string>> short_properties = { in TEST()
523 { "ro.0char", std::string() }, in TEST()
524 { "ro.50char", std::string(50, 'x') }, in TEST()
525 { "ro.91char", std::string(91, 'x') }, in TEST()
528 std::vector<std::pair<std::string, std::string>> long_properties = { in TEST()
529 { "ro.92char", std::string(92, 'x') }, in TEST()
530 { "ro.93char", std::string(93, 'x') }, in TEST()
[all …]
/bionic/tools/versioner/src/
DUtils.h30 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 …]
DSymbolFileParser.cpp35 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 …]
DUtils.cpp32 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()
DPreprocessor.cpp79 std::string arch_visibility_str; in calculateRequiredGuard()
113 static std::deque<std::string> readFileLines(const std::string& path) { in readFileLines()
115 std::deque<std::string> result; in readFileLines()
116 std::string line; in readFileLines()
125 static void writeFileLines(const std::string& path, const std::deque<std::string>& lines) { in writeFileLines()
132 for (const std::string& line : lines) { in writeFileLines()
139 static std::string generateGuardCondition(const DeclarationAvailability& avail) { in generateGuardCondition()
141 std::vector<std::string> expressions; in generateGuardCondition()
142 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 …]
DSymbolDatabase.cpp40 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()
DSymbolDatabase.h27 using LibrarySymbolDatabase = std::unordered_set<std::string>;
28 std::unordered_set<std::string> getSymbols(const std::string& filename);
35 using NdkSymbolDatabase = std::map<std::string, std::map<CompilationType, NdkSymbolType>>;
37 const std::string& platform_dir);
/bionic/benchmarks/tests/
Dinterface_test.cpp42 void Verify(const std::string& expected_output, int expected_exitcode,
45 std::string raw_output_;
46 std::string sanitized_output_;
52 static std::string GetBenchmarkExe() { in GetBenchmarkExe()
56 static std::string GetBionicXmlArg(const char* xml_file) { in GetBionicXmlArg()
89 const std::string exe(GetBenchmarkExe()); in Exec()
101 void SystemTests::Verify(const std::string& expected_output, in Verify()
145 const std::string exe(GetBenchmarkExe()); in TEST_F()
153 std::string expected = in TEST_F()
189 std::string output(raw_output_); in TEST_F()
[all …]
/bionic/benchmarks/
Dutil.h31 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;

123456