Re: [PATCH] elfutils/configure.ac: use $READELF, not readelf

2020-06-15 Thread Mark Wielaard
Hi Sergei,

On Sun, 2020-06-14 at 20:28 +0100, Sergei Trofimovich wrote:
> Allow user to specify own readelf. Use detected readelf,
> not 'readelf'.

You are absolutely right. We have an explicit AC_CHECK_TOOL for
readelf, so we should use the result whenever we use READELF.

Added ChangeLog entry and pushed to master.

Thanks,

Mark


Re: Difference between dwarf_getscopes and dwarf_getscopes_die

2020-06-15 Thread Josh Stone via Elfutils-devel
On 6/13/20 10:34 AM, Milian Wolff wrote:
> Hey all,
> 
> can someone explain me the difference between dwarf_getscopes and 
> dwarf_getscopes_die? Ideally, this should then be added to the documentation 
> too.

dwarf_getscopes_die just follows the DWARF structure of direct DIE
parents, whereas dwarf_getscopes is kind of a semantic view, most
notably following DW_TAG_inlined_subroutine+DW_AT_abstract_origin to a
different part of the DIE tree.



Re: Can dwarf_getscopes{,_die} performance be improved?

2020-06-15 Thread Josh Stone via Elfutils-devel
On 6/13/20 10:40 AM, Milian Wolff wrote:
> Has anyone an idea on how to to post-process the DWARF data to optimize the 
> lookup of inlined frames?

SystemTap implements its own cache for repeated lookups -- see
dwflpp::get_die_parents().



[COMMITTED] tests: Use #/usr/bin/env bash in scripts that use bash

2020-06-15 Thread Mark Wielaard
Some systems don't have bash in /bin.

Signed-off-by: Mark Wielaard 
---
 config/ChangeLog  |  4 +++
 config/upload-release.sh  |  2 +-
 tests/ChangeLog   | 30 +++
 tests/coverage.sh |  2 +-
 tests/run-ar.sh   |  2 +-
 tests/run-backtrace-core-aarch64.sh   |  2 +-
 tests/run-backtrace-core-i386.sh  |  2 +-
 tests/run-backtrace-core-ppc.sh   |  2 +-
 tests/run-backtrace-core-s390.sh  |  2 +-
 tests/run-backtrace-core-s390x.sh |  2 +-
 tests/run-backtrace-core-sparc.sh |  2 +-
 tests/run-backtrace-core-x32.sh   |  2 +-
 tests/run-backtrace-core-x86_64.sh|  2 +-
 tests/run-backtrace-data.sh   |  2 +-
 tests/run-backtrace-demangle.sh   |  2 +-
 tests/run-backtrace-dwarf.sh  |  2 +-
 tests/run-backtrace-fp-core-aarch64.sh|  2 +-
 tests/run-backtrace-fp-core-i386.sh   |  2 +-
 tests/run-backtrace-fp-core-ppc64le.sh|  2 +-
 tests/run-backtrace-fp-core-x86_64.sh |  2 +-
 tests/run-backtrace-native-biarch.sh  |  2 +-
 tests/run-backtrace-native-core-biarch.sh |  2 +-
 tests/run-backtrace-native-core.sh|  2 +-
 tests/run-backtrace-native.sh |  2 +-
 tests/run-debuginfod-find.sh  |  2 +-
 tests/run-deleted.sh  |  2 +-
 tests/run-dwelf_elf_e_machine_string.sh   |  2 +-
 tests/run-large-elf-file.sh   |  2 +-
 tests/run-lfs-symbols.sh  |  2 +-
 tests/run-linkmap-cut.sh  |  2 +-
 30 files changed, 62 insertions(+), 28 deletions(-)

diff --git a/config/ChangeLog b/config/ChangeLog
index 2ad93702..459f7528 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2020-06-16  Mark Wielaard  
+
+   * upload-release.sh: Use /usr/bin/env bash.
+
 2020-06-11  Mark Wielaard  
 
* elfutils.spec.in: Update for 0.189.
diff --git a/config/upload-release.sh b/config/upload-release.sh
index b52642ea..18c91c0e 100755
--- a/config/upload-release.sh
+++ b/config/upload-release.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Must be run in the source directory.
 # Should have passed make distcheck.
diff --git a/tests/ChangeLog b/tests/ChangeLog
index e5d9196b..05220bd7 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,33 @@
+2020-06-16  Mark Wielaard  
+
+   * coverage.sh: Use /usr/bin/env bash.
+   * run-ar.sh: Likewise.
+   * run-backtrace-core-aarch64.sh: Likewise.
+   * run-backtrace-core-i386.sh: Likewise.
+   * run-backtrace-core-ppc.sh: Likewise.
+   * run-backtrace-core-s390.sh: Likewise.
+   * run-backtrace-core-s390x.sh: Likewise.
+   * run-backtrace-core-sparc.sh: Likewise.
+   * run-backtrace-core-x32.sh: Likewise.
+   * run-backtrace-core-x86_64.sh: Likewise.
+   * run-backtrace-data.sh: Likewise.
+   * run-backtrace-demangle.sh: Likewise.
+   * run-backtrace-dwarf.sh: Likewise.
+   * run-backtrace-fp-core-aarch64.sh: Likewise.
+   * run-backtrace-fp-core-i386.sh: Likewise.
+   * run-backtrace-fp-core-ppc64le.sh: Likewise.
+   * run-backtrace-fp-core-x86_64.sh: Likewise.
+   * run-backtrace-native-biarch.sh: Likewise.
+   * run-backtrace-native-core-biarch.sh: Likewise.
+   * run-backtrace-native-core.sh: Likewise.
+   * run-backtrace-native.sh: Likewise.
+   * run-debuginfod-find.sh: Likewise.
+   * run-deleted.sh: Likewise.
+   * run-dwelf_elf_e_machine_string.sh: Likewise.
+   * run-large-elf-file.sh: Likewise.
+   * run-lfs-symbols.sh: Likewise.
+   * run-linkmap-cut.sh: Likewise.
+
 2020-06-11  Mark Wielaard  
 
* Makefile.am (nlist-test): Add GCOV flags when necessary.
diff --git a/tests/coverage.sh b/tests/coverage.sh
index 01d292cc..448d43ba 100755
--- a/tests/coverage.sh
+++ b/tests/coverage.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /usr/bin/env bash
 
 if [ "x$1" = "x-v" ]; then
   verbose=yes
diff --git a/tests/run-ar.sh b/tests/run-ar.sh
index fb9394d5..656f1d1a 100755
--- a/tests/run-ar.sh
+++ b/tests/run-ar.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /usr/bin/env bash
 # Copyright (C) 2017 Red Hat, Inc.
 # This file is part of elfutils.
 #
diff --git a/tests/run-backtrace-core-aarch64.sh 
b/tests/run-backtrace-core-aarch64.sh
index a29a6613..41221d36 100755
--- a/tests/run-backtrace-core-aarch64.sh
+++ b/tests/run-backtrace-core-aarch64.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /usr/bin/env bash
 # Copyright (C) 2013 Red Hat, Inc.
 # This file is part of elfutils.
 #
diff --git a/tests/run-backtrace-core-i386.sh b/tests/run-backtrace-core-i386.sh
index 7294ec3d..c497f4aa 100755
--- a/tests/run-backtrace-core-i386.sh
+++ b/tests/run-backtrace-core-i386.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /usr/bin/env bash
 # Copyright (C) 2013 Red Hat, Inc.
 # This file is part of elfutils.
 #
diff --git a/tests/run-backtrace-core-ppc.sh b/tests/run-bac