mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
Clean up MMIO TLB handling.
The IO index is now stored in its own field, instead of being wedged into the vaddr field. This eliminates the ROMD and watchpoint host pointer weirdness. The IO index space is expanded by 1 bit, and several additional bits are made available in the TLB vaddr field. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4704 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
f227f17d1b
commit
0f459d16c3
7 changed files with 194 additions and 175 deletions
32
gdbstub.c
32
gdbstub.c
|
@ -1117,21 +1117,37 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf)
|
|||
if (*p == ',')
|
||||
p++;
|
||||
len = strtoull(p, (char **)&p, 16);
|
||||
if (type == 0 || type == 1) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
case 1:
|
||||
if (cpu_breakpoint_insert(env, addr) < 0)
|
||||
goto breakpoint_error;
|
||||
put_packet(s, "OK");
|
||||
break;
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
} else if (type == 2) {
|
||||
if (cpu_watchpoint_insert(env, addr) < 0)
|
||||
case 2:
|
||||
type = PAGE_WRITE;
|
||||
goto insert_watchpoint;
|
||||
case 3:
|
||||
type = PAGE_READ;
|
||||
goto insert_watchpoint;
|
||||
case 4:
|
||||
type = PAGE_READ | PAGE_WRITE;
|
||||
insert_watchpoint:
|
||||
if (cpu_watchpoint_insert(env, addr, type) < 0)
|
||||
goto breakpoint_error;
|
||||
put_packet(s, "OK");
|
||||
break;
|
||||
#endif
|
||||
} else {
|
||||
breakpoint_error:
|
||||
put_packet(s, "E22");
|
||||
default:
|
||||
put_packet(s, "");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
breakpoint_error:
|
||||
put_packet(s, "E22");
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
type = strtoul(p, (char **)&p, 16);
|
||||
if (*p == ',')
|
||||
|
@ -1144,12 +1160,12 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf)
|
|||
cpu_breakpoint_remove(env, addr);
|
||||
put_packet(s, "OK");
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
} else if (type == 2) {
|
||||
} else if (type >= 2 || type <= 4) {
|
||||
cpu_watchpoint_remove(env, addr);
|
||||
put_packet(s, "OK");
|
||||
#endif
|
||||
} else {
|
||||
goto breakpoint_error;
|
||||
put_packet(s, "");
|
||||
}
|
||||
break;
|
||||
case 'q':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue