SWDEV-356171 - Adding new Comgr mangled name fetching APIs

amd::Comgr::populate_mangled_names()
  amd::Comgr::get_mangled_name()

Change-Id: Ie6ebf3aae76632f7e7cfef3c90642b2e3cd10b48
Этот коммит содержится в:
Jacob Lambert
2022-10-06 08:52:18 -07:00
коммит произвёл Jacob Lambert
родитель a4fadb191a
Коммит 50d77d17fd
2 изменённых файлов: 13 добавлений и 0 удалений
+2
Просмотреть файл
@@ -113,6 +113,8 @@ bool Comgr::LoadLib(bool is_versioned) {
GET_COMGR_SYMBOL(amd_comgr_symbol_lookup)
GET_COMGR_SYMBOL(amd_comgr_symbol_get_info)
GET_COMGR_OPTIONAL_SYMBOL(amd_comgr_demangle_symbol_name)
GET_COMGR_SYMBOL(amd_comgr_populate_mangled_names)
GET_COMGR_SYMBOL(amd_comgr_get_mangled_name)
is_ready_ = true;
return true;
}
+11
Просмотреть файл
@@ -72,6 +72,8 @@ typedef amd_comgr_status_t (*t_amd_comgr_iterate_symbols)(amd_comgr_data_t data,
typedef amd_comgr_status_t (*t_amd_comgr_symbol_lookup)(amd_comgr_data_t data, const char *name, amd_comgr_symbol_t *symbol);
typedef amd_comgr_status_t (*t_amd_comgr_symbol_get_info)(amd_comgr_symbol_t symbol, amd_comgr_symbol_info_t attribute, void *value);
typedef amd_comgr_status_t (*t_amd_comgr_demangle_symbol_name)(amd_comgr_data_t MangledSymbolName, amd_comgr_data_t* DemangledSymbolName);
typedef amd_comgr_status_t (*t_amd_comgr_populate_mangled_names)(amd_comgr_data_t data, size_t *count);
typedef amd_comgr_status_t (*t_amd_comgr_get_mangled_name)(amd_comgr_data_t data, size_t index, size_t *size, char *mangled_name);
struct ComgrEntryPoints {
void* handle;
@@ -121,6 +123,8 @@ struct ComgrEntryPoints {
t_amd_comgr_symbol_lookup amd_comgr_symbol_lookup;
t_amd_comgr_symbol_get_info amd_comgr_symbol_get_info;
t_amd_comgr_demangle_symbol_name amd_comgr_demangle_symbol_name;
t_amd_comgr_populate_mangled_names amd_comgr_populate_mangled_names;
t_amd_comgr_get_mangled_name amd_comgr_get_mangled_name;
};
#ifdef COMGR_DYN_DLL
@@ -290,6 +294,13 @@ public:
#endif
return COMGR_DYN(amd_comgr_demangle_symbol_name)(MangledSymbolName, DemangledSymbolName);
}
static amd_comgr_status_t populate_mangled_names(amd_comgr_data_t data, size_t *count) {
return COMGR_DYN(amd_comgr_populate_mangled_names)(data, count);
}
static amd_comgr_status_t get_mangled_name(amd_comgr_data_t data, size_t index, size_t *size, char *mangled_name) {
return COMGR_DYN(amd_comgr_get_mangled_name)(data, index, size, mangled_name);
}
private:
static ComgrEntryPoints cep_;