ia64/xen-unstable

view xen/arch/x86/x86_32/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 */
23 #include <asm/debugger.h>
25 void
26 gdb_arch_read_reg_array(struct cpu_user_regs *regs, struct gdb_context *ctx)
27 {
28 #define GDB_REG(r) gdb_write_to_packet_hex(r, sizeof(r), ctx);
29 GDB_REG(regs->eax);
30 GDB_REG(regs->ecx);
31 GDB_REG(regs->edx);
32 GDB_REG(regs->ebx);
33 GDB_REG(regs->esp);
34 GDB_REG(regs->ebp);
35 GDB_REG(regs->esi);
36 GDB_REG(regs->edi);
37 GDB_REG(regs->eip);
38 GDB_REG(regs->eflags);
39 #undef GDB_REG
40 #define GDB_SEG_REG(s) gdb_write_to_packet_hex(s, sizeof(u32), ctx);
41 /* sizeof(segment) = 16bit */
42 /* but gdb requires its return value as 32bit value */
43 GDB_SEG_REG(regs->cs);
44 GDB_SEG_REG(regs->ss);
45 GDB_SEG_REG(regs->ds);
46 GDB_SEG_REG(regs->es);
47 GDB_SEG_REG(regs->fs);
48 GDB_SEG_REG(regs->gs);
49 #undef GDB_SEG_REG
50 gdb_send_packet(ctx);
51 }
53 void
54 gdb_arch_write_reg_array(struct cpu_user_regs *regs, const char* buf,
55 struct gdb_context *ctx)
56 {
57 /* XXX TODO */
58 gdb_send_reply("E02", ctx);
59 }
61 void
62 gdb_arch_read_reg(unsigned long regnum, struct cpu_user_regs *regs,
63 struct gdb_context *ctx)
64 {
65 gdb_send_reply("", ctx);
66 }
68 void
69 gdb_arch_write_reg(unsigned long regnum, unsigned long val,
70 struct cpu_user_regs *regs, struct gdb_context *ctx)
71 {
72 gdb_send_reply("", ctx);
73 }
75 /*
76 * Local variables:
77 * mode: C
78 * c-set-style: "BSD"
79 * c-basic-offset: 4
80 * tab-width: 4
81 * End:
82 */