GDBserver
Macros | Functions | Variables
remote-utils.h File Reference

Go to the source code of this file.

Macros

#define STDIO_CONNECTION_NAME   "stdio"
 

Functions

int gdb_connected (void)
 
int remote_connection_is_stdio (void)
 
ptid_t read_ptid (const char *buf, const char **obuf)
 
char * write_ptid (char *buf, ptid_t ptid)
 
int putpkt (char *buf)
 
int putpkt_binary (char *buf, int len)
 
int putpkt_notif (char *buf)
 
int getpkt (char *buf)
 
void remote_prepare (const char *name)
 
void remote_open (const char *name)
 
void remote_close (void)
 
void write_ok (char *buf)
 
void write_enn (char *buf)
 
void initialize_async_io (void)
 
void enable_async_io (void)
 
void disable_async_io (void)
 
void check_remote_input_interrupt_request (void)
 
void prepare_resume_reply (char *buf, ptid_t ptid, struct target_waitstatus *status)
 
const char * decode_address_to_semicolon (CORE_ADDR *addrp, const char *start)
 
void decode_address (CORE_ADDR *addrp, const char *start, int len)
 
void decode_m_packet (char *from, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr)
 
void decode_M_packet (char *from, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr, unsigned char **to_p)
 
int decode_X_packet (char *from, int packet_len, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr, unsigned char **to_p)
 
int decode_xfer_write (char *buf, int packet_len, CORE_ADDR *offset, unsigned int *len, unsigned char *data)
 
int decode_search_memory_packet (const char *buf, int packet_len, CORE_ADDR *start_addrp, CORE_ADDR *search_space_lenp, gdb_byte *pattern, unsigned int *pattern_lenp)
 
void clear_symbol_cache (struct sym_cache **symcache_p)
 
int look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb)
 
int relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
 
void monitor_output (const char *msg)
 

Variables

int remote_debug
 
int noack_mode
 
int transport_is_reliable
 

Macro Definition Documentation

◆ STDIO_CONNECTION_NAME

#define STDIO_CONNECTION_NAME   "stdio"

Definition at line 28 of file remote-utils.h.

Referenced by captured_main(), remote_open(), and remote_prepare().

Function Documentation

◆ check_remote_input_interrupt_request()

void check_remote_input_interrupt_request ( void  )

Definition at line 745 of file remote-utils.c.

References input_interrupt(), INVALID_DESCRIPTOR, and remote_desc.

Referenced by get_child_debug_event().

◆ clear_symbol_cache()

void clear_symbol_cache ( struct sym_cache **  symcache_p)

Definition at line 1417 of file remote-utils.c.

References free_sym_cache(), and sym_cache::next.

Referenced by remove_process().

◆ decode_address()

void decode_address ( CORE_ADDR addrp,
const char *  start,
int  len 
)

Definition at line 399 of file remote-utils.c.

References fromhex().

Referenced by decode_address_to_semicolon(), handle_query(), and look_up_one_symbol().

◆ decode_address_to_semicolon()

const char* decode_address_to_semicolon ( CORE_ADDR addrp,
const char *  start 
)

◆ decode_m_packet()

void decode_m_packet ( char *  from,
CORE_ADDR mem_addr_ptr,
unsigned int *  len_ptr 
)

◆ decode_M_packet()

void decode_M_packet ( char *  from,
CORE_ADDR mem_addr_ptr,
unsigned int *  len_ptr,
unsigned char **  to_p 
)

Definition at line 1309 of file remote-utils.c.

References fromhex(), hex2bin(), and xmalloc().

Referenced by process_serial_event(), and relocate_instruction().

◆ decode_search_memory_packet()

int decode_search_memory_packet ( const char *  buf,
int  packet_len,
CORE_ADDR start_addrp,
CORE_ADDR search_space_lenp,
gdb_byte pattern,
unsigned int *  pattern_lenp 
)

Definition at line 1391 of file remote-utils.c.

References decode_address_to_semicolon(), and remote_unescape_input().

Referenced by handle_search_memory().

◆ decode_X_packet()

int decode_X_packet ( char *  from,
int  packet_len,
CORE_ADDR mem_addr_ptr,
unsigned int *  len_ptr,
unsigned char **  to_p 
)

Definition at line 1335 of file remote-utils.c.

References fromhex(), remote_unescape_input(), and xmalloc().

Referenced by process_serial_event(), and relocate_instruction().

◆ decode_xfer_write()

int decode_xfer_write ( char *  buf,
int  packet_len,
CORE_ADDR offset,
unsigned int *  len,
unsigned char *  data 
)

Definition at line 1367 of file remote-utils.c.

References fromhex(), offset, and remote_unescape_input().

Referenced by handle_qxfer().

◆ disable_async_io()

void disable_async_io ( void  )

◆ enable_async_io()

void enable_async_io ( void  )

Definition at line 799 of file remote-utils.c.

References async_io_enabled, and block_unblock_async_io().

Referenced by resume().

◆ gdb_connected()

int gdb_connected ( void  )

Definition at line 129 of file remote-utils.c.

References INVALID_DESCRIPTOR, and remote_desc.

Referenced by handle_target_event(), and stop_tracing().

◆ getpkt()

int getpkt ( char *  buf)

◆ initialize_async_io()

void initialize_async_io ( void  )

Definition at line 829 of file remote-utils.c.

References async_io_enabled, disable_async_io(), and input_interrupt().

Referenced by captured_main().

◆ look_up_one_symbol()

int look_up_one_symbol ( const char *  name,
CORE_ADDR addrp,
int  may_ask_gdb 
)

◆ monitor_output()

void monitor_output ( const char *  msg)

◆ prepare_resume_reply()

void prepare_resume_reply ( char *  buf,
ptid_t  ptid,
struct target_waitstatus *  status 
)

◆ putpkt()

int putpkt ( char *  buf)

◆ putpkt_binary()

int putpkt_binary ( char *  buf,
int  len 
)

Definition at line 679 of file remote-utils.c.

References putpkt_binary_1().

Referenced by look_up_one_symbol(), process_serial_event(), and putpkt().

◆ putpkt_notif()

int putpkt_notif ( char *  buf)

Definition at line 695 of file remote-utils.c.

References putpkt_binary_1().

Referenced by notif_push().

◆ read_ptid()

ptid_t read_ptid ( const char *  buf,
const char **  obuf 
)

◆ relocate_instruction()

int relocate_instruction ( CORE_ADDR to,
CORE_ADDR  oldloc 
)

◆ remote_close()

void remote_close ( void  )

◆ remote_connection_is_stdio()

int remote_connection_is_stdio ( void  )

Definition at line 137 of file remote-utils.c.

References remote_is_stdio.

Referenced by linux_ptrace_fun(), mywait(), read_prim(), remote_close(), and write_prim().

◆ remote_open()

void remote_open ( const char *  name)

◆ remote_prepare()

void remote_prepare ( const char *  name)

◆ write_enn()

void write_enn ( char *  buf)

◆ write_ok()

void write_ok ( char *  buf)

◆ write_ptid()

char* write_ptid ( char *  buf,
ptid_t  ptid 
)

Variable Documentation

◆ noack_mode

int noack_mode

Definition at line 119 of file remote-utils.c.

Referenced by captured_main(), getpkt(), handle_general_set(), and putpkt_binary_1().

◆ remote_debug

int remote_debug

Definition at line 106 of file remote-utils.c.

◆ transport_is_reliable

int transport_is_reliable

Definition at line 121 of file remote-utils.c.

Referenced by handle_query(), and remote_prepare().