aboutsummaryrefslogtreecommitdiffstats
path: root/doc-src/_explicit_https.graffle/data.plist
Commit message (Expand)AuthorAgeFilesLines
* Revert "Move the doc tree out into its own repo."Aldo Cortesi2014-01-271-0/+1054
* Move the doc tree out into its own repo.Aldo Cortesi2014-01-221-1054/+0
* First draft of "How mitmproxy works", a complete guide to the mechanics of th...Aldo Cortesi2013-01-031-0/+1054
f='#n33'>33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
#ifndef __PDB_MODULE_H_
#define __PDB_MODULE_H_

#include "../pdb_caml_xen.h"

#define PDB_OPCODE_PAUSE  1

#define PDB_OPCODE_ATTACH 2
typedef struct pdb_op_attach
{
    uint32_t  domain;
} pdb_op_attach_t, *pdb_op_attach_p;

#define PDB_OPCODE_DETACH 3

#define PDB_OPCODE_RD_REG 4
typedef struct pdb_op_rd_reg
{
    uint32_t reg;
    uint32_t value;
} pdb_op_rd_reg_t, *pdb_op_rd_reg_p;

#define PDB_OPCODE_RD_REGS 5
typedef struct pdb_op_rd_regs
{
    uint32_t reg[GDB_REGISTER_FRAME_SIZE];
} pdb_op_rd_regs_t, *pdb_op_rd_regs_p;

#define PDB_OPCODE_WR_REG 6
typedef struct pdb_op_wr_reg
{
    uint32_t reg;
    uint32_t value;
} pdb_op_wr_reg_t, *pdb_op_wr_reg_p;

#define PDB_OPCODE_RD_MEM 7
typedef struct pdb_op_rd_mem_req
{
    uint32_t address;
    uint32_t length;
} pdb_op_rd_mem_req_t, *pdb_op_rd_mem_req_p;

typedef struct pdb_op_rd_mem_resp
{
    uint32_t address;
    uint32_t length;
    uint8_t  data[1024];
} pdb_op_rd_mem_resp_t, *pdb_op_rd_mem_resp_p;

#define PDB_OPCODE_WR_MEM 8
typedef struct pdb_op_wr_mem
{
    uint32_t address;
    uint32_t length;
    uint8_t  data[1024];                                             /* arbitrary */
} pdb_op_wr_mem_t, *pdb_op_wr_mem_p;

#define PDB_OPCODE_CONTINUE 9
#define PDB_OPCODE_STEP     10

#define PDB_OPCODE_SET_BKPT 11
#define PDB_OPCODE_CLR_BKPT 12
typedef struct pdb_op_bkpt
{
    uint32_t address;
    uint32_t length;
} pdb_op_bkpt_t, *pdb_op_bkpt_p;

#define PDB_OPCODE_SET_WATCHPT 13
#define PDB_OPCODE_CLR_WATCHPT 14
#define PDB_OPCODE_WATCHPOINT  15
typedef struct pdb_op_watchpt
{
#define BWC_DEBUG 1
#define BWC_INT3  3
#define BWC_WATCH        100                         /* pdb: watchpoint page */
#define BWC_WATCH_STEP   101                  /* pdb: watchpoint single step */
#define BWC_WATCH_WRITE  102
#define BWC_WATCH_READ   103
#define BWC_WATCH_ACCESS 104
    uint32_t type;
    uint32_t address;
    uint32_t length;
} pdb_op_watchpt_t, *pdb_op_watchpt_p;


typedef struct 
{
    uint8_t   operation;       /* PDB_OPCODE_???      */
    uint32_t  process;
    union
    {
        pdb_op_attach_t     attach;
        pdb_op_rd_reg_t     rd_reg;
        pdb_op_wr_reg_t     wr_reg;
        pdb_op_rd_mem_req_t rd_mem;
        pdb_op_wr_mem_t     wr_mem;
        pdb_op_bkpt_t       bkpt;
        pdb_op_watchpt_t    watchpt;
    } u;
} pdb_request_t, *pdb_request_p;

 

#define PDB_RESPONSE_OKAY   0
#define PDB_RESPONSE_ERROR -1

typedef struct {
    uint8_t  operation;       /* copied from request */
    uint32_t domain;          
    uint32_t process;
    int16_t  status;          /* PDB_RESPONSE_???    */
    union
    {
        pdb_op_rd_reg_t      rd_reg;
        pdb_op_rd_regs_t     rd_regs;
        pdb_op_rd_mem_resp_t rd_mem;
    } u;
} pdb_response_t, *pdb_response_p;


DEFINE_RING_TYPES(pdb, pdb_request_t, pdb_response_t);


/* from access_process_vm */
#define PDB_MEM_READ  0
#define PDB_MEM_WRITE 1

#endif


/*
 * Local variables:
 * mode: C
 * c-set-style: "BSD"
 * c-basic-offset: 4
 * tab-width: 4
 * indent-tabs-mode: nil
 * End:
 */