From: Mark Wielaard <mark@klomp.org>
To: Dodji Seketeli <dodji@seketeli.org>
Cc: libabigail@sourceware.org
Subject: Re: Surprising behavior of suppress_type drop = yes
Date: Sun, 12 Apr 2020 03:44:25 +0200 [thread overview]
Message-ID: <e1093c3a9c32f7f63a0fe02ebe4ef43b3abe7216.camel@klomp.org> (raw)
In-Reply-To: <86k12oojf0.fsf@seketeli.org>
Hi Dodji,
On Thu, 2020-04-09 at 15:52 +0200, Dodji Seketeli wrote:
> I am attaching below the libfoo.supp suppression file I used.
> Actually, there are no '"' delimitation character either.
>
> [...]
>
> > It doesn't seem to change anything for my example. I assume it
> > does for you?
>
> Yes, sorry, it's my fault. I hope with suppression file below it
> gets better.
It does! Thanks. Now it looks like expected.
> > > > Or can we have a "drop mode" that treats handles to dropped
> > > > types a
> > > > simple void pointers instead?
> > >
> > > I think what you'd need, really, is a combination of:
> > >
> > > 1/ a new --header-files{1,2} option
> > > 2/ an "opaque = yes" attribute in the suppression
> > > specification.
> > >
> > > I think either 1/ or 2/ should work, but it'd be nice to have
> > > both.
> > >
> > > If you think that suggession holds water, then we should probably
> > > file a
> > > bug to add this new feature.
> >
> > Why not fix the default?
>
> I am not sure what you mean by default.
>
> "drop = yes" in the [suppress_type] section of a suppression
> specification is not meant to be the same feature as
> --header-files{1,2}.
>
> drop = yes really drops *all* types that match the suppression
> specification. Those types disappear completement from the internal
> representation. This can be useful to aggressively reduce the size
> of
> the internal representation.
>
> --header-files{1,2} generates a suppression specification that drop
> all
> types that are not defined in header files, but, for class/struct/
> types, it does something different. Rather than just droping those
> struct/class types from the internal representation, it replaces them
> by
> a (forward) declaration -- as opposed to the full type
> definition. So a
> pointer to that declaration becomes a pointer to an opaque type, in
> practise.
>
> These two features are useful to people in different use cases.
I see. But I find the dropping of function parameters odd. It means you
will be unable to see some issues when functions change an argument
with a dropped type. Say you have an function:
alert (Foobar *f, char *msg);
Where Foobar is an opaque (dropped) type. And you realize the alert
doesn't really depend on the given Foobar. So you remove it.
alert (char *msg);
That is an incompatible abi change, you won't be able to spot with the
current behavior of drop = yes.
I had expected that drop = yes would do what --headers-dir --drop-
private-types did and not remove the arguments that (indirectly)
reference the type got dropped too.
> If your question is "how to do exactly what --headers-files{1,2} does
> using suppression specfications", then the official answer today is
> "you can't".
OK. I don't particularly want to do it through a suppression
specification, but currently cannot easily do it through the command
line because I need something like --header-file because my public and
private headers are in the same dir (as the sources). And abidw doesn't
take --drop-private-types.
I'll sent patches to implement that.
Thanks,
Mark
next prev parent reply other threads:[~2020-04-12 1:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 14:38 Mark Wielaard
2020-04-06 17:15 ` Dodji Seketeli
2020-04-08 14:32 ` Mark Wielaard
2020-04-09 13:52 ` Dodji Seketeli
2020-04-12 1:44 ` Mark Wielaard [this message]
2020-04-12 1:47 ` [PATCH 1/2] Add --header-file option to add individual public header files Mark Wielaard
2020-04-12 1:47 ` [PATCH 2/2] Add --drop-private-types to abidw Mark Wielaard
2020-04-14 15:37 ` Dodji Seketeli
2020-04-14 15:19 ` [PATCH 1/2] Add --header-file option to add individual public header files Dodji Seketeli
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=e1093c3a9c32f7f63a0fe02ebe4ef43b3abe7216.camel@klomp.org \
--to=mark@klomp.org \
--cc=dodji@seketeli.org \
--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).