|
Packit Service |
97d2fb |
/* Internal definitions for libdwarf.
|
|
Packit Service |
97d2fb |
Copyright (C) 2014 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 either
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
* the GNU Lesser General Public License as published by the Free
|
|
Packit Service |
97d2fb |
Software Foundation; either version 3 of the License, or (at
|
|
Packit Service |
97d2fb |
your option) any later version
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
or
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
* the GNU General Public License as published by the Free
|
|
Packit Service |
97d2fb |
Software Foundation; either version 2 of the License, or (at
|
|
Packit Service |
97d2fb |
your option) any later version
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
or both in parallel, as here.
|
|
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 GNU
|
|
Packit Service |
97d2fb |
General Public License for more details.
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
You should have received copies of the GNU General Public License and
|
|
Packit Service |
97d2fb |
the GNU Lesser General Public License along with this program. If
|
|
Packit Service |
97d2fb |
not, see <http://www.gnu.org/licenses/>. */
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
#ifdef HAVE_CONFIG_H
|
|
Packit Service |
97d2fb |
# include <config.h>
|
|
Packit Service |
97d2fb |
#endif
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
#include <stddef.h>
|
|
Packit Service |
97d2fb |
#include "libdwP.h"
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
Dwarf_Die *
|
|
Packit Service |
97d2fb |
dwarf_cu_die (Dwarf_CU *cu, Dwarf_Die *result, Dwarf_Half *versionp,
|
|
Packit Service |
97d2fb |
Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep,
|
|
Packit Service |
97d2fb |
uint8_t *offset_sizep, uint64_t *unit_idp,
|
|
Packit Service |
97d2fb |
Dwarf_Off *subdie_offsetp)
|
|
Packit Service |
97d2fb |
{
|
|
Packit Service |
97d2fb |
if (cu == NULL)
|
|
Packit Service |
97d2fb |
return NULL;
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
*result = CUDIE (cu);
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
if (versionp != NULL)
|
|
Packit Service |
97d2fb |
*versionp = cu->version;
|
|
Packit Service |
97d2fb |
if (abbrev_offsetp != NULL)
|
|
Packit Service |
97d2fb |
*abbrev_offsetp = cu->orig_abbrev_offset;
|
|
Packit Service |
97d2fb |
if (address_sizep != NULL)
|
|
Packit Service |
97d2fb |
*address_sizep = cu->address_size;
|
|
Packit Service |
97d2fb |
if (offset_sizep != NULL)
|
|
Packit Service |
97d2fb |
*offset_sizep = cu->offset_size;
|
|
Packit Service |
97d2fb |
if (unit_idp != NULL)
|
|
Packit Service |
97d2fb |
*unit_idp = cu->unit_id8;
|
|
Packit Service |
97d2fb |
if (subdie_offsetp != NULL)
|
|
Packit Service |
97d2fb |
*subdie_offsetp = cu->subdie_offset;
|
|
Packit Service |
97d2fb |
|
|
Packit Service |
97d2fb |
return result;
|
|
Packit Service |
97d2fb |
}
|