public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] tests: fix for toolchains producing compressed debug sections
@ 2021-03-22 20:00 Dmitry V. Levin
  2021-03-23 14:20 ` Mark Wielaard
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry V. Levin @ 2021-03-22 20:00 UTC (permalink / raw)
  To: debugedit; +Cc: Vitaly Chikunov

When toolchain produces compressed debug sections by default,
quite a few debugedit tests fail because of unexpected
"debugedit: ./foo.o: DWARF version 0 unhandled" error diagnostic messages:
  3: debugedit .debug_str objects DWARF4             FAILED (debugedit.at:97)
  4: debugedit .debug_str/line_str objects DWARF5    FAILED (debugedit.at:129)
  9: debugedit .debug_info objects                   FAILED (debugedit.at:291)
 12: debugedit .debug_types objects                  FAILED (debugedit.at:370)
 15: debugedit .debug_line objects DWARF4            FAILED (debugedit.at:460)
 16: debugedit .debug_line objects DWARF5            FAILED (debugedit.at:484)
 21: debugedit .debug_macro objects                  FAILED (debugedit.at:598)

Fix this by instructing gcc not to produce compressed debug sections
in object files prepared for debugedit tests.

* tests/debugedit.at: Add "-gz=none" to "gcc -g3" invocations.

Co-authored-by: Vitaly Chikunov <vt@altlinux.org>
---
 tests/debugedit.at | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/debugedit.at b/tests/debugedit.at
index fb55574..2d1870b 100644
--- a/tests/debugedit.at
+++ b/tests/debugedit.at
@@ -37,11 +37,11 @@ cp "${abs_srcdir}"/data/SOURCES/foobar.h subdir_headers
 cp "${abs_srcdir}"/data/SOURCES/baz.c .
 
 # First three object files (foo.o subdir_bar/bar.o and baz.o)
-gcc -g3 -Isubdir_headers $1 -c subdir_foo/foo.c
+gcc -g3 -gz=none -Isubdir_headers $1 -c subdir_foo/foo.c
 cd subdir_bar
-gcc -g3 -I../subdir_headers $1 -c bar.c
+gcc -g3 -gz=none -I../subdir_headers $1 -c bar.c
 cd ..
-gcc -g3 -I$(pwd)/subdir_headers $1 -c $(pwd)/baz.c
+gcc -g3 -gz=none -I$(pwd)/subdir_headers $1 -c $(pwd)/baz.c
 
 # Then a partially linked object file (somewhat like a kernel module).
 # This will still have relocations between the debug sections.
@@ -49,7 +49,7 @@ ld -r -o foobarbaz.part.o foo.o subdir_bar/bar.o baz.o
 
 # Create an executable. Relocations between debug sections will
 # have been resolved.
-gcc -g3 -o foobarbaz.exe foo.o subdir_bar/bar.o baz.o
+gcc -g3 -gz=none -o foobarbaz.exe foo.o subdir_bar/bar.o baz.o
 ]])
 
 # ===
-- 
ldv

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-28 14:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 20:00 [PATCH] tests: fix for toolchains producing compressed debug sections Dmitry V. Levin
2021-03-23 14:20 ` Mark Wielaard
2021-03-23 14:28   ` Dmitry V. Levin
2021-03-23 15:05     ` Mark Wielaard
2021-03-24 23:45       ` Dmitry V. Levin
2021-03-25 23:12         ` Mark Wielaard
2021-03-28  0:46           ` Dmitry V. Levin
2021-03-28 14:01             ` Mark Wielaard

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).