Lines Matching refs:frames

1 /* Unwinding of frames like gstack/pstack.
63 struct frames
65 int frames;
96 /* Whether any frames have been shown at all. Determines exit status. */
99 /* Program exit codes. All frames shown without any errors is GOOD.
100 Some frames shown with some non-fatal errors is an ERROR. A fatal
101 error or no frames shown at all is BAD. A command line USAGE exit
180 struct frames *frames = (struct frames *) arg;
181 int nr = frames->frames;
182 if (! dwfl_frame_pc (state, &frames->frame[nr].pc,
183 &frames->frame[nr].isactivation))
186 frames->frames++;
187 if (frames->frames == maxframes)
190 if (frames->frames == frames->allocated)
192 frames->allocated *= 2;
193 frames->frame = realloc (frames->frame,
194 sizeof (struct frame) * frames->allocated);
195 if (frames->frame == NULL)
196 error (EXIT_BAD, errno, "realloc frames.frame");
364 print_frames (struct frames *frames, pid_t tid, int dwflerr, const char *what)
366 if (frames->frames > 0)
371 for (int nr = 0; nr < frames->frames && (maxframes == 0
374 Dwarf_Addr pc = frames->frame[nr].pc;
375 bool isactivation = frames->frame[nr].isactivation;
425 if (frames->frames > 0 && frame_nr == maxframes)
426 error (0, 0, "tid %lld: shown max number of frames "
430 if (frames->frames > 0)
432 unsigned nr = frames->frames - 1;
433 Dwarf_Addr pc = frames->frame[nr].pc;
434 bool isactivation = frames->frame[nr].isactivation;
459 struct frames *frames = (struct frames *) thread_arg;
462 frames->frames = 0;
474 print_frames (frames, tid, err, "dwfl_thread_getframes");
659 N_("Additionally show inlined function frames using DWARF debuginfo if available (implies -d)"), 0 },
687 Program exits with return code 0 if all frames were shown without \
688 any errors. If some frames were shown, but there were some non-fatal \
690 with return code 1. If no frames could be shown, or a fatal error \
705 struct frames frames;
708 frames.allocated = maxframes == 0 ? 2048 : maxframes;
709 frames.frames = 0;
710 frames.frame = malloc (sizeof (struct frame) * frames.allocated);
711 if (frames.frame == NULL)
712 error (EXIT_BAD, errno, "malloc frames.frame");
717 switch (dwfl_getthread_frames (dwfl, pid, frame_callback, &frames))
728 print_frames (&frames, pid, err, "dwfl_getthread_frames");
734 switch (dwfl_getthreads (dwfl, thread_callback, &frames))
746 free (frames.frame);
760 error (EXIT_BAD, 0, N_("Couldn't show any frames."));