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
Macros | Typedefs | Enumerations
common.h File Reference
#include <stdint.h>
#include <inttypes.h>
Include dependency graph for common.h:

Go to the source code of this file.

Macros

#define PRIiTID   PRIi32
 
#define PRIxADDR   PRIx32
 
#define PRIxFULLADDR   "016"PRIx32
 
#define PRIuADDR   PRIu32
 
#define PRIiOFFSET   PRIi32
 
#define PRIxOFFSET   PRIx32
 
#define PRIxREGVAL   PRIx32
 
#define PRIuREGVAL   PRIu32
 
#define ADDRMAX   UINT32_MAX
 
#define OFFSETMAX   UINT32_MAX
 
#define ptr_t   unsigned long int
 
#define PRIuNUM   PRIu64
 
#define PRIiNUM   PRIi64
 
#define PRIxNUM   PRIx64
 
#define PRIiREG   PRIi8
 
#define PRIiSMOFFSET   PRIi32
 
#define PRIxSMOFFSET   PRIx32
 
#define __PAGE_SIZE   0x1000
 
#define PROT_READ   0x1
 
#define PROT_WRITE   0x2
 
#define PROT_EXEC   0x4
 
#define PROT_SHARED   0x8
 
#define PRIiREFCNT   PRIu32
 
#define RWGUARD(x)   ++((x)->refcnt)
 
#define RWUNGUARD(x)   --((x)->refcnt)
 
#define REFCNTDECL(trefcnt)
 
#define RHOLD(x, hx)   ++((x)->refcnt)
 
#define RHOLDW(x, hx)   ++((x)->refcntw)
 
#define RPUT(x, objtype, hx, rc)
 
#define RPUTW(x, objtype, hx, rc)
 
#define RPUTIFZERO(x, objtype, rc)
 
#define RPUTFF(x, objtype, hx, rc)
 
#define RPUTNF(x, hx, rc)   ((rc) = (--((x)->refcnt)))
 
#define REF_DEBUG_REPORT_FINISH()   (void)
 

Typedefs

typedef int32_t tid_t
 
typedef uint32_t ADDR
 
typedef int32_t OFFSET
 
typedef uint32_t REGVAL
 
typedef int64_t num_t
 
typedef uint64_t unum_t
 
typedef int8_t REG
 
typedef int32_t SMOFFSET
 
typedef uint32_t REFCNT
 

Enumerations

enum  result_t { RESULT_SUCCESS = 0, RESULT_ERROR = 1, RESULT_ABORT = 2 }
 

Macro Definition Documentation

#define __PAGE_SIZE   0x1000

Definition at line 104 of file common.h.

#define ADDRMAX   UINT32_MAX

Definition at line 74 of file common.h.

#define OFFSETMAX   UINT32_MAX

Definition at line 75 of file common.h.

#define PRIiNUM   PRIi64

Definition at line 90 of file common.h.

#define PRIiOFFSET   PRIi32

Definition at line 70 of file common.h.

#define PRIiREFCNT   PRIu32

Definition at line 125 of file common.h.

#define PRIiREG   PRIi8

Definition at line 94 of file common.h.

#define PRIiSMOFFSET   PRIi32

Definition at line 101 of file common.h.

#define PRIiTID   PRIi32

Definition at line 37 of file common.h.

#define PRIuADDR   PRIu32

Definition at line 69 of file common.h.

#define PRIuNUM   PRIu64

Definition at line 89 of file common.h.

#define PRIuREGVAL   PRIu32

Definition at line 73 of file common.h.

#define PRIxADDR   PRIx32

Definition at line 67 of file common.h.

#define PRIxFULLADDR   "016"PRIx32

Definition at line 68 of file common.h.

#define PRIxNUM   PRIx64

Definition at line 91 of file common.h.

#define PRIxOFFSET   PRIx32

Definition at line 71 of file common.h.

#define PRIxREGVAL   PRIx32

Definition at line 72 of file common.h.

#define PRIxSMOFFSET   PRIx32

Definition at line 102 of file common.h.

#define PROT_EXEC   0x4

Definition at line 108 of file common.h.

#define PROT_READ   0x1

Definition at line 106 of file common.h.

#define PROT_SHARED   0x8

Definition at line 109 of file common.h.

#define PROT_WRITE   0x2

Definition at line 107 of file common.h.

#define ptr_t   unsigned long int

Definition at line 79 of file common.h.

#define REF_DEBUG_REPORT_FINISH ( )    (void)

Definition at line 653 of file common.h.

#define REFCNTDECL (   trefcnt)

Definition at line 621 of file common.h.

#define RHOLD (   x,
  hx 
)    ++((x)->refcnt)

Definition at line 622 of file common.h.

#define RHOLDW (   x,
  hx 
)    ++((x)->refcntw)

Definition at line 623 of file common.h.

#define RPUT (   x,
  objtype,
  hx,
  rc 
)
Value:
((rc) = (--((x)->refcnt) == 0) \
? objtype ## _free(x,0) \
: (x)->refcnt); \
(rc) += 0

Definition at line 624 of file common.h.

#define RPUTFF (   x,
  objtype,
  hx,
  rc 
)
Value:
((rc) = (--((x)->refcnt) == 0) \
? objtype ## _free(x,1) \
: objtype ## _free(x,1)

Definition at line 648 of file common.h.

#define RPUTIFZERO (   x,
  objtype,
  rc 
)
Value:
((rc) = (x)->refcnt == 0 \
? objtype ## _free(x,0) \
: (x)->refcnt)

Definition at line 645 of file common.h.

#define RPUTNF (   x,
  hx,
  rc 
)    ((rc) = (--((x)->refcnt)))

Definition at line 651 of file common.h.

#define RPUTW (   x,
  objtype,
  hx,
  rc 
)
Value:
((rc) = ((--((x)->refcntw) + (x)->refcnt) == 0) \
? objtype ## _free(x,0) \
: (x)->refcntw + (x)->refcnt); \
(rc) += 0

Definition at line 628 of file common.h.

#define RWGUARD (   x)    ++((x)->refcnt)

Definition at line 220 of file common.h.

#define RWUNGUARD (   x)    --((x)->refcnt)

Definition at line 221 of file common.h.

Typedef Documentation

typedef uint32_t ADDR

Definition at line 64 of file common.h.

typedef int64_t num_t

Definition at line 87 of file common.h.

typedef int32_t OFFSET

Definition at line 65 of file common.h.

typedef uint32_t REFCNT

Definition at line 124 of file common.h.

typedef int8_t REG

Definition at line 93 of file common.h.

typedef uint32_t REGVAL

Definition at line 66 of file common.h.

typedef int32_t SMOFFSET

Definition at line 100 of file common.h.

typedef int32_t tid_t

Definition at line 36 of file common.h.

typedef uint64_t unum_t

Definition at line 88 of file common.h.

Enumeration Type Documentation

enum result_t
Enumerator
RESULT_SUCCESS 
RESULT_ERROR 
RESULT_ABORT 

Definition at line 25 of file common.h.