|
Packit Service |
97d2fb |
/* Test program for dwfl_report_end bug.
|
|
Packit Service |
97d2fb |
Copyright (C) 2007 Red Hat, Inc.
|
|
Packit Service |
97d2fb |
This file is part of elfutils.
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
This file is free software; you can redistribute it and/or modify
|
|
Packit Service |
97d2fb |
it under the terms of the GNU General Public License as published by
|
|
Packit Service |
97d2fb |
the Free Software Foundation; either version 3 of the License, or
|
|
Packit Service |
97d2fb |
(at your option) any later version.
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
elfutils is distributed in the hope that it will be useful, but
|
|
Packit Service |
97d2fb |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
97d2fb |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
97d2fb |
GNU General Public License for more details.
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
You should have received a copy of the GNU General Public License
|
|
Packit Service |
97d2fb |
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
#include <config.h>
|
|
Packit Service |
97d2fb |
#include ELFUTILS_HEADER(dwfl)
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
#include <stdio.h>
|
|
Packit Service |
97d2fb |
#include <stdlib.h>
|
|
Packit Service |
97d2fb |
#include <fcntl.h>
|
|
Packit Service |
97d2fb |
#include <unistd.h>
|
|
Packit Service |
97d2fb |
#include <errno.h>
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
static const Dwfl_Callbacks callbacks =
|
|
Packit Service |
97d2fb |
{
|
|
Packit Service |
97d2fb |
.find_elf = dwfl_linux_proc_find_elf,
|
|
Packit Service |
97d2fb |
.find_debuginfo = dwfl_standard_find_debuginfo,
|
|
Packit Service |
97d2fb |
};
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
int
|
|
Packit Service |
97d2fb |
main (void)
|
|
Packit Service |
97d2fb |
{
|
|
Packit Service |
97d2fb |
Dwfl *dwfl = dwfl_begin (&callbacks);
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
for (int i = 0; i < 5; ++i)
|
|
Packit Service |
97d2fb |
{
|
|
Packit Service |
97d2fb |
dwfl_report_begin (dwfl);
|
|
Packit Service |
97d2fb |
dwfl_report_module (dwfl, "module1", 0, 10);
|
|
Packit Service |
97d2fb |
dwfl_report_end (dwfl, NULL, NULL);
|
|
Packit Service |
97d2fb |
}
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
dwfl_end (dwfl);
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
return 0;
|
|
Packit Service |
97d2fb |
}
|