mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-16 15:04:46 +00:00
dwarf-reader: Create new corpus unconditionally
The DWARF reader appears to create a new corpus object only if one is not already present. However, the only case where there can be multiple corpora is when build_corpus_group_from_kernel_dist_under is called and this function clears down the reader context, including the current corpus, between reading ELF objects. So it's clearer to just create a fresh corpus object unconditionally in the DWARF reader. * src/abg-dwarf-reader.cc (read_debug_info_into_corpus): Create new corpus object unconditionally. Signed-off-by: Giuliano Procida <gprocida@google.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
519d7ce8e5
commit
5ccbfd4f29
@ -14251,14 +14251,7 @@ static corpus_sptr
|
||||
read_debug_info_into_corpus(read_context& ctxt)
|
||||
{
|
||||
ctxt.clear_per_corpus_data();
|
||||
|
||||
if (!ctxt.current_corpus())
|
||||
{
|
||||
corpus_sptr corp (new corpus(ctxt.env(), ctxt.elf_path()));
|
||||
ctxt.current_corpus(corp);
|
||||
if (!ctxt.env())
|
||||
ctxt.env(corp->get_environment());
|
||||
}
|
||||
ctxt.current_corpus(std::make_shared<corpus>(ctxt.env(), ctxt.elf_path()));
|
||||
|
||||
// First set some mundane properties of the corpus gathered from
|
||||
// ELF.
|
||||
|
Loading…
Reference in New Issue
Block a user