Re: [PATCH 01/25] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'

2022-10-27 Thread Mark Wielaard
Hi,

On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
wrote:
> These filenames are invalid on win32

But using .spec causes make rpm to fail.

Did you try this variant:
https://inbox.sourceware.org/elfutils-devel/3bf19d05c8976411432709fae1cc2bcc2d21d700.ca...@klomp.org/

Thanks,

Mark


Re: [PATCH 02/25] ignore build directory

2022-10-27 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
wrote:
> Signed-off-by: Yonggang Luo 
> ---
>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.gitignore b/.gitignore
> index 8bcd88d7..ca06 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -21,6 +21,7 @@ Makefile.in
>  /INSTALL
>  /aclocal.m4
>  /autom4te.*
> +/build
>  /config.cache
>  /config.h
>  /config.h.in

Why is this necessary?

Thanks,

Mark


Re: [PATCH 03/25] libebl: There is no need #include in eblclosebackend.c and eblopenbackend.c

2022-10-27 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
wrote:
> It's not accessed symbols in dlfcn.h in eblclosebackend.c and
> eblopenbackend.c

Tweaked the commit message (so it fits on one line), added ChangeLog
entries and pushed.

Thanks,

Mark


Re: [PATCH 04/25] libelf/libdwfl: Remove "#define LIB_SYSTEM_H 1" in libelf_crc32.c and libdwfl_crc32.c

2022-10-27 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
wrote:
> rationale: https://sourceware.org/bugzilla/show_bug.cgi?id=21001
> 
> If we don't remove this macro, when try #include  in
> libdw/memory-access.h
> wont' take effect because "#define LIB_SYSTEM_H   1"
> The compile error:
> ./../libdw/memory-access.h:390:12: error: implicit declaration of
> function ‘bswap_32’ [-Werror=implicit-function-declaration]

Thanks, makes sense.
Added ChangeLog entries and tweaked the commit message a bit to not
exceed 72 chars lines.

Pushed,

Mark


Re: [PATCH 05/25] use #include instead platform depended header in libdw/memory-access.h

2022-10-27 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
wrote:
> Signed-off-by: Yonggang Luo 

Thanks, added ChangeLog entry and tweaked commit message to have < 72
char lines.

Pushed,

Mark


Re: [PATCH] readelf: Handle DW_LLE_GNU_view_pair

2022-10-27 Thread Mark Wielaard
Hi,

On Thu, 2022-10-20 at 00:02 +0200, Mark Wielaard wrote:
> DW_LLE_GNU_view_pair is used by gcc -gvariable-location-
> views=incompat5.
> As described in 
> http://www.fsfla.org/~lxoliva/papers/sfn/dwarf6-sfn-lvu.txt
> and proposed for DWARF6 
> https://dwarfstd.org/ShowIssue.php?issue=170427.1

Pushed,

Mark


Re: One shot mode for debuginfod server

2022-10-27 Thread Mark Wielaard
Hi Ryan,

On Tue, 2022-08-09 at 17:40 -0400, Ryan Goldberg via Elfutils-devel
wrote:
> Here is a patch for a new one-shot mode for the debuginfod server.
> In this mode the first scanning pass of the server will also output
> the found executables' paths and buildids to the given file
> descriptor. This can (and soon will be used in systemtap)
> as an easy way to scan archive files and quickly/easily extract
> information concerning the executables they contain.

I see how this could be useful, but wouldn't it be easier to have a
database query do this?

Cheers,

Mark


☺ Buildbot (GNU Toolchain): elfutils - build successful (master)

2022-10-27 Thread builder--- via Elfutils-devel
A restored build has been detected on builder elfutils-fedora-x86_64 while 
building elfutils.

Full details are available at:
https://builder.sourceware.org/buildbot/#builders/59/builds/88

