From 6f8b68010d8a11cbb97f225b16a3ef2f39f11fd8 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 29 Oct 2008 16:31:39 -0400 Subject: fix assertion error in translate.cxx:dump_unwindsyms on some kernels --- ChangeLog | 6 ++++++ translate.cxx | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4db3af2f..b5ceb2e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-29 Frank Ch. Eigler + + * translate.cxx (dump_unwindsyms): Work on CONFIG_RELOCATABLE=n + kernels, or for whatever other scenarios dwfl_module_relocation_info + might return NULL. + 2008-10-27 Josh Stone * translate.cxx (c_unparser::visit_print_format): Fix the argument passed diff --git a/translate.cxx b/translate.cxx index ee6b21cb..41128554 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4481,9 +4481,10 @@ dump_unwindsyms (Dwfl_Module *m, secname = dwfl_module_relocation_info (m, ki, NULL); } - if (n == 1 && modname == "kernel" && secname && secname[0] == '\0') + if (n == 1 && modname == "kernel") { - // This is a symbol within a relocatable kernel image. + // This is a symbol within a (possibly relocatable) + // kernel image. secname = "_stext"; // NB: don't subtract session.sym_stext, which could be inconveniently NULL. // Instead, sym_addr will get compensated later via extra_offset. -- cgit