diff options
author | Sergey Fedorov <serge.fdrv@gmail.com> | 2016-02-11 11:17:32 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-02-11 11:17:32 +0000 |
commit | 568496c0c0f1863a4bc18539962cd8d81baa4e30 (patch) | |
tree | f2e5e6fc8b4cc961becd9338dd65e21a9893fbef /qom/cpu.c | |
parent | 7d197d2db5e99e4c8b20f6771ddc7303acaa1c89 (diff) | |
download | qemu-568496c0c0f1863a4bc18539962cd8d81baa4e30.zip qemu-568496c0c0f1863a4bc18539962cd8d81baa4e30.tar.gz qemu-568496c0c0f1863a4bc18539962cd8d81baa4e30.tar.bz2 |
cpu: Add callback to check architectural watchpoint match
When QEMU watchpoint matches, that is not definitely an architectural
watchpoint match yet. If it is a stop-before-access watchpoint then that
is hardly possible to ignore it after throwing a TCG exception.
A special callback is introduced to check for architectural watchpoint
match before raising a TCG exception.
Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
Message-id: 1454256948-10485-2-git-send-email-serge.fdrv@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qom/cpu.c')
-rw-r--r-- | qom/cpu.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -189,6 +189,14 @@ static int cpu_common_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg) return 0; } +static bool cpu_common_debug_check_watchpoint(CPUState *cpu, CPUWatchpoint *wp) +{ + /* If no extra check is required, QEMU watchpoint match can be considered + * as an architectural match. + */ + return true; +} + bool target_words_bigendian(void); static bool cpu_common_virtio_is_big_endian(CPUState *cpu) { @@ -353,6 +361,7 @@ static void cpu_class_init(ObjectClass *klass, void *data) k->gdb_write_register = cpu_common_gdb_write_register; k->virtio_is_big_endian = cpu_common_virtio_is_big_endian; k->debug_excp_handler = cpu_common_noop; + k->debug_check_watchpoint = cpu_common_debug_check_watchpoint; k->cpu_exec_enter = cpu_common_noop; k->cpu_exec_exit = cpu_common_noop; k->cpu_exec_interrupt = cpu_common_exec_interrupt; |