Build state: build successful
Revision: eae6ad37f96826b1b7ddf269ee4d753079054413
Worker: bbo1-1
Build Reason: (unknown)
Blamelist: Frank Ch. Eigler , Yonggang Luo 


Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

- 2: git checkout ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/2/logs/stdio

- 3: autoreconf ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/3/logs/stdio

- 4: configure ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/4/logs/stdio

- 5: get version ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/5/logs/stdio
- property changes: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/5/logs/property_changes

- 6: make ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/6/logs/stdio
- warnings (3): 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/6/logs/warnings__3_

- 7: make check ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/7/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/7/logs/test-suite_log

- 8: make distcheck ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/8/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/8/logs/test-suite_log
- warnings (6): 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/8/logs/warnings__6_

- 9: prep ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/9/logs/stdio

- 10: build bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/10/logs/stdio

- 11: fetch bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/11/logs/stdio

- 12: unpack bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/12/logs/stdio

- 13: pass .bunsen.source.gitname ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/13/logs/stdio

- 14: pass .bunsen.source.gitdescribe ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/14/logs/stdio

- 15: pass .bunsen.source.gitbranch ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/15/logs/stdio

- 16: pass .bunsen.source.gitrepo ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/16/logs/stdio

- 17: upload to bunsen ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/17/logs/stdio

- 18: clean up ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/18/logs/stdio

- 19: make distclean ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/59/builds/88/steps/19/logs/stdio



[COMMITTED] config: Add BuildRequires socat for run-debuginfod-response-headers.sh

2022-10-27 Thread Mark Wielaard
Signed-off-by: Mark Wielaard 
---
 config/ChangeLog| 4 
 config/elfutils.spec.in | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/config/ChangeLog b/config/ChangeLog
index 1265f399..9aadd71f 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-27  Mark Wielaard  
+
+   * elfutils.spec.in: Add BuildRequires socat.
+
 2022-08-17  Martin Liska  
 
* debuginfod.service: Add new debuginfod.sysconfig
diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in
index 54599159..333c6239 100644
--- a/config/elfutils.spec.in
+++ b/config/elfutils.spec.in
@@ -40,6 +40,8 @@ BuildRequires: iproute
 BuildRequires: procps
 BuildRequires: bsdtar
 BuildRequires: curl
+# For run-debuginfod-response-headers.sh test case
+BuildRequires: socat
 
 %define _gnu %{nil}
 %define _programprefix eu-
-- 
2.18.4



[COMMITTED] Use grep -E instead of egrep, use grep -F instead of fgrep.

2022-10-27 Thread Mark Wielaard
GNU grep 3.8 gives a deprecation warning when using egrep or fgrep.
Just use grep -E and grep -F.

Signed-off-by: Mark Wielaard 
---
 config/ChangeLog   |  4 
 config/eu.am   |  2 +-
 tests/ChangeLog| 11 +++
 tests/backtrace-subr.sh|  4 ++--
 tests/debuginfod-subr.sh   |  4 ++--
 tests/run-debuginfod-archive-rename.sh |  2 +-
 tests/run-debuginfod-extraction-passive.sh |  4 ++--
 tests/run-debuginfod-response-headers.sh   |  2 +-
 tests/run-debuginfod-webapi-concurrency.sh |  2 +-
 tests/run-strip-test.sh|  2 +-
 10 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/config/ChangeLog b/config/ChangeLog
index 9aadd71f..15fee44f 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-27  Mark Wielaard  
+
+   * eu.am: Use grep -F instead of fgrep.
+
 2022-10-27  Mark Wielaard  
 
* elfutils.spec.in: Add BuildRequires socat.
diff --git a/config/eu.am b/config/eu.am
index 58cd3c4f..c3cefe7e 100644
--- a/config/eu.am
+++ b/config/eu.am
@@ -135,7 +135,7 @@ textrel_found = $(textrel_msg); exit 1
 else
 textrel_found = $(textrel_msg)
 endif
-textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); 
fi
+textrel_check = if $(READELF) -d $@ | grep -F -q TEXTREL; then 
$(textrel_found); fi
 
 print-%:
@echo $*=$($*)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 0ea1df3d..be90832a 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,14 @@
+2022-10-27  Mark Wielaard  
+
+   * backtrace-subr.sh: Use grep -E instead of egrep, use grep -F
+   instead of fgrep.
+   * debuginfod-subr.sh: Likewise.
+   * run-debuginfod-archive-rename.sh: Likewise.
+   * run-debuginfod-extraction-passive.sh: Likewise.
+   * run-debuginfod-response-headers.sh: Likewise.
+   * run-debuginfod-webapi-concurrency.sh: Likewise.
+   * run-strip-test.sh: Likewise.
+
 2022-10-16  Mark Wielaard  
 
* dwfl-report-offline-memory.c: Include config.h first.
diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh
index 53c719df..b63e3814 100644
--- a/tests/backtrace-subr.sh
+++ b/tests/backtrace-subr.sh
@@ -59,7 +59,7 @@ check_backtracegen()
 # Ignore it here as it is a bug of OS, not a bug of elfutils.
 check_err()
 {
-  if [ $(egrep -v <$1 'dwfl_thread_getframes: (No DWARF information found|no 
matching address range|address out of range|Invalid register|\(null\))$' \
+  if [ $(grep -E -v <$1 'dwfl_thread_getframes: (No DWARF information found|no 
matching address range|address out of range|Invalid register|\(null\))$' \
  | wc -c) \
-eq 0 ]
   then
@@ -101,7 +101,7 @@ check_native_unsupported()
   # and we can fall back on .debug_frame for the CFI.
   case "`uname -m`" in
 arm* )
-  if egrep 'dwfl_thread_getframes(.*)No DWARF information found' $err; then
+  if grep -E 'dwfl_thread_getframes(.*)No DWARF information found' $err; 
then
echo >&2 $testname: arm needs debuginfo installed for all libraries
exit 77
   fi
diff --git a/tests/debuginfod-subr.sh b/tests/debuginfod-subr.sh
index 0b59b5b8..108dff74 100755
--- a/tests/debuginfod-subr.sh
+++ b/tests/debuginfod-subr.sh
@@ -141,12 +141,12 @@ archive_test() {
 get_ports() {
   while true; do
 PORT1=`expr '(' $RANDOM % 50 ')' + $base`
-ss -atn | fgrep ":$PORT1" || break
+ss -atn | grep -F ":$PORT1" || break
   done
 # Some tests will use two servers, so assign the second var
   while true; do
 PORT2=`expr '(' $RANDOM % 50 ')' + $base + 50`
-ss -atn | fgrep ":$PORT2" || break
+ss -atn | grep -F ":$PORT2" || break
   done
 
 }
diff --git a/tests/run-debuginfod-archive-rename.sh 
b/tests/run-debuginfod-archive-rename.sh
index a1a6cc1e..71f7742a 100755
--- a/tests/run-debuginfod-archive-rename.sh
+++ b/tests/run-debuginfod-archive-rename.sh
@@ -95,7 +95,7 @@ export DEBUGINFOD_URLS=http://127.0.0.1:$PORT1
 archive_test bc1febfd03ca05e030f0d205f7659db29f8a4b30 
/usr/src/debug/hello-1.0/hello.c $SHA
 archive_test f0aa15b8aba4f3c28cac3c2a73801fefa644a9f2 
/usr/src/debug/hello-1.0/hello.c $SHA
 
-egrep '(libc.error.*rhel7)|(bc1febfd03ca)|(f0aa15b8aba)' vlog$PORT1
+grep -E '(libc.error.*rhel7)|(bc1febfd03ca)|(f0aa15b8aba)' vlog$PORT1
 
 kill $PID1
 wait $PID1
diff --git a/tests/run-debuginfod-extraction-passive.sh 
b/tests/run-debuginfod-extraction-passive.sh
index c2724b58..26618f5c 100755
--- a/tests/run-debuginfod-extraction-passive.sh
+++ b/tests/run-debuginfod-extraction-passive.sh
@@ -56,10 +56,10 @@ wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
 wait_ready $PORT1 'thread_busy{role="scan"}' 0
 
 # No similar metrics for the passive server
-! (curl http://localhost:$PORT2/metrics | egrep 
'role="scan"|role="groom"|role="traverse"')
+! (curl http://localhost:$PORT2/metrics | grep -E 
'role="scan"|role="groom"|role="traverse"')
 
 # Confirm no active

Re: [PATCH] configure.ac: Update AC_PROG_CC and AC_PROG_LEX for autoconf 2.70

2022-10-27 Thread Mark Wielaard
On Sat, 2022-10-22 at 21:58 +0200, Mark Wielaard wrote:
> With autoconf 2.70 we must use AC_PROG_CC (which will check for c11
> and c99), for earlier versions we'll use AC_PROG_CC_C99. Also use
> AC_PROG_LEX([noyywrap]), the extra argument is ignored with earlier
> versions, but required for 2.70.

Pushed,

Mark


[Bug general/29571] Add 'Key to Flags' to eu-readelf output

2022-10-27 Thread zhuorong.lin at outlook dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29571

lin zhuorong  changed:

   What|Removed |Added

 CC||zhuorong.lin at outlook dot com

--- Comment #1 from lin zhuorong  ---
Created attachment 14419
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14419&action=edit
elfutils: List flags meaning when running eu-readelf

elfutils: List flags meaning when running eu-readelf

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

☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-10-27 Thread builder--- via Elfutils-devel
A new failure has been detected on builder elfutils-debian-i386 while building 
elfutils.

Full details are available at:
https://builder.sourceware.org/buildbot/#builders/17/builds/86

Build state: failed test (failure)
Revision: 73d016bde224af6d1be7c86fb2ea67af22f7582f
Worker: debian-i386-2
Build Reason: (unknown)
Blamelist: Mark Wielaard 

Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

- 2: git checkout ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/2/logs/stdio

- 3: autoreconf ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/3/logs/stdio

- 4: configure ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/4/logs/stdio

- 5: get version ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/5/logs/stdio
- property changes: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/5/logs/property_changes

- 6: make ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/6/logs/stdio
- warnings (3): 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/6/logs/warnings__3_

- 7: make check ( failure )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/7/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/7/logs/test-suite_log

- 8: prep ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/8/logs/stdio

- 9: build bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/9/logs/stdio

- 10: fetch bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/10/logs/stdio

- 11: unpack bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/11/logs/stdio

- 12: pass .bunsen.source.gitname ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/12/logs/stdio

- 13: pass .bunsen.source.gitdescribe ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/13/logs/stdio

- 14: pass .bunsen.source.gitbranch ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/14/logs/stdio

- 15: pass .bunsen.source.gitrepo ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/15/logs/stdio

- 16: upload to bunsen ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/16/logs/stdio

- 17: clean up ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/17/logs/stdio

- 18: make distclean ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/86/steps/18/logs/stdio



☺ Buildbot (GNU Toolchain): elfutils - build successful (master)

2022-10-27 Thread builder--- via Elfutils-devel
A restored build has been detected on builder elfutils-debian-i386 while 
building elfutils.

Full details are available at:
https://builder.sourceware.org/buildbot/#builders/17/builds/87

Build state: build successful
Revision: 65b3fb51b83b5a37345c6a9ae7c77b2e9d3a6517
Worker: debian-i386-2
Build Reason: (unknown)
Blamelist: Mark Wielaard 

Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

- 2: git checkout ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/2/logs/stdio

- 3: autoreconf ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/3/logs/stdio

- 4: configure ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/4/logs/stdio

- 5: get version ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/5/logs/stdio
- property changes: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/5/logs/property_changes

- 6: make ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/6/logs/stdio
- warnings (3): 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/6/logs/warnings__3_

- 7: make check ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/7/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/7/logs/test-suite_log

- 8: prep ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/8/logs/stdio

- 9: build bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/9/logs/stdio

- 10: fetch bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/10/logs/stdio

- 11: unpack bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/11/logs/stdio

- 12: pass .bunsen.source.gitname ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/12/logs/stdio

- 13: pass .bunsen.source.gitdescribe ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/13/logs/stdio

- 14: pass .bunsen.source.gitbranch ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/14/logs/stdio

- 15: pass .bunsen.source.gitrepo ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/15/logs/stdio

- 16: upload to bunsen ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/16/logs/stdio

- 17: clean up ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/17/logs/stdio

- 18: make distclean ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/17/builds/87/steps/18/logs/stdio



[Bug tools/29498] Is it expected that eu-strip strips .note.GNU-stack

2022-10-27 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29498

Mark Wielaard  changed:

   What|Removed |Added

 CC||mark at klomp dot org

--- Comment #2 from Mark Wielaard  ---
Actual SHF_NOTE sections are kept, as are allocated SHF_PROGBITS sections. But
this is neither.

How does binutils strip know it should keep this section? Does it just
hard-code the name?

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

[Bug libdw/29434] Memory leak in `dwarf_getscopes`

2022-10-27 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29434

--- Comment #10 from Mark Wielaard  ---
(In reply to Pablo Galindo Salgado from comment #8)
> If you give me a patch adding print statements to libdw/dwarf_getscopes.c
> and libdw/libdw_visit_scopes.c I can give you the output.

See attachment 14302 on comment #9.

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

[Bug libelf/29695] In libelf.h struct Elf, struct Elf_Scn is defined using typedef and not using #include is not the way to comply with the specification?

2022-10-27 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29695

Mark Wielaard  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 CC||mark at klomp dot org
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Mark Wielaard  ---
libelf.h is a public header. We explicitly don't want to declare complete types
for internal data structures. Which is why we don't include or expose
libelfP.h.

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

[Bug libdw/29711] In libdw.h struct Dwarf, struct Dwarf_Abbrev is defined using typedef and not using #include is not the way to comply with the specification?

2022-10-27 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29711

Mark Wielaard  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||mark at klomp dot org
 Resolution|--- |NOTABUG

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

[PATCH v3] debuginfod: Support queries for ELF/DWARF sections

2022-10-27 Thread Aaron Merey via Elfutils-devel
v3 addresses Frank and Mark's v2 feedback.

v2 available here:
https://sourceware.org/pipermail/elfutils-devel/2022q4/005476.html
---
 ChangeLog   |   4 +
 NEWS|   2 +
 debuginfod/ChangeLog|  21 ++
 debuginfod/Makefile.am  |   2 +-
 debuginfod/debuginfod-client.c  | 263 +-
 debuginfod/debuginfod-find.c|  21 +-
 debuginfod/debuginfod.cxx   | 383 ++--
 debuginfod/debuginfod.h.in  |   6 +
 debuginfod/libdebuginfod.map|   1 +
 doc/ChangeLog   |   7 +
 doc/Makefile.am |   1 +
 doc/debuginfod.8|  10 +
 doc/debuginfod_find_debuginfo.3 |  22 +-
 doc/debuginfod_find_section.3   |   1 +
 tests/ChangeLog |   5 +
 tests/Makefile.am   |   4 +-
 tests/run-debuginfod-section.sh | 134 +++
 17 files changed, 804 insertions(+), 83 deletions(-)
 create mode 100644 doc/debuginfod_find_section.3
 create mode 100755 tests/run-debuginfod-section.sh

diff --git a/ChangeLog b/ChangeLog
index 60624183..6f9b416a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-27  Aaron Merey  
+
+   * NEWS: Add debuginfod_find_section.
+
 2022-09-13  Aleksei Vetrov  
 
* NEWS (libdwfl): Add dwfl_report_offline_memory.
diff --git a/NEWS b/NEWS
index 6ebd172c..3e290ff7 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ readelf: Add -D, --use-dynamic option.
 
 debuginfod: Add --disable-source-scan option.
 
+debuginfod-client: Add new function debuginfod_find_section.
+
 libdwfl: Add new function dwfl_get_debuginfod_client.
  Add new function dwfl_frame_reg.
  Add new function dwfl_report_offline_memory.
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index 59d50df1..b1d076fe 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,3 +1,24 @@
+2022-10-27  Aaron Merey  
+
+   * Makefile.am (libdebuginfod_so_LDLIBS): Add libelf.
+   * debuginfod-client.c (debuginfod_find_section): New function.
+   (extract_section): New function.
+   (cache_find_section): New function.
+   (debuginfod_query_server): Add support for section queries.
+   * debuginfod-find.c (main): Add support for section queries.
+   * debuginfod.cxx (extract_section): New function.
+   (handle_buildid_f_match): Add section parameter.  When non-empty,
+   try to create response from section contents.
+   (handle_buildid_r_match): Add section parameter.  When non-empty,
+   try to create response from section contents.
+   (handle_buildid_match): Add section parameter. Pass to
+   handle_buildid_{f,r}_match.
+   (handle_buildid): Handle section name when artifacttype is set to
+   "section".  Query upstream servers via debuginfod_find_section
+   when necessary.
+   (debuginfod.h.in): Add declaration for debuginfod_find_section.
+   (libdebuginfod.map): Add debuginfod_find_section.
+
 2022-10-17  Frank Ch. Eigler  
 
* debuginfod.cxx (main): Report libmicrohttpd version.
diff --git a/debuginfod/Makefile.am b/debuginfod/Makefile.am
index 435cb8a6..f27d6e2e 100644
--- a/debuginfod/Makefile.am
+++ b/debuginfod/Makefile.am
@@ -97,7 +97,7 @@ libdebuginfod_so_LIBS = libdebuginfod_pic.a
 if DUMMY_LIBDEBUGINFOD
 libdebuginfod_so_LDLIBS =
 else
-libdebuginfod_so_LDLIBS = -lpthread $(libcurl_LIBS) $(fts_LIBS)
+libdebuginfod_so_LDLIBS = -lpthread $(libcurl_LIBS) $(fts_LIBS) $(libelf)
 endif
 $(LIBDEBUGINFOD_SONAME): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index 2a14d9d9..0e8ca89c 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -44,6 +44,7 @@
 #include "system.h"
 #include 
 #include 
+#include 
 
 /* We might be building a bootstrap dummy library, which is really simple. */
 #ifdef DUMMY_LIBDEBUGINFOD
@@ -55,6 +56,9 @@ int debuginfod_find_executable (debuginfod_client *c, const 
unsigned char *b,
 int s, char **p) { return -ENOSYS; }
 int debuginfod_find_source (debuginfod_client *c, const unsigned char *b,
 int s, const char *f, char **p)  { return -ENOSYS; 
}
+int debuginfod_find_section (debuginfod_client *c, const unsigned char *b,
+int s, const char *scn, char **p)
+ { return -ENOSYS; }
 void debuginfod_set_progressfn(debuginfod_client *c,
   debuginfod_progressfn_t fn) { }
 void debuginfod_set_verbose_fd(debuginfod_client *c, int fd) { }
@@ -129,6 +133,9 @@ struct debuginfod_client
  debuginfod_end needs to terminate. */
   int default_progressfn_printed_p;
 
+  /* Indicates whether the last query was cancelled by progressfn.  */
+  bool progressfn_cancel;
+
   /* File descriptor to output any verbose messages if > 0.  */
   in