Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
probe.c File Reference
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "common.h"
#include "log.h"
#include "dwdebug.h"
#include "dwdebug_priv.h"
#include "target_api.h"
#include "target.h"
#include "probe_api.h"
#include "probe.h"
Include dependency graph for probe.c:

Go to the source code of this file.

Functions

result_t probe_do_sink_pre_handlers (struct probe *probe, tid_t tid, void *handler_data, struct probe *trigger, struct probe *base)
 
result_t probe_do_sink_post_handlers (struct probe *probe, tid_t tid, void *handler_data, struct probe *trigger, struct probe *base)
 
void probepoint_free_ext (struct probepoint *probepoint)
 
struct probeprobe_create (struct target *target, tid_t tid, struct probe_ops *pops, const char *name, probe_handler_t pre_handler, probe_handler_t post_handler, void *handler_data, int autofree, int tracked)
 
int probe_free (struct probe *probe, int force)
 
void probe_rename (struct probe *probe, const char *name)
 
int probe_hard_disable (struct probe *probe, int force)
 
int probe_hard_enable (struct probe *probe)
 
int probe_unregister (struct probe *probe, int force)
 
int probe_unregister_one (struct probe *probe, int force)
 
int probe_unregister_source (struct probe *sink, struct probe *src, int force)
 
int probe_unregister_source_one (struct probe *sink, struct probe *src, int force)
 
int probe_unregister_batch (struct target *target, struct probe **probelist, int listlen, int force)
 
struct probe__probe_register_addr (struct probe *probe, ADDR addr, struct memrange *range, probepoint_type_t type, probepoint_style_t style, probepoint_whence_t whence, probepoint_watchsize_t watchsize, struct bsymbol *bsymbol, ADDR symbol_addr)
 
struct probeprobe_register_addr (struct probe *probe, ADDR addr, probepoint_type_t type, probepoint_style_t style, probepoint_whence_t whence, probepoint_watchsize_t watchsize, struct bsymbol *bsymbol)
 
struct probeprobe_register_line (struct probe *probe, char *filename, int line, probepoint_style_t style, probepoint_whence_t whence, probepoint_watchsize_t watchsize)
 
struct probeprobe_register_symbol (struct probe *probe, struct bsymbol *bsymbol, probepoint_style_t style, probepoint_whence_t whence, probepoint_watchsize_t watchsize)
 
struct probeprobe_register_source (struct probe *sink, struct probe *src)
 
struct probeprobe_register_sources (struct probe *sink, struct probe *src,...)
 
int probe_register_batch (struct target *target, tid_t tid, ADDR *addrlist, int listlen, probepoint_type_t type, probepoint_style_t style, probepoint_whence_t whence, probepoint_watchsize_t watchsize, probe_handler_t pre_handler, probe_handler_t post_handler, void *handler_data, struct probe **probelist, int failureaction)
 
probepoint_watchsize_t probepoint_closest_watchsize (int size)
 
void * probe_summarize (struct probe *probe)
 
void * probe_summarize_tid (struct probe *probe, tid_t tid)
 
int probe_disable_one (struct probe *probe)
 
int probe_disable (struct probe *probe)
 
int probe_enable_one (struct probe *probe)
 
int probe_enable (struct probe *probe)
 
int probe_enabled (struct probe *probe)
 
int probe_is_base (struct probe *probe)
 
int probe_num_sources (struct probe *probe)
 
int probe_num_sinks (struct probe *probe)
 
char * probe_name (struct probe *probe)
 
struct bsymbolprobe_symbol (struct probe *probe)
 
struct targetprobe_target (struct probe *probe)
 
tid_t probe_tid (struct probe *probe)
 
void * probe_priv (struct probe *probe)
 
ADDR probe_addr (struct probe *probe)
 
probepoint_type_t probe_type (struct probe *probe)
 
probepoint_style_t probe_style (struct probe *probe)
 
probepoint_whence_t probe_whence (struct probe *probe)
 
void probepoint_release (struct target *target, struct target_thread *tthread, struct probepoint *probepoint)
 
struct thread_probepoint_contextprobepoint_hold (struct target *target, struct target_thread *tthread, struct probepoint *probepoint, struct thread_probepoint_context *tpc)
 
int probepoint_pause_handling (struct target *target, struct target_thread *tthread, struct probepoint *probepoint, thread_resumeat_t resumeat)
 
void tpc_free (struct thread_probepoint_context *tpc)
 
result_t probepoint_bp_handler (struct target *target, struct target_thread *tthread, struct probepoint *probepoint, int was_stepping)
 
