Visibility hidden by default
[babeltrace.git] / src / plugins / lttng-utils / debug-info / dwarf.c
index 534d2883bd9f48d5333512135897d41da2c107c5..20c605c89939980330e36e43affb73185ec5d457 100644 (file)
@@ -1,35 +1,17 @@
 /*
- * dwarf.c
- *
- * 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
  */
 
+#include <stdbool.h>
+
 #include <glib.h>
+
 #include "dwarf.h"
 
-BT_HIDDEN
 struct bt_dwarf_cu *bt_dwarf_cu_create(Dwarf *dwarf_info)
 {
        struct bt_dwarf_cu *cu;
@@ -49,13 +31,11 @@ error:
        return NULL;
 }
 
-BT_HIDDEN
 void bt_dwarf_cu_destroy(struct bt_dwarf_cu *cu)
 {
        g_free(cu);
 }
 
-BT_HIDDEN
 int bt_dwarf_cu_next(struct bt_dwarf_cu *cu)
 {
        int ret;
@@ -68,7 +48,7 @@ int bt_dwarf_cu_next(struct bt_dwarf_cu *cu)
        }
 
        ret = dwarf_nextcu(cu->dwarf_info, cu->next_offset, &next_offset,
-                       &cu_header_size, NULL, NULL, NULL);
+               &cu_header_size, NULL, NULL, NULL);
        if (ret) {
                /* ret is -1 on error, 1 if no next CU. */
                goto end;
@@ -82,7 +62,6 @@ end:
        return ret;
 }
 
-BT_HIDDEN
 struct bt_dwarf_die *bt_dwarf_die_create(struct bt_dwarf_cu *cu)
 {
        Dwarf_Die *dwarf_die = NULL;
@@ -98,7 +77,7 @@ struct bt_dwarf_die *bt_dwarf_die_create(struct bt_dwarf_cu *cu)
        }
 
        dwarf_die = dwarf_offdie(cu->dwarf_info, cu->offset + cu->header_size,
-                       dwarf_die);
+               dwarf_die);
        if (!dwarf_die) {
                goto error;
        }
@@ -120,7 +99,6 @@ error:
        return NULL;
 }
 
-BT_HIDDEN
 void bt_dwarf_die_destroy(struct bt_dwarf_die *die)
 {
        if (!die) {
@@ -131,13 +109,11 @@ void bt_dwarf_die_destroy(struct bt_dwarf_die *die)
        g_free(die);
 }
 
-BT_HIDDEN
 int bt_dwarf_die_has_children(struct bt_dwarf_die *die)
 {
        return dwarf_haschildren(die->dwarf_die);
 }
 
-BT_HIDDEN
 int bt_dwarf_die_child(struct bt_dwarf_die *die)
 {
        int ret;
@@ -170,7 +146,6 @@ error:
        return ret;
 }
 
-BT_HIDDEN
 int bt_dwarf_die_next(struct bt_dwarf_die *die)
 {
        int ret;
@@ -213,7 +188,6 @@ error:
        return ret;
 }
 
-BT_HIDDEN
 int bt_dwarf_die_get_tag(struct bt_dwarf_die *die, int *tag)
 {
        int _tag;
@@ -234,7 +208,6 @@ error:
        return -1;
 }
 
-BT_HIDDEN
 int bt_dwarf_die_get_name(struct bt_dwarf_die *die, char **name)
 {
        const char *_name;
@@ -259,7 +232,6 @@ error:
        return -1;
 }
 
-BT_HIDDEN
 int bt_dwarf_die_get_call_file(struct bt_dwarf_die *die, char **filename)
 {
        int ret;
@@ -317,7 +289,6 @@ error:
        return -1;
 }
 
-BT_HIDDEN
 int bt_dwarf_die_get_call_line(struct bt_dwarf_die *die,
                uint64_t *line_no)
 {
@@ -355,7 +326,6 @@ error:
        return -1;
 }
 
-BT_HIDDEN
 int bt_dwarf_die_contains_addr(struct bt_dwarf_die *die, uint64_t addr,
                bool *contains)
 {
This page took 0.025019 seconds and 4 git commands to generate.