ia64/xen-unstable

view xen/arch/x86/gdbstub.c @ 19835:edfdeb150f27

Fix buildsystem to detect udev > version 124

udev removed the udevinfo symlink from versions higher than 123 and
xen's build-system could not detect if udev is in place and has the
required version.

Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 25 13:02:37 2009 +0100 (2009-06-25)
parents 9bf8b152df9f
children
line source
1 /*
2 * x86-specific gdb stub routines
3 * based on x86 cdb(xen/arch/x86/cdb.c), but Extensively modified.
4 *
5 * Copyright (C) 2006 Isaku Yamahata <yamahata at valinux co jp>
6 * VA Linux Systems Japan. K.K.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22 #include <asm/debugger.h>
24 u16
25 gdb_arch_signal_num(struct cpu_user_regs *regs, unsigned long cookie)
26 {
27 return 5; /* TRAP signal. see include/gdb/signals.h */
28 }
30 /*
31 * Use __copy_*_user to make us page-fault safe, but not otherwise restrict
32 * our access to the full virtual address space.
33 */
34 unsigned int
35 gdb_arch_copy_from_user(void *dest, const void *src, unsigned len)
36 {
37 return __copy_from_user(dest, src, len);
38 }
40 unsigned int
41 gdb_arch_copy_to_user(void *dest, const void *src, unsigned len)
42 {
43 return __copy_to_user(dest, src, len);
44 }
46 void
47 gdb_arch_print_state(struct cpu_user_regs *regs)
48 {
49 /* XXX */
50 }
52 void
53 gdb_arch_enter(struct cpu_user_regs *regs)
54 {
55 /* nothing */
56 }
58 void
59 gdb_arch_exit(struct cpu_user_regs *regs)
60 {
61 /* nothing */
62 }
64 void
65 gdb_arch_resume(struct cpu_user_regs *regs,
66 unsigned long addr, unsigned long type,
67 struct gdb_context *ctx)
68 {
69 if ( addr != -1UL )
70 regs->eip = addr;
72 regs->eflags &= ~X86_EFLAGS_TF;
74 /* Set eflags.RF to ensure we do not re-enter. */
75 regs->eflags |= X86_EFLAGS_RF;
77 /* Set the trap flag if we are single stepping. */
78 if ( type == GDB_STEP )
79 regs->eflags |= X86_EFLAGS_TF;
80 }
82 /*
83 * Local variables:
84 * mode: C
85 * c-set-style: "BSD"
86 * c-basic-offset: 4
87 * tab-width: 4
88 * End:
89 */