Update get_addr_by_attr.cpp