PERFORCE change 101762 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Mon Jul 17 13:39:21 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101762
Change 101762 by gonzo at 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];
}
More information about the p4-projects
mailing list