public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "maennich at android dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/26012] New: abidiff: do not emit qualified name for data members
Date: Mon, 18 May 2020 20:04:41 +0000	[thread overview]
Message-ID: <bug-26012-9487@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=26012

            Bug ID: 26012
           Summary: abidiff: do not emit qualified name for data members
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: maennich at android dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

When reporting differences concerning data members of structs/classes, we do
not need to report the fully qualified name as the containing block already
states the name and fully qualified members repeat that portion of the name
only.


E.g. we can reduce 


'struct task_struct at sched.h:635:1' changed:
  type size hasn't changed
  1 data member insertion:
    'unsigned int task_struct::in_ubsan', at offset 16704 (in bits) at
sched.h:1006:1
  there are data member changes:
    'void* task_struct::journal_info' offset changed from 16704 to 16768 (in
bits) (by +64 bits)
    'bio_list* task_struct::bio_list' offset changed from 16768 to 16832 (in
bits) (by +64 bits)
    'blk_plug* task_struct::plug' offset changed from 16832 to 16896 (in bits)
(by +64 bits)
    'reclaim_state* task_struct::reclaim_state' offset changed from 16896 to
16960 (in bits) (by +64 bits)
    'backing_dev_info* task_struct::backing_dev_info' offset changed from 16960
to 17024 (in bits) (by +64 bits)
    'io_context* task_struct::io_context' offset changed from 17024 to 17088
(in bits) (by +64 bits)
    'capture_control* task_struct::capture_control' offset changed from 17088
to 17152 (in bits) (by +64 bits)
    'unsigned long int task_struct::ptrace_message' offset changed from 17152
to 17216 (in bits) (by +64 bits)
    'kernel_siginfo_t* task_struct::last_siginfo' offset changed from 17216 to
17280 (in bits) (by +64 bits)


to

'struct task_struct at sched.h:635:1' changed:
  type size hasn't changed
  1 data member insertion:
    'in_ubsan', at offset 16704 (in bits) at sched.h:1006:1
  there are data member changes:
    'journal_info' offset changed from 16704 to 16768 (in bits) (by +64 bits)
    'bio_list' offset changed from 16768 to 16832 (in bits) (by +64 bits)
    'plug' offset changed from 16832 to 16896 (in bits) (by +64 bits)
    'reclaim_state' offset changed from 16896 to 16960 (in bits) (by +64 bits)
    'backing_dev_info' offset changed from 16960 to 17024 (in bits) (by +64
bits)
    'io_context' offset changed from 17024 to 17088 (in bits) (by +64 bits)
    'capture_control' offset changed from 17088 to 17152 (in bits) (by +64
bits)
    'ptrace_message' offset changed from 17152 to 17216 (in bits) (by +64 bits)
    'last_siginfo' offset changed from 17216 to 17280 (in bits) (by +64 bits)


I think this very much applies to C structs as well as to C++
structs/class and maybe more similar language constructs of other
languages. In fact, the above is a C example. I think we should use the
non-qualified version if we are in a nested block where the rest of the
qualified name is already emitted. In the above example, we are in the
block of 'task_struct' differences, hence we can strip that part away
from task_struct::in_ubsan'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2020-05-18 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 20:04 maennich at android dot com [this message]
2021-01-26 13:14 ` [Bug default/26012] " gprocida+abigail at google dot com
2021-02-08 13:14   ` Dodji Seketeli
2021-02-03 17:53 ` gprocida+abigail at google dot com
2021-02-08 13:14 ` dodji at seketeli dot org
2021-02-09 10:47 ` dodji at redhat dot com

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=bug-26012-9487@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.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).