diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2007-12-12 11:27:15 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2007-12-12 11:27:15 +0000 |
commit | bfeddb6751d4cdb7337170176c1cb55230a95b18 (patch) | |
tree | 548a80cacfb6f1c9fe64fbc3a42c9d3dcff7bca3 /xen/arch/x86/gdbstub.c | |
parent | 73f67c0d9a0a3dff0fe27e977706492316126a1e (diff) | |
download | xen-bfeddb6751d4cdb7337170176c1cb55230a95b18.tar.gz xen-bfeddb6751d4cdb7337170176c1cb55230a95b18.tar.bz2 xen-bfeddb6751d4cdb7337170176c1cb55230a95b18.zip |
Fix gdb debugging of hypervisor.
This patch:
* enables the gdbstubs to properly access hypervisor memory;
* prevents an assertion failure in __spurious_page_fault's call
to map_domain_page if such accesses fail, by testing in_irq();
* prints some additional helpful messages;
* fixes the endianness of register transfers from the gdbstubs
so that gdb is much less confused.
* fixes the documentation in docs/misc/crashdb.txt
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'xen/arch/x86/gdbstub.c')
-rw-r--r-- | xen/arch/x86/gdbstub.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xen/arch/x86/gdbstub.c b/xen/arch/x86/gdbstub.c index a3af473ee2..3d0d0d0429 100644 --- a/xen/arch/x86/gdbstub.c +++ b/xen/arch/x86/gdbstub.c @@ -71,18 +71,20 @@ gdb_arch_read_reg(unsigned long regnum, struct cpu_user_regs *regs, gdb_send_reply("", ctx); } -/* Like copy_from_user, but safe to call with interrupts disabled. - Trust me, and don't look behind the curtain. */ +/* + * Use __copy_*_user to make us page-fault safe, but not otherwise restrict + * our access to the full virtual address space. + */ unsigned int gdb_arch_copy_from_user(void *dest, const void *src, unsigned len) { - return copy_from_user(dest, src, len); + return __copy_from_user(dest, src, len); } unsigned int gdb_arch_copy_to_user(void *dest, const void *src, unsigned len) { - return copy_to_user(dest, src, len); + return __copy_to_user(dest, src, len); } void |