s390/ptrace: add last_break member to pt_regs

Instead of using args[0] for the value of the last breaking event
address register, add a member to make things more obvious.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Sven Schnelle 2021-10-01 13:42:08 +02:00 committed by Vasily Gorbik
parent ada1da31ce
commit c8f573eccb
3 changed files with 3 additions and 2 deletions

View File

@ -96,6 +96,7 @@ struct pt_regs {
}; };
unsigned long flags; unsigned long flags;
unsigned long cr1; unsigned long cr1;
unsigned long last_break;
}; };
/* /*

View File

@ -152,7 +152,7 @@ void show_stack(struct task_struct *task, unsigned long *stack,
static void show_last_breaking_event(struct pt_regs *regs) static void show_last_breaking_event(struct pt_regs *regs)
{ {
printk("Last Breaking-Event-Address:\n"); printk("Last Breaking-Event-Address:\n");
printk(" [<%016lx>] %pSR\n", regs->args[0], (void *)regs->args[0]); printk(" [<%016lx>] %pSR\n", regs->last_break, (void *)regs->last_break);
} }
void show_registers(struct pt_regs *regs) void show_registers(struct pt_regs *regs)

View File

@ -314,7 +314,7 @@ void noinstr __do_pgm_check(struct pt_regs *regs)
if (last_break < 4096) if (last_break < 4096)
last_break = 1; last_break = 1;
current->thread.last_break = last_break; current->thread.last_break = last_break;
regs->args[0] = last_break; regs->last_break = last_break;
} }
if (S390_lowcore.pgm_code & 0x0200) { if (S390_lowcore.pgm_code & 0x0200) {