Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
|
#include <pthread.h>
#include <glib.h>
#include <errno.h>
#include <sys/prctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "config.h"
#include "generic_rpc.h"
#include "common_xml.h"
#include "target_rpc.h"
#include "debuginfo_rpc.h"
#include "target_xml.h"
#include "util.h"
#include "alist.h"
#include "target.h"
#include "target_api.h"
#include "probe_api.h"
#include "evloop.h"
#include "monitor.h"
#include "proxyreq.h"
#include "target_listener_moduleStub.h"
Go to the source code of this file.
Data Structures | |
struct | target_rpc_listener_target_data |
struct | target_rpc_listener_action_data |
struct | target_rpc_listener_probe_data |
Functions | |
enum _vmi1__targetEventType | t_target_event_t_to_x_targetEventType (target_event_t chtype) |
void | target_rpc_init (void) |
void | target_rpc_fini (void) |
int | target_rpc_handle_request (struct soap *soap) |
int | vmi1__ListTargetTypes (struct soap *soap, void *_, struct vmi1__TargetTypesResponse *r) |
int | vmi1__ListTargets (struct soap *soap, void *_, struct vmi1__TargetsResponse *r) |
int | vmi1__GetTarget (struct soap *soap, vmi1__TargetIdT tid, struct vmi1__TargetResponse *r) |
int | vmi1__GetTargetLogs (struct soap *soap, vmi1__TargetIdT tid, int maxSize, struct vmi1__TargetLogsResponse *r) |
int | vmi1__InstantiateTarget (struct soap *soap, struct vmi1__TargetSpecT *spec, vmi1__ListenerT *ownerListener, struct vmi1__TargetResponse *r) |
int | vmi1__InstantiateOverlayTarget (struct soap *soap, vmi1__TargetIdT utid, vmi1__ThreadIdT thid, struct vmi1__TargetSpecT *spec, vmi1__ListenerT *ownerListener, struct vmi1__TargetResponse *r) |
int | vmi1__PauseTarget (struct soap *soap, vmi1__TargetIdT tid, struct vmi1__NoneResponse *r) |
int | vmi1__ResumeTarget (struct soap *soap, vmi1__TargetIdT tid, struct vmi1__NoneResponse *r) |
int | vmi1__CloseTarget (struct soap *soap, vmi1__TargetIdT tid, struct vmi1__NoneResponse *r) |
int | vmi1__KillTarget (struct soap *soap, vmi1__TargetIdT tid, int kill_sig, struct vmi1__NoneResponse *r) |
int | vmi1__FinalizeTarget (struct soap *soap, vmi1__TargetIdT tid, struct vmi1__NoneResponse *r) |
int | vmi1__PauseThread (struct soap *soap, vmi1__TargetIdT tid, vmi1__ThreadIdT thid, struct vmi1__NoneResponse *r) |
int | vmi1__LookupTargetSymbolSimple (struct soap *soap, vmi1__TargetIdT tid, char *name, struct vmi1__DebugFileOptsT *opts, struct vmi1__SymbolResponse *r) |
int | vmi1__LookupTargetSymbol (struct soap *soap, vmi1__TargetIdT tid, char *name, struct vmi1__DebugFileOptsT *opts, struct vmi1__NestedSymbolResponse *r) |
int | vmi1__LookupTargetAddrSimple (struct soap *soap, vmi1__TargetIdT tid, vmi1__ADDR addr, struct vmi1__DebugFileOptsT *opts, struct vmi1__SymbolResponse *r) |
int | vmi1__LookupTargetAddr (struct soap *soap, vmi1__TargetIdT tid, vmi1__ADDR addr, struct vmi1__DebugFileOptsT *opts, struct vmi1__NestedSymbolResponse *r) |
int | vmi1__LookupTargetLineSimple (struct soap *soap, vmi1__TargetIdT tid, char *filename, int line, struct vmi1__DebugFileOptsT *opts, struct vmi1__SymbolResponse *r) |
int | vmi1__LookupTargetLine (struct soap *soap, vmi1__TargetIdT tid, char *filename, int line, struct vmi1__DebugFileOptsT *opts, struct vmi1__NestedSymbolResponse *r) |
struct action * | x_ActionSpecT_to_t_action (struct soap *soap, struct vmi1__ActionSpecT *spec, struct target *target) |
result_t | _target_rpc_action_handler (struct action *action, struct target_thread *thread, struct probe *probe, struct probepoint *probepoint, handler_msg_t msg, int msg_detail, void *handler_data) |
result_t | _target_rpc_probe_handler (int type, struct probe *probe, tid_t tid, void *handler_data, struct probe *trigger, struct probe *base) |
result_t | _target_rpc_probe_prehandler (struct probe *probe, tid_t tid, void *handler_data, struct probe *trigger, struct probe *base) |
result_t | _target_rpc_probe_posthandler (struct probe *probe, tid_t tid, void *handler_data, struct probe *trigger, struct probe *base) |
int | vmi1__ProbeSymbolSimple (struct soap *soap, vmi1__TargetIdT tid, vmi1__ThreadIdT thid, char *probeName, char *symbol, struct vmi1__ProbeResponse *r) |
int | vmi1__ProbeSymbol (struct soap *soap, vmi1__TargetIdT tid, vmi1__ThreadIdT thid, char *probeName, char *symbol, vmi1__ProbepointStyleT *probepointStyle, vmi1__ProbepointWhenceT *probepointWhence, vmi1__ProbepointSizeT *probepointSize, struct vmi1__ProbeResponse *r) |
int | vmi1__ProbeAddr (struct soap *soap, vmi1__TargetIdT tid, vmi1__ThreadIdT thid, char *probeName, vmi1__ADDR addr, vmi1__ProbepointTypeT *probepointType, vmi1__ProbepointStyleT *probepointStyle, vmi1__ProbepointWhenceT *probepointWhence, vmi1__ProbepointSizeT *probepointSize, struct vmi1__ProbeResponse *r) |
int | vmi1__ProbeLine (struct soap *soap, vmi1__TargetIdT tid, vmi1__ThreadIdT thid, char *probeName, char *filename, int line, vmi1__ProbepointStyleT *probepointStyle, vmi1__ProbepointWhenceT *probepointWhence, vmi1__ProbepointSizeT *probepointSize, struct vmi1__ProbeResponse *r) |
int | vmi1__EnableProbe (struct soap *soap, vmi1__TargetIdT tid, vmi1__ProbeIdT pid, struct vmi1__NoneResponse *r) |
int | vmi1__DisableProbe (struct soap *soap, vmi1__TargetIdT tid, vmi1__ProbeIdT pid, struct vmi1__NoneResponse *r) |
int | vmi1__RemoveProbe (struct soap *soap, vmi1__TargetIdT tid, vmi1__ProbeIdT pid, struct vmi1__NoneResponse *r) |
int | vmi1__TargetBindListener (struct soap *soap, vmi1__TargetIdT tid, vmi1__ListenerT *listener, struct vmi1__NoneResponse *r) |
int | vmi1__TargetUnbindListener (struct soap *soap, vmi1__TargetIdT tid, vmi1__ListenerT *listener, struct vmi1__NoneResponse *r) |
Variables | |
struct vmi1__DebugFileOptsT | defDebugFileOpts |
struct monitor_objtype_ops | target_rpc_monitor_objtype_ops |
result_t _target_rpc_action_handler | ( | struct action * | action, |
struct target_thread * | thread, | ||
struct probe * | probe, | ||
struct probepoint * | probepoint, | ||
handler_msg_t | msg, | ||
int | msg_detail, | ||
void * | handler_data | ||
) |
Definition at line 1749 of file target_rpc.c.
result_t _target_rpc_probe_handler | ( | int | type, |
struct probe * | probe, | ||
tid_t | tid, | ||
void * | handler_data, | ||
struct probe * | trigger, | ||
struct probe * | base | ||
) |
Definition at line 1888 of file target_rpc.c.
result_t _target_rpc_probe_posthandler | ( | struct probe * | probe, |
tid_t | tid, | ||
void * | handler_data, | ||
struct probe * | trigger, | ||
struct probe * | base | ||
) |
Definition at line 1945 of file target_rpc.c.
result_t _target_rpc_probe_prehandler | ( | struct probe * | probe, |
tid_t | tid, | ||
void * | handler_data, | ||
struct probe * | trigger, | ||
struct probe * | base | ||
) |
Definition at line 1938 of file target_rpc.c.
enum _vmi1__targetEventType t_target_event_t_to_x_targetEventType | ( | target_event_t | chtype | ) |
Definition at line 214 of file target_rpc.c.
void target_rpc_fini | ( | void | ) |
Definition at line 416 of file target_rpc.c.
int target_rpc_handle_request | ( | struct soap * | soap | ) |
The main handling function. Will use proxyreqs for now; perhaps later we'll optionally add a different model involving a SOAP server for each target/analysis, where the master server is a launchpad/registry.
Definition at line 465 of file target_rpc.c.
void target_rpc_init | ( | void | ) |
Module init/fini stuff.
Definition at line 393 of file target_rpc.c.
int vmi1__CloseTarget | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 1231 of file target_rpc.c.
int vmi1__DisableProbe | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ProbeIdT | pid, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 2309 of file target_rpc.c.
int vmi1__EnableProbe | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ProbeIdT | pid, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 2252 of file target_rpc.c.
int vmi1__FinalizeTarget | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 1285 of file target_rpc.c.
int vmi1__GetTarget | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
struct vmi1__TargetResponse * | r | ||
) |
Definition at line 520 of file target_rpc.c.
int vmi1__GetTargetLogs | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
int | maxSize, | ||
struct vmi1__TargetLogsResponse * | r | ||
) |
Definition at line 543 of file target_rpc.c.
int vmi1__InstantiateOverlayTarget | ( | struct soap * | soap, |
vmi1__TargetIdT | utid, | ||
vmi1__ThreadIdT | thid, | ||
struct vmi1__TargetSpecT * | spec, | ||
vmi1__ListenerT * | ownerListener, | ||
struct vmi1__TargetResponse * | r | ||
) |
Definition at line 1028 of file target_rpc.c.
int vmi1__InstantiateTarget | ( | struct soap * | soap, |
struct vmi1__TargetSpecT * | spec, | ||
vmi1__ListenerT * | ownerListener, | ||
struct vmi1__TargetResponse * | r | ||
) |
Definition at line 733 of file target_rpc.c.
int vmi1__KillTarget | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
int | kill_sig, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 1255 of file target_rpc.c.
int vmi1__ListTargets | ( | struct soap * | soap, |
void * | _, | ||
struct vmi1__TargetsResponse * | r | ||
) |
Definition at line 489 of file target_rpc.c.
int vmi1__ListTargetTypes | ( | struct soap * | soap, |
void * | _, | ||
struct vmi1__TargetTypesResponse * | r | ||
) |
Definition at line 469 of file target_rpc.c.
int vmi1__LookupTargetAddr | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ADDR | addr, | ||
struct vmi1__DebugFileOptsT * | opts, | ||
struct vmi1__NestedSymbolResponse * | r | ||
) |
Definition at line 1477 of file target_rpc.c.
int vmi1__LookupTargetAddrSimple | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ADDR | addr, | ||
struct vmi1__DebugFileOptsT * | opts, | ||
struct vmi1__SymbolResponse * | r | ||
) |
Definition at line 1430 of file target_rpc.c.
int vmi1__LookupTargetLine | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
char * | filename, | ||
int | line, | ||
struct vmi1__DebugFileOptsT * | opts, | ||
struct vmi1__NestedSymbolResponse * | r | ||
) |
Definition at line 1578 of file target_rpc.c.
int vmi1__LookupTargetLineSimple | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
char * | filename, | ||
int | line, | ||
struct vmi1__DebugFileOptsT * | opts, | ||
struct vmi1__SymbolResponse * | r | ||
) |
Definition at line 1530 of file target_rpc.c.
int vmi1__LookupTargetSymbol | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
char * | name, | ||
struct vmi1__DebugFileOptsT * | opts, | ||
struct vmi1__NestedSymbolResponse * | r | ||
) |
Definition at line 1377 of file target_rpc.c.
int vmi1__LookupTargetSymbolSimple | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
char * | name, | ||
struct vmi1__DebugFileOptsT * | opts, | ||
struct vmi1__SymbolResponse * | r | ||
) |
Definition at line 1330 of file target_rpc.c.
int vmi1__PauseTarget | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 1183 of file target_rpc.c.
int vmi1__PauseThread | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ThreadIdT | thid, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 1306 of file target_rpc.c.
int vmi1__ProbeAddr | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ThreadIdT | thid, | ||
char * | probeName, | ||
vmi1__ADDR | addr, | ||
vmi1__ProbepointTypeT * | probepointType, | ||
vmi1__ProbepointStyleT * | probepointStyle, | ||
vmi1__ProbepointWhenceT * | probepointWhence, | ||
vmi1__ProbepointSizeT * | probepointSize, | ||
struct vmi1__ProbeResponse * | r | ||
) |
Definition at line 2100 of file target_rpc.c.
int vmi1__ProbeLine | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ThreadIdT | thid, | ||
char * | probeName, | ||
char * | filename, | ||
int | line, | ||
vmi1__ProbepointStyleT * | probepointStyle, | ||
vmi1__ProbepointWhenceT * | probepointWhence, | ||
vmi1__ProbepointSizeT * | probepointSize, | ||
struct vmi1__ProbeResponse * | r | ||
) |
Definition at line 2178 of file target_rpc.c.
int vmi1__ProbeSymbol | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ThreadIdT | thid, | ||
char * | probeName, | ||
char * | symbol, | ||
vmi1__ProbepointStyleT * | probepointStyle, | ||
vmi1__ProbepointWhenceT * | probepointWhence, | ||
vmi1__ProbepointSizeT * | probepointSize, | ||
struct vmi1__ProbeResponse * | r | ||
) |
Definition at line 2014 of file target_rpc.c.
int vmi1__ProbeSymbolSimple | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ThreadIdT | thid, | ||
char * | probeName, | ||
char * | symbol, | ||
struct vmi1__ProbeResponse * | r | ||
) |
Definition at line 1951 of file target_rpc.c.
int vmi1__RemoveProbe | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ProbeIdT | pid, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 2366 of file target_rpc.c.
int vmi1__ResumeTarget | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 1207 of file target_rpc.c.
int vmi1__TargetBindListener | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ListenerT * | listener, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 2423 of file target_rpc.c.
int vmi1__TargetUnbindListener | ( | struct soap * | soap, |
vmi1__TargetIdT | tid, | ||
vmi1__ListenerT * | listener, | ||
struct vmi1__NoneResponse * | r | ||
) |
Definition at line 2467 of file target_rpc.c.
struct action* x_ActionSpecT_to_t_action | ( | struct soap * | soap, |
struct vmi1__ActionSpecT * | spec, | ||
struct target * | target | ||
) |
Definition at line 1631 of file target_rpc.c.
struct vmi1__DebugFileOptsT defDebugFileOpts |
Definition at line 45 of file debuginfo_rpc.c.
struct monitor_objtype_ops target_rpc_monitor_objtype_ops |
Definition at line 377 of file target_rpc.c.