GDB (API)
Classes | Defines | Typedefs | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/remote.c File Reference
#include "defs.h"
#include "gdb_string.h"
#include <ctype.h>
#include <fcntl.h>
#include "inferior.h"
#include "bfd.h"
#include "symfile.h"
#include "exceptions.h"
#include "target.h"
#include "gdbcmd.h"
#include "objfiles.h"
#include "gdb-stabs.h"
#include "gdbthread.h"
#include "remote.h"
#include "remote-notif.h"
#include "regcache.h"
#include "value.h"
#include "gdb_assert.h"
#include "observer.h"
#include "solib.h"
#include "cli/cli-decode.h"
#include "cli/cli-setshow.h"
#include "target-descriptions.h"
#include "gdb_bfd.h"
#include "filestuff.h"
#include <sys/time.h>
#include "event-loop.h"
#include "event-top.h"
#include "inf-loop.h"
#include <signal.h>
#include "serial.h"
#include "gdbcore.h"
#include "remote-fileio.h"
#include "gdb/fileio.h"
#include "gdb_stat.h"
#include "xml-support.h"
#include "memory-map.h"
#include "tracepoint.h"
#include "ax.h"
#include "ax-gdb.h"
#include "agent.h"
#include "btrace.h"

Go to the source code of this file.

Classes

struct  btrace_target_info

Defines

#define OPAQUETHREADBYTES   8
#define MAXTHREADLISTRESULTS   32
#define MAX_REMOTE_PACKET_SIZE   16384
#define MIN_REMOTE_PACKET_SIZE   20
#define TAG_THREADID   1
#define TAG_EXISTS   2
#define TAG_DISPLAY   4
#define TAG_THREADNAME   8
#define TAG_MOREDISPLAY   16
#define BUF_THREAD_ID_SIZE   (OPAQUETHREADBYTES * 2)
#define TAG_THREADID   1 /* Echo the thread identifier. */
#define TAG_EXISTS
#define TAG_DISPLAY   4 /* A short thing maybe to put on a window */
#define TAG_THREADNAME   8 /* string, maps 1-to-1 with a thread is. */
#define TAG_MOREDISPLAY
#define CRAZY_MAX_THREADS   1000
#define MAX_TRIES   3
#define BUF_SIZE   2048

Typedefs

typedef unsigned char threadref [OPAQUETHREADBYTES]
typedef int gdb_threadref
typedef int(* rmt_thread_action )(threadref *ref, void *context)
typedef struct cached_reg cached_reg_t
typedef struct stop_reply * stop_reply_p
typedef struct
remote_g_packet_guess 
remote_g_packet_guess_s

Enumerations

enum  { REMOTE_ALIGN_WRITES = 16 }
enum  packet_support { PACKET_SUPPORT_UNKNOWN = 0, PACKET_ENABLE, PACKET_DISABLE }
enum  packet_result { PACKET_ERROR, PACKET_OK, PACKET_UNKNOWN }
enum  {
  PACKET_vCont = 0, PACKET_X, PACKET_qSymbol, PACKET_P,
  PACKET_p, PACKET_Z0, PACKET_Z1, PACKET_Z2,
  PACKET_Z3, PACKET_Z4, PACKET_vFile_open, PACKET_vFile_pread,
  PACKET_vFile_pwrite, PACKET_vFile_close, PACKET_vFile_unlink, PACKET_vFile_readlink,
  PACKET_qXfer_auxv, PACKET_qXfer_features, PACKET_qXfer_libraries, PACKET_qXfer_libraries_svr4,
  PACKET_qXfer_memory_map, PACKET_qXfer_spu_read, PACKET_qXfer_spu_write, PACKET_qXfer_osdata,
  PACKET_qXfer_threads, PACKET_qXfer_statictrace_read, PACKET_qXfer_traceframe_info, PACKET_qXfer_uib,
  PACKET_qGetTIBAddr, PACKET_qGetTLSAddr, PACKET_qSupported, PACKET_qTStatus,
  PACKET_QPassSignals, PACKET_QProgramSignals, PACKET_qSearch_memory, PACKET_vAttach,
  PACKET_vRun, PACKET_QStartNoAckMode, PACKET_vKill, PACKET_qXfer_siginfo_read,
  PACKET_qXfer_siginfo_write, PACKET_qAttached, PACKET_ConditionalTracepoints, PACKET_ConditionalBreakpoints,
  PACKET_BreakpointCommands, PACKET_FastTracepoints, PACKET_StaticTracepoints, PACKET_InstallInTrace,
  PACKET_bc, PACKET_bs, PACKET_TracepointSource, PACKET_QAllow,
  PACKET_qXfer_fdpic, PACKET_QDisableRandomization, PACKET_QAgent, PACKET_QTBuffer_size,
  PACKET_Qbtrace_off, PACKET_Qbtrace_bts, PACKET_qXfer_btrace, PACKET_MAX
}
enum  Z_packet_type {
  Z_PACKET_SOFTWARE_BP, Z_PACKET_HARDWARE_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP,
  Z_PACKET_ACCESS_WP, NR_Z_PACKET_TYPES
}

