Support enhancement for the 32-bit MIPS architecture that retrieves

the per-cpu registers from the NT_PRSTATUS notes stored in the header
of compressed kdump dumpfiles.
(rabinv@axis.com)
This commit is contained in:
Dave Anderson 2015-05-13 16:47:40 -04:00
parent a8e7fc1e58
commit 3b51fc6b75
2 changed files with 19 additions and 4 deletions

View File

@ -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))) {
@ -1312,6 +1309,16 @@ get_diskdump_regs_ppc(struct bt_info *bt, ulong *eip, ulong *esp)
machdep->get_stack_frame(bt, eip, 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)
{
@ -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;

4
mips.c
View File

@ -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;