Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
unwind.c File Reference
#include <elf.h>
#include <gelf.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
#include <linux/list.h>
#include <libunwind.h>
#include <libunwind-ptrace.h>
#include "thread.h"
#include "session.h"
#include "perf_regs.h"
#include "unwind.h"
#include "util.h"

Go to the source code of this file.

Data Structures

struct  unwind_info
struct  table_entry
struct  eh_frame_hdr


#define dwarf_search_unwind_table   UNW_OBJ(dwarf_search_unwind_table)
#define DW_EH_PE_FORMAT_MASK   0x0f /* format of the encoded value */
#define DW_EH_PE_APPL_MASK   0x70 /* how the value is to be applied */
#define DW_EH_PE_omit   0xff
#define DW_EH_PE_ptr   0x00 /* pointer-sized unsigned value */
#define DW_EH_PE_udata4   0x03 /* unsigned 32-bit value */
#define DW_EH_PE_udata8   0x04 /* unsigned 64-bit value */
#define DW_EH_PE_sdata4   0x0b /* signed 32-bit value */
#define DW_EH_PE_sdata8   0x0c /* signed 64-bit value */
#define DW_EH_PE_absptr   0x00 /* absolute value */
#define DW_EH_PE_pcrel   0x10 /* rel. to addr. of encoded value */
#define DW_EH_PE_funcrel   0x40 /* start-of-procedure-relative */
#define DW_EH_PE_aligned   0x50 /* aligned pointer */
#define dw_read(ptr, type, end)
#define dw_read_encoded_value(ptr, end, enc)


int UNW_OBJ() dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg)
int unwind__get_entries (unwind_entry_cb_t cb, void *arg, struct machine *machine, struct thread *thread, u64 sample_uregs, struct perf_sample *data)


struct eh_frame_hdr __packed

Macro Definition Documentation

#define DW_EH_PE_absptr   0x00 /* absolute value */

Definition at line 54 of file unwind.c.

#define DW_EH_PE_aligned   0x50 /* aligned pointer */

Definition at line 63 of file unwind.c.

#define DW_EH_PE_APPL_MASK   0x70 /* how the value is to be applied */

Definition at line 43 of file unwind.c.

#define DW_EH_PE_FORMAT_MASK   0x0f /* format of the encoded value */

Definition at line 42 of file unwind.c.

#define DW_EH_PE_funcrel   0x40 /* start-of-procedure-relative */

Definition at line 62 of file unwind.c.

#define DW_EH_PE_omit   0xff

Definition at line 46 of file unwind.c.

#define DW_EH_PE_pcrel   0x10 /* rel. to addr. of encoded value */

Definition at line 55 of file unwind.c.

#define DW_EH_PE_ptr   0x00 /* pointer-sized unsigned value */

Definition at line 47 of file unwind.c.

#define DW_EH_PE_sdata4   0x0b /* signed 32-bit value */

Definition at line 50 of file unwind.c.

#define DW_EH_PE_sdata8   0x0c /* signed 64-bit value */

Definition at line 51 of file unwind.c.

#define DW_EH_PE_udata4   0x03 /* unsigned 32-bit value */

Definition at line 48 of file unwind.c.

#define DW_EH_PE_udata8   0x04 /* unsigned 64-bit value */

Definition at line 49 of file unwind.c.

#define dw_read (   ptr,
({ \
type *__p = (type *) ptr; \
type __v; \
if ((__p + 1) > (type *) end) \
return -EINVAL; \
__v = *__p++; \
ptr = (typeof(ptr)) __p; \
__v; \

Definition at line 82 of file unwind.c.

#define dw_read_encoded_value (   ptr,
({ \
u64 __v; \
if (__dw_read_encoded_value(&ptr, end, &__v, enc)) { \
return -EINVAL; \
} \
__v; \

Definition at line 144 of file unwind.c.

#define dwarf_search_unwind_table   UNW_OBJ(dwarf_search_unwind_table)

Definition at line 40 of file unwind.c.

Function Documentation

int UNW_OBJ() dwarf_search_unwind_table ( unw_addr_space_t  as,
unw_word_t  ip,
unw_dyn_info_t *  di,
unw_proc_info_t *  pi,
int  need_unwind_info,
void arg 
int unwind__get_entries ( unwind_entry_cb_t cb  ,
void arg,
struct machine machine,
struct thread thread,
u64  sample_uregs,
struct perf_sample data 

Definition at line 546 of file unwind.c.

Variable Documentation