~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/programs/winedbg/be_arm.c

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Debugger ARM specific functions
  3  *
  4  * Copyright 2000-2003 Marcus Meissner
  5  *                2004 Eric Pouech
  6  *                2010 André Hentschel
  7  *
  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.
 12  *
 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.
 17  *
 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
 21  */
 22 
 23 #include "debugger.h"
 24 
 25 #if defined(__arm__)
 26 
 27 static unsigned be_arm_get_addr(HANDLE hThread, const CONTEXT* ctx,
 28                                 enum be_cpu_addr bca, ADDRESS64* addr)
 29 {
 30     switch (bca)
 31     {
 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     case be_cpu_addr_frame:
 37         return be_cpu_build_addr(hThread, ctx, addr, 0, ctx->Fp);
 38     }
 39     return FALSE;
 40 }
 41 
 42 static unsigned be_arm_get_register_info(int regno, enum be_cpu_addr* kind)
 43 {
 44     dbg_printf("not done\n");
 45     return FALSE;
 46 }
 47 
 48 static void be_arm_single_step(CONTEXT* ctx, unsigned enable)
 49 {
 50     dbg_printf("not done\n");
 51 }
 52 
 53 static void be_arm_print_context(HANDLE hThread, const CONTEXT* ctx, int all_regs)
 54 {
 55     dbg_printf("Context printing for arm not done yet\n");
 56 }
 57 
 58 static void be_arm_print_segment_info(HANDLE hThread, const CONTEXT* ctx)
 59 {
 60 }
 61 
 62 static struct dbg_internal_var be_arm_ctx[] =
 63 {
 64     {0,                 NULL,           0,                                      dbg_itype_none}
 65 };
 66 
 67 static unsigned be_arm_is_step_over_insn(const void* insn)
 68 {
 69     dbg_printf("not done\n");
 70     return FALSE;
 71 }
 72 
 73 static unsigned be_arm_is_function_return(const void* insn)
 74 {
 75     dbg_printf("not done\n");
 76     return FALSE;
 77 }
 78 
 79 static unsigned be_arm_is_break_insn(const void* insn)
 80 {
 81     dbg_printf("not done\n");
 82     return FALSE;
 83 }
 84 
 85 static unsigned be_arm_is_func_call(const void* insn, ADDRESS64* callee)
 86 {
 87     return FALSE;
 88 }
 89 
 90 static unsigned be_arm_is_jump(const void* insn, ADDRESS64* jumpee)
 91 {
 92     return FALSE;
 93 }
 94 
 95 static void be_arm_disasm_one_insn(ADDRESS64* addr, int display)
 96 {
 97     dbg_printf("Disasm NIY\n");
 98 }
 99 
100 static unsigned be_arm_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
101                                      CONTEXT* ctx, enum be_xpoint_type type,
102                                      void* addr, unsigned long* val, unsigned size)
103 {
104     SIZE_T              sz;
105 
106     switch (type)
107     {
108     case be_xpoint_break:
109         if (!size) return 0;
110         if (!pio->read(hProcess, addr, val, 4, &sz) || sz != 4) return 0;
111     default:
112         dbg_printf("Unknown/unsupported bp type %c\n", type);
113         return 0;
114     }
115     return 1;
116 }
117 
118 static unsigned be_arm_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
119                                      CONTEXT* ctx, enum be_xpoint_type type,
120                                      void* addr, unsigned long val, unsigned size)
121 {
122     SIZE_T              sz;
123 
124     switch (type)
125     {
126     case be_xpoint_break:
127         if (!size) return 0;
128         if (!pio->write(hProcess, addr, &val, 4, &sz) || sz == 4) return 0;
129         break;
130     default:
131         dbg_printf("Unknown/unsupported bp type %c\n", type);
132         return 0;
133     }
134     return 1;
135 }
136 
137 static unsigned be_arm_is_watchpoint_set(const CONTEXT* ctx, unsigned idx)
138 {
139     dbg_printf("not done\n");
140     return FALSE;
141 }
142 
143 static void be_arm_clear_watchpoint(CONTEXT* ctx, unsigned idx)
144 {
145     dbg_printf("not done\n");
146 }
147 
148 static int be_arm_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
149 {
150     if (way)
151     {
152         ctx->Pc--;
153         return -1;
154     }
155     ctx->Pc++;
156     return 1;
157 }
158 
159 static int be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
160                                 unsigned ext_sign, LONGLONG* ret)
161 {
162     dbg_printf("not done\n");
163     return FALSE;
164 }
165 
166 static int be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
167                               long double* ret)
168 {
169     dbg_printf("not done\n");
170     return FALSE;
171 }
172 
173 struct backend_cpu be_arm =
174 {
175     IMAGE_FILE_MACHINE_ARM,
176     4,
177     be_cpu_linearize,
178     be_cpu_build_addr,
179     be_arm_get_addr,
180     be_arm_get_register_info,
181     be_arm_single_step,
182     be_arm_print_context,
183     be_arm_print_segment_info,
184     be_arm_ctx,
185     be_arm_is_step_over_insn,
186     be_arm_is_function_return,
187     be_arm_is_break_insn,
188     be_arm_is_func_call,
189     be_arm_is_jump,
190     be_arm_disasm_one_insn,
191     be_arm_insert_Xpoint,
192     be_arm_remove_Xpoint,
193     be_arm_is_watchpoint_set,
194     be_arm_clear_watchpoint,
195     be_arm_adjust_pc_for_break,
196     be_arm_fetch_integer,
197     be_arm_fetch_float,
198 };
199 #endif
200 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.