GDB (xrefs)
|
#include "defs.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "inferior.h"
#include "target.h"
#include "regcache.h"
#include "gdb_string.h"
#include "gdbthread.h"
#include <ctype.h>
#include <signal.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include "gdb_bfd.h"
#include "cli/cli-utils.h"
#include "serial.h"
Go to the source code of this file.
Defines | |
#define | SDI_TIMEOUT 30 |
#define | SDIPORT 3232 |
#define | MAX_BREAKPOINTS 1024 |
#define | MAX_ACCESS_BREAKS 4 |
#define | SDI_OPEN 1 |
#define | SDI_CLOSE 2 |
#define | SDI_RELEASE 3 |
#define | SDI_READ_CPU_REG 4 |
#define | SDI_WRITE_CPU_REG 5 |
#define | SDI_READ_MEMORY 6 |
#define | SDI_WRITE_MEMORY 7 |
#define | SDI_EXEC_CPU 8 |
#define | SDI_STOP_CPU 9 |
#define | SDI_WAIT_FOR_READY 10 |
#define | SDI_GET_ATTR 11 |
#define | SDI_SET_ATTR 12 |
#define | SDI_STATUS 13 |
#define | SDI_ATTR_NAME 1 |
#define | SDI_ATTR_BRK 2 |
#define | SDI_ATTR_ABRK 3 |
#define | SDI_ATTR_CACHE 4 |
#define | SDI_CACHE_TYPE_M32102 0 |
#define | SDI_CACHE_TYPE_CHAOS 1 |
#define | SDI_ATTR_MEM_ACCESS 5 |
#define | SDI_MEM_ACCESS_DEBUG_DMA 0 |
#define | SDI_MEM_ACCESS_MON_CODE 1 |
#define | SDI_REG_R0 0 |
#define | SDI_REG_R1 1 |
#define | SDI_REG_R2 2 |
#define | SDI_REG_R3 3 |
#define | SDI_REG_R4 4 |
#define | SDI_REG_R5 5 |
#define | SDI_REG_R6 6 |
#define | SDI_REG_R7 7 |
#define | SDI_REG_R8 8 |
#define | SDI_REG_R9 9 |
#define | SDI_REG_R10 10 |
#define | SDI_REG_R11 11 |
#define | SDI_REG_R12 12 |
#define | SDI_REG_FP 13 |
#define | SDI_REG_LR 14 |
#define | SDI_REG_SP 15 |
#define | SDI_REG_PSW 16 |
#define | SDI_REG_CBR 17 |
#define | SDI_REG_SPI 18 |
#define | SDI_REG_SPU 19 |
#define | SDI_REG_CR4 20 |
#define | SDI_REG_EVB 21 |
#define | SDI_REG_BPC 22 |
#define | SDI_REG_CR7 23 |
#define | SDI_REG_BBPSW 24 |
#define | SDI_REG_CR9 25 |
#define | SDI_REG_CR10 26 |
#define | SDI_REG_CR11 27 |
#define | SDI_REG_CR12 28 |
#define | SDI_REG_WR 29 |
#define | SDI_REG_BBPC 30 |
#define | SDI_REG_PBP 31 |
#define | SDI_REG_ACCH 32 |
#define | SDI_REG_ACCL 33 |
#define | SDI_REG_ACC1H 34 |
#define | SDI_REG_ACC1L 35 |
Functions | |
static int | get_ack (void) |
static int | send_data (void *buf, int len) |
static int | recv_data (void *buf, int len) |
static void | store_long_parameter (void *buf, long val) |
static int | send_cmd (unsigned char cmd) |
static int | send_one_arg_cmd (unsigned char cmd, unsigned char arg1) |
static int | send_two_arg_cmd (unsigned char cmd, unsigned char arg1, unsigned long arg2) |
static int | send_three_arg_cmd (unsigned char cmd, unsigned long arg1, unsigned long arg2, unsigned long arg3) |
static unsigned char | recv_char_data (void) |
static unsigned long | recv_long_data (void) |
static void | check_mmu_status (void) |
static void | m32r_create_inferior (struct target_ops *ops, char *execfile, char *args, char **env, int from_tty) |
static void | m32r_open (char *args, int from_tty) |
static void | m32r_close (void) |
static void | m32r_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal sig) |
static void | gdb_cntrl_c (int signo) |
static ptid_t | m32r_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options) |
static void | m32r_detach (struct target_ops *ops, char *args, int from_tty) |
static int | get_reg_id (int regno) |
static void | m32r_fetch_register (struct target_ops *ops, struct regcache *regcache, int regno) |
static void | m32r_store_register (struct target_ops *ops, struct regcache *regcache, int regno) |
static void | m32r_prepare_to_store (struct regcache *regcache) |
static void | m32r_files_info (struct target_ops *target) |
static int | m32r_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write, struct mem_attrib *attrib, struct target_ops *target) |
static void | m32r_kill (struct target_ops *ops) |
static void | m32r_mourn_inferior (struct target_ops *ops) |
static int | m32r_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
static int | m32r_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
static void | m32r_load (char *args, int from_tty) |
static void | m32r_stop (ptid_t ptid) |
static int | m32r_can_use_hw_watchpoint (int type, int cnt, int othertype) |
static int | m32r_insert_watchpoint (CORE_ADDR addr, int len, int type, struct expression *cond) |
static int | m32r_remove_watchpoint (CORE_ADDR addr, int len, int type, struct expression *cond) |
static int | m32r_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p) |
static int | m32r_stopped_by_watchpoint (void) |
static int | m32r_thread_alive (struct target_ops *ops, ptid_t ptid) |
static char * | m32r_pid_to_str (struct target_ops *ops, ptid_t ptid) |
static void | sdireset_command (char *args, int from_tty) |
static void | sdistatus_command (char *args, int from_tty) |
static void | debug_chaos_command (char *args, int from_tty) |
static void | use_debug_dma_command (char *args, int from_tty) |
static void | use_mon_code_command (char *args, int from_tty) |
static void | use_ib_breakpoints_command (char *args, int from_tty) |
static void | use_dbt_breakpoints_command (char *args, int from_tty) |
static int | m32r_return_one (struct target_ops *target) |
static int | m32r_has_execution (struct target_ops *target, ptid_t the_ptid) |
static void | init_m32r_ops (void) |
void | _initialize_remote_m32r (void) |
Variables | |
static struct serial * | sdi_desc = NULL |
static char | chip_name [64] |
static int | step_mode |
static unsigned long | last_pc_addr = 0xffffffff |
static unsigned char | last_pc_addr_data [2] |
static int | mmu_on = 0 |
static int | use_ib_breakpoints = 1 |
static int | max_ib_breakpoints |
static unsigned long | bp_address [MAX_BREAKPOINTS] |
static unsigned char | bp_data [MAX_BREAKPOINTS][4] |
static const unsigned char | dbt_bp_entry [] |
static int | max_access_breaks |
static unsigned long | ab_address [MAX_ACCESS_BREAKS] |
static unsigned int | ab_type [MAX_ACCESS_BREAKS] |
static unsigned int | ab_size [MAX_ACCESS_BREAKS] |
static CORE_ADDR | hit_watchpoint_addr = 0 |
static int | interrupted = 0 |
struct target_ops | m32r_ops |
static ptid_t | remote_m32r_ptid |
initialize_file_ftype | _initialize_remote_m32r |
#define MAX_ACCESS_BREAKS 4 |
Definition at line 76 of file remote-m32r-sdi.c.
Referenced by _initialize_remote_m32r(), m32r_insert_watchpoint(), m32r_open(), and m32r_remove_watchpoint().
#define MAX_BREAKPOINTS 1024 |
Definition at line 66 of file remote-m32r-sdi.c.
Referenced by _initialize_remote_m32r(), m32r_insert_breakpoint(), m32r_open(), m32r_remove_breakpoint(), m32r_resume(), and m32r_wait().
#define SDI_ATTR_ABRK 3 |
Definition at line 112 of file remote-m32r-sdi.c.
Referenced by m32r_open().
#define SDI_ATTR_BRK 2 |
Definition at line 111 of file remote-m32r-sdi.c.
Referenced by m32r_open().
#define SDI_ATTR_CACHE 4 |
Definition at line 113 of file remote-m32r-sdi.c.
Referenced by debug_chaos_command().
#define SDI_ATTR_MEM_ACCESS 5 |
Definition at line 116 of file remote-m32r-sdi.c.
Referenced by use_debug_dma_command(), and use_mon_code_command().
#define SDI_ATTR_NAME 1 |
Definition at line 110 of file remote-m32r-sdi.c.
Referenced by m32r_open().
#define SDI_CACHE_TYPE_CHAOS 1 |
Definition at line 115 of file remote-m32r-sdi.c.
Referenced by debug_chaos_command().
#define SDI_CACHE_TYPE_M32102 0 |
Definition at line 114 of file remote-m32r-sdi.c.
#define SDI_CLOSE 2 |
Definition at line 96 of file remote-m32r-sdi.c.
Referenced by m32r_close().
#define SDI_EXEC_CPU 8 |
Definition at line 102 of file remote-m32r-sdi.c.
Referenced by m32r_resume().
#define SDI_GET_ATTR 11 |
Definition at line 105 of file remote-m32r-sdi.c.
Referenced by m32r_open().
#define SDI_MEM_ACCESS_DEBUG_DMA 0 |
Definition at line 117 of file remote-m32r-sdi.c.
Referenced by use_debug_dma_command().
#define SDI_MEM_ACCESS_MON_CODE 1 |
Definition at line 118 of file remote-m32r-sdi.c.
Referenced by use_mon_code_command().
#define SDI_OPEN 1 |
Definition at line 95 of file remote-m32r-sdi.c.
Referenced by m32r_open(), and sdireset_command().
#define SDI_READ_CPU_REG 4 |
Definition at line 98 of file remote-m32r-sdi.c.
Referenced by check_mmu_status(), m32r_fetch_register(), m32r_store_register(), and m32r_wait().
#define SDI_READ_MEMORY 6 |
Definition at line 100 of file remote-m32r-sdi.c.
Referenced by m32r_insert_breakpoint(), m32r_wait(), and m32r_xfer_memory().
#define SDI_REG_ACC1H 34 |
Definition at line 155 of file remote-m32r-sdi.c.
#define SDI_REG_ACC1L 35 |
Definition at line 156 of file remote-m32r-sdi.c.
#define SDI_REG_ACCH 32 |
Definition at line 153 of file remote-m32r-sdi.c.
Referenced by get_reg_id().
#define SDI_REG_ACCL 33 |
Definition at line 154 of file remote-m32r-sdi.c.
Referenced by get_reg_id().
#define SDI_REG_BBPC 30 |
Definition at line 151 of file remote-m32r-sdi.c.
Referenced by get_reg_id().
#define SDI_REG_BBPSW 24 |
Definition at line 145 of file remote-m32r-sdi.c.
Referenced by m32r_fetch_register(), and m32r_store_register().
#define SDI_REG_BPC 22 |
Definition at line 143 of file remote-m32r-sdi.c.
Referenced by check_mmu_status(), get_reg_id(), m32r_resume(), and m32r_wait().
#define SDI_REG_CBR 17 |
Definition at line 138 of file remote-m32r-sdi.c.
#define SDI_REG_CR10 26 |
Definition at line 147 of file remote-m32r-sdi.c.
#define SDI_REG_CR11 27 |
Definition at line 148 of file remote-m32r-sdi.c.
#define SDI_REG_CR12 28 |
Definition at line 149 of file remote-m32r-sdi.c.
#define SDI_REG_CR4 20 |
Definition at line 141 of file remote-m32r-sdi.c.
#define SDI_REG_CR7 23 |
Definition at line 144 of file remote-m32r-sdi.c.
#define SDI_REG_CR9 25 |
Definition at line 146 of file remote-m32r-sdi.c.
#define SDI_REG_EVB 21 |
Definition at line 142 of file remote-m32r-sdi.c.
Referenced by check_mmu_status(), and get_reg_id().
#define SDI_REG_FP 13 |
Definition at line 134 of file remote-m32r-sdi.c.
#define SDI_REG_LR 14 |
Definition at line 135 of file remote-m32r-sdi.c.
#define SDI_REG_PBP 31 |
Definition at line 152 of file remote-m32r-sdi.c.
Referenced by m32r_resume().
#define SDI_REG_PSW 16 |
Definition at line 137 of file remote-m32r-sdi.c.
Referenced by m32r_fetch_register(), and m32r_store_register().
#define SDI_REG_R0 0 |
Definition at line 121 of file remote-m32r-sdi.c.
#define SDI_REG_R1 1 |
Definition at line 122 of file remote-m32r-sdi.c.
#define SDI_REG_R10 10 |
Definition at line 131 of file remote-m32r-sdi.c.
#define SDI_REG_R11 11 |
Definition at line 132 of file remote-m32r-sdi.c.
#define SDI_REG_R12 12 |
Definition at line 133 of file remote-m32r-sdi.c.
#define SDI_REG_R2 2 |
Definition at line 123 of file remote-m32r-sdi.c.
#define SDI_REG_R3 3 |
Definition at line 124 of file remote-m32r-sdi.c.
#define SDI_REG_R4 4 |
Definition at line 125 of file remote-m32r-sdi.c.
#define SDI_REG_R5 5 |
Definition at line 126 of file remote-m32r-sdi.c.
#define SDI_REG_R6 6 |
Definition at line 127 of file remote-m32r-sdi.c.
#define SDI_REG_R7 7 |
Definition at line 128 of file remote-m32r-sdi.c.
#define SDI_REG_R8 8 |
Definition at line 129 of file remote-m32r-sdi.c.
#define SDI_REG_R9 9 |
Definition at line 130 of file remote-m32r-sdi.c.
#define SDI_REG_SP 15 |
Definition at line 136 of file remote-m32r-sdi.c.
#define SDI_REG_SPI 18 |
Definition at line 139 of file remote-m32r-sdi.c.
#define SDI_REG_SPU 19 |
Definition at line 140 of file remote-m32r-sdi.c.
#define SDI_REG_WR 29 |
Definition at line 150 of file remote-m32r-sdi.c.
#define SDI_RELEASE 3 |
Definition at line 97 of file remote-m32r-sdi.c.
#define SDI_SET_ATTR 12 |
Definition at line 106 of file remote-m32r-sdi.c.
Referenced by debug_chaos_command(), use_debug_dma_command(), and use_mon_code_command().
#define SDI_STATUS 13 |
Definition at line 107 of file remote-m32r-sdi.c.
Referenced by sdistatus_command().
#define SDI_STOP_CPU 9 |
Definition at line 103 of file remote-m32r-sdi.c.
Referenced by m32r_stop().
#define SDI_TIMEOUT 30 |
Definition at line 51 of file remote-m32r-sdi.c.
Referenced by get_ack(), m32r_insert_breakpoint(), m32r_wait(), m32r_xfer_memory(), recv_data(), and sdistatus_command().
#define SDI_WAIT_FOR_READY 10 |
Definition at line 104 of file remote-m32r-sdi.c.
Referenced by m32r_wait().
#define SDI_WRITE_CPU_REG 5 |
Definition at line 99 of file remote-m32r-sdi.c.
Referenced by m32r_resume(), m32r_store_register(), and m32r_wait().
#define SDI_WRITE_MEMORY 7 |
Definition at line 101 of file remote-m32r-sdi.c.
Referenced by m32r_load(), m32r_resume(), m32r_wait(), and m32r_xfer_memory().
#define SDIPORT 3232 |
Definition at line 54 of file remote-m32r-sdi.c.
Referenced by m32r_open().
void _initialize_remote_m32r | ( | void | ) |
Definition at line 1664 of file remote-m32r-sdi.c.
References _, _initialize_remote_m32r, ab_address, add_com(), add_target(), bp_address, class_obscure, debug_chaos_command(), init_m32r_ops(), m32r_ops, MAX_ACCESS_BREAKS, MAX_BREAKPOINTS, ptid_build(), sdireset_command(), sdistatus_command(), use_dbt_breakpoints_command(), use_debug_dma_command(), use_ib_breakpoints_command(), and use_mon_code_command().
static void check_mmu_status | ( | void | ) | [static] |
Definition at line 292 of file remote-m32r-sdi.c.
References mmu_on, recv_long_data(), SDI_READ_CPU_REG, SDI_REG_BPC, SDI_REG_EVB, and send_one_arg_cmd().
Referenced by m32r_open(), m32r_resume(), and m32r_wait().
static void debug_chaos_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 1556 of file remote-m32r-sdi.c.
References SDI_ATTR_CACHE, SDI_CACHE_TYPE_CHAOS, SDI_SET_ATTR, and send_data().
Referenced by _initialize_remote_m32r().
static void gdb_cntrl_c | ( | int | signo | ) | [static] |
Definition at line 693 of file remote-m32r-sdi.c.
References fprintf_unfiltered(), gdb_stdlog, interrupted, and remote_debug.
Referenced by m32r_load(), and m32r_wait().
Definition at line 163 of file remote-m32r-sdi.c.
References SDI_TIMEOUT, and serial_readchar().
Referenced by m32r_open(), and send_data().
static int get_reg_id | ( | int | regno | ) | [static] |
Definition at line 898 of file remote-m32r-sdi.c.
References SDI_REG_ACCH, SDI_REG_ACCL, SDI_REG_BBPC, SDI_REG_BPC, and SDI_REG_EVB.
Referenced by m32r_fetch_register(), and m32r_store_register().
static void init_m32r_ops | ( | void | ) | [static] |
Definition at line 1621 of file remote-m32r-sdi.c.
References target_ops::deprecated_xfer_memory, m32r_can_use_hw_watchpoint(), m32r_close(), m32r_create_inferior(), m32r_detach(), m32r_fetch_register(), m32r_files_info(), m32r_has_execution(), m32r_insert_breakpoint(), m32r_insert_watchpoint(), m32r_kill(), m32r_load(), m32r_mourn_inferior(), m32r_open(), m32r_ops, m32r_pid_to_str(), m32r_prepare_to_store(), m32r_remove_breakpoint(), m32r_remove_watchpoint(), m32r_resume(), m32r_return_one(), m32r_stop(), m32r_stopped_by_watchpoint(), m32r_stopped_data_address(), m32r_store_register(), m32r_thread_alive(), m32r_wait(), m32r_xfer_memory(), OPS_MAGIC, process_stratum, serial_log_command(), target_ops::to_can_use_hw_breakpoint, target_ops::to_close, target_ops::to_create_inferior, target_ops::to_detach, target_ops::to_doc, target_ops::to_fetch_registers, target_ops::to_files_info, target_ops::to_has_all_memory, target_ops::to_has_execution, target_ops::to_has_memory, target_ops::to_has_registers, target_ops::to_has_stack, target_ops::to_insert_breakpoint, target_ops::to_insert_watchpoint, target_ops::to_kill, target_ops::to_load, target_ops::to_log_command, target_ops::to_longname, target_ops::to_magic, target_ops::to_mourn_inferior, target_ops::to_open, target_ops::to_pid_to_str, target_ops::to_prepare_to_store, target_ops::to_remove_breakpoint, target_ops::to_remove_watchpoint, target_ops::to_resume, target_ops::to_shortname, target_ops::to_stop, target_ops::to_stopped_by_watchpoint, target_ops::to_stopped_data_address, target_ops::to_store_registers, target_ops::to_stratum, target_ops::to_thread_alive, and target_ops::to_wait.
Referenced by _initialize_remote_m32r().
static int m32r_can_use_hw_watchpoint | ( | int | type, |
int | cnt, | ||
int | othertype | ||
) | [static] |
Definition at line 1409 of file remote-m32r-sdi.c.
References max_access_breaks.
Referenced by init_m32r_ops().
static void m32r_close | ( | void | ) | [static] |
Definition at line 433 of file remote-m32r-sdi.c.
References delete_thread_silent(), fprintf_unfiltered(), gdb_stdlog, inferior_ptid, null_ptid, remote_debug, SDI_CLOSE, send_cmd(), and serial_close().
Referenced by init_m32r_ops().
static void m32r_create_inferior | ( | struct target_ops * | ops, |
char * | execfile, | ||
char * | args, | ||
char ** | env, | ||
int | from_tty | ||
) | [static] |
Definition at line 323 of file remote-m32r-sdi.c.
References _, clear_proceed_status(), error(), exec_bfd, fprintf_unfiltered(), gdb_stdlog, get_current_regcache(), init_wait_for_inferior(), regcache_write_pc(), remote_debug, target_terminal_inferior(), and target_terminal_init.
Referenced by init_m32r_ops().
static void m32r_detach | ( | struct target_ops * | ops, |
char * | args, | ||
int | from_tty | ||
) | [static] |
Definition at line 881 of file remote-m32r-sdi.c.
References fprintf_unfiltered(), gdb_stdlog, inferior_ptid, m32r_resume(), remote_debug, target_shortname, and unpush_target().
Referenced by init_m32r_ops().
static void m32r_fetch_register | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 920 of file remote-m32r-sdi.c.
References gdbarch::byte_order, fprintf_unfiltered(), gdb_stdlog, gdbarch_byte_order(), gdbarch_num_regs(), get_reg_id(), get_regcache_arch(), MAX_REGISTER_SIZE, recv_long_data(), regcache_raw_supply(), remote_debug, SDI_READ_CPU_REG, SDI_REG_BBPSW, SDI_REG_PSW, send_one_arg_cmd(), and store_unsigned_integer().
Referenced by init_m32r_ops().
static void m32r_files_info | ( | struct target_ops * | target | ) | [static] |
Definition at line 1024 of file remote-m32r-sdi.c.
References chip_name, exec_bfd, and printf_filtered().
Referenced by init_m32r_ops().
static int m32r_has_execution | ( | struct target_ops * | target, |
ptid_t | the_ptid | ||
) | [static] |
Definition at line 1611 of file remote-m32r-sdi.c.
Referenced by init_m32r_ops().
static int m32r_insert_breakpoint | ( | struct gdbarch * | gdbarch, |
struct bp_target_info * | bp_tgt | ||
) | [static] |
Definition at line 1148 of file remote-m32r-sdi.c.
References _, bp_address, bp_data, error(), fprintf_unfiltered(), gdb_stdlog, MAX_BREAKPOINTS, max_ib_breakpoints, mmu_on, paddress(), bp_target_info::placed_address, recv_data(), remote_debug, SDI_READ_MEMORY, SDI_TIMEOUT, serial_readchar(), serial_write(), store_long_parameter(), and use_ib_breakpoints.
Referenced by init_m32r_ops().
static int m32r_insert_watchpoint | ( | CORE_ADDR | addr, |
int | len, | ||
int | type, | ||
struct expression * | cond | ||
) | [static] |
Definition at line 1419 of file remote-m32r-sdi.c.
References _, ab_address, ab_size, ab_type, error(), fprintf_unfiltered(), gdb_stdlog, len, MAX_ACCESS_BREAKS, paddress(), remote_debug, target_gdbarch(), and type.
Referenced by init_m32r_ops().
static void m32r_kill | ( | struct target_ops * | ops | ) | [static] |
Definition at line 1120 of file remote-m32r-sdi.c.
References delete_thread_silent(), fprintf_unfiltered(), gdb_stdlog, inferior_ptid, null_ptid, and remote_debug.
Referenced by init_m32r_ops().
Definition at line 1215 of file remote-m32r-sdi.c.
References _, clear_symtab_users(), delete_thread_silent(), do_cleanups(), error(), exec_bfd, gdb_bfd_open(), gdb_cntrl_c(), gdb_flush(), gdb_stdout, get_current_regcache(), get_exec_file(), gnutarget, inferior_ptid, interrupted, make_cleanup_bfd_unref(), min, mmu_on, null_ptid, perror_with_name(), print_transfer_performance(), printf_filtered(), printf_unfiltered(), regcache_write_pc(), RETSIGTYPE, SDI_WRITE_MEMORY, send_data(), skip_spaces(), and store_long_parameter().
Referenced by init_m32r_ops().
static void m32r_mourn_inferior | ( | struct target_ops * | ops | ) | [static] |
Definition at line 1138 of file remote-m32r-sdi.c.
References fprintf_unfiltered(), gdb_stdlog, generic_mourn_inferior(), remote_debug, and remove_breakpoints().
Referenced by init_m32r_ops().
Definition at line 362 of file remote-m32r-sdi.c.
References _, ab_address, bp_address, check_mmu_status(), chip_name, error(), fprintf_unfiltered(), gdb_stdlog, get_ack(), m32r_ops, MAX_ACCESS_BREAKS, max_access_breaks, MAX_BREAKPOINTS, max_ib_breakpoints, printf_filtered(), push_target(), recv_char_data(), recv_data(), remote_debug, SDI_ATTR_ABRK, SDI_ATTR_BRK, SDI_ATTR_NAME, SDI_GET_ATTR, SDI_OPEN, SDIPORT, send_cmd(), send_one_arg_cmd(), serial_open(), strchr(), target_preopen(), target_shortname, xsnprintf(), and yes.
Referenced by init_m32r_ops().
static char* m32r_pid_to_str | ( | struct target_ops * | ops, |
ptid_t | ptid | ||
) | [static] |
Definition at line 1502 of file remote-m32r-sdi.c.
References normal_pid_to_str(), ptid_equal(), and xsnprintf().
Referenced by init_m32r_ops().
static void m32r_prepare_to_store | ( | struct regcache * | regcache | ) | [static] |
Definition at line 1016 of file remote-m32r-sdi.c.
References fprintf_unfiltered(), gdb_stdlog, and remote_debug.
Referenced by init_m32r_ops().
static int m32r_remove_breakpoint | ( | struct gdbarch * | gdbarch, |
struct bp_target_info * | bp_tgt | ||
) | [static] |
Definition at line 1192 of file remote-m32r-sdi.c.
References bp_address, fprintf_unfiltered(), gdb_stdlog, MAX_BREAKPOINTS, paddress(), bp_target_info::placed_address, and remote_debug.
Referenced by init_m32r_ops().
static int m32r_remove_watchpoint | ( | CORE_ADDR | addr, |
int | len, | ||
int | type, | ||
struct expression * | cond | ||
) | [static] |
Definition at line 1444 of file remote-m32r-sdi.c.
References ab_address, fprintf_unfiltered(), gdb_stdlog, MAX_ACCESS_BREAKS, paddress(), remote_debug, and target_gdbarch().
Referenced by init_m32r_ops().
static void m32r_resume | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
int | step, | ||
enum gdb_signal | sig | ||
) | [static] |
Definition at line 453 of file remote-m32r-sdi.c.
References ab_address, ab_type, add_thread_silent(), bp_address, bp_data, check_mmu_status(), dbt_bp_entry, fprintf_unfiltered(), gdb_stdlog, gdbarch_byte_order(), get_current_regcache(), inferior_ptid, last_pc_addr, last_pc_addr_data, max_access_breaks, MAX_BREAKPOINTS, max_ib_breakpoints, mmu_on, regcache_read_pc(), remote_debug, remote_m32r_ptid, SDI_EXEC_CPU, SDI_REG_BPC, SDI_REG_PBP, SDI_WRITE_CPU_REG, SDI_WRITE_MEMORY, send_cmd(), send_data(), send_three_arg_cmd(), send_two_arg_cmd(), step_mode, store_long_parameter(), target_gdbarch(), and use_ib_breakpoints.
Referenced by init_m32r_ops(), and m32r_detach().
static int m32r_return_one | ( | struct target_ops * | target | ) | [static] |
Definition at line 1603 of file remote-m32r-sdi.c.
Referenced by init_m32r_ops().
Definition at line 1393 of file remote-m32r-sdi.c.
References fprintf_unfiltered(), gdb_stdlog, remote_debug, SDI_STOP_CPU, and send_cmd().
Referenced by init_m32r_ops().
static int m32r_stopped_by_watchpoint | ( | void | ) | [static] |
Definition at line 1479 of file remote-m32r-sdi.c.
References current_target, and m32r_stopped_data_address().
Referenced by init_m32r_ops().
static int m32r_stopped_data_address | ( | struct target_ops * | target, |
CORE_ADDR * | addr_p | ||
) | [static] |
Definition at line 1466 of file remote-m32r-sdi.c.
References hit_watchpoint_addr.
Referenced by init_m32r_ops(), and m32r_stopped_by_watchpoint().
static void m32r_store_register | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 964 of file remote-m32r-sdi.c.
References fprintf_unfiltered(), gdb_stdlog, gdbarch_num_regs(), get_reg_id(), get_regcache_arch(), recv_long_data(), regcache_cooked_read_unsigned(), remote_debug, SDI_READ_CPU_REG, SDI_REG_BBPSW, SDI_REG_PSW, SDI_WRITE_CPU_REG, send_one_arg_cmd(), send_two_arg_cmd(), and ULONGEST.
Referenced by init_m32r_ops().
static int m32r_thread_alive | ( | struct target_ops * | ops, |
ptid_t | ptid | ||
) | [static] |
Definition at line 1489 of file remote-m32r-sdi.c.
References ptid_equal().
Referenced by init_m32r_ops().
static ptid_t m32r_wait | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
struct target_waitstatus * | status, | ||
int | options | ||
) | [static] |
Definition at line 701 of file remote-m32r-sdi.c.
References _, ab_address, bp_address, bp_data, check_mmu_status(), error(), fprintf_unfiltered(), gdb_cntrl_c(), gdb_stdlog, gdbarch_byte_order(), hit_watchpoint_addr, inferior_ptid, interrupted, target_waitstatus::kind, last_pc_addr, last_pc_addr_data, max_access_breaks, MAX_BREAKPOINTS, max_ib_breakpoints, mmu_on, recv_data(), recv_long_data(), remote_debug, RETSIGTYPE, SDI_READ_CPU_REG, SDI_READ_MEMORY, SDI_REG_BPC, SDI_TIMEOUT, SDI_WAIT_FOR_READY, SDI_WRITE_CPU_REG, SDI_WRITE_MEMORY, send_data(), send_one_arg_cmd(), send_three_arg_cmd(), send_two_arg_cmd(), serial_readchar(), serial_write(), target_waitstatus::sig, store_long_parameter(), target_gdbarch(), TARGET_WAITKIND_EXITED, TARGET_WAITKIND_STOPPED, use_ib_breakpoints, and target_waitstatus::value.
Referenced by init_m32r_ops().
static int m32r_xfer_memory | ( | CORE_ADDR | memaddr, |
gdb_byte * | myaddr, | ||
int | len, | ||
int | write, | ||
struct mem_attrib * | attrib, | ||
struct target_ops * | target | ||
) | [static] |
Definition at line 1038 of file remote-m32r-sdi.c.
References fprintf_unfiltered(), gdb_stdlog, memaddr, memcpy(), mmu_on, paddress(), recv_data(), remote_debug, SDI_READ_MEMORY, SDI_TIMEOUT, SDI_WRITE_MEMORY, send_data(), serial_readchar(), serial_write(), store_long_parameter(), and target_gdbarch().
Referenced by init_m32r_ops().
static unsigned char recv_char_data | ( | void | ) | [static] |
Definition at line 272 of file remote-m32r-sdi.c.
References recv_data().
Referenced by m32r_open().
Definition at line 199 of file remote-m32r-sdi.c.
References len, SDI_TIMEOUT, and serial_readchar().
Referenced by m32r_insert_breakpoint(), m32r_open(), m32r_wait(), m32r_xfer_memory(), recv_char_data(), and recv_long_data().
static unsigned long recv_long_data | ( | void | ) | [static] |
Definition at line 281 of file remote-m32r-sdi.c.
References recv_data().
Referenced by check_mmu_status(), m32r_fetch_register(), m32r_store_register(), and m32r_wait().
static void sdireset_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 1516 of file remote-m32r-sdi.c.
References delete_thread_silent(), fprintf_unfiltered(), gdb_stdlog, inferior_ptid, null_ptid, remote_debug, SDI_OPEN, and send_cmd().
Referenced by _initialize_remote_m32r().
static void sdistatus_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 1529 of file remote-m32r-sdi.c.
References fprintf_unfiltered(), gdb_stdlog, printf_filtered(), remote_debug, SDI_STATUS, SDI_TIMEOUT, send_cmd(), and serial_readchar().
Referenced by _initialize_remote_m32r().
Definition at line 229 of file remote-m32r-sdi.c.
References send_data().
Referenced by m32r_close(), m32r_open(), m32r_resume(), m32r_stop(), sdireset_command(), and sdistatus_command().
Definition at line 183 of file remote-m32r-sdi.c.
References get_ack(), len, and serial_write().
Referenced by debug_chaos_command(), m32r_load(), m32r_resume(), m32r_wait(), m32r_xfer_memory(), send_cmd(), send_one_arg_cmd(), send_three_arg_cmd(), send_two_arg_cmd(), use_debug_dma_command(), and use_mon_code_command().
static int send_one_arg_cmd | ( | unsigned char | cmd, |
unsigned char | arg1 | ||
) | [static] |
Definition at line 238 of file remote-m32r-sdi.c.
References send_data().
Referenced by check_mmu_status(), m32r_fetch_register(), m32r_open(), m32r_store_register(), and m32r_wait().
static int send_three_arg_cmd | ( | unsigned char | cmd, |
unsigned long | arg1, | ||
unsigned long | arg2, | ||
unsigned long | arg3 | ||
) | [static] |
Definition at line 259 of file remote-m32r-sdi.c.
References send_data(), and store_long_parameter().
Referenced by m32r_resume(), and m32r_wait().
static int send_two_arg_cmd | ( | unsigned char | cmd, |
unsigned char | arg1, | ||
unsigned long | arg2 | ||
) | [static] |
Definition at line 248 of file remote-m32r-sdi.c.
References send_data(), and store_long_parameter().
Referenced by m32r_resume(), m32r_store_register(), and m32r_wait().
static void store_long_parameter | ( | void * | buf, |
long | val | ||
) | [static] |
Definition at line 222 of file remote-m32r-sdi.c.
References memcpy().
Referenced by m32r_insert_breakpoint(), m32r_load(), m32r_resume(), m32r_wait(), m32r_xfer_memory(), send_three_arg_cmd(), and send_two_arg_cmd().
static void use_dbt_breakpoints_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 1597 of file remote-m32r-sdi.c.
References use_ib_breakpoints.
Referenced by _initialize_remote_m32r().
static void use_debug_dma_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 1568 of file remote-m32r-sdi.c.
References SDI_ATTR_MEM_ACCESS, SDI_MEM_ACCESS_DEBUG_DMA, SDI_SET_ATTR, and send_data().
Referenced by _initialize_remote_m32r().
static void use_ib_breakpoints_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 1591 of file remote-m32r-sdi.c.
References use_ib_breakpoints.
Referenced by _initialize_remote_m32r().
static void use_mon_code_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 1579 of file remote-m32r-sdi.c.
References SDI_ATTR_MEM_ACCESS, SDI_MEM_ACCESS_MON_CODE, SDI_SET_ATTR, and send_data().
Referenced by _initialize_remote_m32r().
Referenced by _initialize_remote_m32r(), and initialize_all_files().
unsigned long ab_address[MAX_ACCESS_BREAKS] [static] |
Definition at line 78 of file remote-m32r-sdi.c.
Referenced by _initialize_remote_m32r(), m32r_insert_watchpoint(), m32r_open(), m32r_remove_watchpoint(), m32r_resume(), and m32r_wait().
unsigned int ab_size[MAX_ACCESS_BREAKS] [static] |
Definition at line 80 of file remote-m32r-sdi.c.
Referenced by m32r_insert_watchpoint().
unsigned int ab_type[MAX_ACCESS_BREAKS] [static] |
Definition at line 79 of file remote-m32r-sdi.c.
Referenced by m32r_insert_watchpoint(), and m32r_resume().
unsigned long bp_address[MAX_BREAKPOINTS] [static] |
Definition at line 68 of file remote-m32r-sdi.c.
Referenced by _initialize_remote_m32r(), m32r_insert_breakpoint(), m32r_open(), m32r_remove_breakpoint(), m32r_resume(), and m32r_wait().
unsigned char bp_data[MAX_BREAKPOINTS][4] [static] |
Definition at line 69 of file remote-m32r-sdi.c.
Referenced by m32r_insert_breakpoint(), m32r_resume(), and m32r_wait().
char chip_name[64] [static] |
Definition at line 56 of file remote-m32r-sdi.c.
Referenced by m32r_files_info(), and m32r_open().
const unsigned char dbt_bp_entry[] [static] |
{ 0x10, 0xe0, 0x70, 0x00 }
Definition at line 72 of file remote-m32r-sdi.c.
Referenced by m32r_resume().
CORE_ADDR hit_watchpoint_addr = 0 [static] |
Definition at line 81 of file remote-m32r-sdi.c.
Referenced by m32r_stopped_data_address(), and m32r_wait().
int interrupted = 0 [static] |
Definition at line 83 of file remote-m32r-sdi.c.
Referenced by gdb_cntrl_c(), m32r_load(), and m32r_wait().
unsigned long last_pc_addr = 0xffffffff [static] |
Definition at line 59 of file remote-m32r-sdi.c.
Referenced by m32r_resume(), and m32r_wait().
unsigned char last_pc_addr_data[2] [static] |
Definition at line 60 of file remote-m32r-sdi.c.
Referenced by m32r_resume(), and m32r_wait().
struct target_ops m32r_ops |
Definition at line 1618 of file remote-m32r-sdi.c.
Referenced by _initialize_remote_m32r(), init_m32r_ops(), and m32r_open().
int max_access_breaks [static] |
Definition at line 77 of file remote-m32r-sdi.c.
Referenced by m32r_can_use_hw_watchpoint(), m32r_open(), m32r_resume(), and m32r_wait().
int max_ib_breakpoints [static] |
Definition at line 67 of file remote-m32r-sdi.c.
Referenced by m32r_insert_breakpoint(), m32r_open(), m32r_resume(), and m32r_wait().
Definition at line 62 of file remote-m32r-sdi.c.
Referenced by check_mmu_status(), m32r_insert_breakpoint(), m32r_load(), m32r_resume(), m32r_wait(), and m32r_xfer_memory().
ptid_t remote_m32r_ptid [static] |
Definition at line 92 of file remote-m32r-sdi.c.
Referenced by m32r_resume().
Definition at line 49 of file remote-m32r-sdi.c.
Definition at line 58 of file remote-m32r-sdi.c.
Referenced by m32r_resume().
int use_ib_breakpoints = 1 [static] |
Definition at line 64 of file remote-m32r-sdi.c.
Referenced by m32r_insert_breakpoint(), m32r_resume(), m32r_wait(), use_dbt_breakpoints_command(), and use_ib_breakpoints_command().