honggfuzz  2.2
About: honggfuzz is a security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with powerful analysis options.
  Fossies Dox: honggfuzz-2.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

bfd.c File Reference
#include "linux/bfd.h"
#include <dis-asm.h>
#include <inttypes.h>
#include <pthread.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "honggfuzz.h"
#include "libhfcommon/common.h"
#include "libhfcommon/files.h"
#include "libhfcommon/log.h"
#include "libhfcommon/util.h"
Include dependency graph for bfd.c:

Go to the source code of this file.

Data Structures

struct  bfd_t


#define bfd_get_section_size(section)   bfd_section_size(section)
#define bfd_get_section_vma(ptr, section)   bfd_section_vma(section)


static bool arch_bfdInit (pid_t pid, bfd_t *bfdParams)
static void arch_bfdDestroy (bfd_t *bfdParams)
void arch_bfdDemangle (funcs_t *funcs, size_t funcCnt)
static struct bfd_section * arch_getSectionForPc (bfd *bfdh, uint64_t pc)
void arch_bfdResolveSyms (pid_t pid, funcs_t *funcs, size_t num)
static int arch_bfdFPrintF (void *buf, const char *fmt,...)
void arch_bfdDisasm (pid_t pid, uint8_t *mem, size_t size, char *instr)


static pthread_mutex_t arch_bfd_mutex = PTHREAD_MUTEX_INITIALIZER

Macro Definition Documentation

◆ bfd_get_section_size

#define bfd_get_section_size (   section)    bfd_section_size(section)

Definition at line 47 of file bfd.c.

◆ bfd_get_section_vma

#define bfd_get_section_vma (   ptr,
)    bfd_section_vma(section)

Definition at line 50 of file bfd.c.

Function Documentation

◆ arch_bfdDemangle()

void arch_bfdDemangle ( funcs_t funcs,
size_t  funcCnt 

Definition at line 115 of file bfd.c.

Referenced by arch_traceAnalyzeData(), and arch_traceSaveData().

◆ arch_bfdDestroy()

static void arch_bfdDestroy ( bfd_t bfdParams)

Definition at line 100 of file bfd.c.

References bfd_t::bfdh, bfd_t::dsyms, and bfd_t::syms.

Referenced by arch_bfdResolveSyms().

◆ arch_bfdDisasm()

void arch_bfdDisasm ( pid_t  pid,
uint8_t *  mem,
size_t  size,
char *  instr 

Definition at line 200 of file bfd.c.

References _HF_INSTR_SZ, arch_bfd_mutex, arch_bfdFPrintF(), LOG_W, MX_SCOPED_LOCK, and size.

Referenced by arch_getInstrStr().

◆ arch_bfdFPrintF()

static int arch_bfdFPrintF ( void *  buf,
const char *  fmt,

Definition at line 191 of file bfd.c.

References _HF_INSTR_SZ, and util_vssnprintf().

Referenced by arch_bfdDisasm().

◆ arch_bfdInit()

static bool arch_bfdInit ( pid_t  pid,
bfd_t bfdParams 

Definition at line 68 of file bfd.c.

References bfd_t::bfdh, bfd_t::dsyms, LOG_E, bfd_t::syms, and util_Calloc().

Referenced by arch_bfdResolveSyms().

◆ arch_bfdResolveSyms()

void arch_bfdResolveSyms ( pid_t  pid,
funcs_t funcs,
size_t  num 

◆ arch_getSectionForPc()

static struct bfd_section* arch_getSectionForPc ( bfd *  bfdh,
uint64_t  pc 

Definition at line 132 of file bfd.c.

References bfd_get_section_size, and bfd_get_section_vma.

Referenced by arch_bfdResolveSyms().

Variable Documentation

◆ arch_bfd_mutex

pthread_mutex_t arch_bfd_mutex = PTHREAD_MUTEX_INITIALIZER

Definition at line 66 of file bfd.c.

Referenced by arch_bfdDisasm(), and arch_bfdResolveSyms().