result_t probepoint_ss_handler (struct target *target, struct target_thread *tthread, struct probepoint *probepoint)
 
result_t probepoint_interrupted_ss_handler (struct target *target, struct target_thread *tthread, struct probepoint *probepoint)
 
result_t probepoint_resumeat_handler (struct target *target, struct target_thread *tthread)
 
struct action__get_next_complex_action (struct probepoint *probepoint, struct action *current)
 
int action_sched (struct probe *probe, struct action *action, action_whence_t whence, action_handler_t handler, void *handler_data)
 
int action_cancel (struct action *action)
 
struct actionaction_return (REGVAL retval)
 
struct actionaction_singlestep (int nsteps)
 
struct actionaction_code (char *buf, uint32_t buflen, action_flag_t flags)
 
struct actionaction_regmod (REG regnum, REGVAL regval)
 
struct actionaction_memmod (ADDR dest, char *data, uint32_t len)
 
REFCNT action_release (struct action *action)
 
REFCNT action_free (struct action *action, int force)
 

Function Documentation

struct action* __get_next_complex_action ( struct probepoint probepoint,
struct action current 
)

Definition at line 3790 of file probe.c.

struct probe* __probe_register_addr ( struct probe probe,
ADDR  addr,
struct memrange range,
probepoint_type_t  type,
probepoint_style_t  style,
probepoint_whence_t  whence,
probepoint_watchsize_t  watchsize,
struct bsymbol bsymbol,
ADDR  symbol_addr 
)

Definition at line 1250 of file probe.c.

int action_cancel ( struct action action)

Definition at line 4413 of file probe.c.

struct action* action_code ( char *  buf,
uint32_t  buflen,
action_flag_t  flags 
)

Definition at line 4509 of file probe.c.

REFCNT action_free ( struct action action,
int  force 
)

Definition at line 4600 of file probe.c.

struct action* action_memmod ( ADDR  dest,
char *  data,
uint32_t  len 
)

Definition at line 4553 of file probe.c.

struct action* action_regmod ( REG  regnum,
REGVAL  regval 
)

Definition at line 4532 of file probe.c.

REFCNT action_release ( struct action action)

Definition at line 4576 of file probe.c.

struct action* action_return ( REGVAL  retval)

Definition at line 4457 of file probe.c.

int action_sched ( struct probe probe,
struct action action,
action_whence_t  whence,
action_handler_t  handler,
void *  handler_data 
)

Definition at line 4119 of file probe.c.

struct action* action_singlestep ( int  nsteps)

Definition at line 4483 of file probe.c.

ADDR probe_addr ( struct probe probe)

Definition at line 1959 of file probe.c.

struct probe* probe_create ( struct target target,
tid_t  tid,
struct probe_ops pops,
const char *  name,
probe_handler_t  pre_handler,
probe_handler_t  post_handler,
void *  handler_data,
int  autofree,
int  tracked 
)

Core probe library functions.

Definition at line 729 of file probe.c.

int probe_disable ( struct probe probe)

Definition at line 1811 of file probe.c.

int probe_disable_one ( struct probe probe)

Definition at line 1800 of file probe.c.

result_t probe_do_sink_post_handlers ( struct probe probe,
tid_t  tid,
void *  handler_data,
struct probe trigger,
struct probe base 
)

Definition at line 109 of file probe.c.

result_t probe_do_sink_pre_handlers ( struct probe probe,
tid_t  tid,
void *  handler_data,
struct probe trigger,
struct probe base 
)

Definition at line 48 of file probe.c.

int probe_enable ( struct probe probe)

Definition at line 1861 of file probe.c.

int probe_enable_one ( struct probe probe)

Definition at line 1849 of file probe.c.

int probe_enabled ( struct probe probe)

Definition at line 1915 of file probe.c.

int probe_free ( struct probe probe,
int  force 
)

Definition at line 777 of file probe.c.

int probe_hard_disable ( struct probe probe,
int  force 
)

Definition at line 912 of file probe.c.

int probe_hard_enable ( struct probe probe)

Definition at line 961 of file probe.c.

int probe_is_base ( struct probe probe)

Definition at line 1919 of file probe.c.

char* probe_name ( struct probe probe)

Definition at line 1935 of file probe.c.

int probe_num_sinks ( struct probe probe)

Definition at line 1929 of file probe.c.

int probe_num_sources ( struct probe probe)

Definition at line 1923 of file probe.c.

void* probe_priv ( struct probe probe)

Definition at line 1951 of file probe.c.

