]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the variables $esp, $ds, $es, $fs, $gs and $ss in vm86 mode.
authorbde <bde@FreeBSD.org>
Sun, 14 Aug 2016 16:51:25 +0000 (16:51 +0000)
committerbde <bde@FreeBSD.org>
Sun, 14 Aug 2016 16:51:25 +0000 (16:51 +0000)
commit39cf12b793b3bc1f37eb634277fac9af477d948f
treecfe3a26b9796568055cacbe19a3b5e2bd1522418
parent1cd636e74d749771e473be6a4da4716056ef666e
Fix the variables $esp, $ds, $es, $fs, $gs and $ss in vm86 mode.

Fix PC_REGS() so that printing of instructions works in some useful
cases.  ddb only understands a single flat address space, but this
macro allows mapping $cs:$eip into vm86's flat address space well
enough for the MI parts of ddb.  This doesn't work for the MD parts
that do stack traces, and there are no similar macros for data addresses.

PC_REGS() has to use the trapframe pointer instead of the pcb for this.
For other CPUs, the trapframe pointer is not available except by tracing
back to it.  But tracing back through vm86 trapframes is broken even
starting with one.
sys/i386/i386/db_trace.c
sys/i386/include/db_machdep.h