Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2632f2d9 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "arm64: Dump memory surrounding PC, LR and SP registers only" into msm-4.8

parents a8a62f93 3077ef85
Loading
Loading
Loading
Loading
+1 −7
Original line number Original line Diff line number Diff line
@@ -214,18 +214,12 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
static void show_extra_register_data(struct pt_regs *regs, int nbytes)
static void show_extra_register_data(struct pt_regs *regs, int nbytes)
{
{
	mm_segment_t fs;
	mm_segment_t fs;
	unsigned int i;


	fs = get_fs();
	fs = get_fs();
	set_fs(KERNEL_DS);
	set_fs(KERNEL_DS);
	show_data(regs->pc - nbytes, nbytes * 2, "PC");
	show_data(regs->pc - nbytes, nbytes * 2, "PC");
	show_data(regs->regs[30] - nbytes, nbytes * 2, "LR");
	show_data(regs->regs[30] - nbytes, nbytes * 2, "LR");
	show_data(regs->sp - nbytes, nbytes * 2, "SP");
	show_data(regs->sp - nbytes, nbytes * 2, "SP");
	for (i = 0; i < 30; i++) {
		char name[4];
		snprintf(name, sizeof(name), "X%u", i);
		show_data(regs->regs[i] - nbytes, nbytes * 2, name);
	}
	set_fs(fs);
	set_fs(fs);
}
}


@@ -256,7 +250,7 @@ void __show_regs(struct pt_regs *regs)
			printk("\n");
			printk("\n");
	}
	}
	if (!user_mode(regs))
	if (!user_mode(regs))
		show_extra_register_data(regs, 128);
		show_extra_register_data(regs, 64);
	printk("\n");
	printk("\n");
}
}