GDB (xrefs)

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