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
Data Structures | Macros | Enumerations | Functions
target_process.h File Reference
#include <glib.h>
#include "target_api.h"
Include dependency graph for target_process.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  target_process
 
struct  target_process_ops
 

Macros

#define SAFE_TARGET_PROCESS_OP(target, op, errval,...)
 

Enumerations

enum  target_process_type_t { TARGET_PROCESS_TYPE_NONE = 0, TARGET_PROCESS_TYPE_LINUX = 1 }
 

Functions

struct target_processtarget_process_create (struct target *target, struct target_thread *tthread, struct addrspace *space)
 
REFCNT target_process_free (struct target_process *process, int force)
 

Macro Definition Documentation

#define SAFE_TARGET_PROCESS_OP (   target,
  op,
  errval,
  ... 
)
Value:
do { \
verror("target %s is not a process!\n",target->name); \
errno = EINVAL; \
return (errval); \
} \
else if (!target->process_ops || !target->process_ops->op) { \
verror("target %s does not support process operation '%s'!\n", \
target->name,#op); \
errno = ENOSYS; \
return (errval); \
} \
else { \
return target->process_ops->op(__VA_ARGS__); \
} \
} while (0);
target_personality_t personality
Definition: target_api.h:2515
struct target_process_ops * process_ops
Definition: target_api.h:2594
#define verror(format,...)
Definition: log.h:30
char * name
Definition: target_api.h:2521

Definition at line 31 of file target_process.h.

Enumeration Type Documentation

Enumerator
TARGET_PROCESS_TYPE_NONE 
TARGET_PROCESS_TYPE_LINUX 

Definition at line 26 of file target_process.h.

Function Documentation

struct target_process* target_process_create ( struct target target,
struct target_thread tthread,
struct addrspace space 
)

Creates a target_process.

Parameters
targetThe target object this process is associated with. If the target program is a process, the target object is the target itself; if the target program is an OS, the target object is the target object for the OS. Hopefully, this will not lead to confusion!
tthreadThe main thread in the process. The thread's target object should be the same as the target object parameter above.
spaceThe addrspace associated with the process. Again, the space's target should be the same as the target param above.
Returns
A target_process.

Definition at line 43 of file target_process.c.

REFCNT target_process_free ( struct target_process process,
int  force 
)

Definition at line 86 of file target_process.c.