mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
Merge branch 'master' of github.com:justinian/jsix
This commit is contained in:
@@ -19,16 +19,19 @@ def parse_syms(infile):
|
|||||||
representing the symbols in the text segment of the binary. Returns
|
representing the symbols in the text segment of the binary. Returns
|
||||||
a list of (address, symbol_name)."""
|
a list of (address, symbol_name)."""
|
||||||
|
|
||||||
from cxxfilt import demangle
|
from cxxfilt import demangle, InvalidName
|
||||||
|
|
||||||
syms = []
|
syms = []
|
||||||
for line in sys.stdin:
|
for line in sys.stdin:
|
||||||
addr, t, mangled = line.split()
|
addr, t, mangled = line.split()
|
||||||
if t not in "tTvVwW": continue
|
if t not in "tTvVwW": continue
|
||||||
|
|
||||||
|
try:
|
||||||
addr = int(addr, base=16)
|
addr = int(addr, base=16)
|
||||||
name = demangle(mangled)
|
name = demangle(mangled)
|
||||||
syms.append((addr, name))
|
syms.append((addr, name))
|
||||||
|
except InvalidName:
|
||||||
|
pass
|
||||||
|
|
||||||
return sorted(syms)
|
return sorted(syms)
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ file::load(uefi::memory_type mem_type)
|
|||||||
m_file->read(&size, data),
|
m_file->read(&size, data),
|
||||||
L"Could not read from file");
|
L"Could not read from file");
|
||||||
|
|
||||||
return { .data = data, .size = size };
|
return { .size = size, .data = data };
|
||||||
}
|
}
|
||||||
|
|
||||||
file
|
file
|
||||||
|
|||||||
Reference in New Issue
Block a user