This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH V2 0/2] Add C-SKY support
Hi,
On Wed, 2019-04-17 at 14:41 +0800, Mao Han wrote:
> I'v just spent sometime debuging this. Core dump backtrace on C-SKY
> seems
> can't be supported with current generic routine. DWARF register order is
> different from the order in core notes. The initialization of frame
> registers is totally incorrect. As the comment says some fix with
> private function is needed.
My apologies for taking so long to reply. I am looking at your latest
patch and found this discussion. It will take me a bit to properly
review everything. But I didn't forget.
> BTW the error log seems incorrect here.
>
> diff --git a/src/stack.c b/src/stack.c
> index c5f347e..4daabce 100644
> --- a/src/stack.c
> +++ b/src/stack.c
> @@ -608,7 +608,7 @@ parse_opt (int key, char *arg __attribute__
> ((unused)),
> if (core != NULL)
> {
> if (dwfl_core_file_attach (dwfl, core) < 0)
> - error (EXIT_BAD, 0, "dwfl_core_file_report: %s",
> dwfl_errmsg (-1));
> + error (EXIT_BAD, 0, "dwfl_core_file_attach: %s",
> dwfl_errmsg (-1));
> }
>
> /* Makes sure we are properly attached. */
You are totally correct. I have installed the attached patch.
Thanks,
Mark
From ac9e5349dd662289485e67403be943a4ec78cd4d Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Tue, 25 Jun 2019 00:21:42 +0200
Subject: [PATCH] stack: Fix error message when dwfl_core_file_attach fails.
Reported-by: Mao Han <han_mao@c-sky.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
src/ChangeLog | 4 ++++
src/stack.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 2cde63c..c78e6fa 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2019-06-25 Mark Wielaard <mark@klomp.org>
+
+ * stack.c (parse_opt): Fix dwfl_core_file_attach error message.
+
2019-06-18 Mark Wielaard <mark@klomp.org>
* strip.c (handle_elf): Use elf_begin ELF_C_WRITE, instead of
diff --git a/src/stack.c b/src/stack.c
index c5f347e..4daabce 100644
--- a/src/stack.c
+++ b/src/stack.c
@@ -608,7 +608,7 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
if (core != NULL)
{
if (dwfl_core_file_attach (dwfl, core) < 0)
- error (EXIT_BAD, 0, "dwfl_core_file_report: %s", dwfl_errmsg (-1));
+ error (EXIT_BAD, 0, "dwfl_core_file_attach: %s", dwfl_errmsg (-1));
}
/* Makes sure we are properly attached. */
--
1.8.3.1