We can use the mx-find-symbol
tool to find us entities with a given name.
% mx-find-symbol --db /tmp/xnu.db --name log
1152921504606847578 2305843009214783072 9241386477877723136 OSMetaClass::logError CXX_METHOD
1152921504606848236 2305843009214811859 9241386508063080448 std::__1::logical_and::operator() CXX_METHOD
1152921504606848236 2305843009214811869 9241386508073566208 std::__1::logical_not::operator() CXX_METHOD
1152921504606848236 2305843009214811880 9241386508085100544 std::__1::logical_or::operator() CXX_METHOD
1152921504606849802 2305843009214932112 9241386634157490176 IODTNVRAMDiags::logVariable CXX_METHOD
1152921504606847331 2305843009214759445 9243638252916703232 efi_aurr_extended_panic_log CXX_RECORD
1152921504606847386 2305843009214763552 9243638257223204864 log2phys CXX_RECORD
1152921504606847386 2305843009214767246 9243638261096644608 log2phys CXX_RECORD
1152921504606847386 2305843009214767396 9243638261253931008 log2phys CXX_RECORD
1152921504606847386 2305843009214779603 9243638274053898240 log2phys CXX_RECORD
1152921504606847386 2305843009214783872 9243638278530269184 log2phys CXX_RECORD
1152921504606848236 2305843009214811857 9243638307874668544 std::__1::logical_and CXX_RECORD
1152921504606848236 2305843009214811868 9243638307886202880 std::__1::logical_not CXX_RECORD
1152921504606848236 2305843009214811879 9243638307897737216 std::__1::logical_or CXX_RECORD
1152921504606848214 2305843009214813003 9243638309076336640 std::logic_error CXX_RECORD
1152921504606847920 2305843009214821817 9243638318318485504 std::__1::__log2 CXX_RECORD
1152921504606847386 2305843009214920881 9243638422194618368 log2phys CXX_RECORD
1152921504606847386 2305843009214936839 9243638438927794176 log2phys CXX_RECORD
1152921504606848236 2305843009214811857 9248141907502039040 std::__1::logical_and CLASS_TEMPLATE
1152921504606848236 2305843009214811868 9248141907513573376 std::__1::logical_not CLASS_TEMPLATE
1152921504606848236 2305843009214811879 9248141907525107712 std::__1::logical_or CLASS_TEMPLATE
1152921504606847920 2305843009214821817 9248141917945856000 std::__1::__log2 CLASS_TEMPLATE
1152921504606847920 2305843009214821807 9250393717749055488 std::__1::__log2_imp CLASS_TEMPLATE_PARTIAL_SPECIALIZATION
1152921504606847920 2305843009214821808 9250393717750104064 std::__1::__log2_imp CLASS_TEMPLATE_PARTIAL_SPECIALIZATION
1152921504606847920 2305843009214821810 9250393717752201216 std::__1::__log2_imp CLASS_TEMPLATE_PARTIAL_SPECIALIZATION
1152921504606847920 2305843009214821812 9250393717754298368 std::__1::__log2_imp CLASS_TEMPLATE_PARTIAL_SPECIALIZATION
...
The output follows the format of <file_id> <fragment_id> <entity_id> <fully_qualified_name>
. To find exact matches on the name, specify the --exact
parameter. Note that an entity's name and its fully qualified name are different. For example, searching for logican_and
with --exact
will return std::__1::logical_and
, as shown below:
% mx-find-symbol --db /tmp/xnu.db --name logical_and --exact
1152921504606848236 2305843009214811857 9243638307874668544 std::__1::logical_and CXX_RECORD
1152921504606848236 2305843009214811857 9248141907502039040 std::__1::logical_and CLASS_TEMPLATE
In the above, there are two such named entities: the class template, and its "pattern" class (the CXX_RECORD
).