mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
6894862ef2
Refactor the binary import and dependency resolution infrastructure to support multiple platforms (Linux, Windows, macOS) via a configuration-driven root system. Major changes: * Overhaul PDB and DWARF importers for platform-aware debug info loading. * Refactor LDDTree into a template-based architecture with platform-specific implementations (ELF, PE/COFF). * Mostly rewrite the PDB importer, which had significant limitations.
26 lines
699 B
C++
26 lines
699 B
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "llvm/Support/Path.h"
|
|
#include "llvm/Support/Process.h"
|
|
|
|
#include "revng/Support/Assert.h"
|
|
#include "revng/Support/Debug.h"
|
|
#include "revng/Support/ProgramRunner.h"
|
|
|
|
inline Logger DILogger("dwarf-importer");
|
|
|
|
inline int runFetchDebugInfo(llvm::StringRef FullPath, bool Verbose) {
|
|
if (llvm::sys::Process::GetEnv("REVNG_NO_FETCH_DEBUG_INFO"))
|
|
return 1;
|
|
|
|
revng_assert(::Runner.isProgramAvailable("revng"));
|
|
std::vector<std::string> Args{ "model", "fetch-debuginfo", FullPath.str() };
|
|
if (Verbose)
|
|
Args.insert(Args.begin(), "--verbose");
|
|
return ::Runner.run("revng", Args);
|
|
}
|