GDB (xrefs)
/tmp/gdb-7.10/gdb/vax-tdep.c
Go to the documentation of this file.
1 /* Target-dependent code for the VAX.
2 
3  Copyright (C) 1986-2015 Free Software Foundation, Inc.
4 
5  This file is part of GDB.
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 #include "defs.h"
21 #include "arch-utils.h"
22 #include "dis-asm.h"
23 #include "floatformat.h"
24 #include "frame.h"
25 #include "frame-base.h"
26 #include "frame-unwind.h"
27 #include "gdbcore.h"
28 #include "gdbtypes.h"
29 #include "osabi.h"
30 #include "regcache.h"
31 #include "regset.h"
32 #include "trad-frame.h"
33 #include "value.h"
34 
35 #include "vax-tdep.h"
36 
37 /* Return the name of register REGNUM. */
38 
39 static const char *
40 vax_register_name (struct gdbarch *gdbarch, int regnum)
41 {
42  static char *register_names[] =
43  {
44  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
45  "r8", "r9", "r10", "r11", "ap", "fp", "sp", "pc",
46  "ps",
47  };
48 
49  if (regnum >= 0 && regnum < ARRAY_SIZE (register_names))
50  return register_names[regnum];
51 
52  return NULL;
53 }
54 
55 /* Return the GDB type object for the "standard" data type of data in
56  register REGNUM. */
57 
58 static struct type *
59 vax_register_type (struct gdbarch *gdbarch, int regnum)
60 {
61  return builtin_type (gdbarch)->builtin_int;
62 }
63 
64 /* Core file support. */
65 
66 /* Supply register REGNUM from the buffer specified by GREGS and LEN
67  in the general-purpose register set REGSET to register cache
68  REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
69 
70 static void
72  int regnum, const void *gregs, size_t len)
73 {
74  const gdb_byte *regs = gregs;
75  int i;
76 
77  for (i = 0; i < VAX_NUM_REGS; i++)
78  {
79  if (regnum == i || regnum == -1)
80  regcache_raw_supply (regcache, i, regs + i * 4);
81  }
82 }
83 
84 /* VAX register set. */
85 
86 static const struct regset vax_gregset =
87 {
88  NULL,
90 };
91 
92 /* Iterate over core file register note sections. */
93 
94 static void
95 vax_iterate_over_regset_sections (struct gdbarch *gdbarch,
97  void *cb_data,
98  const struct regcache *regcache)
99 {
100  cb (".reg", VAX_NUM_REGS * 4, &vax_gregset, NULL, cb_data);
101 }
102 
103 /* The VAX UNIX calling convention uses R1 to pass a structure return
104  value address instead of passing it as a first (hidden) argument as
105  the VMS calling convention suggests. */
106 
107 static CORE_ADDR
109  struct value **args, CORE_ADDR sp)
110 {
111  struct gdbarch *gdbarch = get_regcache_arch (regcache);
112  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
113  gdb_byte buf[4];
114  int count = 0;
115  int i;
116 
117  /* We create an argument list on the stack, and make the argument
118  pointer to it. */
119 
120  /* Push arguments in reverse order. */
121  for (i = nargs - 1; i >= 0; i--)
122  {
123  int len = TYPE_LENGTH (value_enclosing_type (args[i]));
124 
125  sp -= (len + 3) & ~3;
126  count += (len + 3) / 4;
127  write_memory (sp, value_contents_all (args[i]), len);
128  }
129 
130  /* Push argument count. */
131  sp -= 4;
132  store_unsigned_integer (buf, 4, byte_order, count);
133  write_memory (sp, buf, 4);
134 
135  /* Update the argument pointer. */
136  store_unsigned_integer (buf, 4, byte_order, sp);
137  regcache_cooked_write (regcache, VAX_AP_REGNUM, buf);
138 
139  return sp;
140 }
141 
142 static CORE_ADDR
143 vax_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
144  struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
145  struct value **args, CORE_ADDR sp, int struct_return,
146  CORE_ADDR struct_addr)
147 {
148  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
149  CORE_ADDR fp = sp;
150  gdb_byte buf[4];
151 
152  /* Set up the function arguments. */
153  sp = vax_store_arguments (regcache, nargs, args, sp);
154 
155  /* Store return value address. */
156  if (struct_return)
157  regcache_cooked_write_unsigned (regcache, VAX_R1_REGNUM, struct_addr);
158 
159  /* Store return address in the PC slot. */
160  sp -= 4;
161  store_unsigned_integer (buf, 4, byte_order, bp_addr);
162  write_memory (sp, buf, 4);
163 
164  /* Store the (fake) frame pointer in the FP slot. */
165  sp -= 4;
166  store_unsigned_integer (buf, 4, byte_order, fp);
167  write_memory (sp, buf, 4);
168 
169  /* Skip the AP slot. */
170  sp -= 4;
171 
172  /* Store register save mask and control bits. */
173  sp -= 4;
174  store_unsigned_integer (buf, 4, byte_order, 0);
175  write_memory (sp, buf, 4);
176 
177  /* Store condition handler. */
178  sp -= 4;
179  store_unsigned_integer (buf, 4, byte_order, 0);
180  write_memory (sp, buf, 4);
181 
182  /* Update the stack pointer and frame pointer. */
183  store_unsigned_integer (buf, 4, byte_order, sp);
184  regcache_cooked_write (regcache, VAX_SP_REGNUM, buf);
185  regcache_cooked_write (regcache, VAX_FP_REGNUM, buf);
186 
187  /* Return the saved (fake) frame pointer. */
188  return fp;
189 }
190 
191 static struct frame_id
192 vax_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
193 {
194  CORE_ADDR fp;
195 
196  fp = get_frame_register_unsigned (this_frame, VAX_FP_REGNUM);
197  return frame_id_build (fp, get_frame_pc (this_frame));
198 }
199 
200 
201 static enum return_value_convention
202 vax_return_value (struct gdbarch *gdbarch, struct value *function,
203  struct type *type, struct regcache *regcache,
204  gdb_byte *readbuf, const gdb_byte *writebuf)
205 {
206  int len = TYPE_LENGTH (type);
207  gdb_byte buf[8];
208 
209  if (TYPE_CODE (type) == TYPE_CODE_STRUCT
210  || TYPE_CODE (type) == TYPE_CODE_UNION
211  || TYPE_CODE (type) == TYPE_CODE_ARRAY)
212  {
213  /* The default on VAX is to return structures in static memory.
214  Consequently a function must return the address where we can
215  find the return value. */
216 
217  if (readbuf)
218  {
219  ULONGEST addr;
220 
221  regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr);
222  read_memory (addr, readbuf, len);
223  }
224 
226  }
227 
228  if (readbuf)
229  {
230  /* Read the contents of R0 and (if necessary) R1. */
231  regcache_cooked_read (regcache, VAX_R0_REGNUM, buf);
232  if (len > 4)
233  regcache_cooked_read (regcache, VAX_R1_REGNUM, buf + 4);
234  memcpy (readbuf, buf, len);
235  }
236  if (writebuf)
237  {
238  /* Read the contents to R0 and (if necessary) R1. */
239  memcpy (buf, writebuf, len);
240  regcache_cooked_write (regcache, VAX_R0_REGNUM, buf);
241  if (len > 4)
242  regcache_cooked_write (regcache, VAX_R1_REGNUM, buf + 4);
243  }
244 
246 }
247 
248 
249 /* Use the program counter to determine the contents and size of a
250  breakpoint instruction. Return a pointer to a string of bytes that
251  encode a breakpoint instruction, store the length of the string in
252  *LEN and optionally adjust *PC to point to the correct memory
253  location for inserting the breakpoint. */
254 
255 static const gdb_byte *
256 vax_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
257 {
258  static gdb_byte break_insn[] = { 3 };
259 
260  *len = sizeof (break_insn);
261  return break_insn;
262 }
263 
264 /* Advance PC across any function entry prologue instructions
265  to reach some "real" code. */
266 
267 static CORE_ADDR
268 vax_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
269 {
270  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
271  gdb_byte op = read_memory_unsigned_integer (pc, 1, byte_order);
272 
273  if (op == 0x11)
274  pc += 2; /* skip brb */
275  if (op == 0x31)
276  pc += 3; /* skip brw */
277  if (op == 0xC2
278  && read_memory_unsigned_integer (pc + 2, 1, byte_order) == 0x5E)
279  pc += 3; /* skip subl2 */
280  if (op == 0x9E
281  && read_memory_unsigned_integer (pc + 1, 1, byte_order) == 0xAE
282  && read_memory_unsigned_integer (pc + 3, 1, byte_order) == 0x5E)
283  pc += 4; /* skip movab */
284  if (op == 0x9E
285  && read_memory_unsigned_integer (pc + 1, 1, byte_order) == 0xCE
286  && read_memory_unsigned_integer (pc + 4, 1, byte_order) == 0x5E)
287  pc += 5; /* skip movab */
288  if (op == 0x9E
289  && read_memory_unsigned_integer (pc + 1, 1, byte_order) == 0xEE
290  && read_memory_unsigned_integer (pc + 6, 1, byte_order) == 0x5E)
291  pc += 7; /* skip movab */
292 
293  return pc;
294 }
295 
296 
297 /* Unwinding the stack is relatively easy since the VAX has a
298  dedicated frame pointer, and frames are set up automatically as the
299  result of a function call. Most of the relevant information can be
300  inferred from the documentation of the Procedure Call Instructions
301  in the VAX MACRO and Instruction Set Reference Manual. */
302 
304 {
305  /* Base address. */
307 
308  /* Table of saved registers. */
310 };
311 
312 static struct vax_frame_cache *
313 vax_frame_cache (struct frame_info *this_frame, void **this_cache)
314 {
315  struct vax_frame_cache *cache;
316  CORE_ADDR addr;
317  ULONGEST mask;
318  int regnum;
319 
320  if (*this_cache)
321  return *this_cache;
322 
323  /* Allocate a new cache. */
324  cache = FRAME_OBSTACK_ZALLOC (struct vax_frame_cache);
325  cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
326 
327  /* The frame pointer is used as the base for the frame. */
328  cache->base = get_frame_register_unsigned (this_frame, VAX_FP_REGNUM);
329  if (cache->base == 0)
330  return cache;
331 
332  /* The register save mask and control bits determine the layout of
333  the stack frame. */
334  mask = get_frame_memory_unsigned (this_frame, cache->base + 4, 4) >> 16;
335 
336  /* These are always saved. */
337  cache->saved_regs[VAX_PC_REGNUM].addr = cache->base + 16;
338  cache->saved_regs[VAX_FP_REGNUM].addr = cache->base + 12;
339  cache->saved_regs[VAX_AP_REGNUM].addr = cache->base + 8;
340  cache->saved_regs[VAX_PS_REGNUM].addr = cache->base + 4;
341 
342  /* Scan the register save mask and record the location of the saved
343  registers. */
344  addr = cache->base + 20;
345  for (regnum = 0; regnum < VAX_AP_REGNUM; regnum++)
346  {
347  if (mask & (1 << regnum))
348  {
349  cache->saved_regs[regnum].addr = addr;
350  addr += 4;
351  }
352  }
353 
354  /* The CALLS/CALLG flag determines whether this frame has a General
355  Argument List or a Stack Argument List. */
356  if (mask & (1 << 13))
357  {
358  ULONGEST numarg;
359 
360  /* This is a procedure with Stack Argument List. Adjust the
361  stack address for the arguments that were pushed onto the
362  stack. The return instruction will automatically pop the
363  arguments from the stack. */
364  numarg = get_frame_memory_unsigned (this_frame, addr, 1);
365  addr += 4 + numarg * 4;
366  }
367 
368  /* Bits 1:0 of the stack pointer were saved in the control bits. */
369  trad_frame_set_value (cache->saved_regs, VAX_SP_REGNUM, addr + (mask >> 14));
370 
371  return cache;
372 }
373 
374 static void
375 vax_frame_this_id (struct frame_info *this_frame, void **this_cache,
376  struct frame_id *this_id)
377 {
378  struct vax_frame_cache *cache = vax_frame_cache (this_frame, this_cache);
379 
380  /* This marks the outermost frame. */
381  if (cache->base == 0)
382  return;
383 
384  (*this_id) = frame_id_build (cache->base, get_frame_func (this_frame));
385 }
386 
387 static struct value *
389  void **this_cache, int regnum)
390 {
391  struct vax_frame_cache *cache = vax_frame_cache (this_frame, this_cache);
392 
393  return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
394 }
395 
396 static const struct frame_unwind vax_frame_unwind =
397 {
398  NORMAL_FRAME,
402  NULL,
404 };
405 
406 
407 static CORE_ADDR
408 vax_frame_base_address (struct frame_info *this_frame, void **this_cache)
409 {
410  struct vax_frame_cache *cache = vax_frame_cache (this_frame, this_cache);
411 
412  return cache->base;
413 }
414 
415 static CORE_ADDR
416 vax_frame_args_address (struct frame_info *this_frame, void **this_cache)
417 {
418  return get_frame_register_unsigned (this_frame, VAX_AP_REGNUM);
419 }
420 
421 static const struct frame_base vax_frame_base =
422 {
427 };
428 
429 /* Return number of arguments for FRAME. */
430 
431 static int
433 {
434  CORE_ADDR args;
435 
436  /* Assume that the argument pointer for the outermost frame is
437  hosed, as is the case on NetBSD/vax ELF. */
438  if (get_frame_base_address (frame) == 0)
439  return 0;
440 
442  return get_frame_memory_unsigned (frame, args, 1);
443 }
444 
445 static CORE_ADDR
446 vax_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
447 {
448  return frame_unwind_register_unsigned (next_frame, VAX_PC_REGNUM);
449 }
450 
451 
452 /* Initialize the current architecture based on INFO. If possible, re-use an
453  architecture from ARCHES, which is a list of architectures already created
454  during this debugging session.
455 
456  Called e.g. at program startup, when reading a core file, and when reading
457  a binary file. */
458 
459 static struct gdbarch *
460 vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
461 {
462  struct gdbarch *gdbarch;
463 
464  /* If there is already a candidate, use it. */
465  arches = gdbarch_list_lookup_by_info (arches, &info);
466  if (arches != NULL)
467  return arches->gdbarch;
468 
469  gdbarch = gdbarch_alloc (&info, NULL);
470 
474  set_gdbarch_long_double_bit (gdbarch, 64);
475 
476  /* Register info */
483 
486 
487  /* Frame and stack info */
490  set_gdbarch_frame_args_skip (gdbarch, 4);
491 
492  /* Stack grows downward. */
494 
495  /* Return value info */
497 
498  /* Call dummy code. */
501 
502  /* Breakpoint info */
504 
505  /* Misc info */
508 
509  set_gdbarch_print_insn (gdbarch, print_insn_vax);
510 
512 
513  frame_base_set_default (gdbarch, &vax_frame_base);
514 
515  /* Hook in ABI-specific overrides, if they have been registered. */
516  gdbarch_init_osabi (info, gdbarch);
517 
518  frame_unwind_append_unwinder (gdbarch, &vax_frame_unwind);
519 
520  return (gdbarch);
521 }
522 
523 /* Provide a prototype to silence -Wmissing-prototypes. */
524 void _initialize_vax_tdep (void);
525 
526 void
528 {
529  gdbarch_register (bfd_arch_vax, vax_gdbarch_init, NULL);
530 }
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
Definition: gdbarch.c:1909
void set_gdbarch_float_format(struct gdbarch *gdbarch, const struct floatformat **float_format)
Definition: gdbarch.c:1617
const struct floatformat * floatformats_vax_f[BFD_ENDIAN_UNKNOWN]
Definition: gdbtypes.c:102
void set_gdbarch_ps_regnum(struct gdbarch *gdbarch, int ps_regnum)
Definition: gdbarch.c:2025
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
Definition: frame.c:554
static struct vax_frame_cache * vax_frame_cache(struct frame_info *this_frame, void **this_cache)
Definition: vax-tdep.c:313
CORE_ADDR get_frame_pc(struct frame_info *frame)
Definition: frame.c:2217
bfd_vma CORE_ADDR
Definition: common-types.h:41
static const gdb_byte * vax_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
Definition: vax-tdep.c:256
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
Definition: osabi.c:341
void set_gdbarch_frame_num_args(struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype frame_num_args)
Definition: gdbarch.c:2911
struct value * trad_frame_get_prev_register(struct frame_info *this_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum)
Definition: trad-frame.c:135
struct gdbarch * get_regcache_arch(const struct regcache *regcache)
Definition: regcache.c:297
void trad_frame_set_value(struct trad_frame_saved_reg this_saved_regs[], int regnum, LONGEST val)
Definition: trad-frame.c:92
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
Definition: frame.c:1182
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
Definition: gdbtypes.c:4766
static CORE_ADDR vax_store_arguments(struct regcache *regcache, int nargs, struct value **args, CORE_ADDR sp)
Definition: vax-tdep.c:108
return_value_convention
Definition: defs.h:206
static CORE_ADDR vax_frame_args_address(struct frame_info *this_frame, void **this_cache)
Definition: vax-tdep.c:416
static void vax_iterate_over_regset_sections(struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
Definition: vax-tdep.c:95
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
Definition: gdbarch.c:4985
ULONGEST get_frame_memory_unsigned(struct frame_info *this_frame, CORE_ADDR addr, int len)
Definition: frame.c:2515
static CORE_ADDR vax_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: vax-tdep.c:408
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
Definition: frame-unwind.c:78
#define FRAME_OBSTACK_ZALLOC(TYPE)
Definition: frame.h:660
void store_unsigned_integer(gdb_byte *, int, enum bfd_endian, ULONGEST)
Definition: findvar.c:212
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep)
Definition: gdbarch.c:4933
Definition: regset.h:34
#define VAX_NUM_REGS
Definition: vax-tdep.h:37
static CORE_ADDR vax_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
Definition: vax-tdep.c:446
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
Definition: frame-base.c:94
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
Definition: gdbarch.c:2151
static CORE_ADDR vax_push_dummy_call(struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
Definition: vax-tdep.c:143
const struct floatformat * floatformats_vax_d[BFD_ENDIAN_UNKNOWN]
Definition: gdbtypes.c:106
static const char * vax_register_name(struct gdbarch *gdbarch, int regnum)
Definition: vax-tdep.c:40
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
Definition: gdbarch.c:1991
CORE_ADDR base
Definition: vax-tdep.c:306
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
Definition: gdbarch.c:2175
struct_return
Definition: arm-tdep.h:148
void set_gdbarch_believe_pcc_promotion(struct gdbarch *gdbarch, int believe_pcc_promotion)
Definition: gdbarch.c:2406
const gdb_byte * value_contents_all(struct value *value)
Definition: value.c:1188
struct type * value_enclosing_type(struct value *value)
Definition: value.c:1098
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
Definition: gdbarch.c:1420
Definition: gdbtypes.h:749
static void vax_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: vax-tdep.c:375
static CORE_ADDR vax_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
Definition: vax-tdep.c:268
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
Definition: gdbarch.c:2863
static void vax_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: vax-tdep.c:71
void set_gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
Definition: gdbarch.c:2672
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
Definition: frame-unwind.c:170
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
Definition: regcache.c:690
struct gdbarch * gdbarch
Definition: gdbarch.h:1542
int regnum
Definition: aarch64-tdep.c:69
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
Definition: corefile.c:244
void( iterate_over_regset_sections_cb)(const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
Definition: gdbarch.h:98
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
Definition: frame.c:1194
static struct frame_id vax_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
Definition: vax-tdep.c:192
void set_gdbarch_frame_args_skip(struct gdbarch *gdbarch, CORE_ADDR frame_args_skip)
Definition: gdbarch.c:2839
Definition: value.c:172
void set_gdbarch_deprecated_function_start_offset(struct gdbarch *gdbarch, CORE_ADDR deprecated_function_start_offset)
Definition: gdbarch.c:2781
CORE_ADDR get_frame_base_address(struct frame_info *fi)
Definition: frame.c:2396
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct frame_info *this_frame)
Definition: trad-frame.c:52
static struct value * vax_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: vax-tdep.c:388
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
Definition: arch-utils.c:138
bfd_byte gdb_byte
Definition: common-types.h:38
static struct gdbarch * vax_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
Definition: vax-tdep.c:460
static int vax_frame_num_args(struct frame_info *frame)
Definition: vax-tdep.c:432
static struct type * vax_register_type(struct gdbarch *gdbarch, int regnum)
Definition: vax-tdep.c:59
#define TYPE_CODE(thistype)
Definition: gdbtypes.h:1240
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
Definition: regcache.c:871
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
Definition: regcache.c:737
void _initialize_vax_tdep(void)
Definition: vax-tdep.c:527
void set_gdbarch_double_format(struct gdbarch *gdbarch, const struct floatformat **double_format)
Definition: gdbarch.c:1650
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
Definition: regcache.c:1041
unsigned long long ULONGEST
Definition: common-types.h:53
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: frame-unwind.c:180
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
Definition: gdbarch.c:1667
CORE_ADDR addr
Definition: frame.c:119
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
Definition: gdbarch.c:2556
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
Definition: gdbarch.c:1683
#define TYPE_LENGTH(thistype)
Definition: gdbtypes.h:1237
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
Definition: gdbarch.c:2216
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
Definition: corefile.c:321
void set_gdbarch_iterate_over_regset_sections(struct gdbarch *gdbarch, gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
Definition: gdbarch.c:3398
static const struct frame_unwind vax_frame_unwind
Definition: vax-tdep.c:396
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
Definition: corefile.c:389
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype skip_prologue)
Definition: gdbarch.c:2590
enum bfd_endian byte_order
Definition: gdbarch.c:128
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
Definition: gdbarch.c:2008
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype register_name)
Definition: gdbarch.c:2127
CORE_ADDR get_frame_func(struct frame_info *this_frame)
Definition: frame.c:920
static enum return_value_convention vax_return_value(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
Definition: vax-tdep.c:202
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep *tdep)
Definition: gdbarch.c:339
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
Definition: gdbarch.c:2655
void regcache_cooked_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
Definition: regcache.c:930
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
Definition: gdbarch.c:3067
struct trad_frame_saved_reg * saved_regs
Definition: vax-tdep.c:309
struct type * builtin_int
Definition: gdbtypes.h:1483
const ULONGEST const LONGEST len
Definition: target.h:309