@@ -5,7 +5,8 @@ export ObjectHandle, SectionRef, SymbolRef, debugsections
5
5
6
6
export printfield, printentry, printfield_with_color, deref,
7
7
sectionaddress, sectionoffset, sectionsize, sectionname,
8
- load_strtab, readmeta, StrTab, symname, Sections, symbolvalue
8
+ load_strtab, readmeta, StrTab, symname, Sections, symbolvalue,
9
+ isundef
9
10
10
11
import Base: read, seek, readbytes, position, show, showcompact
11
12
@@ -123,12 +124,6 @@ deref(section::Section) = section
123
124
abstract SymbolRef{T<: ObjectHandle }
124
125
abstract SymtabEntry{T<: ObjectHandle }
125
126
126
- function symname
127
- end
128
- function symbolvalue
129
- end
130
-
131
- symbolnum (x:: SymbolRef ) = symbolnum (deref (x))
132
127
133
128
"""
134
129
The size of the actual data contained in the section. This should exclude any
@@ -157,6 +152,15 @@ function load_strtab
157
152
end
158
153
@mustimplement strtab_lookup (s:: StrTab , offset)
159
154
155
+ # Symbol properties
156
+ function symname
157
+ end
158
+ function symbolvalue
159
+ end
160
+
161
+ symbolnum (x:: SymbolRef ) = symbolnum (deref (x))
162
+ isundef (x:: SymbolRef ) = isundef (deref (x))
163
+
160
164
# ################################ Utilities ####################################
161
165
162
166
typealias SectionOrRef{T} Union{Section{T},SectionRef{T}}
@@ -192,8 +196,8 @@ immutable DebugSections{T<:ObjectHandle, Sect}
192
196
debug_ranges:: Maybe{Sect}
193
197
debug_str:: Maybe{Sect}
194
198
debug_types:: Maybe{Sect}
195
-
196
199
end
200
+ handle (dbgs:: DebugSections ) = dbgs. oh
197
201
198
202
function DebugSections {T} (oh:: T ; debug_abbrev = nothing , debug_aranges = nothing ,
199
203
debug_frame = nothing , debug_info = nothing , debug_line = nothing ,
0 commit comments