Re: [PATCH] config: Conditionalize on LIBDEBUGINFOD instead of DEBUGINFOD
Hi - > Something like this? > -DEBUGINFOD_URLS="$DEBUGINFOD_URLS @DEBUGINFOD_URLS@" > -export DEBUGINFOD_URLS > +if [ -n "@DEBUGINFOD_URLS@" ]; then > + DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ > }@DEBUGINFOD_URLS@" > + export DEBUGINFOD_URLS > +fi You took the words right out of my mouth. :-) - FChE
Re: multi debug files and artificial module
Hi Sasha, On Tue, 2020-11-03 at 21:37 +, Sasha Da Rocha Pinheiro via Elfutils-devel wrote: > we are currently dealing with multiple separate debug files, the > normal stripped ones put in .debug/ folder and now the ones generated > by DWZ and put into .dwz/ folder. > When loading a normal stripped debug files who has a dwz file, I saw > the same DIE (same id) twice with different data. Would it be a bug > in DWZ or a correct dwarf state? > Also is "" the name of the following compilation unit? Or > is it a bug in eu-redealf/libdw? Looking at what you posted you are actually looking at 3 different types of CU DIEs. The "normal" separate .debug DIEs. The supplemental (dwz alt file) DIEs and LTO (gcc -flto generated) DIEs. For the last ones (which have GNU GIMPLE as producer, the internal GCC representation of the program) it is correct to have them marked "artificial", these CUs contain common code/types from the objects combined by LTO (Link Time Optimization). If by "same id" you mean "offset" (the hex value in square brackets) then yes, DIE offsets in separate files (Dwarf objects) can be the same. The DIEs from the .debug file and the DIEs from the .multi (supplemental) file are represented by different Dwarf objects and DIEs with the same offset in separate Dwarf objects are different DIEs. Cheers, Mark > Compilation unit at offset 946: > Version: 4, Abbreviation section offset: 0, Address size: 8, Offset > size: 4 > [ 3bd] compile_unit abbrev: 63 >producer (strp) "GNU GIMPLE 10.2.1 20200723 > (Red Hat 10.2.1-1) -m64 -mtune=generic -march=x86-64 -g -g -O2 -O2 > -fno-openmp -fno-openacc -fPIC -fstack-protector-strong -fltrans > -fplugin=ann > obin" >language (data1) C99 (12) >name (GNU_strp_alt) "" >comp_dir (GNU_strp_alt) > "/usr/src/debug/libiscsi-1.19.0-2.fc33.x86_64/lib" >low_pc (addr) +0x8030 > >high_pc (udata) 51811 (+0x00014a93 > <.annobin_iscsi_extended_copy_task.end>) >stmt_list(sec_offset) 0
[PATCH 2/1] config: do not define DEBUGINFOD_URLS environment variable unnecessarily
Before this change, when elfutils was configured without --enable-debuginfod-urls, the installed profile.d/debuginfod.sh and profile.d/debuginfod.csh scripts used to define the DEBUGINFOD_URLS environment variable as an non-empty string containing spaces, making all libdebuginfod users do extra work. Change these scripts to avoid defining the DEBUGINFOD_URLS environment variable unless configured using --enable-debuginfod-urls. Signed-off-by: Dmitry V. Levin --- config/ChangeLog | 5 + config/profile.csh.in | 13 +++-- config/profile.sh.in | 7 --- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/config/ChangeLog b/config/ChangeLog index e69e7e21..e4da0ebc 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2020-11-04 Dmitry V. Levin + + * profile.sh.in, profile.csh.in: Do not define $DEBUGINFOD_URLS unless + configured using --enable-debuginfod-urls. + 2020-11-02 Dmitry V. Levin * Makefile.am (pkgconfig_DATA, install-data-local, uninstall-local): diff --git a/config/profile.csh.in b/config/profile.csh.in index 4f25896d..0a2d6d16 100644 --- a/config/profile.csh.in +++ b/config/profile.csh.in @@ -1,2 +1,11 @@ - -setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS @DEBUGINFOD_URLS@" +if ("@DEBUGINFOD_URLS@" != "") then + if ($?DEBUGINFOD_URLS) then + if ($%DEBUGINFOD_URLS) then + setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS @DEBUGINFOD_URLS@" + else + setenv DEBUGINFOD_URLS "@DEBUGINFOD_URLS@" + endif + else + setenv DEBUGINFOD_URLS "@DEBUGINFOD_URLS@" + endif +endif diff --git a/config/profile.sh.in b/config/profile.sh.in index 8a022489..aa228a0d 100644 --- a/config/profile.sh.in +++ b/config/profile.sh.in @@ -1,3 +1,4 @@ - -DEBUGINFOD_URLS="$DEBUGINFOD_URLS @DEBUGINFOD_URLS@" -export DEBUGINFOD_URLS +if [ -n "@DEBUGINFOD_URLS@" ]; then + DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }@DEBUGINFOD_URLS@" + export DEBUGINFOD_URLS +fi -- ldv
Re: [PATCH v2] debuginfod.cxx: include libintl.h.
Hi - > > YES PLEASE! :-) > > > > As a transition, how about ChangeLog format content in the git commit > > messages? > > You mean as done by GCC? Not have actual ChangeLog files, but add the > ChangeLog entries themselves in the commit message? > https://gcc.gnu.org/codingconventions.html#ChangeLogs Yeah, IMO that would be better than what we have now, though I prefer the LKML style more. > That certainly works for me. We could even steal their git commit/check > scripts to make it easier for people to follow that format. If you like ... OTOH we've made do without mechanical enforcement so far. - FChE