2019-02-15 16:24:43 +00:00
|
|
|
Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88835
|
|
|
|
|
|
|
|
diff --git a/tests/backtrace.c b/tests/backtrace.c
|
|
|
|
index 05e8ef8..d621fbf 100644
|
|
|
|
--- a/tests/backtrace.c
|
|
|
|
+++ b/tests/backtrace.c
|
|
|
|
@@ -185,7 +185,7 @@ frame_callback (Dwfl_Frame *state, void *frame_arg)
|
|
|
|
symname = dwfl_module_addrname (mod, pc_adjusted);
|
|
|
|
|
|
|
|
printf ("#%2d %#" PRIx64 "%4s\t%s\n", *framenop, (uint64_t) pc,
|
|
|
|
- ! isactivation ? "- 1" : "", symname);
|
|
|
|
+ ! isactivation ? "- 1" : "", symname ?: "<null>");
|
|
|
|
pid_t tid = dwfl_thread_tid (thread);
|
|
|
|
callback_verify (tid, *framenop, pc, symname, dwfl);
|
|
|
|
(*framenop)++;
|
2019-04-30 19:58:14 +00:00
|
|
|
|
|
|
|
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
|
|
|
|
index dfbf185..f446bc3 100644
|
|
|
|
--- a/tests/backtrace-dwarf.c
|
|
|
|
+++ b/tests/backtrace-dwarf.c
|
|
|
|
@@ -101,7 +101,7 @@ frame_callback (Dwfl_Frame *state, void *frame_arg)
|
|
|
|
if (mod)
|
|
|
|
symname = dwfl_module_addrname (mod, pc_adjusted);
|
|
|
|
|
|
|
|
- printf ("%#" PRIx64 "\t%s\n", (uint64_t) pc, symname);
|
|
|
|
+ printf ("%#" PRIx64 "\t%s\n", (uint64_t) pc, symname ?: "<null>");
|
|
|
|
|
|
|
|
if (symname && (strcmp (symname, "main") == 0
|
|
|
|
|| strcmp (symname, ".main") == 0))
|