HPCToolkit
|
#include <stdio.h>
#include <assert.h>
#include <string>
#include <include/hpctoolkit-config.h>
#include <xed-interface.h>
#include "code-ranges.h"
#include "function-entries.h"
#include "process-ranges.h"
#include <lib/isa-lean/x86/instruction-set.h>
Go to the source code of this file.
Macros | |
#define | RELOCATE(u, offset) (((char *) (u)) - (offset)) |
#define | SAVE_REL_OFFSET(offset) |
#define | KILL_REL_OFFSET() |
Functions | |
xed_iclass_enum_t | xed_iclass (char *ins) |
static void | process_call (char *ins, long offset, xed_decoded_inst_t *xptr, void *start, void *end) |
static bool | is_push_bp (char *ins) |
static bool | is_sub_immed_sp (char *ins, char **next) |
static bool | is_2step_push_bp (char *ins) |
static bool | contains_bp_save (char *ins) |
static bool | is_push_bp_seq (char *ins) |
static void | process_branch (char *ins, long offset, xed_decoded_inst_t *xptr, char *vstart, char *vend) |
static void | after_unconditional (char *ins, long offset, xed_decoded_inst_t *xptr) |
static bool | invalid_routine_start (unsigned char *ins) |
static void | addsub (char *ins, xed_decoded_inst_t *xptr, xed_iclass_enum_t iclass, long ins_offset) |
static void | process_move (char *ins, xed_decoded_inst_t *xptr, long ins_offset) |
static void | process_push (char *ins, xed_decoded_inst_t *xptr, long ins_offset) |
static void | process_pop (char *ins, xed_decoded_inst_t *xptr, long ins_offset) |
static void | process_enter (char *ins, long ins_offset) |
static void | process_leave (char *ins, long ins_offset) |
static bool | bkwd_jump_into_protected_range (char *ins, long offset, xed_decoded_inst_t *xptr) |
static bool | validate_tail_call_from_jump (char *ins, long offset, xed_decoded_inst_t *xptr) |
static bool | nextins_looks_like_fn_start (char *ins, long offset, xed_decoded_inst_t *xptrin) |
static bool | lea_has_zero_offset (xed_decoded_inst_t *xptr) |
void | process_range_init () |
void | process_range (const char *name, long offset, void *vstart, void *vend, DiscoverFnTy fn_discovery) |
static int | is_padding (int c) |
static bool | skip_padding (unsigned char **ins) |
static void * | get_branch_target (char *ins, xed_decoded_inst_t *xptr, xed_operand_values_t *vals) |
static bool | contains_bp_save_window (char *ins, size_t window) |
static bool | is_sub_immed_prologue (char *ins) |
bool | range_contains_control_flow (void *vstart, void *vend) |
static char * | xed_next (char *ins) |
static bool | is_mov_sp_2_bp (char *ins) |
static bool | ins_seq_is_std_frame (char *ins) |
static bool | ins_seq_has_reg_move_to_bp (char *ins) |
static bool | ins_seq_is_common_frameless_proc (char *ins) |
static int | mem_below_rsp_or_rbp (xed_decoded_inst_t *xptr, int oindex) |
static bool | inst_accesses_callers_mem (xed_decoded_inst_t *xptr) |
static bool | from_ax_reg (xed_decoded_inst_t *xptr) |
static bool | is_null (unsigned char *ins, int n) |
static bool | is_breakpoint (xed_decoded_inst_t *xptr) |
void | x86_dump_ins (void *ins) |
Variables | |
static xed_state_t | dbg_xed_machine_state |
static xed_state_t | xed_machine_state |
static char * | prologue_start = NULL |
static char * | set_rbp = NULL |
static char * | push_rbp = NULL |
static char * | push_other = NULL |
static char * | last_bad = NULL |
static xed_reg_enum_t | push_other_reg |
static const size_t | WINDOW = 16 |
static const size_t | FRAMELESS_PROC_WINDOW = 8 |
#define KILL_REL_OFFSET | ( | ) |
Definition at line 209 of file x86-process-ranges.cpp.
#define RELOCATE | ( | u, | |
offset | |||
) | (((char *) (u)) - (offset)) |
Definition at line 157 of file x86-process-ranges.cpp.
#define SAVE_REL_OFFSET | ( | offset | ) |
Definition at line 208 of file x86-process-ranges.cpp.
|
static |
Definition at line 1351 of file x86-process-ranges.cpp.
|
static |
Definition at line 479 of file x86-process-ranges.cpp.
|
static |
Definition at line 774 of file x86-process-ranges.cpp.
|
static |
Definition at line 640 of file x86-process-ranges.cpp.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1079 of file x86-process-ranges.cpp.
|
static |
Definition at line 1024 of file x86-process-ranges.cpp.
|
static |
Definition at line 1230 of file x86-process-ranges.cpp.
|
static |
Definition at line 1309 of file x86-process-ranges.cpp.
|
static |
Definition at line 701 of file x86-process-ranges.cpp.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 711 of file x86-process-ranges.cpp.
|
static |
Definition at line 691 of file x86-process-ranges.cpp.
|
static |
|
static |
|
static |
|
static |
Definition at line 1085 of file x86-process-ranges.cpp.
|
static |
Definition at line 1160 of file x86-process-ranges.cpp.
|
static |
Definition at line 720 of file x86-process-ranges.cpp.
|
static |
|
static |
Definition at line 1497 of file x86-process-ranges.cpp.
|
static |
|
static |
Definition at line 1453 of file x86-process-ranges.cpp.
|
static |
Definition at line 1426 of file x86-process-ranges.cpp.
void process_range | ( | const char * | name, |
long | offset, | ||
void * | vstart, | ||
void * | vend, | ||
DiscoverFnTy | fn_discovery | ||
) |
void process_range_init | ( | void | ) |
Definition at line 221 of file x86-process-ranges.cpp.
bool range_contains_control_flow | ( | void * | vstart, |
void * | vend | ||
) |
|
static |
Definition at line 436 of file x86-process-ranges.cpp.
|
static |
Definition at line 857 of file x86-process-ranges.cpp.
void x86_dump_ins | ( | void * | ins | ) |
Definition at line 1328 of file x86-process-ranges.cpp.
xed_iclass_enum_t xed_iclass | ( | char * | ins | ) |
|
static |
|
static |
Definition at line 72 of file x86-process-ranges.cpp.
|
static |
Definition at line 1029 of file x86-process-ranges.cpp.
|
static |
Definition at line 177 of file x86-process-ranges.cpp.
|
static |
Definition at line 173 of file x86-process-ranges.cpp.
|
static |
Definition at line 176 of file x86-process-ranges.cpp.
|
static |
Definition at line 178 of file x86-process-ranges.cpp.
|
static |
Definition at line 175 of file x86-process-ranges.cpp.
|
static |
Definition at line 174 of file x86-process-ranges.cpp.
|
static |
Definition at line 595 of file x86-process-ranges.cpp.
|
static |
Definition at line 164 of file x86-process-ranges.cpp.