bfd_support.cpp File Reference

BFD muck we have to deal with. More...

#include "bfd_support.h"
#include "op_bfd.h"
#include "op_fileio.h"
#include "op_config.h"
#include "string_manip.h"
#include "file_manip.h"
#include "cverb.h"
#include "locate_images.h"
#include "op_libiberty.h"
#include "op_exception.h"
#include <unistd.h>
#include <errno.h>
#include <elf.h>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
Include dependency graph for bfd_support.cpp:

Defines

#define NT_GNU_BUILD_ID   3

Functions

bfd * open_bfd (string const &file)
bfd * fdopen_bfd (string const &file, int fd)
bool find_separate_debug_file (bfd *ibfd, string const &filepath_in, string &debug_filename, extra_images const &extra)
bool interesting_symbol (asymbol *sym)
 Return true if the symbol is worth looking at.
bool boring_symbol (op_bfd_symbol const &first, op_bfd_symbol const &second)
 return true if the first symbol is less interesting than the second symbol boring symbol are eliminated when multiple symbol exist at the same vma
linenr_info const find_nearest_line (bfd_info const &b, op_bfd_symbol const &sym, bfd_vma offset, bool anon_obj)
 Attempt to locate a filename + line number for the given symbol and offset.

Variables

verbose vbfd

Detailed Description

BFD muck we have to deal with.

Remarks:
Copyright 2005 OProfile authors
Read the file COPYING
Author:
John Levon

Define Documentation

#define NT_GNU_BUILD_ID   3

Function Documentation

bool boring_symbol ( op_bfd_symbol const &  first,
op_bfd_symbol const &  second 
)

return true if the first symbol is less interesting than the second symbol boring symbol are eliminated when multiple symbol exist at the same vma

References op_bfd_symbol::hidden(), op_bfd_symbol::name(), and op_bfd_symbol::weak().

bfd* fdopen_bfd ( string const &  file,
int  fd 
)

References cverb.

linenr_info const find_nearest_line ( bfd_info const &  ibfd,
op_bfd_symbol const &  sym,
bfd_vma  offset,
bool  anon_obj 
)

Attempt to locate a filename + line number for the given symbol and offset.

The bfd object is either the object associated with the binary or the once associated with the separated debug info file so find_nearest_line() can't lookup the section contents of code section etc. The filepos of debuginfo symbols are different from the original file but we fixed symbol filepos earlier.

References bfd_info::abfd, linenr_info::filename, op_bfd_symbol::filepos(), linenr_info::found, scoped_array< T >::get(), bfd_info::get_image_bfd_info(), linenr_info::line, op_bfd_symbol::name(), op_bfd_symbol::symbol(), bfd_info::syms, bfd_info::valid(), and op_bfd_symbol::value().

bool find_separate_debug_file ( bfd *  ibfd,
string const &  filepath_in,
string &  debug_filename,
extra_images const &  extra 
)

References cverb, DEBUGDIR, and op_dirname().

Referenced by op_bfd::has_debug_info().

bool interesting_symbol ( asymbol *  sym  ) 

Return true if the symbol is worth looking at.

bfd* open_bfd ( string const &  file  ) 

References cverb.

Referenced by op_bfd::has_debug_info().


Variable Documentation


Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1