GDB (xrefs)
|
#include "defs.h"
#include "inferior.h"
#include "bfd.h"
#include "symfile.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "serial.h"
#include "target.h"
#include "exceptions.h"
#include "gdb_string.h"
#include "gdb_stat.h"
#include "gdb_usleep.h"
#include "regcache.h"
#include <ctype.h>
#include "mips-tdep.h"
#include "gdbthread.h"
#include "gdb_bfd.h"
Go to the source code of this file.
Classes | |
struct | lsi_breakpoint_info |
struct | lsi_error |
Defines | |
#define | SYN '\026' |
#define | HDR_OFFSET 0x40 |
#define | HDR_INDX_SYN 0 |
#define | HDR_INDX_TYPE_LEN 1 |
#define | HDR_INDX_LEN1 2 |
#define | HDR_INDX_SEQ 3 |
#define | HDR_LENGTH 4 |
#define | TYPE_LEN_DA_BIT 0x20 |
#define | TYPE_LEN_DATA 0 |
#define | TYPE_LEN_ACK TYPE_LEN_DA_BIT |
#define | HDR_SET_SYN(data, len, seq) (SYN) |
#define | HDR_SET_TYPE_LEN(data, len, seq) |
#define | HDR_SET_LEN1(data, len, seq) (HDR_OFFSET + ((len) & 0x3f)) |
#define | HDR_SET_SEQ(data, len, seq) (HDR_OFFSET + (seq)) |
#define | HDR_CHECK(ch) (((ch) & HDR_OFFSET) == HDR_OFFSET) |
#define | HDR_IS_DATA(hdr) (((hdr)[HDR_INDX_TYPE_LEN] & TYPE_LEN_DA_BIT) == TYPE_LEN_DATA) |
#define | HDR_GET_LEN(hdr) ((((hdr)[HDR_INDX_TYPE_LEN] & 0x1f) << 6) + (((hdr)[HDR_INDX_LEN1] & 0x3f))) |
#define | HDR_GET_SEQ(hdr) ((unsigned int)(hdr)[HDR_INDX_SEQ] & 0x3f) |
#define | DATA_MAXLEN 1023 |
#define | TRLR_OFFSET HDR_OFFSET |
#define | TRLR_INDX_CSUM1 0 |
#define | TRLR_INDX_CSUM2 1 |
#define | TRLR_INDX_CSUM3 2 |
#define | TRLR_LENGTH 3 |
#define | TRLR_SET_CSUM1(cksum) (TRLR_OFFSET + (((cksum) >> 12) & 0x3f)) |
#define | TRLR_SET_CSUM2(cksum) (TRLR_OFFSET + (((cksum) >> 6) & 0x3f)) |
#define | TRLR_SET_CSUM3(cksum) (TRLR_OFFSET + (((cksum) ) & 0x3f)) |
#define | TRLR_CHECK(ch) (((ch) & TRLR_OFFSET) == TRLR_OFFSET) |
#define | TRLR_GET_CKSUM(trlr) |
#define | SEQ_MODULOS (64) |
#define | LOAD_CMD "load -b -s tty0\r" |
#define | LOAD_CMD_UDP "load -b -s udp\r" |
#define | MAX_LSI_BREAKPOINTS 256 |
#define | W_WARN |
#define | W_MSK |
#define | W_VAL |
#define | W_QAL |
#define | E_ERR |
#define | E_BPT 0x200 /* error: No such breakpoint number */ |
#define | E_RGE 0x201 /* error: Range is not supported */ |
#define | E_QAL |
#define | E_OUT 0x203 /* error: Out of hardware resources */ |
#define | E_NON 0x204 /* error: Hardware breakpoint not supported */ |
#define | REGNO_OFFSET 96 |
#define | DOETXACK (1) |
#define | CHECKSIZE (4 + 4 + 4 + 2) |
#define | BINCHUNK (1024) |
#define | MAXRECSIZE (550) |
Enumerations | |
enum | break_type { BREAK_WRITE, BREAK_READ, BREAK_ACCESS, BREAK_FETCH, BREAK_UNUSED } |
enum | mips_monitor_type { MON_IDT, MON_PMON, MON_DDB, MON_LSI, MON_ROCKHOPPER, MON_LAST } |
Functions | |
static int | mips_readchar (int timeout) |
static int | mips_receive_header (unsigned char *hdr, int *pgarbage, int ch, int timeout) |
static int | mips_receive_trailer (unsigned char *trlr, int *pgarbage, int *pch, int timeout) |
static int | mips_cksum (const unsigned char *hdr, const char *data, int len) |
static void | mips_send_packet (const char *s, int get_ack) |
static void | mips_send_command (const char *cmd, int prompt) |
static int | mips_receive_packet (char *buff, int throw_error, int timeout) |
static ULONGEST | mips_request (int cmd, ULONGEST addr, ULONGEST data, int *perr, int timeout, char *buff) |
static void | mips_initialize (void) |
static void | mips_open (char *name, int from_tty) |
static void | pmon_open (char *name, int from_tty) |
static void | ddb_open (char *name, int from_tty) |
static void | lsi_open (char *name, int from_tty) |
static void | mips_close (void) |
static void | mips_detach (struct target_ops *ops, char *args, int from_tty) |
static int | mips_map_regno (struct gdbarch *, int) |
static void | mips_set_register (int regno, ULONGEST value) |
static void | mips_prepare_to_store (struct regcache *regcache) |
static int | mips_fetch_word (CORE_ADDR addr, unsigned int *valp) |
static int | mips_store_word (CORE_ADDR addr, unsigned int value, int *old_contents) |
static int | mips_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write, struct mem_attrib *attrib, struct target_ops *target) |
static void | mips_files_info (struct target_ops *ignore) |
static void | mips_mourn_inferior (struct target_ops *ops) |
static int | pmon_makeb64 (unsigned long v, char *p, int n, unsigned int *chksum) |
static int | pmon_zeroset (int recsize, char **buff, unsigned int *amount, unsigned int *chksum) |
static int | pmon_checkset (int recsize, char **buff, unsigned int *value) |
static void | pmon_make_fastrec (char **outbuf, unsigned char *inbuf, int *inptr, int inamount, int *recsize, unsigned int *csum, unsigned int *zerofill) |
static int | pmon_check_ack (char *mesg) |
static void | pmon_start_download (void) |
static void | pmon_end_download (int final, int bintotal) |
static void | pmon_download (char *buffer, int length) |
static void | pmon_load_fast (char *file) |
static void | mips_load (char *file, int from_tty) |
static int | mips_make_srec (char *buffer, int type, CORE_ADDR memaddr, unsigned char *myaddr, int len) |
static int | mips_set_breakpoint (CORE_ADDR addr, int len, enum break_type type) |
static int | mips_clear_breakpoint (CORE_ADDR addr, int len, enum break_type type) |
static int | mips_common_breakpoint (int set, CORE_ADDR addr, int len, enum break_type type) |
static void | close_ports (void) |
static void ATTRIBUTE_NORETURN | mips_error (char *string,...) |
static void | fputc_readable (int ch, struct ui_file *file) |
static void | fputs_readable (const char *string, struct ui_file *file) |
static int | read_hex_value (const char *p, ULONGEST *result) |
static int | mips_expect_timeout (const char *string, int timeout) |
static int | mips_expect (const char *string) |
static void | mips_initialize_cleanups (void *arg) |
static void | mips_exit_cleanups (void *arg) |
static void | mips_enter_debug (void) |
static int | mips_exit_debug (void) |
static void | common_open (struct target_ops *ops, char *name, int from_tty, enum mips_monitor_type new_monitor, const char *new_monitor_prompt) |
static void | rockhopper_open (char *name, int from_tty) |
static void | mips_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal siggnal) |
static enum gdb_signal | mips_signal_from_protocol (int sig) |
static ptid_t | mips_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *status, int options) |
static void | mips_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regno) |
static void | mips_store_registers (struct target_ops *ops, struct regcache *regcache, int regno) |
static void | mips_kill (struct target_ops *ops) |
static void | mips_create_inferior (struct target_ops *ops, char *execfile, char *args, char **env, int from_tty) |
static int | mips_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
static int | mips_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
static int | mips_can_use_watchpoint (int type, int cnt, int othertype) |
static unsigned long | calculate_mask (CORE_ADDR addr, int len) |
static int | mips_insert_watchpoint (CORE_ADDR addr, int len, int type, struct expression *cond) |
static int | mips_remove_watchpoint (CORE_ADDR addr, int len, int type, struct expression *cond) |
static int | mips_stopped_by_watchpoint (void) |
static int | mips_check_lsi_error (CORE_ADDR addr, int rerrflg) |
static void | send_srec (char *srec, int len, CORE_ADDR addr) |
static void | mips_load_srec (char *args) |
static int | mips_expect_download (char *string) |
static void | pmon_check_entry_address (char *entry_address, int final) |
static int | pmon_check_total (int bintotal) |
static int | mips_thread_alive (struct target_ops *ops, ptid_t ptid) |
static char * | mips_pid_to_str (struct target_ops *ops, ptid_t ptid) |
static void | pmon_command (char *args, int from_tty) |
void | _initialize_remote_mips (void) |
Variables | |
struct target_ops | mips_ops |
struct target_ops | pmon_ops |
struct target_ops | ddb_ops |
struct target_ops | rockhopper_ops |
struct target_ops mips_ops pmon_ops ddb_ops rockhopper_ops | lsi_ops |
static enum mips_monitor_type | mips_monitor = MON_LAST |
static char * | mips_monitor_prompt |
static int | mips_is_open |
static struct target_ops * | current_ops |
static int | mips_initializing |
static int | mips_exiting |
static unsigned int | mips_send_seq |
static unsigned int | mips_receive_seq |
static int | mips_retransmit_wait = 3 |
static int | mips_send_retries = 10 |
static int | mips_syn_garbage = 10 |
static int | mips_receive_wait = 5 |
static int | mips_need_reply = 0 |
static struct serial * | mips_desc |
static struct serial * | udp_desc |
static int | udp_in_use |
static char * | tftp_name |
static char * | tftp_localname |
static int | tftp_in_use |
static FILE * | tftp_file |
static int | interrupt_count |
static int | mips_wait_flag = 0 |
static int | monitor_supports_breakpoints = 0 |
static int | hit_watchpoint |
struct lsi_breakpoint_info | lsi_breakpoints [MAX_LSI_BREAKPOINTS] |
struct lsi_error | lsi_warning_table [] |
struct lsi_error | lsi_error_table [] |
static int | monitor_warnings |
static ptid_t | remote_mips_ptid |
static int | mask_address_p = 1 |
static char | encoding [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789,." |
initialize_file_ftype | _initialize_remote_mips |
#define BINCHUNK (1024) |
Definition at line 3076 of file remote-mips.c.
#define CHECKSIZE (4 + 4 + 4 + 2) |
Definition at line 3071 of file remote-mips.c.
Referenced by pmon_make_fastrec().
#define DATA_MAXLEN 1023 |
Definition at line 258 of file remote-mips.c.
Referenced by mips_common_breakpoint(), and mips_request().
#define DOETXACK (1) |
Definition at line 2946 of file remote-mips.c.
#define E_BPT 0x200 /* error: No such breakpoint number */ |
Definition at line 419 of file remote-mips.c.
#define E_ERR |
0x200 /* This bit is set if the error code is an error */
Definition at line 418 of file remote-mips.c.
#define E_NON 0x204 /* error: Hardware breakpoint not supported */ |
Definition at line 423 of file remote-mips.c.
#define E_OUT 0x203 /* error: Out of hardware resources */ |
Definition at line 422 of file remote-mips.c.
#define E_QAL |
0x202 /* error: The requested qualifiers can not be used */
Definition at line 421 of file remote-mips.c.
#define E_RGE 0x201 /* error: Range is not supported */ |
Definition at line 420 of file remote-mips.c.
#define HDR_CHECK | ( | ch | ) | (((ch) & HDR_OFFSET) == HDR_OFFSET) |
Definition at line 247 of file remote-mips.c.
Referenced by mips_receive_header().
#define HDR_GET_LEN | ( | hdr | ) | ((((hdr)[HDR_INDX_TYPE_LEN] & 0x1f) << 6) + (((hdr)[HDR_INDX_LEN1] & 0x3f))) |
Definition at line 253 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_GET_SEQ | ( | hdr | ) | ((unsigned int)(hdr)[HDR_INDX_SEQ] & 0x3f) |
Definition at line 255 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_INDX_LEN1 2 |
Definition at line 228 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_INDX_SEQ 3 |
Definition at line 229 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_INDX_SYN 0 |
Definition at line 226 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_INDX_TYPE_LEN 1 |
Definition at line 227 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_IS_DATA | ( | hdr | ) | (((hdr)[HDR_INDX_TYPE_LEN] & TYPE_LEN_DA_BIT) == TYPE_LEN_DATA) |
Definition at line 251 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_LENGTH 4 |
Definition at line 230 of file remote-mips.c.
Referenced by mips_receive_header(), and mips_receive_packet().
#define HDR_OFFSET 0x40 |
Definition at line 223 of file remote-mips.c.
#define HDR_SET_LEN1 | ( | data, | |
len, | |||
seq | |||
) | (HDR_OFFSET + ((len) & 0x3f)) |
Definition at line 243 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_SET_SEQ | ( | data, | |
len, | |||
seq | |||
) | (HDR_OFFSET + (seq)) |
Definition at line 244 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_SET_SYN | ( | data, | |
len, | |||
seq | |||
) | (SYN) |
Definition at line 238 of file remote-mips.c.
Referenced by mips_receive_packet().
#define HDR_SET_TYPE_LEN | ( | data, | |
len, | |||
seq | |||
) |
(HDR_OFFSET \ + ((data) ? TYPE_LEN_DATA : TYPE_LEN_ACK) \ + (((len) >> 6) & 0x1f))
Definition at line 239 of file remote-mips.c.
Referenced by mips_receive_packet().
#define LOAD_CMD "load -b -s tty0\r" |
Definition at line 288 of file remote-mips.c.
Referenced by init_ppc_cmds().
#define LOAD_CMD_UDP "load -b -s udp\r" |
Definition at line 289 of file remote-mips.c.
#define MAX_LSI_BREAKPOINTS 256 |
Definition at line 401 of file remote-mips.c.
Referenced by mips_common_breakpoint().
#define MAXRECSIZE (550) |
Definition at line 3079 of file remote-mips.c.
Referenced by pmon_make_fastrec().
#define REGNO_OFFSET 96 |
Definition at line 1981 of file remote-mips.c.
Referenced by mips_map_regno().
#define SEQ_MODULOS (64) |
Definition at line 285 of file remote-mips.c.
Referenced by mips_receive_packet().
#define SYN '\026' |
Definition at line 218 of file remote-mips.c.
Referenced by mips_receive_header(), and mips_receive_packet().
#define TRLR_CHECK | ( | ch | ) | (((ch) & TRLR_OFFSET) == TRLR_OFFSET) |
Definition at line 275 of file remote-mips.c.
Referenced by mips_receive_trailer().
#define TRLR_GET_CKSUM | ( | trlr | ) |
((((trlr)[TRLR_INDX_CSUM1] & 0x3f) << 12) \ + (((trlr)[TRLR_INDX_CSUM2] & 0x3f) << 6) \ + ((trlr)[TRLR_INDX_CSUM3] & 0x3f))
Definition at line 279 of file remote-mips.c.
Referenced by mips_receive_packet().
#define TRLR_INDX_CSUM1 0 |
Definition at line 264 of file remote-mips.c.
Referenced by mips_receive_packet().
#define TRLR_INDX_CSUM2 1 |
Definition at line 265 of file remote-mips.c.
Referenced by mips_receive_packet().
#define TRLR_INDX_CSUM3 2 |
Definition at line 266 of file remote-mips.c.
Referenced by mips_receive_packet().
#define TRLR_LENGTH 3 |
Definition at line 267 of file remote-mips.c.
Referenced by mips_receive_packet(), and mips_receive_trailer().
#define TRLR_OFFSET HDR_OFFSET |
Definition at line 261 of file remote-mips.c.
#define TRLR_SET_CSUM1 | ( | cksum | ) | (TRLR_OFFSET + (((cksum) >> 12) & 0x3f)) |
Definition at line 270 of file remote-mips.c.
Referenced by mips_receive_packet().
#define TRLR_SET_CSUM2 | ( | cksum | ) | (TRLR_OFFSET + (((cksum) >> 6) & 0x3f)) |
Definition at line 271 of file remote-mips.c.
Referenced by mips_receive_packet().
#define TRLR_SET_CSUM3 | ( | cksum | ) | (TRLR_OFFSET + (((cksum) ) & 0x3f)) |
Definition at line 272 of file remote-mips.c.
Referenced by mips_receive_packet().
#define TYPE_LEN_ACK TYPE_LEN_DA_BIT |
Definition at line 235 of file remote-mips.c.
#define TYPE_LEN_DA_BIT 0x20 |
Definition at line 233 of file remote-mips.c.
#define TYPE_LEN_DATA 0 |
Definition at line 234 of file remote-mips.c.
#define W_MSK |
0x101 /* warning: Range feature is supported via mask */
Definition at line 414 of file remote-mips.c.
#define W_QAL |
0x104 /* warning: Requested qualifiers are not supported in hardware */
Definition at line 416 of file remote-mips.c.
#define W_VAL |
0x102 /* warning: Value check is not supported in hardware */
Definition at line 415 of file remote-mips.c.
#define W_WARN |
0x100 /* This bit is set if the error code is a warning */
Definition at line 413 of file remote-mips.c.
Referenced by mips_check_lsi_error().
enum break_type |
Definition at line 46 of file remote-mips.c.
enum mips_monitor_type |
Definition at line 297 of file remote-mips.c.
void _initialize_remote_mips | ( | void | ) |
Definition at line 3608 of file remote-mips.c.
References _, add_com(), add_setshow_boolean_cmd(), add_setshow_string_cmd(), add_setshow_zinteger_cmd(), add_target(), class_obscure, ddb_open(), ddb_ops, default_child_has_all_memory(), default_child_has_execution(), default_child_has_memory(), default_child_has_registers(), default_child_has_stack(), target_ops::deprecated_xfer_memory, lsi_open(), lsi_ops, mips_can_use_watchpoint(), mips_close(), mips_create_inferior(), mips_detach(), mips_fetch_registers(), mips_files_info(), mips_insert_breakpoint(), mips_insert_watchpoint(), mips_kill(), mips_load(), mips_monitor_prompt, mips_mourn_inferior(), mips_open(), mips_ops, mips_pid_to_str(), mips_prepare_to_store(), mips_receive_wait, mips_remove_breakpoint(), mips_remove_watchpoint(), mips_resume(), mips_retransmit_wait, mips_stopped_by_watchpoint(), mips_store_registers(), mips_syn_garbage, mips_thread_alive(), mips_wait(), mips_xfer_memory(), monitor_warnings, no_class, OPS_MAGIC, pmon_command(), pmon_open(), pmon_ops, process_stratum, ptid_build(), rockhopper_open(), rockhopper_ops, serial_log_command(), setlist, showlist, 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_stopped_by_watchpoint, target_ops::to_store_registers, target_ops::to_stratum, target_ops::to_thread_alive, and target_ops::to_wait.
static unsigned long calculate_mask | ( | CORE_ADDR | addr, |
int | len | ||
) | [static] |
Definition at line 2399 of file remote-mips.c.
References gdb::printing::long.
Referenced by mips_common_breakpoint().
static void close_ports | ( | void | ) | [static] |
Definition at line 463 of file remote-mips.c.
References mips_is_open, serial_close(), tftp_in_use, and udp_in_use.
Referenced by mips_error(), and mips_kill().
static void common_open | ( | struct target_ops * | ops, |
char * | name, | ||
int | from_tty, | ||
enum mips_monitor_type | new_monitor, | ||
const char * | new_monitor_prompt | ||
) | [static] |
Definition at line 1539 of file remote-mips.c.
Definition at line 1700 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void fputc_readable | ( | int | ch, |
struct ui_file * | file | ||
) | [static] |
Definition at line 513 of file remote-mips.c.
Referenced by fputs_readable(), mips_expect_timeout(), and mips_receive_header().
static void fputs_readable | ( | const char * | string, |
struct ui_file * | file | ||
) | [static] |
Definition at line 532 of file remote-mips.c.
References fputc_readable().
Referenced by mips_expect_timeout().
Definition at line 1716 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static int mips_can_use_watchpoint | ( | int | type, |
int | cnt, | ||
int | othertype | ||
) | [static] |
Definition at line 2389 of file remote-mips.c.
References target_shortname.
Referenced by _initialize_remote_mips().
static int mips_check_lsi_error | ( | CORE_ADDR | addr, |
int | rerrflg | ||
) | [static] |
Definition at line 2480 of file remote-mips.c.
References lsi_error::code, fprintf_unfiltered(), gdb_stderr, monitor_warnings, paddress(), lsi_error::string, target_gdbarch(), and W_WARN.
Referenced by mips_common_breakpoint().
static int mips_cksum | ( | const unsigned char * | hdr, |
const char * | data, | ||
int | len | ||
) | [static] |
Definition at line 823 of file remote-mips.c.
Referenced by mips_receive_packet().
static int mips_clear_breakpoint | ( | CORE_ADDR | addr, |
int | len, | ||
enum break_type | type | ||
) | [static] |
Definition at line 2466 of file remote-mips.c.
static void mips_close | ( | void | ) | [static] |
Definition at line 1730 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static int mips_common_breakpoint | ( | int | set, |
CORE_ADDR | addr, | ||
int | len, | ||
enum break_type | type | ||
) | [static] |
Definition at line 2549 of file remote-mips.c.
References _, lsi_breakpoint_info::addr, BREAK_ACCESS, BREAK_FETCH, BREAK_READ, BREAK_UNUSED, BREAK_WRITE, calculate_mask(), DATA_MAXLEN, flags, fprintf_unfiltered(), gdb_stderr, gdbarch_addr_bit(), gdbarch_addr_bits_remove(), internal_error(), len, lsi_breakpoint_info::len, lsi_breakpoints, MAX_LSI_BREAKPOINTS, mips_check_lsi_error(), mips_error(), mips_monitor, mips_receive_packet(), mips_receive_wait, mips_send_packet(), MON_DDB, MON_LSI, paddress(), phex_nz(), target_gdbarch(), type, lsi_breakpoint_info::type, and warning().
static void mips_create_inferior | ( | struct target_ops * | ops, |
char * | execfile, | ||
char * | args, | ||
char ** | env, | ||
int | from_tty | ||
) | [static] |
Definition at line 2317 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void mips_detach | ( | struct target_ops * | ops, |
char * | args, | ||
int | from_tty | ||
) | [static] |
Definition at line 1746 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void mips_enter_debug | ( | void | ) | [static] |
Definition at line 1336 of file remote-mips.c.
static void ATTRIBUTE_NORETURN mips_error | ( | char * | string, |
... | |||
) | [static] |
Definition at line 482 of file remote-mips.c.
References _, close_ports(), gdb_flush(), gdb_stderr, gdb_stdout, inferior_ptid, make_cleanup(), null_ptid, ptid_equal(), TARGET_CLOSE_ERROR, target_mourn_inferior(), target_terminal_ours, throw_verror(), wrap_here(), and xfree().
Referenced by mips_common_breakpoint(), mips_readchar(), mips_receive_header(), mips_receive_packet(), and mips_request().
static void mips_exit_cleanups | ( | void * | arg | ) | [static] |
Definition at line 1315 of file remote-mips.c.
static int mips_exit_debug | ( | void | ) | [static] |
Definition at line 1368 of file remote-mips.c.
static int mips_expect | ( | const char * | string | ) | [static] |
Definition at line 628 of file remote-mips.c.
References mips_expect_timeout(), and remote_timeout.
Referenced by mips_expect_download(), pmon_check_entry_address(), and pmon_check_total().
static int mips_expect_download | ( | char * | string | ) | [static] |
Definition at line 3222 of file remote-mips.c.
References fprintf_unfiltered(), gdb_stderr, mips_expect(), tftp_in_use, and tftp_localname.
Referenced by pmon_check_total(), and pmon_end_download().
static int mips_expect_timeout | ( | const char * | string, |
int | timeout | ||
) | [static] |
Definition at line 572 of file remote-mips.c.
References fprintf_unfiltered(), fputc_readable(), fputs_readable(), gdb_stdlog, immediate_quit, p, QUIT, remote_debug, serial_readchar(), SERIAL_TIMEOUT, and string.
Referenced by mips_expect(), and pmon_check_entry_address().
static void mips_fetch_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 2011 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static int mips_fetch_word | ( | CORE_ADDR | addr, |
unsigned int * | valp | ||
) | [static] |
Definition at line 2099 of file remote-mips.c.
References mips_receive_wait, and mips_request().
Referenced by mips_xfer_memory().
static void mips_files_info | ( | struct target_ops * | ignore | ) | [static] |
Definition at line 2249 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void mips_initialize | ( | void | ) | [static] |
Definition at line 1405 of file remote-mips.c.
Referenced by mips_readchar().
static void mips_initialize_cleanups | ( | void * | arg | ) | [static] |
Definition at line 1307 of file remote-mips.c.
static int mips_insert_breakpoint | ( | struct gdbarch * | gdbarch, |
struct bp_target_info * | bp_tgt | ||
) | [static] |
Definition at line 2361 of file remote-mips.c.
References BREAK_FETCH, MIPS_INSN32_SIZE, mips_set_breakpoint(), monitor_supports_breakpoints, and bp_target_info::placed_address.
Referenced by _initialize_remote_mips().
static int mips_insert_watchpoint | ( | CORE_ADDR | addr, |
int | len, | ||
int | type, | ||
struct expression * | cond | ||
) | [static] |
Definition at line 2423 of file remote-mips.c.
References mips_set_breakpoint().
Referenced by _initialize_remote_mips().
static void mips_kill | ( | struct target_ops * | ops | ) | [static] |
Definition at line 2260 of file remote-mips.c.
References _, close_ports(), interrupt_count, mips_is_open, mips_wait_flag, printf_unfiltered(), query(), quit(), remote_debug, serial_send_break(), serial_write(), sleep(), target_mourn_inferior(), target_terminal_inferior(), and target_terminal_ours.
Referenced by _initialize_remote_mips().
Definition at line 3525 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void mips_load_srec | ( | char * | args | ) | [static] |
Definition at line 2781 of file remote-mips.c.
static int mips_make_srec | ( | char * | buffer, |
int | type, | ||
CORE_ADDR | memaddr, | ||
unsigned char * | myaddr, | ||
int | len | ||
) | [static] |
Definition at line 2908 of file remote-mips.c.
static int mips_map_regno | ( | struct gdbarch * | gdbarch, |
int | regno | ||
) | [static] |
Definition at line 1984 of file remote-mips.c.
References mips_regnum::fp0, mips_regnum(), and REGNO_OFFSET.
static void mips_mourn_inferior | ( | struct target_ops * | ops | ) | [static] |
Definition at line 2344 of file remote-mips.c.
Referenced by _initialize_remote_mips().
Definition at line 1667 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static char* mips_pid_to_str | ( | struct target_ops * | ops, |
ptid_t | ptid | ||
) | [static] |
Definition at line 3570 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void mips_prepare_to_store | ( | struct regcache * | regcache | ) | [static] |
Definition at line 2063 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static int mips_readchar | ( | int | timeout | ) | [static] |
Definition at line 648 of file remote-mips.c.
References _, error(), fprintf_unfiltered(), gdb_stdlog, mips_error(), mips_exiting, mips_initialize(), mips_initializing, mips_monitor_prompt, mips_need_reply, remote_debug, safe_strerror(), SERIAL_EOF, SERIAL_ERROR, serial_readchar(), SERIAL_TIMEOUT, target_mourn_inferior(), timeout, and watchdog.
Referenced by mips_receive_header(), mips_receive_packet(), mips_receive_trailer(), and send_srec().
static int mips_receive_header | ( | unsigned char * | hdr, |
int * | pgarbage, | ||
int | ch, | ||
int | timeout | ||
) | [static] |
Definition at line 727 of file remote-mips.c.
References _, fputc_readable(), fputc_unfiltered(), gdb_flush(), gdb_stdtarg, HDR_CHECK, HDR_LENGTH, mips_error(), mips_initializing, mips_readchar(), mips_syn_garbage, remote_debug, SERIAL_TIMEOUT, and SYN.
Referenced by mips_receive_packet().
static int mips_receive_packet | ( | char * | buff, |
int | throw_error, | ||
int | timeout | ||
) | [static] |
Definition at line 1014 of file remote-mips.c.
References _, fprintf_unfiltered(), gdb_stdlog, HDR_GET_LEN, HDR_GET_SEQ, HDR_INDX_LEN1, HDR_INDX_SEQ, HDR_INDX_SYN, HDR_INDX_TYPE_LEN, HDR_IS_DATA, HDR_LENGTH, HDR_SET_LEN1, HDR_SET_SEQ, HDR_SET_SYN, HDR_SET_TYPE_LEN, len, mips_cksum(), mips_error(), mips_readchar(), mips_receive_header(), mips_receive_seq, mips_receive_trailer(), printf_unfiltered(), remote_debug, safe_strerror(), SEQ_MODULOS, SERIAL_TIMEOUT, serial_write(), SYN, TRLR_GET_CKSUM, TRLR_INDX_CSUM1, TRLR_INDX_CSUM2, TRLR_INDX_CSUM3, TRLR_LENGTH, TRLR_SET_CSUM1, TRLR_SET_CSUM2, and TRLR_SET_CSUM3.
Referenced by mips_common_breakpoint(), and mips_request().
static int mips_receive_trailer | ( | unsigned char * | trlr, |
int * | pgarbage, | ||
int * | pch, | ||
int | timeout | ||
) | [static] |
Definition at line 800 of file remote-mips.c.
References mips_readchar(), SERIAL_TIMEOUT, TRLR_CHECK, and TRLR_LENGTH.
Referenced by mips_receive_packet().
static int mips_remove_breakpoint | ( | struct gdbarch * | gdbarch, |
struct bp_target_info * | bp_tgt | ||
) | [static] |
Definition at line 2374 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static int mips_remove_watchpoint | ( | CORE_ADDR | addr, |
int | len, | ||
int | type, | ||
struct expression * | cond | ||
) | [static] |
Definition at line 2435 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static ULONGEST mips_request | ( | int | cmd, |
ULONGEST | addr, | ||
ULONGEST | data, | ||
int * | perr, | ||
int | timeout, | ||
char * | buff | ||
) | [static] |
Definition at line 1231 of file remote-mips.c.
References _, DATA_MAXLEN, gdbarch_addr_bit(), internal_error(), len, mips_error(), mips_need_reply, mips_receive_packet(), mips_send_packet(), phex_nz(), read_hex_value(), target_gdbarch(), and ULONGEST.
Referenced by mips_fetch_word(), mips_resume(), and mips_store_word().
static void mips_resume | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
int | step, | ||
enum gdb_signal | siggnal | ||
) | [static] |
Definition at line 1762 of file remote-mips.c.
References mips_monitor, mips_receive_wait, mips_request(), and MON_LSI.
Referenced by _initialize_remote_mips().
static void mips_send_command | ( | const char * | cmd, |
int | prompt | ||
) | [static] |
Definition at line 1324 of file remote-mips.c.
Referenced by pmon_end_download().
static void mips_send_packet | ( | const char * | s, |
int | get_ack | ||
) | [static] |
Definition at line 849 of file remote-mips.c.
Referenced by mips_common_breakpoint(), and mips_request().
static int mips_set_breakpoint | ( | CORE_ADDR | addr, |
int | len, | ||
enum break_type | type | ||
) | [static] |
Definition at line 2457 of file remote-mips.c.
Referenced by mips_insert_breakpoint(), and mips_insert_watchpoint().
static void mips_set_register | ( | int | regno, |
ULONGEST | value | ||
) | [static] |
Definition at line 1797 of file remote-mips.c.
static enum gdb_signal mips_signal_from_protocol | ( | int | sig | ) | [static] |
Definition at line 1778 of file remote-mips.c.
static int mips_stopped_by_watchpoint | ( | void | ) | [static] |
Definition at line 2448 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void mips_store_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 2070 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static int mips_store_word | ( | CORE_ADDR | addr, |
unsigned int | value, | ||
int * | old_contents | ||
) | [static] |
Definition at line 2119 of file remote-mips.c.
References mips_receive_wait, and mips_request().
Referenced by mips_xfer_memory().
static int mips_thread_alive | ( | struct target_ops * | ops, |
ptid_t | ptid | ||
) | [static] |
Definition at line 3557 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static ptid_t mips_wait | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
struct target_waitstatus * | status, | ||
int | options | ||
) | [static] |
Definition at line 1825 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static int mips_xfer_memory | ( | CORE_ADDR | memaddr, |
gdb_byte * | myaddr, | ||
int | len, | ||
int | write, | ||
struct mem_attrib * | attrib, | ||
struct target_ops * | target | ||
) | [static] |
Definition at line 2149 of file remote-mips.c.
References extract_unsigned_integer(), gdb_flush(), gdb_stdout, gdbarch_byte_order(), len, memcpy(), mips_fetch_word(), mips_store_word(), printf_unfiltered(), QUIT, exsummary::status, store_unsigned_integer(), target_gdbarch(), and word.
Referenced by _initialize_remote_mips().
static int pmon_check_ack | ( | char * | mesg | ) | [static] |
Definition at line 3174 of file remote-mips.c.
References fprintf_unfiltered(), gdb_stderr, remote_timeout, serial_readchar(), SERIAL_TIMEOUT, tftp_in_use, and udp_in_use.
Referenced by pmon_end_download().
static void pmon_check_entry_address | ( | char * | entry_address, |
int | final | ||
) | [static] |
Definition at line 3245 of file remote-mips.c.
References mips_expect(), mips_expect_timeout(), remote_timeout, and tftp_in_use.
Referenced by pmon_end_download().
static int pmon_check_total | ( | int | bintotal | ) | [static] |
Definition at line 3260 of file remote-mips.c.
References mips_expect(), and mips_expect_download().
Referenced by pmon_end_download().
static int pmon_checkset | ( | int | recsize, |
char ** | buff, | ||
unsigned int * | value | ||
) | [static] |
Definition at line 3054 of file remote-mips.c.
References pmon_makeb64().
static void pmon_command | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 3586 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void pmon_download | ( | char * | buffer, |
int | length | ||
) | [static] |
Definition at line 3348 of file remote-mips.c.
References perror_with_name(), serial_write(), tftp_file, tftp_in_use, tftp_localname, and udp_in_use.
static void pmon_end_download | ( | int | final, |
int | bintotal | ||
) | [static] |
Definition at line 3278 of file remote-mips.c.
References mips_expect_download(), mips_monitor, mips_send_command(), MON_LSI, MON_ROCKHOPPER, pmon_check_ack(), pmon_check_entry_address(), pmon_check_total(), tftp_file, tftp_in_use, tftp_localname, tftp_name, xfree(), and xmalloc().
static void pmon_load_fast | ( | char * | file | ) | [static] |
Definition at line 3366 of file remote-mips.c.
static void pmon_make_fastrec | ( | char ** | outbuf, |
unsigned char * | inbuf, | ||
int * | inptr, | ||
int | inamount, | ||
int * | recsize, | ||
unsigned int * | csum, | ||
unsigned int * | zerofill | ||
) | [static] |
Definition at line 3110 of file remote-mips.c.
References CHECKSIZE, MAXRECSIZE, p, pmon_makeb64(), and pmon_zeroset().
static int pmon_makeb64 | ( | unsigned long | v, |
char * | p, | ||
int | n, | ||
unsigned int * | chksum | ||
) | [static] |
Definition at line 2979 of file remote-mips.c.
References fprintf_unfiltered(), and gdb_stderr.
Referenced by pmon_checkset(), and pmon_make_fastrec().
Definition at line 1692 of file remote-mips.c.
Referenced by _initialize_remote_mips().
static void pmon_start_download | ( | void | ) | [static] |
Definition at line 3198 of file remote-mips.c.
static int pmon_zeroset | ( | int | recsize, |
char ** | buff, | ||
unsigned int * | amount, | ||
unsigned int * | chksum | ||
) | [static] |
Definition at line 3027 of file remote-mips.c.
Referenced by pmon_make_fastrec().
static int read_hex_value | ( | const char * | p, |
ULONGEST * | result | ||
) | [static] |
static void rockhopper_open | ( | char * | name, |
int | from_tty | ||
) | [static] |
Definition at line 1708 of file remote-mips.c.
Referenced by _initialize_remote_mips().
Definition at line 2749 of file remote-mips.c.
References _, error(), fprintf_unfiltered(), gdb_stderr, mips_readchar(), paddress(), remote_timeout, SERIAL_TIMEOUT, serial_write(), and target_gdbarch().
Referenced by initialize_all_files().
struct target_ops* current_ops [static] |
Definition at line 333 of file remote-mips.c.
struct target_ops ddb_ops |
Referenced by _initialize_remote_mips().
char encoding[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789,." [static] |
Definition at line 2970 of file remote-mips.c.
Referenced by ada_delta(), c_emit_char(), c_printstr(), decode_frame_entry_1(), f_emit_char(), f_get_encoding(), java_emit_char(), java_get_encoding(), read_base_type(), scaling_factor(), and value_get_print_value().
int hit_watchpoint [static] |
Definition at line 395 of file remote-mips.c.
int interrupt_count [static] |
Definition at line 380 of file remote-mips.c.
Referenced by mips_kill().
Referenced by mips_common_breakpoint().
struct lsi_error lsi_error_table[] |
Definition at line 295 of file remote-mips.c.
Referenced by _initialize_remote_mips().
struct lsi_error lsi_warning_table[] |
{ {W_MSK, "Range feature is supported via mask"}, {W_VAL, "Value check is not supported in hardware"}, {W_QAL, "Requested qualifiers are not supported in hardware"}, {0, NULL} }
Definition at line 431 of file remote-mips.c.
int mask_address_p = 1 [static] |
Definition at line 2146 of file remote-mips.c.
Definition at line 365 of file remote-mips.c.
int mips_exiting [static] |
Definition at line 339 of file remote-mips.c.
Referenced by mips_readchar().
int mips_initializing [static] |
Definition at line 336 of file remote-mips.c.
Referenced by mips_readchar(), and mips_receive_header().
int mips_is_open [static] |
Definition at line 330 of file remote-mips.c.
Referenced by close_ports(), and mips_kill().
enum mips_monitor_type mips_monitor = MON_LAST [static] |
Definition at line 313 of file remote-mips.c.
Referenced by mips_common_breakpoint(), mips_resume(), and pmon_end_download().
char* mips_monitor_prompt [static] |
Definition at line 327 of file remote-mips.c.
Referenced by _initialize_remote_mips(), and mips_readchar().
int mips_need_reply = 0 [static] |
Definition at line 362 of file remote-mips.c.
Referenced by mips_readchar(), and mips_request().
struct target_ops mips_ops |
Referenced by _initialize_remote_mips().
unsigned int mips_receive_seq [static] |
Definition at line 345 of file remote-mips.c.
Referenced by mips_receive_packet().
int mips_receive_wait = 5 [static] |
Definition at line 358 of file remote-mips.c.
Referenced by _initialize_remote_mips(), mips_common_breakpoint(), mips_fetch_word(), mips_resume(), and mips_store_word().
int mips_retransmit_wait = 3 [static] |
Definition at line 348 of file remote-mips.c.
Referenced by _initialize_remote_mips().
int mips_send_retries = 10 [static] |
Definition at line 351 of file remote-mips.c.
unsigned int mips_send_seq [static] |
Definition at line 342 of file remote-mips.c.
int mips_syn_garbage = 10 [static] |
Definition at line 355 of file remote-mips.c.
Referenced by _initialize_remote_mips(), and mips_receive_header().
int mips_wait_flag = 0 [static] |
Definition at line 383 of file remote-mips.c.
Referenced by mips_kill().
int monitor_supports_breakpoints = 0 [static] |
Definition at line 386 of file remote-mips.c.
Referenced by mips_insert_breakpoint().
int monitor_warnings [static] |
Definition at line 451 of file remote-mips.c.
Referenced by _initialize_remote_mips(), and mips_check_lsi_error().
struct target_ops pmon_ops |
Referenced by _initialize_remote_mips().
ptid_t remote_mips_ptid [static] |
Definition at line 457 of file remote-mips.c.
struct target_ops rockhopper_ops |
Referenced by _initialize_remote_mips().
FILE* tftp_file [static] |
Definition at line 376 of file remote-mips.c.
Referenced by pmon_download(), and pmon_end_download().
int tftp_in_use [static] |
Definition at line 375 of file remote-mips.c.
Referenced by close_ports(), mips_expect_download(), pmon_check_ack(), pmon_check_entry_address(), pmon_download(), and pmon_end_download().
char* tftp_localname [static] |
Definition at line 374 of file remote-mips.c.
Referenced by mips_expect_download(), pmon_download(), and pmon_end_download().
char* tftp_name [static] |
Definition at line 373 of file remote-mips.c.
Referenced by pmon_end_download().
Definition at line 368 of file remote-mips.c.
int udp_in_use [static] |
Definition at line 369 of file remote-mips.c.
Referenced by close_ports(), pmon_check_ack(), and pmon_download().