Blame SOURCES/elfutils-0.176-gcc-pr88835.patch
|
|
46be0c |
Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88835
|
|
|
46be0c |
|
|
|
46be0c |
diff --git a/src/readelf.c b/src/readelf.c
|
|
|
46be0c |
index 33706bd..b55844c 100644
|
|
|
46be0c |
--- a/src/readelf.c
|
|
|
46be0c |
+++ b/src/readelf.c
|
|
|
46be0c |
@@ -10143,7 +10143,7 @@ print_debug_str_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
|
|
|
46be0c |
++digits;
|
|
|
46be0c |
tmp >>= 4;
|
|
|
46be0c |
}
|
|
|
46be0c |
- digits = MAX (4, digits);
|
|
|
46be0c |
+ digits = MIN (16, MAX (4, digits));
|
|
|
46be0c |
|
|
|
46be0c |
printf (gettext ("\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"
|
|
|
46be0c |
" %*s String\n"),
|
|
|
46be0c |
diff --git a/tests/backtrace.c b/tests/backtrace.c
|
|
|
46be0c |
index 05e8ef8..d621fbf 100644
|
|
|
46be0c |
--- a/tests/backtrace.c
|
|
|
46be0c |
+++ b/tests/backtrace.c
|
|
|
46be0c |
@@ -185,7 +185,7 @@ frame_callback (Dwfl_Frame *state, void *frame_arg)
|
|
|
46be0c |
symname = dwfl_module_addrname (mod, pc_adjusted);
|
|
|
46be0c |
|
|
|
46be0c |
printf ("#%2d %#" PRIx64 "%4s\t%s\n", *framenop, (uint64_t) pc,
|
|
|
46be0c |
- ! isactivation ? "- 1" : "", symname);
|
|
|
46be0c |
+ ! isactivation ? "- 1" : "", symname ?: "<null>");
|
|
|
46be0c |
pid_t tid = dwfl_thread_tid (thread);
|
|
|
46be0c |
callback_verify (tid, *framenop, pc, symname, dwfl);
|
|
|
46be0c |
(*framenop)++;
|