void info(int to, void *to_arg) { erts_memory(&to, to_arg, NULL, THE_NON_VALUE); atom_info(to, to_arg); module_info(to, to_arg); export_info(to, to_arg); register_info(to, to_arg); erts_fun_info(to, to_arg); erts_node_table_info(to, to_arg); erts_dist_table_info(to, to_arg); erts_allocated_areas(&to, to_arg, NULL); erts_allocator_info(to, to_arg); }
installer::error copy_files_from_updates() { wchar_t this_module_name[1024]; if (!::GetModuleFileName(0, this_module_name, 1024)) return installer::error(errorcode::get_module_name, QString("get this module name")); QFileInfo module_info(QString::fromUtf16((const ushort*) this_module_name)); QDir update_dir = module_info.absoluteDir(); update_dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks); QFileInfoList files_list = update_dir.entryInfoList(); for (int i = 0; i < files_list.size(); ++i) { QFileInfo file_info = files_list.at(i); QString file_path = file_info.absoluteFilePath(); if (file_path != module_info.absoluteFilePath()) { file_path = QDir::toNativeSeparators(file_path); QString new_file_name = QDir::toNativeSeparators(get_install_folder() + "/" + file_info.fileName()); for (int i = 0; i < 10; ++i) { if (::MoveFileEx((const wchar_t*) file_path.utf16(), (const wchar_t*) new_file_name.utf16(), MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING)) break; ::Sleep(500); } } } return installer::error(); }
void mapfile_apply(list_t* names) { TCHAR* undecorated; ULONG total = 0, filtered = 0, applied = 0, addr; int err, result; name_t* nm, *nm_last; list_t* rmtable; module_t* module = module_info(&err); if (!err) { Addtolist(0, 0, "Applying names from map file to module '%s'", module->name); if (!g_Config->collisionchecks) { rmtable = list_create(); } nm = (name_t*)names->first; while (nm) { if (nm->segment < module->nseg) { if (g_Config->demangle) { undecorated = (TCHAR*)malloc(2 * nm->size * sizeof(TCHAR)); if (result = Demanglename(nm->buffer, NM_LIBRARY, undecorated)) { free(nm->buffer); nm->size = result + 1; nm->buffer = undecorated; } else { free(undecorated); } } addr = module->base + module->segments[nm->segment] + nm->offset; if (g_Config->usemasks) { if (result = mask_filter(nm)) { filtered++; if ((result & FILTER_SKIP) && !g_Config->collisionchecks && /* Findname for NM_ANYNAME fails everytime, dunno why */ (Findname(addr, NM_COMMENT, NULL) || Findname(addr, NM_LABEL, NULL))) { list_addname(rmtable, NULL, 0, nm->segment, nm->offset); total++; nm = nm->next; continue; } } } if (g_Config->comments) { if (g_Config->collisionchecks) { if (!Findname(addr, NM_COMMENT, NULL) && !Quickinsertname(addr, NM_COMMENT, nm->buffer)) { applied++; } } else if (!Quickinsertname(addr, NM_COMMENT, nm->buffer)) { applied++; } } if (g_Config->labels) { if (g_Config->collisionchecks) { if (!Findlabel(addr, NULL) && !Quickinsertname(addr, NM_LABEL, nm->buffer)) { applied++; } } else if (!Quickinsertname(addr, NM_LABEL, nm->buffer)) { applied++; } } } total++; Progress(total * 1000 / names->count, "Inserting names"); nm = nm->next; } Progress(0, ""); Infoline("Merging names"); Mergequicknames(); if (!g_Config->collisionchecks) { Infoline("Cleaning skipped entries"); nm = (name_t*)rmtable->first; while (nm) { addr = module->base + module->segments[nm->segment] + nm->offset; if (g_Config->comments) { Insertname(addr, NM_COMMENT, ""); } if (g_Config->labels) { Insertname(addr, NM_LABEL, ""); } nm_last = nm; nm = nm->next; /* Manual list_freenames expansion to speed it up somehow */ free(nm_last); } } Infoline("Total loaded: %d, Names applied: %d, Names filtered: %d", total, applied, filtered); Addtolist(0, -1, " Total loaded: %d, Names applied: %d, Names filtered: %d", total, applied, filtered); module_free(module); } else { module_error(err); } }
void BDrum::GetModuleInfo(ModuleInfo *ptr) { module_info(ptr); }
void TB303::GetModuleInfo(ModuleInfo *ptr) { module_info(ptr); }