Kaynağa Gözat

Raise exception on ambiguous vtable entries

nosoop 11 ay önce
ebeveyn
işleme
7f23452ab7
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 4 1
      src/smgdc/vtable.py

+ 4 - 1
src/smgdc/vtable.py

@@ -124,7 +124,10 @@ def get_vtables_from_address(
             if matched_overload:
                 function_list.append(VTableFunction(table_index, matched_overload))
                 continue
-        function_list.append(VTableFunction(table_index, None))
+        # TODO: we need to resolve a symbol here; otherwise we can't correctly handle this
+        vt_name = itanium_demangler.parse(vt.name)
+        candidate_names = set(sym.name for sym in fnsyms)
+        raise Exception(f"Ambiguity in {vt_name} position {n}; candidates {candidate_names}")
 
     return [
         list(vfn.sym for vfn in vtbl)