mirror of https://github.com/xemu-project/xemu.git
debug updates - page_unprotect() is no longer needed in softmmu case
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@505 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
65262d5738
commit
dc6f57fd55
|
@ -281,6 +281,10 @@ static void switch_tss(int tss_selector,
|
||||||
uint8_t *ptr;
|
uint8_t *ptr;
|
||||||
|
|
||||||
type = (e2 >> DESC_TYPE_SHIFT) & 0xf;
|
type = (e2 >> DESC_TYPE_SHIFT) & 0xf;
|
||||||
|
#ifdef DEBUG_PCALL
|
||||||
|
if (loglevel)
|
||||||
|
fprintf(logfile, "switch_tss: sel=0x%04x type=%d src=%d\n", tss_selector, type, source);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* if task gate, we read the TSS segment and we load it */
|
/* if task gate, we read the TSS segment and we load it */
|
||||||
if (type == 5) {
|
if (type == 5) {
|
||||||
|
@ -848,24 +852,40 @@ void do_interrupt(int intno, int is_int, int error_code,
|
||||||
{
|
{
|
||||||
extern FILE *stdout;
|
extern FILE *stdout;
|
||||||
static int count;
|
static int count;
|
||||||
if (env->cr[0] & CR0_PE_MASK) {
|
if ((env->cr[0] && CR0_PE_MASK)) {
|
||||||
fprintf(stdout, "%d: interrupt: vector=%02x error_code=%04x int=%d\n",
|
fprintf(stdout, "%d: interrupt: vector=%02x error_code=%04x int=%d CPL=%d CS:EIP=%04x:%08x SS:ESP=%04x:%08x EAX=%08x\n",
|
||||||
count, intno, error_code, is_int);
|
count, intno, error_code, is_int,
|
||||||
|
env->hflags & HF_CPL_MASK,
|
||||||
|
env->segs[R_CS].selector, EIP,
|
||||||
|
env->segs[R_SS].selector, ESP,
|
||||||
|
EAX);
|
||||||
|
if (0) {
|
||||||
|
cpu_x86_dump_state(env, stdout, X86_DUMP_CCOP);
|
||||||
|
#if 0
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
uint8_t *ptr;
|
||||||
|
fprintf(stdout, " code=");
|
||||||
|
ptr = env->segs[R_CS].base + env->eip;
|
||||||
|
for(i = 0; i < 16; i++) {
|
||||||
|
fprintf(stdout, " %02x", ldub(ptr + i));
|
||||||
|
}
|
||||||
|
fprintf(stdout, "\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((env->cr[0] & CR0_PE_MASK) && intno == 0x10) {
|
|
||||||
tb_flush(env);
|
|
||||||
cpu_set_log(CPU_LOG_ALL);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_PCALL
|
#ifdef DEBUG_PCALL
|
||||||
if (loglevel) {
|
if (loglevel) {
|
||||||
static int count;
|
static int count;
|
||||||
fprintf(logfile, "%d: interrupt: vector=%02x error_code=%04x int=%d\n",
|
fprintf(logfile, "%d: interrupt: vector=%02x error_code=%04x int=%d\n",
|
||||||
count, intno, error_code, is_int);
|
count, intno, error_code, is_int);
|
||||||
cpu_x86_dump_state(env, logfile, X86_DUMP_CCOP);
|
cpu_x86_dump_state(env, logfile, X86_DUMP_CCOP);
|
||||||
#if 1
|
#if 0
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uint8_t *ptr;
|
uint8_t *ptr;
|
||||||
|
@ -2431,10 +2451,6 @@ void tlb_fill(unsigned long addr, int is_write, int is_user, void *retaddr)
|
||||||
generated code */
|
generated code */
|
||||||
saved_env = env;
|
saved_env = env;
|
||||||
env = cpu_single_env;
|
env = cpu_single_env;
|
||||||
if (is_write && page_unprotect(addr)) {
|
|
||||||
/* nothing more to do: the page was write protected because
|
|
||||||
there was code in it. page_unprotect() flushed the code. */
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = cpu_x86_handle_mmu_fault(env, addr, is_write, is_user, 1);
|
ret = cpu_x86_handle_mmu_fault(env, addr, is_write, is_user, 1);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
Loading…
Reference in New Issue