Add support for using the notes in MIPS kdump compressed format dumpfiles.
Signed-off-by: Huacai Chen <chenhuacai(a)loongson.cn>
Signed-off-by: Youling Tang <tangyouling(a)loongson.cn>
---
diskdump.c | 8 +++++++-
mips64.c | 9 +++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/diskdump.c b/diskdump.c
index 4ad2c50..b5e77da 100644
--- a/diskdump.c
+++ b/diskdump.c
@@ -1470,6 +1470,12 @@ get_diskdump_regs_arm64(struct bt_info *bt, ulong *eip, ulong
*esp)
}
static void
+get_diskdump_regs_mips(struct bt_info *bt, ulong *eip, ulong *esp)
+{
+ machdep->get_stack_frame(bt, eip, esp);
+}
+
+static void
get_diskdump_regs_sparc64(struct bt_info *bt, ulong *eip, ulong *esp)
{
Elf64_Nhdr *note;
@@ -1508,7 +1514,7 @@ get_diskdump_regs(struct bt_info *bt, ulong *eip, ulong *esp)
break;
case EM_MIPS:
- return get_diskdump_regs_32(bt, eip, esp);
+ return get_diskdump_regs_mips(bt, eip, esp);
break;
case EM_386:
diff --git a/mips64.c b/mips64.c
index 5ebe61d..c3eb03c 100644
--- a/mips64.c
+++ b/mips64.c
@@ -22,9 +22,18 @@ mips64_dump_machdep_table(ulong arg)
{
}
+/*
+ * Do all necessary machine-specific setup here. This is called several
+ * times during initialization.
+ */
void
mips64_init(int when)
{
+ switch (when) {
+ case SETUP_ENV:
+ machdep->process_elf_notes = process_elf64_notes;
+ break;
+ }
}
void
--
2.1.0
Show replies by date