-#ifndef _BABELTRACE_DWARF_H
-#define _BABELTRACE_DWARF_H
-
/*
- * Babeltrace - DWARF Information Reader
+ * SPDX-License-Identifier: MIT
*
* Copyright 2015 Antoine Busque <abusque@efficios.com>
*
- * Author: Antoine Busque <abusque@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Babeltrace - DWARF Information Reader
*/
+#ifndef _BABELTRACE_DWARF_H
+#define _BABELTRACE_DWARF_H
+
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
* @returns Pointer to the new bt_dwarf_cu on success,
* NULL on failure.
*/
-BT_HIDDEN
struct bt_dwarf_cu *bt_dwarf_cu_create(Dwarf *dwarf_info);
/**
*
* @param cu bt_dwarf_cu instance
*/
-BT_HIDDEN
void bt_dwarf_cu_destroy(struct bt_dwarf_cu *cu);
/**
* @returns 0 on success, 1 if no next CU is available,
* -1 on failure
*/
-BT_HIDDEN
int bt_dwarf_cu_next(struct bt_dwarf_cu *cu);
/**
* @returns Pointer to the new bt_dwarf_die on success,
* NULL on failure.
*/
-BT_HIDDEN
struct bt_dwarf_die *bt_dwarf_die_create(struct bt_dwarf_cu *cu);
/**
*
* @param die bt_dwarf_die instance
*/
-BT_HIDDEN
void bt_dwarf_die_destroy(struct bt_dwarf_die *die);
/**
* @param die bt_dwarf_die instance
* @returns 0 if the die no child, 1 otherwise
*/
-BT_HIDDEN
int bt_dwarf_die_has_children(struct bt_dwarf_die *die);
/**
* @returns 0 on success, 1 if no child DIE is available,
* -1 on failure
*/
-BT_HIDDEN
int bt_dwarf_die_child(struct bt_dwarf_die *die);
/**
* @returns 0 on success, 1 if no other siblings are available, -1 on
* failure
*/
-BT_HIDDEN
int bt_dwarf_die_next(struct bt_dwarf_die *die);
/**
* @param tag Out parameter, the DIE's tag value
* @returns 0 on success, -1 on failure.
*/
-BT_HIDDEN
int bt_dwarf_die_get_tag(struct bt_dwarf_die *die, int *tag);
/**
* @param name Out parameter, the DIE's name
* @returns 0 on success, -1 on failure
*/
-BT_HIDDEN
int bt_dwarf_die_get_name(struct bt_dwarf_die *die, char **name);
/**
* callsite
* @returns 0 on success, -1 on failure
*/
-BT_HIDDEN
int bt_dwarf_die_get_call_file(struct bt_dwarf_die *die, char **filename);
/**
* subroutine's callsite
* @returns 0 on success, -1 on failure
*/
-BT_HIDDEN
int bt_dwarf_die_get_call_line(struct bt_dwarf_die *die,
uint64_t *line_no);
* false if not
* @returns 0 on succes, -1 on failure
*/
-BT_HIDDEN
int bt_dwarf_die_contains_addr(struct bt_dwarf_die *die, uint64_t addr,
bool *contains);