[Backtracing] Add platform and architecture information.

It's useful to capture the platform and platform version with the image map.
Also, display both the platform and architecture information when generating
a crash log.

rdar://124913332
This commit is contained in:
Alastair Houghton
2025-01-27 15:44:28 +00:00
parent 432c138ccf
commit c9c5dc0de1
13 changed files with 414 additions and 38 deletions

View File

@@ -229,7 +229,7 @@ public struct Backtrace: CustomStringConvertible, Sendable {
}
/// The architecture of the system that captured this backtrace.
public var architecture: String
public internal(set) var architecture: String
/// The actual backtrace data, stored in Compact Backtrace Format.
var representation: [UInt8]
@@ -345,7 +345,7 @@ public struct Backtrace: CustomStringConvertible, Sendable {
/// Provide a textual version of the backtrace.
public var description: String {
var lines: [String] = []
var lines: [String] = ["Architecture: \(architecture)", ""]
var n = 0
for frame in frames {