Functions

void _initialize_remote (void)
int remote_register_number_and_offset (struct gdbarch *gdbarch, int regnum, int *pnum, int *poffset)
char * unpack_varlen_hex (char *buff, ULONGEST *result)
void int_to_threadref (threadref *id, int value)
void register_remote_support_xml (const char *xml)
int hex2bin (const char *hex, gdb_byte *bin, int count)
int bin2hex (const gdb_byte *bin, char *hex, int count)
 DEF_VEC_O (cached_reg_t)
 DECLARE_QUEUE_P (stop_reply_p)
 DEFINE_QUEUE_P (stop_reply_p)
void remote_notif_get_pending_events (struct notif_client *nc)
int putpkt (char *buf)
void getpkt (char **buf, long *sizeof_buf, int forever)
 DEF_VEC_O (remote_g_packet_guess_s)
void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes, const struct target_desc *tdesc)
int remote_filename_p (const char *filename)
bfd * remote_bfd_open (const char *remote_file, const char *target)
void remote_file_put (const char *local_file, const char *remote_file, int from_tty)
void remote_file_get (const char *remote_file, const char *local_file, int from_tty)
void remote_file_delete (const char *remote_file, int from_tty)

Variables

const char interrupt_sequence_control_c [] = "Ctrl-C"
const char interrupt_sequence_break [] = "BREAK"
const char interrupt_sequence_break_g [] = "BREAK-g"
struct notif_client notif_client_stop
int remote_hw_watchpoint_limit = -1
int remote_hw_watchpoint_length_limit = -1
int remote_hw_breakpoint_limit = -1

Define Documentation

#define BUF_SIZE   2048

Definition at line 1927 of file remote.c.

#define CRAZY_MAX_THREADS   1000

Definition at line 2615 of file remote.c.

#define MAX_REMOTE_PACKET_SIZE   16384
#define MAX_TRIES   3
#define MAXTHREADLISTRESULTS   32

Definition at line 272 of file remote.c.

#define MIN_REMOTE_PACKET_SIZE   20
#define OPAQUETHREADBYTES   8

Definition at line 265 of file remote.c.

#define TAG_DISPLAY   4

Definition at line 2339 of file remote.c.

#define TAG_DISPLAY   4 /* A short thing maybe to put on a window */

Definition at line 2339 of file remote.c.

#define TAG_EXISTS   2

Definition at line 2338 of file remote.c.

#define TAG_EXISTS
Value:
2               /* Is this process defined enough to
                                   fetch registers and its stack?  */

Definition at line 2338 of file remote.c.

#define TAG_MOREDISPLAY   16

Definition at line 2341 of file remote.c.

#define TAG_MOREDISPLAY
Value:
16      /* Whatever the kernel wants to say about
                                   the process.  */

Definition at line 2341 of file remote.c.

#define TAG_THREADID   1

Definition at line 2337 of file remote.c.

#define TAG_THREADID   1 /* Echo the thread identifier. */

Definition at line 2337 of file remote.c.

#define TAG_THREADNAME   8

Definition at line 2340 of file remote.c.

#define TAG_THREADNAME   8 /* string, maps 1-to-1 with a thread is. */

Definition at line 2340 of file remote.c.


Typedef Documentation

typedef struct cached_reg cached_reg_t
typedef int gdb_threadref

Definition at line 1899 of file remote.c.

typedef struct remote_g_packet_guess remote_g_packet_guess_s

Definition at line 9478 of file remote.c.

typedef int(* rmt_thread_action)(threadref *ref, void *context)

Definition at line 1987 of file remote.c.

typedef struct stop_reply * stop_reply_p
typedef unsigned char threadref[OPAQUETHREADBYTES]

Definition at line 268 of file remote.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
REMOTE_ALIGN_WRITES 

Definition at line 88 of file remote.c.

