Skip to content

Commit b18bbbf

Browse files
committed
Forgot some utilities to move
1 parent a6adc86 commit b18bbbf

File tree

1 file changed

+2
-34
lines changed

1 file changed

+2
-34
lines changed

src/ObjFileBase.jl

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -221,42 +221,10 @@ end
221221

222222
export findindexbyname, findcubyname
223223

224-
function findindexbyname(x::DebugSections,name;
225-
pubtable=read(x.oh, deref(x.debug_pubnames), DWARF.PUBTable))
226-
symbols = map(y->map(x->x.name,y.entries),pubtable.sets)
227-
for i = 1:length(symbols)
228-
ind = findfirst(symbols[i],name)
229-
if ind != 0
230-
return (i,ind)
231-
end
232-
end
233-
return (0,0)
234-
end
235-
236-
function findcubyname(x::DebugSections, name;
237-
pubtable = read(x.oh, deref(x.debug_pubnames), DWARF.PUBTable))
238-
(si,ei) = findindexbyname(x, name; pubtable = pubtable)
239-
if si == ei == 0
240-
error("Not Found")
241-
end
242-
read(x.oh,deref(x.debug_info),pubtable.sets[si],DWARF.DWARFCUHeader)
243-
end
244-
245-
function finddietreebyname(x::DebugSections, name;
246-
pubtable = read(x.oh, deref(x.debug_pubnames), DWARF.PUBTable))
247-
(si,ei) = findindexbyname(x, name; pubtable = pubtable)
248-
if si == ei == 0
249-
error("Not Found")
250-
end
251-
pubset = pubtable.sets[si]
252-
pubentry = pubset.entries[ei]
253-
cu = read(x.oh,deref(x.debug_info),pubset,DWARF.DWARFCUHeader)
254-
d = read(x.oh,deref(x.debug_info),deref(x.debug_abbrev),pubset,pubentry,
255-
cu,DWARF.DIETree)
224+
function findindexbyname
256225
end
257226

258-
function read(x::DebugSections, ::Type{DWARF.ARTableSet})
259-
read(x.oh, deref(x.debug_aranges), DWARF.ARTableSet)
227+
function findcubyname
260228
end
261229

262230
# Utils

0 commit comments

Comments
 (0)