mirror of https://github.com/Nonannet/copapy.git
fix
This commit is contained in:
parent
bfbe2a290a
commit
c4ca95bd61
|
|
@ -163,10 +163,12 @@ class stencil_database():
|
||||||
"""Returns machine code for a specified function name"""
|
"""Returns machine code for a specified function name"""
|
||||||
func = self.elf.symbols[name]
|
func = self.elf.symbols[name]
|
||||||
assert func.info == 'STT_FUNC', f"{name} is not a function"
|
assert func.info == 'STT_FUNC', f"{name} is not a function"
|
||||||
index = get_last_call_in_function(func)
|
|
||||||
if part == 'start':
|
if part == 'start':
|
||||||
|
index = get_last_call_in_function(func)
|
||||||
return func.data[:index]
|
return func.data[:index]
|
||||||
elif part == 'end':
|
elif part == 'end':
|
||||||
|
index = get_last_call_in_function(func)
|
||||||
return func.data[index + LENGTH_CALL_INSTRUCTION:]
|
return func.data[index + LENGTH_CALL_INSTRUCTION:]
|
||||||
else:
|
else:
|
||||||
return func.data
|
return func.data
|
||||||
Loading…
Reference in New Issue