mirror of
https://github.com/lief-project/LIEF
synced 2026-06-08 15:30:44 +00:00
24 lines
536 B
C++
24 lines
536 B
C++
#pragma once
|
|
|
|
#include <nanobind/nanobind.h>
|
|
|
|
#include "LIEF/DWARF/DebugInfo.hpp"
|
|
#include "LIEF/PDB/DebugInfo.hpp"
|
|
|
|
namespace nanobind::detail {
|
|
template<> struct type_hook<LIEF::DebugInfo> {
|
|
static const std::type_info* get(const LIEF::DebugInfo *src) {
|
|
if (src) {
|
|
if (LIEF::dwarf::DebugInfo::classof(src)) {
|
|
return &typeid(LIEF::dwarf::DebugInfo);
|
|
}
|
|
|
|
if (LIEF::pdb::DebugInfo::classof(src)) {
|
|
return &typeid(LIEF::pdb::DebugInfo);
|
|
}
|
|
}
|
|
return &typeid(LIEF::dwarf::Type);
|
|
}
|
|
};
|
|
}
|