CARP: *BREAKPOINT*
[deliverable/binutils-gdb.git] / gdb / blockframe.c
CommitLineData
bd5635a1
RP
1/* Get info from stack frames;
2 convert between frames, blocks, functions and pc values.
ad3b8c4a 3 Copyright 1986, 87, 88, 89, 91, 94, 95, 96, 97, 1998
dc1b349d 4 Free Software Foundation, Inc.
bd5635a1
RP
5
6This file is part of GDB.
7
5259796b 8This program is free software; you can redistribute it and/or modify
bd5635a1 9it under the terms of the GNU General Public License as published by
5259796b
JG
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
bd5635a1 12
5259796b 13This program is distributed in the hope that it will be useful,
bd5635a1
RP
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
5259796b 19along with this program; if not, write to the Free Software
0e2c2c1e 20Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
bd5635a1
RP
21
22#include "defs.h"
bd5635a1 23#include "symtab.h"
23a8e291
JK
24#include "bfd.h"
25#include "symfile.h"
26#include "objfiles.h"
bd5635a1
RP
27#include "frame.h"
28#include "gdbcore.h"
29#include "value.h" /* for read_register */
30#include "target.h" /* for target_has_stack */
23a8e291 31#include "inferior.h" /* for read_pc */
16726dd1 32#include "annotate.h"
bd5635a1 33
23a8e291 34/* Is ADDR inside the startup file? Note that if your machine
bd5635a1
RP
35 has a way to detect the bottom of the stack, there is no need
36 to call this function from FRAME_CHAIN_VALID; the reason for
37 doing so is that some machines have no way of detecting bottom
23a8e291
JK
38 of stack.
39
40 A PC of zero is always considered to be the bottom of the stack. */
41
bd5635a1 42int
23a8e291 43inside_entry_file (addr)
bd5635a1
RP
44 CORE_ADDR addr;
45{
23a8e291
JK
46 if (addr == 0)
47 return 1;
48 if (symfile_objfile == 0)
49 return 0;
cef4c2e7
PS
50#if CALL_DUMMY_LOCATION == AT_ENTRY_POINT
51 /* Do not stop backtracing if the pc is in the call dummy
52 at the entry point. */
dc1b349d
MS
53/* FIXME: Won't always work with zeros for the last two arguments */
54 if (PC_IN_CALL_DUMMY (addr, 0, 0))
cef4c2e7
PS
55 return 0;
56#endif
23a8e291
JK
57 return (addr >= symfile_objfile -> ei.entry_file_lowpc &&
58 addr < symfile_objfile -> ei.entry_file_highpc);
bd5635a1
RP
59}
60
e140f1da
JG
61/* Test a specified PC value to see if it is in the range of addresses
62 that correspond to the main() function. See comments above for why
63 we might want to do this.
64
23a8e291
JK
65 Typically called from FRAME_CHAIN_VALID.
66
67 A PC of zero is always considered to be the bottom of the stack. */
e140f1da
JG
68
69int
23a8e291 70inside_main_func (pc)
e140f1da
JG
71CORE_ADDR pc;
72{
23a8e291
JK
73 if (pc == 0)
74 return 1;
75 if (symfile_objfile == 0)
76 return 0;
0e2c2c1e 77
dc1b349d
MS
78 /* If the addr range is not set up at symbol reading time, set it up now.
79 This is for FRAME_CHAIN_VALID_ALTERNATE. I do this for coff, because
80 it is unable to set it up and symbol reading time. */
81
82 if (symfile_objfile -> ei.main_func_lowpc == INVALID_ENTRY_LOWPC &&
83 symfile_objfile -> ei.main_func_highpc == INVALID_ENTRY_HIGHPC)
0e2c2c1e 84 {
dc1b349d
MS
85 struct symbol *mainsym;
86
0e2c2c1e
KH
87 mainsym = lookup_symbol ("main", NULL, VAR_NAMESPACE, NULL, NULL);
88 if (mainsym && SYMBOL_CLASS(mainsym) == LOC_BLOCK)
89 {
253ceee6
RU
90 symfile_objfile->ei.main_func_lowpc =
91 BLOCK_START (SYMBOL_BLOCK_VALUE (mainsym));
92 symfile_objfile->ei.main_func_highpc =
93 BLOCK_END (SYMBOL_BLOCK_VALUE (mainsym));
0e2c2c1e 94 }
0e2c2c1e 95 }
23a8e291
JK
96 return (symfile_objfile -> ei.main_func_lowpc <= pc &&
97 symfile_objfile -> ei.main_func_highpc > pc);
e140f1da
JG
98}
99
100/* Test a specified PC value to see if it is in the range of addresses
23a8e291
JK
101 that correspond to the process entry point function. See comments
102 in objfiles.h for why we might want to do this.
103
104 Typically called from FRAME_CHAIN_VALID.
e140f1da 105
23a8e291 106 A PC of zero is always considered to be the bottom of the stack. */
e140f1da
JG
107
108int
23a8e291 109inside_entry_func (pc)
e140f1da
JG
110CORE_ADDR pc;
111{
23a8e291
JK
112 if (pc == 0)
113 return 1;
114 if (symfile_objfile == 0)
115 return 0;
cef4c2e7
PS
116#if CALL_DUMMY_LOCATION == AT_ENTRY_POINT
117 /* Do not stop backtracing if the pc is in the call dummy
118 at the entry point. */
dc1b349d 119/* FIXME: Won't always work with zeros for the last two arguments */
cef4c2e7
PS
120 if (PC_IN_CALL_DUMMY (pc, 0, 0))
121 return 0;
122#endif
23a8e291
JK
123 return (symfile_objfile -> ei.entry_func_lowpc <= pc &&
124 symfile_objfile -> ei.entry_func_highpc > pc);
e140f1da
JG
125}
126
0e2c2c1e
KH
127/* Info about the innermost stack frame (contents of FP register) */
128
129static struct frame_info *current_frame;
bd5635a1 130
0e2c2c1e
KH
131/* Cache for frame addresses already read by gdb. Valid only while
132 inferior is stopped. Control variables for the frame cache should
133 be local to this module. */
bd5635a1 134
bd5635a1
RP
135struct obstack frame_cache_obstack;
136
137/* Return the innermost (currently executing) stack frame. */
138
0e2c2c1e 139struct frame_info *
bd5635a1
RP
140get_current_frame ()
141{
16726dd1
JK
142 if (current_frame == NULL)
143 {
144 if (target_has_stack)
145 current_frame = create_new_frame (read_fp (), read_pc ());
146 else
147 error ("No stack.");
148 }
bd5635a1
RP
149 return current_frame;
150}
151
152void
153set_current_frame (frame)
0e2c2c1e 154 struct frame_info *frame;
bd5635a1
RP
155{
156 current_frame = frame;
157}
158
16726dd1
JK
159/* Create an arbitrary (i.e. address specified by user) or innermost frame.
160 Always returns a non-NULL value. */
161
0e2c2c1e 162struct frame_info *
bd5635a1 163create_new_frame (addr, pc)
0e2c2c1e 164 CORE_ADDR addr;
bd5635a1
RP
165 CORE_ADDR pc;
166{
0e2c2c1e 167 struct frame_info *fi;
d541211d 168 char *name;
bd5635a1 169
0e2c2c1e 170 fi = (struct frame_info *)
bd5635a1
RP
171 obstack_alloc (&frame_cache_obstack,
172 sizeof (struct frame_info));
173
174 /* Arbitrary frame */
0e2c2c1e
KH
175 fi->next = NULL;
176 fi->prev = NULL;
177 fi->frame = addr;
178 fi->pc = pc;
d541211d 179 find_pc_partial_function (pc, &name, (CORE_ADDR *)NULL,(CORE_ADDR *)NULL);
0e2c2c1e 180 fi->signal_handler_caller = IN_SIGTRAMP (fi->pc, name);
bd5635a1
RP
181
182#ifdef INIT_EXTRA_FRAME_INFO
0e2c2c1e 183 INIT_EXTRA_FRAME_INFO (0, fi);
bd5635a1
RP
184#endif
185
0e2c2c1e 186 return fi;
bd5635a1
RP
187}
188
0e2c2c1e
KH
189/* Return the frame that called FI.
190 If FI is the original frame (it has no caller), return 0. */
bd5635a1 191
0e2c2c1e 192struct frame_info *
bd5635a1 193get_prev_frame (frame)
0e2c2c1e 194 struct frame_info *frame;
bd5635a1 195{
bd5635a1
RP
196 return get_prev_frame_info (frame);
197}
198
0e2c2c1e 199/* Return the frame that FRAME calls (NULL if FRAME is the innermost
bd5635a1
RP
200 frame). */
201
0e2c2c1e 202struct frame_info *
bd5635a1 203get_next_frame (frame)
0e2c2c1e 204 struct frame_info *frame;
bd5635a1 205{
bd5635a1
RP
206 return frame->next;
207}
208
0e2c2c1e
KH
209/* Flush the entire frame cache. */
210
bd5635a1
RP
211void
212flush_cached_frames ()
213{
214 /* Since we can't really be sure what the first object allocated was */
215 obstack_free (&frame_cache_obstack, 0);
216 obstack_init (&frame_cache_obstack);
217
0e2c2c1e
KH
218 current_frame = NULL; /* Invalidate cache */
219 select_frame (NULL, -1);
16726dd1 220 annotate_frames_invalid ();
bd5635a1
RP
221}
222
2403f49b 223/* Flush the frame cache, and start a new one if necessary. */
16726dd1 224
2403f49b
JK
225void
226reinit_frame_cache ()
227{
2403f49b 228 flush_cached_frames ();
0e2c2c1e
KH
229
230 /* FIXME: The inferior_pid test is wrong if there is a corefile. */
16726dd1 231 if (inferior_pid != 0)
2289e1c3 232 {
2289e1c3
JK
233 select_frame (get_current_frame (), 0);
234 }
bd5635a1
RP
235}
236
237/* If a machine allows frameless functions, it should define a macro
238 FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) in param.h. FI is the struct
239 frame_info for the frame, and FRAMELESS should be set to nonzero
240 if it represents a frameless function invocation. */
241
23a8e291 242/* Return nonzero if the function for this frame lacks a prologue. Many
bd5635a1
RP
243 machines can define FRAMELESS_FUNCTION_INVOCATION to just call this
244 function. */
245
246int
247frameless_look_for_prologue (frame)
0e2c2c1e 248 struct frame_info *frame;
bd5635a1
RP
249{
250 CORE_ADDR func_start, after_prologue;
dc1b349d 251 func_start = get_pc_function_start (frame->pc);
bd5635a1
RP
252 if (func_start)
253 {
dc1b349d 254 func_start += FUNCTION_START_OFFSET;
bd5635a1 255 after_prologue = func_start;
5259796b
JG
256#ifdef SKIP_PROLOGUE_FRAMELESS_P
257 /* This is faster, since only care whether there *is* a prologue,
258 not how long it is. */
259 SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
260#else
bd5635a1 261 SKIP_PROLOGUE (after_prologue);
5259796b 262#endif
bd5635a1
RP
263 return after_prologue == func_start;
264 }
15cb042b
PS
265 else if (frame->pc == 0)
266 /* A frame with a zero PC is usually created by dereferencing a NULL
267 function pointer, normally causing an immediate core dump of the
268 inferior. Mark function as frameless, as the inferior has no chance
269 of setting up a stack frame. */
270 return 1;
bd5635a1
RP
271 else
272 /* If we can't find the start of the function, we don't really
273 know whether the function is frameless, but we should be able
274 to get a reasonable (i.e. best we can do under the
275 circumstances) backtrace by saying that it isn't. */
276 return 0;
277}
278
e140f1da
JG
279/* Default a few macros that people seldom redefine. */
280
bd5635a1
RP
281#if !defined (INIT_FRAME_PC)
282#define INIT_FRAME_PC(fromleaf, prev) \
283 prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \
284 prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
285#endif
286
e140f1da
JG
287#ifndef FRAME_CHAIN_COMBINE
288#define FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
289#endif
290
bd5635a1
RP
291/* Return a structure containing various interesting information
292 about the frame that called NEXT_FRAME. Returns NULL
293 if there is no such frame. */
294
295struct frame_info *
296get_prev_frame_info (next_frame)
0e2c2c1e 297 struct frame_info *next_frame;
bd5635a1 298{
0e2c2c1e 299 CORE_ADDR address = 0;
bd5635a1
RP
300 struct frame_info *prev;
301 int fromleaf = 0;
d541211d 302 char *name;
bd5635a1
RP
303
304 /* If the requested entry is in the cache, return it.
305 Otherwise, figure out what the address should be for the entry
306 we're about to add to the cache. */
307
308 if (!next_frame)
309 {
9e837b37
PS
310#if 0
311 /* This screws value_of_variable, which just wants a nice clean
312 NULL return from block_innermost_frame if there are no frames.
313 I don't think I've ever seen this message happen otherwise.
314 And returning NULL here is a perfectly legitimate thing to do. */
bd5635a1
RP
315 if (!current_frame)
316 {
317 error ("You haven't set up a process's stack to examine.");
318 }
9e837b37 319#endif
bd5635a1
RP
320
321 return current_frame;
322 }
323
324 /* If we have the prev one, return it */
325 if (next_frame->prev)
326 return next_frame->prev;
327
328 /* On some machines it is possible to call a function without
329 setting up a stack frame for it. On these machines, we
330 define this macro to take two args; a frameinfo pointer
331 identifying a frame and a variable to set or clear if it is
332 or isn't leafless. */
333#ifdef FRAMELESS_FUNCTION_INVOCATION
334 /* Still don't want to worry about this except on the innermost
335 frame. This macro will set FROMLEAF if NEXT_FRAME is a
336 frameless function invocation. */
337 if (!(next_frame->next))
338 {
339 FRAMELESS_FUNCTION_INVOCATION (next_frame, fromleaf);
340 if (fromleaf)
0e2c2c1e 341 address = FRAME_FP (next_frame);
bd5635a1
RP
342 }
343#endif
344
345 if (!fromleaf)
346 {
347 /* Two macros defined in tm.h specify the machine-dependent
348 actions to be performed here.
349 First, get the frame's chain-pointer.
350 If that is zero, the frame is the outermost frame or a leaf
351 called by the outermost frame. This means that if start
352 calls main without a frame, we'll return 0 (which is fine
353 anyway).
354
355 Nope; there's a problem. This also returns when the current
356 routine is a leaf of main. This is unacceptable. We move
357 this to after the ffi test; I'd rather have backtraces from
358 start go curfluy than have an abort called from main not show
359 main. */
360 address = FRAME_CHAIN (next_frame);
361 if (!FRAME_CHAIN_VALID (address, next_frame))
362 return 0;
363 address = FRAME_CHAIN_COMBINE (address, next_frame);
364 }
e140f1da
JG
365 if (address == 0)
366 return 0;
bd5635a1
RP
367
368 prev = (struct frame_info *)
369 obstack_alloc (&frame_cache_obstack,
370 sizeof (struct frame_info));
371
372 if (next_frame)
373 next_frame->prev = prev;
374 prev->next = next_frame;
375 prev->prev = (struct frame_info *) 0;
376 prev->frame = address;
23a8e291
JK
377 prev->signal_handler_caller = 0;
378
379/* This change should not be needed, FIXME! We should
380 determine whether any targets *need* INIT_FRAME_PC to happen
381 after INIT_EXTRA_FRAME_INFO and come up with a simple way to
382 express what goes on here.
383
384 INIT_EXTRA_FRAME_INFO is called from two places: create_new_frame
385 (where the PC is already set up) and here (where it isn't).
386 INIT_FRAME_PC is only called from here, always after
387 INIT_EXTRA_FRAME_INFO.
388
389 The catch is the MIPS, where INIT_EXTRA_FRAME_INFO requires the PC
390 value (which hasn't been set yet). Some other machines appear to
391 require INIT_EXTRA_FRAME_INFO before they can do INIT_FRAME_PC. Phoo.
392
393 We shouldn't need INIT_FRAME_PC_FIRST to add more complication to
394 an already overcomplicated part of GDB. gnu@cygnus.com, 15Sep92.
395
0e2c2c1e
KH
396 Assuming that some machines need INIT_FRAME_PC after
397 INIT_EXTRA_FRAME_INFO, one possible scheme:
23a8e291
JK
398
399 SETUP_INNERMOST_FRAME()
400 Default version is just create_new_frame (read_fp ()),
401 read_pc ()). Machines with extra frame info would do that (or the
402 local equivalent) and then set the extra fields.
403 SETUP_ARBITRARY_FRAME(argc, argv)
404 Only change here is that create_new_frame would no longer init extra
405 frame info; SETUP_ARBITRARY_FRAME would have to do that.
406 INIT_PREV_FRAME(fromleaf, prev)
9e837b37
PS
407 Replace INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC. This should
408 also return a flag saying whether to keep the new frame, or
409 whether to discard it, because on some machines (e.g. mips) it
410 is really awkward to have FRAME_CHAIN_VALID called *before*
411 INIT_EXTRA_FRAME_INFO (there is no good way to get information
412 deduced in FRAME_CHAIN_VALID into the extra fields of the new frame).
23a8e291
JK
413 std_frame_pc(fromleaf, prev)
414 This is the default setting for INIT_PREV_FRAME. It just does what
415 the default INIT_FRAME_PC does. Some machines will call it from
416 INIT_PREV_FRAME (either at the beginning, the end, or in the middle).
417 Some machines won't use it.
0e2c2c1e 418 kingdon@cygnus.com, 13Apr93, 31Jan94, 14Dec94. */
23a8e291
JK
419
420#ifdef INIT_FRAME_PC_FIRST
421 INIT_FRAME_PC_FIRST (fromleaf, prev);
422#endif
bd5635a1
RP
423
424#ifdef INIT_EXTRA_FRAME_INFO
e140f1da 425 INIT_EXTRA_FRAME_INFO(fromleaf, prev);
bd5635a1
RP
426#endif
427
428 /* This entry is in the frame queue now, which is good since
9e837b37 429 FRAME_SAVED_PC may use that queue to figure out its value
e140f1da 430 (see tm-sparc.h). We want the pc saved in the inferior frame. */
bd5635a1
RP
431 INIT_FRAME_PC(fromleaf, prev);
432
9e837b37
PS
433 /* If ->frame and ->pc are unchanged, we are in the process of getting
434 ourselves into an infinite backtrace. Some architectures check this
435 in FRAME_CHAIN or thereabouts, but it seems like there is no reason
436 this can't be an architecture-independent check. */
437 if (next_frame != NULL)
438 {
439 if (prev->frame == next_frame->frame
440 && prev->pc == next_frame->pc)
441 {
442 next_frame->prev = NULL;
443 obstack_free (&frame_cache_obstack, prev);
444 return NULL;
445 }
446 }
447
d541211d
PS
448 find_pc_partial_function (prev->pc, &name,
449 (CORE_ADDR *)NULL,(CORE_ADDR *)NULL);
450 if (IN_SIGTRAMP (prev->pc, name))
23a8e291
JK
451 prev->signal_handler_caller = 1;
452
bd5635a1
RP
453 return prev;
454}
455
456CORE_ADDR
457get_frame_pc (frame)
0e2c2c1e 458 struct frame_info *frame;
bd5635a1 459{
0e2c2c1e 460 return frame->pc;
bd5635a1
RP
461}
462
463#if defined (FRAME_FIND_SAVED_REGS)
464/* Find the addresses in which registers are saved in FRAME. */
465
466void
0e2c2c1e
KH
467get_frame_saved_regs (frame, saved_regs_addr)
468 struct frame_info *frame;
bd5635a1
RP
469 struct frame_saved_regs *saved_regs_addr;
470{
0e2c2c1e 471 FRAME_FIND_SAVED_REGS (frame, *saved_regs_addr);
bd5635a1
RP
472}
473#endif
474
475/* Return the innermost lexical block in execution
476 in a specified stack frame. The frame address is assumed valid. */
477
478struct block *
479get_frame_block (frame)
0e2c2c1e 480 struct frame_info *frame;
bd5635a1 481{
bd5635a1
RP
482 CORE_ADDR pc;
483
0e2c2c1e
KH
484 pc = frame->pc;
485 if (frame->next != 0 && frame->next->signal_handler_caller == 0)
747a6329
PS
486 /* We are not in the innermost frame and we were not interrupted
487 by a signal. We need to subtract one to get the correct block,
488 in case the call instruction was the last instruction of the block.
489 If there are any machines on which the saved pc does not point to
0e2c2c1e 490 after the call insn, we probably want to make frame->pc point after
747a6329 491 the call insn anyway. */
bd5635a1
RP
492 --pc;
493 return block_for_pc (pc);
494}
495
496struct block *
497get_current_block ()
498{
499 return block_for_pc (read_pc ());
500}
501
502CORE_ADDR
503get_pc_function_start (pc)
504 CORE_ADDR pc;
505{
23a8e291 506 register struct block *bl;
bd5635a1 507 register struct symbol *symbol;
23a8e291
JK
508 register struct minimal_symbol *msymbol;
509 CORE_ADDR fstart;
510
511 if ((bl = block_for_pc (pc)) != NULL &&
512 (symbol = block_function (bl)) != NULL)
bd5635a1 513 {
23a8e291
JK
514 bl = SYMBOL_BLOCK_VALUE (symbol);
515 fstart = BLOCK_START (bl);
bd5635a1 516 }
23a8e291
JK
517 else if ((msymbol = lookup_minimal_symbol_by_pc (pc)) != NULL)
518 {
519 fstart = SYMBOL_VALUE_ADDRESS (msymbol);
520 }
521 else
522 {
523 fstart = 0;
524 }
525 return (fstart);
bd5635a1
RP
526}
527
528/* Return the symbol for the function executing in frame FRAME. */
529
530struct symbol *
531get_frame_function (frame)
0e2c2c1e 532 struct frame_info *frame;
bd5635a1
RP
533{
534 register struct block *bl = get_frame_block (frame);
535 if (bl == 0)
536 return 0;
537 return block_function (bl);
538}
539\f
253ceee6 540
bd5635a1 541/* Return the blockvector immediately containing the innermost lexical block
253ceee6 542 containing the specified pc value and section, or 0 if there is none.
bd5635a1
RP
543 PINDEX is a pointer to the index value of the block. If PINDEX
544 is NULL, we don't pass this information back to the caller. */
545
546struct blockvector *
253ceee6 547blockvector_for_pc_sect (pc, section, pindex, symtab)
bd5635a1 548 register CORE_ADDR pc;
253ceee6 549 struct sec *section;
bd5635a1 550 int *pindex;
253ceee6
RU
551 struct symtab *symtab;
552
bd5635a1
RP
553{
554 register struct block *b;
555 register int bot, top, half;
bd5635a1
RP
556 struct blockvector *bl;
557
253ceee6
RU
558 if (symtab == 0) /* if no symtab specified by caller */
559 {
560 /* First search all symtabs for one whose file contains our pc */
561 if ((symtab = find_pc_sect_symtab (pc, section)) == 0)
562 return 0;
563 }
bd5635a1 564
253ceee6 565 bl = BLOCKVECTOR (symtab);
bd5635a1
RP
566 b = BLOCKVECTOR_BLOCK (bl, 0);
567
568 /* Then search that symtab for the smallest block that wins. */
569 /* Use binary search to find the last block that starts before PC. */
570
571 bot = 0;
572 top = BLOCKVECTOR_NBLOCKS (bl);
573
574 while (top - bot > 1)
575 {
576 half = (top - bot + 1) >> 1;
577 b = BLOCKVECTOR_BLOCK (bl, bot + half);
578 if (BLOCK_START (b) <= pc)
579 bot += half;
580 else
581 top = bot + half;
582 }
583
584 /* Now search backward for a block that ends after PC. */
585
586 while (bot >= 0)
587 {
588 b = BLOCKVECTOR_BLOCK (bl, bot);
589 if (BLOCK_END (b) > pc)
590 {
591 if (pindex)
592 *pindex = bot;
593 return bl;
594 }
595 bot--;
596 }
bd5635a1
RP
597 return 0;
598}
599
253ceee6
RU
600/* Return the blockvector immediately containing the innermost lexical block
601 containing the specified pc value, or 0 if there is none.
602 Backward compatibility, no section. */
603
604struct blockvector *
605blockvector_for_pc (pc, pindex)
606 register CORE_ADDR pc;
607 int *pindex;
608{
609 return blockvector_for_pc_sect (pc, find_pc_mapped_section (pc),
610 pindex, NULL);
611}
612
613/* Return the innermost lexical block containing the specified pc value
614 in the specified section, or 0 if there is none. */
bd5635a1
RP
615
616struct block *
253ceee6 617block_for_pc_sect (pc, section)
bd5635a1 618 register CORE_ADDR pc;
253ceee6 619 struct sec *section;
bd5635a1
RP
620{
621 register struct blockvector *bl;
622 int index;
623
253ceee6 624 bl = blockvector_for_pc_sect (pc, section, &index, NULL);
bd5635a1
RP
625 if (bl)
626 return BLOCKVECTOR_BLOCK (bl, index);
627 return 0;
628}
629
253ceee6
RU
630/* Return the innermost lexical block containing the specified pc value,
631 or 0 if there is none. Backward compatibility, no section. */
632
633struct block *
634block_for_pc (pc)
635 register CORE_ADDR pc;
636{
637 return block_for_pc_sect (pc, find_pc_mapped_section (pc));
638}
639
640/* Return the function containing pc value PC in section SECTION.
bd5635a1
RP
641 Returns 0 if function is not known. */
642
643struct symbol *
253ceee6 644find_pc_sect_function (pc, section)
bd5635a1 645 CORE_ADDR pc;
253ceee6 646 struct sec *section;
bd5635a1 647{
253ceee6 648 register struct block *b = block_for_pc_sect (pc, section);
bd5635a1
RP
649 if (b == 0)
650 return 0;
651 return block_function (b);
652}
653
253ceee6
RU
654/* Return the function containing pc value PC.
655 Returns 0 if function is not known. Backward compatibility, no section */
656
657struct symbol *
658find_pc_function (pc)
659 CORE_ADDR pc;
660{
661 return find_pc_sect_function (pc, find_pc_mapped_section (pc));
662}
663
bd5635a1
RP
664/* These variables are used to cache the most recent result
665 * of find_pc_partial_function. */
666
253ceee6
RU
667static CORE_ADDR cache_pc_function_low = 0;
668static CORE_ADDR cache_pc_function_high = 0;
669static char *cache_pc_function_name = 0;
670static struct sec *cache_pc_function_section = NULL;
bd5635a1
RP
671
672/* Clear cache, e.g. when symbol table is discarded. */
673
674void
675clear_pc_function_cache()
676{
677 cache_pc_function_low = 0;
678 cache_pc_function_high = 0;
679 cache_pc_function_name = (char *)0;
253ceee6 680 cache_pc_function_section = NULL;
bd5635a1
RP
681}
682
d541211d 683/* Finds the "function" (text symbol) that is smaller than PC but
253ceee6
RU
684 greatest of all of the potential text symbols in SECTION. Sets
685 *NAME and/or *ADDRESS conditionally if that pointer is non-null.
686 If ENDADDR is non-null, then set *ENDADDR to be the end of the
687 function (exclusive), but passing ENDADDR as non-null means that
688 the function might cause symbols to be read. This function either
d541211d
PS
689 succeeds or fails (not halfway succeeds). If it succeeds, it sets
690 *NAME, *ADDRESS, and *ENDADDR to real information and returns 1.
253ceee6
RU
691 If it fails, it sets *NAME, *ADDRESS, and *ENDADDR to zero and
692 returns 0. */
bd5635a1
RP
693
694int
253ceee6
RU
695find_pc_sect_partial_function (pc, section, name, address, endaddr)
696 CORE_ADDR pc;
697 asection *section;
698 char **name;
bd5635a1 699 CORE_ADDR *address;
d541211d 700 CORE_ADDR *endaddr;
bd5635a1
RP
701{
702 struct partial_symtab *pst;
253ceee6 703 struct symbol *f;
23a8e291 704 struct minimal_symbol *msymbol;
bd5635a1 705 struct partial_symbol *psb;
253ceee6
RU
706 struct obj_section *osect;
707 int i;
708 CORE_ADDR mapped_pc;
709
710 mapped_pc = overlay_mapped_address (pc, section);
bd5635a1 711
253ceee6
RU
712 if (mapped_pc >= cache_pc_function_low &&
713 mapped_pc < cache_pc_function_high &&
714 section == cache_pc_function_section)
d541211d
PS
715 goto return_cached_value;
716
717 /* If sigtramp is in the u area, it counts as a function (especially
718 important for step_1). */
719#if defined SIGTRAMP_START
253ceee6 720 if (IN_SIGTRAMP (mapped_pc, (char *)NULL))
bd5635a1 721 {
253ceee6
RU
722 cache_pc_function_low = SIGTRAMP_START (mapped_pc);
723 cache_pc_function_high = SIGTRAMP_END (mapped_pc);
724 cache_pc_function_name = "<sigtramp>";
725 cache_pc_function_section = section;
d541211d 726 goto return_cached_value;
bd5635a1 727 }
d541211d 728#endif
bd5635a1 729
253ceee6
RU
730 msymbol = lookup_minimal_symbol_by_pc_section (mapped_pc, section);
731 pst = find_pc_sect_psymtab (mapped_pc, section);
bd5635a1
RP
732 if (pst)
733 {
d541211d
PS
734 /* Need to read the symbols to get a good value for the end address. */
735 if (endaddr != NULL && !pst->readin)
2f1c7c3f
JK
736 {
737 /* Need to get the terminal in case symbol-reading produces
738 output. */
739 target_terminal_ours_for_output ();
740 PSYMTAB_TO_SYMTAB (pst);
741 }
d541211d 742
bd5635a1
RP
743 if (pst->readin)
744 {
d541211d
PS
745 /* Checking whether the msymbol has a larger value is for the
746 "pathological" case mentioned in print_frame_info. */
253ceee6 747 f = find_pc_sect_function (mapped_pc, section);
d541211d
PS
748 if (f != NULL
749 && (msymbol == NULL
750 || (BLOCK_START (SYMBOL_BLOCK_VALUE (f))
751 >= SYMBOL_VALUE_ADDRESS (msymbol))))
bd5635a1 752 {
253ceee6
RU
753 cache_pc_function_low = BLOCK_START (SYMBOL_BLOCK_VALUE (f));
754 cache_pc_function_high = BLOCK_END (SYMBOL_BLOCK_VALUE (f));
755 cache_pc_function_name = SYMBOL_NAME (f);
756 cache_pc_function_section = section;
d541211d 757 goto return_cached_value;
bd5635a1 758 }
bd5635a1 759 }
cef4c2e7 760 else
bd5635a1 761 {
cef4c2e7
PS
762 /* Now that static symbols go in the minimal symbol table, perhaps
763 we could just ignore the partial symbols. But at least for now
764 we use the partial or minimal symbol, whichever is larger. */
253ceee6 765 psb = find_pc_sect_psymbol (pst, mapped_pc, section);
cef4c2e7
PS
766
767 if (psb
768 && (msymbol == NULL ||
769 (SYMBOL_VALUE_ADDRESS (psb)
770 >= SYMBOL_VALUE_ADDRESS (msymbol))))
771 {
772 /* This case isn't being cached currently. */
773 if (address)
774 *address = SYMBOL_VALUE_ADDRESS (psb);
775 if (name)
776 *name = SYMBOL_NAME (psb);
777 /* endaddr non-NULL can't happen here. */
778 return 1;
779 }
bd5635a1
RP
780 }
781 }
d541211d 782
981a3309
SG
783 /* Not in the normal symbol tables, see if the pc is in a known section.
784 If it's not, then give up. This ensures that anything beyond the end
785 of the text seg doesn't appear to be part of the last function in the
786 text segment. */
787
253ceee6 788 osect = find_pc_sect_section (mapped_pc, section);
981a3309 789
253ceee6 790 if (!osect)
981a3309
SG
791 msymbol = NULL;
792
d541211d
PS
793 /* Must be in the minimal symbol table. */
794 if (msymbol == NULL)
bd5635a1 795 {
d541211d
PS
796 /* No available symbol. */
797 if (name != NULL)
798 *name = 0;
799 if (address != NULL)
800 *address = 0;
801 if (endaddr != NULL)
802 *endaddr = 0;
803 return 0;
bd5635a1
RP
804 }
805
253ceee6
RU
806 cache_pc_function_low = SYMBOL_VALUE_ADDRESS (msymbol);
807 cache_pc_function_name = SYMBOL_NAME (msymbol);
808 cache_pc_function_section = section;
809
ad3b8c4a
JM
810 /* Use the lesser of the next minimal symbol in the same section, or
811 the end of the section, as the end of the function. */
812
813 /* Step over other symbols at this same address, and symbols in
814 other sections, to find the next symbol in this section with
815 a different address. */
d541211d 816
ad3b8c4a
JM
817 for (i=1; SYMBOL_NAME (msymbol+i) != NULL; i++)
818 {
819 if (SYMBOL_VALUE_ADDRESS (msymbol+i) != SYMBOL_VALUE_ADDRESS (msymbol)
820 && SYMBOL_BFD_SECTION (msymbol+i) == SYMBOL_BFD_SECTION (msymbol))
821 break;
822 }
981a3309 823
253ceee6
RU
824 if (SYMBOL_NAME (msymbol + i) != NULL
825 && SYMBOL_VALUE_ADDRESS (msymbol + i) < osect->endaddr)
826 cache_pc_function_high = SYMBOL_VALUE_ADDRESS (msymbol + i);
bd5635a1 827 else
981a3309
SG
828 /* We got the start address from the last msymbol in the objfile.
829 So the end address is the end of the section. */
253ceee6 830 cache_pc_function_high = osect->endaddr;
d541211d
PS
831
832 return_cached_value:
253ceee6 833
bd5635a1 834 if (address)
ad3b8c4a
JM
835 {
836 if (pc_in_unmapped_range (pc, section))
837 *address = overlay_unmapped_address (cache_pc_function_low, section);
838 else
839 *address = cache_pc_function_low;
840 }
253ceee6 841
bd5635a1
RP
842 if (name)
843 *name = cache_pc_function_name;
253ceee6 844
d541211d 845 if (endaddr)
ad3b8c4a
JM
846 {
847 if (pc_in_unmapped_range (pc, section))
848 {
849 /* Because the high address is actually beyond the end of
850 the function (and therefore possibly beyond the end of
851 the overlay), we must actually convert (high - 1)
852 and then add one to that. */
853
854 *endaddr = 1 + overlay_unmapped_address (cache_pc_function_high - 1,
855 section);
856 }
857 else
858 *endaddr = cache_pc_function_high;
859 }
253ceee6 860
bd5635a1
RP
861 return 1;
862}
863
253ceee6
RU
864/* Backward compatibility, no section argument */
865
866int
867find_pc_partial_function (pc, name, address, endaddr)
868 CORE_ADDR pc;
869 char **name;
870 CORE_ADDR *address;
871 CORE_ADDR *endaddr;
872{
873 asection *section;
874
875 section = find_pc_overlay (pc);
876 return find_pc_sect_partial_function (pc, section, name, address, endaddr);
877}
878
479fdd26 879/* Return the innermost stack frame executing inside of BLOCK,
2289e1c3 880 or NULL if there is no such frame. If BLOCK is NULL, just return NULL. */
23a8e291 881
0e2c2c1e 882struct frame_info *
bd5635a1
RP
883block_innermost_frame (block)
884 struct block *block;
885{
0e2c2c1e 886 struct frame_info *frame;
2289e1c3
JK
887 register CORE_ADDR start;
888 register CORE_ADDR end;
bd5635a1 889
479fdd26
JK
890 if (block == NULL)
891 return NULL;
892
2289e1c3
JK
893 start = BLOCK_START (block);
894 end = BLOCK_END (block);
895
0e2c2c1e 896 frame = NULL;
bd5635a1
RP
897 while (1)
898 {
899 frame = get_prev_frame (frame);
0e2c2c1e
KH
900 if (frame == NULL)
901 return NULL;
902 if (frame->pc >= start && frame->pc < end)
bd5635a1
RP
903 return frame;
904 }
905}
906
0e2c2c1e
KH
907/* Return the full FRAME which corresponds to the given CORE_ADDR
908 or NULL if no FRAME on the chain corresponds to CORE_ADDR. */
999dd04b 909
0e2c2c1e 910struct frame_info *
999dd04b 911find_frame_addr_in_frame_chain (frame_addr)
0e2c2c1e 912 CORE_ADDR frame_addr;
999dd04b 913{
0e2c2c1e 914 struct frame_info *frame = NULL;
999dd04b 915
16726dd1 916 if (frame_addr == (CORE_ADDR)0)
999dd04b
JL
917 return NULL;
918
919 while (1)
920 {
921 frame = get_prev_frame (frame);
922 if (frame == NULL)
923 return NULL;
999dd04b
JL
924 if (FRAME_FP (frame) == frame_addr)
925 return frame;
926 }
927}
928
d541211d
PS
929#ifdef SIGCONTEXT_PC_OFFSET
930/* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp. */
931
932CORE_ADDR
933sigtramp_saved_pc (frame)
0e2c2c1e 934 struct frame_info *frame;
d541211d
PS
935{
936 CORE_ADDR sigcontext_addr;
937 char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
938 int ptrbytes = TARGET_PTR_BIT / TARGET_CHAR_BIT;
939 int sigcontext_offs = (2 * TARGET_INT_BIT) / TARGET_CHAR_BIT;
940
941 /* Get sigcontext address, it is the third parameter on the stack. */
942 if (frame->next)
943 sigcontext_addr = read_memory_integer (FRAME_ARGS_ADDRESS (frame->next)
0e2c2c1e
KH
944 + FRAME_ARGS_SKIP
945 + sigcontext_offs,
d541211d
PS
946 ptrbytes);
947 else
948 sigcontext_addr = read_memory_integer (read_register (SP_REGNUM)
949 + sigcontext_offs,
950 ptrbytes);
951
952 /* Don't cause a memory_error when accessing sigcontext in case the stack
953 layout has changed or the stack is corrupt. */
954 target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
955 return extract_unsigned_integer (buf, ptrbytes);
956}
957#endif /* SIGCONTEXT_PC_OFFSET */
958
15cb042b
PS
959#ifdef USE_GENERIC_DUMMY_FRAMES
960
dc1b349d 961/*
15cb042b 962 * GENERIC DUMMY FRAMES
dc1b349d
MS
963 *
964 * The following code serves to maintain the dummy stack frames for
965 * inferior function calls (ie. when gdb calls into the inferior via
966 * call_function_by_hand). This code saves the machine state before
15cb042b 967 * the call in host memory, so we must maintain an independant stack
dc1b349d
MS
968 * and keep it consistant etc. I am attempting to make this code
969 * generic enough to be used by many targets.
970 *
971 * The cheapest and most generic way to do CALL_DUMMY on a new target
972 * is probably to define CALL_DUMMY to be empty, CALL_DUMMY_LENGTH to zero,
973 * and CALL_DUMMY_LOCATION to AT_ENTRY. Then you must remember to define
15cb042b
PS
974 * PUSH_RETURN_ADDRESS, because no call instruction will be being
975 * executed by the target.
dc1b349d
MS
976 */
977
978static struct dummy_frame *dummy_frame_stack = NULL;
979
980/* Function: find_dummy_frame(pc, fp, sp)
981 Search the stack of dummy frames for one matching the given PC, FP and SP.
982 This is the work-horse for pc_in_call_dummy and read_register_dummy */
983
984char *
985generic_find_dummy_frame (pc, fp)
986 CORE_ADDR pc;
987 CORE_ADDR fp;
988{
989 struct dummy_frame * dummyframe;
dc1b349d 990
dc1b349d
MS
991 if (pc != entry_point_address ())
992 return 0;
dc1b349d
MS
993
994 for (dummyframe = dummy_frame_stack; dummyframe != NULL;
995 dummyframe = dummyframe->next)
996 if (fp == dummyframe->fp || fp == dummyframe->sp)
15cb042b
PS
997 /* The frame in question lies between the saved fp and sp, inclusive */
998 return dummyframe->regs;
999
dc1b349d
MS
1000 return 0;
1001}
1002
1003/* Function: pc_in_call_dummy (pc, fp)
1004 Return true if this is a dummy frame created by gdb for an inferior call */
1005
1006int
1007generic_pc_in_call_dummy (pc, fp)
1008 CORE_ADDR pc;
1009 CORE_ADDR fp;
1010{
1011 /* if find_dummy_frame succeeds, then PC is in a call dummy */
1012 return (generic_find_dummy_frame (pc, fp) != 0);
1013}
1014
1015/* Function: read_register_dummy
1016 Find a saved register from before GDB calls a function in the inferior */
1017
1018CORE_ADDR
1019generic_read_register_dummy (pc, fp, regno)
1020 CORE_ADDR pc;
1021 CORE_ADDR fp;
1022 int regno;
1023{
1024 char *dummy_regs = generic_find_dummy_frame (pc, fp);
1025
1026 if (dummy_regs)
1027 return extract_address (&dummy_regs[REGISTER_BYTE (regno)],
1028 REGISTER_RAW_SIZE(regno));
1029 else
1030 return 0;
1031}
1032
1033/* Save all the registers on the dummy frame stack. Most ports save the
1034 registers on the target stack. This results in lots of unnecessary memory
1035 references, which are slow when debugging via a serial line. Instead, we
1036 save all the registers internally, and never write them to the stack. The
1037 registers get restored when the called function returns to the entry point,
1038 where a breakpoint is laying in wait. */
1039
1040void
1041generic_push_dummy_frame ()
1042{
1043 struct dummy_frame *dummy_frame;
1044 CORE_ADDR fp = (get_current_frame ())->frame;
1045
1046 /* check to see if there are stale dummy frames,
1047 perhaps left over from when a longjump took us out of a
1048 function that was called by the debugger */
1049
1050 dummy_frame = dummy_frame_stack;
1051 while (dummy_frame)
1052 if (dummy_frame->fp INNER_THAN fp) /* stale -- destroy! */
1053 {
1054 dummy_frame_stack = dummy_frame->next;
1055 free (dummy_frame);
1056 dummy_frame = dummy_frame_stack;
1057 }
1058 else
1059 dummy_frame = dummy_frame->next;
1060
1061 dummy_frame = xmalloc (sizeof (struct dummy_frame));
1062 dummy_frame->pc = read_register (PC_REGNUM);
1063 dummy_frame->sp = read_register (SP_REGNUM);
1064 dummy_frame->fp = fp;
1065 read_register_bytes (0, dummy_frame->regs, REGISTER_BYTES);
1066 dummy_frame->next = dummy_frame_stack;
1067 dummy_frame_stack = dummy_frame;
1068}
1069
253ceee6
RU
1070/* Function: pop_frame
1071 Restore the machine state from either the saved dummy stack or a
1072 real stack frame. */
1073
1074void
1075generic_pop_current_frame (pop)
1076 void (*pop) PARAMS ((struct frame_info *frame));
1077{
1078 struct frame_info *frame = get_current_frame ();
1079 if (PC_IN_CALL_DUMMY(frame->pc, frame->frame, frame->frame))
1080 generic_pop_dummy_frame ();
1081 else
1082 pop (frame);
1083}
1084
dc1b349d
MS
1085/* Function: pop_dummy_frame
1086 Restore the machine state from a saved dummy stack frame. */
1087
1088void
1089generic_pop_dummy_frame ()
1090{
1091 struct dummy_frame *dummy_frame = dummy_frame_stack;
1092
1093 /* FIXME: what if the first frame isn't the right one, eg..
1094 because one call-by-hand function has done a longjmp into another one? */
1095
1096 if (!dummy_frame)
1097 error ("Can't pop dummy frame!");
1098 dummy_frame_stack = dummy_frame->next;
1099 write_register_bytes (0, dummy_frame->regs, REGISTER_BYTES);
253ceee6 1100 flush_cached_frames ();
dc1b349d
MS
1101 free (dummy_frame);
1102}
1103
1104/* Function: frame_chain_valid
1105 Returns true for a user frame or a call_function_by_hand dummy frame,
1106 and false for the CRT0 start-up frame. Purpose is to terminate backtrace */
1107
1108int
1109generic_frame_chain_valid (fp, fi)
1110 CORE_ADDR fp;
1111 struct frame_info *fi;
1112{
dc1b349d
MS
1113 if (PC_IN_CALL_DUMMY(FRAME_SAVED_PC(fi), fp, fp))
1114 return 1; /* don't prune CALL_DUMMY frames */
1115 else /* fall back to default algorithm (see frame.h) */
c301abbd 1116 return (fp != 0
253ceee6 1117 && (fi->frame INNER_THAN fp || fi->frame == fp)
c301abbd 1118 && !inside_entry_file (FRAME_SAVED_PC(fi)));
dc1b349d
MS
1119}
1120
1121/* Function: get_saved_register
1122 Find register number REGNUM relative to FRAME and put its (raw,
1123 target format) contents in *RAW_BUFFER.
1124
1125 Set *OPTIMIZED if the variable was optimized out (and thus can't be
1126 fetched). Note that this is never set to anything other than zero
1127 in this implementation.
1128
1129 Set *LVAL to lval_memory, lval_register, or not_lval, depending on
1130 whether the value was fetched from memory, from a register, or in a
1131 strange and non-modifiable way (e.g. a frame pointer which was
1132 calculated rather than fetched). We will use not_lval for values
1133 fetched from generic dummy frames.
1134
1135 Set *ADDRP to the address, either in memory on as a REGISTER_BYTE
1136 offset into the registers array. If the value is stored in a dummy
1137 frame, set *ADDRP to zero.
1138
1139 To use this implementation, define a function called
1140 "get_saved_register" in your target code, which simply passes all
1141 of its arguments to this function.
1142
1143 The argument RAW_BUFFER must point to aligned memory. */
1144
1145void
1146generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
1147 char *raw_buffer;
1148 int *optimized;
1149 CORE_ADDR *addrp;
1150 struct frame_info *frame;
1151 int regnum;
1152 enum lval_type *lval;
1153{
dc1b349d
MS
1154 struct frame_saved_regs fsr;
1155
1156 if (!target_has_registers)
1157 error ("No registers.");
1158
1159 /* Normal systems don't optimize out things with register numbers. */
1160 if (optimized != NULL)
1161 *optimized = 0;
1162
1163 if (addrp) /* default assumption: not found in memory */
1164 *addrp = 0;
1165
1166 /* Note: since the current frame's registers could only have been
1167 saved by frames INTERIOR TO the current frame, we skip examining
1168 the current frame itself: otherwise, we would be getting the
1169 previous frame's registers which were saved by the current frame. */
1170
b444216f 1171 while (frame && ((frame = frame->next) != NULL))
dc1b349d
MS
1172 {
1173 if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
1174 {
1175 if (lval) /* found it in a CALL_DUMMY frame */
1176 *lval = not_lval;
1177 if (raw_buffer)
1178 memcpy (raw_buffer,
1179 generic_find_dummy_frame (frame->pc, frame->frame) +
1180 REGISTER_BYTE (regnum),
1181 REGISTER_RAW_SIZE (regnum));
1182 return;
1183 }
1184
1185 FRAME_FIND_SAVED_REGS(frame, fsr);
1186 if (fsr.regs[regnum] != 0)
1187 {
1188 if (lval) /* found it saved on the stack */
1189 *lval = lval_memory;
1190 if (regnum == SP_REGNUM)
1191 {
1192 if (raw_buffer) /* SP register treated specially */
1193 store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
1194 fsr.regs[regnum]);
1195 }
1196 else
1197 {
1198 if (addrp) /* any other register */
1199 *addrp = fsr.regs[regnum];
1200 if (raw_buffer)
1201 read_memory (fsr.regs[regnum], raw_buffer,
1202 REGISTER_RAW_SIZE (regnum));
1203 }
1204 return;
1205 }
1206 }
1207
1208 /* If we get thru the loop to this point, it means the register was
1209 not saved in any frame. Return the actual live-register value. */
1210
1211 if (lval) /* found it in a live register */
1212 *lval = lval_register;
1213 if (addrp)
1214 *addrp = REGISTER_BYTE (regnum);
1215 if (raw_buffer)
1216 read_register_gen (regnum, raw_buffer);
1217}
15cb042b 1218#endif /* USE_GENERIC_DUMMY_FRAMES */
dc1b349d 1219
bd5635a1
RP
1220void
1221_initialize_blockframe ()
1222{
1223 obstack_init (&frame_cache_obstack);
1224}
This page took 0.354491 seconds and 4 git commands to generate.