Skip to content

Commit aa10b3a

Browse files
committed
[Backtracing][WIP] Add some debug to track down problem in Linux CI.
1 parent 7fcd48a commit aa10b3a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

stdlib/public/Backtracing/Backtrace.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ public struct Backtrace: CustomStringConvertible, Sendable {
547547
var endOfText: Address = range.low
548548

549549
if let image = try? Elf32Image(source: subSource) {
550+
print("\(path) is an ELF32 image")
550551
theUUID = image.uuid
551552

552553
for hdr in image.programHeaders {
@@ -556,6 +557,7 @@ public struct Backtrace: CustomStringConvertible, Sendable {
556557
}
557558
}
558559
} else if let image = try? Elf64Image(source: subSource) {
560+
print("\(path) is an ELF64 image")
559561
theUUID = image.uuid
560562

561563
for hdr in image.programHeaders {
@@ -566,6 +568,7 @@ public struct Backtrace: CustomStringConvertible, Sendable {
566568
}
567569
} else {
568570
// Not a valid ELF image
571+
print("\(path) is not an ELF image")
569572
continue
570573
}
571574

stdlib/public/Backtracing/SymbolicatedBacktrace.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ public struct SymbolicatedBacktrace: CustomStringConvertible {
479479
where: { address >= $0.baseAddress
480480
&& address < $0.endOfText }
481481
) {
482+
482483
let relativeAddress = address - FileImageSource.Address(theImages[imageNdx].baseAddress)
483484
var symbol: Symbol = Symbol(imageIndex: imageNdx,
484485
imageName: theImages[imageNdx].name,

0 commit comments

Comments
 (0)