Lines Matching full:frames
1 /* Unwinding of frames like gstack/pstack.
63 struct frames struct
65 int frames; member
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; in frame_callback() local
181 int nr = frames->frames; in frame_callback()
182 if (! dwfl_frame_pc (state, &frames->frame[nr].pc, in frame_callback()
183 &frames->frame[nr].isactivation)) in frame_callback()
186 frames->frames++; in frame_callback()
187 if (frames->frames == maxframes) in frame_callback()
190 if (frames->frames == frames->allocated) in frame_callback()
192 frames->allocated *= 2; in frame_callback()
193 frames->frame = realloc (frames->frame, in frame_callback()
194 sizeof (struct frame) * frames->allocated); in frame_callback()
195 if (frames->frame == NULL) in frame_callback()
196 error (EXIT_BAD, errno, "realloc frames.frame"); in frame_callback()
364 print_frames (struct frames *frames, pid_t tid, int dwflerr, const char *what) in print_frames() argument
366 if (frames->frames > 0) in print_frames()
371 for (int nr = 0; nr < frames->frames && (maxframes == 0 in print_frames()
374 Dwarf_Addr pc = frames->frame[nr].pc; in print_frames()
375 bool isactivation = frames->frame[nr].isactivation; in print_frames()
425 if (frames->frames > 0 && frame_nr == maxframes) in print_frames()
426 error (0, 0, "tid %lld: shown max number of frames " in print_frames()
430 if (frames->frames > 0) in print_frames()
432 unsigned nr = frames->frames - 1; in print_frames()
433 Dwarf_Addr pc = frames->frame[nr].pc; in print_frames()
434 bool isactivation = frames->frame[nr].isactivation; in print_frames()
459 struct frames *frames = (struct frames *) thread_arg; in thread_callback() local
462 frames->frames = 0; in thread_callback()
474 print_frames (frames, tid, err, "dwfl_thread_getframes"); in thread_callback()
659 …N_("Additionally show inlined function frames using DWARF debuginfo if available (implies -d)"), 0… in main()
687 Program exits with return code 0 if all frames were shown without \ in main()
688 any errors. If some frames were shown, but there were some non-fatal \ in main()
690 with return code 1. If no frames could be shown, or a fatal error \ in main()
705 struct frames frames; in main() local
708 frames.allocated = maxframes == 0 ? 2048 : maxframes; in main()
709 frames.frames = 0; in main()
710 frames.frame = malloc (sizeof (struct frame) * frames.allocated); in main()
711 if (frames.frame == NULL) in main()
712 error (EXIT_BAD, errno, "malloc frames.frame"); in main()
717 switch (dwfl_getthread_frames (dwfl, pid, frame_callback, &frames)) in main()
728 print_frames (&frames, pid, err, "dwfl_getthread_frames"); in main()
734 switch (dwfl_getthreads (dwfl, thread_callback, &frames)) in main()
746 free (frames.frame); in main()
760 error (EXIT_BAD, 0, N_("Couldn't show any frames.")); in main()