* [Bug default/19621] New: Add a way to detect if debug info is empty/missing for the command-line tools
@ 2016-01-01 0:00 michi.henning at canonical dot com
2019-01-01 0:00 ` [Bug default/19621] " dodji at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: michi.henning at canonical dot com @ 2016-01-01 0:00 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=19621
Bug ID: 19621
Summary: Add a way to detect if debug info is empty/missing for
the command-line tools
Product: libabigail
Version: unspecified
Status: NEW
Severity: enhancement
Priority: P2
Component: default
Assignee: dodji at redhat dot com
Reporter: michi.henning at canonical dot com
CC: libabigail at sourceware dot org
Target Milestone: ---
I'm pasting some test from the mailing list discussion below. It would be
really nice to have a way to find out whether I'm accidentally running the tool
against libs that weren't compiled with -g.
One thing to keep in mind that the exit status will rapidly run out of bits, so
it might be worth thinking about some other way to communicate such details to
the caller.
---------
One thing I have to deal with is that the unit tests may be run with release
mode locally, in which case the binaries are compiled without -g.
I can run abidw on the shared lib, but the ABI dump that is generated doesn’t
contain any useful info for doing a real ABI compliance test. When I run
abidiff baseline_with_debug_dump current_without_debug_dump
abidiff tells me that everything is fine. This is awkward because it gives me a
possibly false negative. The code that was compiled might indeed break the ABI
but, because it was compiled without -g, abidiff gives the wrong answer.
Currently, I’m using this as a work-around:
# If the current lib doesn't contain debug info, we can't run the test.
info_file=$(mktemp)
readelf --debug-dump=info @CMAKE_BINARY_DIR@/${libname}.so >$info_file
[ $? -ne 0 ] && exit 1
[ -s $info_file ]
no_debug_info=$?
rm -f $info_file
[ $no_debug_info -eq 1 ] && {
echo "${progname}: Skipping ABI test because ${libname}.so was compiled
without -g"
exit 0
}
But this is quite awkward and costly, and I need to drag binutils into my
build, which I otherwise wouldn’t need.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug default/19621] Add a way to detect if debug info is empty/missing for the command-line tools
2016-01-01 0:00 [Bug default/19621] New: Add a way to detect if debug info is empty/missing for the command-line tools michi.henning at canonical dot com
@ 2019-01-01 0:00 ` dodji at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: dodji at redhat dot com @ 2019-01-01 0:00 UTC (permalink / raw)
To: libabigail
https://sourceware.org/bugzilla/show_bug.cgi?id=19621
dodji at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from dodji at redhat dot com ---
abidiff now contains the --fail-no-debug-info option to do just that.
If no debug info was found, the tool just fails rather than saying that
everything is fine.
Thank you for taking the time to file this issue and sorry for the
inconvenience.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-10 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-01 0:00 [Bug default/19621] New: Add a way to detect if debug info is empty/missing for the command-line tools michi.henning at canonical dot com
2019-01-01 0:00 ` [Bug default/19621] " dodji at redhat dot com
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).