• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2 // -*- Mode: C++ -*-
3 //
4 // Copyright (C) 2021 Oracle, Inc.
5 //
6 // Author: Jose E. Marchesi
7 
8 /// @file
9 ///
10 /// This file contains the declarations of the entry points to
11 /// de-serialize an instance of @ref abigail::corpus from a file in
12 /// elf format, containing CTF information.
13 
14 #ifndef __ABG_CTF_READER_H__
15 #define __ABG_CTF_READER_H__
16 
17 #include <ostream>
18 #include "abg-corpus.h"
19 #include "abg-suppression.h"
20 #include "abg-elf-reader-common.h"
21 
22 #include "ctf-api.h"
23 
24 namespace abigail
25 {
26 namespace ctf_reader
27 {
28 
29 class read_context;
30 typedef shared_ptr<read_context> read_context_sptr;
31 
32 read_context_sptr
33 create_read_context(const std::string& elf_path,
34                     const vector<char**>& debug_info_root_paths,
35                     ir::environment *env);
36 corpus_sptr
37 read_corpus(read_context *ctxt, elf_reader::status& status);
38 
39 corpus_sptr
40 read_corpus(const read_context_sptr &ctxt, elf_reader::status &status);
41 
42 corpus_sptr
43 read_and_add_corpus_to_group_from_elf(read_context*, corpus_group&, elf_reader::status&);
44 
45 void
46 set_read_context_corpus_group(read_context& ctxt, corpus_group_sptr& group);
47 
48 void
49 reset_read_context(read_context_sptr &ctxt,
50                    const std::string&	elf_path,
51                    const vector<char**>& debug_info_root_path,
52                    ir::environment*	environment);
53 std::string
54 dic_type_key(ctf_dict_t *dic, ctf_id_t ctf_type);
55 } // end namespace ctf_reader
56 } // end namespace abigail
57 
58 #endif // ! __ABG_CTF_READER_H__
59