Revision 57206fd4 monitor.c
b/monitor.c | ||
---|---|---|
539 | 539 |
int (*get_value)(struct MonitorDef *md); |
540 | 540 |
} MonitorDef; |
541 | 541 |
|
542 |
#if defined(TARGET_I386) |
|
543 |
static int monitor_get_pc (struct MonitorDef *md) |
|
544 |
{ |
|
545 |
return cpu_single_env->eip + (long)cpu_single_env->segs[R_CS].base; |
|
546 |
} |
|
547 |
#endif |
|
548 |
|
|
542 | 549 |
#if defined(TARGET_PPC) |
543 | 550 |
static int monitor_get_ccr (struct MonitorDef *md) |
544 | 551 |
{ |
... | ... | |
582 | 589 |
|
583 | 590 |
static MonitorDef monitor_defs[] = { |
584 | 591 |
#ifdef TARGET_I386 |
592 |
|
|
593 |
#define SEG(name, seg) \ |
|
594 |
{ name, offsetof(CPUState, segs[seg].selector) },\ |
|
595 |
{ name ".base", offsetof(CPUState, segs[seg].base) },\ |
|
596 |
{ name ".limit", offsetof(CPUState, segs[seg].limit) }, |
|
597 |
|
|
585 | 598 |
{ "eax", offsetof(CPUState, regs[0]) }, |
586 | 599 |
{ "ecx", offsetof(CPUState, regs[1]) }, |
587 | 600 |
{ "edx", offsetof(CPUState, regs[2]) }, |
... | ... | |
591 | 604 |
{ "esi", offsetof(CPUState, regs[6]) }, |
592 | 605 |
{ "esi", offsetof(CPUState, regs[7]) }, |
593 | 606 |
{ "eflags", offsetof(CPUState, eflags) }, |
594 |
{ "eip|pc", offsetof(CPUState, eip) }, |
|
607 |
{ "eip", offsetof(CPUState, eip) }, |
|
608 |
SEG("cs", R_CS) |
|
609 |
SEG("ds", R_DS) |
|
610 |
SEG("es", R_ES) |
|
611 |
SEG("fs", R_FS) |
|
612 |
SEG("gs", R_GS) |
|
613 |
{ "pc", 0, monitor_get_pc, }, |
|
595 | 614 |
#elif defined(TARGET_PPC) |
596 | 615 |
{ "r0", offsetof(CPUState, gpr[0]) }, |
597 | 616 |
{ "r1", offsetof(CPUState, gpr[1]) }, |
... | ... | |
625 | 644 |
{ "r29", offsetof(CPUState, gpr[29]) }, |
626 | 645 |
{ "r30", offsetof(CPUState, gpr[30]) }, |
627 | 646 |
{ "r31", offsetof(CPUState, gpr[31]) }, |
647 |
{ "nip|pc", offsetof(CPUState, nip) }, |
|
628 | 648 |
{ "lr", offsetof(CPUState, lr) }, |
629 | 649 |
{ "ctr", offsetof(CPUState, ctr) }, |
630 | 650 |
{ "decr", offsetof(CPUState, decr) }, |
... | ... | |
724 | 744 |
while ((*pch >= 'a' && *pch <= 'z') || |
725 | 745 |
(*pch >= 'A' && *pch <= 'Z') || |
726 | 746 |
(*pch >= '0' && *pch <= '9') || |
727 |
*pch == '_') { |
|
747 |
*pch == '_' || *pch == '.') {
|
|
728 | 748 |
if ((q - buf) < sizeof(buf) - 1) |
729 | 749 |
*q++ = *pch; |
730 | 750 |
pch++; |
Also available in: Unified diff