Date: Mon, 17 Jul 2006 13:39:19 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 101762 for review Message-ID: <200607171339.k6HDdJX8095830@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101762 Change 101762 by gonzo@gonzo_hq on 2006/07/17 13:38:28 o Add PC register to pcb block. It is required for detection of breakpoint location in trap handler and for stack unwinding. Affected files ... .. //depot/projects/mips2/src/sys/mips/include/db_machdep.h#3 edit .. //depot/projects/mips2/src/sys/mips/include/pcb.h#3 edit .. //depot/projects/mips2/src/sys/mips/mips/machdep.c#16 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/db_machdep.h#3 (text+ko) ==== @@ -54,7 +54,7 @@ extern db_regs_t ddb_regs; /* register state */ -#define PC_REGS() ((db_addr_t)ddb_regs.f_regs[PC]) +#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_regs[PCB_REG_PC]) #define PC_ADVANCE() do { \ if ((db_get_value(ddb_regs.f_regs[PC], sizeof(int), FALSE) & \ ==== //depot/projects/mips2/src/sys/mips/include/pcb.h#3 (text+ko) ==== @@ -34,7 +34,7 @@ * Process Control Block. */ struct pcb { - __register_t pcb_regs[12]; + __register_t pcb_regs[13]; }; #define PCB_REG_S0 (0) @@ -49,6 +49,7 @@ #define PCB_REG_SP (9) #define PCB_REG_SR (10) #define PCB_REG_RA (11) +#define PCB_REG_PC (12) #ifdef _KERNEL #define PCB_FSR(pcb) (0) ==== //depot/projects/mips2/src/sys/mips/mips/machdep.c#16 (text+ko) ==== @@ -193,6 +193,7 @@ pcb->pcb_regs[PCB_REG_SR] = tf->tf_regs[TF_SR]; pcb->pcb_regs[PCB_REG_RA] = tf->tf_regs[TF_RA]; pcb->pcb_regs[PCB_REG_SP] = tf->tf_regs[TF_SP]; + pcb->pcb_regs[PCB_REG_PC] = tf->tf_regs[TF_EPC]; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607171339.k6HDdJX8095830>