-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop using shell #74
Stop using shell #74
Conversation
@@ -153,11 +153,7 @@ public class StackSymbolicator { | |||
let strs = addrsArray.map { String($0 + addition, radix: 16) } | |||
try! strs.joined(separator: "\n").write(toFile: addrsFile, atomically: true, encoding: .utf8) | |||
|
|||
let arch = try? safeShellWithOutput("/usr/bin/file \"\(binary)\"").contains("arm64e") ? "arm64e" : "arm64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The arch flag doesn't seem to be needed as long as it isn't a universal binary, and this wasn't making an effort to pick the right arch from a universal binary anyways
@@ -153,11 +153,7 @@ public class StackSymbolicator { | |||
let strs = addrsArray.map { String($0 + addition, radix: 16) } | |||
try! strs.joined(separator: "\n").write(toFile: addrsFile, atomically: true, encoding: .utf8) | |||
|
|||
let arch = try? safeShellWithOutput("/usr/bin/file \"\(binary)\"").contains("arm64e") ? "arm64e" : "arm64" | |||
|
|||
try! strs.joined(separator: "\n").write(toFile: addrsFile, atomically: true, encoding: .utf8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was already written on line 154
task.executableURL = URL(fileURLWithPath: executable) | ||
task.standardInput = nil | ||
|
||
let group = DispatchGroup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can you share the pipe processing logic with safeShellWithOutput()
?
84d9887
to
22283fb
Compare
No description provided.