wined3d: Pass a wined3d_state structure to device_preload_texture().
[wine/multimedia.git] / programs / winedbg / be_arm.c
blobf81f14ddd778fd5b85080d66b28de677864b078c
1 /*
2 * Debugger ARM specific functions
4 * Copyright 2000-2003 Marcus Meissner
5 * 2004 Eric Pouech
6 * 2010 André Hentschel
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library 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 GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "debugger.h"
25 #if defined(__arm__)
27 static unsigned be_arm_get_addr(HANDLE hThread, const CONTEXT* ctx,
28 enum be_cpu_addr bca, ADDRESS64* addr)
30 switch (bca)
32 case be_cpu_addr_pc:
33 return be_cpu_build_addr(hThread, ctx, addr, 0, ctx->Pc);
34 case be_cpu_addr_stack:
35 return be_cpu_build_addr(hThread, ctx, addr, 0, ctx->Sp);
36 default:
37 case be_cpu_addr_frame:
38 dbg_printf("not done\n");
40 return FALSE;
43 static unsigned be_arm_get_register_info(int regno, enum be_cpu_addr* kind)
45 dbg_printf("not done\n");
46 return FALSE;
49 static void be_arm_single_step(CONTEXT* ctx, unsigned enable)
51 dbg_printf("not done\n");
54 static void be_arm_print_context(HANDLE hThread, const CONTEXT* ctx, int all_regs)
56 dbg_printf("Context printing for arm not done yet\n");
59 static void be_arm_print_segment_info(HANDLE hThread, const CONTEXT* ctx)
63 static struct dbg_internal_var be_arm_ctx[] =
65 {0, NULL, 0, dbg_itype_none}
68 static unsigned be_arm_is_step_over_insn(const void* insn)
70 dbg_printf("not done\n");
71 return FALSE;
74 static unsigned be_arm_is_function_return(const void* insn)
76 dbg_printf("not done\n");
77 return FALSE;
80 static unsigned be_arm_is_break_insn(const void* insn)
82 dbg_printf("not done\n");
83 return FALSE;
86 static unsigned be_arm_is_func_call(const void* insn, ADDRESS64* callee)
88 return FALSE;
91 static void be_arm_disasm_one_insn(ADDRESS64* addr, int display)
93 dbg_printf("Disasm NIY\n");
96 static unsigned be_arm_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
97 CONTEXT* ctx, enum be_xpoint_type type,
98 void* addr, unsigned long* val, unsigned size)
100 SIZE_T sz;
102 switch (type)
104 case be_xpoint_break:
105 if (!size) return 0;
106 if (!pio->read(hProcess, addr, val, 4, &sz) || sz != 4) return 0;
107 default:
108 dbg_printf("Unknown/unsupported bp type %c\n", type);
109 return 0;
111 return 1;
114 static unsigned be_arm_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
115 CONTEXT* ctx, enum be_xpoint_type type,
116 void* addr, unsigned long val, unsigned size)
118 SIZE_T sz;
120 switch (type)
122 case be_xpoint_break:
123 if (!size) return 0;
124 if (!pio->write(hProcess, addr, &val, 4, &sz) || sz == 4) return 0;
125 break;
126 default:
127 dbg_printf("Unknown/unsupported bp type %c\n", type);
128 return 0;
130 return 1;
133 static unsigned be_arm_is_watchpoint_set(const CONTEXT* ctx, unsigned idx)
135 dbg_printf("not done\n");
136 return FALSE;
139 static void be_arm_clear_watchpoint(CONTEXT* ctx, unsigned idx)
141 dbg_printf("not done\n");
144 static int be_arm_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
146 dbg_printf("not done\n");
147 return 0;
150 static int be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
151 unsigned ext_sign, LONGLONG* ret)
153 dbg_printf("not done\n");
154 return FALSE;
157 static int be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
158 long double* ret)
160 dbg_printf("not done\n");
161 return FALSE;
164 struct backend_cpu be_arm =
166 IMAGE_FILE_MACHINE_ARM,
168 be_cpu_linearize,
169 be_cpu_build_addr,
170 be_arm_get_addr,
171 be_arm_get_register_info,
172 be_arm_single_step,
173 be_arm_print_context,
174 be_arm_print_segment_info,
175 be_arm_ctx,
176 be_arm_is_step_over_insn,
177 be_arm_is_function_return,
178 be_arm_is_break_insn,
179 be_arm_is_func_call,
180 be_arm_disasm_one_insn,
181 be_arm_insert_Xpoint,
182 be_arm_remove_Xpoint,
183 be_arm_is_watchpoint_set,
184 be_arm_clear_watchpoint,
185 be_arm_adjust_pc_for_break,
186 be_arm_fetch_integer,
187 be_arm_fetch_float,
189 #endif