bfd_support.h File Reference

#include "config.h"
#include "utility.h"
#include "op_types.h"
#include "locate_images.h"
#include <bfd.h>
#include <stdint.h>
#include <string>
#include <map>
Include dependency graph for bfd_support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bfd_info
 holder for BFD state we must keep More...
struct  linenr_info
 debug info for a given pc More...

Functions

bool find_separate_debug_file (bfd *ibfd, std::string const &filepath_in, std::string &debug_filename, extra_images const &extra)
bfd * open_bfd (std::string const &file)
 open the given BFD
bfd * fdopen_bfd (std::string const &file, int fd)
 open the given BFD from the fd
bfd * spu_open_bfd (std::string const name, int fd, uint64_t offset_to_spu_elf)
 Return a BFD for an SPU ELF embedded in PPE binary file.
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)
linenr_info const find_nearest_line (bfd_info const &ibfd, op_bfd_symbol const &sym, bfd_vma offset, bool anon_obj)

Detailed Description

BFD muck we have to deal with.

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

Definition in file bfd_support.h.


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

Definition at line 379 of file bfd_support.cpp.

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

Referenced by op_bfd::get_symbols().

Here is the call graph for this function:

Here is the caller graph for this function:

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

open the given BFD from the fd

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.

Definition at line 632 of file bfd_support.cpp.

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().

Here is the call graph for this function:

bool find_separate_debug_file ( bfd *  ibfd,
std::string const &  filepath_in,
std::string &  debug_filename,
extra_images const &  extra 
)
bool interesting_symbol ( asymbol *  sym  ) 

Return true if the symbol is worth looking at.

Definition at line 332 of file bfd_support.cpp.

Referenced by op_bfd::get_symbols().

Here is the caller graph for this function:

bfd* open_bfd ( std::string const &  file  ) 

open the given BFD

bfd* spu_open_bfd ( std::string const   name,
int  fd,
uint64_t  offset_to_spu_elf 
)

Return a BFD for an SPU ELF embedded in PPE binary file.


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1