24 #ifndef IN_PROCESS_AGENT
101 int pid = *(
int *) pid_p;
124 unsigned char *regbuf)
128 #ifndef IN_PROCESS_AGENT
147 #ifndef IN_PROCESS_AGENT
157 #ifndef IN_PROCESS_AGENT
166 regcache =
xmalloc (
sizeof (*regcache));
192 #ifndef IN_PROCESS_AGENT
201 #ifndef IN_PROCESS_AGENT
230 int len = strlen (buf);
231 unsigned char *registers = regcache->
registers;
236 warning (
"Wrong sized register packet (expected %d bytes, got %d)",
241 hex2bin (buf, registers, len / 2);
250 if (strcmp (name, tdesc->
reg_defs[i].name) == 0)
252 internal_error (__FILE__, __LINE__,
"Unknown register %s requested",
262 if (strcmp (name, tdesc->
reg_defs[i].name) == 0)
264 internal_error (__FILE__, __LINE__,
"Unknown register %s requested",
276 #ifndef IN_PROCESS_AGENT
283 if (regcache != NULL)
319 static unsigned char *
336 #ifndef IN_PROCESS_AGENT
345 #ifndef IN_PROCESS_AGENT
359 #ifndef IN_PROCESS_AGENT
377 #ifndef IN_PROCESS_AGENT
391 #ifndef IN_PROCESS_AGENT
402 #ifndef IN_PROCESS_AGENT
406 const char *
name,
const void *buf)
420 #ifndef IN_PROCESS_AGENT
431 const char *
name,
void *buf)
447 "regcache_read_pc: Unable to find PC");
459 "regcache_write_pc: Unable to update PC");
const struct target_desc * tdesc
CORE_ADDR(* read_pc)(struct regcache *regcache)
struct thread_info * current_thread
void collect_register(struct regcache *regcache, int n, void *buf)
struct thread_info * find_thread_ptid(ptid_t ptid)
struct regcache * new_register_cache(const struct target_desc *tdesc)
void supply_register_by_name(struct regcache *regcache, const char *name, const void *buf)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
void supply_register_zeroed(struct regcache *regcache, int n)
void warning(const char *fmt,...)
struct reg * find_register_by_number(const struct target_desc *tdesc, int n)
void regcache_release(void)
int bin2hex(const gdb_byte *bin, char *hex, int count)
void set_inferior_regcache_data(struct thread_info *inferior, void *data)
void internal_error(const char *file, int line, const char *fmt,...)
struct process_info * get_thread_process(struct thread_info *thread)
void for_each_inferior(struct inferior_list *list, void(*action)(struct inferior_list_entry *))
void regcache_write_pc(struct regcache *regcache, CORE_ADDR pc)
struct target_ops * the_target
const struct target_desc * tdesc
struct inferior_list_entry entry
unsigned char * registers
static void free_register_cache_thread(struct thread_info *thread)
unsigned char * register_status
void collect_register_by_name(struct regcache *regcache, const char *name, void *buf)
void regcache_invalidate(void)
void collect_register_as_string(struct regcache *regcache, int n, char *buf)
#define gdb_assert_not_reached(message)
int register_size(const struct target_desc *tdesc, int n)
void regcache_cpy(struct regcache *dst, struct regcache *src)
int register_cache_size(const struct target_desc *tdesc)
struct reg * find_register_by_name(const struct target_desc *tdesc, const char *name)
struct inferior_list all_threads
static int regcache_invalidate_one(struct inferior_list_entry *entry, void *pid_p)
int ptid_get_pid(ptid_t ptid)
struct regcache * init_register_cache(struct regcache *regcache, const struct target_desc *tdesc, unsigned char *regbuf)
int find_regno(const struct target_desc *tdesc, const char *name)
static void free_register_cache_thread_one(struct inferior_list_entry *entry)
#define fetch_inferior_registers(regcache, regno)
void * inferior_regcache_data(struct thread_info *inferior)
void regcache_invalidate_thread(struct thread_info *thread)
void registers_to_string(struct regcache *regcache, char *buf)
struct regcache * get_thread_regcache(struct thread_info *thread, int fetch)
void free_register_cache(struct regcache *regcache)
static unsigned char * register_data(struct regcache *regcache, int n, int fetch)
int hex2bin(const char *hex, gdb_byte *bin, int count)
void supply_register(struct regcache *regcache, int n, const void *buf)
struct regcache * get_thread_regcache_for_ptid(ptid_t ptid)
PTR xcalloc(size_t number, size_t size)
#define store_inferior_registers(regcache, regno)
void(* write_pc)(struct regcache *regcache, CORE_ADDR pc)
void registers_from_string(struct regcache *regcache, char *buf)
void supply_regblock(struct regcache *regcache, const void *buf)
struct inferior_list_entry * find_inferior(struct inferior_list *list, int(*func)(struct inferior_list_entry *, void *), void *arg)