-#ifdef SAVE_STACK
-static void
-init_frame (FRAME *fptr)
-{
- FRAME tmp_frame;
-
-#ifdef sparc
- /* Do the system trap ST_FLUSH_WINDOWS */
- asm ("ta 3");
- asm ("st %sp, [%i0+0]");
- asm ("st %fp, [%i0+4]");
-#endif
-
- fptr->pc = (char *) init_frame;
- tmp_frame = *fptr;
-
- PREVIOUS_FRAME (tmp_frame);
-
- *fptr = tmp_frame;
- return;
-}
-
-#ifdef SAVE_ARGS
-static void *
-frame_arg (FRAME *fptr, int index)
-{
- return ((void *) FRAME_ARG(*fptr, index));
-}
-#endif
-
-static void
-save_backtrace (FRAME *current_frame_ptr, fun_entry *table)
-{
- int i = 0;
-#ifdef SAVE_ARGS
- int j;
-#endif
- FRAME current_frame = *current_frame_ptr;
-
- /* Get up and out of free() */
- PREVIOUS_FRAME (current_frame);
-
- /* now do the basic loop adding data until there is no more */
- while (PREVIOUS_FRAME (current_frame) && i < TRACE_LIMIT)
- {
- table[i].return_pc = (void (*)())FRAME_PC (current_frame);
-#ifdef SAVE_ARGS
- for (j = 0; j < 3; j++)
- table[i].arg[j] = frame_arg (¤t_frame, j);
-#endif
- i++;
- }
- memset (&table[i], 0, sizeof (fun_entry) * (TRACE_LIMIT - i));
-}
-
-free_queue_entry *
-find_backtrace (void *ptr)
-{
- int i;
-
- for (i = 0; i < FREE_QUEUE_LIMIT; i++)
- if (free_queue[i].address == ptr)
- return &free_queue[i];
-
- return 0;
-}
-#endif /* SAVE_STACK */
-
-int strict_free_check;