anonymous enum
Enumerator:
PACKET_vCont 
PACKET_X 
PACKET_qSymbol 
PACKET_P 
PACKET_p 
PACKET_Z0 
PACKET_Z1 
PACKET_Z2 
PACKET_Z3 
PACKET_Z4 
PACKET_vFile_open 
PACKET_vFile_pread 
PACKET_vFile_pwrite 
PACKET_vFile_close 
PACKET_vFile_unlink 
PACKET_vFile_readlink 
PACKET_qXfer_auxv 
PACKET_qXfer_features 
PACKET_qXfer_libraries 
PACKET_qXfer_libraries_svr4 
PACKET_qXfer_memory_map 
PACKET_qXfer_spu_read 
PACKET_qXfer_spu_write 
PACKET_qXfer_osdata 
PACKET_qXfer_threads 
PACKET_qXfer_statictrace_read 
PACKET_qXfer_traceframe_info 
PACKET_qXfer_uib 
PACKET_qGetTIBAddr 
PACKET_qGetTLSAddr 
PACKET_qSupported 
PACKET_qTStatus 
PACKET_QPassSignals 
PACKET_QProgramSignals 
PACKET_qSearch_memory 
PACKET_vAttach 
PACKET_vRun 
PACKET_QStartNoAckMode 
PACKET_vKill 
PACKET_qXfer_siginfo_read 
PACKET_qXfer_siginfo_write 
PACKET_qAttached 
PACKET_ConditionalTracepoints 
PACKET_ConditionalBreakpoints 
PACKET_BreakpointCommands 
PACKET_FastTracepoints 
PACKET_StaticTracepoints 
PACKET_InstallInTrace 
PACKET_bc 
PACKET_bs 
PACKET_TracepointSource 
PACKET_QAllow 
PACKET_qXfer_fdpic 
PACKET_QDisableRandomization 
PACKET_QAgent 
PACKET_QTBuffer_size 
PACKET_Qbtrace_off 
PACKET_Qbtrace_bts 
PACKET_qXfer_btrace 
PACKET_MAX 

Definition at line 1312 of file remote.c.

Enumerator:
PACKET_ERROR 
PACKET_OK 
PACKET_UNKNOWN 

Definition at line 1130 of file remote.c.

Enumerator:
PACKET_SUPPORT_UNKNOWN 
PACKET_ENABLE 
PACKET_DISABLE 

Definition at line 1112 of file remote.c.

Enumerator:
Z_PACKET_SOFTWARE_BP 
Z_PACKET_HARDWARE_BP 
Z_PACKET_WRITE_WP 
Z_PACKET_READ_WP 
Z_PACKET_ACCESS_WP 
NR_Z_PACKET_TYPES 

Definition at line 1420 of file remote.c.


Function Documentation

void _initialize_remote ( void  )
int bin2hex ( const gdb_byte bin,
char *  hex,
int  count 
)

Definition at line 4664 of file remote.c.

void getpkt ( char **  buf,
long *  sizeof_buf,
int  forever 
)

Definition at line 7631 of file remote.c.

int hex2bin ( const char *  hex,
gdb_byte bin,
int  count 
)

Definition at line 4634 of file remote.c.

void int_to_threadref ( threadref id,
int  value 
)

Definition at line 2251 of file remote.c.

int putpkt ( char *  buf)

Definition at line 7245 of file remote.c.

void register_remote_g_packet_guess ( struct gdbarch *  gdbarch,
int  bytes,
const struct target_desc *  tdesc 
)

Definition at line 9495 of file remote.c.

void register_remote_support_xml ( const char *  xml)

Definition at line 4074 of file remote.c.

bfd* remote_bfd_open ( const char *  remote_file,
const char *  target 
)

Definition at line 10088 of file remote.c.

void remote_file_delete ( const char *  remote_file,
int  from_tty 
)

Definition at line 10247 of file remote.c.

void remote_file_get ( const char *  remote_file,
const char *  local_file,
int  from_tty 
)

Definition at line 10191 of file remote.c.

void remote_file_put ( const char *  local_file,
const char *  remote_file,
int  from_tty 
)

Definition at line 10100 of file remote.c.

int remote_filename_p ( const char *  filename)

Definition at line 10080 of file remote.c.

Definition at line 5826 of file remote.c.

int remote_register_number_and_offset ( struct gdbarch *  gdbarch,
int  regnum,
int pnum,
int poffset 
)

Definition at line 699 of file remote.c.

char * unpack_varlen_hex ( char *  buff,
ULONGEST result 
)

Definition at line 2118 of file remote.c.


Variable Documentation

const char interrupt_sequence_break[] = "BREAK"

Definition at line 835 of file remote.c.

const char interrupt_sequence_break_g[] = "BREAK-g"

Definition at line 836 of file remote.c.

Definition at line 834 of file remote.c.

Initial value:
{
  "Stop",
  "vStopped",
  remote_notif_stop_parse,
  remote_notif_stop_ack,
  remote_notif_stop_can_get_pending_events,
  remote_notif_stop_alloc_reply,
  REMOTE_NOTIF_STOP,
}

Definition at line 5367 of file remote.c.

Definition at line 8387 of file remote.c.

Definition at line 8386 of file remote.c.

Definition at line 8385 of file remote.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines