Re: Some easy DWARF5 extensions

2017-08-02 Thread Mark Wielaard
On Thu, 2017-07-27 at 00:07 +0200, Mark Wielaard wrote:
> The following are all the easy DWARF5 extensions that a compiler might
> emit in "non-strict" DWARF mode (when it uses tags, attributes or other
> constants from a later version of DWARF).
> 
> [PATCH 1/9] libdw: Add DWARF5 attributes.
> [PATCH 2/9] libdw: Add new DWARF5 tag constants.
> [PATCH 3/9] libdw: Add new DWARF5 character encodings.
> [PATCH 4/9] libdw: DWARF5 Add new DW_LANG codes and default lower
> [PATCH 5/9] libdw: Add dwarf_default_lower_bound.
> [PATCH 6/9] libdw: DWARF5 Add DW_CC_pass_by_reference and
> [PATCH 7/9] Handle DWARF5 defaulted member function encodings.
> [PATCH 8/9] libdw: Handle DWARF5 immutable, packed and shared in
> [PATCH 9/9] libdw: Add DW_MACRO constants and DW_MACRO_GNU
> [...]
> I believe the above patches however are ready and I would like to include
> them in the next release. It has been 3 months since the last one, so it
> is time to do a new one soon. It would be nice to at least handle these
> easy parts of DWARF5 with elfutils 0.170.

I pushed these 9 patches to master now.

Cheers,

Mark


Re: [PATCH] backends: sparc GOTDATA_OP[_HIX22|LOX10] can be used in ET_REL files.

2017-08-02 Thread Mark Wielaard
On Thu, 2017-07-27 at 23:19 +0200, Mark Wielaard wrote:
> Tested on new GNU Compile Farm server gcc202.
>
> +2017-07-27  Mark Wielaard  
> +
> + * sparc_reloc.def: GOTDATA_OP_HIX22, GOTDATA_OP_LOX10 and
> + GOTDATA_OP can be used in ET_REL files.

Pushed to master.


Prepare for elfutils 0.170

2017-08-02 Thread Mark Wielaard
It has been 3 months again so time for another update.
I just pushed the version bump update and would like to do a release
tomorrow unless some showstoppers are found.
From 54ba4ce2973113d8f4315d4fc90e16a9b4476ea6 Mon Sep 17 00:00:00 2001
From: Mark Wielaard 
Date: Wed, 2 Aug 2017 18:30:07 +0200
Subject: [PATCH] Prepare for 0.170.

