mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Backtracing] Fix symbol lookup on Linux.
Also removed a spurious `print()` that got left in by accident, and disabled the `CodableBacktrace.swift` test on Linux since we need Foundation and we don't have it there. rdar://124913332
This commit is contained in:
@@ -415,8 +415,6 @@ extension Backtrace {
|
||||
memoryReader: memoryReader)
|
||||
|
||||
if let limit = limit {
|
||||
print("limit = \(limit), offset = \(offset), top = \(top)")
|
||||
|
||||
let limited = LimitSequence(unwinder,
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
|
||||
@@ -1156,13 +1156,13 @@ struct ElfSymbolTable<SomeElfTraits: ElfTraits>: ElfSymbolTableProtocol {
|
||||
nextValue = _symbols[mid + 1].value
|
||||
}
|
||||
|
||||
if symbol.value <= address && nextValue >= address {
|
||||
if symbol.value <= address && nextValue > address {
|
||||
var ndx = mid
|
||||
while ndx > 0 && _symbols[ndx - 1].value == address {
|
||||
ndx -= 1
|
||||
}
|
||||
return _symbols[ndx]
|
||||
} else if symbol.value < address {
|
||||
} else if symbol.value <= address {
|
||||
min = mid + 1
|
||||
} else if symbol.value > address {
|
||||
max = mid
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: backtracing
|
||||
// REQUIRES: OS=macosx || OS=linux-gnu
|
||||
// REQUIRES: OS=macosx
|
||||
|
||||
// UNSUPPORTED: use_os_stdlib
|
||||
// UNSUPPORTED: back_deployment_runtime
|
||||
|
||||
Reference in New Issue
Block a user