LCOV - code coverage report
Current view: top level - mnt/wasteland/wcohen/systemtap_write/systemtap - setupdwfl.h (source / functions) Hit Total Coverage
Test: stap.info Lines: 2 2 100.0 %
Date: 2013-03-08 Functions: 2 2 100.0 %
Branches: 2 2 100.0 %

           Branch data     Line data    Source code
       1                 :            : // Setup routines for creating fully populated DWFLs. Used in pass 2 and 3.
       2                 :            : // Copyright (C) 2009-2011 Red Hat, Inc.
       3                 :            : //
       4                 :            : // This file is part of systemtap, and is free software.  You can
       5                 :            : // redistribute it and/or modify it under the terms of the GNU General
       6                 :            : // Public License (GPL); either version 2, or (at your option) any
       7                 :            : // later version.
       8                 :            : //
       9                 :            : #ifndef SETUP_DWFLPP_H
      10                 :            : #define SETUP_DWFLPP_H
      11                 :            : 
      12                 :            : #ifndef NT_GNU_BUILD_ID
      13                 :            : #define NT_GNU_BUILD_ID 3
      14                 :            : #endif
      15                 :            : 
      16                 :            : #include "config.h"
      17                 :            : #include "session.h"
      18                 :            : 
      19                 :            : #include <set>
      20                 :            : #include <string>
      21                 :            : #include <vector>
      22                 :            : 
      23                 :            : #if defined(HAVE_TR1_MEMORY)
      24                 :            : #include <tr1/memory>
      25                 :            : using std::tr1::shared_ptr;
      26                 :            : #elif defined(HAVE_BOOST_SHARED_PTR_HPP)
      27                 :            : #include <boost/shared_ptr.hpp>
      28                 :            : using boost::shared_ptr;
      29                 :            : #else
      30                 :            : #error "No shared_ptr implementation found; get boost or modern g++"
      31                 :            : #endif
      32                 :            : 
      33                 :            : extern "C" {
      34                 :            : #include <elfutils/libdwfl.h>
      35                 :            : }
      36                 :            : 
      37                 :            : struct StapDwfl
      38                 :            : {
      39                 :            : public:
      40                 :       1347 :   StapDwfl(Dwfl *d) : dwfl(d) { }
      41         [ +  + ]:       1347 :   ~StapDwfl() { if (dwfl) dwfl_end (dwfl); }
      42                 :            :   Dwfl *dwfl;
      43                 :            : };
      44                 :            : typedef shared_ptr<StapDwfl> DwflPtr;
      45                 :            : 
      46                 :            : DwflPtr setup_dwfl_kernel(const std::string &name,
      47                 :            :                           unsigned *found,
      48                 :            :                           systemtap_session &s);
      49                 :            : DwflPtr setup_dwfl_kernel(const std::set<std::string> &names,
      50                 :            :                           unsigned *found,
      51                 :            :                           systemtap_session &s);
      52                 :            : 
      53                 :            : DwflPtr setup_dwfl_user(const std::string &name);
      54                 :            : DwflPtr setup_dwfl_user(std::vector<std::string>::const_iterator &begin,
      55                 :            :                         const std::vector<std::string>::const_iterator &end,
      56                 :            :                         bool all_needed, systemtap_session &s);
      57                 :            : 
      58                 :            : // user-space files must be full paths and not end in .ko
      59                 :            : bool is_user_module(const std::string &m);
      60                 :            : 
      61                 :            : int internal_find_debuginfo (Dwfl_Module *mod,
      62                 :            :                               void **userdata __attribute__ ((unused)),
      63                 :            :                               const char *modname __attribute__ ((unused)),
      64                 :            :                               GElf_Addr base __attribute__ ((unused)),
      65                 :            :                               const char *file_name,
      66                 :            :                               const char *debuglink_file,
      67                 :            :                               GElf_Word debuglink_crc,
      68                 :            :                               char **debuginfo_file_name);
      69                 :            : int execute_abrt_action_install_debuginfo_to_abrt_cache (std::string hex);
      70                 :            : std::string get_kernel_build_id (systemtap_session &s);
      71                 :            : int download_kernel_debuginfo (systemtap_session &s, std::string hex);
      72                 :            : void debuginfo_path_insert_sysroot(std::string sysroot);
      73                 :            : 
      74                 :            : #endif

Generated by: LCOV version 1.9