Set version to 0.170. Update po/*.po files.
Add some more user visible changes to NEWS.

Signed-off-by: Mark Wielaard 
---
 ChangeLog   |   5 +
 NEWS|   2 +-
 config/ChangeLog|   6 +-
 config/elfutils.spec.in |  10 +
 configure.ac|   2 +-
 po/ChangeLog|   4 +
 po/de.po| 477 --
 po/es.po| 487 ---
 po/ja.po| 490 +---
 po/pl.po| 484 +--
 po/uk.po| 487 ---
 11 files changed, 1306 insertions(+), 1148 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8748ab86..9253c0a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-02  Mark Wielaard  
+
+	* configure.ac: Set version to 0.170.
+	* NEWS: Mention new libdw dwarf_line_file function.
+
 2017-07-26  Mark Wielaard  
 
 	* NEWS: Mention dwarf_getmacros handling version 5 .debug_macro.
diff --git a/NEWS b/NEWS
index 5c2d8add..72e5118d 100644
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,7 @@ Version 0.170
 libdw: Added new DWARF5 attribute, tag, character encoding, language code,
calling convention, defaulted member function and macro constants
to dwarf.h.
-   New function dwarf_default_lower_bound.
+   New functions dwarf_default_lower_bound and dwarf_line_file.
dwarf_peel_type now handles DWARF5 immutable, packed and shared tags.
dwarf_getmacros now handles DWARF5 .debug_macro sections.
 
diff --git a/config/ChangeLog b/config/ChangeLog
index 3492d6d7..02cf76f9 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,4 +1,8 @@
-2016-05-05  Mark Wielaard  
+2016-08-02  Mark Wielaard  
+
+	* elfutils.spec.in: Update for 0.170.
+
+2017-05-05  Mark Wielaard  
 
 	* elfutils.spec.in: Update for 0.169.
 
diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in
index 06b7290d..439fcb73 100644
--- a/config/elfutils.spec.in
+++ b/config/elfutils.spec.in
@@ -227,6 +227,16 @@ rm -rf ${RPM_BUILD_ROOT}
 %config(noreplace) %{_sysctldir}/10-default-yama-scope.conf
 
 %changelog
+* Wed Aug  2 2017 Mark Wielaard  0.170-1
+- libdw: Added new DWARF5 attribute, tag, character encoding,
+  language code, calling convention, defaulted member function
+  and macro constants to dwarf.h.
+  New functions dwarf_default_lower_bound and dwarf_line_file.
+  dwarf_peel_type now handles DWARF5 immutable, packed and shared tags.
+  dwarf_getmacros now handles DWARF5 .debug_macro sections.
+- strip: Add -R, --remove-section=SECTION and --keep-section=SECTION.
+- backends: The bpf disassembler is now always build on all platforms.
+
 * Fri May  5 2017 Mark Wielaard  0.169-1
 - backends: Add support for EM_PPC64 GNU_ATTRIBUTES.
   Frame pointer unwinding fallback support for i386, x86_64, aarch64.
diff --git a/configure.ac b/configure.ac
index bb58f4b8..1f1856df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ dnl  GNU General Public License for more details.
 dnl
 dnl  You should have received a copy of the GNU General Public License
 dnl  along with this program.  If not, see .
-AC_INIT([elfutils],[0.169],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
+AC_INIT([elfutils],[0.170],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
 
 dnl Workaround for older autoconf < 2.64
 m4_ifndef([AC_PACKAGE_URL],
diff --git a/po/ChangeLog b/po/ChangeLog
index 5e02edf2..465ae165 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-02  Mark Wielaard  
+
+	* *.po: Update for 0.170.
+
 2017-05-05  Mark Wielaard  
 
 	* *.po: Update for 0.169.
-- 
2.13.3



Re: Prepare for elfutils 0.170

2017-08-02 Thread Mark Wielaard
On Wed, 2017-08-02 at 18:42 +0200, Mark Wielaard wrote:
> It has been 3 months again so time for another update.
> I just pushed the version bump update and would like to do a release
> tomorrow unless some showstoppers are found.

I tested current git master on Debian 8 amd64, Debian 9 amd64, Fedora
rawhide x86_64, ppc64le, aarch64, ppc64, i686, s390x, armv7hl, RHEL6
ppc, s390, x86_64, ppc64, i686, s390x and RHEL7 ppc, x86_64, s390,
aarch64, ppc64le, ppc64, i686, s390x all with zero FAIL.


Re: Prepare for elfutils 0.170

2017-08-02 Thread Jose E. Marchesi

> It has been 3 months again so time for another update.
> I just pushed the version bump update and would like to do a release
> tomorrow unless some showstoppers are found.

I tested current git master on Debian 8 amd64, Debian 9 amd64, Fedora
rawhide x86_64, ppc64le, aarch64, ppc64, i686, s390x, armv7hl, RHEL6
ppc, s390, x86_64, ppc64, i686, s390x and RHEL7 ppc, x86_64, s390,
aarch64, ppc64le, ppc64, i686, s390x all with zero FAIL.

Tried to build latest master in sparc64:

../../src/readelf.c:3805:7: error: ‘DWARF_ALL_KNOWN_DW_DEFAULTED’
 undeclared (first use in this function); did you mean ‘DWARF_ALL_KNOWN_DW_ATE’?

Seems like a typo in readelf.c:dwarf_defaulted_string:

#define DWARF_ONE_KNOWN_DW_DEFAULTED(NAME, CODE) [CODE] = #NAME,
  DWARF_ALL_KNOWN_DW_DEFAULTED
#undef DWARF_ONE_KNOWN_DW_DEFAULTED


Re: Prepare for elfutils 0.170

2017-08-02 Thread Jose E. Marchesi

> It has been 3 months again so time for another update.
> I just pushed the version bump update and would like to do a release
> tomorrow unless some showstoppers are found.

I tested current git master on Debian 8 amd64, Debian 9 amd64, Fedora
rawhide x86_64, ppc64le, aarch64, ppc64, i686, s390x, armv7hl, RHEL6
ppc, s390, x86_64, ppc64, i686, s390x and RHEL7 ppc, x86_64, s390,
aarch64, ppc64le, ppc64, i686, s390x all with zero FAIL.

Tried to build latest master in sparc64:

../../src/readelf.c:3805:7: error: ‘DWARF_ALL_KNOWN_DW_DEFAULTED’
 undeclared (first use in this function); did you mean 
‘DWARF_ALL_KNOWN_DW_ATE’?

Seems like a typo in readelf.c:dwarf_defaulted_string:

#define DWARF_ONE_KNOWN_DW_DEFAULTED(NAME, CODE) [CODE] = #NAME,
  DWARF_ALL_KNOWN_DW_DEFAULTED
#undef DWARF_ONE_KNOWN_DW_DEFAULTED


Never mind...  now that I bothered to actually read what that code does,
found the problem was I didnt configure enabling maintainer mode...

Maybe it would be good to update libdw/known-dwarf.h in the git repo...

PS: all 172 tests passed in sparc64-linux-gnu


Re: Prepare for elfutils 0.170

2017-08-02 Thread Mark Wielaard
Hi Jose,

On Wed, 2017-08-02 at 21:21 +0200, Jose E. Marchesi wrote:
> Never mind...  now that I bothered to actually read what that code does,
> found the problem was I didnt configure enabling maintainer mode...
> 
> Maybe it would be good to update libdw/known-dwarf.h in the git repo...

It isn't in git (since it is a generated file). --enable-maintainer-mode
creates it. And configure should warn if it isn't there that you need
--enable-maintainer-mode (it is there in a release tar ball of course).

I guess it is slightly confusing if you once configured with
--enable-maintainer-mode and then configure the same tree without and in
between dwarf.h gets updated. Then it indeed doesn't get updated. Sorry
about that.

> PS: all 172 tests passed in sparc64-linux-gnu

Great. Thanks for testing!

Cheers,

Mark


Latest version of dwarflint?

2017-08-02 Thread Ananthakrishna Sowda (asowda)
I found the dwarflint and locstats tools in the ‘dwarf ‘ branch of elfutils.
   https://sourceware.org/elfutils/DwarfLint
Any plans of merging this into main branch?

I get following error from locstats:

error: .debug_info: DIE 0x3f10fc: dwarf_getlocation_addr: invalid DWARF

This error is reported on DW_OP_GNU_entry_value in DWARF location list. Any 
newer version of these tools which can handle DWARF5 ops such as 
DW_OP_GNU_entry-value?
Thanks
Ananth