Lines Matching refs:dwfl
95 Dwfl *dwfl;
103 failure (Dwfl *dwfl, int errnum, const char *msg, struct argp_state *state)
105 if (dwfl != NULL)
106 dwfl_end (dwfl);
115 fail (Dwfl *dwfl, int errnum, const char *msg, struct argp_state *state)
117 failure (dwfl, errnum, msg, state);
143 Dwfl *dwfl = opt->dwfl;
144 if (dwfl == NULL)
146 dwfl = INTUSE(dwfl_begin) (&offline_callbacks);
147 if (dwfl == NULL)
148 return fail (dwfl, -1, arg, state);
149 opt->dwfl = dwfl;
153 dwfl->offline_next_address = 0;
155 if (dwfl->callbacks != &offline_callbacks)
169 if (opt->dwfl == NULL)
171 Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks);
172 int result = INTUSE(dwfl_linux_proc_report) (dwfl, atoi (arg));
174 return fail (dwfl, result, arg, state);
177 INTUSE(dwfl_linux_proc_attach) (dwfl, atoi (arg), false);
179 opt->dwfl = dwfl;
189 if (opt->dwfl == NULL)
199 Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks);
200 int result = INTUSE(dwfl_linux_proc_maps_report) (dwfl, f);
203 return fail (dwfl, result, arg, state);
204 opt->dwfl = dwfl;
214 Dwfl *dwfl = opt->dwfl;
215 if (dwfl == NULL)
216 opt->dwfl = dwfl = INTUSE(dwfl_begin) (&offline_callbacks);
218 else if (dwfl->callbacks != &offline_callbacks)
227 if (opt->dwfl == NULL)
229 Dwfl *dwfl = INTUSE(dwfl_begin) (&kernel_callbacks);
230 int result = INTUSE(dwfl_linux_kernel_report_kernel) (dwfl);
232 return fail (dwfl, result, _("cannot load kernel symbols"), state);
233 result = INTUSE(dwfl_linux_kernel_report_modules) (dwfl);
237 opt->dwfl = dwfl;
247 if (opt->dwfl == NULL)
249 Dwfl *dwfl = INTUSE(dwfl_begin) (&offline_callbacks);
250 int result = INTUSE(dwfl_linux_kernel_report_offline) (dwfl, arg,
253 return fail (dwfl, result, _("cannot find kernel or modules"), state);
254 opt->dwfl = dwfl;
264 Dwfl *dwfl = opt->dwfl;
266 if (dwfl == NULL)
270 dwfl = INTUSE(dwfl_begin) (&offline_callbacks);
271 if (INTUSE(dwfl_report_offline) (dwfl, "", arg, -1) == NULL)
272 return fail (dwfl, -1, arg, state);
273 opt->dwfl = dwfl;
297 int result = INTUSE(dwfl_core_file_report) (dwfl, core, opt->e);
302 return fail (dwfl, result, opt->core, state);
306 INTUSE(dwfl_core_file_attach) (dwfl, core);
309 if (dwfl->user_core == NULL)
311 dwfl->user_core = calloc (1, sizeof (struct Dwfl_User_Core));
312 if (dwfl->user_core == NULL)
319 dwfl->user_core->core = core;
320 dwfl->user_core->fd = fd;
331 if (INTUSE(dwfl_report_offline) (dwfl, "", opt->e, -1) == NULL)
332 return fail (dwfl, -1, opt->e, state);
339 int result = INTUSE(dwfl_report_end) (dwfl, NULL, NULL);
341 return fail (dwfl, -1, arg, state);
345 *(Dwfl **) state->input = dwfl;
354 dwfl_end (opt->dwfl);
367 *(Dwfl **) state->input = opt->dwfl;