Home
last modified time | relevance | path

Searched refs:line (Results 1 – 25 of 51) sorted by relevance

123

/bionic/libc/tools/
Dgenserv.py43 for line in f.xreadlines():
44 if len(line) > 0 and line[-1] == "\n":
45 line = line[:-1]
46 if len(line) > 0 and line[-1] == "\r":
47 line = line[:-1]
49 line = string.strip(line)
50 if len(line) == 0 or line[0] == "#":
53 m = re_service.match(line)
70 line = '/* generated by genserv.py - do not edit */\nstatic const char _services[] = "\\\n' variable
72 line += str(s)+"\\\n"
[all …]
Dgenerate-NOTICE.py91 for line in lines[start:end]:
92 line = line.replace("\t", " ")
93 line = line.replace("/* ", "")
94 line = re.sub("^ \* ", "", line)
95 line = line.replace("** ", "")
96 line = line.replace("# ", "")
97 if "SPDX-License-Identifier:" in line:
99 if line.startswith("++Copyright++"):
101 line = line.replace("--Copyright--", "")
102 line = line.rstrip()
[all …]
Dgensyscalls.py320 def parse_line(self, line): argument
326 pos_lparen = line.find('(')
329 E("missing left parenthesis in '%s'" % line)
332 pos_rparen = line.rfind(')')
334 E("missing or misplaced right parenthesis in '%s'" % line)
337 return_type = line[:pos_lparen].strip().split()
339 E("missing return type in '%s'" % line)
351 E("misplaced colon in '%s'" % line)
362 E("misplaced colon2 in '%s'" % line)
380 syscall_params = line[pos_lparen+1:pos_rparen].split(',')
[all …]
Dsymbols.py25 for line in f.read().splitlines():
26 symbols.add(line)
45 for line in output.split('\n'):
46 if ' HIDDEN ' in line or ' UND ' in line:
48 m = r.match(line)
Dcheck-symbols.py33 for line in open(path, 'r'):
34 symbols.add(line.rstrip())
57 for line in subprocess.check_output(['readelf', '-W', '--dyn-syms', so_file]).split('\n'):
58 m = r.match(line)
Dgenseccomp.py45 for line in f:
46 m = format_re.match(line)
53 logging.debug('Failed to parse %s from %s', (line, file_path))
94 for line in f:
95 m = constant_re.match(line)
106 logging.debug('Failed to parse %s', line)
/bionic/libc/kernel/tools/
Dkernel.py77 def checkInclude(self, line, from_file, kernel_root=None): argument
79 m = HeaderScanner.re_combined.match(line)
81 m = HeaderScanner.re_rel_dir.match(line)
121 for line in f:
122 if (HeaderScanner.re_combined.match(line) or
123 (kernel_root and HeaderScanner.re_rel_dir.match(line))):
303 def parseLine(self,line): argument
304 line = string.strip(line)
307 if len(line) == 0 or line[0] == "#":
310 m = ConfigParser.re_CONFIG_.match(line)
[all …]
Dcpp.py176 if self.start.line < other.line < self.end.line:
179 elif self.start.line == other.line == self.end.line:
182 elif self.start.line == other.line:
186 elif other.line == self.end.line:
298 def __init__(self, line): argument
300 self.parseString(line)
324 token_list.append((token.id, token.location.line,
411 print "%d:%d: %s" % (tok.location.line, tok.location.column, msg)
636 line = "(" + op
638 line += " %d)" % e[1]
[all …]
/bionic/libc/malloc_debug/
DUnwindBacktrace.cpp92 …std::string line = android::base::StringPrintf(" #%0zd pc %" PAD_PTR " ", i, info->rel_… in UnwindLog() local
94 line += android::base::StringPrintf("(offset 0x%" PRIx64 ") ", map_info->offset); in UnwindLog()
98 line += android::base::StringPrintf("<anonymous:%" PRIx64 ">", map_info->start); in UnwindLog()
100 line += map_info->name; in UnwindLog()
104 line += " ("; in UnwindLog()
107 line += demangled_name; in UnwindLog()
110 line += info->function_name; in UnwindLog()
113 line += "+" + std::to_string(info->function_offset); in UnwindLog()
115 line += ")"; in UnwindLog()
117 error_log_string(line.c_str()); in UnwindLog()
DRecordData.cpp141 std::string line = entries_[i]->GetString(); in Dump() local
142 ssize_t bytes = write(dump_fd, line.c_str(), line.length()); in Dump()
143 if (bytes == -1 || static_cast<size_t>(bytes) != line.length()) { in Dump()
/bionic/libc/bionic/
Dgrp_pwd_file.cpp260 bool MmapFile::Find(Line* line, Predicate predicate) { in Find() argument
270 line_beginning = ParseLine(line_beginning, end, line->fields, line->kNumFields); in Find()
274 if (strncmp(line->fields[0], required_prefix_, strlen(required_prefix_)) != 0) { in Find()
276 CopyFieldToString(name, line->fields[0], sizeof(name)); in Find()
283 if (predicate(line)) return true; in Find()
290 bool MmapFile::FindById(uid_t uid, Line* line) { in FindById() argument
291 return Find(line, [uid](const auto& line) { in FindById() argument
293 if (!FieldToUid(line->fields[2], &line_id)) { in FindById()
302 bool MmapFile::FindByName(const char* name, Line* line) { in FindByName() argument
303 return Find(line, [name](const auto& line) { in FindByName() argument
[all …]
Dassert.cpp35 void __assert(const char* file, int line, const char* failed_expression) { in __assert() argument
36 async_safe_fatal("%s:%d: assertion \"%s\" failed", file, line, failed_expression); in __assert()
39 void __assert2(const char* file, int line, const char* function, const char* failed_expression) { in __assert2() argument
40 async_safe_fatal("%s:%d: %s: assertion \"%s\" failed", file, line, function, failed_expression); in __assert2()
Dsysinfo.cpp68 char* line = nullptr; in get_nprocs() local
70 if (getline(&line, &len, fp) != -1) { in get_nprocs()
71 cpu_count = GetCpuCountFromString(line); in get_nprocs()
72 free(line); in get_nprocs()
Dpthread_attr.cpp163 char line[BUFSIZ]; in __get_main_stack_startstack() local
164 if (fgets(line, sizeof(line), fp) == nullptr) { in __get_main_stack_startstack()
175 const char* end_of_comm = strrchr(line, ')'); in __get_main_stack_startstack()
208 char line[BUFSIZ]; in __pthread_attr_getstack_main_thread() local
209 while (fgets(line, sizeof(line), fp) != nullptr) { in __pthread_attr_getstack_main_thread()
211 if (sscanf(line, "%" SCNxPTR "-%" SCNxPTR, &lo, &hi) == 2) { in __pthread_attr_getstack_main_thread()
Derror.cpp76 void error_at_line(int status, int error, const char* file, unsigned int line, const char* fmt, ...… in error_at_line() argument
80 if (last_line == line && last_file != nullptr && strcmp(last_file, file) == 0) { in error_at_line()
84 last_line = line; in error_at_line()
88 fprintf(stderr, "%s:%d: ", file, line); in error_at_line()
Dgrp_pwd_file.h43 bool FindById(uid_t uid, Line* line);
45 bool FindByName(const char* name, Line* line);
61 bool Find(Line* line, Predicate predicate);
/bionic/tests/
Dlibgen_basename_test.cpp44 static void __TestGnuBasename(const char* in, const char* expected_out, int line) { in __TestGnuBasename() argument
47 ASSERT_STREQ(expected_out, out) << "(" << line << "): " << in << std::endl; in __TestGnuBasename()
48 ASSERT_EQ(0, errno) << "(" << line << "): " << in << std::endl; in __TestGnuBasename()
51 static void __TestPosixBasename(const char* in, const char* expected_out, int line) { in __TestPosixBasename() argument
55 ASSERT_STREQ(expected_out, out) << "(" << line << "): " << in << std::endl; in __TestPosixBasename()
56 ASSERT_EQ(0, errno) << "(" << line << "): " << in << std::endl; in __TestPosixBasename()
Dutils.h103 char line[BUFSIZ]; in parse_maps() local
104 while (fgets(line, sizeof(line), fp.get()) != nullptr) { in parse_maps()
109 if (sscanf(line, "%" SCNxPTR "-%" SCNxPTR " %4s %" SCNxPTR " %x:%x %lu %n", in parse_maps()
126 record.pathname = line + path_offset; in parse_maps()
/bionic/tools/versioner/src/
DPreprocessor.cpp115 std::string line; in readFileLines() local
117 while (std::getline(is, line)) { in readFileLines()
118 result.push_back(std::move(line)); in readFileLines()
131 for (const std::string& line : lines) { in writeFileLines() local
132 os << line << "\n"; in writeFileLines()
242 unsigned current_line = start.line; in findNextSemicolon()
249 .line = current_line, in findNextSemicolon()
260 errx(1, "failed to find semicolon starting from %u:%u", start.line, start.column); in findNextSemicolon()
288 ++current_location.line; in mergeGuards()
293 if (current_location.column == file_lines[current_location.line - 1].length()) { in mergeGuards()
[all …]
DDeclarationDatabase.h99 unsigned line; member
103 return std::tie(line, column) < std::tie(rhs.line, rhs.column);
107 return std::tie(line, column) == std::tie(rhs.line, rhs.column);
151 location.start.line, location.start.column);
DSymbolFileParser.cpp89 std::string line; in hasNextLine() local
90 while (std::getline(file, line)) { in hasNextLine()
93 size_t hash_pos = line.find('#'); in hasNextLine()
94 curr_line = android::base::Trim(line.substr(0, hash_pos)); in hasNextLine()
97 curr_tags = parseTags(line.substr(hash_pos + 1)); in hasNextLine()
/bionic/tools/
Dgenerate-version-script.py19 for line in fin:
20 index = line.find("#")
22 tags = line[index+1:].split()
25 fout.write(line)
/bionic/benchmarks/
Dstdio_benchmark.cpp28 char line[256]; in FillFile() local
29 memset(line, 'x', sizeof(line)); in FillFile()
30 line[sizeof(line) - 1] = '\0'; in FillFile()
33 for (size_t i = 0; i < 4096; ++i) fputs(line, fp); in FillFile()
134 char* line = nullptr; in FopenGetlineFclose() local
136 while (getline(&line, &n, fp) != -1) { in FopenGetlineFclose()
138 free(line); in FopenGetlineFclose()
242 static int ParseMap(const char* line, const char* /*fmt*/, uintptr_t* start, uintptr_t* end, in ParseMap() argument
245 const char* old_str = line; in ParseMap()
291 *name_pos = (str - line); in ParseMap()
/bionic/linker/
Dlinker_config.cpp74 std::string line; in next_token() local
75 while(NextLine(&line)) { in next_token()
76 size_t found = line.find('#'); in next_token()
77 line = android::base::Trim(line.substr(0, found)); in next_token()
79 if (line.empty()) { in next_token()
83 if (line[0] == '[' && line.back() == ']') { in next_token()
84 *name = line.substr(1, line.size() - 2); in next_token()
88 size_t found_assign = line.find('='); in next_token()
89 size_t found_append = line.find("+="); in next_token()
91 *name = android::base::Trim(line.substr(0, found_assign)); in next_token()
[all …]
/bionic/benchmarks/linker_relocation/regen/
Ddump_relocs.py70 for line in out:
71 m = re.search(r'\(SONAME\)\s+Library soname: \[(.+)\]$', line)
84 for line in out:
85 m = re.search(r'\(NEEDED\)\s+Shared library: \[(.+)\]$', line)
116 for line in out:
117 m = kSymbolMatcher.match(line)
121 if 'Symbol table of .gnu.hash for image:' in line:
155 for line in out:
156 m = kRelocationMatcher.match(line)

123