[18/27] {dwarf,btf,ctf}-reader: Set the origin of the corpus group
Commit Message
Hello,
Apart from the ABIXML reader, readers don't set the origin of a corpus
group when its read. Oops. Fixed thus.
* src/abg-btf-reader.cc (reader::read_corpus): Set the origin of
the corpus group being read.
* src/abg-ctf-reader.cc (reader::read_corpus): Likewise.
* src/abg-dwarf-reader.cc (reader::read_debug_info_into_corpus):
Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-btf-reader.cc | 5 +++++
src/abg-ctf-reader.cc | 5 +++++
src/abg-dwarf-reader.cc | 5 +++++
3 files changed, 15 insertions(+)
@@ -515,6 +515,11 @@ public:
corpus::origin origin = corpus()->get_origin();
origin |= corpus::BTF_ORIGIN;
corpus()->set_origin(origin);
+ if (corpus_group())
+ {
+ origin |= corpus_group()->get_origin();
+ corpus_group()->set_origin(origin);
+ }
if ((status & STATUS_NO_SYMBOLS_FOUND)
|| !(status & STATUS_OK))
@@ -693,6 +693,11 @@ public:
corpus::origin origin = corpus()->get_origin();
origin |= corpus::CTF_ORIGIN;
corp->set_origin(origin);
+ if (corpus_group())
+ {
+ origin |= corpus_group()->get_origin();
+ corpus_group()->set_origin(origin);
+ }
slurp_elf_info(status);
if (status & fe_iface::STATUS_NO_SYMBOLS_FOUND)
@@ -2262,6 +2262,11 @@ public:
corpus::origin origin = corpus()->get_origin();
origin |= corpus::DWARF_ORIGIN;
corpus()->set_origin(origin);
+ if (corpus_group())
+ {
+ origin |= corpus_group()->get_origin();
+ corpus_group()->set_origin(origin);
+ }
if (origin & corpus::LINUX_KERNEL_BINARY_ORIGIN
&& !env().user_set_analyze_exported_interfaces_only())