diff options
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/stack.c.gen | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/build-aux/stack.c.gen b/build-aux/stack.c.gen index 2a23565..3ef5628 100755 --- a/build-aux/stack.c.gen +++ b/build-aux/stack.c.gen @@ -353,7 +353,7 @@ def main( # The sbc-harness codebase ####################################### - vcalls: dict[str, set[str]] = {} + objcalls: dict[str, set[str]] = {} re_vtable_start = re.compile(r"_vtable\s*=\s*\{") re_vtable_entry = re.compile(r"^\s+\.(?P<meth>\S+)\s*=\s*(?P<impl>\S+),.*") for fname in c_fnames: @@ -367,9 +367,9 @@ def main( impl = m.group("impl") if impl == "NULL": continue - if m.group("meth") not in vcalls: - vcalls[meth] = set() - vcalls[meth].add(impl) + if m.group("meth") not in objcalls: + objcalls[meth] = set() + objcalls[meth].add(impl) if "}" in line: in_vtable = False elif re_vtable_start.search(line): @@ -401,14 +401,16 @@ def main( typ = m.group("typ") lib9p_msgs.add(typ) - re_call_vcall = re.compile(r"VCALL\((?P<obj>[^,]+), (?P<meth>[^,)]+)[,)].*") + re_call_objcall = re.compile( + r"(?:VCALL|LO_CALL)\((?P<obj>[^,]+), (?P<meth>[^,)]+)[,)].*" + ) def sbc_indirect_callees(loc: str, line: str) -> list[str] | None: if "/3rd-party/" in loc: return None - if m := re_call_vcall.fullmatch(line): - if m.group("meth") in vcalls: - return sorted(vcalls[m.group("meth")]) + if m := re_call_objcall.fullmatch(line): + if m.group("meth") in objcalls: + return sorted(objcalls[m.group("meth")]) return [f"__indirect_call:{m.group('obj')}->vtable->{m.group('meth')}"] if "trigger->cb(trigger->cb_arg)" in line: return [ |