public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: Ben Woodard <woodard@redhat.com>
Cc: Dodji Seketeli <dodji@redhat.com>,  libabigail@sourceware.org
Subject: Re: [PATCH 1/1, RFC] Make Front Ends first class citizens
Date: Wed, 16 Nov 2022 17:53:07 +0100	[thread overview]
Message-ID: <87o7t6on7w.fsf@redhat.com> (raw)
In-Reply-To: <4ea03406-a9c9-7bc8-aeaf-cdcba82ef42a@redhat.com> (Ben Woodard's message of "Mon, 31 Oct 2022 09:02:09 -0700")

Ben Woodard <woodard@redhat.com> writes:

> Overall sounds like a good logical design.

Thanks!

[...]


>> That class provides properties and behaviours that are shared by all
>> front-ends that libabigail supports today.  Namely, that class
>> provides access to (properties of) the ABI corpus, corpus groups,
>
> I follow you up to to the point where you get to corpus groups. It is
> not immediately obvious to me why corpus groups are included there. To 
> me corpus groups are some sort of container of corpuses (or corpora -
> if you speak latin) not something that lives inside corpus fe_iface.

That paragraph is poorly worded, at least.  I have updated it in the
newer version of the patch that I'll be posting soon.

What I wanted to say is that the ABI being built by the front-end is
accessible from the front end interface.

That ABI being built is either a corpus or a corpus group, depending on
the binary we are looking at.

In general, we are only interested in an ABI corpus.  Corpus groups are
for cases where we are looking at, for instance, an application that
loads plugins, like the Xorg server, the Gimp application or something
like the Apache web server or, the Linux Kernel (vmlinux + modules).

[...]

>> Lastly, there is an ABIXML front-end which class is named
>> abigail::abixml_reader::reader.  It inherits the abigail::fe_iface
>> class directly.  Note that unlike the two previous front-ends, this
>> one doesn't inherit the elf_based_reader base class, for reasons that
>> should be obvious to the astute reader by now.  So, this front-end
>> implements the abigail::fe_iface::load_corpus() abstract interface to
>> load the properties for the ABI corpus represented in the ABIXML
>> format, construct the internal representation and pass it to the
>> middle-end for further analysis.
>
> How about just calling it just abigail::abixml.

I ended up putting it into the abigail::abixml namespace, indeed.  It's
called abigail::abixml::reader now, in the next version of the patch.

> There is also a abixml writer backend, and I think that having all
> that code in in one place would be good.

I haven't re-organized backends, as I haven't thought about those yet.
I guess when people come up with, for instance, another ABI
serialization format that is worth supporting, the question of
supporting several of those will arise.

Thank you for mentioning that topic.

> Furthermore, abixml isn't always the most handy format. It is
> certainly not very compact. If CTF or BTF are all that they claim to
> be, then maybe having a binary file format using them would be more
> compact. The thing is to make CTF and BTF stand alone and usable by
> other tools you would need to have a simple ELF wrapper around them
> similar to the .gnu_reflink split DWARF format for debuginfo. So it
> would probably make sense to have abigail::elf_based_handler (renamed
> from elf_based_reader) and then have the classes which can write
> multiple inherit from another abstract class like abigail::be-iface
> which contained the writing functions. Having the reading and writing
> code in the same class would be a clean design.

Yeah, we will see.

[...]

Thanks a lot for your review.  I'll be sending out a new version of the
patchset with the update;

Cheers,

-- 
		Dodji


  reply	other threads:[~2022-11-16 17:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 15:12 [PATCH 0/1] Make front-ends be first class in the libabigail framework Dodji Seketeli
2022-10-25 15:19 ` [PATCH 1/1, RFC] Make Front Ends first class citizens Dodji Seketeli
2022-10-31 16:02   ` Ben Woodard
2022-11-16 16:53     ` Dodji Seketeli [this message]
2022-11-01 10:49   ` Giuliano Procida
2022-11-01 23:32     ` Ben Woodard
2022-11-04 10:23       ` Giuliano Procida
2022-11-16 16:39     ` Dodji Seketeli
2022-11-17  8:30       ` Giuliano Procida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7t6on7w.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=libabigail@sourceware.org \
    --cc=woodard@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).