Commit Graph

4 Commits

Author SHA1 Message Date
Alastair Houghton
f6bfa7ef35 [Backtracing] Change the return type of one of the paths functions.
Since it's copying, it may as well return `char *` instead of
`const char *`.

rdar://103071801
2023-03-01 19:08:08 +00:00
Alastair Houghton
69bad8cb09 [Backtracing] Rename a couple of functions, some comment changes.
Renamed a couple of functions following review feedback.  Also added some
extra words to the comments.

rdar://103071801
2023-03-01 13:43:15 +00:00
Alastair Houghton
4b066d4868 [Backtracing] Update the comment for swift_getAuxiliaryExecutablePath()
This should have said how to release the string.

rdar://103071801
2023-03-01 13:43:15 +00:00
Alastair Houghton
f02f62f1e3 [Backtracing] Add support for looking up paths for auxiliary executables.
We need to be able to locate `swift-backtrace` relative to the current
location of the runtime library.

This needs to work:

* In a Swift build directory.
* On Darwin, where we're installed in /usr/lib/swift and /usr/libexec/swift.
* On Linux, where we're in /usr/lib/swift/linux and /usr/libexec/swift/linux.
* On Windows, where we may be in a flat directory layout (because of limitations
  of Windows DLL lookups).

rdar://103071801
2023-03-01 13:43:15 +00:00