mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
Create symbols also on Linux platform
This commit is contained in:
@@ -9,7 +9,7 @@ mingw_path: C:/Qt/Tools/mingw530_32/bin
|
|||||||
|
|
||||||
[Linux]
|
[Linux]
|
||||||
qt_path: /opt/Qt
|
qt_path: /opt/Qt
|
||||||
dump_syms:
|
dump_syms: /usr/local/bin/dump_syms
|
||||||
|
|
||||||
[Darwin]
|
[Darwin]
|
||||||
qt_path: /Applications/Qt
|
qt_path: /Applications/Qt
|
||||||
|
|||||||
@@ -349,9 +349,6 @@ class LinuxBuilder(Builder):
|
|||||||
def _get_qt_component(self):
|
def _get_qt_component(self):
|
||||||
return 'gcc'
|
return 'gcc'
|
||||||
|
|
||||||
def _should_create_symbols(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def __init__(self, config_file, word_size):
|
def __init__(self, config_file, word_size):
|
||||||
Builder.__init__(self, config_file, word_size)
|
Builder.__init__(self, config_file, word_size)
|
||||||
|
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ class Dumper:
|
|||||||
self.output_pid(sys.stderr, ' '.join(cmd))
|
self.output_pid(sys.stderr, ' '.join(cmd))
|
||||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
||||||
stderr=open(os.devnull, 'wb'))
|
stderr=open(os.devnull, 'wb'))
|
||||||
module_line = proc.stdout.next()
|
module_line = proc.stdout.readline().decode("utf-8")
|
||||||
if module_line.startswith("MODULE"):
|
if module_line.startswith("MODULE"):
|
||||||
# MODULE os cpu guid debug_file
|
# MODULE os cpu guid debug_file
|
||||||
(guid, debug_file) = (module_line.split())[3:5]
|
(guid, debug_file) = (module_line.split())[3:5]
|
||||||
@@ -307,7 +307,8 @@ class Dumper:
|
|||||||
f = open(full_path, "w")
|
f = open(full_path, "w")
|
||||||
f.write(module_line)
|
f.write(module_line)
|
||||||
# now process the rest of the output
|
# now process the rest of the output
|
||||||
for line in proc.stdout:
|
for line_as_bytes in proc.stdout:
|
||||||
|
line = line_as_bytes.decode("utf-8")
|
||||||
if line.startswith("FILE"):
|
if line.startswith("FILE"):
|
||||||
# FILE index filename
|
# FILE index filename
|
||||||
(x, index, filename) = line.rstrip().split(None, 2)
|
(x, index, filename) = line.rstrip().split(None, 2)
|
||||||
@@ -422,7 +423,8 @@ class DumperLinux(Dumper):
|
|||||||
if not Dumper.should_process(self, file_name):
|
if not Dumper.should_process(self, file_name):
|
||||||
return False
|
return False
|
||||||
if file_name.endswith(".so") or os.access(file_name, os.X_OK):
|
if file_name.endswith(".so") or os.access(file_name, os.X_OK):
|
||||||
return self.run_file_command(file_name).startswith("ELF")
|
if not os.path.islink(file_name) and self.run_file_command(file_name).startswith("ELF"):
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user