"...promptdiffusion/pipeline_prompt_diffusion.py" did not exist on "57fde871e117090fc766cc36caddf605f7c72465"
process.h 556 Bytes
Newer Older
Antoine Kaufmann's avatar
Antoine Kaufmann committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <map>
#include <set>
#include <string>

class sym_map {
  protected:
    bool filter_en;
    bool insmap_en;
    std::set<std::string> filter;

  public:
    std::map<uint64_t, std::string> map;
    std::map<uint64_t, std::string> map_ins;

    void add_filter(const std::string &sym);
    void load_file(const char *path, uint64_t offset = 0);

    inline const std::string *lookup(uint64_t addr)
    {
        auto it = map.find(addr);
        if (it == map.end())
            return nullptr;

        return &it->second;
    }
};