forked from OSchip/llvm-project
parent
500e99639d
commit
8aae9557d6
|
@ -17,6 +17,7 @@ pipes = {}
|
||||||
filetypes = {}
|
filetypes = {}
|
||||||
DEBUG=False
|
DEBUG=False
|
||||||
|
|
||||||
|
|
||||||
def fix_filename(file_name):
|
def fix_filename(file_name):
|
||||||
for path_to_cut in sys.argv[1:]:
|
for path_to_cut in sys.argv[1:]:
|
||||||
file_name = re.sub(".*" + path_to_cut, "", file_name)
|
file_name = re.sub(".*" + path_to_cut, "", file_name)
|
||||||
|
@ -116,12 +117,18 @@ def symbolize_atos(line):
|
||||||
else:
|
else:
|
||||||
print line.rstrip()
|
print line.rstrip()
|
||||||
|
|
||||||
system = os.uname()[0]
|
|
||||||
if system in ['Linux', 'Darwin']:
|
def main():
|
||||||
for line in sys.stdin:
|
system = os.uname()[0]
|
||||||
if system == 'Linux':
|
if system in ['Linux', 'Darwin']:
|
||||||
symbolize_addr2line(line)
|
for line in sys.stdin:
|
||||||
elif system == 'Darwin':
|
if system == 'Linux':
|
||||||
symbolize_atos(line)
|
symbolize_addr2line(line)
|
||||||
else:
|
elif system == 'Darwin':
|
||||||
print 'Unknown system: ', system
|
symbolize_atos(line)
|
||||||
|
else:
|
||||||
|
print 'Unknown system: ', system
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|
Loading…
Reference in New Issue