struct probe* probe_register_addr ( struct probe probe,
ADDR  addr,
probepoint_type_t  type,
probepoint_style_t  style,
probepoint_whence_t  whence,
probepoint_watchsize_t  watchsize,
struct bsymbol bsymbol 
)

Definition at line 1393 of file probe.c.

int probe_register_batch ( struct target target,
tid_t  tid,
ADDR addrlist,
int  listlen,
probepoint_type_t  type,
probepoint_style_t  style,
probepoint_whence_t  whence,
probepoint_watchsize_t  watchsize,
probe_handler_t  pre_handler,
probe_handler_t  post_handler,
void *  handler_data,
struct probe **  probelist,
int  failureaction 
)

Definition at line 1685 of file probe.c.

struct probe* probe_register_line ( struct probe probe,
char *  filename,
int  line,
probepoint_style_t  style,
probepoint_whence_t  whence,
probepoint_watchsize_t  watchsize 
)

Definition at line 1403 of file probe.c.

struct probe* probe_register_source ( struct probe sink,
struct probe src 
)

Definition at line 1593 of file probe.c.

struct probe* probe_register_sources ( struct probe sink,
struct probe src,
  ... 
)

Definition at line 1654 of file probe.c.

struct probe * probe_register_symbol ( struct probe probe,
struct bsymbol bsymbol,
probepoint_style_t  style,
probepoint_whence_t  whence,
probepoint_watchsize_t  watchsize 
)

Definition at line 1470 of file probe.c.

void probe_rename ( struct probe probe,
const char *  name 
)

Definition at line 898 of file probe.c.

probepoint_style_t probe_style ( struct probe probe)

Definition at line 1975 of file probe.c.

void* probe_summarize ( struct probe probe)

Definition at line 1786 of file probe.c.

void* probe_summarize_tid ( struct probe probe,
tid_t  tid 
)

Definition at line 1793 of file probe.c.

struct bsymbol* probe_symbol ( struct probe probe)

Definition at line 1939 of file probe.c.

struct target* probe_target ( struct probe probe)

Definition at line 1943 of file probe.c.

tid_t probe_tid ( struct probe probe)

Definition at line 1947 of file probe.c.

probepoint_type_t probe_type ( struct probe probe)

Definition at line 1968 of file probe.c.

int probe_unregister ( struct probe probe,
int  force 
)

Definition at line 1137 of file probe.c.

int probe_unregister_batch ( struct target target,
struct probe **  probelist,
int  listlen,
int  force 
)

Definition at line 1217 of file probe.c.

int probe_unregister_one ( struct probe probe,
int  force 
)

Definition at line 1141 of file probe.c.

int probe_unregister_source ( struct probe sink,
struct probe src,
int  force 
)

Definition at line 1145 of file probe.c.

int probe_unregister_source_one ( struct probe sink,
struct probe src,
int  force 
)

Definition at line 1186 of file probe.c.

probepoint_whence_t probe_whence ( struct probe probe)

Definition at line 1982 of file probe.c.

result_t probepoint_bp_handler ( struct target target,
struct target_thread tthread,
struct probepoint probepoint,
int  was_stepping 
)

Definition at line 2593 of file probe.c.

probepoint_watchsize_t probepoint_closest_watchsize ( int  size)

Definition at line 1769 of file probe.c.

void probepoint_free_ext ( struct probepoint probepoint)

Definition at line 570 of file probe.c.

struct thread_probepoint_context* probepoint_hold ( struct target target,
struct target_thread tthread,
struct probepoint probepoint,
struct thread_probepoint_context tpc 
)

Definition at line 2239 of file probe.c.

result_t probepoint_interrupted_ss_handler ( struct target target,
struct target_thread tthread,
struct probepoint probepoint 
)

Definition at line 3359 of file probe.c.

int probepoint_pause_handling ( struct target target,
struct target_thread tthread,
struct probepoint probepoint,
thread_resumeat_t  resumeat 
)

Definition at line 2252 of file probe.c.

void probepoint_release ( struct target target,
struct target_thread tthread,
struct probepoint probepoint 
)

Definition at line 2232 of file probe.c.

result_t probepoint_resumeat_handler ( struct target target,
struct target_thread tthread 
)

Definition at line 3504 of file probe.c.

result_t probepoint_ss_handler ( struct target target,
struct target_thread tthread,
struct probepoint probepoint 
)

Definition at line 3023 of file probe.c.

void tpc_free ( struct thread_probepoint_context tpc)

Definition at line 2279 of file probe.c.