* stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument
[deliverable/binutils-gdb.git] / gdb / config / sparc / tm-sparc.h
1 /* Target machine sub-parameters for SPARC, for GDB, the GNU debugger.
2 This is included by other tm-*.h files to define SPARC cpu-related info.
3 Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
4 Contributed by Michael Tiemann (tiemann@mcc.com)
5
6 This file is part of GDB.
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
21
22 #define TARGET_BYTE_ORDER BIG_ENDIAN
23
24 /* Floating point is IEEE compatible. */
25 #define IEEE_FLOAT
26
27 /* When passing a structure to a function, Sun cc passes the address
28 not the structure itself. It (under SunOS4) creates two symbols,
29 which we need to combine to a LOC_REGPARM. Gcc version two (as of
30 1.92) behaves like sun cc. REG_STRUCT_HAS_ADDR is smart enough to
31 distinguish between Sun cc, gcc version 1 and gcc version 2. */
32
33 #define REG_STRUCT_HAS_ADDR(gcc_p,type) (gcc_p != 1)
34
35 /* Sun /bin/cc gets this right as of SunOS 4.1.x. We need to define
36 BELIEVE_PCC_PROMOTION to get this right now that the code which
37 detects gcc2_compiled. is broken. This loses for SunOS 4.0.x and
38 earlier. */
39
40 #define BELIEVE_PCC_PROMOTION 1
41
42 /* For acc, there's no need to correct LBRAC entries by guessing how
43 they should work. In fact, this is harmful because the LBRAC
44 entries now all appear at the end of the function, not intermixed
45 with the SLINE entries. n_opt_found detects acc for Solaris binaries;
46 function_stab_type detects acc for SunOS4 binaries.
47
48 For binary from SunOS4 /bin/cc, need to correct LBRAC's.
49
50 For gcc, like acc, don't correct. */
51
52 #define SUN_FIXED_LBRAC_BUG \
53 (n_opt_found \
54 || function_stab_type == N_STSYM \
55 || function_stab_type == N_GSYM \
56 || processing_gcc_compilation)
57
58 /* Do variables in the debug stabs occur after the N_LBRAC or before it?
59 acc: after, gcc: before, SunOS4 /bin/cc: before. */
60
61 #define VARIABLES_INSIDE_BLOCK(desc, gcc_p) \
62 (!(gcc_p) \
63 && (n_opt_found \
64 || function_stab_type == N_STSYM \
65 || function_stab_type == N_GSYM))
66
67 /* Offset from address of function to start of its code.
68 Zero on most machines. */
69
70 #define FUNCTION_START_OFFSET 0
71
72 /* Advance PC across any function entry prologue instructions
73 to reach some "real" code. SKIP_PROLOGUE_FRAMELESS_P advances
74 the PC past some of the prologue, but stops as soon as it
75 knows that the function has a frame. Its result is equal
76 to its input PC if the function is frameless, unequal otherwise. */
77
78 #define SKIP_PROLOGUE(pc) \
79 { pc = skip_prologue (pc, 0); }
80 #define SKIP_PROLOGUE_FRAMELESS_P(pc) \
81 { pc = skip_prologue (pc, 1); }
82 extern CORE_ADDR skip_prologue ();
83
84 /* Immediately after a function call, return the saved pc.
85 Can't go through the frames for this because on some machines
86 the new frame is not set up until the new function executes
87 some instructions. */
88
89 /* On the Sun 4 under SunOS, the compile will leave a fake insn which
90 encodes the structure size being returned. If we detect such
91 a fake insn, step past it. */
92
93 #define PC_ADJUST(pc) sparc_pc_adjust(pc)
94 extern CORE_ADDR sparc_pc_adjust();
95
96 #define SAVED_PC_AFTER_CALL(frame) PC_ADJUST (read_register (RP_REGNUM))
97
98 /* Stack grows downward. */
99
100 #define INNER_THAN <
101
102 /* Stack has strict alignment. */
103
104 #define STACK_ALIGN(ADDR) (((ADDR)+7)&-8)
105
106 /* Sequence of bytes for breakpoint instruction. */
107
108 #define BREAKPOINT {0x91, 0xd0, 0x20, 0x01}
109
110 /* Amount PC must be decremented by after a breakpoint.
111 This is often the number of bytes in BREAKPOINT
112 but not always. */
113
114 #define DECR_PC_AFTER_BREAK 0
115
116 /* Nonzero if instruction at PC is a return instruction. */
117 /* For SPARC, this is either a "jmpl %o7+8,%g0" or "jmpl %i7+8,%g0".
118
119 Note: this does not work for functions returning structures under SunOS. */
120 #define ABOUT_TO_RETURN(pc) \
121 ((read_memory_integer (pc, 4)|0x00040000) == 0x81c7e008)
122
123 /* Return 1 if P points to an invalid floating point value. */
124
125 #define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
126
127 /* Say how long (ordinary) registers are. This is a piece of bogosity
128 used in push_word and a few other places; REGISTER_RAW_SIZE is the
129 real way to know how big a register is. */
130
131 #define REGISTER_SIZE 4
132
133 /* Number of machine registers */
134
135 #define NUM_REGS 72
136
137 /* Initializer for an array of names of registers.
138 There should be NUM_REGS strings in this initializer. */
139
140 #define REGISTER_NAMES \
141 { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
142 "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", \
143 "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
144 "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7", \
145 \
146 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
147 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
148 "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
149 "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
150 \
151 "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr" }
152
153 /* Register numbers of various important registers.
154 Note that some of these values are "real" register numbers,
155 and correspond to the general registers of the machine,
156 and some are "phony" register numbers which are too large
157 to be actual register numbers as far as the user is concerned
158 but do serve to get the desired values when passed to read_register. */
159
160 #define G0_REGNUM 0 /* %g0 */
161 #define G1_REGNUM 1 /* %g1 */
162 #define O0_REGNUM 8 /* %o0 */
163 #define SP_REGNUM 14 /* Contains address of top of stack, \
164 which is also the bottom of the frame. */
165 #define RP_REGNUM 15 /* Contains return address value, *before* \
166 any windows get switched. */
167 #define O7_REGNUM 15 /* Last local reg not saved on stack frame */
168 #define L0_REGNUM 16 /* First local reg that's saved on stack frame
169 rather than in machine registers */
170 #define I0_REGNUM 24 /* %i0 */
171 #define FP_REGNUM 30 /* Contains address of executing stack frame */
172 #define I7_REGNUM 31 /* Last local reg saved on stack frame */
173 #define FP0_REGNUM 32 /* Floating point register 0 */
174 #define Y_REGNUM 64 /* Temp register for multiplication, etc. */
175 #define PS_REGNUM 65 /* Contains processor status */
176 #define WIM_REGNUM 66 /* Window Invalid Mask (not really supported) */
177 #define TBR_REGNUM 67 /* Trap Base Register (not really supported) */
178 #define PC_REGNUM 68 /* Contains program counter */
179 #define NPC_REGNUM 69 /* Contains next PC */
180 #define FPS_REGNUM 70 /* Floating point status register */
181 #define CPS_REGNUM 71 /* Coprocessor status register */
182
183 /* Total amount of space needed to store our copies of the machine's
184 register state, the array `registers'. On the sparc, `registers'
185 contains the ins and locals, even though they are saved on the
186 stack rather than with the other registers, and this causes hair
187 and confusion in places like pop_frame. It probably would be
188 better to remove the ins and locals from `registers', make sure
189 that get_saved_register can get them from the stack (even in the
190 innermost frame), and make this the way to access them. For the
191 frame pointer we would do that via TARGET_READ_FP. */
192
193 #define REGISTER_BYTES (32*4+32*4+8*4)
194
195 /* Index within `registers' of the first byte of the space for
196 register N. */
197 /* ?? */
198 #define REGISTER_BYTE(N) ((N)*4)
199
200 /* The SPARC processor has register windows. */
201
202 #define HAVE_REGISTER_WINDOWS
203
204 /* Is this register part of the register window system? A yes answer
205 implies that 1) The name of this register will not be the same in
206 other frames, and 2) This register is automatically "saved" (out
207 registers shifting into ins counts) upon subroutine calls and thus
208 there is no need to search more than one stack frame for it. */
209
210 #define REGISTER_IN_WINDOW_P(regnum) \
211 ((regnum) >= 8 && (regnum) < 32)
212
213 /* Number of bytes of storage in the actual machine representation
214 for register N. */
215
216 /* On the SPARC, all regs are 4 bytes. */
217
218 #define REGISTER_RAW_SIZE(N) (4)
219
220 /* Number of bytes of storage in the program's representation
221 for register N. */
222
223 /* On the SPARC, all regs are 4 bytes. */
224
225 #define REGISTER_VIRTUAL_SIZE(N) (4)
226
227 /* Largest value REGISTER_RAW_SIZE can have. */
228
229 #define MAX_REGISTER_RAW_SIZE 8
230
231 /* Largest value REGISTER_VIRTUAL_SIZE can have. */
232
233 #define MAX_REGISTER_VIRTUAL_SIZE 8
234
235 /* Return the GDB type object for the "standard" data type
236 of data in register N. */
237
238 #define REGISTER_VIRTUAL_TYPE(N) \
239 ((N) < 32 ? builtin_type_int : (N) < 64 ? builtin_type_float : \
240 builtin_type_int)
241
242 /* Writing to %g0 is a noop (not an error or exception or anything like
243 that, however). */
244
245 #define CANNOT_STORE_REGISTER(regno) ((regno) == G0_REGNUM)
246
247 /* Store the address of the place in which to copy the structure the
248 subroutine will return. This is called from call_function. */
249
250 #define STORE_STRUCT_RETURN(ADDR, SP) \
251 { target_write_memory ((SP)+(16*4), (char *)&(ADDR), 4); }
252
253 /* Extract from an array REGBUF containing the (raw) register state
254 a function return value of type TYPE, and copy that, in virtual format,
255 into VALBUF. */
256
257 #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
258 { \
259 if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
260 { \
261 memcpy ((VALBUF), ((int *)(REGBUF))+FP0_REGNUM, TYPE_LENGTH(TYPE));\
262 } \
263 else \
264 memcpy ((VALBUF), \
265 (char *)(REGBUF) + 4 * 8 + \
266 (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
267 TYPE_LENGTH(TYPE)); \
268 }
269
270 /* Write into appropriate registers a function return value
271 of type TYPE, given in virtual format. */
272 /* On sparc, values are returned in register %o0. */
273 #define STORE_RETURN_VALUE(TYPE,VALBUF) \
274 { \
275 if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
276 /* Floating-point values are returned in the register pair */ \
277 /* formed by %f0 and %f1 (doubles are, anyway). */ \
278 write_register_bytes (REGISTER_BYTE (FP0_REGNUM), (VALBUF), \
279 TYPE_LENGTH (TYPE)); \
280 else \
281 /* Other values are returned in register %o0. */ \
282 write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
283 TYPE_LENGTH (TYPE)); \
284 }
285
286 /* Extract from an array REGBUF containing the (raw) register state
287 the address in which a function should return its structure value,
288 as a CORE_ADDR (or an expression that can be used as one). */
289
290 #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
291 (sparc_extract_struct_value_address (REGBUF))
292
293 extern CORE_ADDR
294 sparc_extract_struct_value_address PARAMS ((char [REGISTER_BYTES]));
295
296 \f
297 /* Describe the pointer in each stack frame to the previous stack frame
298 (its caller). */
299
300 /* FRAME_CHAIN takes a frame's nominal address
301 and produces the frame's chain-pointer. */
302
303 /* In the case of the Sun 4, the frame-chain's nominal address
304 is held in the frame pointer register.
305
306 On the Sun4, the frame (in %fp) is %sp for the previous frame.
307 From the previous frame's %sp, we can find the previous frame's
308 %fp: it is in the save area just above the previous frame's %sp.
309
310 If we are setting up an arbitrary frame, we'll need to know where
311 it ends. Hence the following. This part of the frame cache
312 structure should be checked before it is assumed that this frame's
313 bottom is in the stack pointer.
314
315 If there isn't a frame below this one, the bottom of this frame is
316 in the stack pointer.
317
318 If there is a frame below this one, and the frame pointers are
319 identical, it's a leaf frame and the bottoms are the same also.
320
321 Otherwise the bottom of this frame is the top of the next frame.
322
323 The bottom field is misnamed, since it might imply that memory from
324 bottom to frame contains this frame. That need not be true if
325 stack frames are allocated in different segments (e.g. some on a
326 stack, some on a heap in the data segment). */
327
328 #define EXTRA_FRAME_INFO FRAME_ADDR bottom;
329 #define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \
330 (fci)->bottom = \
331 ((fci)->next ? \
332 ((fci)->frame == (fci)->next->frame ? \
333 (fci)->next->bottom : (fci)->next->frame) : \
334 read_register (SP_REGNUM));
335
336 #define FRAME_CHAIN(thisframe) (sparc_frame_chain (thisframe))
337 CORE_ADDR sparc_frame_chain ();
338
339 /* Define other aspects of the stack frame. */
340
341 /* A macro that tells us whether the function invocation represented
342 by FI does not have a frame on the stack associated with it. If it
343 does not, FRAMELESS is set to 1, else 0. */
344 #define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
345 (FRAMELESS) = frameless_look_for_prologue(FI)
346
347 /* The location of I0 w.r.t SP. This is actually dependent on how the system's
348 window overflow/underflow routines are written. Most vendors save the L regs
349 followed by the I regs (at the higher address). Some vendors get it wrong.
350 */
351
352 #define FRAME_SAVED_L0 0
353 #define FRAME_SAVED_I0 (8 * REGISTER_RAW_SIZE (L0_REGNUM))
354
355 /* Where is the PC for a specific frame */
356
357 #define FRAME_SAVED_PC(FRAME) sparc_frame_saved_pc (FRAME)
358 CORE_ADDR sparc_frame_saved_pc ();
359
360 /* If the argument is on the stack, it will be here. */
361 #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
362
363 #define FRAME_STRUCT_ARGS_ADDRESS(fi) ((fi)->frame)
364
365 #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
366
367 /* Set VAL to the number of args passed to frame described by FI.
368 Can set VAL to -1, meaning no way to tell. */
369
370 /* We can't tell how many args there are
371 now that the C compiler delays popping them. */
372 #define FRAME_NUM_ARGS(val,fi) (val = -1)
373
374 /* Return number of bytes at start of arglist that are not really args. */
375
376 #define FRAME_ARGS_SKIP 68
377
378 /* Put here the code to store, into a struct frame_saved_regs,
379 the addresses of the saved registers of frame described by FRAME_INFO.
380 The actual code is in sparc-tdep.c so we can debug it sanely. */
381
382 #define FRAME_FIND_SAVED_REGS(fi, frame_saved_regs) \
383 sparc_frame_find_saved_regs ((fi), &(frame_saved_regs))
384 extern void sparc_frame_find_saved_regs ();
385 \f
386 /* Things needed for making the inferior call functions. */
387 /*
388 * First of all, let me give my opinion of what the DUMMY_FRAME
389 * actually looks like.
390 *
391 * | |
392 * | |
393 * + - - - - - - - - - - - - - - - - +<-- fp (level 0)
394 * | |
395 * | |
396 * | |
397 * | |
398 * | Frame of innermost program |
399 * | function |
400 * | |
401 * | |
402 * | |
403 * | |
404 * | |
405 * |---------------------------------|<-- sp (level 0), fp (c)
406 * | |
407 * DUMMY | fp0-31 |
408 * | |
409 * | ------ |<-- fp - 0x80
410 * FRAME | g0-7 |<-- fp - 0xa0
411 * | i0-7 |<-- fp - 0xc0
412 * | other |<-- fp - 0xe0
413 * | ? |
414 * | ? |
415 * |---------------------------------|<-- sp' = fp - 0x140
416 * | |
417 * xcution start | |
418 * sp' + 0x94 -->| CALL_DUMMY (x code) |
419 * | |
420 * | |
421 * |---------------------------------|<-- sp'' = fp - 0x200
422 * | align sp to 8 byte boundary |
423 * | ==> args to fn <== |
424 * Room for | |
425 * i & l's + agg | CALL_DUMMY_STACK_ADJUST = 0x0x44|
426 * |---------------------------------|<-- final sp (variable)
427 * | |
428 * | Where function called will |
429 * | build frame. |
430 * | |
431 * | |
432 *
433 * I understand everything in this picture except what the space
434 * between fp - 0xe0 and fp - 0x140 is used for. Oh, and I don't
435 * understand why there's a large chunk of CALL_DUMMY that never gets
436 * executed (its function is superceeded by PUSH_DUMMY_FRAME; they
437 * are designed to do the same thing).
438 *
439 * PUSH_DUMMY_FRAME saves the registers above sp' and pushes the
440 * register file stack down one.
441 *
442 * call_function then writes CALL_DUMMY, pushes the args onto the
443 * stack, and adjusts the stack pointer.
444 *
445 * run_stack_dummy then starts execution (in the middle of
446 * CALL_DUMMY, as directed by call_function).
447 */
448
449 /* Push an empty stack frame, to record the current PC, etc. */
450
451 #define PUSH_DUMMY_FRAME sparc_push_dummy_frame ()
452 #define POP_FRAME sparc_pop_frame ()
453
454 void sparc_push_dummy_frame (), sparc_pop_frame ();
455 /* This sequence of words is the instructions
456
457 save %sp,-0x140,%sp
458 std %f30,[%fp-0x08]
459 std %f28,[%fp-0x10]
460 std %f26,[%fp-0x18]
461 std %f24,[%fp-0x20]
462 std %f22,[%fp-0x28]
463 std %f20,[%fp-0x30]
464 std %f18,[%fp-0x38]
465 std %f16,[%fp-0x40]
466 std %f14,[%fp-0x48]
467 std %f12,[%fp-0x50]
468 std %f10,[%fp-0x58]
469 std %f8,[%fp-0x60]
470 std %f6,[%fp-0x68]
471 std %f4,[%fp-0x70]
472 std %f2,[%fp-0x78]
473 std %f0,[%fp-0x80]
474 std %g6,[%fp-0x88]
475 std %g4,[%fp-0x90]
476 std %g2,[%fp-0x98]
477 std %g0,[%fp-0xa0]
478 std %i6,[%fp-0xa8]
479 std %i4,[%fp-0xb0]
480 std %i2,[%fp-0xb8]
481 std %i0,[%fp-0xc0]
482 nop ! stcsr [%fp-0xc4]
483 nop ! stfsr [%fp-0xc8]
484 nop ! wr %npc,[%fp-0xcc]
485 nop ! wr %pc,[%fp-0xd0]
486 rd %tbr,%o0
487 st %o0,[%fp-0xd4]
488 rd %wim,%o1
489 st %o0,[%fp-0xd8]
490 rd %psr,%o0
491 st %o0,[%fp-0xdc]
492 rd %y,%o0
493 st %o0,[%fp-0xe0]
494
495 /..* The arguments are pushed at this point by GDB;
496 no code is needed in the dummy for this.
497 The CALL_DUMMY_START_OFFSET gives the position of
498 the following ld instruction. *../
499
500 ld [%sp+0x58],%o5
501 ld [%sp+0x54],%o4
502 ld [%sp+0x50],%o3
503 ld [%sp+0x4c],%o2
504 ld [%sp+0x48],%o1
505 call 0x00000000
506 ld [%sp+0x44],%o0
507 nop
508 ta 1
509 nop
510
511 note that this is 192 bytes, which is a multiple of 8 (not only 4) bytes.
512 note that the `call' insn is a relative, not an absolute call.
513 note that the `nop' at the end is needed to keep the trap from
514 clobbering things (if NPC pointed to garbage instead).
515
516 We actually start executing at the `sethi', since the pushing of the
517 registers (as arguments) is done by PUSH_DUMMY_FRAME. If this were
518 real code, the arguments for the function called by the CALL would be
519 pushed between the list of ST insns and the CALL, and we could allow
520 it to execute through. But the arguments have to be pushed by GDB
521 after the PUSH_DUMMY_FRAME is done, and we cannot allow these ST
522 insns to be performed again, lest the registers saved be taken for
523 arguments. */
524
525 #define CALL_DUMMY { 0x9de3bee0, 0xfd3fbff8, 0xf93fbff0, 0xf53fbfe8, \
526 0xf13fbfe0, 0xed3fbfd8, 0xe93fbfd0, 0xe53fbfc8, \
527 0xe13fbfc0, 0xdd3fbfb8, 0xd93fbfb0, 0xd53fbfa8, \
528 0xd13fbfa0, 0xcd3fbf98, 0xc93fbf90, 0xc53fbf88, \
529 0xc13fbf80, 0xcc3fbf78, 0xc83fbf70, 0xc43fbf68, \
530 0xc03fbf60, 0xfc3fbf58, 0xf83fbf50, 0xf43fbf48, \
531 0xf03fbf40, 0x01000000, 0x01000000, 0x01000000, \
532 0x01000000, 0x91580000, 0xd027bf50, 0x93500000, \
533 0xd027bf4c, 0x91480000, 0xd027bf48, 0x91400000, \
534 0xd027bf44, 0xda03a058, 0xd803a054, 0xd603a050, \
535 0xd403a04c, 0xd203a048, 0x40000000, 0xd003a044, \
536 0x01000000, 0x91d02001, 0x01000000, 0x01000000}
537
538 #define CALL_DUMMY_LENGTH 192
539
540 #define CALL_DUMMY_START_OFFSET 148
541
542 #define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + (8 * 4))
543
544 #define CALL_DUMMY_STACK_ADJUST 68
545
546 /* Insert the specified number of args and function address
547 into a call sequence of the above form stored at DUMMYNAME.
548
549 For structs and unions, if the function was compiled with Sun cc,
550 it expects 'unimp' after the call. But gcc doesn't use that
551 (twisted) convention. So leave a nop there for gcc (FIX_CALL_DUMMY
552 can assume it is operating on a pristine CALL_DUMMY, not one that
553 has already been customized for a different function). */
554
555 #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
556 { \
557 *(int *)((char *) dummyname+168) = (0x40000000|((fun-(pc+168))>>2)); \
558 if (!gcc_p \
559 && (TYPE_CODE (type) == TYPE_CODE_STRUCT \
560 || TYPE_CODE (type) == TYPE_CODE_UNION)) \
561 *(int *)((char *) dummyname+176) = (TYPE_LENGTH (type) & 0x1fff); \
562 }
563
564 \f
565 /* Sparc has no reliable single step ptrace call */
566
567 #define NO_SINGLE_STEP 1
568 extern void single_step ();
569
570 /* We need more arguments in a frame specification for the
571 "frame" or "info frame" command. */
572
573 #define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
574 /* FIXME: Depends on equivalence between FRAME and "struct frame_info *",
575 and equivalence between CORE_ADDR and FRAME_ADDR. */
576 extern struct frame_info *setup_arbitrary_frame PARAMS ((int, CORE_ADDR *));
577
578 /* To print every pair of float registers as a double, we use this hook. */
579
580 #define PRINT_REGISTER_HOOK(regno) \
581 if (((regno) >= FP0_REGNUM) \
582 && ((regno) < FP0_REGNUM + 32) \
583 && (0 == ((regno) & 1))) { \
584 char doublereg[8]; /* two float regs */ \
585 if (!read_relative_register_raw_bytes ((regno) , doublereg ) \
586 && !read_relative_register_raw_bytes ((regno)+1, doublereg+4)) { \
587 printf("\t"); \
588 print_floating (doublereg, builtin_type_double, stdout); \
589 } \
590 }
591
592 /* Optimization for storing registers to the inferior. The hook
593 DO_DEFERRED_STORES
594 actually executes any deferred stores. It is called any time
595 we are going to proceed the child, or read its registers.
596 The hook CLEAR_DEFERRED_STORES is called when we want to throw
597 away the inferior process, e.g. when it dies or we kill it.
598 FIXME, this does not handle remote debugging cleanly. */
599
600 extern int deferred_stores;
601 #define DO_DEFERRED_STORES \
602 if (deferred_stores) \
603 target_store_registers (-2);
604 #define CLEAR_DEFERRED_STORES \
605 deferred_stores = 0;
This page took 0.042455 seconds and 5 git commands to generate.