Skip to content

Commit 8701fce

Browse files
Load additional segment in order for swift-inpect to work
1 parent 16fbda8 commit 8701fce

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Sources/MemtoolCore/Session.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public final class ProcessSession: Session {
139139
}
140140

141141
/// Symbol types, that are resolved against the base address of their file and their location.
142-
public static let sectionsToResolve: Set<KnownSymbolSection> = [.bss, .data, .data1, .rodata, .rodata1, .text]
142+
public static let sectionsToResolve: Set<KnownSymbolSection> = [.bss, .data, .data1, .rodata, .rodata1, .text, .dataRelRo]
143143

144144
/// Loads symbols for executable files and computes their location in the LAP of the
145145
/// remote process. Fills `unloadedSymbols` and `symbols`.

Sources/MemtoolCore/Symbols/SymbolRegion.swift

+2
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ public enum KnownSymbolSection: String {
339339
case data = ".data"
340340
/// Initialized program memory
341341
case data1 = ".data1"
342+
/// For reference: https://stackoverflow.com/questions/7029734/what-is-the-data-rel-ro-used-for
343+
case dataRelRo = ".data.rel.ro"
342344
case debug = ".debug"
343345
case dtors = ".dtors"
344346
case `dynamic` = ".dynamic"

0 commit comments

Comments
 (0)