summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 10:05:37 -0700
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-22 21:26:31 -0400
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadtalos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.gz
talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.zip
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles')
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c111
2 files changed, 0 insertions, 133 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
deleted file mode 100644
index c59a006ed..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "A small utility for printing debig source file locations embedded in binaries"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://../dwarfsrcfiles.c;md5=31483894e453a77acbb67847565f1b5c;beginline=1;endline=8"
-
-SRC_URI = "file://dwarfsrcfiles.c"
-BBCLASSEXTEND = "native"
-DEPENDS = "elfutils"
-DEPENDS_append_libc-musl = " argp-standalone"
-
-do_compile () {
- ${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw
-}
-
-do_compile_libc-musl () {
- ${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw -largp
-}
-
-do_install () {
- install -d ${D}${bindir}
- install -t ${D}${bindir} dwarfsrcfiles
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
deleted file mode 100644
index af7af524e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
+++ /dev/null
@@ -1,111 +0,0 @@
-// dwarfsrcfiles.c - Get source files associated with the dwarf in a elf file.
-// gcc -Wall -g -O2 -lelf -ldw -o dwarfsrcfiles dwarfsrcfiles.c
-//
-// Copyright (C) 2011, Mark Wielaard <mjw@redhat.com>
-//
-// This file is free software. You can redistribute it and/or modify
-// it under the terms of the GNU General Public License (GPL); either
-// version 2, or (at your option) any later version.
-
-#include <argp.h>
-#include <stdio.h>
-
-#include <dwarf.h>
-#include <elfutils/libdw.h>
-#include <elfutils/libdwfl.h>
-
-static int
-process_cu (Dwarf_Die *cu_die)
-{
- Dwarf_Attribute attr;
- const char *name;
- const char *dir = NULL;
-
- Dwarf_Files *files;
- size_t n;
- int i;
-
- if (dwarf_tag (cu_die) != DW_TAG_compile_unit)
- {
- fprintf (stderr, "DIE isn't a compile unit");
- return -1;
- }
-
- if (dwarf_attr (cu_die, DW_AT_name, &attr) == NULL)
- {
- fprintf(stderr, "CU doesn't have a DW_AT_name");
- return -1;
- }
-
- name = dwarf_formstring (&attr);
- if (name == NULL)
- {
- fprintf(stderr, "Couldn't get DW_AT_name as string, %s",
- dwarf_errmsg (-1));
- return -1;
- }
-
- if (dwarf_attr (cu_die, DW_AT_comp_dir, &attr) != NULL)
- {
- dir = dwarf_formstring (&attr);
- if (dir == NULL)
- {
- fprintf(stderr, "Couldn't get DW_AT_comp_die as string, %s",
- dwarf_errmsg (-1));
- return -1;
- }
- }
-
- if (dir == NULL)
- printf ("%s\n", name);
- else
- printf ("%s/%s\n", dir, name);
-
- if (dwarf_getsrcfiles (cu_die, &files, &n) != 0)
- {
- fprintf(stderr, "Couldn't get CU file table, %s",
- dwarf_errmsg (-1));
- return -1;
- }
-
- for (i = 1; i < n; i++)
- {
- const char *file = dwarf_filesrc (files, i, NULL, NULL);
- if (dir != NULL && file[0] != '/')
- printf ("\t%s/%s\n", dir, file);
- else
- printf ("\t%s\n", file);
- }
-
- return 0;
-}
-
-int
-main (int argc, char **argv)
-{
- char* args[3];
- int res = 0;
- Dwfl *dwfl;
- Dwarf_Addr bias;
-
- if (argc != 2)
- fprintf(stderr, "Usage %s <file>", argv[0]);
-
- // Pretend "dwarfsrcfiles -e <file>" was given, so we can use standard
- // dwfl argp parser to open the file for us and get our Dwfl. Useful
- // in case argument is an ET_REL file (like kernel modules). libdwfl
- // will fix up relocations for us.
- args[0] = argv[0];
- args[1] = "-e";
- args[2] = argv[1];
-
- argp_parse (dwfl_standard_argp (), 3, args, 0, NULL, &dwfl);
-
- Dwarf_Die *cu = NULL;
- while ((cu = dwfl_nextcu (dwfl, cu, &bias)) != NULL)
- res |= process_cu (cu);
-
- dwfl_end (dwfl);
-
- return res;
-}
OpenPOWER on IntegriCloud