public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: "Guillermo E. Martinez" <guillermo.e.martinez@oracle.com>,
	"Jose E. Marchesi" <jose.marchesi@oracle.com>
Cc: libabigail@sourceware.org
Subject: [PATCH 0/1] Make front-ends be first class in the libabigail framework
Date: Tue, 25 Oct 2022 17:12:53 +0200	[thread overview]
Message-ID: <87lep4os22.fsf@redhat.com> (raw)

Hello,

I have been exploring the idea of making front-ends in libabigail be
first class citizens.

The goal of this change is  twofold:

First, it's to improve the integration and maintenance of the new CTF
front-end in the libabigail framework.  Today, the code of the CTF
front-end is guarded by #ifdef WITH_CTF pre-processor macro
invocations.  Ideally, the amount code guarded by that macro should be
minimal (and ideally be zero in the future), especially in the
libabigail tools (abidw, abidiff, abipkgdiff, etc) that use the
library.

Second, it's to allow and ease the inclusion new front-ends in the
future, for instance, to support other ELF-based debug info formats.

The idea is to provide new abstractions in the libabigail framework to
represent a front-end and to share code between similar front-ends.
For instance, front-ends that are ELF-based (DWARF/CTF) would share
the code to access generic ELF properties.

Tools would thus be better equipped to analyze a binary and depending
on its kind, instantiate the appropriate front-end for its ABI
analysis and use it accordingly.

This thread contains the change proposal to implement this "feature".

Note that the change is implemented in a single patch as all the
changes are quite intermingled, to be honest.

In any case, the change can be access from the Git repository in the
"front-end" branch, which can be browsed from
https://sourceware.org/git/?p=libabigail.git;a=shortlog;h=refs/heads/users/dodji/front-end

Please, find the summary log of the change below.

Dodji Seketeli (1):
  Make Front Ends first class citizens

 include/Makefile.am                        |    4 +-
 include/abg-corpus.h                       |   18 +-
 include/abg-ctf-reader.h                   |   33 +-
 include/abg-dwarf-reader.h                 |  124 +-
 include/abg-elf-based-reader.h             |   63 +
 include/abg-elf-reader-common.h            |   70 -
 include/abg-elf-reader.h                   |  155 +
 include/abg-fe-iface.h                     |  166 +
 include/abg-fwd.h                          |    2 +-
 include/abg-ir.h                           |  156 +-
 include/abg-reader.h                       |   62 +-
 include/abg-suppression.h                  |   67 +
 include/abg-tools-utils.h                  |   13 +-
 include/abg-writer.h                       |    2 +-
 src/Makefile.am                            |    4 +-
 src/abg-comparison.cc                      |   67 +-
 src/abg-corpus-priv.h                      |   18 +-
 src/abg-corpus.cc                          |   73 +-
 src/abg-ctf-reader.cc                      | 1545 ++++----
 src/abg-dwarf-reader.cc                    | 3849 +++++++-------------
 src/abg-elf-based-reader.cc                |  102 +
 src/abg-elf-helpers.cc                     |  183 +-
 src/abg-elf-helpers.h                      |   38 +
 src/abg-elf-reader-common.cc               |   90 -
 src/abg-elf-reader.cc                      |  890 +++++
 src/abg-fe-iface.cc                        |  411 +++
 src/abg-ir-priv.h                          |   57 +-
 src/abg-ir.cc                              |  817 ++---
 src/abg-reader.cc                          | 1974 +++++-----
 src/abg-suppression-priv.h                 |  179 -
 src/abg-suppression.cc                     |  479 ++-
 src/abg-symtab-reader.cc                   |    5 +-
 src/abg-symtab-reader.h                    |    6 +-
 src/abg-tools-utils.cc                     |  163 +-
 src/abg-writer.cc                          |   39 +-
 tests/data/test-read-ctf/test0.abi         |    3 +
 tests/data/test-read-ctf/test0.hash.abi    |    3 +
 tests/data/test-read-ctf/test1.so.abi      |    3 +
 tests/data/test-read-ctf/test1.so.hash.abi |    3 +
 tests/data/test-read-ctf/test2.so.abi      |    3 +
 tests/data/test-read-ctf/test2.so.hash.abi |    3 +
 tests/data/test-read-ctf/test3.so.abi      |    5 +-
 tests/data/test-read-ctf/test3.so.hash.abi |    5 +-
 tests/data/test-read-ctf/test4.so.abi      |    3 +
 tests/data/test-read-ctf/test4.so.hash.abi |    3 +
 tests/print-diff-tree.cc                   |   12 +-
 tests/test-abidiff.cc                      |   24 +-
 tests/test-diff-dwarf.cc                   |   20 +-
 tests/test-ir-walker.cc                    |    7 +-
 tests/test-read-ctf.cc                     |   20 +-
 tests/test-read-dwarf.cc                   |    3 -
 tests/test-read-write.cc                   |    3 -
 tests/test-symtab.cc                       |   42 +-
 tools/Makefile.am                          |   13 +-
 tools/abicompat.cc                         |   63 +-
 tools/abidiff.cc                           |  222 +-
 tools/abidw.cc                             |  178 +-
 tools/abilint.cc                           |  128 +-
 tools/abipkgdiff.cc                        |  222 +-
 tools/abisym.cc                            |    5 +-
 tools/kmidiff.cc                           |   14 +-
 61 files changed, 6365 insertions(+), 6569 deletions(-)
 create mode 100644 include/abg-elf-based-reader.h
 delete mode 100644 include/abg-elf-reader-common.h
 create mode 100644 include/abg-elf-reader.h
 create mode 100644 include/abg-fe-iface.h
 create mode 100644 src/abg-elf-based-reader.cc
 delete mode 100644 src/abg-elf-reader-common.cc
 create mode 100644 src/abg-elf-reader.cc
 create mode 100644 src/abg-fe-iface.cc

-- 
2.38.0


-- 
		Dodji


             reply	other threads:[~2022-10-25 15:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 15:12 Dodji Seketeli [this message]
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
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=87lep4os22.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=guillermo.e.martinez@oracle.com \
    --cc=jose.marchesi@oracle.com \
    --cc=libabigail@sourceware.org \
    /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).