95 struct symtab* symtab;
96 int fd; // file descriptor for lib
97 struct lib_info* next;
98 size_t memsz;
99 } lib_info;
100
101 // list of threads
102 typedef struct sa_thread_info {
103 lwpid_t lwp_id; // same as pthread_t
104 pthread_t pthread_id; //
105 struct reg regs; // not for process, core uses for caching regset
106 struct sa_thread_info* next;
107 } sa_thread_info;
108
109 // list of virtual memory maps
110 typedef struct map_info {
111 int fd; // file descriptor
112 uint64_t offset; // file offset of this mapping
113 uint64_t vaddr; // starting virtual address
114 size_t memsz; // size of the mapping
115 struct map_info* next;
116 } map_info;
117
118 // vtable for ps_prochandle
119 typedef struct ps_prochandle_ops {
120 // "derived class" clean-up
121 void (*release)(struct ps_prochandle* ph);
122 // read from debuggee
123 bool (*p_pread)(struct ps_prochandle *ph,
124 uintptr_t addr, char *buf, size_t size);
125 // write into debuggee
126 bool (*p_pwrite)(struct ps_prochandle *ph,
127 uintptr_t addr, const char *buf , size_t size);
128 // get integer regset of a thread
129 bool (*get_lwp_regs)(struct ps_prochandle* ph, lwpid_t lwp_id, struct reg* regs);
130 // get info on thread
131 bool (*get_lwp_info)(struct ps_prochandle *ph, lwpid_t lwp_id, void *linfo);
132 } ps_prochandle_ops;
133
134 // the ps_prochandle
|
95 struct symtab* symtab;
96 int fd; // file descriptor for lib
97 struct lib_info* next;
98 size_t memsz;
99 } lib_info;
100
101 // list of threads
102 typedef struct sa_thread_info {
103 lwpid_t lwp_id; // same as pthread_t
104 pthread_t pthread_id; //
105 struct reg regs; // not for process, core uses for caching regset
106 struct sa_thread_info* next;
107 } sa_thread_info;
108
109 // list of virtual memory maps
110 typedef struct map_info {
111 int fd; // file descriptor
112 uint64_t offset; // file offset of this mapping
113 uint64_t vaddr; // starting virtual address
114 size_t memsz; // size of the mapping
115 uint32_t flags; // access flags
116 struct map_info* next;
117 } map_info;
118
119 // vtable for ps_prochandle
120 typedef struct ps_prochandle_ops {
121 // "derived class" clean-up
122 void (*release)(struct ps_prochandle* ph);
123 // read from debuggee
124 bool (*p_pread)(struct ps_prochandle *ph,
125 uintptr_t addr, char *buf, size_t size);
126 // write into debuggee
127 bool (*p_pwrite)(struct ps_prochandle *ph,
128 uintptr_t addr, const char *buf , size_t size);
129 // get integer regset of a thread
130 bool (*get_lwp_regs)(struct ps_prochandle* ph, lwpid_t lwp_id, struct reg* regs);
131 // get info on thread
132 bool (*get_lwp_info)(struct ps_prochandle *ph, lwpid_t lwp_id, void *linfo);
133 } ps_prochandle_ops;
134
135 // the ps_prochandle
|