Add support for using the notes in MIPS' kdump compressed format
dumpfiles.
Hi Rabin,
I've downloaded the sample dumpfiles, tested the patch, and queued it for
crash-7.1.1:
---
diskdump.c | 19 +++++++++++++++----
mips.c | 4 ++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/diskdump.c b/diskdump.c
index 585aaa9..90f3bff 100644
--- a/diskdump.c
+++ b/diskdump.c
@@ -1285,14 +1285,11 @@ extern void get_netdump_regs_x86(struct bt_info *,
ulong *, ulong *);
extern void get_netdump_regs_x86_64(struct bt_info *, ulong *, ulong *);
static void
-get_diskdump_regs_ppc(struct bt_info *bt, ulong *eip, ulong *esp)
+get_diskdump_regs_32(struct bt_info *bt, ulong *eip, ulong *esp)
{
Elf32_Nhdr *note;
int len;
- if (KDUMP_CMPRS_VALID())
- ppc_relocate_nt_prstatus_percpu(dd->nt_prstatus_percpu,
- &dd->num_prstatus_notes);
if (KDUMP_CMPRS_VALID() &&
(bt->task == tt->panic_task ||
(is_task_active(bt->task) && dd->num_prstatus_notes > 1))) {
@@ -1313,6 +1310,16 @@ get_diskdump_regs_ppc(struct bt_info *bt, ulong *eip,
ulong *esp)
}
static void
+get_diskdump_regs_ppc(struct bt_info *bt, ulong *eip, ulong *esp)
+{
+ if (KDUMP_CMPRS_VALID())
+ ppc_relocate_nt_prstatus_percpu(dd->nt_prstatus_percpu,
+ &dd->num_prstatus_notes);
+
+ get_diskdump_regs_32(bt, eip, esp);
+}
+
+static void
get_diskdump_regs_ppc64(struct bt_info *bt, ulong *eip, ulong *esp)
{
if ((bt->task == tt->panic_task) && DISKDUMP_VALID())
@@ -1346,6 +1353,10 @@ get_diskdump_regs(struct bt_info *bt, ulong *eip,
ulong *esp)
get_diskdump_regs_arm(bt, eip, esp);
break;
+ case EM_MIPS:
+ return get_diskdump_regs_32(bt, eip, esp);
+ break;
+
case EM_386:
return get_netdump_regs_x86(bt, eip, esp);
break;
diff --git a/mips.c b/mips.c
index 77077fb..4b62d1e 100644
--- a/mips.c
+++ b/mips.c
@@ -833,6 +833,10 @@ mips_init(int when)
#endif
switch (when) {
+ case SETUP_ENV:
+ machdep->process_elf_notes = process_elf32_notes;
+ break;
+
case PRE_SYMTAB:
machdep->verify_symbol = mips_verify_symbol;
machdep->machspec = &mips_machine_specific;
--
1.7.10.4
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility